diff options
1370 files changed, 12296 insertions, 11863 deletions
diff --git a/kamera/kcontrol/kamera.cpp b/kamera/kcontrol/kamera.cpp index 97338181..50d7fc12 100644 --- a/kamera/kcontrol/kamera.cpp +++ b/kamera/kcontrol/kamera.cpp @@ -48,8 +48,8 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kamera, KKameraConfigFactory( "kcmkamera" ) ) KKameraConfig *KKameraConfig::m_instance = NULL; -KKameraConfig::KKameraConfig(TQWidget *parent, const char *name, const TQStringList &) - : KCModule(KKameraConfigFactory::instance(), parent, name) +KKameraConfig::KKameraConfig(TQWidget *tqparent, const char *name, const TQStringList &) + : KCModule(KKameraConfigFactory::instance(), tqparent, name) { m_devicePopup = new KPopupMenu(this); m_actions = new KActionCollection(this); @@ -96,7 +96,7 @@ void KKameraConfig::displayGPSuccessDialogue(void) // set the kcontrol module buttons setButtons(Help | Apply | Cancel | Ok); - // create a layout with two vertical boxes + // create a tqlayout with two vertical boxes TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, 0); topLayout->setAutoAdd(true); @@ -113,29 +113,29 @@ void KKameraConfig::displayGPSuccessDialogue(void) connect(m_deviceSel, TQT_SIGNAL(selectionChanged(TQIconViewItem *)), TQT_SLOT(slot_deviceSelected(TQIconViewItem *))); - m_deviceSel->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + m_deviceSel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); // create actions KAction *act; - act = new KAction(i18n("Add"), "camera", 0, this, TQT_SLOT(slot_addCamera()), m_actions, "camera_add"); + act = new KAction(i18n("Add"), "camera", 0, TQT_TQOBJECT(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, TQT_SLOT(slot_testCamera()), m_actions, "camera_test"); + act = new KAction(i18n("Test"), "camera_test", 0, TQT_TQOBJECT(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, TQT_SLOT(slot_removeCamera()), m_actions, "camera_remove"); + act = new KAction(i18n("Remove"), "edittrash", 0, TQT_TQOBJECT(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, TQT_SLOT(slot_configureCamera()), m_actions, "camera_configure"); + act = new KAction(i18n("Configure..."), "configure", 0, TQT_TQOBJECT(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, TQT_SLOT(slot_cameraSummary()), m_actions, "camera_summary"); + act = new KAction(i18n("Information"), "hwinfo", 0, TQT_TQOBJECT(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, TQT_SLOT(slot_cancelOperation()), m_actions, "camera_cancel"); + act = new KAction(i18n("Cancel"), "stop", 0, TQT_TQOBJECT(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); @@ -184,7 +184,7 @@ void KKameraConfig::load(bool useDefaults ) for (it = groupList.begin(); it != groupList.end(); it++) { if (*it != "<default>") { m_config->setGroup(*it); - if (m_config->readEntry("Path").contains("usb:")) + if (m_config->readEntry("Path").tqcontains("usb:")) continue; kcamera = new KCamera(*it,m_config->readEntry("Path")); @@ -218,7 +218,7 @@ void KKameraConfig::load(bool useDefaults ) if (!strcmp(value,"usb:")) names[model] = value; } - if (ports.contains("usb:") && names[ports["usb:"]]!="usb:") + if (ports.tqcontains("usb:") && names[ports["usb:"]]!="usb:") ports.remove("usb:"); TQMap<TQString,TQString>::iterator portit; @@ -256,7 +256,7 @@ void KKameraConfig::afterCameraOperation(void) // if we're regaining control after a Cancel... if (m_cancelPending) { - qApp->restoreOverrideCursor(); + tqApp->restoreOverrideCursor(); m_cancelPending = false; } @@ -268,23 +268,23 @@ void KKameraConfig::afterCameraOperation(void) TQString KKameraConfig::suggestName(const TQString &name) { TQString new_name = name; - new_name.replace("/", ""); // we cannot have a slash in a URI's host + new_name.tqreplace("/", ""); // we cannot have a slash in a URI's host - if (!m_devices.contains(new_name)) return new_name; + if (!m_devices.tqcontains(new_name)) return new_name; // try new names with a number appended until we find a free one int i = 1; while (i++ < 0xffff) { new_name = name + " (" + TQString::number(i) + ")"; - if (!m_devices.contains(new_name)) return new_name; + if (!m_devices.tqcontains(new_name)) return new_name; } - return TQString::null; + return TQString(); } void KKameraConfig::slot_addCamera() { - KCamera *m_device = new KCamera(TQString::null,TQString::null); + KCamera *m_device = new KCamera(TQString(),TQString()); 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); @@ -302,7 +302,7 @@ void KKameraConfig::slot_addCamera() void KKameraConfig::slot_removeCamera() { TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.contains(name)) { + if (m_devices.tqcontains(name)) { KCamera *m_device = m_devices[name]; m_devices.remove(name); delete m_device; @@ -317,7 +317,7 @@ void KKameraConfig::slot_testCamera() beforeCameraOperation(); TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.contains(name)) { + if (m_devices.tqcontains(name)) { KCamera *m_device = m_devices[name]; if (m_device->test()) KMessageBox::information(this, i18n("Camera test was successful.")); @@ -329,7 +329,7 @@ void KKameraConfig::slot_testCamera() void KKameraConfig::slot_configureCamera() { TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.contains(name)) { + if (m_devices.tqcontains(name)) { KCamera *m_device = m_devices[name]; m_device->configure(); } @@ -339,7 +339,7 @@ void KKameraConfig::slot_cameraSummary() { TQString summary; TQString name = m_deviceSel->currentItem()->text(); - if (m_devices.contains(name)) { + if (m_devices.tqcontains(name)) { KCamera *m_device = m_devices[name]; summary = m_device->summary(); if (!summary.isNull()) { @@ -354,7 +354,7 @@ void KKameraConfig::slot_cancelOperation() // Prevent the user from keeping clicking Cancel m_actions->action("camera_cancel")->setEnabled(false); // and indicate that the click on Cancel did have some effect - qApp->setOverrideCursor(Qt::WaitCursor); + tqApp->setOverrideCursor(TQt::WaitCursor); } void KKameraConfig::slot_deviceMenu(TQIconViewItem *item, const TQPoint &point) @@ -381,7 +381,7 @@ void KKameraConfig::cbGPIdle(GPContext * /*context*/, void * /*data*/) { /*KKameraConfig *self( reinterpret_cast<KKameraConfig*>(data) );*/ - qApp->processEvents(); + tqApp->processEvents(); } GPContextFeedback KKameraConfig::cbGPCancel(GPContext * /*context*/, void *data) @@ -390,7 +390,7 @@ GPContextFeedback KKameraConfig::cbGPCancel(GPContext * /*context*/, void *data) // Since in practice no camera driver supports idle callbacks yet, // we'll use the cancel callback as opportunity to process events - qApp->processEvents(); + tqApp->processEvents(); // If a cancel request is pending, ask gphoto to cancel if (self->m_cancelPending) diff --git a/kamera/kcontrol/kamera.h b/kamera/kcontrol/kamera.h index 6e66d642..537522f6 100644 --- a/kamera/kcontrol/kamera.h +++ b/kamera/kcontrol/kamera.h @@ -47,10 +47,11 @@ class KPopupMenu; class KKameraConfig : public KCModule { Q_OBJECT + TQ_OBJECT friend class KameraDeviceSelectDialog; public: - KKameraConfig(TQWidget *parent, const char *name, const TQStringList &); + KKameraConfig(TQWidget *tqparent, const char *name, const TQStringList &); virtual ~KKameraConfig(); // KCModule interface methods diff --git a/kamera/kcontrol/kameraconfigdialog.cpp b/kamera/kcontrol/kameraconfigdialog.cpp index 124ea991..914e17ab 100644 --- a/kamera/kcontrol/kameraconfigdialog.cpp +++ b/kamera/kcontrol/kameraconfigdialog.cpp @@ -42,9 +42,9 @@ KameraConfigDialog::KameraConfigDialog(Camera */*camera*/, CameraWidget *widget, - TQWidget *parent, + TQWidget *tqparent, const char *name) : -KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok ), +KDialogBase(tqparent, name, true, TQString(), Ok|Cancel, Ok ), m_widgetRoot(widget) { TQFrame *main = makeMainWidget(); @@ -56,9 +56,9 @@ m_widgetRoot(widget) appendWidget(main, widget); } -void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) +void KameraConfigDialog::appendWidget(TQWidget *tqparent, CameraWidget *widget) { - TQWidget *newParent = parent; + TQWidget *newParent = tqparent; CameraWidgetType widget_type; const char *widget_name; @@ -74,7 +74,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) TQString whats_this = TQString::fromLocal8Bit(widget_info); // gphoto2 doesn't seem to have any standard for i18n - // Add this widget to parent + // Add this widget to tqparent switch(widget_type) { case GP_WIDGET_WINDOW: { @@ -85,7 +85,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) case GP_WIDGET_SECTION: { if (!m_tabWidget) - m_tabWidget = new TQTabWidget(parent); + m_tabWidget = new TQTabWidget(tqparent); TQWidget *tab = new TQWidget(m_tabWidget); // widgets are to be aligned vertically in the tab TQVBoxLayout *tabLayout = new TQVBoxLayout(tab, marginHint(), @@ -104,7 +104,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) { gp_widget_get_value(widget, &widget_value_string); - TQGrid *grid = new TQGrid(2, Horizontal, parent); + TQGrid *grid = new TQGrid(2,Qt::Horizontal, tqparent); grid->setSpacing(spacingHint()); new TQLabel(TQString::fromLocal8Bit( widget_label )+":", grid); TQLineEdit *lineEdit = new TQLineEdit(widget_value_string, grid); @@ -123,13 +123,13 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) gp_widget_get_range(widget, &widget_low, &widget_high, &widget_increment); gp_widget_get_value(widget, &widget_value_float); - TQGroupBox *groupBox = new TQVGroupBox(widget_label, parent); + TQGroupBox *groupBox = new TQVGroupBox(widget_label, tqparent); TQSlider *slider = new TQSlider( ( int )widget_low, ( int )widget_high, ( int )widget_increment, ( int )widget_value_float, - TQSlider::Horizontal, + Qt::Horizontal, groupBox ); m_wmap.insert(widget, slider); @@ -142,7 +142,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) { gp_widget_get_value(widget, &widget_value_int); - TQCheckBox *checkBox = new TQCheckBox(widget_label, parent); + TQCheckBox *checkBox = new TQCheckBox(widget_label, tqparent); checkBox->setChecked(widget_value_int); m_wmap.insert(widget, checkBox); @@ -160,9 +160,9 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) // for less than 5 options, align them horizontally TQButtonGroup *buttonGroup; if (count > 4) - buttonGroup = new TQVButtonGroup(widget_label, parent); + buttonGroup = new TQVButtonGroup(widget_label, tqparent); else - buttonGroup = new TQHButtonGroup(widget_label, parent); + buttonGroup = new TQHButtonGroup(widget_label, tqparent); for(int i = 0; i < count; ++i) { const char *widget_choice; @@ -183,7 +183,7 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) { gp_widget_get_value(widget, &widget_value_string); - TQComboBox *comboBox = new TQComboBox(FALSE, parent); + TQComboBox *comboBox = new TQComboBox(FALSE, tqparent); comboBox->clear(); for(int i = 0; i < gp_widget_count_choices(widget); ++i) { const char *widget_choice; @@ -206,14 +206,14 @@ void KameraConfigDialog::appendWidget(TQWidget *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 TQLabel(i18n("Button (not supported by KControl)"), parent); + new TQLabel(i18n("Button (not supported by KControl)"), tqparent); break; } case GP_WIDGET_DATE: { // TODO - new TQLabel(i18n("Date (not supported by KControl)"), parent); + new TQLabel(i18n("Date (not supported by KControl)"), tqparent); break; } @@ -221,14 +221,14 @@ void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget) return; } - // Append all this widgets children + // Append all this widgets tqchildren for(int i = 0; i < gp_widget_count_children(widget); ++i) { CameraWidget *widget_child; gp_widget_get_child(widget, i, &widget_child); appendWidget(newParent, widget_child); } - // Things that must be done after all children were added + // Things that must be done after all tqchildren were added /* switch (widget_type) { case GP_WIDGET_SECTION: @@ -309,7 +309,7 @@ void KameraConfigDialog::updateWidgetValue(CameraWidget *widget) void KameraConfigDialog::slotOk() { - // Copy Qt widget values into CameraWidget hierarchy + // Copy TQt widget values into CameraWidget hierarchy updateWidgetValue(m_widgetRoot); // 'ok' dialog diff --git a/kamera/kcontrol/kameraconfigdialog.h b/kamera/kcontrol/kameraconfigdialog.h index 575f4aad..d02a6ed1 100644 --- a/kamera/kcontrol/kameraconfigdialog.h +++ b/kamera/kcontrol/kameraconfigdialog.h @@ -34,15 +34,16 @@ extern "C" { class KameraConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: KameraConfigDialog(Camera *camera, CameraWidget *widget, - TQWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); private slots: void slotOk(); private: - void appendWidget(TQWidget *parent, CameraWidget *widget); + void appendWidget(TQWidget *tqparent, CameraWidget *widget); void updateWidgetValue(CameraWidget *widget); TQMap<CameraWidget *, TQWidget *> m_wmap; diff --git a/kamera/kcontrol/kameradevice.cpp b/kamera/kcontrol/kameradevice.cpp index 9492934b..2e8e45e2 100644 --- a/kamera/kcontrol/kameradevice.cpp +++ b/kamera/kcontrol/kameradevice.cpp @@ -86,7 +86,7 @@ bool KCamera::initInformation() int index = gp_abilities_list_lookup_model(m_abilitylist, m_model.local8Bit().data()); if(index < 0) { emit error(i18n("Description of abilities for camera %1 is not available." - " Configuration options may be incorrect.").arg(m_model)); + " Configuration options may be incorrect.").tqarg(m_model)); return false; } gp_abilities_list_get_abilities(m_abilitylist, index, &m_abilities); @@ -197,7 +197,7 @@ void KCamera::load(KConfig *config) m_model = config->readEntry("Model"); if (m_path.isNull()) m_path = config->readEntry("Path"); - invalidateCamera(); + tqinvalidateCamera(); } void KCamera::save(KConfig *config) @@ -209,7 +209,7 @@ void KCamera::save(KConfig *config) TQString KCamera::portName() { - TQString port = m_path.left(m_path.find(":")).lower(); + TQString port = m_path.left(m_path.tqfind(":")).lower(); if (port == "serial") return i18n("Serial"); if (port == "usb") return i18n("USB"); return i18n("Unknown port"); @@ -223,17 +223,17 @@ void KCamera::setName(const TQString &name) void KCamera::setModel(const TQString &model) { m_model = model; - invalidateCamera(); + tqinvalidateCamera(); initInformation(); } void KCamera::setPath(const TQString &path) { m_path = path; - invalidateCamera(); + tqinvalidateCamera(); } -void KCamera::invalidateCamera() +void KCamera::tqinvalidateCamera() { if (m_camera) { gp_camera_free(m_camera); @@ -270,8 +270,8 @@ CameraAbilities KCamera::abilities() // ---------- KameraSelectCamera ------------ -KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *device) - : KDialogBase(parent, "kkameradeviceselect", true, i18n("Select Camera Device"), Ok | Cancel, Ok, true) +KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *tqparent, KCamera *device) + : KDialogBase(tqparent, "kkameradeviceselect", true, i18n("Select Camera Device"), Ok | Cancel, Ok, true) { m_device = device; connect(m_device, TQT_SIGNAL(error(const TQString &)), @@ -282,7 +282,7 @@ KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *de TQWidget *page = new TQWidget( this ); setMainWidget(page); - // a layout with vertical boxes + // a tqlayout with vertical boxes TQHBoxLayout *topLayout = new TQHBoxLayout(page, 0, KDialog::spacingHint()); // the models list @@ -293,7 +293,7 @@ KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *de 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(TQSizePolicy(TQSizePolicy::Maximum, + m_modelSel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); TQVBoxLayout *rightLayout = new TQVBoxLayout(0L, 0, KDialog::spacingHint()); @@ -347,7 +347,7 @@ KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *de 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(TQString::fromLatin1(info.path).mid(7)); + m_serialPortCombo->insertItem(TQString::tqfromLatin1(info.path).mid(7)); } } gp_port_info_list_free(list); @@ -403,7 +403,7 @@ void KameraDeviceSelectDialog::save() void KameraDeviceSelectDialog::load() { TQString path = m_device->path(); - TQString port = path.left(path.find(":")).lower(); + TQString port = path.left(path.tqfind(":")).lower(); if (port == "serial") setPortType(INDEX_SERIAL); if (port == "usb") setPortType(INDEX_USB); @@ -432,7 +432,7 @@ void KameraDeviceSelectDialog::slot_setModel(TQListViewItem *item) int index = gp_abilities_list_lookup_model(m_device->m_abilitylist, model.local8Bit().data()); if(index < 0) { slot_error(i18n("Description of abilities for camera %1 is not available." - " Configuration options may be incorrect.").arg(model)); + " Configuration options may be incorrect.").tqarg(model)); } int result = gp_abilities_list_get_abilities(m_device->m_abilitylist, index, &abilities); if (result == GP_OK) { @@ -452,7 +452,7 @@ void KameraDeviceSelectDialog::slot_setModel(TQListViewItem *item) setPortType(INDEX_USB); } else { slot_error(i18n("Description of abilities for camera %1 is not available." - " Configuration options may be incorrect.").arg(model)); + " Configuration options may be incorrect.").tqarg(model)); } } diff --git a/kamera/kcontrol/kameradevice.h b/kamera/kcontrol/kameradevice.h index 34594f4e..4b8205b7 100644 --- a/kamera/kcontrol/kameradevice.h +++ b/kamera/kcontrol/kameradevice.h @@ -40,10 +40,11 @@ class TQRadioButton; class KCamera : public TQObject { friend class KameraDeviceSelectDialog; Q_OBJECT + TQ_OBJECT public: KCamera(const TQString &name, const TQString &path); ~KCamera(); - void invalidateCamera(); + void tqinvalidateCamera(); bool configure(); void load(KConfig *m_config); void save(KConfig *m_config); @@ -88,8 +89,9 @@ protected: class KameraDeviceSelectDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KameraDeviceSelectDialog(TQWidget *parent, KCamera *device); + KameraDeviceSelectDialog(TQWidget *tqparent, KCamera *device); void save(); void load(); protected slots: diff --git a/kamera/kioslave/kamera.cpp b/kamera/kioslave/kamera.cpp index 5aefd632..05917e3c 100644 --- a/kamera/kioslave/kamera.cpp +++ b/kamera/kioslave/kamera.cpp @@ -55,7 +55,7 @@ extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); - static void frontendCameraStatus(GPContext *context, const char *format, va_list args, void *data); + static void frontendCameratqStatus(GPContext *context, const char *format, va_list args, void *data); static unsigned int frontendProgressStart( GPContext *context, float totalsize, const char *format, va_list args, void *data @@ -242,7 +242,7 @@ void KameraProtocol::get(const KURL &url) #undef GPHOTO_TEXT_FILE // emit info message - infoMessage( i18n("Retrieving data from camera <b>%1</b>").arg(url.user()) ); + infoMessage( i18n("Retrieving data from camera <b>%1</b>").tqarg(url.user()) ); // Note: There's no need to re-read directory for each get() anymore gp_file_new(&m_file); @@ -574,7 +574,7 @@ void KameraProtocol::listDir(const KURL &url) gp_list_free (list); /* Avoid duplicated entry for usb: and usb:001,042 entries. */ - if (ports.contains("usb:") && names[ports["usb:"]]!="usb:") + if (ports.tqcontains("usb:") && names[ports["usb:"]]!="usb:") ports.remove("usb:"); for (it = groupList.begin(); it != groupList.end(); it++) { @@ -606,7 +606,7 @@ void KameraProtocol::listDir(const KURL &url) xurl.setProtocol("camera"); xurl.setUser(*it); /* Avoid setting usb:xxx,yyy. */ - if (m_cfgPath.contains("usb:")>0) { + if (m_cfgPath.tqcontains("usb:")>0) { names[*it] = "usb:"; xurl.setHost("usb:"); } else { @@ -795,7 +795,7 @@ void KameraProtocol::setHost(const TQString& host, int port, const TQString& use } // register gphoto2 callback functions - gp_context_set_status_func(m_context, frontendCameraStatus, this); + gp_context_set_status_func(m_context, frontendCameratqStatus, this); gp_context_set_progress_funcs(m_context, frontendProgressStart, frontendProgressUpdate, NULL, this); // gp_camera_set_message_func(m_camera, ..., this) @@ -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 = TQString::fromLatin1(info.file.type); + atom.m_str = TQString::tqfromLatin1(info.file.type); udsEntry.append(atom); } @@ -890,7 +890,7 @@ void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo atom.m_long = 0; atom.m_long |= (info.file.permissions & GP_FILE_PERM_READ) ? (S_IRUSR | S_IRGRP | S_IROTH) : 0; // we cannot represent individual FP_FILE_PERM_DELETE permission in the Unix access scheme - // since the parent directory's write permission defines that + // since the tqparent directory's write permission defines that udsEntry.append(atom); } else { // basic permissions, in case the camera doesn't provide permissions info @@ -1028,7 +1028,7 @@ unsigned int frontendProgressStart( } // this callback function is activated on every status message from gphoto2 -static void frontendCameraStatus(GPContext * /*context*/, const char *format, va_list args, void *data) +static void frontendCameratqStatus(GPContext * /*context*/, const char *format, va_list args, void *data) { KameraProtocol *object = (KameraProtocol*)data; char *status; diff --git a/kcoloredit/colorselector.cpp b/kcoloredit/colorselector.cpp index 50288313..af209147 100644 --- a/kcoloredit/colorselector.cpp +++ b/kcoloredit/colorselector.cpp @@ -30,7 +30,7 @@ #include "texteditselection.h" #include "colorselector.h" -ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(parent, name) { +ColorSelector::ColorSelector(TQWidget *tqparent, const char *name ) : TQWidget(tqparent, name) { fComponentsMode = false; TQVBoxLayout* topLayout = new TQVBoxLayout(this, 4); /* @@ -53,7 +53,7 @@ ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(par topLayout->addWidget(gradientSelection, 10); KSeparator* hLine = new KSeparator(KSeparator::HLine, this); topLayout->addWidget(hLine); - TQHBoxLayout* layout = new TQHBoxLayout(); + TQHBoxLayout* tqlayout = new TQHBoxLayout(); TextEditSelection* textEditSelection = new TextEditSelection(this); connect(textEditSelection, TQT_SIGNAL( valueChanged(Color*) ), TQT_SLOT( slotSetColor(Color*) )); connect(this, TQT_SIGNAL( valueChanged(Color*) ), textEditSelection, TQT_SLOT( slotSetValue(Color*) )); @@ -73,7 +73,7 @@ ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(par TQVBoxLayout* colorChangeSliderLayout = new TQVBoxLayout(colorChangeSliderWidget, 1); colorChangeSliderLayout->setMargin(0); TQSlider* colorChangeSlider = new TQSlider(0, MAX_COLOR_CHANGE_VALUE, - MAX_COLOR_CHANGE_VALUE/4, colorChangeValue, TQSlider::Horizontal, colorChangeSliderWidget); + MAX_COLOR_CHANGE_VALUE/4, colorChangeValue, Qt::Horizontal, colorChangeSliderWidget); colorChangeSlider->setTickInterval(colorChangeSlider->pageStep()); colorChangeSlider->setTickmarks(TQSlider::Above); connect(colorChangeSlider, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotColorChangeValueChanged(int) )); @@ -88,17 +88,17 @@ ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(par colorChangeLayout->addStretch(10); colorChangeLayout->addWidget(colorChangeSliderWidget); colorChangeLayout->addStretch(10); - layout->addLayout(colorChangeLayout, 10); + tqlayout->addLayout(colorChangeLayout, 10); m_color.setComponents(RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE); slotColorReplace(); KSeparator* vLine = new KSeparator(KSeparator::VLine, this); - layout->addWidget(vLine); - layout->addWidget(textEditSelection, 1); + tqlayout->addWidget(vLine); + tqlayout->addWidget(textEditSelection, 1); colorPatch = new KColorPatch(this); connect(colorPatch, TQT_SIGNAL( colorChanged(const TQColor&) ), TQT_SLOT( slotSetColor(const TQColor&) )); colorPatch->setMinimumSize(80, 64); - layout->addWidget(colorPatch, 10); - topLayout->addLayout(layout); + tqlayout->addWidget(colorPatch, 10); + topLayout->addLayout(tqlayout); } ColorSelector::~ColorSelector() { } diff --git a/kcoloredit/colorselector.h b/kcoloredit/colorselector.h index 72d62ef6..5c3d9b62 100644 --- a/kcoloredit/colorselector.h +++ b/kcoloredit/colorselector.h @@ -31,10 +31,11 @@ */ class ColorSelector : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** constructs a color selector widget */ - ColorSelector(TQWidget *parent=0, const char *name=0); + ColorSelector(TQWidget *tqparent=0, const char *name=0); ~ColorSelector(); /** @return the selected color */ const Color& color(); diff --git a/kcoloredit/editablestreamhistory.h b/kcoloredit/editablestreamhistory.h index 9fe59d99..20233e33 100644 --- a/kcoloredit/editablestreamhistory.h +++ b/kcoloredit/editablestreamhistory.h @@ -37,7 +37,7 @@ public: /** Pastes a stream at index. Uses undo/redo history */ void paste(const int index, EDITABLE_STREAM& pasteStream); /** Replaces a stream at index. Uses undo/redo history */ - void replace(const int index, EDITABLE_STREAM& replaceStream); + void tqreplace(const int index, EDITABLE_STREAM& replaceStream); /** @return Whether undo possible */ bool undoPossible(); /** @return Whether redo possible */ @@ -76,7 +76,7 @@ template <class EDITABLE_STREAM> void } template <class EDITABLE_STREAM> void - EditableStreamHistory<EDITABLE_STREAM>::replace(const int index, EDITABLE_STREAM& replaceStream) { + EditableStreamHistory<EDITABLE_STREAM>::tqreplace(const int index, EDITABLE_STREAM& replaceStream) { m_editableStream->cut(index, replaceStream.length()); m_editableStream->paste(index, replaceStream); } diff --git a/kcoloredit/gradientselection.cpp b/kcoloredit/gradientselection.cpp index f75547c1..72dd02cd 100644 --- a/kcoloredit/gradientselection.cpp +++ b/kcoloredit/gradientselection.cpp @@ -24,15 +24,15 @@ #include "main.h" #include "gradientselection.h" -GradientSelection::GradientSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) { +GradientSelection::GradientSelection(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) { TQGridLayout* topLayout = new TQGridLayout(this, 2, 2, 0); - TQHBoxLayout* layout = new TQHBoxLayout(0); - layout->setMargin(3); + TQHBoxLayout* tqlayout = new TQHBoxLayout(0); + tqlayout->setMargin(3); xyColorSelector = new KXYColorSelector(this); connect(xyColorSelector, TQT_SIGNAL( valueChanged(int, int) ), TQT_SLOT( slotXyColorSelectorPosChanged(int, int) )); - layout->addWidget(xyColorSelector); - topLayout->addLayout(layout, 0, 0); + tqlayout->addWidget(xyColorSelector); + topLayout->addLayout(tqlayout, 0, 0); topLayout->setRowStretch(0, 10); topLayout->setRowStretch(1, 0); TQVBoxLayout* xyColorSelectorLayout = new TQVBoxLayout(); @@ -54,7 +54,7 @@ GradientSelection::GradientSelection(TQWidget *parent, const char *name ) : TQWi xyColorSelectorLayout->addLayout(buttonsLayout); xyColorSelectorLayout->addSpacing(2); topLayout->addLayout(xyColorSelectorLayout, 1, 0); - zColorSelector = new KZColorSelector(KZColorSelector::Vertical, this); + zColorSelector = new KZColorSelector(Qt::Vertical, this); connect(zColorSelector, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotZColorSelectorPosChanged(int) )); zColorSelector->setFixedWidth(36); @@ -218,7 +218,7 @@ void GradientSelection::slotXyColorSelectorPosChanged(int x, int y) { } void GradientSelection::slotZColorSelectorPosChanged(int y) { - bool repaintZColorSelector = false; + bool tqrepaintZColorSelector = false; switch(zColorSelectorComponentIndex) { case H_COMPONENT: hComponent = y; @@ -237,7 +237,7 @@ void GradientSelection::slotZColorSelectorPosChanged(int y) { rgbColor.setHsv(hComponent, sComponent, vComponent); color.setComponents(rgbColor.red(), rgbColor.green(), rgbColor.blue()); updateXyColorSelector(false); - if(repaintZColorSelector) + if(tqrepaintZColorSelector) updateZColorSelector(); emit valueChanged(&color); } diff --git a/kcoloredit/gradientselection.h b/kcoloredit/gradientselection.h index 0197f706..e3e58d1c 100644 --- a/kcoloredit/gradientselection.h +++ b/kcoloredit/gradientselection.h @@ -32,10 +32,11 @@ */ class GradientSelection : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** Constructs the widget */ - GradientSelection(TQWidget *parent=0, const char *name=0); + GradientSelection(TQWidget *tqparent=0, const char *name=0); ~GradientSelection(); /** Enables or disables the color synchronize button */ void enableSynchronizeColorButton(bool enable); diff --git a/kcoloredit/imageselection.cpp b/kcoloredit/imageselection.cpp index b6d47c47..a82bdfdb 100644 --- a/kcoloredit/imageselection.cpp +++ b/kcoloredit/imageselection.cpp @@ -17,7 +17,7 @@ #include "imageselection.h" -ImageSelection::ImageSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) { +ImageSelection::ImageSelection(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) { } ImageSelection::~ImageSelection(){ } diff --git a/kcoloredit/imageselection.h b/kcoloredit/imageselection.h index dd6a9364..a773cdcc 100644 --- a/kcoloredit/imageselection.h +++ b/kcoloredit/imageselection.h @@ -27,10 +27,11 @@ */ class ImageSelection : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** constructs the widget */ - ImageSelection(TQWidget *parent=0, const char *name=0); + ImageSelection(TQWidget *tqparent=0, const char *name=0); ~ImageSelection(); signals: diff --git a/kcoloredit/kcolorchooser.cpp b/kcoloredit/kcolorchooser.cpp index cbd5292b..455e9e16 100644 --- a/kcoloredit/kcolorchooser.cpp +++ b/kcoloredit/kcolorchooser.cpp @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) KColorDialog dlg; - dlg.setColor(Qt::blue); // Just a color + dlg.setColor(TQt::blue); // Just a color app.connect(&dlg, TQT_SIGNAL(finished()), TQT_SLOT(quit())); @@ -65,6 +65,6 @@ int main(int argc, char *argv[]) KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); const TQColor c = dlg.color(); if ( args->isSet("print") && c.isValid() ) { - std::cout << c.name().utf8().data() << std::endl; + std::cout << TQString(c.name()).utf8().data() << std::endl; } } diff --git a/kcoloredit/kcoloredit.cpp b/kcoloredit/kcoloredit.cpp index 9b093722..5b0dffb9 100644 --- a/kcoloredit/kcoloredit.cpp +++ b/kcoloredit/kcoloredit.cpp @@ -64,39 +64,39 @@ KColorEditApp::~KColorEditApp() { void KColorEditApp::initActions() { // File actiojns - KStdAction::openNew( this, TQT_SLOT( slotFileNew() ), actionCollection() ); - KStdAction::open( this, TQT_SLOT( slotFileOpen() ), actionCollection() ); - KStdAction::saveAs( this, TQT_SLOT( slotFileSaveAs() ), actionCollection() ); - KStdAction::close( this, TQT_SLOT( slotClose() ), actionCollection() ); - KStdAction::quit( this, TQT_SLOT( slotQuit() ), actionCollection() ); - m_actSave = KStdAction::save( this, TQT_SLOT( slotFileSave() ), + KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT( slotFileNew() ), actionCollection() ); + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection() ); + KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs() ), actionCollection() ); + KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( slotClose() ), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotQuit() ), actionCollection() ); + m_actSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( slotFileSave() ), actionCollection() ); - m_actRecent = KStdAction::openRecent( this, + m_actRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() ); ( void ) new KAction( i18n("New &Window"), kapp->miniIcon(), KShortcut(), - this, TQT_SLOT( slotFileNewWindow() ), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT( slotFileNewWindow() ), actionCollection(), "file_new_window" ); // Edit actions - m_actCut = KStdAction::cut( this, TQT_SLOT( slotEditCut() ), + m_actCut = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( slotEditCut() ), actionCollection() ); - m_actCopy = KStdAction::copy( this, TQT_SLOT( slotEditCopy() ), + m_actCopy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( slotEditCopy() ), actionCollection() ); - m_actPaste = KStdAction::paste( this, TQT_SLOT( slotEditPaste() ), + m_actPaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( slotEditPaste() ), actionCollection() ); m_actPaste->setEnabled( false ); // Color Menu - m_actNames = new KToggleAction( i18n("Show &Color Names"), KShortcut(), this, + m_actNames = new KToggleAction( i18n("Show &Color Names"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotViewColorNames() ), actionCollection(), "color_view_names" ); m_actNames->setCheckedState(i18n("Hide &Color Names")); - m_actPalette = new KAction( i18n("From &Palette"), KShortcut(), this, + m_actPalette = new KAction( i18n("From &Palette"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotColorFromPalette() ), actionCollection(), "color_from_palette" ); - ( void ) new KAction( i18n("From &Screen"), KShortcut(), this, + ( void ) new KAction( i18n("From &Screen"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotColorFromScreen() ), actionCollection(), "color_from_screen" ); } @@ -104,7 +104,7 @@ void KColorEditApp::initActions() void KColorEditApp::initStatusBar() { statusBar()->insertItem(i18n("Ready."), ID_STATUS_MSG, 1); - statusBar()->setItemAlignment( ID_STATUS_MSG, Qt::AlignLeft ); + statusBar()->setItemAlignment( ID_STATUS_MSG, TQt::AlignLeft ); } void KColorEditApp::initDocument() diff --git a/kcoloredit/kcoloredit.h b/kcoloredit/kcoloredit.h index e30fff18..e09fd415 100644 --- a/kcoloredit/kcoloredit.h +++ b/kcoloredit/kcoloredit.h @@ -21,7 +21,7 @@ #include <config.h> -// include files for Qt +// include files for TQt #include <tqevent.h> #include <tqstringlist.h> @@ -54,6 +54,7 @@ class KColorEditView; class KColorEditApp : public KMainWindow { Q_OBJECT + TQ_OBJECT friend class KColorEditView; @@ -73,7 +74,7 @@ class KColorEditApp : public KMainWindow KColorEditDoc *document() const; protected: - /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration + /** save general Options like all bar positions and status as well as the tqgeometry and the recent file list to the configuration * file */ void saveOptions(); diff --git a/kcoloredit/kcoloreditdoc.cpp b/kcoloredit/kcoloreditdoc.cpp index ea9a0433..ed9094e5 100644 --- a/kcoloredit/kcoloreditdoc.cpp +++ b/kcoloredit/kcoloreditdoc.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// include files for Qt +// include files for TQt #include <tqdir.h> #include <tqfileinfo.h> #include <tqwidget.h> @@ -31,7 +31,7 @@ #include "kcoloreditview.h" #include "resource.h" -KColorEditDoc::KColorEditDoc(TQWidget *parent, const char *name) : TQObject(parent, name), +KColorEditDoc::KColorEditDoc(TQWidget *tqparent, const char *name) : TQObject(tqparent, name), m_palette(), m_paletteHistory(&m_palette, 0) { m_pViewList = new TQPtrList<KColorEditView>(); m_pViewList->setAutoDelete(true); @@ -106,10 +106,10 @@ bool KColorEditDoc::saveModified() if(m_modified) { - KColorEditApp *window=(KColorEditApp *) parent(); + KColorEditApp *window=(KColorEditApp *) tqparent(); int want_save = KMessageBox::warningYesNoCancel(window, i18n("The current file has been modified.\n" - "Do you want to save it?"), TQString::null, KStdGuiItem::save(), i18n("Do Not Save")); + "Do you want to save it?"), TQString(), KStdGuiItem::save(), i18n("Do Not Save")); switch(want_save) { case KMessageBox::Yes: @@ -175,7 +175,7 @@ bool KColorEditDoc::openDocument(const TQString& filename) { setPaletteCursorPos(m_palette.length()); setPaletteSelection(0, 0); slotRedrawAllViews(0, true); - KColorEditApp *window=(KColorEditApp*)parent(); + KColorEditApp *window=(KColorEditApp*)tqparent(); window->setCaption(m_title); } return true; @@ -235,7 +235,7 @@ void KColorEditDoc::copyToClipboard(Palette& palette) { TQString text; TQTextOStream stream(&text); palette.save(stream, 0, false); - KApplication::clipboard()->setText(text); + KApplication::tqclipboard()->setText(text); emit clipboardChanged(); } @@ -260,7 +260,7 @@ void KColorEditDoc::paste() { Palette palettePaste; TQString text; TQTextIStream stream(&text); - text = KApplication::clipboard()->text(); + text = KApplication::tqclipboard()->text(); if(palettePaste.load( stream, false )) { m_paletteHistory.paste(paletteCursorPos(), palettePaste); setPaletteSelection(paletteCursorPos(), paletteCursorPos() + @@ -281,11 +281,11 @@ void KColorEditDoc::insert(int index, const Color& color) { slotRedrawAllViews(0); } -void KColorEditDoc::replace(int index, const Color& color) { +void KColorEditDoc::tqreplace(int index, const Color& color) { Palette paletteReplace; Color* replaceColor = new Color(color); paletteReplace.append(replaceColor); - m_paletteHistory.replace(index, paletteReplace); + m_paletteHistory.tqreplace(index, paletteReplace); setPaletteSelection(0, 0); setModified(true); slotRedrawAllViews(0); diff --git a/kcoloredit/kcoloreditdoc.h b/kcoloredit/kcoloreditdoc.h index 03d5ce70..108e05fe 100644 --- a/kcoloredit/kcoloreditdoc.h +++ b/kcoloredit/kcoloreditdoc.h @@ -44,13 +44,14 @@ class KColorEditView; * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @version KDevelop version 0.4 code generation */ -class KColorEditDoc : public QObject +class KColorEditDoc : public TQObject { Q_OBJECT + TQ_OBJECT public: /** Constructor for the fileclass of the application */ - KColorEditDoc(TQWidget *parent, const char *name=0); + KColorEditDoc(TQWidget *tqparent, const char *name=0); /** Destructor for the fileclass of the application */ ~KColorEditDoc(); @@ -111,7 +112,7 @@ class KColorEditDoc : public QObject /** Inserts a color at index */ void insert(int index, const Color& color); /** Replaces a color at index */ - void replace(int index, const Color& color); + void tqreplace(int index, const Color& color); protected: /** Sets an error string if an IO operation was unsuccesfull */ diff --git a/kcoloredit/kcoloreditview.cpp b/kcoloredit/kcoloreditview.cpp index 10484fe8..1abfd861 100644 --- a/kcoloredit/kcoloreditview.cpp +++ b/kcoloredit/kcoloreditview.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// include files for Qt +// include files for TQt #include <tqpainter.h> #include <tqlayout.h> #include <tqpushbutton.h> @@ -35,7 +35,7 @@ #include "kcoloredit.h" #include "palette.h" -KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter(parent, name) { +KColorEditView::KColorEditView(TQWidget *tqparent, const char *name) : TQSplitter(tqparent, name) { colorSelector = new ColorSelector(this); colorSelector->slotSetColor( Color( RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE, "" )); @@ -43,7 +43,7 @@ KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter( TQVBoxLayout* paletteLayout = new TQVBoxLayout(paletteViewArea); paletteView = new PaletteView(16, 16, 2, this, paletteViewArea); paletteLayout->addWidget(paletteView, 10); - TQHBoxLayout* layout = new TQHBoxLayout(); + TQHBoxLayout* tqlayout = new TQHBoxLayout(); TQVBoxLayout* addColorLayout = new TQVBoxLayout(4); addColorLayout->setMargin(8); TQHBoxLayout* buttonsLayout = new TQHBoxLayout(4); @@ -70,7 +70,7 @@ KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter( // paletteView, TQT_SLOT( slotCursorFollowsChosenColor(bool) )); //cursorFollowsChosenColor->toggle(); paletteView->slotCursorFollowsChosenColor(true); - layout->addLayout(addColorLayout, 0); + tqlayout->addLayout(addColorLayout, 0); TQVGroupBox* colorAtCursorFrame = new TQVGroupBox(i18n("Color at Cursor"), paletteViewArea); TQWidget* colorAtCursorFrameArea = new TQWidget(colorAtCursorFrame); TQVBoxLayout* colorAtCursorLayout = new TQVBoxLayout(colorAtCursorFrameArea, 4); @@ -127,10 +127,10 @@ KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter( colorAtCursorRgbStringLayout->addWidget(colorAtCursorRgbStringValueLabel); colorAtCursorRgbStringLayout->addStretch(); colorAtCursorLayout->addLayout(colorAtCursorRgbStringLayout); - layout->addWidget(colorAtCursorFrame, 10); - layout->addSpacing(8); + tqlayout->addWidget(colorAtCursorFrame, 10); + tqlayout->addSpacing(8); paletteLayout->addSpacing(4); - paletteLayout->addLayout(layout); + paletteLayout->addLayout(tqlayout); paletteLayout->addSpacing(4); inColorNameChanging = false; doNotUpdateColorLabels = false; @@ -145,7 +145,7 @@ void KColorEditView::setColorAtCursorComponentValueLabelSizes(TQLabel* const lab } KColorEditDoc *KColorEditView::document() const { - KColorEditApp *theApp=(KColorEditApp *) parentWidget(); + KColorEditApp *theApp=(KColorEditApp *) tqparentWidget(); return theApp->document(); } @@ -234,7 +234,7 @@ void KColorEditView::slotAddColor() { case REPLACE_COLOR: if(index < palette->length()) - document()->replace(index, color); + document()->tqreplace(index, color); else document()->insert(index, color); break; @@ -274,7 +274,7 @@ void KColorEditView::slotSetColorName(const TQString& name) { palette->color(cursorPos)->component(Color::BLUE_INDEX), name); doNotUpdateColorLabels = true; - document()->replace(cursorPos, newColor); + document()->tqreplace(cursorPos, newColor); doNotUpdateColorLabels = false; } } diff --git a/kcoloredit/kcoloreditview.h b/kcoloredit/kcoloreditview.h index 0bc2a569..1ede4427 100644 --- a/kcoloredit/kcoloreditview.h +++ b/kcoloredit/kcoloreditview.h @@ -22,7 +22,7 @@ #include <config.h> #endif -// include files for Qt +// include files for TQt #include <tqsplitter.h> #include <tqcheckbox.h> #include <tqlabel.h> @@ -43,14 +43,15 @@ class KColorEditDoc; */ class KColorEditView : public TQSplitter { Q_OBJECT + TQ_OBJECT public: /** Constructor for the main view */ - KColorEditView(TQWidget *parent = 0, const char *name = 0); + KColorEditView(TQWidget *tqparent = 0, const char *name = 0); /** Destructor for the main view */ ~KColorEditView(); - /** returns a pointer to the document connected to the view instance. Mind that this method requires a KColorEditApp instance as a parent + /** returns a pointer to the document connected to the view instance. Mind that this method requires a KColorEditApp instance as a tqparent * widget to get to the window document pointer by calling the KColorEditApp::getDocument() method. * * @see KColorEditApp#getDocument diff --git a/kcoloredit/kxycolorselector.cpp b/kcoloredit/kxycolorselector.cpp index 4a717c5e..bcd58f00 100644 --- a/kcoloredit/kxycolorselector.cpp +++ b/kcoloredit/kxycolorselector.cpp @@ -23,7 +23,7 @@ #include "kxycolorselector.h" -KXYColorSelector::KXYColorSelector(TQWidget *parent, const char *name) : KXYSelector(parent,name) { +KXYColorSelector::KXYColorSelector(TQWidget *tqparent, const char *name) : KXYSelector(tqparent,name) { setBackgroundMode(NoBackground); setRange(0, 0, COMPONENT_SELECTION_RESOLUTION - 1, COMPONENT_SELECTION_RESOLUTION - 1); setType(TYPE_NONE); @@ -42,7 +42,7 @@ void KXYColorSelector::setType(const int type) { void KXYColorSelector::updateContents() { drawPalette(&pixmap); - repaint(); + tqrepaint(); } void KXYColorSelector::resizeEvent(TQResizeEvent*) { @@ -70,9 +70,9 @@ void KXYColorSelector::drawCursor(TQPainter* painter, int x, int y) { TQColor cursorColor; if(( 2*color.red() + 4*color.green() + 1*color.blue() )*1.0/ ( 2*255 + 4*255 + 1*255 ) > 0.65) - cursorColor = Qt::black; + cursorColor = TQt::black; else - cursorColor = Qt::white; + cursorColor = TQt::white; painter->setPen(TQPen( cursorColor )); const int lineBegin = 2; const int lineEnd = 6; @@ -132,25 +132,25 @@ void KXYColorSelector::setColor(TQColor* const color, const int x, const int y) } TQColor* KXYColorSelector::standardColorsPalette() { - TQColor* palette = new QColor[STANDARD_PALETTE_SIZE]; + TQColor* palette = new TQColor[STANDARD_PALETTE_SIZE]; int i = 0; - palette[i++] = Qt::red; - palette[i++] = Qt::green; - palette[i++] = Qt::blue; - palette[i++] = Qt::cyan; - palette[i++] = Qt::magenta; - palette[i++] = Qt::yellow; - palette[i++] = Qt::darkRed; - palette[i++] = Qt::darkGreen; - palette[i++] = Qt::darkBlue; - palette[i++] = Qt::darkCyan; - palette[i++] = Qt::darkMagenta; - palette[i++] = Qt::darkYellow; - palette[i++] = Qt::white; - palette[i++] = Qt::lightGray; - palette[i++] = Qt::gray; - palette[i++] = Qt::darkGray; - palette[i++] = Qt::black; + palette[i++] = TQt::red; + palette[i++] = TQt::green; + palette[i++] = TQt::blue; + palette[i++] = TQt::cyan; + palette[i++] = TQt::magenta; + palette[i++] = TQt::yellow; + palette[i++] = TQt::darkRed; + palette[i++] = TQt::darkGreen; + palette[i++] = TQt::darkBlue; + palette[i++] = TQt::darkCyan; + palette[i++] = TQt::darkMagenta; + palette[i++] = TQt::darkYellow; + palette[i++] = TQt::white; + palette[i++] = TQt::lightGray; + palette[i++] = TQt::gray; + palette[i++] = TQt::darkGray; + palette[i++] = TQt::black; return palette; } diff --git a/kcoloredit/kxycolorselector.h b/kcoloredit/kxycolorselector.h index 6225d74f..263a39f3 100644 --- a/kcoloredit/kxycolorselector.h +++ b/kcoloredit/kxycolorselector.h @@ -28,6 +28,7 @@ */ class KXYColorSelector : public KXYSelector { Q_OBJECT + TQ_OBJECT public: /** The types of the selector. They specify a color component subset */ @@ -46,7 +47,7 @@ public: /** Constructs a two-dimensional color component selector widget, * with a type TYPE_NONE and ranges 0 .. MAX_COLOR_COMPONENT_VALUE */ - KXYColorSelector(TQWidget *parent=0, const char *name=0); + KXYColorSelector(TQWidget *tqparent=0, const char *name=0); ~KXYColorSelector(); /** Set the type of the selector */ void setType(const int type); diff --git a/kcoloredit/kzcolorselector.cpp b/kcoloredit/kzcolorselector.cpp index b00991a2..b0f7914a 100644 --- a/kcoloredit/kzcolorselector.cpp +++ b/kcoloredit/kzcolorselector.cpp @@ -23,8 +23,8 @@ #include "main.h" #include "kzcolorselector.h" -KZColorSelector::KZColorSelector(Orientation o, TQWidget *parent, const char *name) : - KSelector(o, parent, name) { +KZColorSelector::KZColorSelector(Qt::Orientation o, TQWidget *tqparent, const char *name) : + KSelector(o, tqparent, name) { baseColorH = -1; baseColorS = 0; baseColorV = 0; @@ -53,7 +53,7 @@ void KZColorSelector::setType(const int type) { void KZColorSelector::updateContents() { drawPalette(&pixmap); - repaint(false); + tqrepaint(false); } void KZColorSelector::resizeEvent(TQResizeEvent*) { @@ -119,25 +119,25 @@ void KZColorSelector::setColor(TQColor* const color, const int y) { } TQColor* KZColorSelector::getStandardColorsPalette() { - TQColor* palette = new QColor[( int )STANDARD_PALETTE_SIZE]; + TQColor* palette = new TQColor[( int )STANDARD_PALETTE_SIZE]; int i = 0; - palette[i++] = Qt::red; - palette[i++] = Qt::green; - palette[i++] = Qt::blue; - palette[i++] = Qt::cyan; - palette[i++] = Qt::magenta; - palette[i++] = Qt::yellow; - palette[i++] = Qt::darkRed; - palette[i++] = Qt::darkGreen; - palette[i++] = Qt::darkBlue; - palette[i++] = Qt::darkCyan; - palette[i++] = Qt::darkMagenta; - palette[i++] = Qt::darkYellow; - palette[i++] = Qt::white; - palette[i++] = Qt::lightGray; - palette[i++] = Qt::gray; - palette[i++] = Qt::darkGray; - palette[i++] = Qt::black; + palette[i++] = TQt::red; + palette[i++] = TQt::green; + palette[i++] = TQt::blue; + palette[i++] = TQt::cyan; + palette[i++] = TQt::magenta; + palette[i++] = TQt::yellow; + palette[i++] = TQt::darkRed; + palette[i++] = TQt::darkGreen; + palette[i++] = TQt::darkBlue; + palette[i++] = TQt::darkCyan; + palette[i++] = TQt::darkMagenta; + palette[i++] = TQt::darkYellow; + palette[i++] = TQt::white; + palette[i++] = TQt::lightGray; + palette[i++] = TQt::gray; + palette[i++] = TQt::darkGray; + palette[i++] = TQt::black; return palette; } diff --git a/kcoloredit/kzcolorselector.h b/kcoloredit/kzcolorselector.h index 60e32f0a..f226d744 100644 --- a/kcoloredit/kzcolorselector.h +++ b/kcoloredit/kzcolorselector.h @@ -29,6 +29,7 @@ */ class KZColorSelector : public KSelector { Q_OBJECT + TQ_OBJECT public: /** Selector type constants */ @@ -37,7 +38,7 @@ public: TYPE_V = 2 }; /** Constructs the widget */ - KZColorSelector(Orientation o, TQWidget *parent=0, const char *name=0); + KZColorSelector(Qt::Orientation o, TQWidget *tqparent=0, const char *name=0); ~KZColorSelector(); /** Sets the selector type */ void setType(const int type); diff --git a/kcoloredit/loadpalettedlg.cpp b/kcoloredit/loadpalettedlg.cpp index 23def4d5..a5e298ce 100644 --- a/kcoloredit/loadpalettedlg.cpp +++ b/kcoloredit/loadpalettedlg.cpp @@ -31,8 +31,8 @@ #include "palette.h" #include "loadpalettedlg.h" -LoadPaletteDlg::LoadPaletteDlg(TQWidget *parent, const char *name) - : KDialogBase(parent, name, true, i18n( "Load Palette" ), +LoadPaletteDlg::LoadPaletteDlg(TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, true, i18n( "Load Palette" ), Ok|Cancel, Ok, true) { fileName = ""; TQWidget *mainWidget = new TQWidget( this ); @@ -45,7 +45,7 @@ LoadPaletteDlg::LoadPaletteDlg(TQWidget *parent, const char *name) TQStringList palettesList = Palette::kdePalettes(); for(TQStringList::Iterator palette = palettesList.begin(); palette != palettesList.end(); ++palette) { - bool prepend = (*palette).contains( "colors/Custom_Colors" ); + bool prepend = (*palette).tqcontains( "colors/Custom_Colors" ); TQString fileName = locate("config", (*palette)); if(prepend) { palettesFileNames.prepend(fileName); diff --git a/kcoloredit/loadpalettedlg.h b/kcoloredit/loadpalettedlg.h index f7dd50cb..7e71e2f5 100644 --- a/kcoloredit/loadpalettedlg.h +++ b/kcoloredit/loadpalettedlg.h @@ -27,11 +27,12 @@ */ class LoadPaletteDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** constructs the dialog */ - LoadPaletteDlg(TQWidget *parent = 0, const char *name = 0); + LoadPaletteDlg(TQWidget *tqparent = 0, const char *name = 0); ~LoadPaletteDlg(); /** @return the fetched file name */ diff --git a/kcoloredit/palette.cpp b/kcoloredit/palette.cpp index 42758b41..6f830278 100644 --- a/kcoloredit/palette.cpp +++ b/kcoloredit/palette.cpp @@ -108,14 +108,14 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { int lineNum = 0; while (!stream.atEnd()) { TQString string = stream.readLine().append(' '); - if(string.find( TQRegExp("[^\\s]") ) == -1 || + if(string.tqfind( TQRegExp("[^\\s]") ) == -1 || string.stripWhiteSpace().at( 0 ) == '#' || ( loadName && lineNum == 0 )) { if(loadName && lineNum == 0) setName(string.stripWhiteSpace()); } else { Color* newColor = new Color(); - int position = string.find(TQRegExp( "[^\\s]" )); + int position = string.tqfind(TQRegExp( "[^\\s]" )); for(int componentIndex = 0; componentIndex < Color::COMPONENTS_NUM; ++componentIndex) { if(position == -1) { @@ -123,7 +123,7 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { result = false; break; } - int endPosition = string.find(TQRegExp( "\\s" ), position); + int endPosition = string.tqfind(TQRegExp( "\\s" ), position); if(endPosition == -1) { m_errorString = i18n("Invalid format"); result = false; @@ -139,7 +139,7 @@ bool Palette::load(TQTextStream& stream, bool loadName /* = true */) { break; } newColor->setComponent(componentIndex, componentValue); - position = string.find(TQRegExp( "[^\\s]" ), endPosition); + position = string.tqfind(TQRegExp( "[^\\s]" ), endPosition); } if(!result) { delete newColor; diff --git a/kcoloredit/paletteview.cpp b/kcoloredit/paletteview.cpp index 6648d88b..d62ec43f 100644 --- a/kcoloredit/paletteview.cpp +++ b/kcoloredit/paletteview.cpp @@ -21,8 +21,8 @@ #include "paletteview.h" PaletteView::PaletteView(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing, - KColorEditView* view, TQWidget *parent, const char *name) : - TQFrame(parent, name, TQWidget::WResizeNoErase*0) { + KColorEditView* view, TQWidget *tqparent, const char *name) : + TQFrame(tqparent, name, TQWidget::WResizeNoErase*0) { setFrameStyle(StyledPanel|Sunken); setLineWidth(2); TQGridLayout* topLayout = new TQGridLayout(this, 2, 2); @@ -32,7 +32,7 @@ PaletteView::PaletteView(const int defaultCellWidth, const int defaultCellHeight topLayout->setColStretch(0, 10); topLayout->setColStretch(1, 0); scrollBar = new TQScrollBar(this); - hScrollBar = new TQScrollBar(0, 1, 1, 1, 0, TQScrollBar::Horizontal, this); + hScrollBar = new TQScrollBar(0, 1, 1, 1, 0, Qt::Horizontal, this); scrolledArea = new PaletteViewScrolledArea(defaultCellWidth, defaultCellHeight, cellSpacing, scrollBar, hScrollBar, view, this); connect(scrollBar, TQT_SIGNAL( valueChanged(int) ), diff --git a/kcoloredit/paletteview.h b/kcoloredit/paletteview.h index 9501de40..cc1e56b8 100644 --- a/kcoloredit/paletteview.h +++ b/kcoloredit/paletteview.h @@ -26,18 +26,19 @@ class KColorEditView; /** This is a Palette class view widget. - * Its parent is KColorEditView + * Its tqparent is KColorEditView * @author Artur Rataj */ class PaletteView : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** Constructs a palette view widget, with a default cells sizes and spacing. * The effective cell sizes may be adjusted to fit the widget sizes. */ PaletteView(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing, - KColorEditView* view, TQWidget *parent = 0, const char *name=0); + KColorEditView* view, TQWidget *tqparent = 0, const char *name=0); ~PaletteView(); /** Calls redraw() in scrolledArea */ void redraw(); diff --git a/kcoloredit/paletteviewscrolledarea.cpp b/kcoloredit/paletteviewscrolledarea.cpp index 0b4f0ec4..e6d26a20 100644 --- a/kcoloredit/paletteviewscrolledarea.cpp +++ b/kcoloredit/paletteviewscrolledarea.cpp @@ -38,8 +38,8 @@ PaletteViewScrolledArea::PaletteViewScrolledArea(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing, TQScrollBar* scrollBar, - TQScrollBar* hScrollBar, KColorEditView* view, TQWidget* parent, const char* name) - : TQFrame(parent, name) { + TQScrollBar* hScrollBar, KColorEditView* view, TQWidget* tqparent, const char* name) + : TQFrame(tqparent, name) { this->defaultCellWidth = defaultCellWidth; this->defaultCellHeight = defaultCellHeight; this->cellSpacing = cellSpacing; @@ -73,11 +73,11 @@ void PaletteViewScrolledArea::slotViewColorNames(bool viewColorNames) { void PaletteViewScrolledArea::redraw() { //setCellsSizes(); - repaintPalette(); + tqrepaintPalette(); } -void PaletteViewScrolledArea::repaintPalette() { - repaint(false); +void PaletteViewScrolledArea::tqrepaintPalette() { + tqrepaint(false); } void PaletteViewScrolledArea::checkSelectionAutoScroll(const int mousePosY) { @@ -106,7 +106,7 @@ void PaletteViewScrolledArea::slotScrollTimeout() { else setSelection(selectionEnd, selectionBegin); checkSelectionAutoScroll(cursorPoint.y()); - repaintPalette(); + tqrepaintPalette(); } } @@ -220,7 +220,7 @@ void PaletteViewScrolledArea::paintEvent(TQPaintEvent* /*event*/) { setCellsSizes(); TQPixmap pixmap(size()); TQPainter painter; - painter.begin(&pixmap, this); + painter.tqbegin(TQT_TQPAINTDEVICE(&pixmap), this); TQFontMetrics fontMetrics = painter.fontMetrics(); int maxLineWidth; if(viewColorNames) { @@ -249,12 +249,12 @@ void PaletteViewScrolledArea::paintEvent(TQPaintEvent* /*event*/) { int lastRow = (posY + height() - 1 + rowHeight - 1)/rowHeight; if(viewColorNames) painter.fillRect(0, 0, rowWidth, height(), - TQBrush( TQFrame::palette().active().base() )); - TQBrush normalBackgroundBrush(TQFrame::palette().active().background()); - TQBrush selectedBackgroundBrush(TQFrame::palette().active().highlight()); + TQBrush( TQFrame::tqpalette().active().base() )); + TQBrush normalBackgroundBrush(TQFrame::tqpalette().active().background()); + TQBrush selectedBackgroundBrush(TQFrame::tqpalette().active().highlight()); TQBrush foregroundBrush; - TQBrush cursorBrush(TQFrame::palette().active().foreground()); - TQPen backgroundPen(TQFrame::palette().active().foreground()); + TQBrush cursorBrush(TQFrame::tqpalette().active().foreground()); + TQPen backgroundPen(TQFrame::tqpalette().active().foreground()); int min = selectionMin(); int max = selectionMax(); int fontAscent = fontMetrics.ascent(); diff --git a/kcoloredit/paletteviewscrolledarea.h b/kcoloredit/paletteviewscrolledarea.h index db39e454..8e69a354 100644 --- a/kcoloredit/paletteviewscrolledarea.h +++ b/kcoloredit/paletteviewscrolledarea.h @@ -33,15 +33,16 @@ class TQScrollBar; */ class PaletteViewScrolledArea : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** Constructs the widget */ PaletteViewScrolledArea(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing, TQScrollBar* scrollBar, TQScrollBar* hScrollBar, KColorEditView* view, - TQWidget* parent = 0, const char* name = 0); + TQWidget* tqparent = 0, const char* name = 0); ~PaletteViewScrolledArea(); - /** Sets cells sizes and then calls repaintPalette() */ + /** Sets cells sizes and then calls tqrepaintPalette() */ void redraw(); public slots: @@ -105,8 +106,8 @@ protected: * visible area width */ void setCellsSizes(); - /** repaints the palette */ - void repaintPalette(); + /** tqrepaints the palette */ + void tqrepaintPalette(); /** @return A color index at a given position, -1 if none */ int colorIndex(const TQPoint& point) const; /** @return A color at a given position */ diff --git a/kcoloredit/texteditselection.cpp b/kcoloredit/texteditselection.cpp index 4b1d6a56..bf00ab3d 100644 --- a/kcoloredit/texteditselection.cpp +++ b/kcoloredit/texteditselection.cpp @@ -24,7 +24,7 @@ #include "main.h" #include "texteditselection.h" -TextEditSelection::TextEditSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) { +TextEditSelection::TextEditSelection(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) { inChangingComponents = false; TQVBoxLayout* topLayout = new TQVBoxLayout(this, 4); TQGridLayout* componentsLayout = new TQGridLayout(3, 5, 2); @@ -59,14 +59,14 @@ TextEditSelection::~TextEditSelection(){ } void TextEditSelection::addComponent(const int index, TQLineEdit* lineEdit, const int maxValue, - const TQString& labelString, const int row, const int column, TQGridLayout* layout) { + const TQString& labelString, const int row, const int column, TQGridLayout* tqlayout) { TQLabel* label = new TQLabel(labelString, this); - lineEdit->setValidator(new TQIntValidator( 0, maxValue, lineEdit )); + lineEdit->setValidator(new TQIntValidator( 0, maxValue, TQT_TQOBJECT(lineEdit) )); lineEditTable[index] = lineEdit; lineEdit->setMinimumWidth(lineEdit->fontMetrics().width( TQString("8888") )); lineEdit->setMaximumWidth(lineEdit->fontMetrics().width( TQString("8888888") )); - layout->addWidget(label, row, column*3); - layout->addWidget(lineEdit, row, column*3 + 1); + tqlayout->addWidget(label, row, column*3); + tqlayout->addWidget(lineEdit, row, column*3 + 1); } void TextEditSelection::setRgbString(const int red, const int green, const int blue) { diff --git a/kcoloredit/texteditselection.h b/kcoloredit/texteditselection.h index e140a5dc..67a299a1 100644 --- a/kcoloredit/texteditselection.h +++ b/kcoloredit/texteditselection.h @@ -30,10 +30,11 @@ */ class TextEditSelection : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** Constructs the widget */ - TextEditSelection(TQWidget *parent=0, const char *name=0); + TextEditSelection(TQWidget *tqparent=0, const char *name=0); ~TextEditSelection(); signals: @@ -47,7 +48,7 @@ public slots: protected: /** Adds a component line edit */ void addComponent(const int index, TQLineEdit* lineEdit, const int maxValue, const TQString& labelString, - const int row, const int column, TQGridLayout* layout); + const int row, const int column, TQGridLayout* tqlayout); /** sets RGB string in rgbStringLineEdit */ void setRgbString(const int red, const int green, const int blue); diff --git a/kcoloredit/textselection.cpp b/kcoloredit/textselection.cpp index f916d48f..ae15650d 100644 --- a/kcoloredit/textselection.cpp +++ b/kcoloredit/textselection.cpp @@ -17,7 +17,7 @@ #include "textselection.h" -TextSelection::TextSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) { +TextSelection::TextSelection(TQWidget *tqparent, const char *name ) : TQWidget(tqparent,name) { } TextSelection::~TextSelection(){ diff --git a/kdvi/TeXFont.h b/kdvi/TeXFont.h index d3ee51af..518c0d0f 100644 --- a/kdvi/TeXFont.h +++ b/kdvi/TeXFont.h @@ -17,8 +17,8 @@ class TeXFont { public: TeXFont(TeXFontDefinition *_parent) { - parent = _parent; - errorMessage = TQString::null; + tqparent = _parent; + errorMessage = TQString(); }; virtual ~TeXFont(); @@ -29,12 +29,12 @@ class TeXFont { glyphtable[i].shrunkenCharacter.resize(0, 0); }; - virtual glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black) = 0; + virtual glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black) = 0; // Checksum of the font. Used e.g. by PK fonts. This field is filled // in by the constructor, or set to 0.0, if the font format does not // contain checksums. - Q_UINT32 checksum; + TQ_UINT32 checksum; // If the font or if some glyphs could not be loaded, error messages // will be put here. @@ -42,7 +42,7 @@ class TeXFont { protected: glyph glyphtable[TeXFontDefinition::max_num_of_chars_in_font]; - TeXFontDefinition *parent; + TeXFontDefinition *tqparent; }; #endif diff --git a/kdvi/TeXFontDefinition.cpp b/kdvi/TeXFontDefinition.cpp index 03dd1b72..c89aa59d 100644 --- a/kdvi/TeXFontDefinition.cpp +++ b/kdvi/TeXFontDefinition.cpp @@ -31,7 +31,7 @@ extern const int MFResolutions[]; // #define DEBUG_FONT -TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units, +TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, TQ_UINT32 chk, TQ_INT32 _scaled_size_in_DVI_units, class fontPool *pool, double _enlargement) { #ifdef DEBUG_FONT @@ -46,7 +46,7 @@ TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResoluti checksum = chk; flags = TeXFontDefinition::FONT_IN_USE; file = 0; - filename = TQString::null; + filename = TQString(); scaled_size_in_DVI_units = _scaled_size_in_DVI_units; macrotable = 0; @@ -93,8 +93,8 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname) flags |= TeXFontDefinition::FONT_LOADED; filename = fname; #ifdef HAVE_FREETYPE - fullFontName = TQString::null; - fullEncodingName = TQString::null; + fullFontName = TQString(); + fullEncodingName = TQString(); #endif file = fopen(TQFile::encodeName(filename), "r"); @@ -105,7 +105,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname) TQString filename_test(font_pool->getExtraSearchPath() + "/" + filename); file = fopen( TQFile::encodeName(filename_test), "r"); if (file == 0) { - kdError(4300) << i18n("Cannot find font %1, file %2.").arg(fontname).arg(filename) << endl; + kdError(4300) << i18n("Cannot find font %1, file %2.").tqarg(fontname).tqarg(filename) << endl; return; } else filename = filename_test; @@ -121,7 +121,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname) font = new TeXFont_PK(this); set_char_p = &dviRenderer::set_char; if ((checksum != 0) && (checksum != font->checksum)) - kdWarning(4300) << i18n("Checksum mismatch for font file %1").arg(filename) << endl; + kdWarning(4300) << i18n("Checksum mismatch for font file %1").tqarg(filename) << endl; fontTypeName = "TeX PK"; return; } @@ -169,7 +169,7 @@ void TeXFontDefinition::fontNameReceiver(const TQString& fname) #else // If we don't have the FreeType library, we should never have // reached this point. Complain, and leave this font blank - kdError(4300) << i18n("Cannot recognize format for font file %1").arg(filename) << endl; + kdError(4300) << i18n("Cannot recognize format for font file %1").tqarg(filename) << endl; #endif } @@ -195,7 +195,7 @@ void TeXFontDefinition::reset() vf_table.clear(); } - filename = TQString::null; + filename = TQString(); flags = TeXFontDefinition::FONT_IN_USE; set_char_p = &dviRenderer::set_empty_char; } diff --git a/kdvi/TeXFontDefinition.h b/kdvi/TeXFontDefinition.h index d64e6d59..9097b2cb 100644 --- a/kdvi/TeXFontDefinition.h +++ b/kdvi/TeXFontDefinition.h @@ -1,6 +1,6 @@ // -*- C++ -*- /* - * The layout of a font information block. + * The tqlayout of a font information block. * There is one of these for every loaded font or magnification thereof. * Duplicates are eliminated: this is necessary because of possible recursion * in virtual fonts. @@ -35,7 +35,7 @@ class macro { unsigned char *pos; /* address of first byte of macro */ unsigned char *end; /* address of last+1 byte */ - Q_INT32 dvi_advance_in_units_of_design_size_by_2e20; /* DVI units to move reference point */ + TQ_INT32 dvi_advance_in_units_of_design_size_by_2e20; /* DVI units to move reference point */ bool free_me; // if memory at pos should be returned on destruction }; @@ -56,7 +56,7 @@ class TeXFontDefinition { }; - TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units, + TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, TQ_UINT32 chk, TQ_INT32 _scaled_size_in_DVI_units, class fontPool *pool, double _enlargement); ~TeXFontDefinition(); @@ -74,7 +74,7 @@ class TeXFontDefinition { TQString fontname; // name of font, such as "cmr10" unsigned char flags; // flags byte (see values below) double enlargement; - Q_INT32 scaled_size_in_DVI_units; // Scaled size from the font definition command; in DVI units + TQ_INT32 scaled_size_in_DVI_units; // Scaled size from the font definition command; in DVI units set_char_proc set_char_p; // proc used to set char // Resolution of the display device (resolution will usually be @@ -100,20 +100,20 @@ class TeXFontDefinition { /** For FREETYPE fonts, which use a map file, this field will contain the full name of the font (e.g. 'Computer Modern'). If the name does not exist, or cannot be found, this field will be - TQString::null. Only subclasses of TeXFont should write into this + TQString(). Only subclasses of TeXFont should write into this field. */ TQString fullFontName; /** For FREETYPE fonts, which use a map file, this field will contain the full name of the font encoding (e.g. 'TexBase1'). If the encoding name does not exist, or cannot be found, this field - will be TQString::null. Only subclasses of TeXFont should write + will be TQString(). Only subclasses of TeXFont should write into this field. */ TQString fullEncodingName; #endif private: - Q_UINT32 checksum; + TQ_UINT32 checksum; /** This will be set to a human-readable description of the font, e.g. "virtual" or "TeX PK", or "Type 1" */ diff --git a/kdvi/TeXFont_PFB.cpp b/kdvi/TeXFont_PFB.cpp index 2b3883fe..a017259d 100644 --- a/kdvi/TeXFont_PFB.cpp +++ b/kdvi/TeXFont_PFB.cpp @@ -26,28 +26,28 @@ //#define DEBUG_PFB 1 -TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double slant) - : TeXFont(parent) +TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *tqparent, fontEncoding *enc, double slant) + : TeXFont(tqparent) { #ifdef DEBUG_PFB if (enc != 0) - kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=" << enc->encodingFullName << " )" << endl; + kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( tqparent=" << tqparent << ", encoding=" << enc->encodingFullName << " )" << endl; else - kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=0 )" << endl; + kdDebug(4300) << "TeXFont_PFB::TeXFont_PFB( tqparent=" << tqparent << ", encoding=0 )" << endl; #endif fatalErrorInFontLoading = false; - int error = FT_New_Face( parent->font_pool->FreeType_library, parent->filename.local8Bit(), 0, &face ); + int error = FT_New_Face( tqparent->font_pool->FreeType_library, tqparent->filename.local8Bit(), 0, &face ); if ( error == FT_Err_Unknown_File_Format ) { - errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").arg(parent->filename); + errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.").tqarg(tqparent->filename); kdError(4300) << errorMessage << endl; fatalErrorInFontLoading = true; return; } else if ( error ) { - errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").arg(parent->filename); + errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.").tqarg(tqparent->filename); kdError(4300) << errorMessage << endl; fatalErrorInFontLoading = true; return; @@ -66,7 +66,7 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl } if (face->family_name != 0) - parent->fullFontName = face->family_name; + tqparent->fullFontName = face->family_name; // Finally, we need to set up the charMap array, which maps TeX // character codes to glyph indices in the font. (Remark: the @@ -74,8 +74,8 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl // TeX is only able to address character codes 0-255 while // e.g. Type1 fonts may contain several thousands of characters) if (enc != 0) { - parent->fullEncodingName = enc->encodingFullName.remove(TQString::fromLatin1( "Encoding" )); - parent->fullEncodingName = enc->encodingFullName.remove(TQString::fromLatin1( "encoding" )); + tqparent->fullEncodingName = enc->encodingFullName.remove(TQString::tqfromLatin1( "Encoding" )); + tqparent->fullEncodingName = enc->encodingFullName.remove(TQString::tqfromLatin1( "encoding" )); // An encoding vector is given for this font, i.e. an array of // character names (such as: 'parenleft' or 'dotlessj'). We use @@ -138,7 +138,7 @@ TeXFont_PFB::~TeXFont_PFB() } -glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQColor& color) +glyph *TeXFont_PFB::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const TQColor& color) { #ifdef DEBUG_PFB kdDebug(4300) << "TeXFont_PFB::getGlyph( ch=" << ch << ", '" << (char)(ch) << "', generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; @@ -159,16 +159,16 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ if ((generateCharacterPixmap == true) && ((g->shrunkenCharacter.isNull()) || (color != g->color)) ) { int error; - unsigned int res = (unsigned int)(parent->displayResolution_in_dpi/parent->enlargement +0.5); + unsigned int res = (unsigned int)(tqparent->displayResolution_in_dpi/tqparent->enlargement +0.5); g->color = color; // Character height in 1/64th of points (reminder: 1 pt = 1/72 inch) // Only approximate, may vary from file to file!!!! @@@@@ - long int characterSize_in_printers_points_by_64 = (long int)((64.0*72.0*parent->scaled_size_in_DVI_units*parent->font_pool->getCMperDVIunit())/2.54 + 0.5 ); + long int characterSize_in_printers_points_by_64 = (long int)((64.0*72.0*tqparent->scaled_size_in_DVI_units*tqparent->font_pool->getCMperDVIunit())/2.54 + 0.5 ); error = FT_Set_Char_Size(face, 0, characterSize_in_printers_points_by_64, res, res ); if (error) { - TQString msg = i18n("FreeType reported an error when setting the character size for font file %1.").arg(parent->filename); + TQString msg = i18n("FreeType reported an error when setting the character size for font file %1.").tqarg(tqparent->filename); if (errorMessage.isEmpty()) errorMessage = msg; kdError(4300) << msg << endl; @@ -178,13 +178,13 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ } // load glyph image into the slot and erase the previous one - if (parent->font_pool->getUseFontHints() == true) + if (tqparent->font_pool->getUseFontHints() == true) error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_DEFAULT ); else error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_HINTING ); if (error) { - TQString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").arg(ch).arg(parent->filename); + TQString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename); if (errorMessage.isEmpty()) errorMessage = msg; kdError(4300) << msg << endl; @@ -196,7 +196,7 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ // convert to an anti-aliased bitmap error = FT_Render_Glyph( face->glyph, ft_render_mode_normal ); if (error) { - TQString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").arg(ch).arg(parent->filename); + TQString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename); if (errorMessage.isEmpty()) errorMessage = msg; kdError(4300) << msg << endl; @@ -209,8 +209,8 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ if ((slot->bitmap.width == 0) || (slot->bitmap.rows == 0)) { if (errorMessage.isEmpty()) - errorMessage = i18n("Glyph #%1 is empty.").arg(ch); - kdError(4300) << i18n("Glyph #%1 from font file %2 is empty.").arg(ch).arg(parent->filename) << endl; + errorMessage = i18n("Glyph #%1 is empty.").tqarg(ch); + kdError(4300) << i18n("Glyph #%1 from font file %2 is empty.").tqarg(ch).tqarg(tqparent->filename) << endl; g->shrunkenCharacter.resize( 15, 15 ); g->shrunkenCharacter.fill(TQColor(255, 0, 0)); g->x2 = 0; @@ -219,9 +219,9 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ TQImage imgi(slot->bitmap.width, slot->bitmap.rows, 32); imgi.setAlphaBuffer(true); - // Do QPixmaps fully support the alpha channel? If yes, we use + // Do TQPixmaps fully support the alpha channel? If yes, we use // that. Otherwise, use other routines as a fallback - if (parent->font_pool->QPixmapSupportsAlpha) { + if (tqparent->font_pool->TQPixmapSupportsAlpha) { // If the alpha channel is properly supported, we set the // character glyph to a colored rectangle, and define the // character outline only using the alpha channel. That @@ -239,7 +239,7 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ } } else { // If the alpha channel is not supported... QT seems to turn - // the alpha channel into a crude bitmap which is used to mask + // the alpha channel into a crude bitmap which is used to tqmask // the resulting TQPixmap. In this case, we define the // character outline using the image data, and use the alpha // channel only to store "maximally opaque" or "completely @@ -248,18 +248,18 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ // quality is still sufficient for most purposes. One notable // exception is output from the gftodvi program, which will be // partially unreadable. - Q_UINT16 rInv = 0xFF - color.red(); - Q_UINT16 gInv = 0xFF - color.green(); - Q_UINT16 bInv = 0xFF - color.blue(); + TQ_UINT16 rInv = 0xFF - color.red(); + TQ_UINT16 gInv = 0xFF - color.green(); + TQ_UINT16 bInv = 0xFF - color.blue(); - for(Q_UINT16 y=0; y<slot->bitmap.rows; y++) { - Q_UINT8 *srcScanLine = slot->bitmap.buffer + y*slot->bitmap.pitch; + for(TQ_UINT16 y=0; y<slot->bitmap.rows; y++) { + TQ_UINT8 *srcScanLine = slot->bitmap.buffer + y*slot->bitmap.pitch; unsigned int *destScanLine = (unsigned int *)imgi.scanLine(y); - for(Q_UINT16 col=0; col<slot->bitmap.width; col++) { - Q_UINT16 data = *srcScanLine; + for(TQ_UINT16 col=0; col<slot->bitmap.width; col++) { + TQ_UINT16 data = *srcScanLine; // The value stored in "data" now has the following meaning: // data = 0 -> white; data = 0xff -> use "color" - *destScanLine = qRgba(0xFF - (rInv*data + 0x7F) / 0xFF, + *destScanLine = tqRgba(0xFF - (rInv*data + 0x7F) / 0xFF, 0xFF - (gInv*data + 0x7F) / 0xFF, 0xFF - (bInv*data + 0x7F) / 0xFF, (data > 0x03) ? 0xff : 0x00); @@ -279,13 +279,13 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQ if (g->dvi_advance_in_units_of_design_size_by_2e20 == 0) { int error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_SCALE); if (error) { - TQString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").arg(ch).arg(parent->filename); + TQString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.").tqarg(ch).tqarg(tqparent->filename); if (errorMessage.isEmpty()) errorMessage = msg; kdError(4300) << msg << endl; g->dvi_advance_in_units_of_design_size_by_2e20 = 1; } - g->dvi_advance_in_units_of_design_size_by_2e20 = (Q_INT32)(((Q_INT64)(1<<20) * (Q_INT64)face->glyph->metrics.horiAdvance) / (Q_INT64)face->units_per_EM); + g->dvi_advance_in_units_of_design_size_by_2e20 = (TQ_INT32)(((TQ_INT64)(1<<20) * (TQ_INT64)face->glyph->metrics.horiAdvance) / (TQ_INT64)face->units_per_EM); } return g; diff --git a/kdvi/TeXFont_PFB.h b/kdvi/TeXFont_PFB.h index 4e2d8122..45d94be4 100644 --- a/kdvi/TeXFont_PFB.h +++ b/kdvi/TeXFont_PFB.h @@ -23,15 +23,15 @@ class glyph; class TeXFont_PFB : public TeXFont { public: - TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc=0, double slant=0.0 ); + TeXFont_PFB(TeXFontDefinition *tqparent, fontEncoding *enc=0, double slant=0.0 ); ~TeXFont_PFB(); - glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black); + glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black); private: FT_Face face; bool fatalErrorInFontLoading; - Q_UINT16 charMap[256]; + TQ_UINT16 charMap[256]; // This matrix is used internally to describes the slant, if // nonzero. Otherwise, this is undefined. diff --git a/kdvi/TeXFont_PK.cpp b/kdvi/TeXFont_PK.cpp index 7e1ce60d..562c40f9 100644 --- a/kdvi/TeXFont_PK.cpp +++ b/kdvi/TeXFont_PK.cpp @@ -80,18 +80,18 @@ extern void oops(TQString message); -TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent) - : TeXFont(parent) +TeXFont_PK::TeXFont_PK(TeXFontDefinition *tqparent) + : TeXFont(tqparent) { #ifdef DEBUG_PK - kdDebug(4300) << "TeXFont_PK::TeXFont_PK( parent=" << parent << ")" << endl; + kdDebug(4300) << "TeXFont_PK::TeXFont_PK( tqparent=" << tqparent << ")" << endl; #endif for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++) characterBitmaps[i] = 0; - file = fopen(TQFile::encodeName(parent->filename), "r"); + file = fopen(TQFile::encodeName(tqparent->filename), "r"); if (file == 0) - kdError(4300) << i18n("Cannot open font file %1.").arg(parent->filename) << endl; + kdError(4300) << i18n("Cannot open font file %1.").tqarg(tqparent->filename) << endl; #ifdef DEBUG_PK else kdDebug(4300) << "TeXFont_PK::TeXFont_PK(): file opened successfully" << endl; @@ -116,7 +116,7 @@ TeXFont_PK::~TeXFont_PK() } -glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQColor& color) +glyph* TeXFont_PK::getGlyph(TQ_UINT16 ch, bool generateCharacterPixmap, const TQColor& color) { #ifdef DEBUG_PK kdDebug(4300) << "TeXFont_PK::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; @@ -136,7 +136,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC // If the character is not defined in the PK file, mark the // character as missing, and print an error message if (g->addr == 0) { - kdError(4300) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").arg(ch).arg(parent->filename) << endl; + kdError(4300) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2").tqarg(ch).tqarg(tqparent->filename) << endl; g->addr = -1; return g; } @@ -163,7 +163,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC ((g->shrunkenCharacter.isNull()) || (color != g->color)) && (characterBitmaps[ch]->w != 0)) { g->color = color; - double shrinkFactor = 1200 / parent->displayResolution_in_dpi; + double shrinkFactor = 1200 / tqparent->displayResolution_in_dpi; // All is fine? Then we rescale the bitmap in order to produce the // required pixmap. Rescaling a character, however, is an art @@ -209,10 +209,10 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC // Turn the image into 8 bit TQByteArray translated(characterBitmaps[ch]->w * characterBitmaps[ch]->h); - Q_UINT8 *data = (Q_UINT8 *)translated.data(); + TQ_UINT8 *data = (TQ_UINT8 *)translated.data(); for(int x=0; x<characterBitmaps[ch]->w; x++) for(int y=0; y<characterBitmaps[ch]->h; y++) { - Q_UINT8 bit = *(characterBitmaps[ch]->bits + characterBitmaps[ch]->bytes_wide*y + (x >> 3)); + TQ_UINT8 bit = *(characterBitmaps[ch]->bits + characterBitmaps[ch]->bytes_wide*y + (x >> 3)); bit = bit >> (x & 7); bit = bit & 1; data[characterBitmaps[ch]->w*y + x] = bit; @@ -220,7 +220,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC // Now shrink the image. We shrink the X-direction first TQByteArray xshrunk(shrunk_width*characterBitmaps[ch]->h); - Q_UINT8 *xdata = (Q_UINT8 *)xshrunk.data(); + TQ_UINT8 *xdata = (TQ_UINT8 *)xshrunk.data(); // Do the shrinking. The pixel (x,y) that we want to calculate // corresponds to the line segment from @@ -231,7 +231,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC for(int y=0; y<characterBitmaps[ch]->h; y++) for(int x=0; x<shrunk_width; x++) { - Q_UINT32 value = 0; + TQ_UINT32 value = 0; double destStartX = shrinkFactor*x+srcXTrans; double destEndX = shrinkFactor*(x+1)+srcXTrans; for(int srcX=(int)ceil(destStartX); srcX<floor(destEndX); srcX++) @@ -239,19 +239,19 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC value += data[characterBitmaps[ch]->w*y + srcX] * 255; if (destStartX >= 0.0) - value += (Q_UINT32) (255.0*(ceil(destStartX)-destStartX) * data[characterBitmaps[ch]->w*y + (int)floor(destStartX)]); + value += (TQ_UINT32) (255.0*(ceil(destStartX)-destStartX) * data[characterBitmaps[ch]->w*y + (int)floor(destStartX)]); if (floor(destEndX) < characterBitmaps[ch]->w) - value += (Q_UINT32) (255.0*(destEndX-floor(destEndX)) * data[characterBitmaps[ch]->w*y + (int)floor(destEndX)]); + value += (TQ_UINT32) (255.0*(destEndX-floor(destEndX)) * data[characterBitmaps[ch]->w*y + (int)floor(destEndX)]); xdata[shrunk_width*y + x] = (int)(value/shrinkFactor + 0.5); } // Now shrink the Y-direction TQByteArray xyshrunk(shrunk_width*shrunk_height); - Q_UINT8 *xydata = (Q_UINT8 *)xyshrunk.data(); + TQ_UINT8 *xydata = (TQ_UINT8 *)xyshrunk.data(); for(int x=0; x<shrunk_width; x++) for(int y=0; y<shrunk_height; y++) { - Q_UINT32 value = 0; + TQ_UINT32 value = 0; double destStartY = shrinkFactor*y+srcYTrans; double destEndY = shrinkFactor*(y+1)+srcYTrans; for(int srcY=(int)ceil(destStartY); srcY<floor(destEndY); srcY++) @@ -259,31 +259,31 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC value += xdata[shrunk_width*srcY + x]; if (destStartY >= 0.0) - value += (Q_UINT32) ((ceil(destStartY)-destStartY) * xdata[shrunk_width*(int)floor(destStartY) + x]); + value += (TQ_UINT32) ((ceil(destStartY)-destStartY) * xdata[shrunk_width*(int)floor(destStartY) + x]); if (floor(destEndY) < characterBitmaps[ch]->h) - value += (Q_UINT32) ((destEndY-floor(destEndY)) * xdata[shrunk_width*(int)floor(destEndY) + x]); + value += (TQ_UINT32) ((destEndY-floor(destEndY)) * xdata[shrunk_width*(int)floor(destEndY) + x]); xydata[shrunk_width*y + x] = (int)(value/shrinkFactor); } TQImage im32(shrunk_width, shrunk_height, 32); im32.setAlphaBuffer(true); - // Do QPixmaps fully support the alpha channel? If yes, we use + // Do TQPixmaps fully support the alpha channel? If yes, we use // that. Otherwise, use other routines as a fallback - if (parent->font_pool->QPixmapSupportsAlpha) { + if (tqparent->font_pool->TQPixmapSupportsAlpha) { // If the alpha channel is properly supported, we set the // character glyph to a colored rectangle, and define the // character outline only using the alpha channel. That ensures // good quality rendering for overlapping characters. - im32.fill(qRgb(color.red(), color.green(), color.blue())); - for(Q_UINT16 y=0; y<shrunk_height; y++) { - Q_UINT8 *destScanLine = (Q_UINT8 *)im32.scanLine(y); - for(Q_UINT16 col=0; col<shrunk_width; col++) + im32.fill(tqRgb(color.red(), color.green(), color.blue())); + for(TQ_UINT16 y=0; y<shrunk_height; y++) { + TQ_UINT8 *destScanLine = (TQ_UINT8 *)im32.scanLine(y); + for(TQ_UINT16 col=0; col<shrunk_width; col++) destScanLine[4*col+3] = xydata[shrunk_width*y + col]; } } else { // If the alpha channel is not supported... QT seems to turn the - // alpha channel into a crude bitmap which is used to mask the + // alpha channel into a crude bitmap which is used to tqmask the // resulting TQPixmap. In this case, we define the character // outline using the image data, and use the alpha channel only // to store "maximally opaque" or "completely transparent" @@ -291,18 +291,18 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC // are no longer correctly drawn, but quality is still // sufficient for most purposes. One notable exception is output // from the gftodvi program, which will be partially unreadable. - Q_UINT16 rInv = 0xFF - color.red(); - Q_UINT16 gInv = 0xFF - color.green(); - Q_UINT16 bInv = 0xFF - color.blue(); + TQ_UINT16 rInv = 0xFF - color.red(); + TQ_UINT16 gInv = 0xFF - color.green(); + TQ_UINT16 bInv = 0xFF - color.blue(); - Q_UINT8 *srcScanLine = xydata; - for(Q_UINT16 y=0; y<shrunk_height; y++) { + TQ_UINT8 *srcScanLine = xydata; + for(TQ_UINT16 y=0; y<shrunk_height; y++) { unsigned int *destScanLine = (unsigned int *)im32.scanLine(y); - for(Q_UINT16 col=0; col<shrunk_width; col++) { - Q_UINT16 data = *srcScanLine; + for(TQ_UINT16 col=0; col<shrunk_width; col++) { + TQ_UINT16 data = *srcScanLine; // The value stored in "data" now has the following meaning: // data = 0 -> white; data = 0xff -> use "color" - *destScanLine = qRgba(0xFF - (rInv*data + 0x7F) / 0xFF, + *destScanLine = tqRgba(0xFF - (rInv*data + 0x7F) / 0xFF, 0xFF - (gInv*data + 0x7F) / 0xFF, 0xFF - (bInv*data + 0x7F) / 0xFF, (data > 0x03) ? 0xff : 0x00); @@ -320,8 +320,8 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQC -#define ADD(a, b) ((Q_UINT32 *) (((char *) a) + b)) -#define SUB(a, b) ((Q_UINT32 *) (((char *) a) - b)) +#define ADD(a, b) ((TQ_UINT32 *) (((char *) a) + b)) +#define SUB(a, b) ((TQ_UINT32 *) (((char *) a) - b)) @@ -347,7 +347,7 @@ static const uchar bitflip[256] = { 15, 143, 79, 207, 47, 175, 111, 239, 31, 159, 95, 223, 63, 191, 127, 255 }; -static Q_UINT32 bit_masks[33] = { +static TQ_UINT32 bit_tqmasks[33] = { 0x0, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff, 0x7ff, @@ -454,7 +454,7 @@ void TeXFont_PK::PK_skip_specials() case PK_NOOP : break; default : - oops(i18n("Unexpected %1 in PK file %2").arg(PK_flag_byte).arg(parent->filename) ); + oops(i18n("Unexpected %1 in PK file %2").tqarg(PK_flag_byte).tqarg(tqparent->filename) ); break; } } @@ -477,11 +477,11 @@ void TeXFont_PK::read_PK_char(unsigned int ch) int n; int row_bit_pos; bool paint_switch; - Q_UINT32 *cp; + TQ_UINT32 *cp; register struct glyph *g; register FILE *fp = file; long fpwidth; - Q_UINT32 word = 0; + TQ_UINT32 word = 0; int word_weight, bytes_wide; int rows_left, h_bit, count; @@ -521,7 +521,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) w = num(fp, n); h = num(fp, n); if (w > 0x7fff || h > 0x7fff) - oops(i18n("The character %1 is too large in file %2").arg(ch).arg(parent->filename)); + oops(i18n("The character %1 is too large in file %2").tqarg(ch).tqarg(tqparent->filename)); characterBitmaps[ch]->w = w; characterBitmaps[ch]->h = h; } @@ -537,7 +537,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) characterBitmaps[ch]->bits = new char[size != 0 ? size : 1]; } - cp = (Q_UINT32 *) characterBitmaps[ch]->bits; + cp = (TQ_UINT32 *) characterBitmaps[ch]->bits; /* * read character data into *cp @@ -595,12 +595,12 @@ void TeXFont_PK::read_PK_char(unsigned int ch) h_bit -= count; word_weight -= count; if (paint_switch) - word |= bit_masks[count] << word_weight; + word |= bit_tqmasks[count] << word_weight; count = 0; } else if (count >= h_bit && h_bit <= word_weight) { if (paint_switch) - word |= bit_masks[h_bit] << (word_weight - h_bit); + word |= bit_tqmasks[h_bit] << (word_weight - h_bit); *cp++ = word; /* "output" row(s) */ for (i = PK_repeat_count * bytes_wide / 4; i > 0; --i) { @@ -615,7 +615,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) h_bit = characterBitmaps[ch]->w; } else { if (paint_switch) - word |= bit_masks[word_weight]; + word |= bit_tqmasks[word_weight]; *cp++ = word; word = 0; count -= word_weight; @@ -625,10 +625,10 @@ void TeXFont_PK::read_PK_char(unsigned int ch) } paint_switch = 1 - paint_switch; } - if (cp != ((Q_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) - oops(i18n("Wrong number of bits stored: char. %1, font %2").arg(ch).arg(parent->filename)); + if (cp != ((TQ_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) + oops(i18n("Wrong number of bits stored: char. %1, font %2").tqarg(ch).tqarg(tqparent->filename)); if (rows_left != 0 || h_bit != characterBitmaps[ch]->w) - oops(i18n("Bad pk file (%1), too many bits").arg(parent->filename)); + oops(i18n("Bad pk file (%1), too many bits").tqarg(tqparent->filename)); } // The data in the bitmap is now in the processor's bit order, @@ -679,14 +679,14 @@ void TeXFont_PK::read_PK_char(unsigned int ch) while (count > 0) { if (count < word_weight && count < h_bit) { if (paint_switch) - word |= bit_masks[count] << (32 - word_weight); + word |= bit_tqmasks[count] << (32 - word_weight); h_bit -= count; word_weight -= count; count = 0; } else if (count >= h_bit && h_bit <= word_weight) { if (paint_switch) - word |= bit_masks[h_bit] << (32 - word_weight); + word |= bit_tqmasks[h_bit] << (32 - word_weight); *cp++ = word; /* "output" row(s) */ for (i = PK_repeat_count * bytes_wide / 4; i > 0; --i) { @@ -701,7 +701,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) h_bit = characterBitmaps[ch]->w; } else { if (paint_switch) - word |= bit_masks[word_weight] << (32 - word_weight); + word |= bit_tqmasks[word_weight] << (32 - word_weight); *cp++ = word; word = 0; count -= word_weight; @@ -711,10 +711,10 @@ void TeXFont_PK::read_PK_char(unsigned int ch) } paint_switch = 1 - paint_switch; } - if (cp != ((Q_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) - oops(i18n("Wrong number of bits stored: char. %1, font %2").arg(ch).arg(parent->filename)); + if (cp != ((TQ_UINT32 *) (characterBitmaps[ch]->bits + bytes_wide * characterBitmaps[ch]->h))) + oops(i18n("Wrong number of bits stored: char. %1, font %2").tqarg(ch).tqarg(tqparent->filename)); if (rows_left != 0 || h_bit != characterBitmaps[ch]->w) - oops(i18n("Bad pk file (%1), too many bits").arg(parent->filename)); + oops(i18n("Bad pk file (%1), too many bits").tqarg(tqparent->filename)); } } // endif: big or small Endian? } diff --git a/kdvi/TeXFont_PK.h b/kdvi/TeXFont_PK.h index 80a0c0e1..68935d16 100644 --- a/kdvi/TeXFont_PK.h +++ b/kdvi/TeXFont_PK.h @@ -9,10 +9,10 @@ class glyph; class TeXFont_PK : public TeXFont { public: - TeXFont_PK(TeXFontDefinition *parent); + TeXFont_PK(TeXFontDefinition *tqparent); ~TeXFont_PK(); - glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black); + glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black); private: FILE *file; // open font file or NULL diff --git a/kdvi/TeXFont_TFM.cpp b/kdvi/TeXFont_TFM.cpp index c8268f01..ebd1b7f5 100644 --- a/kdvi/TeXFont_TFM.cpp +++ b/kdvi/TeXFont_TFM.cpp @@ -21,14 +21,14 @@ //#define DEBUG_TFM -TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) - : TeXFont(parent) +TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *tqparent) + : TeXFont(tqparent) { #ifdef DEBUG_TFM - kdDebug(4300) << "TeXFont_TFM::TeXFont_TFM( parent=" << parent << " )" << endl; + kdDebug(4300) << "TeXFont_TFM::TeXFont_TFM( tqparent=" << tqparent << " )" << endl; #endif - TQFile file( parent->filename ); + TQFile file( tqparent->filename ); if ( !file.open( IO_ReadOnly ) ) { kdError(4300) << "TeXFont_TFM::TeXFont_TFM(): Could not read TFM file" << endl; return; @@ -37,7 +37,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) // Data from the very beginning of the TFM file, as specified in // "The DVI Driver Standard, Level 0", section D.2.1 - Q_UINT16 lf, lh, bc, ec, nw, nh, nd; + TQ_UINT16 lf, lh, bc, ec, nw, nh, nd; stream >> lf >> lh >> bc >> ec >> nw >> nh >> nd; #ifdef DEBUG_TFM kdDebug(4300) << "lf= " << lf << endl @@ -49,7 +49,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) << "nd= " << nd << endl; #endif if ((bc > ec) || (ec >= TeXFontDefinition::max_num_of_chars_in_font)) { - kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid bc and ec entries." << endl; + kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid bc and ec entries." << endl; file.close(); return; } @@ -94,10 +94,10 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) for(unsigned int characterCode=bc; characterCode<ec; characterCode++) { glyph *g = glyphtable+characterCode; - Q_UINT8 byte; + TQ_UINT8 byte; stream >> byte; if (byte >= nw) - kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl; + kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid Char-Info table." << endl; else { characterWidth_in_units_of_design_size[characterCode] = widthTable_in_units_of_design_size[byte]; g->dvi_advance_in_units_of_design_size_by_2e20 = widthTable_in_units_of_design_size[byte].value; @@ -106,7 +106,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) stream >> byte; byte = byte >> 4; if (byte >= nh) - kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl; + kdError(4300) << "TeXFont_TFM::TeXFont_TFM( filename=" << tqparent->filename << " ): The font has an invalid Char-Info table." << endl; else characterHeight_in_units_of_design_size[characterCode] = heightTable_in_units_of_design_size[byte]; @@ -122,7 +122,7 @@ TeXFont_TFM::~TeXFont_TFM() } -glyph *TeXFont_TFM::getGlyph(Q_UINT16 characterCode, bool generateCharacterPixmap, const TQColor& color) +glyph *TeXFont_TFM::getGlyph(TQ_UINT16 characterCode, bool generateCharacterPixmap, const TQColor& color) { #ifdef DEBUG_TFM kdDebug(4300) << "TeXFont_TFM::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; @@ -139,10 +139,10 @@ glyph *TeXFont_TFM::getGlyph(Q_UINT16 characterCode, bool generateCharacterPixma if ((generateCharacterPixmap == true) && ((g->shrunkenCharacter.isNull()) || (color != g->color)) ) { g->color = color; - Q_UINT16 pixelWidth = (Q_UINT16)(parent->displayResolution_in_dpi * + TQ_UINT16 pixelWidth = (TQ_UINT16)(tqparent->displayResolution_in_dpi * design_size_in_TeX_points.toDouble() * characterWidth_in_units_of_design_size[characterCode].toDouble() * 100.0/7227.0 + 0.5); - Q_UINT16 pixelHeight = (Q_UINT16)(parent->displayResolution_in_dpi * + TQ_UINT16 pixelHeight = (TQ_UINT16)(tqparent->displayResolution_in_dpi * design_size_in_TeX_points.toDouble() * characterHeight_in_units_of_design_size[characterCode].toDouble() * 100.0/7227.0 + 0.5); diff --git a/kdvi/TeXFont_TFM.h b/kdvi/TeXFont_TFM.h index 737c8bed..9a3639e0 100644 --- a/kdvi/TeXFont_TFM.h +++ b/kdvi/TeXFont_TFM.h @@ -14,19 +14,19 @@ class fix_word { public: - void fromINT32(Q_INT32 val) {value = val;} - void fromDouble(double val) {value = (Q_INT32)(val * (1<<20) + 0.5);} + void fromINT32(TQ_INT32 val) {value = val;} + void fromDouble(double val) {value = (TQ_INT32)(val * (1<<20) + 0.5);} double toDouble() {return (double(value)) / (double(1<<20));} - Q_INT32 value; + TQ_INT32 value; }; class TeXFont_TFM : public TeXFont { public: - TeXFont_TFM(TeXFontDefinition *parent); + TeXFont_TFM(TeXFontDefinition *tqparent); ~TeXFont_TFM(); - glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black); + glyph* getGlyph(TQ_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=TQt::black); private: fix_word characterWidth_in_units_of_design_size[256]; diff --git a/kdvi/bigEndianByteReader.cpp b/kdvi/bigEndianByteReader.cpp index 63d11f83..aa55bdd8 100644 --- a/kdvi/bigEndianByteReader.cpp +++ b/kdvi/bigEndianByteReader.cpp @@ -14,7 +14,7 @@ //#define DEBUG_ENDIANREADER -Q_UINT8 bigEndianByteReader::readUINT8() +TQ_UINT8 bigEndianByteReader::readUINT8() { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. @@ -30,27 +30,27 @@ Q_UINT8 bigEndianByteReader::readUINT8() return *(command_pointer++); } -Q_UINT16 bigEndianByteReader::readUINT16() +TQ_UINT16 bigEndianByteReader::readUINT16() { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return EOP; - Q_UINT16 a; + TQ_UINT16 a; a = *(command_pointer++); a = (a << 8) | *(command_pointer++); return a; } -Q_UINT32 bigEndianByteReader::readUINT32() +TQ_UINT32 bigEndianByteReader::readUINT32() { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return EOP; - Q_UINT32 a; + TQ_UINT32 a; a = *(command_pointer++); a = (a << 8) | *(command_pointer++); a = (a << 8) | *(command_pointer++); @@ -58,33 +58,33 @@ Q_UINT32 bigEndianByteReader::readUINT32() return a; } -void bigEndianByteReader::writeUINT32(Q_UINT32 a) +void bigEndianByteReader::writeUINT32(TQ_UINT32 a) { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return; - command_pointer[3] = (Q_UINT8)(a & 0xFF); + command_pointer[3] = (TQ_UINT8)(a & 0xFF); a = a >> 8; - command_pointer[2] = (Q_UINT8)(a & 0xFF); + command_pointer[2] = (TQ_UINT8)(a & 0xFF); a = a >> 8; - command_pointer[1] = (Q_UINT8)(a & 0xFF); + command_pointer[1] = (TQ_UINT8)(a & 0xFF); a = a >> 8; - command_pointer[0] = (Q_UINT8)(a & 0xFF); + command_pointer[0] = (TQ_UINT8)(a & 0xFF); command_pointer += 4; return; } -Q_UINT32 bigEndianByteReader::readUINT(Q_UINT8 size) +TQ_UINT32 bigEndianByteReader::readUINT(TQ_UINT8 size) { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return EOP; - Q_UINT32 a = 0; + TQ_UINT32 a = 0; while (size > 0) { a = (a << 8) + *(command_pointer++); size--; @@ -92,14 +92,14 @@ Q_UINT32 bigEndianByteReader::readUINT(Q_UINT8 size) return a; } -Q_INT32 bigEndianByteReader::readINT(Q_UINT8 length) +TQ_INT32 bigEndianByteReader::readINT(TQ_UINT8 length) { // This check saveguards us against segmentation fault. It is also // necessary for virtual fonts, which do not end whith EOP. if (command_pointer >= end_pointer) return EOP; - Q_INT32 a = *(command_pointer++); + TQ_INT32 a = *(command_pointer++); if (a & 0x80) a -= 0x100; diff --git a/kdvi/bigEndianByteReader.h b/kdvi/bigEndianByteReader.h index 06ef1b13..269d97d1 100644 --- a/kdvi/bigEndianByteReader.h +++ b/kdvi/bigEndianByteReader.h @@ -24,38 +24,38 @@ class bigEndianByteReader { public: /** Set this pointer to the location where the number resides which you want to read. */ - Q_UINT8 * command_pointer; + TQ_UINT8 * command_pointer; /** This pointer marks the end of the memory area where bytes can be read. It should point to the first byte which CANNOT be read. The idea is to have a safety net which protects us against SEGFAULTs. This is also used in virtual fonts, where the macro does not have an EOP command at the end of the macro. */ - Q_UINT8 * end_pointer; + TQ_UINT8 * end_pointer; /** If command_pointer >= end_pointer, this method return EOP (=140) and exists. Otherwise, the method returns the unsigned byte and increases the command_pointer by one. */ - Q_UINT8 readUINT8(); + TQ_UINT8 readUINT8(); /** Similar to the method above, only that the method reads a big endian 2-byte word and increases the pointer by two. */ - Q_UINT16 readUINT16(); + TQ_UINT16 readUINT16(); /** Similar to the method above, only that the method reads a big endian 4-byte word and increases the pointer by four. */ - Q_UINT32 readUINT32(); + TQ_UINT32 readUINT32(); - void writeUINT32(Q_UINT32 a); + void writeUINT32(TQ_UINT32 a); /** Similar to the method above, only that the method reads a big endian number of length size, where 1 <= size <= 4. Note that the value 3 is allowed (and is acually used in DVI files)!!! */ - Q_UINT32 readUINT(Q_UINT8 size); + TQ_UINT32 readUINT(TQ_UINT8 size); /** Similar to the method above, only that the method reads a SIGNED number */ - Q_INT32 readINT(Q_UINT8); + TQ_INT32 readINT(TQ_UINT8); }; diff --git a/kdvi/dviFile.cpp b/kdvi/dviFile.cpp index 336507db..db365482 100644 --- a/kdvi/dviFile.cpp +++ b/kdvi/dviFile.cpp @@ -71,7 +71,7 @@ extern "C" { dvifile::dvifile(const dvifile *old, fontPool *fp) { - errorMsg = TQString::null; + errorMsg = TQString(); errorCounter = 0; page_offset = 0; suggestedPageSize = 0; @@ -107,7 +107,7 @@ void dvifile::process_preamble() { command_pointer = dvi_Data(); - Q_UINT8 magic_number = readUINT8(); + TQ_UINT8 magic_number = readUINT8(); if (magic_number != PRE) { errorMsg = i18n("The DVI file does not start with the preamble."); return; @@ -124,8 +124,8 @@ void dvifile::process_preamble() how many centimeters there are in one TeX unit, as explained in section A.3 of the DVI driver standard, Level 0, published by the TUG DVI driver standards committee. */ - Q_UINT32 numerator = readUINT32(); - Q_UINT32 denominator = readUINT32(); + TQ_UINT32 numerator = readUINT32(); + TQ_UINT32 denominator = readUINT32(); _magnification = readUINT32(); cmPerDVIunit = (double(numerator) / double(denominator)) * (double(_magnification) / 1000.0) * (1.0 / 1e5); @@ -165,7 +165,7 @@ void dvifile::find_postamble() void dvifile::read_postamble() { - Q_UINT8 magic_byte = readUINT8(); + TQ_UINT8 magic_byte = readUINT8(); if (magic_byte != POST) { errorMsg = i18n("The postamble does not begin with the POST command."); return; @@ -181,17 +181,17 @@ void dvifile::read_postamble() total_pages = readUINT16(); // As a next step, read the font definitions. - Q_UINT8 cmnd = readUINT8(); + TQ_UINT8 cmnd = readUINT8(); while (cmnd >= FNTDEF1 && cmnd <= FNTDEF4) { - Q_UINT32 TeXnumber = readUINT(cmnd-FNTDEF1+1); - Q_UINT32 checksum = readUINT32(); // Checksum of the font, as found by TeX in the TFM file + TQ_UINT32 TeXnumber = readUINT(cmnd-FNTDEF1+1); + TQ_UINT32 checksum = readUINT32(); // Checksum of the font, as found by TeX in the TFM file // Read scale and design factor, and the name of the font. All // these are explained in section A.4 of the DVI driver standard, // Level 0, published by the TUG DVI driver standards committee - Q_UINT32 scale = readUINT32(); - Q_UINT32 design = readUINT32(); - Q_UINT16 len = readUINT8() + readUINT8(); // Length of the font name, including the directory name + TQ_UINT32 scale = readUINT32(); + TQ_UINT32 design = readUINT32(); + TQ_UINT16 len = readUINT8() + readUINT8(); // Length of the font name, including the directory name char *fontname = new char[len + 1]; strncpy(fontname, (char *)command_pointer, len ); fontname[len] = '\0'; @@ -248,7 +248,7 @@ void dvifile::prepare_pages() page_offset[total_pages] = beginning_of_postamble; - Q_UINT16 i = total_pages-1; + TQ_UINT16 i = total_pages-1; page_offset[i] = last_page_offset; // Follow back pointers through pages in the DVI file, storing the @@ -256,7 +256,7 @@ void dvifile::prepare_pages() while (i > 0) { command_pointer = dvi_Data() + page_offset[i--]; if (readUINT8() != BOP) { - errorMsg = i18n("The page %1 does not start with the BOP command.").arg(i+1); + errorMsg = i18n("The page %1 does not start with the BOP command.").tqarg(i+1); return; } command_pointer += 10 * 4; @@ -273,7 +273,7 @@ dvifile::dvifile(const TQString& fname, fontPool* pool) kdDebug(4300) << "init_dvi_file: " << fname << endl; #endif - errorMsg = TQString::null; + errorMsg = TQString(); errorCounter = 0; page_offset = 0; suggestedPageSize = 0; @@ -340,10 +340,10 @@ void dvifile::renumber() bool bigEndian; qSysInfo (&wordSize, &bigEndian); - for(Q_UINT32 i=1; i<=total_pages; i++) { - Q_UINT8 *ptr = dviData.data() + page_offset[i-1]+1; - Q_UINT8 *num = (Q_UINT8 *)&i; - for(Q_UINT8 j=0; j<4; j++) + for(TQ_UINT32 i=1; i<=total_pages; i++) { + TQ_UINT8 *ptr = dviData.data() + page_offset[i-1]+1; + TQ_UINT8 *num = (TQ_UINT8 *)&i; + for(TQ_UINT8 j=0; j<4; j++) if (bigEndian) { *(ptr++) = num[0]; *(ptr++) = num[1]; @@ -362,14 +362,14 @@ void dvifile::renumber() TQString dvifile::convertPDFtoPS(const TQString &PDFFilename) { // Check if the PDFFile is known - TQMap<TQString, TQString>::Iterator it = convertedFiles.find(PDFFilename); + TQMap<TQString, TQString>::Iterator it = convertedFiles.tqfind(PDFFilename); if (it != convertedFiles.end()) { // PDF-File is known. Good. return it.data(); } // Get the name of a temporary file - KTempFile tmpfile(TQString::null, ".ps"); + KTempFile tmpfile(TQString(), ".ps"); TQString convertedFileName = tmpfile.name(); tmpfile.close(); tmpfile.unlink(); @@ -378,9 +378,9 @@ TQString dvifile::convertPDFtoPS(const TQString &PDFFilename) KProcIO proc; proc << "pdf2ps" << PDFFilename << convertedFileName; if (proc.start(KProcess::Block) == false) - convertedFileName = TQString::null; // Indicates that conversion failed, won't try again. + convertedFileName = TQString(); // Indicates that conversion failed, won't try again. if (!TQFile::exists(convertedFileName)) - convertedFileName = TQString::null; // Indicates that conversion failed, won't try again. + convertedFileName = TQString(); // Indicates that conversion failed, won't try again. // Save name of converted file to buffer, so PDF file won't be // converted again, and files can be deleted when *this is diff --git a/kdvi/dviFile.h b/kdvi/dviFile.h index 59ffe65c..b82d19de 100644 --- a/kdvi/dviFile.h +++ b/kdvi/dviFile.h @@ -35,15 +35,15 @@ class dvifile : public bigEndianByteReader fontPool * font_pool; TQString filename; TQString generatorString; - Q_UINT16 total_pages; - TQMemArray<Q_UINT32> page_offset; + TQ_UINT16 total_pages; + TQMemArray<TQ_UINT32> page_offset; /** Saves the DVI file. Returns true on success. */ bool saveAs(const TQString &filename); // Returns a pointer to the DVI file's data, or 0 if no data has yet // been allocated. - Q_UINT8 * dvi_Data() {return dviData.data();} + TQ_UINT8 * dvi_Data() {return dviData.data();} TQIODevice::Offset size_of_file; TQString errorMsg; @@ -51,14 +51,14 @@ class dvifile : public bigEndianByteReader /** This field is set to zero when the DVI file is constructed, and will be modified during the prescan phase (at this time the prescan code still resides in the dviRenderer class) */ - Q_UINT16 numberOfExternalPSFiles; + TQ_UINT16 numberOfExternalPSFiles; /** This field is set to zero when the DVI file is constructed, and will be modified during the prescan phase (at this time the prescan code still resides in the dviRenderer class) */ - Q_UINT16 numberOfExternalNONPSFiles; + TQ_UINT16 numberOfExternalNONPSFiles; - Q_UINT32 beginning_of_postamble; + TQ_UINT32 beginning_of_postamble; /** This flag is set to "true" during the construction of the dvifile, and is never changed afterwards by the dvifile @@ -76,20 +76,20 @@ class dvifile : public bigEndianByteReader /** Returns the magnification of the DVI file, as described in the DVI Standard. */ - Q_UINT32 getMagnification() const {return _magnification;} + TQ_UINT32 getMagnification() const {return _magnification;} /** This member is set to zero on construction and can be used by other software to count error messages that were printed when the DVI-file was processed. Suggested application: limit the number of error messages to, say, 25. */ - Q_UINT8 errorCounter; + TQ_UINT8 errorCounter; /** Papersize information read from the dvi-File */ pageSize *suggestedPageSize; /** Sets new DVI data; all old data is erased. EXPERIMENTAL, use with care. */ - void setNewData(const TQMemArray<Q_UINT8>& newData) {dviData = newData;} + void setNewData(const TQMemArray<TQ_UINT8>& newData) {dviData = newData;} /** Page numbers that appear in a DVI document need not be ordered. Worse, page numbers need not be unique. This method @@ -112,7 +112,7 @@ class dvifile : public bigEndianByteReader name, the method will then NOT convert the file, but simply return the name from the buffer - @returns The name of the PS file, or TQString::null on failure. + @returns The name of the PS file, or TQString() on failure. */ TQString convertPDFtoPS(const TQString &PDFFilename); @@ -129,19 +129,19 @@ class dvifile : public bigEndianByteReader /** Offset in DVI file of last page, set in read_postamble(). */ - Q_UINT32 last_page_offset; - Q_UINT32 _magnification; + TQ_UINT32 last_page_offset; + TQ_UINT32 _magnification; double cmPerDVIunit; - TQMemArray<Q_UINT8> dviData; + TQMemArray<TQ_UINT8> dviData; /** Map of filenames for converted PDF files This map contains names of PDF files that were converted to PostScript. The key is the name of the PDF file, the data the name - of the associated PS file, or TQString::null, if the file could not + of the associated PS file, or TQString(), if the file could not be converted. The PS files are deleted when the DVI-file is destructed. */ TQMap<TQString, TQString> convertedFiles; diff --git a/kdvi/dviPageCache.h b/kdvi/dviPageCache.h index a28052c5..41a1c173 100644 --- a/kdvi/dviPageCache.h +++ b/kdvi/dviPageCache.h @@ -27,6 +27,7 @@ class DVIPageCache : public DocumentPageCache { Q_OBJECT + TQ_OBJECT public: DVIPageCache(); diff --git a/kdvi/dviRenderer.cpp b/kdvi/dviRenderer.cpp index 2e0b0512..5133b2ab 100644 --- a/kdvi/dviRenderer.cpp +++ b/kdvi/dviRenderer.cpp @@ -71,7 +71,7 @@ dviRenderer::dviRenderer(TQWidget *par) : DocumentRenderer(par), info(new infoDialog(par)) { #ifdef DEBUG_DVIRENDERER - kdDebug(4300) << "dviRenderer( parent=" << par << " )" << endl; + kdDebug(4300) << "dviRenderer( tqparent=" << par << " )" << endl; #endif // initialize the dvi machinery @@ -79,7 +79,7 @@ dviRenderer::dviRenderer(TQWidget *par) connect(&font_pool, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) ); - parentWidget = par; + tqparentWidget = par; shrinkfactor = 3; current_page = 0; resolutionInDPI = 0.0; @@ -193,12 +193,12 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page) // Reset colors colorStack.clear(); - globalColor = Qt::black; + globalColor = TQt::black; TQApplication::setOverrideCursor( waitCursor ); foreGroundPainter = page->getPainter(); if (foreGroundPainter != 0) { - errorMsg = TQString::null; + errorMsg = TQString(); draw_page(); page->returnPainter(foreGroundPainter); } @@ -206,11 +206,11 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page) page->isEmpty = false; if (errorMsg.isEmpty() != true) { - KMessageBox::detailedError(parentWidget, + KMessageBox::detailedError(tqparentWidget, i18n("<qt><strong>File corruption!</strong> KDVI had trouble interpreting your DVI file. Most " "likely this means that the DVI file is broken.</qt>"), errorMsg, i18n("DVI File Error")); - errorMsg = TQString::null; + errorMsg = TQString(); currentlyDrawnPage = 0; mutex.unlock(); return; @@ -260,7 +260,7 @@ void dviRenderer::showThatSourceInformationIsPresent() if (showMsg) { KDialogBase *dialog= new KDialogBase(i18n("KDVI: Information"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes, - parentWidget, "information", true, true,KStdGuiItem::ok() ); + tqparentWidget, "information", true, true,KStdGuiItem::ok() ); TQVBox *topcontents = new TQVBox (dialog); topcontents->setSpacing(KDialog::spacingHint()*2); @@ -277,7 +277,7 @@ void dviRenderer::showThatSourceInformationIsPresent() TQLabel *label2 = new TQLabel( i18n("<qt>This DVI file contains source file information. You may click into the text with the " "middle mouse button, and an editor will open the TeX-source file immediately.</qt>"), contents); - label2->setMinimumSize(label2->sizeHint()); + label2->setMinimumSize(label2->tqsizeHint()); lay->add( label2 ); lay->addStretch(1); TQSize extraSize = TQSize(50,30); @@ -311,8 +311,8 @@ void dviRenderer::embedPostScript() if (!dviFile) return; - embedPS_progress = new KProgressDialog(parentWidget, "embedPSProgressDialog", - i18n("Embedding PostScript Files"), TQString::null, true); + embedPS_progress = new KProgressDialog(tqparentWidget, "embedPSProgressDialog", + i18n("Embedding PostScript Files"), TQString(), true); if (!embedPS_progress) return; embedPS_progress->setAllowCancel(false); @@ -323,8 +323,8 @@ void dviRenderer::embedPostScript() embedPS_numOfProgressedFiles = 0; - Q_UINT16 currPageSav = current_page; - errorMsg = TQString::null; + TQ_UINT16 currPageSav = current_page; + errorMsg = TQString(); for(current_page=0; current_page < dviFile->total_pages; current_page++) { if (current_page < dviFile->total_pages) { command_pointer = dviFile->dvi_Data() + dviFile->page_offset[current_page]; @@ -342,12 +342,12 @@ void dviRenderer::embedPostScript() if (!errorMsg.isEmpty()) { errorMsg = "<qt>" + errorMsg + "</qt>"; - KMessageBox::detailedError(parentWidget, "<qt>" + i18n("Not all PostScript files could be embedded into your document.") + "</qt>", errorMsg); - errorMsg = TQString::null; + KMessageBox::detailedError(tqparentWidget, "<qt>" + i18n("Not all PostScript files could be embedded into your document.") + "</qt>", errorMsg); + errorMsg = TQString(); } else - KMessageBox::information(parentWidget, "<qt>" + i18n("All external PostScript files were embedded into your document. You " + KMessageBox::information(tqparentWidget, "<qt>" + i18n("All external PostScript files were embedded into your document. You " "will probably want to save the DVI file now.") + "</qt>", - TQString::null, "embeddingDone"); + TQString(), "embeddingDone"); // Prescan phase starts here #ifdef PERFORMANCE_MEASUREMENT @@ -435,9 +435,9 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) // Make sure the file actually exists. if (!fi.exists() || fi.isDir()) { - KMessageBox::error( parentWidget, + KMessageBox::error( tqparentWidget, i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist. " - "KDVI already tried to add the ending '.dvi'.</qt>").arg(filename), + "KDVI already tried to add the ending '.dvi'.</qt>").tqarg(filename), i18n("File Error!")); return false; } @@ -448,21 +448,21 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) // the multipage. TQString mimetype( KMimeMagic::self()->findFileType( fname )->mimeType() ); if (mimetype != "application/x-dvi") { - KMessageBox::sorry( parentWidget, + KMessageBox::sorry( tqparentWidget, i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr> which has " "type <strong>%2</strong>. KDVI can only load DVI (.dvi) files.</qt>" ) - .arg( fname ) - .arg( mimetype ) ); + .tqarg( fname ) + .tqarg( mimetype ) ); return false; } // Check if the file is a valid DVI file. if (!isValidFile(filename)) { - KMessageBox::sorry( parentWidget, + KMessageBox::sorry( tqparentWidget, i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most " "likely this means that the DVI file is broken.</qt>") - .arg( fname ) ); + .tqarg( fname ) ); return false; } @@ -477,7 +477,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) if ((dviFile_new->dvi_Data() == NULL)||(dviFile_new->errorMsg.isEmpty() != true)) { TQApplication::restoreOverrideCursor(); if (dviFile_new->errorMsg.isEmpty() != true) - KMessageBox::detailedError(parentWidget, + KMessageBox::detailedError(tqparentWidget, i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most " "likely this means that the DVI file is broken.</qt>"), dviFile_new->errorMsg, i18n("DVI File Error")); @@ -507,7 +507,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) TQString includePath; if (!baseURL.isLocalFile()) { includePath = filename; - includePath.truncate(includePath.findRev('/')); + includePath.truncate(includePath.tqfindRev('/')); } PS_interface->setIncludePath(includePath); @@ -538,7 +538,7 @@ bool dviRenderer::setFile(const TQString &fname, const KURL &base) preScanTimer.start(); #endif dviFile->numberOfExternalPSFiles = 0; - Q_UINT16 currPageSav = current_page; + TQ_UINT16 currPageSav = current_page; prebookmarks.clear(); for(current_page=0; current_page < dviFile->total_pages; current_page++) { @@ -629,19 +629,19 @@ Anchor dviRenderer::parseReference(const TQString &reference) // points to line number 1111 in the file "Filename". KDVI then // looks for source specials of the form "src:xxxxFilename", and // tries to find the special with the biggest xxxx - if (reference.find("src:",0,false) == 0) { + if (reference.tqfind("src:",0,false) == 0) { // Extract the file name and the numeral part from the reference string DVI_SourceFileSplitter splitter(reference, dviFile->filename); - Q_UINT32 refLineNumber = splitter.line(); + TQ_UINT32 refLineNumber = splitter.line(); TQString refFileName = splitter.filePath(); if (sourceHyperLinkAnchors.isEmpty()) { - KMessageBox::sorry(parentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to " + KMessageBox::sorry(tqparentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to " "line %1 in the TeX-file <strong>%2</strong>. It seems, however, that the DVI file " "does not contain the necessary source file information. " "We refer to the manual of KDVI for a detailed explanation on how to include this " - "information. Press the F1 key to open the manual.</qt>").arg(refLineNumber).arg(refFileName), + "information. Press the F1 key to open the manual.</qt>").tqarg(refLineNumber).tqarg(refFileName), i18n("Could Not Find Reference")); mutex.unlock(); return Anchor(); @@ -651,7 +651,7 @@ Anchor dviRenderer::parseReference(const TQString &reference) // whose line number is the biggest among those that are smaller // than the refLineNumber. That way, the position in the DVI file // which is highlighted is always a little further up than the - // position in the editor, e.g. if the DVI file contains + // position in the editor, e.g. if the DVI file tqcontains // positional information at the beginning of every paragraph, // KDVI jumps to the beginning of the paragraph that the cursor is // in, and never to the next paragraph. If source file anchors for @@ -680,8 +680,8 @@ Anchor dviRenderer::parseReference(const TQString &reference) return Anchor(bestMatch->page, bestMatch->distance_from_top); } else if (anchorForRefFileFound == false) - KMessageBox::sorry(parentWidget, i18n("<qt>KDVI was not able to locate the place in the DVI file which corresponds to " - "line %1 in the TeX-file <strong>%2</strong>.</qt>").arg(refLineNumber).arg(refFileName), + KMessageBox::sorry(tqparentWidget, i18n("<qt>KDVI was not able to locate the place in the DVI file which corresponds to " + "line %1 in the TeX-file <strong>%2</strong>.</qt>").tqarg(refLineNumber).tqarg(refFileName), i18n( "Could Not Find Reference" )); else { mutex.unlock(); @@ -715,7 +715,7 @@ void dviRenderer::setResolution(double resolution_in_DPI) void dviRenderer::clearStatusBar() { - emit setStatusBarText( TQString::null ); + emit setStatusBarText( TQString() ); } @@ -733,9 +733,9 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum TQString TeXfile = splitter.filePath(); if ( ! splitter.fileExists() ) { - KMessageBox::sorry(parentWidget, TQString("<qt>") + + KMessageBox::sorry(tqparentWidget, TQString("<qt>") + i18n("The DVI-file refers to the TeX-file " - "<strong>%1</strong> which could not be found.").arg(KShellProcess::quote(TeXfile)) + + "<strong>%1</strong> which could not be found.").tqarg(KShellProcess::quote(TeXfile)) + TQString("</qt>"), i18n( "Could Not Find File" )); return; @@ -743,7 +743,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum TQString command = editorCommand; if (command.isEmpty() == true) { - int r = KMessageBox::warningContinueCancel(parentWidget, TQString("<qt>") + + int r = KMessageBox::warningContinueCancel(tqparentWidget, TQString("<qt>") + i18n("You have not yet specified an editor for inverse search. " "Please choose your favorite editor in the " "<strong>DVI options dialog</strong> " @@ -756,7 +756,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum else return; } - command = command.replace( "%l", TQString::number(splitter.line()) ).replace( "%f", KShellProcess::quote(TeXfile) ); + command = command.tqreplace( "%l", TQString::number(splitter.line()) ).tqreplace( "%f", KShellProcess::quote(TeXfile) ); #ifdef DEBUG_SPECIAL kdDebug(4300) << "Calling program: " << command << endl; @@ -767,8 +767,8 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum // henceforth dimiss the output of the older programm. "If it // hasn't failed until now, we don't care." if (proc != 0) { - qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); - qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); proc = 0; } @@ -778,15 +778,15 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum kdError(4300) << "Could not allocate ShellProcess for the editor command." << endl; return; } - qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(editorCommand_terminated(KProcess *))); + tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(editorCommand_terminated(KProcess *))); // Merge the editor-specific editor message here. export_errorString = i18n("<qt>The external program<br><br><tt><strong>%1</strong></tt><br/><br/>which was used to call the editor " "for inverse search, reported an error. You might wish to look at the <strong>document info " "dialog</strong> which you will find in the File-Menu for a precise error report. The " "manual for KDVI contains a detailed explanation how to set up your editor for use with KDVI, " - "and a list of common problems.</qt>").arg(command); + "and a list of common problems.</qt>").tqarg(command); info->clear(i18n("Starting the editor...")); @@ -804,33 +804,33 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum } -TQString dviRenderer::PDFencodingToQString(const TQString& _pdfstring) +TQString dviRenderer::PDFencodingToTQString(const TQString& _pdfstring) { // This method locates special PDF characters in a string and // replaces them by UTF8. See Section 3.2.3 of the PDF reference // guide for information. TQString pdfstring = _pdfstring; - pdfstring = pdfstring.replace("\\n", "\n"); - pdfstring = pdfstring.replace("\\r", "\n"); - pdfstring = pdfstring.replace("\\t", "\t"); - pdfstring = pdfstring.replace("\\f", "\f"); - pdfstring = pdfstring.replace("\\(", "("); - pdfstring = pdfstring.replace("\\)", ")"); - pdfstring = pdfstring.replace("\\\\", "\\"); + pdfstring = pdfstring.tqreplace("\\n", "\n"); + pdfstring = pdfstring.tqreplace("\\r", "\n"); + pdfstring = pdfstring.tqreplace("\\t", "\t"); + pdfstring = pdfstring.tqreplace("\\f", "\f"); + pdfstring = pdfstring.tqreplace("\\(", "("); + pdfstring = pdfstring.tqreplace("\\)", ")"); + pdfstring = pdfstring.tqreplace("\\\\", "\\"); // Now replace octal character codes with the characters they encode int pos; TQRegExp rx( "(\\\\)(\\d\\d\\d)" ); // matches "\xyz" where x,y,z are numbers while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); } rx.setPattern( "(\\\\)(\\d\\d)" ); // matches "\xy" where x,y are numbers while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.replace(pos, 3, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.tqreplace(pos, 3, TQChar(rx.cap(2).toInt(0,8))); } rx.setPattern( "(\\\\)(\\d)" ); // matches "\x" where x is a number while((pos = rx.search( pdfstring )) != -1) { - pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); + pdfstring = pdfstring.tqreplace(pos, 4, TQChar(rx.cap(2).toInt(0,8))); } return pdfstring; } diff --git a/kdvi/dviRenderer.h b/kdvi/dviRenderer.h index 863a2786..6d71b1ed 100644 --- a/kdvi/dviRenderer.h +++ b/kdvi/dviRenderer.h @@ -41,13 +41,13 @@ extern const int MFResolutions[]; class DVI_SourceFileAnchor { public: DVI_SourceFileAnchor() {} - DVI_SourceFileAnchor(const TQString& name, Q_UINT32 ln, Q_UINT32 pg, const Length& _distance_from_top) + DVI_SourceFileAnchor(const TQString& name, TQ_UINT32 ln, TQ_UINT32 pg, const Length& _distance_from_top) : fileName(name), line(ln), page(pg), distance_from_top(_distance_from_top) {} TQString fileName; - Q_UINT32 line; - Q_UINT32 page; + TQ_UINT32 line; + TQ_UINT32 page; Length distance_from_top; }; @@ -69,7 +69,7 @@ struct framedata { /* this information is saved when using virtual fonts */ typedef void (dviRenderer::*set_char_proc)(unsigned int, unsigned int); -typedef void (dviRenderer::*parseSpecials)(char *, Q_UINT8 *); +typedef void (dviRenderer::*parseSpecials)(char *, TQ_UINT8 *); struct drawinf { struct framedata data; @@ -85,9 +85,10 @@ struct drawinf { class dviRenderer : public DocumentRenderer, bigEndianByteReader { Q_OBJECT + TQ_OBJECT public: - dviRenderer(TQWidget *parent); + dviRenderer(TQWidget *tqparent); ~dviRenderer(); virtual bool setFile(const TQString &fname, const KURL &base); @@ -127,7 +128,7 @@ public: void draw_page(); public slots: - void exportPS(const TQString& fname = TQString::null, const TQString& options = TQString::null, KPrinter* printer = 0); + void exportPS(const TQString& fname = TQString(), const TQString& options = TQString(), KPrinter* printer = 0); void exportPDF(); void showInfo(); @@ -136,7 +137,7 @@ public slots: void embedPostScript(); void abortExternalProgramm(); - /** simply emits "setStatusBarText( TQString::null )". This is used + /** simply emits "setStatusBarText( TQString() )". This is used in dviRenderer::mouseMoveEvent(), see the explanation there. */ void clearStatusBar(); @@ -179,7 +180,7 @@ private: /* This method locates special PDF characters in a string and replaces them by UTF8. See Section 3.2.3 of the PDF reference guide for information */ - TQString PDFencodingToQString(const TQString& pdfstring); + TQString PDFencodingToTQString(const TQString& pdfstring); void setResolution(double resolution_in_DPI); @@ -190,9 +191,9 @@ private: // @@@ explanation void prescan(parseSpecials specialParser); - void prescan_embedPS(char *cp, Q_UINT8 *); - void prescan_removePageSizeInfo(char *cp, Q_UINT8 *); - void prescan_parseSpecials(char *cp, Q_UINT8 *); + void prescan_embedPS(char *cp, TQ_UINT8 *); + void prescan_removePageSizeInfo(char *cp, TQ_UINT8 *); + void prescan_parseSpecials(char *cp, TQ_UINT8 *); void prescan_ParsePapersizeSpecial(const TQString& cp); void prescan_ParseBackgroundSpecial(const TQString& cp); void prescan_ParseHTMLAnchorSpecial(const TQString& cp); @@ -211,7 +212,7 @@ private: /** Utility fields used by the embedPostScript method*/ KProgressDialog *embedPS_progress; - Q_UINT16 embedPS_numOfProgressedFiles; + TQ_UINT16 embedPS_numOfProgressedFiles; /** Shrink factor. Units are not quite clear */ double shrinkfactor; @@ -291,7 +292,7 @@ private: /** Data required for handling TPIC specials */ float penWidth_in_mInch; TQPointArray TPIC_path; - Q_UINT16 number_of_elements_in_path; + TQ_UINT16 number_of_elements_in_path; struct drawinf currinf; RenderedDocumentPage* currentlyDrawnPage; diff --git a/kdvi/dviRenderer_draw.cpp b/kdvi/dviRenderer_draw.cpp index 6983c372..af79b09a 100644 --- a/kdvi/dviRenderer_draw.cpp +++ b/kdvi/dviRenderer_draw.cpp @@ -235,8 +235,8 @@ void dviRenderer::set_vf_char(unsigned int cmd, unsigned int ch) currinf.fonttable = &(currinf.fontp->vf_table); currinf._virtual = currinf.fontp; - Q_UINT8 *command_ptr_sav = command_pointer; - Q_UINT8 *end_ptr_sav = end_pointer; + TQ_UINT8 *command_ptr_sav = command_pointer; + TQ_UINT8 *end_ptr_sav = end_pointer; command_pointer = m->pos; end_pointer = m->end; draw_part(currinf.fontp->scaled_size_in_DVI_units*(dviFile->getCmPerDVIunit() * 1200.0 / 2.54)/16.0, true); @@ -278,8 +278,8 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) kdDebug(4300) << "draw_part" << endl; #endif - Q_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0; - Q_UINT8 ch; + TQ_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0; + TQ_UINT8 ch; currinf.fontp = NULL; currinf.set_char_p = &dviRenderer::set_no_char; @@ -290,14 +290,14 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) (this->*currinf.set_char_p)(ch, ch); } else if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { - currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); + currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0); if (currinf.fontp == NULL) { - errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").arg(ch - FNTNUM0); + errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); return; } currinf.set_char_p = currinf.fontp->set_char_p; } else { - Q_INT32 a, b; + TQ_INT32 a, b; switch (ch) { case SET1: @@ -453,7 +453,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) case DOWN3: case DOWN4: { - Q_INT32 DDtmp = readINT(ch - DOWN1 + 1); + TQ_INT32 DDtmp = readINT(ch - DOWN1 + 1); if ((is_vfmacro == false) && (currinf.fontp != 0) && (abs(DDtmp) >= 5*(currinf.fontp->scaled_size_in_DVI_units/6)) && @@ -511,7 +511,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) case FNT1: case FNT2: case FNT3: - currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to a font which was not previously defined."); return; @@ -520,7 +520,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) break; case FNT4: - currinf.fontp = currinf.fonttable->find(readINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->tqfind(readINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) { errorMsg = i18n("The DVI code referred to a font which was not previously defined."); return; @@ -553,8 +553,8 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) case FNTDEF4: command_pointer += 12 + ch - FNTDEF1 + 1; { - Q_UINT8 tempa = readUINT8(); - Q_UINT8 tempb = readUINT8(); + TQ_UINT8 tempa = readUINT8(); + TQ_UINT8 tempb = readUINT8(); command_pointer += tempa + tempb; } break; @@ -567,7 +567,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro) break; default: - errorMsg = i18n("The unknown op-code %1 was encountered.").arg(ch); + errorMsg = i18n("The unknown op-code %1 was encountered.").tqarg(ch); return; } /* end switch*/ } /* end else (ch not a SETCHAR or FNTNUM) */ diff --git a/kdvi/dviRenderer_export.cpp b/kdvi/dviRenderer_export.cpp index 7b875b45..2e862803 100644 --- a/kdvi/dviRenderer_export.cpp +++ b/kdvi/dviRenderer_export.cpp @@ -61,8 +61,8 @@ void dviRenderer::exportPDF() // has been called meanwhile. See also the exportPS method. if (proc != 0) { // Make sure all further output of the programm is ignored - qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); - qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); proc = 0; } @@ -94,33 +94,33 @@ void dviRenderer::exportPDF() // Generate a suggestion for a reasonable file name TQString suggestedName = dviFile->filename; - suggestedName = suggestedName.left(suggestedName.find(".")) + ".pdf"; + suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".pdf"; - TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), parentWidget, i18n("Export File As")); + TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.pdf|Portable Document Format (*.pdf)"), tqparentWidget, i18n("Export File As")); if (fileName.isEmpty()) return; TQFileInfo finfo(fileName); if (finfo.exists()) { - int r = KMessageBox::warningContinueCancel (parentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName), + int r = KMessageBox::warningContinueCancel (tqparentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), i18n("Overwrite File"), i18n("Overwrite")); if (r == KMessageBox::Cancel) return; } // Initialize the progress dialog - progress = new fontProgressDialog( TQString::null, + progress = new fontProgressDialog( TQString(), i18n("Using dvipdfm to export the file to PDF"), - TQString::null, + TQString(), i18n("KDVI is currently using the external program 'dvipdfm' to " "convert your DVI-file to PDF. Sometimes that can take " "a while because dvipdfm needs to generate its own bitmap fonts " "Please be patient."), i18n("Waiting for dvipdfm to finish..."), - parentWidget, i18n("dvipdfm progress dialog"), false ); + tqparentWidget, i18n("dvipdfm progress dialog"), false ); if (progress != 0) { progress->TextLabel2->setText( i18n("Please be patient") ); progress->setTotalSteps( dviFile->total_pages ); - qApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm())); + tqApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm())); } proc = new KShellProcess(); @@ -128,21 +128,21 @@ void dviRenderer::exportPDF() kdError(4300) << "Could not allocate ShellProcess for the dvipdfm command." << endl; return; } - qApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 ); + tqApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 ); - qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); + tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); export_errorString = i18n("<qt>The external program 'dvipdf', which was used to export the file, reported an error. " "You might wish to look at the <strong>document info dialog</strong> which you will " "find in the File-Menu for a precise error report.</qt>") ; - info->clear(i18n("Export: %1 to PDF").arg(KShellProcess::quote(dviFile->filename))); + info->clear(i18n("Export: %1 to PDF").tqarg(KShellProcess::quote(dviFile->filename))); proc->clearArguments(); finfo.setFile(dviFile->filename); - *proc << TQString("cd %1; dvipdfm").arg(KShellProcess::quote(finfo.dirPath(true))); - *proc << TQString("-o %1").arg(KShellProcess::quote(fileName)); + *proc << TQString("cd %1; dvipdfm").tqarg(KShellProcess::quote(finfo.dirPath(true))); + *proc << TQString("-o %1").tqarg(KShellProcess::quote(fileName)); *proc << KShellProcess::quote(dviFile->filename); proc->closeStdin(); if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { @@ -167,8 +167,8 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin // enough to ignore the exit status of the editor if another command // has been called meanwhile. See also the exportPDF method. if (proc != 0) { - qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); - qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); + tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); proc = 0; } @@ -177,7 +177,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin return; if (dviFile->numberOfExternalNONPSFiles != 0) { - KMessageBox::sorry( parentWidget, + KMessageBox::sorry( tqparentWidget, i18n("<qt><P>This DVI file refers to external graphic files which are not in PostScript format, and cannot be handled by the " "<strong>dvips</strong> program that KDVI uses interally to print or to export to PostScript. The functionality that " "you require is therefore unavailable in this version of KDVI.</p>" @@ -193,14 +193,14 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin if (fname.isEmpty()) { // Generate a suggestion for a reasonable file name TQString suggestedName = dviFile->filename; - suggestedName = suggestedName.left(suggestedName.find(".")) + ".ps"; + suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".ps"; - fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), parentWidget, i18n("Export File As")); + fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), tqparentWidget, i18n("Export File As")); if (fileName.isEmpty()) return; TQFileInfo finfo(fileName); if (finfo.exists()) { - int r = KMessageBox::warningYesNo (parentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName), + int r = KMessageBox::warningYesNo (tqparentWidget, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), i18n("Overwrite File")); if (r == KMessageBox::No) return; @@ -211,19 +211,19 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin export_printer = printer; // Initialize the progress dialog - progress = new fontProgressDialog( TQString::null, + progress = new fontProgressDialog( TQString(), i18n("Using dvips to export the file to PostScript"), - TQString::null, + TQString(), i18n("KDVI is currently using the external program 'dvips' to " "convert your DVI-file to PostScript. Sometimes that can take " "a while because dvips needs to generate its own bitmap fonts " "Please be patient."), i18n("Waiting for dvips to finish..."), - parentWidget, i18n("dvips progress dialog"), false ); + tqparentWidget, i18n("dvips progress dialog"), false ); if (progress != 0) { progress->TextLabel2->setText( i18n("Please be patient") ); progress->setTotalSteps( dviFile->total_pages ); - qApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm())); + tqApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm())); } // There is a major problem with dvips, at least 5.86 and lower: the @@ -263,10 +263,10 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin newFile.renumber(); // Remove any page size information from the file - Q_UINT16 currPageSav = current_page; + TQ_UINT16 currPageSav = current_page; dvifile *dvsav = dviFile; dviFile = &newFile; - errorMsg = TQString::null; + errorMsg = TQString(); for(current_page=0; current_page < newFile.total_pages; current_page++) { @@ -294,23 +294,23 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin return; } - qApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); - qApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); + tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); + tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); export_errorString = i18n("<qt>The external program 'dvips', which was used to export the file, reported an error. " "You might wish to look at the <strong>document info dialog</strong> which you will " "find in the File-Menu for a precise error report.</qt>") ; - info->clear(i18n("Export: %1 to PostScript").arg(KShellProcess::quote(dviFile->filename))); + info->clear(i18n("Export: %1 to PostScript").tqarg(KShellProcess::quote(dviFile->filename))); proc->clearArguments(); TQFileInfo finfo(dviFile->filename); - *proc << TQString("cd %1; dvips").arg(KShellProcess::quote(finfo.dirPath(true))); + *proc << TQString("cd %1; dvips").tqarg(KShellProcess::quote(finfo.dirPath(true))); if (printer == 0) *proc << "-z"; // export Hyperlinks if (options.isEmpty() == false) *proc << options; - *proc << TQString("%1").arg(KShellProcess::quote(sourceFileName)); - *proc << TQString("-o %1").arg(KShellProcess::quote(fileName)); + *proc << TQString("%1").tqarg(KShellProcess::quote(sourceFileName)); + *proc << TQString("-o %1").tqarg(KShellProcess::quote(fileName)); proc->closeStdin(); if (proc->start(KProcess::NotifyOnExit, KProcess::Stderr) == false) { kdError(4300) << "dvips failed to start" << endl; @@ -341,7 +341,7 @@ void dviRenderer::dvips_terminated(KProcess *sproc) // export_errorString, does not correspond to sproc. In that case, // we ingore the return status silently. if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0)) - KMessageBox::error( parentWidget, export_errorString ); + KMessageBox::error( tqparentWidget, export_errorString ); if (export_printer != 0) export_printer->printFiles( TQStringList(export_fileName), true ); @@ -359,7 +359,7 @@ void dviRenderer::editorCommand_terminated(KProcess *sproc) // export_errorString, does not correspond to sproc. In that case, // we ingore the return status silently. if ((proc == sproc) && (sproc->normalExit() == true) && (sproc->exitStatus() != 0)) - KMessageBox::error( parentWidget, export_errorString ); + KMessageBox::error( tqparentWidget, export_errorString ); // Let's hope that this is not all too nasty... killing a // KShellProcess from a slot that was called from the KShellProcess diff --git a/kdvi/dviRenderer_prescan.cpp b/kdvi/dviRenderer_prescan.cpp index d0c35bbd..5ed49ebc 100644 --- a/kdvi/dviRenderer_prescan.cpp +++ b/kdvi/dviRenderer_prescan.cpp @@ -40,7 +40,7 @@ extern void parse_special_argument(const TQString& strg, const char* argument_na //#define DEBUG_PRESCAN -void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) +void dviRenderer::prescan_embedPS(char *cp, TQ_UINT8 *beginningOfSpecialCommand) { #ifdef DEBUG_PRESCAN kdDebug(4300) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl; @@ -60,7 +60,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename = include_command; - EPSfilename.truncate(EPSfilename.find(' ')); + EPSfilename.truncate(EPSfilename.tqfind(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -84,8 +84,8 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) TQString originalFName = EPSfilename; - embedPS_progress->setLabel(i18n("Embedding %1").arg(EPSfilename)); - qApp->processEvents(); + embedPS_progress->setLabel(i18n("Embedding %1").tqarg(EPSfilename)); + tqApp->processEvents(); // Now locate the Gfx file on the hard disk... @@ -97,14 +97,14 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) if (!TQFile::exists(EPSfilename)) { // Find the number of the page - Q_UINT32 currentOffset = beginningOfSpecialCommand - dviFile->dvi_Data(); - Q_UINT16 page; + TQ_UINT32 currentOffset = beginningOfSpecialCommand - dviFile->dvi_Data(); + TQ_UINT16 page; for(page=0; page < dviFile->total_pages; page++) if ((dviFile->page_offset[page] <= currentOffset) && (currentOffset <= dviFile->page_offset[page+1])) break; - errorMsg += i18n("Page %1: The PostScript file <strong>%2</strong> could not be found.<br>").arg(page+1).arg(originalFName); + errorMsg += i18n("Page %1: The PostScript file <strong>%2</strong> could not be found.<br>").tqarg(page+1).tqarg(originalFName); embedPS_progress->progressBar()->advance(1); - qApp->processEvents(); + tqApp->processEvents(); return; } @@ -118,7 +118,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.find(' ')); + include_command = include_command.mid(include_command.tqfind(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -128,16 +128,16 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) parse_special_argument(include_command, "rhi=", &rhi); parse_special_argument(include_command, "angle=", &angle); - int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise + int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise // Generate the PostScript commands to be included - TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").arg(llx).arg(lly).arg(urx).arg(ury); + TQString PS = TQString("ps: @beginspecial %1 @llx %2 @lly %3 @urx %4 @ury").tqarg(llx).tqarg(lly).tqarg(urx).tqarg(ury); if (rwi != 0) - PS.append( TQString(" %1 @rwi").arg(rwi) ); + PS.append( TQString(" %1 @rwi").tqarg(rwi) ); if (rhi != 0) - PS.append( TQString(" %1 @rhi").arg(rhi) ); + PS.append( TQString(" %1 @rhi").tqarg(rhi) ); if (angle != 0) - PS.append( TQString(" %1 @angle").arg(angle) ); + PS.append( TQString(" %1 @angle").tqarg(angle) ); if (clip != -1) PS.append(" @clip"); PS.append( " @setspecial\n" ); @@ -156,13 +156,13 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) _isModified = true; - Q_UINT32 lengthOfOldSpecial = command_pointer - beginningOfSpecialCommand; - Q_UINT32 lengthOfNewSpecial = PS.length()+5; + TQ_UINT32 lengthOfOldSpecial = command_pointer - beginningOfSpecialCommand; + TQ_UINT32 lengthOfNewSpecial = PS.length()+5; - TQMemArray<Q_UINT8> newDVI(dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial); + TQMemArray<TQ_UINT8> newDVI(dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial); - Q_UINT8 *commandPtrSav = command_pointer; - Q_UINT8 *endPtrSav = end_pointer; + TQ_UINT8 *commandPtrSav = command_pointer; + TQ_UINT8 *endPtrSav = end_pointer; end_pointer = newDVI.data() + dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial; memcpy(newDVI.data(), dviFile->dvi_Data(), beginningOfSpecialCommand-dviFile->dvi_Data()); command_pointer = newDVI.data()+(beginningOfSpecialCommand-dviFile->dvi_Data()); @@ -176,12 +176,12 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) // Adjust page pointers in the DVI file dviFile->size_of_file = dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial; end_pointer = newDVI.data() + dviFile->size_of_file; - Q_UINT32 currentOffset = beginningOfSpecialCommand-dviFile->dvi_Data(); - for(Q_UINT16 i=0; i < dviFile->total_pages; i++) { + TQ_UINT32 currentOffset = beginningOfSpecialCommand-dviFile->dvi_Data(); + for(TQ_UINT16 i=0; i < dviFile->total_pages; i++) { if (dviFile->page_offset[i] > currentOffset) { dviFile->page_offset[i] = dviFile->page_offset[i] + lengthOfNewSpecial-lengthOfOldSpecial; command_pointer = dviFile->page_offset[i] + newDVI.data() + 4*10 + 1; - Q_UINT32 a = readUINT32(); + TQ_UINT32 a = readUINT32(); if (a > currentOffset) { a = a + lengthOfNewSpecial-lengthOfOldSpecial; command_pointer = dviFile->page_offset[i] + newDVI.data() + 4*10 + 1; @@ -195,7 +195,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) dviFile->page_offset[dviFile->total_pages] = dviFile->beginning_of_postamble; command_pointer = newDVI.data() + dviFile->beginning_of_postamble + 1; - Q_UINT32 a = readUINT32(); + TQ_UINT32 a = readUINT32(); if (a > currentOffset) { a = a + lengthOfNewSpecial - lengthOfOldSpecial; command_pointer = newDVI.data() + dviFile->beginning_of_postamble + 1; @@ -219,12 +219,12 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand) dviFile->setNewData(newDVI); embedPS_progress->progressBar()->advance(1); - qApp->processEvents(); + tqApp->processEvents(); return; } -void dviRenderer::prescan_removePageSizeInfo(char *cp, Q_UINT8 *beginningOfSpecialCommand) +void dviRenderer::prescan_removePageSizeInfo(char *cp, TQ_UINT8 *beginningOfSpecialCommand) { #ifdef DEBUG_PRESCAN kdDebug(4300) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl; @@ -234,7 +234,7 @@ void dviRenderer::prescan_removePageSizeInfo(char *cp, Q_UINT8 *beginningOfSpeci if (strncasecmp(cp, "papersize=", 10) != 0) return; - for (Q_UINT8 *ptr=beginningOfSpecialCommand; ptr<command_pointer; ptr++) + for (TQ_UINT8 *ptr=beginningOfSpecialCommand; ptr<command_pointer; ptr++) *ptr = NOP; } @@ -252,7 +252,7 @@ void dviRenderer::prescan_ParsePapersizeSpecial(const TQString& _cp) dviFile->suggestedPageSize = new pageSize; dviFile->suggestedPageSize->setPageSize(cp); } else - printErrorMsgForSpecials(i18n("The papersize data '%1' could not be parsed.").arg(cp)); + printErrorMsgForSpecials(i18n("The papersize data '%1' could not be parsed.").tqarg(cp)); return; } @@ -262,7 +262,7 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp) { TQColor col = parseColorSpecification(cp.stripWhiteSpace()); if (col.isValid()) - for(Q_UINT16 page=current_page; page < dviFile->total_pages; page++) + for(TQ_UINT16 page=current_page; page < dviFile->total_pages; page++) PS_interface->setBackgroundColor(page, col); return; } @@ -271,7 +271,7 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp) void dviRenderer::prescan_ParseHTMLAnchorSpecial(const TQString& _cp) { TQString cp = _cp; - cp.truncate(cp.find('"')); + cp.truncate(cp.tqfind('"')); Length l; l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor)); anchorList[cp] = Anchor(current_page+1, l); @@ -297,7 +297,7 @@ void dviRenderer::prescan_ParsePSHeaderSpecial(const TQString& cp) } if (TQFile::exists(_file)) - PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").arg(_file) ); + PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").tqarg(_file) ); } @@ -321,7 +321,7 @@ void dviRenderer::prescan_ParsePSQuoteSpecial(const TQString& cp) double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; - PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) ); + PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( " @beginspecial @setspecial \n" ); PostScriptOutPutString->append( cp ); PostScriptOutPutString->append( " @endspecial \n" ); @@ -355,15 +355,15 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp) if (cp.startsWith("ps:SDict begin /product where{pop product(Distiller)")) return; // hyperref tries to work around Distiller bug if (cp.startsWith("ps:SDict begin [") && cp.endsWith(" pdfmark end")) { // hyperref definition of link/anchor/bookmark/etc - if (cp.contains("/DEST")) { // The PostScript code defines an anchor + if (cp.tqcontains("/DEST")) { // The PostScript code defines an anchor TQString anchorName = cp.section('(', 1, 1).section(')', 0, 0); Length l; l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor)); anchorList[anchorName] = Anchor(current_page+1, l); } // The PostScript code defines a bookmark - if (cp.contains("/Dest") && cp.contains("/Title")) - prebookmarks.append(PreBookmark(PDFencodingToQString(cp.section('(', 2, 2).section(')', 0, 0)), + if (cp.tqcontains("/Dest") && cp.tqcontains("/Title")) + prebookmarks.append(PreBookmark(PDFencodingToTQString(cp.section('(', 2, 2).section(')', 0, 0)), cp.section('(', 1, 1).section(')', 0, 0), cp.section('-', 1, 1).section(' ', 0, 0).toUInt() )); @@ -374,18 +374,18 @@ void dviRenderer::prescan_ParsePSSpecial(const TQString& cp) double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; - if (cp.find("ps::[begin]", 0, false) == 0) { - PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) ); - PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(11)) ); + if (cp.tqfind("ps::[begin]", 0, false) == 0) { + PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); + PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(11)) ); } else { - if (cp.find("ps::[end]", 0, false) == 0) { - PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(9)) ); + if (cp.tqfind("ps::[end]", 0, false) == 0) { + PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(9)) ); } else { - if (cp.find("ps::", 0, false) == 0) { - PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(4)) ); + if (cp.tqfind("ps::", 0, false) == 0) { + PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(4)) ); } else { - PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) ); - PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(3)) ); + PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); + PostScriptOutPutString->append( TQString(" %1\n").tqarg(cp.mid(3)) ); } } } @@ -406,7 +406,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename = include_command; - EPSfilename.truncate(EPSfilename.find(' ')); + EPSfilename.truncate(EPSfilename.tqfind(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -444,7 +444,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.find(' ')); + include_command = include_command.mid(include_command.tqfind(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -454,27 +454,27 @@ void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp) parse_special_argument(include_command, "rhi=", &rhi); parse_special_argument(include_command, "angle=", &angle); - int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise + int clip=include_command.tqfind(" clip"); // -1 if clip keyword is not present, >= 0 otherwise if (TQFile::exists(EPSfilename)) { double PS_H = (currinf.data.dvi_h*300.0)/(65536*1200)-300; double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300; - PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) ); + PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").tqarg(PS_H).tqarg(PS_V) ); PostScriptOutPutString->append( "@beginspecial " ); - PostScriptOutPutString->append( TQString(" %1 @llx").arg(llx) ); - PostScriptOutPutString->append( TQString(" %1 @lly").arg(lly) ); - PostScriptOutPutString->append( TQString(" %1 @urx").arg(urx) ); - PostScriptOutPutString->append( TQString(" %1 @ury").arg(ury) ); + PostScriptOutPutString->append( TQString(" %1 @llx").tqarg(llx) ); + PostScriptOutPutString->append( TQString(" %1 @lly").tqarg(lly) ); + PostScriptOutPutString->append( TQString(" %1 @urx").tqarg(urx) ); + PostScriptOutPutString->append( TQString(" %1 @ury").tqarg(ury) ); if (rwi != 0) - PostScriptOutPutString->append( TQString(" %1 @rwi").arg(rwi) ); + PostScriptOutPutString->append( TQString(" %1 @rwi").tqarg(rwi) ); if (rhi != 0) - PostScriptOutPutString->append( TQString(" %1 @rhi").arg(rhi) ); + PostScriptOutPutString->append( TQString(" %1 @rhi").tqarg(rhi) ); if (angle != 0) - PostScriptOutPutString->append( TQString(" %1 @angle").arg(angle) ); + PostScriptOutPutString->append( TQString(" %1 @angle").tqarg(angle) ); if (clip != -1) PostScriptOutPutString->append(" @clip"); PostScriptOutPutString->append( " @setspecial \n" ); - PostScriptOutPutString->append( TQString(" (%1) run\n").arg(EPSfilename) ); + PostScriptOutPutString->append( TQString(" (%1) run\n").tqarg(EPSfilename) ); PostScriptOutPutString->append( "@endspecial \n" ); } @@ -490,11 +490,11 @@ void dviRenderer::prescan_ParseSourceSpecial(const TQString& cp) // "src:123file.tex" to positions in the DVI file // extract the file name and the numeral part from the string - Q_UINT32 j; + TQ_UINT32 j; for(j=0;j<cp.length();j++) if (!cp.at(j).isNumber()) break; - Q_UINT32 sourceLineNumber = cp.left(j).toUInt(); + TQ_UINT32 sourceLineNumber = cp.left(j).toUInt(); TQFileInfo fi1(dviFile->filename); TQString sourceFileName = TQFileInfo(fi1.dir(), cp.mid(j).stripWhiteSpace()).absFilePath(); Length l; @@ -504,7 +504,7 @@ void dviRenderer::prescan_ParseSourceSpecial(const TQString& cp) } -void dviRenderer::prescan_parseSpecials(char *cp, Q_UINT8 *) +void dviRenderer::prescan_parseSpecials(char *cp, TQ_UINT8 *) { TQString special_command(cp); @@ -613,8 +613,8 @@ void dviRenderer::prescan(parseSpecials specialParser) if (resolutionInDPI == 0.0) setResolution(100); - Q_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0; - Q_UINT8 ch; + TQ_INT32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0; + TQ_UINT8 ch; double fontPixelPerDVIunit = dviFile->getCmPerDVIunit() * 1200.0/2.54; stack.clear(); @@ -631,9 +631,9 @@ void dviRenderer::prescan(parseSpecials specialParser) } if (FNTNUM0 <= ch && ch <= (unsigned char) (FNTNUM0 + 63)) { - currinf.fontp = currinf.fonttable->find(ch - FNTNUM0); + currinf.fontp = currinf.fonttable->tqfind(ch - FNTNUM0); if (currinf.fontp == NULL) { - errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").arg(ch - FNTNUM0); + errorMsg = i18n("The DVI code referred to font #%1, which was not previously defined.").tqarg(ch - FNTNUM0); return; } currinf.set_char_p = currinf.fontp->set_char_p; @@ -641,7 +641,7 @@ void dviRenderer::prescan(parseSpecials specialParser) } - Q_INT32 a, b; + TQ_INT32 a, b; switch (ch) { case SET1: @@ -718,7 +718,7 @@ void dviRenderer::prescan(parseSpecials specialParser) case DOWN3: case DOWN4: { - Q_INT32 DDtmp = readINT(ch - DOWN1 + 1); + TQ_INT32 DDtmp = readINT(ch - DOWN1 + 1); currinf.data.dvi_v += ((long) (DDtmp * 65536.0*fontPixelPerDVIunit))/65536; currinf.data.pxl_v = int(currinf.data.dvi_v/shrinkfactor); } @@ -750,7 +750,7 @@ void dviRenderer::prescan(parseSpecials specialParser) case FNT2: case FNT3: case FNT4: - currinf.fontp = currinf.fonttable->find(readUINT(ch - FNT1 + 1)); + currinf.fontp = currinf.fonttable->tqfind(readUINT(ch - FNT1 + 1)); if (currinf.fontp == NULL) return; currinf.set_char_p = currinf.fontp->set_char_p; @@ -761,7 +761,7 @@ void dviRenderer::prescan(parseSpecials specialParser) case XXX3: case XXX4: { - Q_UINT8 *beginningOfSpecialCommand = command_pointer-1; + TQ_UINT8 *beginningOfSpecialCommand = command_pointer-1; a = readUINT(ch - XXX1 + 1); if (a > 0) { char *cmd = new char[a+1]; diff --git a/kdvi/dviWidget.cpp b/kdvi/dviWidget.cpp index ddcac8e6..321f0f57 100644 --- a/kdvi/dviWidget.cpp +++ b/kdvi/dviWidget.cpp @@ -22,8 +22,8 @@ #include "renderedDviPagePixmap.h" #include "selection.h" -DVIWidget::DVIWidget(TQWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name) - : DocumentWidget(parent, sv, cache, name) +DVIWidget::DVIWidget(TQWidget* tqparent, PageView* sv, DocumentPageCache* cache, const char* name) + : DocumentWidget(tqparent, sv, cache, name) { } @@ -45,7 +45,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e) // Check if the mouse is pressed on a source-hyperlink // source hyperlinks can be invoked with the Middle Mousebutton or alternatively // with Control+Left Mousebutton - if ((e->button() == MidButton || (e->button() == LeftButton && (e->state() & ControlButton))) + if ((e->button() == Qt::MidButton || (e->button() == Qt::LeftButton && (e->state() & ControlButton))) && (pageData->sourceHyperLinkList.size() > 0)) { int minIndex = 0; @@ -53,7 +53,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e) for(unsigned int i=0; i<pageData->sourceHyperLinkList.size(); i++) { - if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) + if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) { emit(SRCLink(pageData->sourceHyperLinkList[i].linkText, e, this)); e->accept(); @@ -74,7 +74,7 @@ void DVIWidget::mousePressEvent(TQMouseEvent* e) e->accept(); } - // Call implementation from parent + // Call implementation from tqparent DocumentWidget::mousePressEvent(e); } @@ -99,7 +99,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e) // Check if the cursor hovers over a sourceHyperlink. for(unsigned int i=0; i<pageData->sourceHyperLinkList.size(); i++) { - if (pageData->sourceHyperLinkList[i].box.contains(e->pos())) { + if (pageData->sourceHyperLinkList[i].box.tqcontains(e->pos())) { clearStatusBarTimer.stop(); // The macro-package srcltx gives a special like "src:99 test.tex" @@ -112,7 +112,7 @@ void DVIWidget::mouseMoveEvent(TQMouseEvent* e) if (cp[i].isDigit() == false) break; - emit setStatusBarText( i18n("line %1 of %2").arg(cp.left(i)).arg(cp.mid(i).simplifyWhiteSpace()) ); + emit setStatusBarText( i18n("line %1 of %2").tqarg(cp.left(i)).tqarg(cp.mid(i).simplifyWhiteSpace()) ); return; } } diff --git a/kdvi/dviWidget.h b/kdvi/dviWidget.h index 5867b39e..864bb526 100644 --- a/kdvi/dviWidget.h +++ b/kdvi/dviWidget.h @@ -23,9 +23,10 @@ class textSelection; class DVIWidget : public DocumentWidget { Q_OBJECT + TQ_OBJECT public: - DVIWidget(TQWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name); + DVIWidget(TQWidget* tqparent, PageView* sv, DocumentPageCache* cache, const char* name); signals: void SRCLink(const TQString&, TQMouseEvent* e, DocumentWidget*); diff --git a/kdvi/dvisourcesplitter.cpp b/kdvi/dvisourcesplitter.cpp index e0d17aa1..baa0269a 100644 --- a/kdvi/dvisourcesplitter.cpp +++ b/kdvi/dvisourcesplitter.cpp @@ -31,7 +31,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const TQString &srclink, const TQ if ( filepart.left(4) == "src:" ) filepart = srclink.mid(4); //split first - Q_UINT32 max = filepart.length(), i = 0; + TQ_UINT32 max = filepart.length(), i = 0; for(i=0; i<max; ++i) if ( !filepart[i].isDigit()) break; linepart = filepart.left(i); filepart = filepart.mid(i); @@ -62,7 +62,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const TQString &srclink, const TQ { TQFileInfo tempInfo(m_fileInfo); TQString tempFileName = tempInfo.fileName(); - Q_UINT32 index, maxindex = linepart.length(); + TQ_UINT32 index, maxindex = linepart.length(); bool found = false; for ( index = 1; index < maxindex; ++index) { diff --git a/kdvi/dvisourcesplitter.h b/kdvi/dvisourcesplitter.h index 5253ce4a..35b84e7a 100644 --- a/kdvi/dvisourcesplitter.h +++ b/kdvi/dvisourcesplitter.h @@ -24,11 +24,11 @@ public: TQString filePath() { return m_fileInfo.absFilePath(); } bool fileExists() { return m_fileInfo.exists(); } - Q_UINT32 line() { return m_line; } + TQ_UINT32 line() { return m_line; } private: TQFileInfo m_fileInfo; - Q_UINT32 m_line; + TQ_UINT32 m_line; bool m_exists; }; #endif diff --git a/kdvi/examples/dvistd0.dvi b/kdvi/examples/dvistd0.dvi Binary files differindex ef73e604..654b617b 100644 --- a/kdvi/examples/dvistd0.dvi +++ b/kdvi/examples/dvistd0.dvi diff --git a/kdvi/fontEncoding.cpp b/kdvi/fontEncoding.cpp index 9f2d4de2..62905030 100644 --- a/kdvi/fontEncoding.cpp +++ b/kdvi/fontEncoding.cpp @@ -36,7 +36,7 @@ fontEncoding::fontEncoding(const TQString &encName) encFileName = encFileName.stripWhiteSpace(); if (encFileName.isEmpty()) { - kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName) << endl; + kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").tqarg(encName) << endl; return; } @@ -76,7 +76,7 @@ fontEncoding::fontEncoding(const TQString &encName) for(; i<256; i++) glyphNameVector[i] = ".notdef"; } else { - kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName) << endl; + kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").tqarg(encFileName) << endl; return; } diff --git a/kdvi/fontEncoding.h b/kdvi/fontEncoding.h index 8ce0d18b..b70cfdc5 100644 --- a/kdvi/fontEncoding.h +++ b/kdvi/fontEncoding.h @@ -20,7 +20,7 @@ * MetaFont fonts. A DVI file referres to a MetaFont font by giving an * at-most-8-character name, such as 'cmr10'. The DVI previewer would * then locate the associated PK font file (e.g. cmr10.600pk), load - * it, and retrieve the character shaped. + * it, and retrieve the character tqshaped. * * Today TeX is also used to access Type1 and TrueType fonts, which it * was never designed to do. As in the case of MetaFont font, the DVI @@ -48,7 +48,7 @@ * a different name and with a different encoding ---the map file * (fontMap.h) can probably see to that. * - * Summing up: this class contains 256 glyph names read from an + * Summing up: this class tqcontains 256 glyph names read from an * encoding file during the construction of this class. * * @author Stefan Kebekus <kebekus@kde.org> diff --git a/kdvi/fontEncodingPool.cpp b/kdvi/fontEncodingPool.cpp index 59b38167..4c00256f 100644 --- a/kdvi/fontEncodingPool.cpp +++ b/kdvi/fontEncodingPool.cpp @@ -18,7 +18,7 @@ fontEncodingPool::fontEncodingPool() fontEncoding *fontEncodingPool::findByName(const TQString &name) { - fontEncoding *ptr = dictionary.find( name ); + fontEncoding *ptr = dictionary.tqfind( name ); if (ptr == 0) { ptr = new fontEncoding(name); diff --git a/kdvi/fontMap.cpp b/kdvi/fontMap.cpp index 66d230d7..b285018b 100644 --- a/kdvi/fontMap.cpp +++ b/kdvi/fontMap.cpp @@ -26,7 +26,7 @@ fontMap::fontMap() // has, like kdvi (and unlike dvips), no built-in fonts. // Finding ps2pk.map is not easy. In teTeX < 3.0, the kpsewhich - // program REQUIRES the option "--format=dvips config". In teTeX = + // program RETQUIRES the option "--format=dvips config". In teTeX = // 3.0, the option "--format=map" MUST be used. Since there is no // way to give both options at the same time, there is seemingly no // other way than to try both options one after another. We use the @@ -78,7 +78,7 @@ fontMap::fontMap() encodingName = encodingName.mid(1); double slant = 0.0; - int i = line.find("SlantFont"); + int i = line.tqfind("SlantFont"); if (i >= 0) { bool ok; slant = line.left(i).section(' ', -1, -1 ,TQString::SectionSkipEmpty).toDouble(&ok); @@ -94,11 +94,11 @@ fontMap::fontMap() if (encodingName.endsWith(".enc")) entry.fontEncoding = encodingName; else - entry.fontEncoding = TQString::null; + entry.fontEncoding = TQString(); } file.close(); } else - kdError(4300) << TQString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName) << endl; + kdError(4300) << TQString("fontMap::fontMap(): The file '%1' could not be opened.").tqarg(map_fileName) << endl; #ifdef DEBUG_FONTMAP kdDebug(4300) << "FontMap file parsed. Results:" << endl; @@ -115,40 +115,40 @@ fontMap::fontMap() const TQString &fontMap::findFileName(const TQString &TeXName) { - TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName); + TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName); if (it != fontMapEntries.end()) return it.data().fontFileName; else - return TQString::null; + return TQString(); } const TQString &fontMap::findFontName(const TQString &TeXName) { - TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName); + TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName); if (it != fontMapEntries.end()) return it.data().fullFontName; else - return TQString::null; + return TQString(); } const TQString &fontMap::findEncoding(const TQString &TeXName) { - TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName); + TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName); if (it != fontMapEntries.end()) return it.data().fontEncoding; else - return TQString::null; + return TQString(); } double fontMap::findSlant(const TQString &TeXName) { - TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName); + TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.tqfind(TeXName); if (it != fontMapEntries.end()) return it.data().slant; diff --git a/kdvi/fontMap.h b/kdvi/fontMap.h index 3e0177a8..6a719ea6 100644 --- a/kdvi/fontMap.h +++ b/kdvi/fontMap.h @@ -13,7 +13,7 @@ #include <tqstring.h> /** - * This class represents one line of a font map file, and contains + * This class represents one line of a font map file, and tqcontains * three pieces of information about a font: its file name, the full * name of the font, and the encoding. * @@ -55,7 +55,7 @@ class fontMapEntry { * Long time ago, when TeX was only used with MetaFont fonts, the DVI * file would specify a font by giving an 8-character name, such as * 'cmr10'. The DVI previewer would then locate the associated PK font - * file, load it, and retrieve the character shaped. Happy times, they + * file, load it, and retrieve the character tqshaped. Happy times, they * were. * * Today TeX is also used to access Type1 and TrueType fonts, which do @@ -92,17 +92,17 @@ class fontMap { /** find the name of a font file (e.g. 'ubkd8a.pfb') from a TeX font name (e.g. 'rpbkd'). This method return a reference to - TQString::null if the font could not be found. */ + TQString() if the font could not be found. */ const TQString &findFileName(const TQString &TeXName); /** find the name of a font (e.g. 'URWBookmanL-DemiBold') from a TeX font name (e.g. 'rpbkd'). This method return a reference to - TQString::null if the font could not be found. */ + TQString() if the font could not be found. */ const TQString &findFontName(const TQString &TeXName); /** find the name of an encoding file for a font (e.g. '8r') from a TeX font name (e.g. 'rpbkd'). This method return a reference to - TQString::null if the font could not be found. */ + TQString() if the font could not be found. */ const TQString &findEncoding(const TQString &TeXName); /** This method finds the slant of a font. Returns 0.0 if no slant diff --git a/kdvi/fontpool.cpp b/kdvi/fontpool.cpp index fecd2b0b..32b75afd 100644 --- a/kdvi/fontpool.cpp +++ b/kdvi/fontpool.cpp @@ -46,7 +46,7 @@ fontPool::fontPool() i18n( "KDVI is currently generating bitmap fonts..." ), i18n( "Aborts the font generation. Don't do this." ), i18n( "KDVI is currently generating bitmap fonts which are needed to display your document. " - "For this, KDVI uses a number of external programs, such as MetaFont. You can find " + "For this, KDVI uses a number of external programs, such as MetaFont. You can tqfind " "the output of these programs later in the document info dialog." ), i18n( "KDVI is generating fonts. Please wait." ), 0 ) @@ -60,7 +60,7 @@ fontPool::fontPool() displayResolution_in_dpi = 100.0; // A not-too-bad-default useFontHints = true; CMperDVIunit = 0; - extraSearchPath = TQString::null; + extraSearchPath = TQString(); fontList.setAutoDelete(true); @@ -77,30 +77,30 @@ fontPool::fontPool() // pixmaps. Experiments show that --depending of the configuration // of QT at compile and runtime or the availability of the XFt // extension, alpha channels are either supported, or silently - // converted to 1-bit masks. + // converted to 1-bit tqmasks. TQImage start(1, 1, 32); // Generate a 1x1 image, black with alpha=0x10 start.setAlphaBuffer(true); - Q_UINT32 *destScanLine = (Q_UINT32 *)start.scanLine(0); + TQ_UINT32 *destScanLine = (TQ_UINT32 *)start.scanLine(0); *destScanLine = 0x80000000; TQPixmap intermediate(start); TQPixmap dest(1,1); - dest.fill(Qt::white); + dest.fill(TQt::white); TQPainter paint( &dest ); paint.drawPixmap(0, 0, intermediate); paint.end(); start = dest.convertToImage().convertDepth(32); - Q_UINT8 result = *(start.scanLine(0)) & 0xff; + TQ_UINT8 result = *(start.scanLine(0)) & 0xff; if ((result == 0xff) || (result == 0x00)) { #ifdef DEBUG_FONTPOOL kdDebug(4300) << "fontPool::fontPool(): TQPixmap does not support the alpha channel" << endl; #endif - QPixmapSupportsAlpha = false; + TQPixmapSupportsAlpha = false; } else { #ifdef DEBUG_FONTPOOL kdDebug(4300) << "fontPool::fontPool(): TQPixmap supports the alpha channel" << endl; #endif - QPixmapSupportsAlpha = true; + TQPixmapSupportsAlpha = true; } } @@ -137,7 +137,7 @@ void fontPool::setParameters( bool _useFontHints ) } -TeXFontDefinition* fontPool::appendx(const TQString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement) +TeXFontDefinition* fontPool::appendx(const TQString& fontname, TQ_UINT32 checksum, TQ_UINT32 scale, double enlargement) { // Reuse font if possible: check if a font with that name and // natural resolution is already in the fontpool, and use that, if @@ -187,12 +187,12 @@ TQString fontPool::status() text.append("<table WIDTH=\"100%\" NOSAVE >"); text.append( TQString("<tr><td><b>%1</b></td> <td><b>%2</b></td> <td><b>%3</b></td> <td><b>%4</b> <td><b>%5</b></td> <td><b>%6</b></td></tr>") - .arg(i18n("TeX Name")) - .arg(i18n("Family")) - .arg(i18n("Zoom")) - .arg(i18n("Type")) - .arg(i18n("Encoding")) - .arg(i18n("Comment")) ); + .tqarg(i18n("TeX Name")) + .tqarg(i18n("Family")) + .tqarg(i18n("Zoom")) + .tqarg(i18n("Type")) + .tqarg(i18n("Encoding")) + .tqarg(i18n("Comment")) ); TeXFontDefinition *fontp = fontList.first(); while ( fontp != 0 ) { @@ -210,12 +210,12 @@ TQString fontPool::status() #ifdef HAVE_FREETYPE tmp << TQString ("<tr><td>%1</td> <td>%2</td> <td>%3%</td> <td>%4</td> <td>%5</td> <td>%6</td></tr>") - .arg(fontp->fontname) - .arg(fontp->getFullFontName()) - .arg((int)(fontp->enlargement*100 + 0.5)) - .arg(fontp->getFontTypeName()) - .arg(encoding) - .arg(errMsg); + .tqarg(fontp->fontname) + .tqarg(fontp->getFullFontName()) + .tqarg((int)(fontp->enlargement*100 + 0.5)) + .tqarg(fontp->getFontTypeName()) + .tqarg(encoding) + .tqarg(errMsg); #endif fontp=fontList.next(); @@ -252,7 +252,7 @@ bool fontPool::areFontsLocated() void fontPool::locateFonts() { - kpsewhichOutput = TQString::null; + kpsewhichOutput = TQString(); // First, we try and find those fonts which exist on disk // already. If virtual fonts are found, they will add new fonts to @@ -280,7 +280,7 @@ void fontPool::locateFonts() // present an error message to the user. if (!areFontsLocated()) { markFontsAsLocated(); - TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput); + TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").tqarg(getenv("PATH")).tqarg(kpsewhichOutput); KMessageBox::detailedError( 0, i18n("<qt><p>KDVI was not able to locate all the font files " "which are necessary to display the current DVI file. " "Your document might be unreadable.</p></qt>"), @@ -304,7 +304,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo // If PK fonts are generated, the kpsewhich command will re-route // the output of MetaFont into its stderr. Here we make sure this // output is intercepted and parsed. - qApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + tqApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(mf_output_receiver(KProcess *, char *, int))); @@ -323,24 +323,24 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo shellProcessCmdLine += "--no-mktex pk"; // Names of fonts that shall be located - Q_UINT16 numFontsInJob = 0; + TQ_UINT16 numFontsInJob = 0; TeXFontDefinition *fontp = fontList.first(); while ( fontp != 0 ) { if (!fontp->isLocated()) { numFontsInJob++; if (locateTFMonly == true) - shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").arg(fontp->fontname)); + shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").tqarg(fontp->fontname)); else { #ifdef HAVE_FREETYPE if (FreeType_could_be_loaded == true) { const TQString &filename = fontsByTeXName.findFileName(fontp->fontname); if (!filename.isEmpty()) - shellProcessCmdLine += KShellProcess::quote(TQString("%1").arg(filename)); + shellProcessCmdLine += KShellProcess::quote(TQString("%1").tqarg(filename)); } #endif - shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").arg(fontp->fontname)); - shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").arg(fontp->fontname)); + shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").tqarg(fontp->fontname)); + shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").tqarg(fontp->fontname)); } } fontp=fontList.next(); @@ -352,7 +352,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo progress.setTotalSteps(numFontsInJob, &kpsewhichIO); // Now run... kpsewhich. In case of error, kick up a fuss. - MetafontOutput = TQString::null; + MetafontOutput = TQString(); kpsewhichOutput += "<p><b>"+shellProcessCmdLine.join(" ")+"</b></p>"; kpsewhichIO << shellProcessCmdLine; TQString importanceOfKPSEWHICH = i18n("<p>KDVI relies on the <b>kpsewhich</b> program to locate font files " @@ -363,7 +363,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo "and your document might by unreadable. If this error is reproducable " "please report the issue to the KDVI developers using the 'Help' menu.<p>" ); TQApplication::restoreOverrideCursor(); - KMessageBox::error( 0, TQString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg), + KMessageBox::error( 0, TQString("<qt>%1%2</qt>").tqarg(importanceOfKPSEWHICH).tqarg(msg), i18n("Problem locating fonts - KDVI") ); markFontsAsLocated(); return; @@ -374,7 +374,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo // updated. This is important, e.g. for the progress dialog that is // shown when PK fonts are generated by MetaFont. while(kpsewhichIO.wait(1) == false) - qApp->processEvents(); + tqApp->processEvents(); progress.hide(); // Handle fatal errors. @@ -399,9 +399,9 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo "typesetting system. If TeX is not installed on your system, you could install the TeTeX distribution (www.tetex.org). " "If you are sure that TeX is installed, please try to use the kpsewhich program from the command line to check if it " "really works.</p>"); - TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput); + TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").tqarg(getenv("PATH")).tqarg(kpsewhichOutput); - KMessageBox::detailedError( 0, TQString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg), details, + KMessageBox::detailedError( 0, TQString("<qt>%1%2</qt>").tqarg(importanceOfKPSEWHICH).tqarg(msg), details, i18n("Problem locating fonts - KDVI") ); // This makes sure the we don't try to run kpsewhich again markFontsAsLocated(); @@ -558,36 +558,36 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen) // We'd like to print only full lines of text. int numleft; bool show_prog = false; - while( (numleft = MetafontOutput.find('\n')) != -1) { + while( (numleft = MetafontOutput.tqfind('\n')) != -1) { TQString line = MetafontOutput.left(numleft+1); #ifdef DEBUG_FONTPOOL kdDebug(4300) << "MF OUTPUT RECEIVED: " << line; #endif // Search for a line which marks the beginning of a MetaFont run // and show the progress dialog at the end of this method. - if (line.find("kpathsea:") == 0) + if (line.tqfind("kpathsea:") == 0) show_prog = true; // If the Output of the kpsewhich program contains a line starting // with "kpathsea:", this means that a new MetaFont-run has been // started. We filter these lines out and update the display // accordingly. - int startlineindex = line.find("kpathsea:"); + int startlineindex = line.tqfind("kpathsea:"); if (startlineindex != -1) { - int endstartline = line.find("\n",startlineindex); + int endstartline = line.tqfind("\n",startlineindex); TQString startLine = line.mid(startlineindex,endstartline-startlineindex); // The last word in the startline is the name of the font which we // are generating. The second-to-last word is the resolution in // dots per inch. Display this info in the text label below the // progress bar. - int lastblank = startLine.findRev(' '); + int lastblank = startLine.tqfindRev(' '); TQString fontName = startLine.mid(lastblank+1); - int secondblank = startLine.findRev(' ',lastblank-1); + int secondblank = startLine.tqfindRev(' ',lastblank-1); TQString dpi = startLine.mid(secondblank+1,lastblank-secondblank-1); progress.show(); - progress.increaseNumSteps( i18n("Currently generating %1 at %2 dpi").arg(fontName).arg(dpi) ); + progress.increaseNumSteps( i18n("Currently generating %1 at %2 dpi").tqarg(fontName).tqarg(dpi) ); } MetafontOutput = MetafontOutput.remove(0,numleft+1); } diff --git a/kdvi/fontpool.h b/kdvi/fontpool.h index 3edcaffe..753f95e1 100644 --- a/kdvi/fontpool.h +++ b/kdvi/fontpool.h @@ -38,6 +38,7 @@ class KShellProcess; class fontPool : public TQObject { Q_OBJECT + TQ_OBJECT public: // Default constructor. @@ -78,7 +79,7 @@ public: // called. Since this is done using a concurrently running process, // there is no guarantee that the loading is already performed when // the method returns. - TeXFontDefinition* appendx(const TQString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement); + TeXFontDefinition* appendx(const TQString& fontname, TQ_UINT32 checksum, TQ_UINT32 scale, double enlargement); // Returns a string in a very basic HTML format which describes the // fonts in the pool. @@ -124,10 +125,10 @@ public: channel of pixmaps. Experiments show that --depending of the configuration of QT at compile and runtime or the availability of the XFt extension, alpha channels are either supported, or - silently converted to 1-bit masks. The redering routines in the + silently converted to 1-bit tqmasks. The redering routines in the TeXFont implementation use this flag to choose the apropriate drawing routines for the different setups. */ - bool QPixmapSupportsAlpha; + bool TQPixmapSupportsAlpha; signals: /** Passed through to the top-level kpart. */ @@ -178,13 +179,13 @@ private: void locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFound=0); // This TQString is used internally by the mf_output_receiver() - // method. This string is set to TQString::null in locateFonts(bool, + // method. This string is set to TQString() in locateFonts(bool, // bool, bool *). Values are set and read by the // mf_output_receiver(...) method TQString MetafontOutput; // This TQString is used to collect the output of kpsewhich and - // MetaFont. The string is set to TQString::null in the + // MetaFont. The string is set to TQString() in the // locateFonts()-method, and content is gathered by the // mf_output_receiver(). This string is used by locateFonts() and // locateFonts(bool, bool, bool *) to display error messages. diff --git a/kdvi/fontprogress.cpp b/kdvi/fontprogress.cpp index e5e34270..19fe63cd 100644 --- a/kdvi/fontprogress.cpp +++ b/kdvi/fontprogress.cpp @@ -22,11 +22,11 @@ #include <tqvbox.h> /* - * Constructs a fontProgressDialog which is a child of 'parent', with the + * Constructs a fontProgressDialog which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' */ -fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip, TQWidget* parent, const TQString& name, bool progressbar) - : KDialogBase( parent, "Font Generation Progress Dialog", true, name, Cancel, Cancel, true ) +fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip, TQWidget* tqparent, const TQString& name, bool progressbar) + : KDialogBase( tqparent, "Font Generation Progress Dialog", true, name, Cancel, Cancel, true ) { setCursor( TQCursor( 3 ) ); @@ -42,7 +42,7 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString TQVBox *page = makeVBoxMainWidget(); TextLabel1 = new TQLabel( label, page, "TextLabel2" ); - TextLabel1->setAlignment( int( TQLabel::AlignCenter ) ); + TextLabel1->tqsetAlignment( int( TQLabel::AlignCenter ) ); TQWhatsThis::add( TextLabel1, whatsThis ); TQToolTip::add( TextLabel1, ttip ); @@ -55,13 +55,13 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString ProgressBar1 = NULL; TextLabel2 = new TQLabel( "", page, "TextLabel2" ); - TextLabel2->setAlignment( int( TQLabel::AlignCenter ) ); + TextLabel2->tqsetAlignment( int( TQLabel::AlignCenter ) ); TQWhatsThis::add( TextLabel2, whatsThis ); TQToolTip::add( TextLabel2, ttip ); progress = 0; procIO = 0; - qApp->connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(killProcIO())); + tqApp->connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(killProcIO())); } @@ -71,7 +71,7 @@ fontProgressDialog::fontProgressDialog(const TQString& helpIndex, const TQString fontProgressDialog::~fontProgressDialog() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } diff --git a/kdvi/fontprogress.h b/kdvi/fontprogress.h index 6f4267cc..6c19520c 100644 --- a/kdvi/fontprogress.h +++ b/kdvi/fontprogress.h @@ -31,10 +31,11 @@ class TQLabel; class fontProgressDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: fontProgressDialog( const TQString& helpIndex, const TQString& label, const TQString& abortTip, const TQString& whatsThis, const TQString& ttip, - TQWidget* parent = 0, const TQString &name = 0, bool progressbar=true ); + TQWidget* tqparent = 0, const TQString &name = 0, bool progressbar=true ); ~fontProgressDialog(); /** The number of steps already done is increased, the text received @@ -43,7 +44,7 @@ public: /** Used to initialize the progress bar. If the argument proc is non-zero, the associated process will be killed when the "abort" - button is pressed. The FontProgress uses a QGuarderPtr + button is pressed. The FontProgress uses a TQGuarderPtr internally, so it is save to delete the KProcIO anytime. */ void setTotalSteps(int, KProcIO *proc=0); diff --git a/kdvi/glyph.h b/kdvi/glyph.h index 65f86327..2265c6df 100644 --- a/kdvi/glyph.h +++ b/kdvi/glyph.h @@ -8,8 +8,8 @@ struct bitmap { - Q_UINT16 w, h; /* width and height in pixels */ - Q_UINT16 bytes_wide; /* scan-line width in bytes */ + TQ_UINT16 w, h; /* width and height in pixels */ + TQ_UINT16 bytes_wide; /* scan-line width in bytes */ char *bits; /* pointer to the bits */ }; @@ -24,7 +24,7 @@ class glyph { TQColor color; // DVI units to move reference point - Q_INT32 dvi_advance_in_units_of_design_size_by_2e20; + TQ_INT32 dvi_advance_in_units_of_design_size_by_2e20; // x and y offset in pixels short x, y; diff --git a/kdvi/infodialog.cpp b/kdvi/infodialog.cpp index 91de53d3..b287a390 100644 --- a/kdvi/infodialog.cpp +++ b/kdvi/infodialog.cpp @@ -21,8 +21,8 @@ #include "fontpool.h" #include "infodialog.h" -infoDialog::infoDialog( TQWidget* parent ) - : KDialogBase( Tabbed, i18n("Document Info"), Ok, Ok, parent, "Document Info", false, false) +infoDialog::infoDialog( TQWidget* tqparent ) + : KDialogBase( Tabbed, i18n("Document Info"), Ok, Ok, tqparent, "Document Info", false, false) { TQFrame *page1 = addPage( i18n("DVI File") ); TQVBoxLayout *topLayout1 = new TQVBoxLayout( page1, 0, 6 ); @@ -51,8 +51,8 @@ infoDialog::infoDialog( TQWidget* parent ) topLayout3->addWidget( TextLabel3 ); MFOutputReceived = false; - headline = TQString::null; - pool = TQString::null; + headline = TQString(); + pool = TQString(); } @@ -64,17 +64,17 @@ void infoDialog::setDVIData(dvifile *dviFile) text = i18n("There is no DVI file loaded at the moment."); else { text.append("<table WIDTH=\"100%\" NOSAVE >"); - text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Filename")).arg(dviFile->filename)); + text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("Filename")).tqarg(dviFile->filename)); TQFile file(dviFile->filename); if (file.exists()) - text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("File Size")).arg(KIO::convertSize(file.size()))); + text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("File Size")).tqarg(KIO::convertSize(file.size()))); else - text.append(TQString("<tr><td><b> </b></td> <td>%1</td></tr>").arg(i18n("The file does no longer exist."))); + text.append(TQString("<tr><td><b> </b></td> <td>%1</td></tr>").tqarg(i18n("The file does no longer exist."))); text.append(TQString("<tr><td><b> </b></td> <td> </td></tr>")); - text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("#Pages")).arg(dviFile->total_pages)); - text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Generator/Date")).arg(dviFile->generatorString)); + text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("#Pages")).tqarg(dviFile->total_pages)); + text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").tqarg(i18n("Generator/Date")).tqarg(dviFile->generatorString)); } // else (dviFile == NULL) TextLabel1->setText( text ); @@ -89,17 +89,17 @@ void infoDialog::setFontInfo(fontPool *fp) void infoDialog::outputReceiver(const TQString& _op) { TQString op = _op; - op = op.replace( TQRegExp("<"), "<" ); + op = op.tqreplace( TQRegExp("<"), "<" ); if (MFOutputReceived == false) { TextLabel3->setText("<b>"+headline+"</b><br>"); - headline = TQString::null; + headline = TQString(); } // It seems that the TQTextView wants that we append only full lines. // We see to that. pool = pool+op; - int idx = pool.findRev("\n"); + int idx = pool.tqfindRev("\n"); while(idx != -1) { TQString line = pool.left(idx); @@ -108,9 +108,9 @@ void infoDialog::outputReceiver(const TQString& _op) // If the Output of the kpsewhich program contains a line starting // with "kpathsea:", this means that a new MetaFont-run has been // started. We filter these lines out and print them in boldface. - int startlineindex = line.find("kpathsea:"); + int startlineindex = line.tqfind("kpathsea:"); if (startlineindex != -1) { - int endstartline = line.find("\n",startlineindex); + int endstartline = line.tqfind("\n",startlineindex); TQString startLine = line.mid(startlineindex,endstartline-startlineindex); if (MFOutputReceived) TextLabel3->append("<hr>\n<b>"+startLine+"</b>"); @@ -119,7 +119,7 @@ void infoDialog::outputReceiver(const TQString& _op) TextLabel3->append(line.mid(endstartline)); } else TextLabel3->append(line); - idx = pool.findRev("\n"); + idx = pool.tqfindRev("\n"); } MFOutputReceived = true; @@ -128,7 +128,7 @@ void infoDialog::outputReceiver(const TQString& _op) void infoDialog::clear(const TQString& op) { headline = op; - pool = TQString::null; + pool = TQString(); MFOutputReceived = false; } #include "infodialog.moc" diff --git a/kdvi/infodialog.h b/kdvi/infodialog.h index 8b3ea7d2..d7f37e56 100644 --- a/kdvi/infodialog.h +++ b/kdvi/infodialog.h @@ -20,9 +20,10 @@ class TQWidget; class infoDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - infoDialog( TQWidget* parent = 0 ); + infoDialog( TQWidget* tqparent = 0 ); /** This method is used to set the data coming from the DVI file. Note that 0 is a permissible argument, that just means: diff --git a/kdvi/kdvi_multipage.cpp b/kdvi/kdvi_multipage.cpp index 8a7b1f59..b1995b88 100644 --- a/kdvi/kdvi_multipage.cpp +++ b/kdvi/kdvi_multipage.cpp @@ -49,9 +49,9 @@ K_EXPORT_COMPONENT_FACTORY(kdvipart, KDVIMultiPageFactory) -KDVIMultiPage::KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, +KDVIMultiPage::KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args) - : KMultiPage(parentWidget, widgetName, parent, name), DVIRenderer(parentWidget) + : KMultiPage(tqparentWidget, widgetName, tqparent, name), DVIRenderer(tqparentWidget) { Q_UNUSED(args); #ifdef PERFORMANCE_MEASUREMENT @@ -141,27 +141,27 @@ void KDVIMultiPage::slotSave() // Try to guess the proper ending... TQString formats; TQString ending; - int rindex = m_file.findRev("."); + int rindex = m_file.tqfindRev("."); if (rindex == -1) { - ending = TQString::null; - formats = TQString::null; + ending = TQString(); + formats = TQString(); } else { ending = m_file.mid(rindex); // e.g. ".dvi" formats = fileFormats().grep(ending).join("\n"); } - TQString fileName = KFileDialog::getSaveFileName(TQString::null, formats, 0, i18n("Save File As")); + TQString fileName = KFileDialog::getSaveFileName(TQString(), formats, 0, i18n("Save File As")); if (fileName.isEmpty()) return; // Add the ending to the filename. I hope the user likes it that // way. - if (!ending.isEmpty() && fileName.find(ending) == -1) + if (!ending.isEmpty() && fileName.tqfind(ending) == -1) fileName = fileName+ending; if (TQFile(fileName).exists()) { - int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName), + int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), i18n("Overwrite File"), i18n("Overwrite")); if (r == KMessageBox::Cancel) return; @@ -213,7 +213,7 @@ void KDVIMultiPage::addConfigDialogs(KConfigDialog* configDialog) void KDVIMultiPage::preferencesChanged() { - // Call method from parent class + // Call method from tqparent class KMultiPage::preferencesChanged(); #ifdef KDVI_MULTIPAGE_DEBUG kdDebug(4300) << "preferencesChanged" << endl; @@ -239,7 +239,7 @@ void KDVIMultiPage::print() // Show the printer options dialog. Return immediately if the user // aborts. - if (!printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1)) )) + if (!printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) )) return; // This funny method call is necessary for the KPrinter to return @@ -256,7 +256,7 @@ void KDVIMultiPage::print() // Turn the results of the options requestor into a list arguments // which are used by dvips. - TQString dvips_options = TQString::null; + TQString dvips_options = TQString(); // Print in reverse order. if ( printer->pageOrder() == KPrinter::LastPageFirst ) dvips_options += "-r "; @@ -365,7 +365,7 @@ void KDVIMultiPage::print() default: break; } - // Orientation + // Qt::Orientation if ( printer->orientation() == KPrinter::Landscape ) dvips_options += "-t landscape "; @@ -379,7 +379,7 @@ void KDVIMultiPage::print() dvips_options += TQString(","); else commaflag = 1; - dvips_options += TQString("%1").arg(*it); + dvips_options += TQString("%1").tqarg(*it); } // Now print. For that, export the DVI-File to PostScript. Note that diff --git a/kdvi/kdvi_multipage.h b/kdvi/kdvi_multipage.h index c3e60aea..cbc7d125 100644 --- a/kdvi/kdvi_multipage.h +++ b/kdvi/kdvi_multipage.h @@ -12,9 +12,10 @@ class KPrinter; class KDVIMultiPage : public KMultiPage { Q_OBJECT + TQ_OBJECT public: - KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + KDVIMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args = TQStringList()); virtual ~KDVIMultiPage(); diff --git a/kdvi/main.cpp b/kdvi/main.cpp index af7bc928..50221ebe 100644 --- a/kdvi/main.cpp +++ b/kdvi/main.cpp @@ -77,14 +77,14 @@ int main(int argc, char** argv) if (!url.isValid()) { - kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl; + kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl; return -1; } if (!url.isLocalFile()) { kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " - "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl; + "files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl; return -1; } @@ -98,7 +98,7 @@ int main(int argc, char** argv) QCStringList apps = app.dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).find("kviewshell") == 0) + if ((*it).tqfind("kviewshell") == 0) { TQByteArray data, replyData; TQCString replyType; diff --git a/kdvi/optionDialogFontsWidget.cpp b/kdvi/optionDialogFontsWidget.cpp index 14a72ee2..60a52c66 100644 --- a/kdvi/optionDialogFontsWidget.cpp +++ b/kdvi/optionDialogFontsWidget.cpp @@ -21,10 +21,10 @@ #include "optionDialogFontsWidget.h" -// Constructs a optionDialogWidget_base which is a child of 'parent', with +// Constructs a optionDialogWidget_base which is a child of 'tqparent', with // the name 'name' and widget flags set to 'f'. -optionDialogFontsWidget::optionDialogFontsWidget( TQWidget* parent, const char* name, WFlags fl ) - : optionDialogFontsWidget_base( parent, name, fl ) +optionDialogFontsWidget::optionDialogFontsWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : optionDialogFontsWidget_base( tqparent, name, fl ) { #ifndef HAVE_FREETYPE kcfg_UseType1Fonts->setChecked(false); diff --git a/kdvi/optionDialogFontsWidget.h b/kdvi/optionDialogFontsWidget.h index f7ad740f..ce8c85f3 100644 --- a/kdvi/optionDialogFontsWidget.h +++ b/kdvi/optionDialogFontsWidget.h @@ -15,9 +15,10 @@ class optionDialogFontsWidget : public optionDialogFontsWidget_base { Q_OBJECT + TQ_OBJECT public: - optionDialogFontsWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + optionDialogFontsWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~optionDialogFontsWidget(); }; diff --git a/kdvi/optionDialogFontsWidget_base.ui b/kdvi/optionDialogFontsWidget_base.ui index da4ca601..22f7a119 100644 --- a/kdvi/optionDialogFontsWidget_base.ui +++ b/kdvi/optionDialogFontsWidget_base.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>optionDialogFontsWidget_base</class> <author>Stefan Kebekus</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>optionDialogFontsWidget_base</cstring> </property> @@ -20,7 +20,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_UseFontHints</cstring> </property> @@ -44,7 +44,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>121</height> @@ -56,9 +56,9 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<slots> +<Q_SLOTS> <slot>buttonGroup1_clicked(int)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/kdvi/optionDialogSpecialWidget.cpp b/kdvi/optionDialogSpecialWidget.cpp index 1b61e4a5..6c27b019 100644 --- a/kdvi/optionDialogSpecialWidget.cpp +++ b/kdvi/optionDialogSpecialWidget.cpp @@ -23,10 +23,10 @@ #include "prefs.h" -// Constructs a optionDialogWidget_base which is a child of 'parent', with +// Constructs a optionDialogWidget_base which is a child of 'tqparent', with // the name 'name' and widget flags set to 'f'. -optionDialogSpecialWidget::optionDialogSpecialWidget( TQWidget* parent, const char* name, WFlags fl ) - : optionDialogSpecialWidget_base( parent, name, fl ) +optionDialogSpecialWidget::optionDialogSpecialWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : optionDialogSpecialWidget_base( tqparent, name, fl ) { // Set up the list of known and supported editors editorNameString += i18n("User-Defined Editor"); diff --git a/kdvi/optionDialogSpecialWidget.h b/kdvi/optionDialogSpecialWidget.h index 0bdca8dd..42c16c27 100644 --- a/kdvi/optionDialogSpecialWidget.h +++ b/kdvi/optionDialogSpecialWidget.h @@ -15,9 +15,10 @@ class optionDialogSpecialWidget : public optionDialogSpecialWidget_base { Q_OBJECT + TQ_OBJECT public: - optionDialogSpecialWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + optionDialogSpecialWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~optionDialogSpecialWidget(); public slots: diff --git a/kdvi/optionDialogSpecialWidget_base.ui b/kdvi/optionDialogSpecialWidget_base.ui index 7aa36a26..62cb4f6d 100644 --- a/kdvi/optionDialogSpecialWidget_base.ui +++ b/kdvi/optionDialogSpecialWidget_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>optionDialogSpecialWidget_base</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>optionDialogSpecialWidget_base</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowPS</cstring> </property> @@ -33,7 +33,7 @@ <string>Some DVI files contain PostScript graphics. If enabled, KDVI will use the Ghostview PostScript interpreter to display these. You probably want to enable this option, unless you have a DVI-file whose PostScript part is broken, or too large for your machine.</string> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup3</cstring> </property> @@ -64,7 +64,7 @@ <p>Check the KDVI manual to see how to prepare DVI files which support the inverse search.</p></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -80,7 +80,7 @@ <string>Description:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -96,7 +96,7 @@ <string>Shell command:</string> </property> </widget> - <widget class="QLabel" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>editorDescription</cstring> </property> @@ -138,7 +138,7 @@ <string>If you are using inverse search, KDVI uses this command line to start the editor. The field '%f' is replaced with the filename, and '%l' is replaced with the line number.</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -169,7 +169,7 @@ <property name="text"> <string>What is 'inverse search'? </string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="url" stdset="0"> @@ -186,7 +186,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>390</width> <height>21</height> @@ -199,7 +199,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/kdvi/prebookmark.h b/kdvi/prebookmark.h index ef637a60..412652b9 100644 --- a/kdvi/prebookmark.h +++ b/kdvi/prebookmark.h @@ -34,8 +34,8 @@ the DVI prescan routines. class PreBookmark { public: - PreBookmark(const TQString& t, const TQString& a, Q_UINT16 n) {title=t; anchorName=a; noOfChildren=n;} - PreBookmark() {title=TQString::null; anchorName=TQString::null; noOfChildren=0;} + PreBookmark(const TQString& t, const TQString& a, TQ_UINT16 n) {title=t; anchorName=a; noOfChildren=n;} + PreBookmark() {title=TQString(); anchorName=TQString(); noOfChildren=0;} // Title of the bookmark TQString title; @@ -44,7 +44,7 @@ class PreBookmark TQString anchorName; // Number of subordinate bookmarks - Q_UINT16 noOfChildren; + TQ_UINT16 noOfChildren; }; #endif diff --git a/kdvi/psgs.cpp b/kdvi/psgs.cpp index 2c745a7c..31f9bfdc 100644 --- a/kdvi/psgs.cpp +++ b/kdvi/psgs.cpp @@ -28,8 +28,8 @@ extern const char psheader[]; pageInfo::pageInfo(const TQString& _PostScriptString) { PostScriptString = new TQString(_PostScriptString); - background = Qt::white; - permanentBackground = Qt::white; + background = TQt::white; + permanentBackground = TQt::white; } @@ -64,14 +64,14 @@ void ghostscript_interface::setPostScript(const PageNumber& page, const TQString kdDebug(4300) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl; #endif - if (pageList.find(page) == 0) { + if (pageList.tqfind(page) == 0) { pageInfo *info = new pageInfo(PostScript); // Check if dict is big enough if (pageList.count() > pageList.size() -2) pageList.resize(pageList.size()*2); pageList.insert(page, info); } else - *(pageList.find(page)->PostScriptString) = PostScript; + *(pageList.tqfind(page)->PostScriptString) = PostScript; } @@ -88,8 +88,8 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC kdDebug(4300) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl; #endif - if (pageList.find(page) == 0) { - pageInfo *info = new pageInfo(TQString::null); + if (pageList.tqfind(page) == 0) { + pageInfo *info = new pageInfo(TQString()); info->background = background_color; if (permanent) info->permanentBackground = background_color; @@ -98,9 +98,9 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQC pageList.resize(pageList.size()*2); pageList.insert(page, info); } else { - pageList.find(page)->background = background_color; + pageList.tqfind(page)->background = background_color; if (permanent) - pageList.find(page)->permanentBackground = background_color; + pageList.tqfind(page)->permanentBackground = background_color; } } @@ -109,10 +109,10 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page) #ifdef DEBUG_PSGS kdDebug(4300) << "ghostscript_interface::restoreBackgroundColor( " << page << " )" << endl; #endif - if (pageList.find(page) == 0) + if (pageList.tqfind(page) == 0) return; - pageInfo *info = pageList.find(page); + pageInfo *info = pageList.tqfind(page); info->background = info->permanentBackground; } @@ -124,10 +124,10 @@ TQColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const kdDebug(4300) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl; #endif - if (pageList.find(page) == 0) - return Qt::white; + if (pageList.tqfind(page) == 0) + return TQt::white; else - return pageList.find(page)->background; + return pageList.tqfind(page)->background; } @@ -151,11 +151,11 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co emit(setStatusBarText(i18n("Generating PostScript graphics..."))); - pageInfo *info = pageList.find(page); + pageInfo *info = pageList.tqfind(page); // Generate a PNG-file // Step 1: Write the PostScriptString to a File - KTempFile PSfile(TQString::null,".ps"); + KTempFile PSfile(TQString(),".ps"); TQTextStream& os = *PSfile.textStream(); os << "%!PS-Adobe-2.0\n" @@ -165,18 +165,18 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co << "%%PageOrder: Ascend\n" // HSize and VSize in 1/72 inch << "%%BoundingBox: 0 0 " - << (Q_INT32)(72*(pixel_page_w/resolution)) << ' ' - << (Q_INT32)(72*(pixel_page_h/resolution)) << '\n' + << (TQ_INT32)(72*(pixel_page_w/resolution)) << ' ' + << (TQ_INT32)(72*(pixel_page_h/resolution)) << '\n' << "%%EndComments\n" << "%!\n" << psheader << "TeXDict begin " // HSize in (1/(65781.76*72))inch - << (Q_INT32)(72*65781*(pixel_page_w/resolution)) << ' ' + << (TQ_INT32)(72*65781*(pixel_page_w/resolution)) << ' ' // VSize in (1/(65781.76*72))inch - << (Q_INT32)(72*65781*(pixel_page_h/resolution)) << ' ' + << (TQ_INT32)(72*65781*(pixel_page_h/resolution)) << ' ' // Magnification - << (Q_INT32)(magnification) + << (TQ_INT32)(magnification) // dpi and vdpi << " 300 300" // Name @@ -189,7 +189,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co if (PostScriptHeaderString->latin1() != NULL) os << PostScriptHeaderString->latin1(); - if (info->background != Qt::white) { + if (info->background != TQt::white) { TQString colorCommand = TQString("gsave %1 %2 %3 setrgbcolor clippath fill grestore\n"). arg(info->background.red()/255.0). arg(info->background.green()/255.0). @@ -211,11 +211,11 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co TQStringList argus; argus << "gs"; argus << "-dSAFER" << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNOPAUSE" << "-dBATCH"; - argus << TQString("-sDEVICE=%1").arg(*gsDevice); - argus << TQString("-sOutputFile=%1").arg(filename); - argus << TQString("-sExtraIncludePath=%1").arg(includePath); - argus << TQString("-g%1x%2").arg(pixel_page_w).arg(pixel_page_h); // page size in pixels - argus << TQString("-r%1").arg(resolution); // resolution in dpi + argus << TQString("-sDEVICE=%1").tqarg(*gsDevice); + argus << TQString("-sOutputFile=%1").tqarg(filename); + argus << TQString("-sExtraIncludePath=%1").tqarg(includePath); + argus << TQString("-g%1x%2").tqarg(pixel_page_w).tqarg(pixel_page_h); // page size in pixels + argus << TQString("-r%1").tqarg(resolution); // resolution in dpi argus << "-c" << "<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe"; argus << "-f" << PSfile.name(); @@ -239,9 +239,9 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co // ghostscript. If so, try again with another device. TQString GSoutput; while(proc.readln(GSoutput) != -1) { - if (GSoutput.contains("Unknown device")) { + if (GSoutput.tqcontains("Unknown device")) { kdDebug(4300) << TQString("The version of ghostview installed on this computer does not support " - "the '%1' ghostview device driver.").arg(*gsDevice) << endl; + "the '%1' ghostview device driver.").tqarg(*gsDevice) << endl; knownDevices.remove(gsDevice); gsDevice = knownDevices.begin(); if (knownDevices.isEmpty()) @@ -267,14 +267,14 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co "drivers. Note that KDVI needs to be restarted to re-enable PostScript support." "</p></qt>")); else { - kdDebug(4300) << TQString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice) << endl; + kdDebug(4300) << TQString("KDVI will now try to use the '%1' device driver.").tqarg(*gsDevice) << endl; gs_generate_graphics_file(page, filename, magnification); } return; } } } - emit(setStatusBarText(TQString::null)); + emit(setStatusBarText(TQString())); } @@ -293,7 +293,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma pixel_page_w = paint->viewport().width(); pixel_page_h = paint->viewport().height(); - pageInfo *info = pageList.find(page); + pageInfo *info = pageList.tqfind(page); // No PostScript? Then return immediately. if ((info == 0) || (info->PostScriptString->isEmpty())) { @@ -303,7 +303,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma return; } - KTempFile gfxFile(TQString::null, ".png"); + KTempFile gfxFile(TQString(), ".png"); gfxFile.setAutoDelete(1); gfxFile.close(); // we are want the filename, not the file @@ -317,7 +317,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma TQString ghostscript_interface::locateEPSfile(const TQString &filename, const KURL &base) { - // If the base URL indicates that the DVI file is local, try to find + // If the base URL indicates that the DVI file is local, try to tqfind // the graphics file in the directory where the DVI file resides if (base.isLocalFile()) { TQString path = base.path(); // -> "/bar/foo.dvi" diff --git a/kdvi/psgs.h b/kdvi/psgs.h index c1062f13..01b5aa96 100644 --- a/kdvi/psgs.h +++ b/kdvi/psgs.h @@ -34,6 +34,7 @@ public: class ghostscript_interface : public TQObject { Q_OBJECT + TQ_OBJECT public: ghostscript_interface(); @@ -62,7 +63,7 @@ public: void graphics(const PageNumber& page, double dpi, long magnification, TQPainter* paint); // Returns the background color for a certain page. If no color was - // set, Qt::white is returned. + // set, TQt::white is returned. TQColor getBackgroundColor(const PageNumber& page) const; TQString *PostScriptHeaderString; diff --git a/kdvi/psheader.txt b/kdvi/psheader.txt index f5e543d1..244e4a3b 100644 --- a/kdvi/psheader.txt +++ b/kdvi/psheader.txt @@ -21,7 +21,7 @@ B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ -rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagetqmask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ @@ -45,9 +45,9 @@ index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask +end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagetqmask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round +imagetqmask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} diff --git a/kdvi/renderedDviPagePixmap.h b/kdvi/renderedDviPagePixmap.h index c618806b..9abff270 100644 --- a/kdvi/renderedDviPagePixmap.h +++ b/kdvi/renderedDviPagePixmap.h @@ -30,6 +30,7 @@ class RenderedDviPagePixmap : public RenderedDocumentPagePixmap { Q_OBJECT + TQ_OBJECT public: RenderedDviPagePixmap(); diff --git a/kdvi/special.cpp b/kdvi/special.cpp index 9f7eeb3d..94a7a5ca 100644 --- a/kdvi/special.cpp +++ b/kdvi/special.cpp @@ -120,7 +120,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) TQString specType = colorSpec.section(' ', 0, 0); - if (specType.find("rgb", false) == 0) { + if (specType.tqfind("rgb", false) == 0) { bool ok; double r = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -138,7 +138,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5)); } - if (specType.find("hsb", false) == 0) { + if (specType.tqfind("hsb", false) == 0) { bool ok; double h = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -156,7 +156,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(h*359.0+0.5), (int)(s*255.0+0.5), (int)(b*255.0+0.5), TQColor::Hsv); } - if (specType.find("cmyk", false) == 0) { + if (specType.tqfind("cmyk", false) == 0) { bool ok; double c = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -189,7 +189,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) return TQColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5)); } - if (specType.find("gray", false) == 0) { + if (specType.tqfind("gray", false) == 0) { bool ok; double g = colorSpec.section(' ', 1, 1).toDouble(&ok); @@ -200,7 +200,7 @@ TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec) } // Check if the color is one of the known named colors. - TQMap<TQString, TQColor>::Iterator f = namedColors.find(specType); + TQMap<TQString, TQColor>::Iterator f = namedColors.tqfind(specType); if (f != namedColors.end()) return *f; @@ -222,7 +222,7 @@ void dviRenderer::color_special(const TQString& _cp) // Take color off the stack if (colorStack.isEmpty()) printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Color pop command issued when the color stack is empty." ). - arg(dviFile->filename).arg(current_page)); + tqarg(dviFile->filename).tqarg(current_page)); else colorStack.pop(); return; @@ -235,7 +235,7 @@ void dviRenderer::color_special(const TQString& _cp) if (col.isValid()) colorStack.push(col); else - colorStack.push(Qt::black); + colorStack.push(TQt::black); return; } @@ -246,7 +246,7 @@ void dviRenderer::color_special(const TQString& _cp) if (col.isValid()) globalColor = col; else - globalColor = Qt::black; + globalColor = TQt::black; return; } @@ -254,7 +254,7 @@ void dviRenderer::color_special(const TQString& _cp) void dviRenderer::html_href_special(const TQString& _cp) { TQString cp = _cp; - cp.truncate(cp.find('"')); + cp.truncate(cp.tqfind('"')); #ifdef DEBUG_SPECIAL kdDebug(4300) << "HTML-special, href " << cp.latin1() << endl; @@ -292,10 +292,10 @@ void dviRenderer::source_special(const TQString& cp) void parse_special_argument(const TQString& strg, const char* argument_name, int* variable) { - int index = strg.find(argument_name); + int index = strg.tqfind(argument_name); if (index >= 0) { TQString tmp = strg.mid(index + strlen(argument_name)); - index = tmp.find(' '); + index = tmp.tqfind(' '); if (index >= 0) tmp.truncate(index); @@ -308,7 +308,7 @@ void parse_special_argument(const TQString& strg, const char* argument_name, int // Maybe we should open a dialog here. kdError(4300) << i18n("Malformed parameter in the epsf special command.\n" "Expected a float to follow %1 in %2") - .arg(argument_name).arg(strg) << endl; + .tqarg(argument_name).tqarg(strg) << endl; } } @@ -327,7 +327,7 @@ void dviRenderer::epsf_special(const TQString& cp) // (already the simplifyWhiteSpace() above is wrong). If you have // files like this, go away. TQString EPSfilename_orig = include_command; - EPSfilename_orig.truncate(EPSfilename_orig.find(' ')); + EPSfilename_orig.truncate(EPSfilename_orig.tqfind(' ')); // Strip enclosing quotation marks which are included by some LaTeX // macro packages (but not by others). This probably means that @@ -348,7 +348,7 @@ void dviRenderer::epsf_special(const TQString& cp) int angle = 0; // just to avoid ambiguities; the filename could contain keywords - include_command = include_command.mid(include_command.find(' ')); + include_command = include_command.mid(include_command.tqfind(' ')); parse_special_argument(include_command, "llx=", &llx); parse_special_argument(include_command, "lly=", &lly); @@ -420,19 +420,19 @@ void dviRenderer::epsf_special(const TQString& cp) foreGroundPainter->save(); if (TQFile::exists(EPSfilename)) - foreGroundPainter->setBrush(Qt::lightGray); + foreGroundPainter->setBrush(TQt::lightGray); else - foreGroundPainter->setBrush(Qt::red); - foreGroundPainter->setPen(Qt::black); + foreGroundPainter->setBrush(TQt::red); + foreGroundPainter->setPen(TQt::black); foreGroundPainter->drawRoundRect(bbox, 2, 2); TQFont f = foreGroundPainter->font(); f.setPointSize(8); foreGroundPainter->setFont(f); if (TQFile::exists(EPSfilename)) - foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename_orig, -1); + foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter), EPSfilename_orig, -1); else - foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), - i18n("File not found: \n %1").arg(EPSfilename_orig), -1); + foreGroundPainter->drawText (bbox, (int)(TQt::AlignCenter), + i18n("File not found: \n %1").tqarg(EPSfilename_orig), -1); foreGroundPainter->restore(); } @@ -451,9 +451,9 @@ void dviRenderer::TPIC_flushPath_special() return; } - TQPen pen(Qt::black, (int)(penWidth_in_mInch*resolutionInDPI/1000.0 + 0.5)); // Sets the pen size in milli-inches + TQPen pen(TQt::black, (int)(penWidth_in_mInch*resolutionInDPI/1000.0 + 0.5)); // Sets the pen size in milli-inches foreGroundPainter->setPen(pen); - foreGroundPainter->drawPolyline(TPIC_path, 0, number_of_elements_in_path); + foreGroundPainter->tqdrawPolyline(TPIC_path, 0, number_of_elements_in_path); number_of_elements_in_path = 0; } @@ -469,12 +469,12 @@ void dviRenderer::TPIC_addPath_special(const TQString& cp) bool ok; float xKoord = cp_noWhiteSpace.section(' ', 0, 0).toFloat(&ok); if (ok == false) { - printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").arg(cp) ); + printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").tqarg(cp) ); return; } float yKoord = cp_noWhiteSpace.section(' ', 1, 1).toFloat(&ok); if (ok == false) { - printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").arg(cp) ); + printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").tqarg(cp) ); return; } @@ -502,7 +502,7 @@ void dviRenderer::TPIC_setPen_special(const TQString& cp) bool ok; penWidth_in_mInch = cp.stripWhiteSpace().toFloat(&ok); if (ok == false) { - printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").arg(cp) ); + printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").tqarg(cp) ); penWidth_in_mInch = 0.0; return; } @@ -650,11 +650,11 @@ void dviRenderer::applicationDoSpecial(char *cp) // line break is encountered) if (special_command.startsWith("ps:SDict begin [") && special_command.endsWith(" pdfmark end")) { if (!currentlyDrawnPage->hyperLinkList.isEmpty()) { - // Parse the PostScript literal text string inside parentheses + // Parse the PostScript literal text string inside tqparentheses // and store it into 'targetName'. The scanner works // according to "PostScript language reference, third edition" // - Sec. 3.2.2. The specification is implemented completely: - // balanced parentheses and all escape sequences are + // balanced tqparentheses and all escape sequences are // considered. TQString tmpTargetName = special_command.section('(', 1); TQString targetName; @@ -670,7 +670,7 @@ void dviRenderer::applicationDoSpecial(char *cp) break; targetName += tmpTargetName[i]; } - targetName = PDFencodingToQString(targetName); + targetName = PDFencodingToTQString(targetName); TQValueVector<Hyperlink>::iterator it; for( it = currentlyDrawnPage->hyperLinkList.begin(); it != currentlyDrawnPage->hyperLinkList.end(); ++it ) @@ -700,7 +700,7 @@ void dviRenderer::applicationDoSpecial(char *cp) foreGroundPainter->translate(-x,-y); } else printErrorMsgForSpecials( i18n("Error in DVIfile '%1', page %2. Could not interpret angle in text rotation special." ). - arg(dviFile->filename).arg(current_page)); + tqarg(dviFile->filename).tqarg(current_page)); } // The graphicx package marks the end of rotated text with this @@ -722,6 +722,6 @@ void dviRenderer::applicationDoSpecial(char *cp) (strncasecmp(cp, "background", 10) == 0) ) return; - printErrorMsgForSpecials(i18n("The special command '%1' is not implemented.").arg(special_command)); + printErrorMsgForSpecials(i18n("The special command '%1' is not implemented.").tqarg(special_command)); return; } diff --git a/kdvi/vf.cpp b/kdvi/vf.cpp index 679aa9e0..b6da55c0 100644 --- a/kdvi/vf.cpp +++ b/kdvi/vf.cpp @@ -80,7 +80,7 @@ void TeXFontDefinition::read_VF_index() #endif // Read preamble. fseek(VF_file, (long) one(VF_file), 1); /* skip comment */ - Q_UINT32 file_checksum = four(VF_file); + TQ_UINT32 file_checksum = four(VF_file); if (file_checksum && checksum && file_checksum != checksum) kdError(4300) << i18n("Checksum mismatch") << "(dvi = " << checksum << "u, vf = " << file_checksum << @@ -91,11 +91,11 @@ void TeXFontDefinition::read_VF_index() first_font = NULL; while ((cmnd = one(VF_file)) >= FNTDEF1 && cmnd <= FNTDEF4) { int TeXnumber = num(VF_file, (int) cmnd - FNTDEF1 + 1); - Q_UINT32 checksum = four(VF_file); - Q_UINT32 scale = four(VF_file); - Q_UINT32 design = four(VF_file); + TQ_UINT32 checksum = four(VF_file); + TQ_UINT32 scale = four(VF_file); + TQ_UINT32 design = four(VF_file); Q_UNUSED(design); - Q_UINT16 len = one(VF_file) + one(VF_file); /* sequence point in the middle */ + TQ_UINT16 len = one(VF_file) + one(VF_file); /* sequence point in the middle */ char *fontname = new char[len + 1]; fread(fontname, sizeof(char), len, VF_file); fontname[len] = '\0'; @@ -111,8 +111,8 @@ void TeXFontDefinition::read_VF_index() // imposes. One obtains the enlargement by dividing 2^20. double enlargement_factor = double(scale)/(1<<20) * enlargement; - // TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (Q_UINT32)(scaled_size_in_DVI_units*enlargement_factor), enlargement_factor); - TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (Q_UINT32)((double(scale)/(1<<20))*scaled_size_in_DVI_units), enlargement_factor); + // TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (TQ_UINT32)(scaled_size_in_DVI_units*enlargement_factor), enlargement_factor); + TeXFontDefinition *newfontp = font_pool->appendx(fontname, checksum, (TQ_UINT32)((double(scale)/(1<<20))*scaled_size_in_DVI_units), enlargement_factor); // Insert font in dictionary and make sure the dictionary is big // enough. @@ -177,7 +177,7 @@ void TeXFontDefinition::read_VF_index() } } if (cmnd != POST) - oops(i18n("Wrong command byte found in VF macro list: %1").arg(cmnd)); + oops(i18n("Wrong command byte found in VF macro list: %1").tqarg(cmnd)); fclose (VF_file); file = NULL; diff --git a/kfax/faxinput.cpp b/kfax/faxinput.cpp index 47fdfa26..e37e9dd7 100644 --- a/kfax/faxinput.cpp +++ b/kfax/faxinput.cpp @@ -110,7 +110,7 @@ notetiff(const char *name) if ((tf = fopen(name, "r")) == NULL) { - TQString mesg = i18n("Unable to open:\n%1\n").arg(TQFile::decodeName(name)); + TQString mesg = i18n("Unable to open:\n%1\n").tqarg(TQFile::decodeName(name)); kfaxerror(i18n("Sorry"), mesg); return 0; } @@ -147,7 +147,7 @@ notetiff(const char *name) if (fseek(tf, IFDoff, SEEK_SET) < 0) { realbad: - str = i18n("Invalid tiff file:\n%1\n").arg(TQFile::decodeName(name)); + str = i18n("Invalid tiff file:\n%1\n").tqarg(TQFile::decodeName(name)); kfaxerror(i18n("Sorry"),str); bad: if (strips) @@ -215,7 +215,7 @@ notetiff(const char *name) get2(buf, endian) : get4(buf, endian); } break; - case 274: /* Orientation */ + case 274: /* Qt::Orientation */ switch(value) { default: /* row0 at top, col0 at left */ orient = 0; @@ -249,7 +249,7 @@ notetiff(const char *name) case 279: /* StripByteCounts */ if (count != nstrips) { str = i18n("In file %1\nStripsPerImage tag 273=%2,tag279=%3\n") - .arg(TQFile::decodeName(name)).arg(nstrips).arg(count); + .tqarg(TQFile::decodeName(name)).tqarg(nstrips).tqarg(count); kfaxerror(i18n("Message"),str); goto realbad; } @@ -419,7 +419,7 @@ getstrip(struct pagenode *pn, int strip) pn->length = pn->strips[strip].size; } else { - str = i18n("Trying to expand too many strips\n%1%n").arg(TQFile::decodeName(pn->pathname)); + str = i18n("Trying to expand too many strips\n%1%n").tqarg(TQFile::decodeName(pn->pathname)); kfaxerror(i18n("Warning"),str); return NULL; } @@ -448,7 +448,7 @@ getstrip(struct pagenode *pn, int strip) /* handle ghostscript / PC Research fax file */ if (Data[24] != 1 || Data[25] != 0){ str = i18n("Only the first page of the PC Research multipage file\n%1\nwill be shown\n") - .arg(TQFile::decodeName(pn->pathname)); + .tqarg(TQFile::decodeName(pn->pathname)); kfaxerror(i18n("Message"),str); } pn->length -= 64; @@ -462,7 +462,7 @@ getstrip(struct pagenode *pn, int strip) pn->height = G3count(pn, pn->expander == g32expand); if (pn->height == 0) { - str = i18n("No fax found in file:\n%1\n").arg(TQFile::decodeName(pn->pathname)); + str = i18n("No fax found in file:\n%1\n").tqarg(TQFile::decodeName(pn->pathname)); kfaxerror(i18n("Sorry"),str); errno = 0; badfile(pn); diff --git a/kfax/kfax.cpp b/kfax/kfax.cpp index 8a29f92c..3a3e0b9f 100644 --- a/kfax/kfax.cpp +++ b/kfax/kfax.cpp @@ -208,15 +208,15 @@ TopLevel::TopLevel (TQWidget *, const char *name) qtwin = faxqtwin->winId(); faxqtwin->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); - // Create a Vertical scroll bar + // Create aQt::Vertical scroll bar - vsb = new TQScrollBar( TQScrollBar::Vertical,faxqtwin,"scrollBar" ); + vsb = new TQScrollBar( Qt::Vertical,faxqtwin,"scrollBar" ); vsb->hide(); connect( vsb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollVert(int)) ); - // Create a Horizontal scroll bar + // Create aQt::Horizontal scroll bar - hsb = new TQScrollBar( TQScrollBar::Horizontal,faxqtwin,"scrollBar" ); + hsb = new TQScrollBar( Qt::Horizontal,faxqtwin,"scrollBar" ); connect( hsb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollHorz(int)) ); hsb->hide(); @@ -235,43 +235,43 @@ TopLevel::~TopLevel() void TopLevel::setupMenuBar() { // File menu - KStdAction::open( this, TQT_SLOT( faxOpen() ), actionCollection() ); - actRecent = KStdAction::openRecent( this, TQT_SLOT( faxOpen( const KURL & ) ), + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( faxOpen() ), actionCollection() ); + actRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( faxOpen( const KURL & ) ), actionCollection() ); - actSave = KStdAction::save( this, TQT_SLOT( faxSave() ), actionCollection() ); - actSaveAs = KStdAction::saveAs( this, TQT_SLOT( faxSaveAs() ), + actSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( faxSave() ), actionCollection() ); + actSaveAs = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( faxSaveAs() ), actionCollection() ); - actPrint = KStdAction::print( this, TQT_SLOT( print() ), actionCollection() ); - KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() ); - actAdd = new KAction( i18n( "A&dd..." ), "filenew", KShortcut(), this, + actPrint = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( print() ), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() ); + actAdd = new KAction( i18n( "A&dd..." ), "filenew", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( faxAdd() ), actionCollection(), "file_add_fax" ); actRecent->setMaxItems( 5 ); // View Menu - actSize = KStdAction::actualSize( this, TQT_SLOT( actualSize() ), + actSize = KStdAction::actualSize( TQT_TQOBJECT(this), TQT_SLOT( actualSize() ), actionCollection() ); - actZoomIn = KStdAction::zoomIn( this, TQT_SLOT( zoomin() ), actionCollection() ); - actZoomOut = KStdAction::zoomOut( this, TQT_SLOT( zoomout() ), + actZoomIn = KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT( zoomin() ), actionCollection() ); + actZoomOut = KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( zoomout() ), actionCollection() ); - actRotate = new KAction( i18n( "&Rotate Page" ), "rotate", KShortcut(), this, + actRotate = new KAction( i18n( "&Rotate Page" ), "rotate", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( rotatePage() ), actionCollection(), "view_rotate" ); - actMirror = new KAction( i18n( "Mirror Page" ), KShortcut(), this, + actMirror = new KAction( i18n( "Mirror Page" ), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( mirrorPage() ), actionCollection(), "view_mirror" ); - actFlip = new KAction( i18n( "&Flip Page" ), KShortcut(), this, + actFlip = new KAction( i18n( "&Flip Page" ), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( flipPage() ), actionCollection(), "view_flip" ); // Go menu - actNext = KStdAction::next( this, TQT_SLOT( nextPage() ), actionCollection() ); - actPrev = KStdAction::prior( this, TQT_SLOT( prevPage() ), actionCollection() ); - actFirst = KStdAction::firstPage( this, TQT_SLOT( firstPage() ), + actNext = KStdAction::next( TQT_TQOBJECT(this), TQT_SLOT( nextPage() ), actionCollection() ); + actPrev = KStdAction::prior( TQT_TQOBJECT(this), TQT_SLOT( prevPage() ), actionCollection() ); + actFirst = KStdAction::firstPage( TQT_TQOBJECT(this), TQT_SLOT( firstPage() ), actionCollection() ); - actLast = KStdAction::lastPage( this, TQT_SLOT( lastPage() ), + actLast = KStdAction::lastPage( TQT_TQOBJECT(this), TQT_SLOT( lastPage() ), actionCollection() ); // Settings menu - KStdAction::preferences( this, TQT_SLOT( faxoptions() ), actionCollection() ); + KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT( faxoptions() ), actionCollection() ); } void TopLevel::setupStatusBar() @@ -282,14 +282,14 @@ void TopLevel::setupStatusBar() statusbar->insertFixedItem(i18n("Res: XXXXX"), ID_GENERAL); statusbar->insertFixedItem(i18n("Type: XXXXXXX"), ID_TYPE); statusbar->insertFixedItem(i18n("Page: XX of XX"), ID_PAGE_NO); - statusbar->insertItem(TQString::null, ID_FNAME, 1); + statusbar->insertItem(TQString(), ID_FNAME, 1); statusbar->setItemAlignment( ID_FNAME, AlignLeft ); - statusbar->changeItem(TQString::null, ID_INS_OVR); - statusbar->changeItem(TQString::null, ID_GENERAL); - statusbar->changeItem(TQString::null, ID_TYPE); - statusbar->changeItem(TQString::null, ID_PAGE_NO); - statusbar->changeItem(TQString::null, ID_FNAME); + statusbar->changeItem(TQString(), ID_INS_OVR); + statusbar->changeItem(TQString(), ID_GENERAL); + statusbar->changeItem(TQString(), ID_TYPE); + statusbar->changeItem(TQString(), ID_PAGE_NO); + statusbar->changeItem(TQString(), ID_FNAME); } void TopLevel::readSettings() @@ -378,7 +378,7 @@ void TopLevel::writeSettings() void TopLevel::faxOpen() { - KURL url = KFileDialog::getOpenURL(TQString::null, KFAX_FILETYPES); + KURL url = KFileDialog::getOpenURL(TQString(), KFAX_FILETYPES); faxOpen( url ); @@ -400,7 +400,7 @@ void TopLevel::faxOpen( const KURL & url ) void TopLevel::faxAdd() { - KURL url = KFileDialog::getOpenURL(TQString::null, KFAX_FILETYPES); + KURL url = KFileDialog::getOpenURL(TQString(), KFAX_FILETYPES); faxAdd( url ); @@ -424,7 +424,7 @@ void TopLevel::faxSave() void TopLevel::faxSaveAs() { - fileURL = KFileDialog::getSaveURL(TQString::null, KFAX_FILETYPES); + fileURL = KFileDialog::getSaveURL(TQString(), KFAX_FILETYPES); if (fileURL.isEmpty()) return; @@ -654,13 +654,13 @@ void TopLevel::resizeView() } if(Image){ - hsb->setRange(0,QMAX(0,Image->width - qwindow_width)); + hsb->setRange(0,TQMAX(0,Image->width - qwindow_width)); hsb->setSteps(5,qwindow_width/2); - // printf("hsb range: %d\n",QMAX(0,Image->width - qwindow_width)); - vsb->setRange(0,QMAX(0,Image->height - qwindow_height)); + // printf("hsb range: %d\n",TQMAX(0,Image->width - qwindow_width)); + vsb->setRange(0,TQMAX(0,Image->height - qwindow_height)); vsb->setSteps(5,qwindow_height/2); - // printf("vsb range: %d\n",QMAX(0,Image->height - qwindow_height)); - // printf("vsb QMIN %d vdb QMAX %d\n",vsb->QMINValue(),vsb->QMAXValue()); + // printf("vsb range: %d\n",TQMAX(0,Image->height - qwindow_height)); + // printf("vsb TQMIN %d vdb TQMAX %d\n",vsb->TQMINValue(),vsb->TQMAXValue()); } @@ -701,7 +701,7 @@ void TopLevel::print(){ printer.setFullPage( true ); printer.setUsePrinterResolution( true ); printer.setCreator( i18n("KFax") + " " KFAXVERSION ); - printer.setDocName( TQString("%1 - %2").arg(firstpage->name).arg(i18n("KFax"))); + printer.setDocName( TQString("%1 - %2").tqarg(firstpage->name).tqarg(i18n("KFax"))); printer.setDocFileName( firstpage->name ); printer.setPageSelection( KPrinter::ApplicationSide ); printer.setMinMax( 1, pages ); @@ -735,7 +735,7 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter ) ++currentpage; // should this page be printed ? - if (printer.pageList().findIndex(currentpage) < 0) + if (printer.pageList().tqfindIndex(currentpage) < 0) continue; XImage *Image = Pimage(pn); @@ -745,11 +745,11 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter ) // byte-swapping the image TQByteArray bytes( Image->height*Image->bytes_per_line ); for (int y=Image->height-1; y>=0; --y) { - Q_UINT32 offset = y*Image->bytes_per_line; - Q_UINT32 *source = (Q_UINT32 *) (Image->data + offset); - Q_UINT32 *dest = (Q_UINT32 *) (bytes.data() + offset); + TQ_UINT32 offset = y*Image->bytes_per_line; + TQ_UINT32 *source = (TQ_UINT32 *) (Image->data + offset); + TQ_UINT32 *dest = (TQ_UINT32 *) (bytes.data() + offset); for (int x=(Image->bytes_per_line/4)-1; x>=0; --x) { - Q_UINT32 dv = 0, sv = *source; + TQ_UINT32 dv = 0, sv = *source; for (int bit=32; bit>0; --bit) { dv <<= 1; dv |= sv&1; @@ -792,11 +792,11 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter ) TQSize scaledImageSize = size; if (size.width() > maxSize.width() || size.height() > maxSize.height() ) { // Image does not fit - scale it and print centered - scaledImageSize.scale( maxSize, TQSize::ScaleMin ); + scaledImageSize.tqscale( maxSize, TQSize::ScaleMin ); kdDebug() << "Image does not fit - scaling to " << maxSize << endl; } else { // Image does fit - print it in original size, but centered - scaledImageSize.scale( size, TQSize::ScaleMin ); + scaledImageSize.tqscale( size, TQSize::ScaleMin ); kdDebug() << "Image does fit - scaling to " << size << endl; } kdDebug() << "Final image size " << scaledImageSize << endl; @@ -846,7 +846,7 @@ void TopLevel::openNetFile( const KURL &u) if ( u.isLocalFile() ) { - TQString string = i18n("Loading '%1'").arg(u.path()); + TQString string = i18n("Loading '%1'").tqarg(u.path()); statusbar->message(string); openadd( u.path()); statusbar->clear(); @@ -854,7 +854,7 @@ void TopLevel::openNetFile( const KURL &u) else { statusbar->message(i18n("Downloading...")); - TQString tmpFile = TQString::null; + TQString tmpFile = TQString(); if ( KIO::NetAccess::download( u, tmpFile, this ) ) { openadd( tmpFile ); @@ -1382,7 +1382,7 @@ void TopLevel::faxClose() vsb->hide(); hsb->hide(); - fileURL = TQString::null; + fileURL = TQString(); updateActions(); } @@ -1441,17 +1441,17 @@ void TopLevel::uiUpdate(){ currentpage = pages; } - TQString pagestr = i18n("Page: %1 of %2").arg(currentpage).arg(pages); + TQString pagestr = i18n("Page: %1 of %2").tqarg(currentpage).tqarg(pages); statusbar->changeItem(pagestr, ID_PAGE_NO); if(Image){ - TQString wh = i18n("W: %1 H: %2").arg(Image->width).arg(Image->height); + TQString wh = i18n("W: %1 H: %2").tqarg(Image->width).tqarg(Image->height); statusbar->changeItem(wh, ID_INS_OVR); } - TQString resolution = i18n("Res: %1").arg(thispage->vres?i18n("Fine"):i18n("Normal")); - // TODO: resolution += TQString("%1x%2").arg(thispage->dpiX).arg(thispage->dpiY); + TQString resolution = i18n("Res: %1").tqarg(thispage->vres?i18n("Fine"):i18n("Normal")); + // TODO: resolution += TQString("%1x%2").tqarg(thispage->dpiX).tqarg(thispage->dpiY); statusbar->changeItem(resolution, ID_GENERAL); statusbar->changeItem(thispage->name, ID_FNAME); @@ -1528,16 +1528,16 @@ void TopLevel::putImage() has a sunken frame and I need to offset by 1 pixel to the right and one pixel down so that I don't paint my fax into the border of the frame*/ - XResizeWindow(qtdisplay,Win,QMIN(qwindow_width -1,Image->width ), - QMIN(qwindow_height -1,Image->height )); + XResizeWindow(qtdisplay,Win,TQMIN(qwindow_width -1,Image->width ), + TQMIN(qwindow_height -1,Image->height )); XPutImage(qtdisplay, Win, PaintGC, Image, - QMAX(xpos - qwindow_width/2,0), QMAX(ypos - qwindow_height/2,0), - 0, 0, QMIN(qwindow_width -1,Image->width) , - QMIN(qwindow_height -1,Image->height) ); + TQMAX(xpos - qwindow_width/2,0), TQMAX(ypos - qwindow_height/2,0), + 0, 0, TQMIN(qwindow_width -1,Image->width) , + TQMIN(qwindow_height -1,Image->height) ); - vsb->setValue(QMAX(ypos - qwindow_height/2,0)); - hsb->setValue(QMAX(xpos - qwindow_width/2,0)); + vsb->setValue(TQMAX(ypos - qwindow_height/2,0)); + hsb->setValue(TQMAX(xpos - qwindow_width/2,0)); XFlush(qtdisplay); } diff --git a/kfax/kfax.h b/kfax/kfax.h index 99ad9940..5319a254 100644 --- a/kfax/kfax.h +++ b/kfax/kfax.h @@ -2,7 +2,7 @@ $Id$ - Requires the Qt widget libraries, available at no cost at + Requires the TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1997 Bernd Johannes Wuebben @@ -54,11 +54,12 @@ public: class TopLevel : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - TopLevel( TQWidget *parent=0, const char *name=0 ); + TopLevel( TQWidget *tqparent=0, const char *name=0 ); ~TopLevel(); void openNetFile( const KURL& _url); diff --git a/kfax/kfax_printsettings.cpp b/kfax/kfax_printsettings.cpp index 5382c2e5..3ddae4ab 100644 --- a/kfax/kfax_printsettings.cpp +++ b/kfax/kfax_printsettings.cpp @@ -24,8 +24,8 @@ #include <tqlayout.h> #include <tqwhatsthis.h> -KFAXPrintSettings::KFAXPrintSettings(TQWidget *parent, const char *name) -: KPrintDialogPage(parent, name) +KFAXPrintSettings::KFAXPrintSettings(TQWidget *tqparent, const char *name) +: KPrintDialogPage(tqparent, name) { TQString whatsThisScaleFullPage = i18n( "<qt>" "<p><strong>'Ignore Paper Margins'</strong></p>" diff --git a/kfax/kfax_printsettings.h b/kfax/kfax_printsettings.h index 3213b7d2..ea37fa0a 100644 --- a/kfax/kfax_printsettings.h +++ b/kfax/kfax_printsettings.h @@ -31,17 +31,18 @@ class TQCheckBox; class KFAXPrintSettings : public KPrintDialogPage { Q_OBJECT + TQ_OBJECT public: - KFAXPrintSettings(TQWidget *parent = 0, const char *name = 0); + KFAXPrintSettings(TQWidget *tqparent = 0, const char *name = 0); ~KFAXPrintSettings(); void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false); void setOptions(const TQMap<TQString,TQString>& opts); private: - QCheckBox *m_scaleFullPage; - QCheckBox *m_center_horz; - QCheckBox *m_center_vert; + TQCheckBox *m_scaleFullPage; + TQCheckBox *m_center_horz; + TQCheckBox *m_center_vert; }; #endif diff --git a/kfax/options.cpp b/kfax/options.cpp index b692b28d..f1490989 100644 --- a/kfax/options.cpp +++ b/kfax/options.cpp @@ -1,7 +1,7 @@ /* $Id$ - Requires the Qt widget libraries, available at no cost at + Requires the TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben @@ -48,8 +48,8 @@ #include "kfax.h" #include "options.h" -OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) - : KDialogBase( parent, name, true, i18n("Configure"), Ok|Cancel) +OptionsDialog::OptionsDialog( TQWidget *tqparent, const char *name) + : KDialogBase( tqparent, name, true, i18n("Configure"), Ok|Cancel) { TQWidget *mainWidget = new TQWidget(this); setMainWidget(mainWidget); @@ -60,28 +60,28 @@ OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) bg->setColumnLayout( 0, Qt::Horizontal ); mainLayout->addWidget( bg ); - TQVBoxLayout *vbl = new TQVBoxLayout(bg->layout()); + TQVBoxLayout *vbl = new TQVBoxLayout(bg->tqlayout()); TQHBoxLayout *hbl1 = new TQHBoxLayout(); vbl->addLayout( hbl1 ); displaylabel = new TQLabel(i18n("Display options:"), bg,"displaylabel"); - displaylabel->setFixedSize( displaylabel->sizeHint() ); + displaylabel->setFixedSize( displaylabel->tqsizeHint() ); hbl1->addWidget( displaylabel ); landscape = new TQCheckBox(i18n("Landscape"), bg,"Landscape"); - landscape->setFixedSize( landscape->sizeHint() ); + landscape->setFixedSize( landscape->tqsizeHint() ); hbl1->addSpacing( 10 ); hbl1->addWidget( landscape ); flip = new TQCheckBox(i18n("Upside down"), bg,"upsidedown"); - flip->setFixedSize( flip->sizeHint() ); + flip->setFixedSize( flip->tqsizeHint() ); hbl1->addSpacing( 10 ); hbl1->addWidget( flip ); invert = new TQCheckBox(i18n("Invert"), bg,"invert"); - invert->setFixedSize( invert->sizeHint() ); + invert->setFixedSize( invert->tqsizeHint() ); hbl1->addSpacing( 10 ); hbl1->addWidget( invert ); @@ -139,7 +139,7 @@ OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) rawgroup->setFrameStyle(TQFrame::NoFrame); rawlabel = new TQLabel(i18n("Raw fax format:"),rawgroup,"rawlabel"); - rawlabel->setFixedSize( rawlabel->sizeHint() ); + rawlabel->setFixedSize( rawlabel->tqsizeHint() ); hbl4->addWidget( rawlabel ); g3 = new TQRadioButton("G3",rawgroup,"g3"); diff --git a/kfax/options.h b/kfax/options.h index 693616e4..96c2a500 100644 --- a/kfax/options.h +++ b/kfax/options.h @@ -58,9 +58,10 @@ class KIntNumInput; class OptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - OptionsDialog( TQWidget *parent = 0, const char *name = 0); + OptionsDialog( TQWidget *tqparent = 0, const char *name = 0); struct optionsinfo* getInfo(); void setWidgets(struct optionsinfo *oi); @@ -76,13 +77,13 @@ public slots: private: - QGroupBox *bg; + TQGroupBox *bg; TQLabel *reslabel; TQButtonGroup *resgroup; TQRadioButton *fine; TQRadioButton *resauto; TQRadioButton *normal; - QLabel *displaylabel; + TQLabel *displaylabel; TQButtonGroup *displaygroup; TQCheckBox *landscape; TQCheckBox *geomauto; diff --git a/kfaxview/faxmultipage.cpp b/kfaxview/faxmultipage.cpp index 44c1e273..2362d281 100644 --- a/kfaxview/faxmultipage.cpp +++ b/kfaxview/faxmultipage.cpp @@ -31,9 +31,9 @@ typedef KParts::GenericFactory<FaxMultiPage> FaxMultiPageFactory; K_EXPORT_COMPONENT_FACTORY(kfaxviewpart, FaxMultiPageFactory) -FaxMultiPage::FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, +FaxMultiPage::FaxMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList&) - : KMultiPage(parentWidget, widgetName, parent, name), faxRenderer(parentWidget) + : KMultiPage(tqparentWidget, widgetName, tqparent, name), faxRenderer(tqparentWidget) { /* This is kparts wizardry that cannot be understood by man. Simply change the names to match your implementation. */ diff --git a/kfaxview/faxmultipage.h b/kfaxview/faxmultipage.h index 65a7fa25..71e24b72 100644 --- a/kfaxview/faxmultipage.h +++ b/kfaxview/faxmultipage.h @@ -81,6 +81,7 @@ does only the minimal initialization required. class FaxMultiPage : public KMultiPage { Q_OBJECT + TQ_OBJECT public: /** Constructor @@ -89,7 +90,7 @@ public: kmultipage. Please have a look at the constructor's source code to see how to adjust this for your implementation. */ - FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + FaxMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args = TQStringList()); /** Destructor diff --git a/kfaxview/faxrenderer.cpp b/kfaxview/faxrenderer.cpp index 3e597863..ec21ca06 100644 --- a/kfaxview/faxrenderer.cpp +++ b/kfaxview/faxrenderer.cpp @@ -36,7 +36,7 @@ FaxRenderer::FaxRenderer(TQWidget* par) : DocumentRenderer(par) { #ifdef KF_DEBUG - kdError() << "FaxRenderer( parent=" << par << " )" << endl; + kdError() << "FaxRenderer( tqparent=" << par << " )" << endl; #endif } @@ -96,8 +96,8 @@ void FaxRenderer::drawPage(double resolution, RenderedDocumentPage* page) // problems occur if KViewShell required a shrunken version of // the page, e.g. to print multiple pages on one sheet of paper. - int width_in_pixel = qRound(resolution * psize.width().getLength_in_inch()); - int height_in_pixel = qRound(resolution * psize.height().getLength_in_inch()); + int width_in_pixel = tqRound(resolution * psize.width().getLength_in_inch()); + int height_in_pixel = tqRound(resolution * psize.height().getLength_in_inch()); img = img.smoothScale(width_in_pixel, height_in_pixel); foreGroundPaint->drawImage(0, 0, img); @@ -135,8 +135,8 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &) TQFileInfo fi(fname); TQString filename = fi.absFilePath(); if (!fi.exists() || fi.isDir()) { - KMessageBox::error( parentWidget, - i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").arg(filename), + KMessageBox::error( tqparentWidget, + i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").tqarg(filename), i18n("File Error")); // the return value 'false' indicates that this operation was not successful. mutex.unlock(); @@ -156,12 +156,12 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &) // leaving an error message in fax.errorString(). We try to handle // this case gracefully. if (fax.errorString().isEmpty()) - KMessageBox::error( parentWidget, - i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").arg(filename), + KMessageBox::error( tqparentWidget, + i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").tqarg(filename), i18n("File Error")); else - KMessageBox::detailedError( parentWidget, - i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").arg(filename), + KMessageBox::detailedError( tqparentWidget, + i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").tqarg(filename), fax.errorString(), i18n("File Error")); clear(); @@ -178,7 +178,7 @@ bool FaxRenderer::setFile(const TQString &fname, const KURL &) Length w,h; if (numPages != 0) { - for(Q_UINT16 pg=0; pg < numPages; pg++) { + for(TQ_UINT16 pg=0; pg < numPages; pg++) { TQSize pageSize = fax.page_size(pg); TQPoint dpi = fax.page_dpi(pg); double dpix = dpi.x(); diff --git a/kfaxview/faxrenderer.h b/kfaxview/faxrenderer.h index e83f6ff4..d7022b61 100644 --- a/kfaxview/faxrenderer.h +++ b/kfaxview/faxrenderer.h @@ -39,6 +39,7 @@ implements only the necessary methods setFile() and drawPage(). class FaxRenderer : public DocumentRenderer { Q_OBJECT + TQ_OBJECT public: /** Default constructor @@ -46,7 +47,7 @@ public: This constructor simply prints a message (if debugging is enabled) and calls the default constructor. */ - FaxRenderer(TQWidget* parent); + FaxRenderer(TQWidget* tqparent); /** Destructor diff --git a/kfaxview/libkfaximage/faxexpand.h b/kfaxview/libkfaximage/faxexpand.h index 736779bd..72819e23 100644 --- a/kfaxview/libkfaximage/faxexpand.h +++ b/kfaxview/libkfaximage/faxexpand.h @@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * #include <tqglobal.h> #include <tqimage.h> -#define t32bits Q_UINT32 -#define t16bits Q_UINT16 +#define t32bits TQ_UINT32 +#define t16bits TQ_UINT16 typedef t16bits pixnum; diff --git a/kfaxview/libkfaximage/kfaximage.cpp b/kfaxview/libkfaximage/kfaximage.cpp index c0efb624..ea0d4943 100644 --- a/kfaxview/libkfaximage/kfaximage.cpp +++ b/kfaxview/libkfaximage/kfaximage.cpp @@ -38,10 +38,10 @@ static const char FAXMAGIC[] = "\000PC Research, Inc\000\000\000\000\000\000"; static const char littleTIFF[] = "\x49\x49\x2a\x00"; static const char bigTIFF[] = "\x4d\x4d\x00\x2a"; -KFaxImage::KFaxImage( const TQString &filename, TQObject *parent, const char *name ) - : TQObject(parent,name) +KFaxImage::KFaxImage( const TQString &filename, TQObject *tqparent, const char *name ) + : TQObject(tqparent,name) { - KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkfaximage") ); + KGlobal::locale()->insertCatalogue( TQString::tqfromLatin1("libkfaximage") ); loadImage(filename); } @@ -53,7 +53,7 @@ bool KFaxImage::loadImage( const TQString &filename ) reset(); m_filename = filename; - m_errorString = TQString::null; + m_errorString = TQString(); if (m_filename.isEmpty()) return false; @@ -126,9 +126,9 @@ pagenode *KFaxImage::AppendImageNode(int type) bool KFaxImage::NewImage(pagenode *pn, int w, int h) { pn->image = TQImage( w, h, 1, 2, TQImage::systemByteOrder() ); - pn->image.setColor(0, qRgb(255,255,255)); - pn->image.setColor(1, qRgb(0,0,0)); - pn->data = (Q_UINT16*) pn->image.bits(); + pn->image.setColor(0, tqRgb(255,255,255)); + pn->image.setColor(1, tqRgb(0,0,0)); + pn->data = (TQ_UINT16*) pn->image.bits(); pn->bytes_per_line = pn->image.bytesPerLine(); pn->dpi = KFAX_DPI_FINE; @@ -293,7 +293,7 @@ KFaxImage::notetiff() get2(buf, endian) : get4(buf, endian); } break; - case 274: /* Orientation */ + case 274: /* Qt::Orientation */ switch(value) { default: /* row0 at top, col0 at left */ orient = 0; @@ -327,7 +327,7 @@ KFaxImage::notetiff() case 279: /* StripByteCounts */ if (count != nstrips) { str = i18n("In file %1\nStripsPerImage tag 273=%2,tag279=%3\n") - .arg(filename()).arg(nstrips).arg(count); + .tqarg(filename()).tqarg(nstrips).tqarg(count); kfaxerror(str); goto realbad; } @@ -403,7 +403,7 @@ KFaxImage::notetiff() void KFaxImage::badfile(pagenode *pn) { - kfaxerror(i18n("%1: Bad Fax File").arg(filename())); + kfaxerror(i18n("%1: Bad Fax File").tqarg(filename())); FreeImage(pn); } @@ -636,12 +636,12 @@ KFaxImage::GetImage(pagenode *pn) } // byte-swapping the image on little endian machines -#if defined(Q_BYTE_ORDER) && (Q_BYTE_ORDER == Q_LITTLE_ENDIAN) +#if defined(Q_BYTE_ORDER) && (Q_BYTE_ORDER == TQ_LITTLE_ENDIAN) for (int y=pn->image.height()-1; y>=0; --y) { - Q_UINT32 *source = (Q_UINT32 *) pn->image.scanLine(y); - Q_UINT32 *dest = source; + TQ_UINT32 *source = (TQ_UINT32 *) pn->image.scanLine(y); + TQ_UINT32 *dest = source; for (int x=(pn->bytes_per_line/4)-1; x>=0; --x) { - Q_UINT32 dv = 0, sv = *source; + TQ_UINT32 dv = 0, sv = *source; for (int bit=32; bit>0; --bit) { dv <<= 1; dv |= sv&1; diff --git a/kfaxview/libkfaximage/kfaximage.h b/kfaxview/libkfaximage/kfaximage.h index c0d61cb6..52dd7736 100644 --- a/kfaxview/libkfaximage/kfaximage.h +++ b/kfaxview/libkfaximage/kfaximage.h @@ -50,9 +50,10 @@ class pagenode; #define KFAX_DPI_SUPERFINE TQPoint(406,392) -class KDE_EXPORT KFaxImage : public QObject +class KDE_EXPORT KFaxImage : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -63,7 +64,7 @@ public: * @see: numPages */ - KFaxImage( const TQString &filename = TQString::null, TQObject *parent = 0, const char *name = 0 ); + KFaxImage( const TQString &filename = TQString(), TQObject *tqparent = 0, const char *name = 0 ); /** * Destructor diff --git a/kfaxview/main.cpp b/kfaxview/main.cpp index 05692315..cacb24a0 100644 --- a/kfaxview/main.cpp +++ b/kfaxview/main.cpp @@ -97,14 +97,14 @@ int main(int argc, char** argv) if (!url.isValid()) { - kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl; + kdError(4300) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl; return -1; } if (!url.isLocalFile()) { kdError(4300) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " - "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl; + "files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl; return -1; } @@ -118,7 +118,7 @@ int main(int argc, char** argv) QCStringList apps = app.dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).find("kviewshell") == 0) + if ((*it).tqfind("kviewshell") == 0) { TQByteArray data, replyData; TQCString replyType; diff --git a/kfile-plugins/RETURNED_ITEMS b/kfile-plugins/RETURNED_ITEMS index 593d466a..70a3b519 100644 --- a/kfile-plugins/RETURNED_ITEMS +++ b/kfile-plugins/RETURNED_ITEMS @@ -50,7 +50,7 @@ String Camera make String Camera model String Date/time Size Dimensions Width x Height in pixels -int Orientation 1 - "The 0th row is at the visual top of the image, +int Qt::Orientation 1 - "The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side." 2 - "The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side." diff --git a/kfile-plugins/bmp/kfile_bmp.cpp b/kfile-plugins/bmp/kfile_bmp.cpp index 790161a6..a682da7c 100644 --- a/kfile-plugins/bmp/kfile_bmp.cpp +++ b/kfile-plugins/bmp/kfile_bmp.cpp @@ -43,10 +43,10 @@ typedef KGenericFactory<KBmpPlugin> BmpFactory; K_EXPORT_COMPONENT_FACTORY(kfile_bmp, BmpFactory( "kfile_bmp" )) -KBmpPlugin::KBmpPlugin(TQObject *parent, const char *name, +KBmpPlugin::KBmpPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-bmp" ); @@ -83,7 +83,7 @@ bool KBmpPlugin::readInfo( KFileMetaInfo& info, uint what) if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } diff --git a/kfile-plugins/bmp/kfile_bmp.h b/kfile-plugins/bmp/kfile_bmp.h index f34e3e86..c2c5c007 100644 --- a/kfile-plugins/bmp/kfile_bmp.h +++ b/kfile-plugins/bmp/kfile_bmp.h @@ -27,9 +27,10 @@ class TQStringList; class KBmpPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KBmpPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KBmpPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/configure.in.bot b/kfile-plugins/configure.in.bot index 47308e8b..f03bc711 100644 --- a/kfile-plugins/configure.in.bot +++ b/kfile-plugins/configure.in.bot @@ -7,13 +7,13 @@ if test -z "$LIBTIFF"; then all_tests=bad fi -if test -z "$POPPLER_LIBS"; then - echo "" - echo "You're missing poppler. The additional info plugin for PDF files" - echo "files won't be compiled without poppler >= 0.3.1." - echo "You can download poppler from http://poppler.freedesktop.org/" - echo "" -fi +#if test -z "$POPPLER_LIBS"; then +# echo "" +# echo "You're missing poppler. The additional info plugin for PDF files" +# echo "files won't be compiled without poppler >= 0.3.1." +# echo "You can download poppler from http://poppler.freedesktop.org/" +# echo "" +#fi if test "$EXRSTATUS" = "no"; then echo "" diff --git a/kfile-plugins/dds/kfile_dds.cpp b/kfile-plugins/dds/kfile_dds.cpp index f8c3346e..17321e13 100644 --- a/kfile-plugins/dds/kfile_dds.cpp +++ b/kfile-plugins/dds/kfile_dds.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE project - * Copyright (C) 2002 Ignacio Castaño <castano@ludicon.com> + * Copyright (C) 2002 Ignacio Casta�o <castano@ludicon.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public @@ -35,9 +35,9 @@ typedef KGenericFactory<KDdsPlugin> DdsFactory; -typedef Q_UINT32 uint; -typedef Q_UINT16 ushort; -typedef Q_UINT8 uchar; +typedef TQ_UINT32 uint; +typedef TQ_UINT16 ushort; +typedef TQ_UINT8 uchar; namespace { // Private. @@ -90,10 +90,10 @@ namespace { // Private. uint flags; uint fourcc; uint bitcount; - uint rmask; - uint gmask; - uint bmask; - uint amask; + uint rtqmask; + uint gtqmask; + uint btqmask; + uint atqmask; }; TQDataStream & operator>> ( TQDataStream & s, DDSPixelFormat & pf ) @@ -102,10 +102,10 @@ namespace { // Private. s >> pf.flags; s >> pf.fourcc; s >> pf.bitcount; - s >> pf.rmask; - s >> pf.gmask; - s >> pf.bmask; - s >> pf.amask; + s >> pf.rtqmask; + s >> pf.gtqmask; + s >> pf.btqmask; + s >> pf.atqmask; return s; } @@ -182,8 +182,8 @@ namespace { // Private. K_EXPORT_COMPONENT_FACTORY(kfile_dds, DdsFactory( "kfile_dds" )) // Constructor, init mime type info. -KDdsPlugin::KDdsPlugin(TQObject *parent, const char *name, const TQStringList &args) : - KFilePlugin(parent, name, args) +KDdsPlugin::KDdsPlugin(TQObject *tqparent, const char *name, const TQStringList &args) : + KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo * info = addMimeTypeInfo( "image/x-dds" ); @@ -216,7 +216,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) TQFile file(info.path()); if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } @@ -227,7 +227,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) uint fourcc; s >> fourcc; if( fourcc != FOURCC_DDS ) { - kdDebug(7034) << TQFile::encodeName(info.path()) << " is not a DDS file." << endl; + kdDebug(7034) << TQFile::encodeName(info.path()).data() << " is not a DDS file." << endl; return false; } @@ -237,7 +237,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) // Check image file format. if( s.atEnd() || !IsValid( header ) ) { - kdDebug(7034) << TQFile::encodeName(info.path()) << " is not a valid DDS file." << endl; + kdDebug(7034) << TQFile::encodeName(info.path()).data() << " is not a valid DDS file." << endl; return false; } diff --git a/kfile-plugins/dds/kfile_dds.h b/kfile-plugins/dds/kfile_dds.h index 63dd156b..19ef6a12 100644 --- a/kfile-plugins/dds/kfile_dds.h +++ b/kfile-plugins/dds/kfile_dds.h @@ -27,9 +27,10 @@ class TQStringList; class KDdsPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KDdsPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KDdsPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/dvi/kfile_dvi.cpp b/kfile-plugins/dvi/kfile_dvi.cpp index e8fb7af7..1d035fa0 100644 --- a/kfile-plugins/dvi/kfile_dvi.cpp +++ b/kfile-plugins/dvi/kfile_dvi.cpp @@ -39,8 +39,8 @@ typedef KGenericFactory<KDviPlugin> DviFactory; K_EXPORT_COMPONENT_FACTORY(kfile_dvi, DviFactory("kfile_dvi")) -KDviPlugin::KDviPlugin (TQObject * parent, const char * name, const TQStringList & preferredItems) - : KFilePlugin(parent, name, preferredItems) +KDviPlugin::KDviPlugin (TQObject * tqparent, const char * name, const TQStringList & preferredItems) + : KFilePlugin(tqparent, name, preferredItems) { kdDebug(7034) << "dvi plugin" << endl; @@ -62,12 +62,12 @@ bool KDviPlugin::readInfo (KFileMetaInfo & info, uint /* what (unused in this pl KFileMetaInfoGroup GeneralGroup = appendGroup(info, "General"); TQFile f(info.path()); TQFileInfo f_info; - Q_UINT16 bytes_to_read; - Q_UINT8 comment_length; + TQ_UINT16 bytes_to_read; + TQ_UINT8 comment_length; TQString comment; - Q_UINT16 pages; - Q_UINT8 buffer[270]; // buffer for reading data; no data is read with more than 270 bytes - Q_UINT32 ptr; + TQ_UINT16 pages; + TQ_UINT8 buffer[270]; // buffer for reading data; no data is read with more than 270 bytes + TQ_UINT32 ptr; int i; // running index // open file and try to get the comment @@ -79,7 +79,7 @@ bool KDviPlugin::readInfo (KFileMetaInfo & info, uint /* what (unused in this pl } f_info.setFile(f); // create fileinfoobject - bytes_to_read = QMIN(f_info.size(), 270); // check, if the file size is smaller than 270 bytes + bytes_to_read = TQMIN(f_info.size(), 270); // check, if the file size is smaller than 270 bytes // (if the comment is as large as possible, we don't have to // read more than 270 bytes) diff --git a/kfile-plugins/dvi/kfile_dvi.h b/kfile-plugins/dvi/kfile_dvi.h index 60326144..aba32132 100644 --- a/kfile-plugins/dvi/kfile_dvi.h +++ b/kfile-plugins/dvi/kfile_dvi.h @@ -28,8 +28,9 @@ class TQStringList; class KDviPlugin : public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KDviPlugin ( TQObject * parent, const char * name, const TQStringList & preferredItems ); + KDviPlugin ( TQObject * tqparent, const char * name, const TQStringList & preferredItems ); virtual bool readInfo (KFileMetaInfo & info, uint what); }; diff --git a/kfile-plugins/exr/kfile_exr.cpp b/kfile-plugins/exr/kfile_exr.cpp index e2ae9a06..18432fc8 100644 --- a/kfile-plugins/exr/kfile_exr.cpp +++ b/kfile-plugins/exr/kfile_exr.cpp @@ -60,9 +60,9 @@ typedef KGenericFactory<KExrPlugin> ExrFactory; K_EXPORT_COMPONENT_FACTORY(kfile_exr, ExrFactory("kfile_exr")) -KExrPlugin::KExrPlugin(TQObject *parent, const char *name, +KExrPlugin::KExrPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { // set up our mime type KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-exr" ); @@ -193,7 +193,7 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) for ( unsigned int y=0; y < preview.height(); y++ ) { for ( unsigned int x=0; x < preview.width(); x++ ) { const PreviewRgba &q = preview.pixels()[x+(y*preview.width())]; - qpreview.setPixel( x, y, qRgba(q.r, q.g, q.b, q.a) ); + qpreview.setPixel( x, y, tqRgba(q.r, q.g, q.b, q.a) ); } } appendItem( infogroup, "Thumbnail", qpreview); @@ -237,10 +237,10 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) #endif TQString UTCOffset; if (utcOffset(h)>0.0) { - UTCOffset.append(TQString("%1").arg(utcOffset(h)/3600, 0, 'f', 1)); + UTCOffset.append(TQString("%1").tqarg(utcOffset(h)/3600, 0, 'f', 1)); UTCOffset.append(" hours behind UTC"); } else { - UTCOffset.append(TQString("%1").arg(-1.0*utcOffset(h)/3600, 0, 'f', 1)); + UTCOffset.append(TQString("%1").tqarg(-1.0*utcOffset(h)/3600, 0, 'f', 1)); UTCOffset.append(" hours ahead of UTC"); } appendItem( stdgroup, "UTC Offset", UTCOffset); @@ -264,10 +264,10 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) if ( hasLongitude(h) ) { TQString Longitude; if (longitude(h)<0.0) { - Longitude.append(TQString("%1").arg(-1.0*longitude(h),0,'f',3)); + Longitude.append(TQString("%1").tqarg(-1.0*longitude(h),0,'f',3)); Longitude.append(" deg West"); } else { - Longitude.append(TQString("%1").arg(longitude(h),0,'f',3)); + Longitude.append(TQString("%1").tqarg(longitude(h),0,'f',3)); Longitude.append(" deg East"); } appendItem( stdgroup, "Longitude", Longitude); @@ -275,17 +275,17 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) if ( hasLatitude(h) ) { TQString Latitude; if (latitude(h)<0.0) { - Latitude.append(TQString("%1").arg(-1.0*latitude(h),0,'f',3)); + Latitude.append(TQString("%1").tqarg(-1.0*latitude(h),0,'f',3)); Latitude.append(" deg South"); } else { - Latitude.append(TQString("%1").arg(latitude(h),0,'f',3)); + Latitude.append(TQString("%1").tqarg(latitude(h),0,'f',3)); Latitude.append(" deg North"); } appendItem( stdgroup, "Latitude", Latitude ); } if ( hasAltitude(h) ) { double Altitude = altitude(h); - appendItem( stdgroup, "Altitude", TQString("%1").arg(Altitude,0,'f',1) ); + appendItem( stdgroup, "Altitude", TQString("%1").tqarg(Altitude,0,'f',1) ); } if ( hasIsoSpeed(h) ) { double IsoSpeed = isoSpeed(h); @@ -344,7 +344,7 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what) // This section deals with some special case stuff for a 3D Studio Max // plugin from Splutterfish. The weird construction is an // attempt to to deal with class conversion. C++ string handling - // without Qt is a pain... + // without TQt is a pain... const StringAttribute *ver3DSM = h.findTypedAttribute <StringAttribute> ("version3dsMax"); if (ver3DSM) { std::string ver3DSMstring = ver3DSM->value(); diff --git a/kfile-plugins/exr/kfile_exr.h b/kfile-plugins/exr/kfile_exr.h index d3718792..ef718b37 100644 --- a/kfile-plugins/exr/kfile_exr.h +++ b/kfile-plugins/exr/kfile_exr.h @@ -29,9 +29,10 @@ class TQStringList; class KExrPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KExrPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); + KExrPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint ); }; diff --git a/kfile-plugins/gif/gif-info.1 b/kfile-plugins/gif/gif-info.1 index 6c36b1c4..f5397472 100644 --- a/kfile-plugins/gif/gif-info.1 +++ b/kfile-plugins/gif/gif-info.1 @@ -15,7 +15,7 @@ displays information about the given gif (Graphic Interchange Format) image. If .PP Write a empty comment ('') to delete the comment block. .PP -The GIF standard allows any number of 256 byte comment blocks in an image file, but most implementations (including this one) restrict you to just one block. The GIF standard restricts comment blocks to "7 Bit ASCII", but this is widely ignored. You are welcome to store text in your own native language, and are especially encouraged to use comments in utf-8 unicode format. +The GIF standard allows any number of 256 byte comment blocks in an image file, but most implementations (including this one) restrict you to just one block. The GIF standard restricts comment blocks to "7 Bit ASCII", but this is widely ignored. You are welcome to store text in your own native language, and are especially encouraged to use comments in utf-8 tqunicode format. .SH "SEE ALSO" .BR wrjpgcom (1) diff --git a/kfile-plugins/gif/kfile_gif.cpp b/kfile-plugins/gif/kfile_gif.cpp index ce54458b..9c45f257 100644 --- a/kfile-plugins/gif/kfile_gif.cpp +++ b/kfile-plugins/gif/kfile_gif.cpp @@ -42,9 +42,9 @@ typedef KGenericFactory<KGifPlugin> GifFactory; K_EXPORT_COMPONENT_FACTORY(kfile_gif, GifFactory("kfile_gif")) -KGifPlugin::KGifPlugin(TQObject *parent, const char *name, +KGifPlugin::KGifPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "gif KFileMetaInfo plugin\n"; @@ -76,7 +76,7 @@ bool KGifPlugin::readInfo( KFileMetaInfo& info, uint what ) TQFile file(info.path()); if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } @@ -84,9 +84,9 @@ bool KGifPlugin::readInfo( KFileMetaInfo& info, uint what ) bool isGIF87a = false; char magic[7]; - Q_UINT16 width = 0; - Q_UINT16 height = 0; - Q_UINT8 miscInfo = 0; + TQ_UINT16 width = 0; + TQ_UINT16 height = 0; + TQ_UINT8 miscInfo = 0; fstream.readRawBytes( magic, 6 ); magic[6] = 0x00; // null terminate diff --git a/kfile-plugins/gif/kfile_gif.h b/kfile-plugins/gif/kfile_gif.h index f4c0be51..a5d69910 100644 --- a/kfile-plugins/gif/kfile_gif.h +++ b/kfile-plugins/gif/kfile_gif.h @@ -27,9 +27,10 @@ class TQStringList; class KGifPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KGifPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KGifPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo ( KFileMetaInfo& info, uint what ); }; diff --git a/kfile-plugins/ico/kfile_ico.cpp b/kfile-plugins/ico/kfile_ico.cpp index e85935fb..2bc46298 100644 --- a/kfile-plugins/ico/kfile_ico.cpp +++ b/kfile-plugins/ico/kfile_ico.cpp @@ -44,10 +44,10 @@ typedef KGenericFactory<KIcoPlugin> IcoFactory; K_EXPORT_COMPONENT_FACTORY(kfile_ico, IcoFactory( "kfile_ico" )) -KIcoPlugin::KIcoPlugin(TQObject *parent, const char *name, +KIcoPlugin::KIcoPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-ico" ); @@ -75,7 +75,7 @@ bool KIcoPlugin::readInfo( KFileMetaInfo& info, uint what) if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } diff --git a/kfile-plugins/ico/kfile_ico.h b/kfile-plugins/ico/kfile_ico.h index b354fe22..81ef53af 100644 --- a/kfile-plugins/ico/kfile_ico.h +++ b/kfile-plugins/ico/kfile_ico.h @@ -27,9 +27,10 @@ class TQStringList; class KIcoPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KIcoPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KIcoPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/jpeg/exif.cpp b/kfile-plugins/jpeg/exif.cpp index b6a2f88b..dd93bd7e 100644 --- a/kfile-plugins/jpeg/exif.cpp +++ b/kfile-plugins/jpeg/exif.cpp @@ -116,7 +116,7 @@ static int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8}; #define TAG_WHITEBALANCE 0x9208 #define TAG_METERING_MODE 0x9207 #define TAG_EXPOSURE_PROGRAM 0x8822 -#define TAG_ISO_EQUIVALENT 0x8827 +#define TAG_ISO_ETQUIVALENT 0x8827 #define TAG_COMPRESSION_LEVEL 0x9102 #define TAG_THUMBNAIL_OFFSET 0x0201 @@ -135,7 +135,7 @@ static int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8}; { 0x10F, "Make"}, { 0x110, "Model"}, { 0x111, "StripOffsets"}, - { 0x112, "Orientation"}, + { 0x112, "Qt::Orientation"}, { 0x115, "SamplesPerPixel"}, { 0x116, "RowsPerStrip"}, { 0x117, "StripByteCounts"}, @@ -282,7 +282,7 @@ int ExifData::ReadJpegSections (TQFile & infile, ReadMode_t ReadMode) if (ReadMode & READ_IMAGE){ unsigned long size; - size = kMax( 0ul, infile.size()-infile.at() ); + size = kMax( 0ul, (unsigned long)(infile.size()-infile.at()) ); Data = (uchar *)malloc(size); if (Data == NULL){ throw FatalError("could not allocate data for entire image"); @@ -525,11 +525,11 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa switch(Tag){ case TAG_MAKE: - ExifData::CameraMake = TQString::fromLatin1((const char*)ValuePtr, 31); + ExifData::CameraMake = TQString::tqfromLatin1((const char*)ValuePtr, 31); break; case TAG_MODEL: - ExifData::CameraModel = TQString::fromLatin1((const char*)ValuePtr, 39); + ExifData::CameraModel = TQString::tqfromLatin1((const char*)ValuePtr, 39); break; case TAG_ORIENTATION: @@ -537,7 +537,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa break; case TAG_DATETIME_ORIGINAL: - DateTime = TQString::fromLatin1((const char*)ValuePtr, 19); + DateTime = TQString::tqfromLatin1((const char*)ValuePtr, 19); break; case TAG_USERCOMMENT: @@ -558,12 +558,12 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa int c; c = (ValuePtr)[a]; if (c != '\0' && c != ' '){ - UserComment = TQString::fromLatin1((const char*)(a+ValuePtr), 199); + UserComment = TQString::tqfromLatin1((const char*)(a+ValuePtr), 199); break; } } }else{ - UserComment = TQString::fromLatin1((const char*)ValuePtr, 199); + UserComment = TQString::tqfromLatin1((const char*)ValuePtr, 199); } break; @@ -660,7 +660,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa ExifData::ExposureProgram = (int)ConvertAnyFormat(ValuePtr, Format); break; - case TAG_ISO_EQUIVALENT: + case TAG_ISO_ETQUIVALENT: ExifData::ISOequivalent = (int)ConvertAnyFormat(ValuePtr, Format); if ( ExifData::ISOequivalent < 50 ) ExifData::ISOequivalent *= 200; break; @@ -803,7 +803,7 @@ void ExifData::process_EXIF(unsigned char * CharBuf, unsigned int length) // printf("Exif section in Motorola order\n"); MotorolaOrder = 1; }else{ - throw FatalError("Invalid Exif alignment marker."); + throw FatalError("Invalid Exif tqalignment marker."); } } diff --git a/kfile-plugins/jpeg/kfile_jpeg.cpp b/kfile-plugins/jpeg/kfile_jpeg.cpp index 5c7e8076..86170b8b 100644 --- a/kfile-plugins/jpeg/kfile_jpeg.cpp +++ b/kfile-plugins/jpeg/kfile_jpeg.cpp @@ -44,9 +44,9 @@ typedef KGenericFactory<KJpegPlugin> JpegFactory; K_EXPORT_COMPONENT_FACTORY(kfile_jpeg, JpegFactory("kfile_jpeg")) -KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name, +KJpegPlugin::KJpegPlugin(TQObject *tqparent, const char *name, const TQStringList &args ) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "jpeg plugin\n"; @@ -84,7 +84,7 @@ KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name, setHint( item, KFileMimeTypeInfo::Size ); setUnit( item, KFileMimeTypeInfo::Pixels ); - item = addItemInfo( exifGroup, "Orientation", i18n("Orientation"), + item = addItemInfo( exifGroup, "Qt::Orientation", i18n("Qt::Orientation"), TQVariant::Int ); item = addItemInfo( exifGroup, "ColorMode", i18n("Color Mode"), @@ -148,12 +148,12 @@ KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name, } TQValidator* KJpegPlugin::createValidator(const KFileMetaInfoItem& /*item*/, - TQObject */*parent*/, + TQObject */*tqparent*/, const char */*name*/ ) const { // no need to return a validator that validates everything as OK :) // if (item.isEditable()) -// return new TQRegExpValidator(TQRegExp(".*"), parent, name); +// return new TQRegExpValidator(TQRegExp(".*"), tqparent, name); // else return 0L; } @@ -178,7 +178,7 @@ bool KJpegPlugin::writeInfo( const KFileMetaInfo& info ) const */ /* The jpeg standard does not regulate the contents of the COM block. - I'm assuming the best thing to do here is write as unicode utf-8, + I'm assuming the best thing to do here is write as tqunicode utf-8, which is fully backwards compatible with readers expecting ascii. Readers expecting a national character set are out of luck... */ @@ -242,7 +242,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) ImageInfo.getHeight() ) ); if ( ImageInfo.getOrientation() ) - appendItem( exifGroup, "Orientation", ImageInfo.getOrientation() ); + appendItem( exifGroup, "Qt::Orientation", ImageInfo.getOrientation() ); appendItem( exifGroup, "ColorMode", ImageInfo.getIsColor() ? i18n("Color") : i18n("Black and white") ); @@ -286,7 +286,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getFocalLength()){ appendItem( exifGroup, "Focal length", - TQString().sprintf("%4.1f", ImageInfo.getFocalLength()) ); + TQString(TQString().sprintf("%4.1f", ImageInfo.getFocalLength()) )); if (ImageInfo.getCCDWidth()){ appendItem( exifGroup, "35mm equivalent", @@ -296,7 +296,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getCCDWidth()){ appendItem( exifGroup, "CCD width", - TQString().sprintf("%4.2f", ImageInfo.getCCDWidth()) ); + TQString(TQString().sprintf("%4.2f", ImageInfo.getCCDWidth()) )); } if (ImageInfo.getExposureTime()){ @@ -310,8 +310,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getApertureFNumber()){ appendItem( exifGroup, "Aperture", - TQString().sprintf("f/%3.1f", - (double)ImageInfo.getApertureFNumber())); + TQString(TQString().sprintf("f/%3.1f", + (double)ImageInfo.getApertureFNumber()))); } if (ImageInfo.getDistance()){ @@ -325,8 +325,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getExposureBias()){ appendItem( exifGroup, "Exposure bias", - TQString().sprintf("%4.2f", - (double)ImageInfo.getExposureBias()) ); + TQString(TQString().sprintf("%4.2f", + (double)ImageInfo.getExposureBias()) )); } if (ImageInfo.getWhitebalance() != -1){ @@ -443,8 +443,8 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what ) if (ImageInfo.getISOequivalent()){ appendItem( exifGroup, "ISO equiv.", - TQString().sprintf("%2d", - (int)ImageInfo.getISOequivalent()) ); + TQString(TQString().sprintf("%2d", + (int)ImageInfo.getISOequivalent()) )); } if (ImageInfo.getCompressionLevel()){ diff --git a/kfile-plugins/jpeg/kfile_jpeg.h b/kfile-plugins/jpeg/kfile_jpeg.h index 70c14501..ec6861d8 100644 --- a/kfile-plugins/jpeg/kfile_jpeg.h +++ b/kfile-plugins/jpeg/kfile_jpeg.h @@ -26,15 +26,16 @@ class KJpegPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KJpegPlugin( TQObject *parent, const char *name, + KJpegPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo ( KFileMetaInfo& info, uint what ); virtual bool writeInfo( const KFileMetaInfo& info ) const; virtual TQValidator* createValidator( const KFileMetaInfoItem& item, - TQObject* parent, const char* name) const; + TQObject* tqparent, const char* name) const; private: TQDateTime parseDateTime( const TQString& string ); diff --git a/kfile-plugins/pcx/kfile_pcx.cpp b/kfile-plugins/pcx/kfile_pcx.cpp index 5dceec9d..bd81e3f7 100644 --- a/kfile-plugins/pcx/kfile_pcx.cpp +++ b/kfile-plugins/pcx/kfile_pcx.cpp @@ -56,8 +56,8 @@ TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph ) return s; } -KPcxPlugin::KPcxPlugin( TQObject *parent, const char *name, - const TQStringList &args ) : KFilePlugin( parent, name, args ) +KPcxPlugin::KPcxPlugin( TQObject *tqparent, const char *name, + const TQStringList &args ) : KFilePlugin( tqparent, name, args ) { kdDebug(7034) << "PCX file meta info plugin" << endl; KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-pcx" ); diff --git a/kfile-plugins/pcx/kfile_pcx.h b/kfile-plugins/pcx/kfile_pcx.h index 2d9b772f..f406e79f 100644 --- a/kfile-plugins/pcx/kfile_pcx.h +++ b/kfile-plugins/pcx/kfile_pcx.h @@ -26,16 +26,16 @@ struct PALETTE { struct { - Q_UINT8 r; - Q_UINT8 g; - Q_UINT8 b; + TQ_UINT8 r; + TQ_UINT8 g; + TQ_UINT8 b; } p[ 16 ]; }; struct PCXHEADER { - Q_UINT8 Manufacturer; // Constant Flag, 10 = ZSoft .pcx - Q_UINT8 Version; // Version information· + TQ_UINT8 Manufacturer; // Constant Flag, 10 = ZSoft .pcx + TQ_UINT8 Version; // Version information· // 0 = Version 2.5 of PC Paintbrush· // 2 = Version 2.8 w/palette information· // 3 = Version 2.8 w/o palette information· @@ -45,37 +45,38 @@ struct PCXHEADER // and PC Paintbrush +, includes // Publisher's Paintbrush . Includes // 24-bit .PCX files· - Q_UINT8 Encoding; // 1 = .PCX run length encoding - Q_UINT8 Bpp; // Number of bits to represent a pixel + TQ_UINT8 Encoding; // 1 = .PCX run length encoding + TQ_UINT8 Bpp; // Number of bits to represent a pixel // (per Plane) - 1, 2, 4, or 8· - Q_UINT16 XMin; - Q_UINT16 YMin; - Q_UINT16 XMax; - Q_UINT16 YMax; - Q_UINT16 HDpi; - Q_UINT16 YDpi; + TQ_UINT16 XMin; + TQ_UINT16 YMin; + TQ_UINT16 XMax; + TQ_UINT16 YMax; + TQ_UINT16 HDpi; + TQ_UINT16 YDpi; struct PALETTE Palette; - Q_UINT8 Reserved; // Should be set to 0. - Q_UINT8 NPlanes; // Number of color planes - Q_UINT16 BytesPerLine; // Number of bytes to allocate for a scanline + TQ_UINT8 Reserved; // Should be set to 0. + TQ_UINT8 NPlanes; // Number of color planes + TQ_UINT16 BytesPerLine; // Number of bytes to allocate for a scanline // plane. MUST be an EVEN number. Do NOT // calculate from Xmax-Xmin.· - Q_UINT16 PaletteInfo; // How to interpret palette- 1 = Color/BW, + TQ_UINT16 PaletteInfo; // How to interpret palette- 1 = Color/BW, // 2 = Grayscale ( ignored in PB IV/ IV + )· - Q_UINT16 HScreenSize; // Horizontal screen size in pixels. New field + TQ_UINT16 HScreenSize; //Qt::Horizontal screen size in pixels. New field // found only in PB IV/IV Plus - Q_UINT16 VScreenSize; // Vertical screen size in pixels. New field + TQ_UINT16 VScreenSize; //Qt::Vertical screen size in pixels. New field // found only in PB IV/IV Plus - Q_UINT8 Filler[ 54 ]; // Blank to fill out 128 byte header. Set all + TQ_UINT8 Filler[ 54 ]; // Blank to fill out 128 byte header. Set all // bytes to 0 }; class KPcxPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KPcxPlugin(TQObject *parent, const char *name, const TQStringList& args); + KPcxPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); private: diff --git a/kfile-plugins/pdf/Makefile.am b/kfile-plugins/pdf/Makefile.am index c8af5244..65a7742b 100644 --- a/kfile-plugins/pdf/Makefile.am +++ b/kfile-plugins/pdf/Makefile.am @@ -10,6 +10,7 @@ noinst_HEADERS = kfile_pdf.h kde_module_LTLIBRARIES = kfile_pdf.la +kfile_pdf_la_COMPILE_FIRST = poppler-qt kfile_pdf_la_SOURCES = kfile_pdf.cpp kfile_pdf_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) kfile_pdf_la_LIBADD = $(LIB_KIO) -L$(top_builddir)/kfile-plugins/pdf/poppler-qt/ -lpoppler-qt diff --git a/kfile-plugins/pdf/kfile_pdf.cpp b/kfile-plugins/pdf/kfile_pdf.cpp index a3dcbde7..d18ada11 100644 --- a/kfile-plugins/pdf/kfile_pdf.cpp +++ b/kfile-plugins/pdf/kfile_pdf.cpp @@ -27,8 +27,8 @@ typedef KGenericFactory<KPdfPlugin> PdfFactory; K_EXPORT_COMPONENT_FACTORY(kfile_pdf, PdfFactory("kfile_pdf")) -KPdfPlugin::KPdfPlugin(TQObject *parent, const char *name, const TQStringList &preferredItems) - : KFilePlugin(parent, name, preferredItems) +KPdfPlugin::KPdfPlugin(TQObject *tqparent, const char *name, const TQStringList &preferredItems) + : KFilePlugin(tqparent, name, preferredItems) { kdDebug(7034) << "pdf plugin\n"; @@ -83,16 +83,16 @@ bool KPdfPlugin::readInfo( KFileMetaInfo& info, uint /* what */) if (doc->isEncrypted()) { enc = i18n("Yes (Can Print:%1 Can Copy:%2 Can Change:%3 Can Add notes:%4)") - .arg(doc->okToPrint() ? i18n("Yes") : i18n("No")) - .arg(doc->okToCopy() ? i18n("Yes") : i18n("No")) - .arg(doc->okToChange() ? i18n("Yes") : i18n("No")) - .arg(doc->okToAddNotes() ? i18n("Yes") : i18n("No")); + .tqarg(doc->okToPrint() ? i18n("Yes") : i18n("No")) + .tqarg(doc->okToCopy() ? i18n("Yes") : i18n("No")) + .tqarg(doc->okToChange() ? i18n("Yes") : i18n("No")) + .tqarg(doc->okToAddNotes() ? i18n("Yes") : i18n("No")); } else enc = i18n("No"); appendItem(generalGroup, "Protected", enc ); appendItem(generalGroup, "Linearized", doc->isLinearized() ? i18n("Yes") : i18n("No") ); - TQString versionString = TQString("%1").arg( doc->getPDFVersion(), 0, 'f', 1 ); + TQString versionString = TQString("%1").tqarg( doc->getPDFVersion(), 0, 'f', 1 ); appendItem(generalGroup, "Version", versionString ); delete doc; diff --git a/kfile-plugins/pdf/kfile_pdf.h b/kfile-plugins/pdf/kfile_pdf.h index eaecdb5d..b14d3989 100644 --- a/kfile-plugins/pdf/kfile_pdf.h +++ b/kfile-plugins/pdf/kfile_pdf.h @@ -29,8 +29,9 @@ class TQStringList; class KPdfPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KPdfPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); + KPdfPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo(KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/pdf/poppler-qt/poppler-document.cc b/kfile-plugins/pdf/poppler-qt/poppler-document.cc index a9a7a319..40e45469 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-document.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-document.cc @@ -20,7 +20,7 @@ */ #include <poppler-qt.h> -#include <qfile.h> +#include <tqfile.h> #include <GlobalParams.h> #include <Outline.h> #include <PDFDoc.h> @@ -36,13 +36,13 @@ namespace Poppler { -Document *Document::load(const QString &filePath) +Document *Document::load(const TQString &filePath) { if (!globalParams) { globalParams = new GlobalParams(); } - DocumentData *doc = new DocumentData(new GooString(QFile::encodeName(filePath)), NULL); + DocumentData *doc = new DocumentData(new GooString(TQFile::encodeName(filePath)), NULL); Document *pdoc; if (doc->doc.isOk() || doc->doc.getErrorCode() == errEncrypted) { pdoc = new Document(doc); @@ -72,7 +72,7 @@ bool Document::isLocked() const return data->locked; } -bool Document::unlock(const QCString &password) +bool Document::unlock(const TQCString &password) { if (data->locked) { /* racier then it needs to be */ @@ -115,14 +115,14 @@ int Document::getNumPages() const return data->doc.getNumPages(); } -QValueList<FontInfo> Document::fonts() const +TQValueList<FontInfo> Document::fonts() const { - QValueList<FontInfo> ourList; + TQValueList<FontInfo> ourList; scanForFonts(getNumPages(), &ourList); return ourList; } -bool Document::scanForFonts( int numPages, QValueList<FontInfo> *fontList ) const +bool Document::scanForFonts( int numPages, TQValueList<FontInfo> *fontList ) const { GooList *items = data->m_fontInfoScanner->scan( numPages ); @@ -130,7 +130,7 @@ bool Document::scanForFonts( int numPages, QValueList<FontInfo> *fontList ) cons return false; for ( int i = 0; i < items->getLength(); ++i ) { - QString fontName; + TQString fontName; if (((::FontInfo*)items->get(i))->getName()) fontName = ((::FontInfo*)items->get(i))->getName()->getCString(); @@ -145,7 +145,7 @@ bool Document::scanForFonts( int numPages, QValueList<FontInfo> *fontList ) cons } /* borrowed from kpdf */ -QString Document::getInfo( const QString & type ) const +TQString Document::getInfo( const TQString & type ) const { // [Albert] Code adapted from pdfinfo.cc on xpdf Object info; @@ -156,7 +156,7 @@ QString Document::getInfo( const QString & type ) const if ( !info.isDict() ) return NULL; - QString result; + TQString result; Object obj; GooString *s1; GBool isUnicode; @@ -189,7 +189,7 @@ QString Document::getInfo( const QString & type ) const u = s1->getChar(i) & 0xff; ++i; } - result += unicodeToQString( &u, 1 ); + result += tqunicodeToTQString( &u, 1 ); } obj.free(); info.free(); @@ -201,43 +201,43 @@ QString Document::getInfo( const QString & type ) const } /* borrowed from kpdf */ -QDateTime Document::getDate( const QString & type ) const +TQDateTime Document::getDate( const TQString & type ) const { // [Albert] Code adapted from pdfinfo.cc on xpdf if ( data->locked ) - return QDateTime(); + return TQDateTime(); Object info; data->doc.getDocInfo( &info ); if ( !info.isDict() ) { info.free(); - return QDateTime(); + return TQDateTime(); } Object obj; int year, mon, day, hour, min, sec, tz_hour, tz_minute; char tz; Dict *infoDict = info.getDict(); - QString result; + TQString result; if ( infoDict->lookup( (char*)type.latin1(), &obj )->isString() ) { - QString s = UnicodeParsedString(obj.getString()); + TQString s = UnicodeParsedString(obj.getString()); // TODO do something with the timezone information if ( parseDateString( s.latin1(), &year, &mon, &day, &hour, &min, &sec, &tz, &tz_hour, &tz_minute ) ) { - QDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??) - QTime t( hour, min, sec ); + TQDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??) + TQTime t( hour, min, sec ); if ( d.isValid() && t.isValid() ) { obj.free(); info.free(); - return QDateTime( d, t ); + return TQDateTime( d, t ); } } } obj.free(); info.free(); - return QDateTime(); + return TQDateTime(); } bool Document::isEncrypted() const @@ -283,7 +283,7 @@ void Document::getPdfVersion(int *major, int *minor) const *minor = data->doc.getPDFMinorVersion(); } -QDomDocument *Document::toc() const +TQDomDocument *Document::toc() const { Outline * outline = data->doc.getOutline(); if ( !outline ) @@ -293,33 +293,33 @@ QDomDocument *Document::toc() const if ( !items || items->getLength() < 1 ) return NULL; - QDomDocument *toc = new QDomDocument(); + TQDomDocument *toc = new TQDomDocument(); if ( items->getLength() > 0 ) data->addTocChildren( toc, toc, items ); return toc; } -LinkDestination *Document::linkDestination( const QString &name ) +LinkDestination *Document::linkDestination( const TQString &name ) { - GooString * namedDest = QStringToGooString( name ); + GooString * namedDest = TQStringToGooString( name ); LinkDestinationData ldd(NULL, namedDest, data); LinkDestination *ld = new LinkDestination(ldd); delete namedDest; return ld; } -bool Document::print(const QString &fileName, QValueList<int> pageList, double hDPI, double vDPI, int rotate) +bool Document::print(const TQString &fileName, TQValueList<int> pageList, double hDPI, double vDPI, int rotate) { return print(fileName, pageList, hDPI, vDPI, rotate, -1, -1); } -bool Document::print(const QString &file, QValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight) +bool Document::print(const TQString &file, TQValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight) { PSOutputDev *psOut = new PSOutputDev(file.latin1(), data->doc.getXRef(), data->doc.getCatalog(), NULL, 1, data->doc.getNumPages(), psModePS, paperWidth, paperHeight); if (psOut->isOk()) { - QValueList<int>::iterator it; + TQValueList<int>::iterator it; for (it = pageList.begin(); it != pageList.end(); ++it ) data->doc.displayPage(psOut, *it, hDPI, vDPI, rotate, gFalse, gTrue, gTrue); diff --git a/kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc b/kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc index 6eb9d26f..c0e777a7 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-fontinfo.cc @@ -23,13 +23,13 @@ namespace Poppler { class FontInfoData { public: - QString fontName; + TQString fontName; bool isEmbedded; bool isSubset; FontInfo::Type type; }; -FontInfo::FontInfo( const QString &fontName, const bool isEmbedded, const bool isSubset, Type type ) +FontInfo::FontInfo( const TQString &fontName, const bool isEmbedded, const bool isSubset, Type type ) { data = new FontInfoData(); data->fontName = fontName; @@ -60,7 +60,7 @@ FontInfo::~FontInfo() delete data; } -const QString &FontInfo::name() const +const TQString &FontInfo::name() const { return data->fontName; } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h b/kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h index 82127207..fc22d8ed 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h +++ b/kfile-plugins/pdf/poppler-qt/poppler-link-qt3.h @@ -21,8 +21,8 @@ #ifndef _POPPLER_LINK_H_ #define _POPPLER_LINK_H_ -#include <qstring.h> -#include <qrect.h> +#include <tqstring.h> +#include <tqrect.h> namespace Poppler { @@ -44,7 +44,7 @@ class LinkDestination }; LinkDestination(const LinkDestinationData &data); - LinkDestination(const QString &description); + LinkDestination(const TQString &description); // Accessors. Kind kind() const; @@ -58,7 +58,7 @@ class LinkDestination bool isChangeTop() const; bool isChangeZoom() const; - QString toString() const; + TQString toString() const; private: Kind m_kind; // destination type @@ -80,7 +80,7 @@ class LinkDestination class Link { public: - Link( const QRect &linkArea ); + Link( const TQRect &linkArea ); // get link type (inherited classes mustreturn an unique identifier) enum LinkType { None, Goto, Execute, Browse, Action, Movie }; @@ -89,10 +89,10 @@ class Link // virtual destructor virtual ~Link(); - QRect linkArea() const; + TQRect linkArea() const; private: - QRect m_linkArea; + TQRect m_linkArea; }; @@ -100,16 +100,16 @@ class Link class LinkGoto : public Link { public: - LinkGoto( const QRect &linkArea, QString extFileName, const LinkDestination & destination ); + LinkGoto( const TQRect &linkArea, TQString extFileName, const LinkDestination & destination ); // query for goto parameters bool isExternal() const; - const QString & fileName() const; + const TQString & fileName() const; const LinkDestination & destination() const; LinkType linkType() const; private: - QString m_extFileName; + TQString m_extFileName; LinkDestination m_destination; }; @@ -118,16 +118,16 @@ class LinkExecute : public Link { public: // query for filename / parameters - const QString & fileName() const; - const QString & parameters() const; + const TQString & fileName() const; + const TQString & parameters() const; // create a Link_Execute - LinkExecute( const QRect &linkArea, const QString & file, const QString & params ); + LinkExecute( const TQRect &linkArea, const TQString & file, const TQString & params ); LinkType linkType() const; private: - QString m_fileName; - QString m_parameters; + TQString m_fileName; + TQString m_parameters; }; /** Browse: an URL to open, ranging from 'http://' to 'mailto:' etc.. **/ @@ -135,14 +135,14 @@ class LinkBrowse : public Link { public: // query for URL - const QString & url() const; + const TQString & url() const; // create a Link_Browse - LinkBrowse( const QRect &linkArea, const QString &url ); + LinkBrowse( const TQRect &linkArea, const TQString &url ); LinkType linkType() const; private: - QString m_url; + TQString m_url; }; /** Action: contains an action to perform on document / viewer **/ @@ -167,7 +167,7 @@ class LinkAction : public Link ActionType actionType() const; // create a Link_Action - LinkAction( const QRect &linkArea, ActionType actionType ); + LinkAction( const TQRect &linkArea, ActionType actionType ); LinkType linkType() const; private: @@ -179,7 +179,7 @@ class LinkMovie : public Link // TODO this (Movie link) { public: - LinkMovie( const QRect &linkArea ); + LinkMovie( const TQRect &linkArea ); LinkType linkType() const; }; diff --git a/kfile-plugins/pdf/poppler-qt/poppler-link.cc b/kfile-plugins/pdf/poppler-qt/poppler-link.cc index af6d6452..72db1fff 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-link.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-link.cc @@ -21,7 +21,7 @@ #include <poppler-qt.h> #include <poppler-private.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <Link.h> @@ -80,9 +80,9 @@ namespace Poppler { if (deleteDest) delete ld; } - LinkDestination::LinkDestination(const QString &description) + LinkDestination::LinkDestination(const TQString &description) { - QStringList tokens = QStringList::split(';', description); + TQStringList tokens = TQStringList::split(';', description); m_kind = static_cast<Kind>(tokens[0].toInt()); m_pageNum = tokens[1].toInt(); m_left = tokens[2].toDouble(); @@ -145,18 +145,18 @@ namespace Poppler { return m_changeZoom; } - QString LinkDestination::toString() const - { - QString s = QString::number( (Q_INT8)m_kind ); - s += ";" + QString::number( m_pageNum ); - s += ";" + QString::number( m_left ); - s += ";" + QString::number( m_bottom ); - s += ";" + QString::number( m_right ); - s += ";" + QString::number( m_top ); - s += ";" + QString::number( m_zoom ); - s += ";" + QString::number( (Q_INT8)m_changeLeft ); - s += ";" + QString::number( (Q_INT8)m_changeTop ); - s += ";" + QString::number( (Q_INT8)m_changeZoom ); + TQString LinkDestination::toString() const + { + TQString s = TQString::number( (TQ_INT8)m_kind ); + s += ";" + TQString::number( m_pageNum ); + s += ";" + TQString::number( m_left ); + s += ";" + TQString::number( m_bottom ); + s += ";" + TQString::number( m_right ); + s += ";" + TQString::number( m_top ); + s += ";" + TQString::number( m_zoom ); + s += ";" + TQString::number( (TQ_INT8)m_changeLeft ); + s += ";" + TQString::number( (TQ_INT8)m_changeTop ); + s += ";" + TQString::number( (TQ_INT8)m_changeZoom ); return s; } @@ -166,7 +166,7 @@ namespace Poppler { { } - Link::Link(const QRect &linkArea) : m_linkArea(linkArea) + Link::Link(const TQRect &linkArea) : m_linkArea(linkArea) { } @@ -175,13 +175,13 @@ namespace Poppler { return None; } - QRect Link::linkArea() const + TQRect Link::linkArea() const { return m_linkArea; } // LinkGoto - LinkGoto::LinkGoto( const QRect &linkArea, QString extFileName, const LinkDestination & destination ) : Link(linkArea), m_extFileName(extFileName), m_destination(destination) + LinkGoto::LinkGoto( const TQRect &linkArea, TQString extFileName, const LinkDestination & destination ) : Link(linkArea), m_extFileName(extFileName), m_destination(destination) { } @@ -190,7 +190,7 @@ namespace Poppler { return !m_extFileName.isEmpty(); } - const QString &LinkGoto::fileName() const + const TQString &LinkGoto::fileName() const { return m_extFileName; } @@ -206,15 +206,15 @@ namespace Poppler { } // LinkExecute - LinkExecute::LinkExecute( const QRect &linkArea, const QString & file, const QString & params ) : Link(linkArea), m_fileName(file), m_parameters(params) + LinkExecute::LinkExecute( const TQRect &linkArea, const TQString & file, const TQString & params ) : Link(linkArea), m_fileName(file), m_parameters(params) { } - const QString & LinkExecute::fileName() const + const TQString & LinkExecute::fileName() const { return m_fileName; } - const QString & LinkExecute::parameters() const + const TQString & LinkExecute::parameters() const { return m_parameters; } @@ -225,11 +225,11 @@ namespace Poppler { } // LinkBrowse - LinkBrowse::LinkBrowse( const QRect &linkArea, const QString &url ) : Link(linkArea), m_url(url) + LinkBrowse::LinkBrowse( const TQRect &linkArea, const TQString &url ) : Link(linkArea), m_url(url) { } - const QString & LinkBrowse::url() const + const TQString & LinkBrowse::url() const { return m_url; } @@ -240,7 +240,7 @@ namespace Poppler { } // LinkAction - LinkAction::LinkAction( const QRect &linkArea, ActionType actionType ) : Link(linkArea), m_type(actionType) + LinkAction::LinkAction( const TQRect &linkArea, ActionType actionType ) : Link(linkArea), m_type(actionType) { } @@ -255,7 +255,7 @@ namespace Poppler { } // LinkMovie - LinkMovie::LinkMovie( const QRect &linkArea ) : Link(linkArea) + LinkMovie::LinkMovie( const TQRect &linkArea ) : Link(linkArea) { } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-page-transition.cc b/kfile-plugins/pdf/poppler-qt/poppler-page-transition.cc index cde8818d..9998f738 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-page-transition.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-page-transition.cc @@ -68,7 +68,7 @@ int PageTransition::duration() const return data->pt->getDuration(); } -PageTransition::Alignment PageTransition::alignment() const +PageTransition::Alignment PageTransition::tqalignment() const { return (Poppler::PageTransition::Alignment)data->pt->getAlignment(); } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-page-transition.h b/kfile-plugins/pdf/poppler-qt/poppler-page-transition.h index 53002ff9..f33a014c 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-page-transition.h +++ b/kfile-plugins/pdf/poppler-qt/poppler-page-transition.h @@ -60,7 +60,7 @@ class PageTransition { Fade }; - /** \brief alignment of the transition effect that shall be used + /** \brief tqalignment of the transition effect that shall be used */ // if changed remember to keep in sync with PageTransition.h enum enum Alignment { @@ -114,7 +114,7 @@ class PageTransition { /** \brief Get dimension in which the transition effect occurs. */ - Alignment alignment() const; + Alignment tqalignment() const; /** \brief Get direction of motion of the transition effect. diff --git a/kfile-plugins/pdf/poppler-qt/poppler-page.cc b/kfile-plugins/pdf/poppler-qt/poppler-page.cc index a42aa15c..b6be9bd1 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-page.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-page.cc @@ -23,8 +23,8 @@ */ #include <poppler-qt.h> -#include <qfile.h> -#include <qimage.h> +#include <tqfile.h> +#include <tqimage.h> #include <config.h> #include <GlobalParams.h> #include <PDFDoc.h> @@ -62,18 +62,18 @@ Page::~Page() delete data; } -void Page::renderToPixmap(QPixmap **q, int x, int y, int w, int h, bool doLinks) const +void Page::renderToPixmap(TQPixmap **q, int x, int y, int w, int h, bool doLinks) const { renderToPixmap(q, x, y, w, h, 72.0, 72.0, doLinks); } -void Page::renderToPixmap(QPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks) const +void Page::renderToPixmap(TQPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks) const { - QImage img = renderToImage(xres, yres, doLinks); - *q = new QPixmap( img ); + TQImage img = renderToImage(xres, yres, doLinks); + *q = new TQPixmap( img ); } -QImage Page::renderToImage(double xres, double yres, bool doLinks) const +TQImage Page::renderToImage(double xres, double yres, bool doLinks) const { #if defined(HAVE_SPLASH) SplashOutputDev *output_dev; @@ -89,7 +89,7 @@ QImage Page::renderToImage(double xres, double yres, bool doLinks) const int bh = output_dev->getBitmap()->getHeight(); SplashColorPtr dataPtr = output_dev->getBitmap()->getDataPtr(); - if (QImage::BigEndian == QImage::systemByteOrder()) + if (TQImage::BigEndian == TQImage::systemByteOrder()) { uchar c; int count = bw * bh * 4; @@ -106,7 +106,7 @@ QImage Page::renderToImage(double xres, double yres, bool doLinks) const } // construct a qimage SHARING the raw bitmap data in memory - QImage img( dataPtr, bw, bh, 32, 0, 0, QImage::IgnoreEndian ); + TQImage img( dataPtr, bw, bh, 32, 0, 0, TQImage::IgnoreEndian ); img = img.copy(); // unload underlying xpdf bitmap output_dev->startPage( 0, NULL ); @@ -117,16 +117,16 @@ QImage Page::renderToImage(double xres, double yres, bool doLinks) const (void)xres; (void)doLinks; - return QImage(); + return TQImage(); #endif } -QString Page::getText(const Rectangle &r) const +TQString Page::getText(const Rectangle &r) const { TextOutputDev *output_dev; GooString *s; PDFRectangle *rect; - QString result; + TQString result; ::Page *p; output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); @@ -147,18 +147,18 @@ QString Page::getText(const Rectangle &r) const s = output_dev->getText(r.m_x1, y1, r.m_x2, y2); } - result = QString::fromUtf8(s->getCString()); + result = TQString::fromUtf8(s->getCString()); delete output_dev; delete s; return result; } -QValueList<TextBox*> Page::textList() const +TQValueList<TextBox*> Page::textList() const { TextOutputDev *output_dev; - QValueList<TextBox*> output_list; + TQValueList<TextBox*> output_list; output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); @@ -175,7 +175,7 @@ QValueList<TextBox*> Page::textList() const for (int i = 0; i < word_list->getLength(); i++) { TextWord *word = word_list->get(i); GooString *word_str = word->getText(); - QString string = QString::fromUtf8(word_str->getCString()); + TQString string = TQString::fromUtf8(word_str->getCString()); delete word_str; double xMin, yMin, xMax, yMax; word->getBBox(&xMin, &yMin, &xMax, &yMax); @@ -204,15 +204,15 @@ PageTransition *Page::getTransition() const return data->transition; } -QSize Page::pageSize() const +TQSize Page::pageSize() const { ::Page *p; p = data->doc->data->doc.getCatalog()->getPage(data->index + 1); if ( ( Page::Landscape == orientation() ) || (Page::Seascape == orientation() ) ) { - return QSize( (int)p->getCropHeight(), (int)p->getCropWidth() ); + return TQSize( (int)p->getCropHeight(), (int)p->getCropWidth() ); } else { - return QSize( (int)p->getCropWidth(), (int)p->getCropHeight() ); + return TQSize( (int)p->getCropWidth(), (int)p->getCropHeight() ); } } @@ -236,9 +236,9 @@ Page::Orientation Page::orientation() const } } -QValueList<Link*> Page::links() const +TQValueList<Link*> Page::links() const { - QValueList<Link*> popplerLinks; + TQValueList<Link*> popplerLinks; #if defined(HAVE_SPLASH) Links *xpdfLinks = data->doc->data->doc.getLinks(data->index + 1); @@ -249,7 +249,7 @@ QValueList<Link*> Page::links() const double left, top, right, bottom; int leftAux, topAux, rightAux, bottomAux; xpdfLink->getRect( &left, &top, &right, &bottom ); - QRect linkArea; + TQRect linkArea; data->doc->data->m_outputDev->cvtUserToDev( left, top, &leftAux, &topAux ); data->doc->data->m_outputDev->cvtUserToDev( right, bottom, &rightAux, &bottomAux ); @@ -270,7 +270,7 @@ QValueList<Link*> Page::links() const { LinkGoTo * g = (LinkGoTo *) a; // create link: no ext file, namedDest, object pointer - popplerLink = new LinkGoto( linkArea, QString::null, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) ); + popplerLink = new LinkGoto( linkArea, TQString(), LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) ); } break; @@ -278,7 +278,7 @@ QValueList<Link*> Page::links() const { LinkGoToR * g = (LinkGoToR *) a; // copy link file - const QString fileName = UnicodeParsedString( g->getFileName() ); + const TQString fileName = UnicodeParsedString( g->getFileName() ); // ceate link: fileName, namedDest, object pointer popplerLink = new LinkGoto( linkArea, fileName, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) ); } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-private.cc b/kfile-plugins/pdf/poppler-qt/poppler-private.cc index 2388a1b5..6d209c2b 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-private.cc +++ b/kfile-plugins/pdf/poppler-qt/poppler-private.cc @@ -23,7 +23,7 @@ #include "poppler-private.h" #include "poppler-link-qt3.h" -#include <qstring.h> +#include <tqstring.h> #include <Outline.h> #include <Link.h> @@ -31,22 +31,22 @@ namespace Poppler { /* borrowed from kpdf */ -QString unicodeToQString(Unicode* u, int len) +TQString tqunicodeToTQString(Unicode* u, int len) { - QString ret; + TQString ret; ret.setLength(len); - QChar* qch = (QChar*) ret.unicode(); + TQChar* qch = (TQChar*) ret.tqunicode(); for (;len;--len) - *qch++ = (QChar) *u++; + *qch++ = (TQChar) *u++; return ret; } -QString UnicodeParsedString(GooString *s1) +TQString UnicodeParsedString(GooString *s1) { GBool isUnicode; int i; Unicode u; - QString result; + TQString result; if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff ) { isUnicode = gTrue; @@ -69,24 +69,24 @@ QString UnicodeParsedString(GooString *s1) u = s1->getChar(i) & 0xff; ++i; } - result += unicodeToQString( &u, 1 ); + result += tqunicodeToTQString( &u, 1 ); } return result; } -GooString *QStringToGooString(const QString &s) +GooString *TQStringToGooString(const TQString &s) { int len = s.length(); char *cstring = (char *)gmallocn(s.length(), sizeof(char)); for (int i = 0; i < len; ++i) - cstring[i] = s.at(i).unicode(); + cstring[i] = s.tqat(i).tqunicode(); GooString *ret = new GooString(cstring, len); gfree(cstring); return ret; } -void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items ) +void DocumentData::addTocChildren( TQDomDocument * docSyn, TQDomNode * tqparent, GooList * items ) { int numItems = items->getLength(); for ( int i = 0; i < numItems; ++i ) @@ -95,15 +95,15 @@ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, Goo OutlineItem * outlineItem = (OutlineItem *)items->get( i ); // 1. create element using outlineItem's title as tagName - QString name; + TQString name; Unicode * uniChar = outlineItem->getTitle(); int titleLength = outlineItem->getTitleLength(); - name = unicodeToQString(uniChar, titleLength); + name = tqunicodeToTQString(uniChar, titleLength); if ( name.isEmpty() ) continue; - QDomElement item = docSyn->createElement( name ); - parent->appendChild( item ); + TQDomElement item = docSyn->createElement( name ); + tqparent->appendChild( item ); // 2. find the page the link refers to ::LinkAction * a = outlineItem->getAction(); @@ -118,9 +118,9 @@ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, Goo // get the destination for the page now, but it's VERY time consuming, // so better storing the reference and provide the viewport on demand GooString *s = g->getNamedDest(); - QChar *charArray = new QChar[s->getLength()]; - for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]); - QString aux(charArray, s->getLength()); + TQChar *charArray = new TQChar[s->getLength()]; + for (int i = 0; i < s->getLength(); ++i) charArray[i] = TQChar(s->getCString()[i]); + TQString aux(charArray, s->getLength()); item.setAttribute( "DestinationName", aux ); delete[] charArray; } @@ -136,11 +136,11 @@ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, Goo } } - // 3. recursively descend over children + // 3. recursively descend over tqchildren outlineItem->open(); - GooList * children = outlineItem->getKids(); - if ( children ) - addTocChildren( docSyn, &item, children ); + GooList * tqchildren = outlineItem->getKids(); + if ( tqchildren ) + addTocChildren( docSyn, &item, tqchildren ); } } diff --git a/kfile-plugins/pdf/poppler-qt/poppler-private.h b/kfile-plugins/pdf/poppler-qt/poppler-private.h index 0d68e505..b1b79084 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-private.h +++ b/kfile-plugins/pdf/poppler-qt/poppler-private.h @@ -23,7 +23,7 @@ #ifndef POPPLER_PRIVATE_H #define POPPLER_PRIVATE_H -#include <qdom.h> +#include <tqdom.h> #include <config.h> #include <Object.h> @@ -39,11 +39,11 @@ namespace Poppler { class DocumentData; -QString unicodeToQString(Unicode* u, int len); +TQString tqunicodeToTQString(Unicode* u, int len); -QString UnicodeParsedString(GooString *s1); +TQString UnicodeParsedString(GooString *s1); -GooString *QStringToGooString(const QString &s); +GooString *TQStringToGooString(const TQString &s); class LinkDestinationData { public: @@ -84,7 +84,7 @@ class DocumentData { return m_outputDev; } - void addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items ); + void addTocChildren( TQDomDocument * docSyn, TQDomNode * tqparent, GooList * items ); class PDFDoc doc; bool locked; diff --git a/kfile-plugins/pdf/poppler-qt/poppler-qt.h b/kfile-plugins/pdf/poppler-qt/poppler-qt.h index a6b1e6ec..9150ee3b 100644 --- a/kfile-plugins/pdf/poppler-qt/poppler-qt.h +++ b/kfile-plugins/pdf/poppler-qt/poppler-qt.h @@ -20,16 +20,16 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __POPPLER_QT_H__ -#define __POPPLER_QT_H__ +#ifndef __POPPLER_TQT_H__ +#define __POPPLER_TQT_H__ #include "poppler-link-qt3.h" #include "poppler-page-transition.h" -#include <qcstring.h> -#include <qdatetime.h> -#include <qdom.h> -#include <qpixmap.h> +#include <tqcstring.h> +#include <tqdatetime.h> +#include <tqdom.h> +#include <tqpixmap.h> namespace Poppler { @@ -53,14 +53,14 @@ class Rectangle class TextBox { public: - TextBox(const QString& text, const Rectangle &bBox) : + TextBox(const TQString& text, const Rectangle &bBox) : m_text(text), m_bBox(bBox) {}; - QString getText() const { return m_text; }; + TQString getText() const { return m_text; }; Rectangle getBoundingBox() const { return m_bBox; }; private: - QString m_text; + TQString m_text; Rectangle m_bBox; }; @@ -89,7 +89,7 @@ public: /** Create a new font information container */ - FontInfo( const QString &fontName, const bool isEmbedded, + FontInfo( const TQString &fontName, const bool isEmbedded, const bool isSubset, Type type ); FontInfo(); @@ -99,9 +99,9 @@ public: ~FontInfo(); /** - The name of the font. Can be QString::null if the font has no name + The name of the font. Can be TQString() if the font has no name */ - const QString &name() const; + const TQString &name() const; /** Whether the font is embedded in the file, or not @@ -123,7 +123,7 @@ public: */ Type type() const; - const QString &typeName() const; + const TQString &typeName() const; private: FontInfoData *data; @@ -134,7 +134,7 @@ class Page { friend class Document; public: ~Page(); - void renderToPixmap(QPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks = false) const; + void renderToPixmap(TQPixmap **q, int x, int y, int w, int h, double xres, double yres, bool doLinks = false) const; /** This is a convenience function that is equivalent to @@ -143,12 +143,12 @@ class Page { \sa renderToImage() */ - void renderToPixmap(QPixmap **q, int x, int y, int w, int h, bool doLinks = false) const; + void renderToPixmap(TQPixmap **q, int x, int y, int w, int h, bool doLinks = false) const; /** - \brief Render the page to a QImage using the Splash renderer + \brief Render the page to a TQImage using the Splash renderer - This method can be used to render the page to a QImage. It + This method can be used to render the page to a TQImage. It uses the "Splash" rendering engine. \param xres horizontal resolution of the graphics device, @@ -157,24 +157,24 @@ class Page { \param yres vertical resolution of the graphics device, in dots per inch (defaults to 72 dpi) - \returns a QImage of the page. + \returns a TQImage of the page. \sa renderToPixmap() */ - QImage renderToImage(double xres = 72.0, double yres = 72.0, bool doLinks = false) const; + TQImage renderToImage(double xres = 72.0, double yres = 72.0, bool doLinks = false) const; /** * Returns the size of the page in points **/ - QSize pageSize() const; + TQSize pageSize() const; /** * Returns the text that is inside the Rectangle r * If r is a null Rectangle all text of the page is given **/ - QString getText(const Rectangle &r) const; + TQString getText(const Rectangle &r) const; - QValueList<TextBox*> textList() const; + TQValueList<TextBox*> textList() const; /** * Returns the transition of this page @@ -196,7 +196,7 @@ class Page { /** Gets the links of the page once it has been rendered if doLinks was true */ - QValueList<Link*> links() const; + TQValueList<Link*> links() const; private: Page(const Document *doc, int index); @@ -217,7 +217,7 @@ public: UseOC }; - static Document *load(const QString & filePath); + static Document *load(const TQString & filePath); Page *getPage(int index) const{ return new Page(this, index); } @@ -225,12 +225,12 @@ public: PageMode getPageMode() const; - bool unlock(const QCString &password); + bool unlock(const TQCString &password); bool isLocked() const; - QDateTime getDate( const QString & data ) const; - QString getInfo( const QString & data ) const; + TQDateTime getDate( const TQString & data ) const; + TQString getInfo( const TQString & data ) const; bool isEncrypted() const; bool isLinearized() const; bool okToPrint() const; @@ -251,16 +251,16 @@ public: */ void getPdfVersion(int *major, int *minor) const; - bool print(const QString &fileName, QValueList<int> pageList, double hDPI, double vDPI, int rotate); + bool print(const TQString &fileName, TQValueList<int> pageList, double hDPI, double vDPI, int rotate); - // If you are using QPrinter you can get paper size doing - // QPrinter dummy(QPrinter::PrinterResolution); + // If you are using TQPrinter you can get paper size doing + // TQPrinter dummy(TQPrinter::PrinterResolution); // dummy.setFullPage(true); // dummy.setPageSize(thePageSizeYouWant); - // QPaintDeviceMetrics metrics(&dummy); + // TQPaintDeviceMetrics metrics(&dummy); // int width = metrics.width(); // int height = metrics.height(); - bool print(const QString &fileName, QValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight); + bool print(const TQString &fileName, TQValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight); /** The fonts within the PDF document. @@ -269,7 +269,7 @@ public: document. You may wish to use the call below if you have more than say 20 pages */ - QValueList<FontInfo> fonts() const; + TQValueList<FontInfo> fonts() const; /** \overload @@ -280,7 +280,7 @@ public: \return false if the end of the document has been reached */ - bool scanForFonts( int numPages, QValueList<FontInfo> *fontList ) const; + bool scanForFonts( int numPages, TQValueList<FontInfo> *fontList ) const; /** Gets the TOC of the Document, it is application responsabiliy to delete @@ -295,9 +295,9 @@ public: \returns NULL if the Document does not have TOC */ - QDomDocument *toc() const; + TQDomDocument *toc() const; - LinkDestination *linkDestination( const QString &name ); + LinkDestination *linkDestination( const TQString &name ); ~Document(); diff --git a/kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp b/kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp index d97954b8..d616290d 100644 --- a/kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp +++ b/kfile-plugins/pdf/poppler-qt/test-poppler-qt.cpp @@ -1,27 +1,27 @@ -#include <qapplication.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qmessagebox.h> -#include <qfile.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqmessagebox.h> +#include <tqfile.h> #include <ctype.h> #include <poppler-qt.h> #include <stdlib.h> -class PDFDisplay : public QWidget // picture display widget +class PDFDisplay : public TQWidget // picture display widget { public: PDFDisplay( Poppler::Document *d ); ~PDFDisplay(); protected: - void paintEvent( QPaintEvent * ); - void keyPressEvent( QKeyEvent * ); + void paintEvent( TQPaintEvent * ); + void keyPressEvent( TQKeyEvent * ); private: void display(); int currentPage; - QPixmap *pixmap; + TQPixmap *pixmap; Poppler::Document *doc; }; @@ -39,16 +39,16 @@ PDFDisplay::~PDFDisplay() delete pixmap; } -void PDFDisplay::paintEvent( QPaintEvent *e ) +void PDFDisplay::paintEvent( TQPaintEvent *e ) { - QPainter paint( this ); // paint widget + TQPainter paint( this ); // paint widget if (pixmap) paint.drawPixmap(0, 0, *pixmap); } -void PDFDisplay::keyPressEvent( QKeyEvent *e ) +void PDFDisplay::keyPressEvent( TQKeyEvent *e ) { - if (e->key() == Qt::Key_Down) + if (e->key() == TQt::Key_Down) { if (currentPage + 1 < doc->getNumPages()) { @@ -56,7 +56,7 @@ void PDFDisplay::keyPressEvent( QKeyEvent *e ) display(); } } - else if (e->key() == Qt::Key_Up) + else if (e->key() == TQt::Key_Up) { if (currentPage > 0) { @@ -83,7 +83,7 @@ void PDFDisplay::display() int main( int argc, char **argv ) { - QApplication a( argc, argv ); // QApplication required! + TQApplication a( argc, argv ); // TQApplication required! if ( argc < 2 || (argc == 3 && strcmp(argv[2], "-extract") != 0) || argc > 3) { @@ -103,7 +103,7 @@ int main( int argc, char **argv ) { PDFDisplay test( doc ); // create picture display a.setMainWidget( &test); // set main widget - test.setCaption("Poppler-Qt Test"); + test.setCaption("Poppler-TQt Test"); test.show(); // show it return a.exec(); // start event loop @@ -112,7 +112,7 @@ int main( int argc, char **argv ) { Poppler::Page *page = doc->getPage(0); - QLabel *l = new QLabel(page->getText(Poppler::Rectangle()), 0); + TQLabel *l = new TQLabel(page->getText(Poppler::Rectangle()), 0); l->show(); a.setMainWidget(l); // set main widget delete page; diff --git a/kfile-plugins/png/kfile_png.cpp b/kfile-plugins/png/kfile_png.cpp index 531fdfe3..2f128cf7 100644 --- a/kfile-plugins/png/kfile_png.cpp +++ b/kfile-plugins/png/kfile_png.cpp @@ -87,9 +87,9 @@ typedef KGenericFactory<KPngPlugin> PngFactory; K_EXPORT_COMPONENT_FACTORY(kfile_png, PngFactory("kfile_png")) -KPngPlugin::KPngPlugin(TQObject *parent, const char *name, +KPngPlugin::KPngPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "png plugin\n"; diff --git a/kfile-plugins/png/kfile_png.h b/kfile-plugins/png/kfile_png.h index 54e626de..1622efbe 100644 --- a/kfile-plugins/png/kfile_png.h +++ b/kfile-plugins/png/kfile_png.h @@ -29,9 +29,10 @@ class TQStringList; class KPngPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KPngPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); + KPngPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint ); }; diff --git a/kfile-plugins/pnm/kfile_pnm.cpp b/kfile-plugins/pnm/kfile_pnm.cpp index abe576b4..ae54b78d 100644 --- a/kfile-plugins/pnm/kfile_pnm.cpp +++ b/kfile-plugins/pnm/kfile_pnm.cpp @@ -33,7 +33,7 @@ typedef KGenericFactory<KPnmPlugin> PnmFactory; K_EXPORT_COMPONENT_FACTORY(kfile_pnm, PnmFactory("kfile_pnm")) -KPnmPlugin::KPnmPlugin(TQObject *parent, const char *name, const TQStringList &args) : KFilePlugin(parent, name, args) +KPnmPlugin::KPnmPlugin(TQObject *tqparent, const char *name, const TQStringList &args) : KFilePlugin(tqparent, name, args) { makeMimeTypeInfo( "image/x-portable-bitmap" ); makeMimeTypeInfo( "image/x-portable-greymap" ); @@ -93,7 +93,7 @@ bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) comments += '\n'; } // image size - // unfortunately Qt doesn't have some kind of push-back method for + // unfortunately TQt doesn't have some kind of push-back method for // TQTextStream, so we need to manually decode the first part of the // image size. if( c >= '0' && c <= '9' ) { diff --git a/kfile-plugins/pnm/kfile_pnm.h b/kfile-plugins/pnm/kfile_pnm.h index 59b146e5..3b54bdbe 100644 --- a/kfile-plugins/pnm/kfile_pnm.h +++ b/kfile-plugins/pnm/kfile_pnm.h @@ -27,9 +27,10 @@ class TQStringList; class KPnmPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KPnmPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems ); + KPnmPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint ); private: diff --git a/kfile-plugins/ps/gscreator.cpp b/kfile-plugins/ps/gscreator.cpp index 0f0c50e8..9a9bafd7 100644 --- a/kfile-plugins/ps/gscreator.cpp +++ b/kfile-plugins/ps/gscreator.cpp @@ -20,7 +20,7 @@ */ /* This function gets a path of a DVI, EPS, PS or PDF file and - produces a PNG-Thumbnail which is stored as a QImage + produces a PNG-Thumbnail which is stored as a TQImage The program works as follows @@ -46,7 +46,7 @@ 9. Turn the PS,PDF or EPS file into a PNG file using gs 10. Parent process (1) - store data in a QImage + store data in a TQImage */ #ifdef HAVE_CONFIG_H @@ -176,7 +176,7 @@ bool GSCreator::create(const TQString &path, int width, int height, TQImage &img { // The code in the loop (when testing whether got_sig_term got set) // should read some variation of: -// parentJob()->wasKilled() +// tqparentJob()->wasKilled() // // Unfortunatelly, that's currently impossible without breaking BIC. // So we need to catch the signal ourselves. @@ -234,7 +234,7 @@ bool GSCreator::create(const TQString &path, int width, int height, TQImage &img } const bool is_encapsulated = no_dvi && - (path.find(TQRegExp("\\.epsi?$", false, false)) > 0) && + (path.tqfind(TQRegExp("\\.epsi?$", false, false)) > 0) && (dsc.bbox()->width() > 0) && (dsc.bbox()->height() > 0) && (dsc.page_count() <= 1); @@ -521,7 +521,7 @@ bool GSCreator::getEPSIPreview(const TQString &path, long start, long return false; } - TQString previewstr = TQString::fromLatin1(buf); + TQString previewstr = TQString::tqfromLatin1(buf); free(buf); int offset = 0; @@ -567,7 +567,7 @@ bool GSCreator::getEPSIPreview(const TQString &path, long start, long for (unsigned int gray = 0; gray < colors; gray++) { unsigned int grayvalue = (255U * (colors - 1 - gray)) / (colors - 1); - img.setColor(gray, qRgb(grayvalue, grayvalue, grayvalue)); + img.setColor(gray, tqRgb(grayvalue, grayvalue, grayvalue)); } } diff --git a/kfile-plugins/ps/kfile_ps.cpp b/kfile-plugins/ps/kfile_ps.cpp index 01136d88..7121af1b 100644 --- a/kfile-plugins/ps/kfile_ps.cpp +++ b/kfile-plugins/ps/kfile_ps.cpp @@ -30,9 +30,9 @@ typedef KGenericFactory<KPSPlugin> PSFactory; K_EXPORT_COMPONENT_FACTORY(kfile_ps, PSFactory("kfile_ps")) -KPSPlugin::KPSPlugin(TQObject *parent, const char *name, +KPSPlugin::KPSPlugin(TQObject *tqparent, const char *name, const TQStringList &preferredItems) : - KFilePlugin( parent, name, preferredItems ) + KFilePlugin( tqparent, name, preferredItems ) { kdDebug(7034) << "ps plugin\n"; diff --git a/kfile-plugins/ps/kfile_ps.h b/kfile-plugins/ps/kfile_ps.h index 96a400a8..1b978713 100644 --- a/kfile-plugins/ps/kfile_ps.h +++ b/kfile-plugins/ps/kfile_ps.h @@ -30,8 +30,9 @@ class TQStringList; class KPSPlugin: public KFilePlugin, public KDSCCommentHandler { Q_OBJECT + TQ_OBJECT public: - KPSPlugin( TQObject *parent, const char *name, + KPSPlugin( TQObject *tqparent, const char *name, const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint what); diff --git a/kfile-plugins/raw/kcamerarawplugin.cpp b/kfile-plugins/raw/kcamerarawplugin.cpp index 8a0b0ce8..62b00404 100644 --- a/kfile-plugins/raw/kcamerarawplugin.cpp +++ b/kfile-plugins/raw/kcamerarawplugin.cpp @@ -83,9 +83,9 @@ bool KCameraRawPlugin::createPreview(const TQString &path, TQImage &img) return true; } -KCameraRawPlugin::KCameraRawPlugin(TQObject *parent, const char *name, +KCameraRawPlugin::KCameraRawPlugin(TQObject *tqparent, const char *name, const TQStringList &args ) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "KCameraRawPlugin c'tor" << endl; diff --git a/kfile-plugins/raw/kcamerarawplugin.h b/kfile-plugins/raw/kcamerarawplugin.h index e205aa37..fa583c4f 100644 --- a/kfile-plugins/raw/kcamerarawplugin.h +++ b/kfile-plugins/raw/kcamerarawplugin.h @@ -26,9 +26,10 @@ class TQImage; class KCameraRawPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KCameraRawPlugin(TQObject *parent, const char *name, const TQStringList& args); + KCameraRawPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); private: diff --git a/kfile-plugins/raw/parse.c b/kfile-plugins/raw/parse.c index 1abbbfce..a256f04e 100644 --- a/kfile-plugins/raw/parse.c +++ b/kfile-plugins/raw/parse.c @@ -284,7 +284,7 @@ int parse_tiff_ifd (int base, int level) case 0x111: /* StripOffset */ if (!offset || is_dng) offset = val; break; - case 0x112: /* Orientation */ + case 0x112: /* Qt::Orientation */ flip = flip_map[(val-1) & 7]; break; case 0x117: /* StripByteCounts */ diff --git a/kfile-plugins/rgb/kfile_rgb.cpp b/kfile-plugins/rgb/kfile_rgb.cpp index cf832343..3c8b416e 100644 --- a/kfile-plugins/rgb/kfile_rgb.cpp +++ b/kfile-plugins/rgb/kfile_rgb.cpp @@ -32,8 +32,8 @@ typedef KGenericFactory<KRgbPlugin> RgbFactory; K_EXPORT_COMPONENT_FACTORY(kfile_rgb, RgbFactory("kfile_rgb")) -KRgbPlugin::KRgbPlugin(TQObject *parent, const char *name, const TQStringList &args) : - KFilePlugin(parent, name, args) +KRgbPlugin::KRgbPlugin(TQObject *tqparent, const char *name, const TQStringList &args) : + KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo("image/x-rgb"); @@ -71,24 +71,24 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) TQFile file(info.path()); if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } TQDataStream dstream(&file); - Q_UINT16 magic; - Q_UINT8 storage; - Q_UINT8 bpc; - Q_UINT16 dimension; - Q_UINT16 xsize; - Q_UINT16 ysize; - Q_UINT16 zsize; - Q_UINT32 pixmin; - Q_UINT32 pixmax; - Q_UINT32 dummy; + TQ_UINT16 magic; + TQ_UINT8 storage; + TQ_UINT8 bpc; + TQ_UINT16 dimension; + TQ_UINT16 xsize; + TQ_UINT16 ysize; + TQ_UINT16 zsize; + TQ_UINT32 pixmin; + TQ_UINT32 pixmax; + TQ_UINT32 dummy; char imagename[80]; - Q_UINT32 colormap; + TQ_UINT32 colormap; dstream >> magic; dstream >> storage; @@ -103,7 +103,7 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) dstream.readRawBytes(imagename, 80); imagename[79] = '\0'; dstream >> colormap; - Q_UINT8 u8; + TQ_UINT8 u8; for (uint i = 0; i < 404; i++) dstream >> u8; @@ -134,17 +134,17 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) long compressed = file.size() - 512; long verbatim = xsize * ysize * zsize; appendItem(group, "Compression", i18n("Runlength Encoded") - + TQString(", %1%").arg(compressed * 100.0 / verbatim, 0, 'f', 1)); + + TQString(", %1%").tqarg(compressed * 100.0 / verbatim, 0, 'f', 1)); long k; - Q_UINT32 offs; - TQMap<Q_UINT32, uint> map; - TQMap<Q_UINT32, uint>::Iterator it; - TQMap<Q_UINT32, uint>::Iterator end = map.end(); + TQ_UINT32 offs; + TQMap<TQ_UINT32, uint> map; + TQMap<TQ_UINT32, uint>::Iterator it; + TQMap<TQ_UINT32, uint>::Iterator end = map.end(); for (k = 0; k < (ysize * zsize); k++) { dstream >> offs; - if ((it = map.find(offs)) != end) - map.replace(offs, it.data() + 1); + if ((it = map.tqfind(offs)) != end) + map.tqreplace(offs, it.data() + 1); else map[offs] = 0; } @@ -152,7 +152,7 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) k += it.data(); if (k) - appendItem(group, "SharedRows", TQString("%1%").arg(k * 100.0 + appendItem(group, "SharedRows", TQString("%1%").tqarg(k * 100.0 / (ysize * zsize), 0, 'f', 1)); else appendItem(group, "SharedRows", i18n("None")); @@ -173,7 +173,7 @@ bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const TQFile file(info.path()); if (!file.open(IO_WriteOnly|IO_Raw)) { - kdDebug(7034) << "couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } @@ -188,9 +188,9 @@ bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const unsigned i; for (i = 0; i < s.length(); i++) - dstream << Q_UINT8(s.latin1()[i]); + dstream << TQ_UINT8(s.latin1()[i]); for (; i < 80; i++) - dstream << Q_UINT8(0); + dstream << TQ_UINT8(0); file.close(); return true; @@ -199,9 +199,9 @@ bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const // restrict to 79 ASCII characters TQValidator* KRgbPlugin::createValidator(const TQString&, const TQString &, - const TQString &, TQObject* parent, const char* name) const + const TQString &, TQObject* tqparent, const char* name) const { - return new TQRegExpValidator(TQRegExp("[\x0020-\x007E]{79}"), parent, name); + return new TQRegExpValidator(TQRegExp("[\x0020-\x007E]{79}"), tqparent, name); } diff --git a/kfile-plugins/rgb/kfile_rgb.h b/kfile-plugins/rgb/kfile_rgb.h index c00ddfb5..bbbfd1b4 100644 --- a/kfile-plugins/rgb/kfile_rgb.h +++ b/kfile-plugins/rgb/kfile_rgb.h @@ -27,14 +27,15 @@ class TQStringList; class KRgbPlugin : public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KRgbPlugin(TQObject *parent, const char *name, const TQStringList& args); + KRgbPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); virtual bool writeInfo(const KFileMetaInfo& info) const; virtual TQValidator* createValidator(const TQString& mimetype, const TQString &group, const TQString &key, - TQObject* parent, const char* name) const; + TQObject* tqparent, const char* name) const; }; diff --git a/kfile-plugins/tga/kfile_tga.cpp b/kfile-plugins/tga/kfile_tga.cpp index 21d2c6d2..46176e3e 100644 --- a/kfile-plugins/tga/kfile_tga.cpp +++ b/kfile-plugins/tga/kfile_tga.cpp @@ -44,10 +44,10 @@ typedef KGenericFactory<KTgaPlugin> TgaFactory; K_EXPORT_COMPONENT_FACTORY(kfile_tga, TgaFactory( "kfile_tga" )) -KTgaPlugin::KTgaPlugin(TQObject *parent, const char *name, +KTgaPlugin::KTgaPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-targa" ); @@ -77,7 +77,7 @@ bool KTgaPlugin::readInfo( KFileMetaInfo& info, uint what) if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } diff --git a/kfile-plugins/tga/kfile_tga.h b/kfile-plugins/tga/kfile_tga.h index 8b130e49..ccd5b69d 100644 --- a/kfile-plugins/tga/kfile_tga.h +++ b/kfile-plugins/tga/kfile_tga.h @@ -27,9 +27,10 @@ class TQStringList; class KTgaPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KTgaPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KTgaPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/tiff/kfile_tiff.cpp b/kfile-plugins/tiff/kfile_tiff.cpp index ce55e5b3..7e1e86be 100644 --- a/kfile-plugins/tiff/kfile_tiff.cpp +++ b/kfile-plugins/tiff/kfile_tiff.cpp @@ -34,8 +34,8 @@ typedef KGenericFactory<KTiffPlugin> TiffFactory; K_EXPORT_COMPONENT_FACTORY(kfile_tiff, TiffFactory("kfile_tiff")) -KTiffPlugin::KTiffPlugin(TQObject *parent, const char *name, - const TQStringList &args) : KFilePlugin(parent, name, args) +KTiffPlugin::KTiffPlugin(TQObject *tqparent, const char *name, + const TQStringList &args) : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "TIFF file meta info plugin" << endl; KFileMimeTypeInfo* info = addMimeTypeInfo( "image/tiff" ); @@ -90,7 +90,7 @@ KTiffPlugin::KTiffPlugin(TQObject *parent, const char *name, m_colorMode.insert(PHOTOMETRIC_PALETTE, new TQString(I18N_NOOP("Palette color"))); m_colorMode.insert(PHOTOMETRIC_MASK, - new TQString(I18N_NOOP("Transparency mask"))); + new TQString(I18N_NOOP("Transparency tqmask"))); m_colorMode.insert(PHOTOMETRIC_SEPARATED, new TQString(I18N_NOOP("Color separations"))); m_colorMode.insert(PHOTOMETRIC_YCBCR, @@ -248,7 +248,7 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint) int imageBpp = bitsPerSample*samplesPerPixel; if (imageAlpha && colorMode==PHOTOMETRIC_RGB) - m_colorMode.replace(PHOTOMETRIC_RGB, new TQString(I18N_NOOP("RGBA"))); + m_colorMode.tqreplace(PHOTOMETRIC_RGB, new TQString(I18N_NOOP("RGBA"))); KFileMetaInfoGroup group = appendGroup(info, "General"); if (description) diff --git a/kfile-plugins/tiff/kfile_tiff.h b/kfile-plugins/tiff/kfile_tiff.h index 54087ea4..26ad4765 100644 --- a/kfile-plugins/tiff/kfile_tiff.h +++ b/kfile-plugins/tiff/kfile_tiff.h @@ -27,9 +27,10 @@ class KTiffPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KTiffPlugin(TQObject *parent, const char *name, const TQStringList& args); + KTiffPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); private: diff --git a/kfile-plugins/xbm/kfile_xbm.cpp b/kfile-plugins/xbm/kfile_xbm.cpp index 755201a3..7929a1bd 100644 --- a/kfile-plugins/xbm/kfile_xbm.cpp +++ b/kfile-plugins/xbm/kfile_xbm.cpp @@ -42,10 +42,10 @@ typedef KGenericFactory<KXbmPlugin> XbmFactory; K_EXPORT_COMPONENT_FACTORY(kfile_xbm, XbmFactory( "kfile_xbm" )) -KXbmPlugin::KXbmPlugin(TQObject *parent, const char *name, +KXbmPlugin::KXbmPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-xbm" ); @@ -100,7 +100,7 @@ bool KXbmPlugin::readInfo( KFileMetaInfo& info, uint what) if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } diff --git a/kfile-plugins/xbm/kfile_xbm.h b/kfile-plugins/xbm/kfile_xbm.h index 7b62047c..b30e04cb 100644 --- a/kfile-plugins/xbm/kfile_xbm.h +++ b/kfile-plugins/xbm/kfile_xbm.h @@ -27,9 +27,10 @@ class TQStringList; class KXbmPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KXbmPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KXbmPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); diff --git a/kfile-plugins/xpm/kfile_xpm.cpp b/kfile-plugins/xpm/kfile_xpm.cpp index c0e80027..bc6806cf 100644 --- a/kfile-plugins/xpm/kfile_xpm.cpp +++ b/kfile-plugins/xpm/kfile_xpm.cpp @@ -32,8 +32,8 @@ K_EXPORT_COMPONENT_FACTORY(kfile_xpm, xpmFactory( "kfile_xpm" )) //-------------------------------------------------------------------------------- -xpmPlugin::xpmPlugin(TQObject *parent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) +xpmPlugin::xpmPlugin(TQObject *tqparent, const char *name, const TQStringList &args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-xpm" ); @@ -62,7 +62,7 @@ bool xpmPlugin::readInfo(KFileMetaInfo& info, uint /*what*/) KFileMetaInfoGroup group = appendGroup(info, "xpmInfo"); - appendItem(group, "Dimension", pix.size()); + appendItem(group, "Dimension", TQSize(pix.size())); appendItem(group, "BitDepth", pix.depth()); return true; diff --git a/kfile-plugins/xpm/kfile_xpm.h b/kfile-plugins/xpm/kfile_xpm.h index f4660c45..abebe119 100644 --- a/kfile-plugins/xpm/kfile_xpm.h +++ b/kfile-plugins/xpm/kfile_xpm.h @@ -34,9 +34,10 @@ class TQStringList; class xpmPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - xpmPlugin(TQObject *parent, const char *name, const TQStringList& args); + xpmPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); }; diff --git a/kgamma/configure.in.in b/kgamma/configure.in.in index d4e1a9f4..8f4d787b 100644 --- a/kgamma/configure.in.in +++ b/kgamma/configure.in.in @@ -61,5 +61,5 @@ fi AC_LANG_SAVE AC_LANG_CPLUSPLUS -AC_CHECK_HEADERS(sstream) +KDE_CHECK_HEADERS(sstream) AC_LANG_RESTORE diff --git a/kgamma/kcmkgamma/displaynumber.cpp b/kgamma/kcmkgamma/displaynumber.cpp index b3486e38..1bc0473b 100644 --- a/kgamma/kcmkgamma/displaynumber.cpp +++ b/kgamma/kcmkgamma/displaynumber.cpp @@ -20,16 +20,16 @@ #include "displaynumber.h" -DisplayNumber::DisplayNumber(TQWidget *parent, int digits, \ - int prec, const char *name) : TQLabel(parent,name) { +DisplayNumber::DisplayNumber(TQWidget *tqparent, int digits, \ + int prec, const char *name) : TQLabel(tqparent,name) { setPrecision(prec); setWidth(digits); setFrameStyle(TQFrame::Panel | TQFrame::Sunken); - setBackgroundMode(Qt::PaletteBase); - setAlignment(Qt::AlignCenter); - setFocusPolicy(NoFocus); + setBackgroundMode(TQt::PaletteBase); + tqsetAlignment(TQt::AlignCenter); + setFocusPolicy(TQ_NoFocus); } DisplayNumber::~DisplayNumber(){ diff --git a/kgamma/kcmkgamma/displaynumber.h b/kgamma/kcmkgamma/displaynumber.h index d5662fae..19e41de6 100644 --- a/kgamma/kcmkgamma/displaynumber.h +++ b/kgamma/kcmkgamma/displaynumber.h @@ -26,8 +26,9 @@ class DisplayNumber : public TQLabel { Q_OBJECT + TQ_OBJECT public: - DisplayNumber(TQWidget *parent=0, int digits=0, int prec=0, const char *name=0); + DisplayNumber(TQWidget *tqparent=0, int digits=0, int prec=0, const char *name=0); ~DisplayNumber(); void setFont( const TQFont & f ); void setNum(double num); diff --git a/kgamma/kcmkgamma/gammactrl.cpp b/kgamma/kcmkgamma/gammactrl.cpp index 3871a18d..efedeefa 100644 --- a/kgamma/kcmkgamma/gammactrl.cpp +++ b/kgamma/kcmkgamma/gammactrl.cpp @@ -26,9 +26,9 @@ #include "displaynumber.h" #include "gammactrl.moc" -GammaCtrl::GammaCtrl(TQWidget *parent, XVidExtWrap *xvid, int channel, \ +GammaCtrl::GammaCtrl(TQWidget *tqparent, XVidExtWrap *xvid, int channel, \ const TQString& mingamma, const TQString& maxgamma, const TQString& setgamma, \ - const char *name) : TQHBox(parent, name) + const char *name) : TQHBox(tqparent, name) { int maxslider = (int)( ( maxgamma.toDouble() - mingamma.toDouble() \ + 0.0005 ) * 20 ); @@ -47,7 +47,7 @@ GammaCtrl::GammaCtrl(TQWidget *parent, XVidExtWrap *xvid, int channel, \ setSpacing(KDialog::spacingHint()); - slider = new TQSlider(Horizontal, this); + slider = new TQSlider(Qt::Horizontal, this); slider->setFixedHeight(24); slider->setTickmarks(TQSlider::Below); slider->setRange(0, maxslider); diff --git a/kgamma/kcmkgamma/gammactrl.h b/kgamma/kcmkgamma/gammactrl.h index 97a1ab9e..75dfa775 100644 --- a/kgamma/kcmkgamma/gammactrl.h +++ b/kgamma/kcmkgamma/gammactrl.h @@ -31,9 +31,10 @@ class XVidExtWrap; class GammaCtrl : public TQHBox { Q_OBJECT + TQ_OBJECT public: /** construktor */ - GammaCtrl(TQWidget *parent=0, XVidExtWrap *xvid=0, int channel=0, \ + GammaCtrl(TQWidget *tqparent=0, XVidExtWrap *xvid=0, int channel=0, \ const TQString& mingamma="0.40", const TQString& maxgamma="3.50", \ const TQString& setgamma="1.00", const char *name=0 ); /** destruktor */ diff --git a/kgamma/kcmkgamma/kgamma.cpp b/kgamma/kcmkgamma/kgamma.cpp index ebcfb737..961a617e 100644 --- a/kgamma/kcmkgamma/kgamma.cpp +++ b/kgamma/kcmkgamma/kgamma.cpp @@ -55,8 +55,8 @@ extern "C" } } -KGamma::KGamma(TQWidget *parent, const char *name, const TQStringList&) - :KCModule(parent,name) +KGamma::KGamma(TQWidget *tqparent, const char *name, const TQStringList&) + :KCModule(tqparent,name) { bool ok; GammaCorrection = true; @@ -157,37 +157,37 @@ void KGamma::setupUI() { pic1->setMinimumSize(530, 171); pic1->setBackgroundPixmap(background); pic1->setPixmap(TQPixmap(locate("data", "kgamma/pics/greyscale.png"))); - pic1->setAlignment(AlignCenter); + pic1->tqsetAlignment(AlignCenter); stack->addWidget( pic1, 0 ); TQLabel *pic2 = new TQLabel(stack); pic2->setBackgroundPixmap(background); pic2->setPixmap(TQPixmap(locate("data", "kgamma/pics/rgbscale.png"))); - pic2->setAlignment(AlignCenter); + pic2->tqsetAlignment(AlignCenter); stack->addWidget( pic2, 1 ); TQLabel *pic3 = new TQLabel(stack); pic3->setBackgroundPixmap(background); pic3->setPixmap(TQPixmap(locate("data", "kgamma/pics/cmyscale.png"))); - pic3->setAlignment(AlignCenter); + pic3->tqsetAlignment(AlignCenter); stack->addWidget( pic3, 2 ); TQLabel *pic4 = new TQLabel(stack); pic4->setBackgroundPixmap(background); pic4->setPixmap(TQPixmap(locate("data", "kgamma/pics/darkgrey.png"))); - pic4->setAlignment(AlignCenter); + pic4->tqsetAlignment(AlignCenter); stack->addWidget( pic4, 3 ); TQLabel *pic5 = new TQLabel(stack); pic5->setBackgroundPixmap(background); pic5->setPixmap(TQPixmap(locate("data", "kgamma/pics/midgrey.png"))); - pic5->setAlignment(AlignCenter); + pic5->tqsetAlignment(AlignCenter); stack->addWidget( pic5, 4 ); TQLabel *pic6 = new TQLabel(stack); pic6->setBackgroundPixmap(background); pic6->setPixmap(TQPixmap(locate("data", "kgamma/pics/lightgrey.png"))); - pic6->setAlignment(AlignCenter); + pic6->tqsetAlignment(AlignCenter); stack->addWidget( pic6, 5 ); topLayout->addWidget(stack, 10); @@ -241,10 +241,10 @@ void KGamma::setupUI() { grid->setSpacing(8); grid->addMultiCellWidget(frame1, 0, 2, 0, 3); grid->addMultiCellWidget(frame2, 4, 8, 0, 3); - grid->addWidget(gammalabel, 1, 1, Qt::AlignRight); - grid->addWidget(redlabel, 5, 1, Qt::AlignRight); - grid->addWidget(greenlabel, 6, 1, Qt::AlignRight); - grid->addWidget(bluelabel, 7, 1, Qt::AlignRight); + grid->addWidget(gammalabel, 1, 1, TQt::AlignRight); + grid->addWidget(redlabel, 5, 1, TQt::AlignRight); + grid->addWidget(greenlabel, 6, 1, TQt::AlignRight); + grid->addWidget(bluelabel, 7, 1, TQt::AlignRight); grid->addWidget(gctrl, 1, 2); grid->addWidget(rgctrl, 5, 2); grid->addWidget(ggctrl, 6, 2); @@ -264,7 +264,7 @@ void KGamma::setupUI() { screenselect = new TQComboBox( options ); for ( int i = 0; i < ScreenCount; i++ ) - screenselect->insertItem( i18n("Screen %1").arg(i+1) ); + screenselect->insertItem( i18n("Screen %1").tqarg(i+1) ); screenselect->setCurrentItem(currentScreen); connect(screenselect, TQT_SIGNAL(activated(int)), TQT_SLOT(changeScreen(int))); @@ -279,7 +279,7 @@ void KGamma::setupUI() { TQLabel *error = new TQLabel(this); error->setText(i18n("Gamma correction is not supported by your" " graphics hardware or driver.")); - error->setAlignment(AlignCenter); + error->tqsetAlignment(AlignCenter); topLayout->addWidget(error); } } @@ -351,7 +351,7 @@ void KGamma::save() { if ( !xf86cfgbox->isChecked() ) { //write gamma settings to the users config for (int i = 0; i < ScreenCount; i++) { - config->setGroup( TQString("Screen %1").arg(i) ); + config->setGroup( TQString("Screen %1").tqarg(i) ); config->writeEntry("rgamma", rgamma[i]); config->writeEntry("ggamma", ggamma[i]); config->writeEntry("bgamma", bgamma[i]); @@ -405,7 +405,7 @@ bool KGamma::loadUserSettings() { KConfig *config = new KConfig("kgammarc"); for (int i = 0; i < ScreenCount; i++) { - config->setGroup(TQString( "Screen %1" ).arg(i) ); + config->setGroup(TQString( "Screen %1" ).tqarg(i) ); rgamma[i] = config->readEntry("rgamma"); ggamma[i] = config->readEntry("ggamma"); bgamma[i] = config->readEntry("bgamma"); @@ -610,7 +610,7 @@ extern "C" for (int i = 0; i < xv._ScreenCount(); i++) { xv.setScreen(i); - config->setGroup( TQString("Screen %1").arg(i) ); + config->setGroup( TQString("Screen %1").tqarg(i) ); if ((rgamma = config->readEntry("rgamma").toFloat())) xv.setGamma(XVidExtWrap::Red, rgamma); diff --git a/kgamma/kcmkgamma/kgamma.h b/kgamma/kcmkgamma/kgamma.h index 9af24905..51175ecd 100644 --- a/kgamma/kcmkgamma/kgamma.h +++ b/kgamma/kcmkgamma/kgamma.h @@ -28,8 +28,9 @@ class KProcess; class KGamma: public KCModule { Q_OBJECT + TQ_OBJECT public: - KGamma(TQWidget *parent, const char *name, const TQStringList&); + KGamma(TQWidget *tqparent, const char *name, const TQStringList&); virtual ~KGamma(); void load(); diff --git a/kgamma/xf86gammacfg/Makefile.am b/kgamma/xf86gammacfg/Makefile.am index 3c7c0154..8c7fcb1f 100644 --- a/kgamma/xf86gammacfg/Makefile.am +++ b/kgamma/xf86gammacfg/Makefile.am @@ -4,6 +4,7 @@ INCLUDES= $(all_includes) bin_PROGRAMS = xf86gammacfg xf86gammacfg_SOURCES = xf86gammacfg.cpp xf86gammacfg_LDADD = +xf86gammacfg_LDFLAGS = -ltqt xf86gammacfg_METASOURCES = AUTO noinst_HEADERS = diff --git a/kghostview/displayoptions.cpp b/kghostview/displayoptions.cpp index ab33e384..82ef1f3a 100644 --- a/kghostview/displayoptions.cpp +++ b/kghostview/displayoptions.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2003, Luís Pedro Coelho + * Copyright (C) 2003, Lu�s Pedro Coelho * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,15 +68,15 @@ namespace { TQString DisplayOptions::toString( const DisplayOptions& options ) { return TQString( qformat ) - .arg( options.page() ) - .arg( options.magnification() ) - .arg( options.overrideOrientation() ) - .arg( options.overridePageMedia().utf8() ); + .tqarg( options.page() ) + .tqarg( options.magnification() ) + .tqarg( options.overrideOrientation() ) + .tqarg( options.overridePageMedia().utf8().data() ); } bool DisplayOptions::fromString( DisplayOptions& out, const TQString& in ) { - TQRegExp regex( TQString::fromLatin1( rformat ) ); + TQRegExp regex( TQString::tqfromLatin1( rformat ) ); if ( regex.search( in ) < 0 ) return false; out.reset(); diff --git a/kghostview/displayoptions.h b/kghostview/displayoptions.h index 8a19a812..8ceaf56e 100644 --- a/kghostview/displayoptions.h +++ b/kghostview/displayoptions.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2003, Luís Pedro Coelho + * Copyright (C) 2003, Lu�s Pedro Coelho * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ class KDE_EXPORT DisplayOptions void setOverrideOrientation(CDSC_ORIENTATION_ENUM e) { _overrideOrientation = e; } CDSC_ORIENTATION_ENUM overrideOrientation() const { return _overrideOrientation; } - void restoreOverridePageMedia() { _overridePageMedia = TQString::null; } + void restoreOverridePageMedia() { _overridePageMedia = TQString(); } void setOverridePageMedia(const TQString& newMedia) { _overridePageMedia = newMedia; } const TQString& overridePageMedia() const { return _overridePageMedia; } @@ -103,7 +103,7 @@ class KDE_EXPORT DisplayOptions inline DisplayOptions::DisplayOptions() :_overrideOrientation( CDSC_ORIENT_UNKNOWN ), - _overridePageMedia ( TQString::null ), + _overridePageMedia ( TQString() ), _page( 0 ) { setMagnification( 1.0 ); diff --git a/kghostview/dscparse/dscparse.cpp b/kghostview/dscparse/dscparse.cpp index b5d2c3a7..b02fb117 100644 --- a/kghostview/dscparse/dscparse.cpp +++ b/kghostview/dscparse/dscparse.cpp @@ -41,7 +41,7 @@ * %%PaperWeight: (ignored) * * Other additions for defaults or page section - % %%ViewingOrientation: xx xy yx yy + % %%ViewingQt::Orientation: xx xy yx yy */ #include <stdio.h> /* for sprintf(), not file I/O */ @@ -1736,7 +1736,7 @@ dsc_parse_viewing_orientation(CDSC *dsc, CDSCCTM **pctm) *pctm = NULL; } - n = IS_DSC(dsc->line, "%%+") ? 3 : 21; /* %%ViewingOrientation: */ + n = IS_DSC(dsc->line, "%%+") ? 3 : 21; /* %%ViewingQt::Orientation: */ while (IS_WHITE(dsc->line[n])) n++; @@ -2026,7 +2026,7 @@ dsc_scan_comments(CDSC *dsc) continued ? 3 : 10)) return CDSC_ERROR; } - else if (IS_DSC(line, "%%Orientation:")) { + else if (IS_DSC(line, "%%Qt::Orientation:")) { dsc->id = CDSC_ORIENTATION; if (dsc_parse_orientation(dsc, &(dsc->page_orientation), continued ? 3 : 14)) @@ -2197,7 +2197,7 @@ dsc_scan_comments(CDSC *dsc) dsc_unknown(dsc); } else if (IS_DSC(line, "%%Requirements:")) { - dsc->id = CDSC_REQUIREMENTS; + dsc->id = CDSC_RETQUIREMENTS; /* ignore */ } else if (IS_DSC(line, "%%DocumentNeededFonts:")) { @@ -2328,9 +2328,9 @@ dsc_scan_defaults(CDSC *dsc) dsc->id = CDSC_PAGEMEDIA; dsc_parse_media(dsc, &dsc->page_media); } - else if (IS_DSC(line, "%%PageOrientation:")) { + else if (IS_DSC(line, "%%PageQt::Orientation:")) { dsc->id = CDSC_PAGEORIENTATION; - /* This can override %%Orientation: */ + /* This can override %%Qt::Orientation: */ if (dsc_parse_orientation(dsc, &(dsc->page_orientation), 18)) return CDSC_ERROR; } @@ -2339,7 +2339,7 @@ dsc_scan_defaults(CDSC *dsc) if (dsc_parse_bounding_box(dsc, &(dsc->page_bbox), 18)) return CDSC_ERROR; } - else if (IS_DSC(line, "%%ViewingOrientation:")) { + else if (IS_DSC(line, "%%ViewingQt::Orientation:")) { dsc->id = CDSC_VIEWINGORIENTATION; if (dsc_parse_viewing_orientation(dsc, &dsc->viewing_orientation)) return CDSC_ERROR; @@ -2849,7 +2849,7 @@ dsc_scan_page(CDSC *dsc) dsc_unknown(dsc); } } - else if (IS_DSC(line, "%%PageOrientation:")) { + else if (IS_DSC(line, "%%PageQt::Orientation:")) { dsc->id = CDSC_PAGEORIENTATION; if (dsc_parse_orientation(dsc, &(dsc->page[dsc->page_count-1].orientation) ,18)) @@ -2860,7 +2860,7 @@ dsc_scan_page(CDSC *dsc) if (dsc_parse_bounding_box(dsc, &dsc->page[dsc->page_count-1].bbox, 18)) return CDSC_NOTDSC; } - else if (IS_DSC(line, "%%ViewingOrientation:")) { + else if (IS_DSC(line, "%%ViewingQt::Orientation:")) { dsc->id = CDSC_VIEWINGORIENTATION; if (dsc_parse_viewing_orientation(dsc, &dsc->page[dsc->page_count-1].viewing_orientation)) @@ -2938,7 +2938,7 @@ dsc_scan_page(CDSC *dsc) * %%DocumentSuppliedFonts: * %%DocumentSuppliedProcSets: * %%DocumentSuppliedResources: - * %%Orientation: + * %%Qt::Orientation: * %%Pages: * %%PageOrder: * @@ -2946,7 +2946,7 @@ dsc_scan_page(CDSC *dsc) * %%Trailer * %%EOF * %%BoundingBox: - * %%Orientation: + * %%Qt::Orientation: * %%Pages: * %%PageOrder: * In addition to these, we support @@ -2957,7 +2957,7 @@ dsc_scan_page(CDSC *dsc) * %%PageCustomColors: * %%PageFiles: * %%PageFonts: - * %%PageOrientation: + * %%PageQt::Orientation: * %%PageProcessColors: * %%PageResources: */ @@ -3052,7 +3052,7 @@ dsc_scan_trailer(CDSC *dsc) continued ? 3 : 10)) return CDSC_ERROR; } - else if (IS_DSC(line, "%%Orientation:")) { + else if (IS_DSC(line, "%%Qt::Orientation:")) { dsc->id = CDSC_ORIENTATION; if (dsc_parse_orientation(dsc, &(dsc->page_orientation), continued ? 3 : 14)) return CDSC_ERROR; diff --git a/kghostview/dscparse/dscparse.h b/kghostview/dscparse/dscparse.h index 10d2746c..dbac949e 100644 --- a/kghostview/dscparse/dscparse.h +++ b/kghostview/dscparse/dscparse.h @@ -98,7 +98,7 @@ typedef enum { CDSC_FOR = 207, /* %%For: */ CDSC_LANGUAGELEVEL = 208, /* %%LanguageLevel: */ CDSC_BOUNDINGBOX = 209, /* %%BoundingBox: */ - CDSC_ORIENTATION = 210, /* %%Orientation: */ + CDSC_ORIENTATION = 210, /* %%Qt::Orientation: */ CDSC_PAGEORDER = 211, /* %%PageOrder: */ CDSC_DOCUMENTMEDIA = 212, /* %%DocumentMedia: */ CDSC_DOCUMENTPAPERSIZES = 213, /* %%DocumentPaperSizes: */ @@ -106,7 +106,7 @@ typedef enum { CDSC_DOCUMENTPAPERCOLORS = 215, /* %%DocumentPaperColors: */ CDSC_DOCUMENTPAPERWEIGHTS = 216, /* %%DocumentPaperWeights: */ CDSC_DOCUMENTDATA = 217, /* %%DocumentData: */ - CDSC_REQUIREMENTS = 218, /* IGNORED %%Requirements: */ + CDSC_RETQUIREMENTS = 218, /* IGNORED %%Requirements: */ CDSC_DOCUMENTNEEDEDFONTS = 219, /* IGNORED %%DocumentNeededFonts: */ CDSC_DOCUMENTSUPPLIEDFONTS = 220, /* IGNORED %%DocumentSuppliedFonts: */ CDSC_HIRESBOUNDINGBOX = 221, /* %%HiResBoundingBox: */ @@ -119,7 +119,7 @@ typedef enum { /* Defaults section */ CDSC_BEGINDEFAULTS = 401, /* %%BeginDefaults */ CDSC_ENDDEFAULTS = 402, /* %%EndDefaults */ -/* also %%PageMedia, %%PageOrientation, %%PageBoundingBox */ +/* also %%PageMedia, %%PageQt::Orientation, %%PageBoundingBox */ /* Prolog section */ CDSC_BEGINPROLOG = 501, /* %%BeginProlog */ @@ -150,16 +150,16 @@ typedef enum { CDSC_ENDPAGESETUP = 703, /* IGNORED %%EndPageSetup */ CDSC_PAGEMEDIA = 704, /* %%PageMedia: */ /* also %%PaperColor, %%PaperForm, %%PaperWeight, %%PaperSize */ - CDSC_PAGEORIENTATION = 705, /* %%PageOrientation: */ + CDSC_PAGEORIENTATION = 705, /* %%PageQt::Orientation: */ CDSC_PAGEBOUNDINGBOX = 706, /* %%PageBoundingBox: */ /* also %%Begin/EndFont, %%Begin/EndFeature */ /* also %%Begin/EndResource, %%Begin/EndProcSet */ CDSC_INCLUDEFONT = 707, /* IGNORED %%IncludeFont: */ - CDSC_VIEWINGORIENTATION = 708, /* %%ViewingOrientation: */ + CDSC_VIEWINGORIENTATION = 708, /* %%ViewingQt::Orientation: */ /* Trailer section */ CDSC_TRAILER = 800, /* %%Trailer */ -/* also %%Pages, %%BoundingBox, %%Orientation, %%PageOrder, %%DocumentMedia */ +/* also %%Pages, %%BoundingBox, %%Qt::Orientation, %%PageOrder, %%DocumentMedia */ /* %%Page is recognised as an error */ /* also %%DocumentNeededFonts, %%DocumentSuppliedFonts */ @@ -229,7 +229,7 @@ typedef struct CDSCMEDIA_S { #define CDSC_KNOWN_MEDIA 46 extern const CDSCMEDIA dsc_known_media[CDSC_KNOWN_MEDIA]; -typedef struct CDSCCTM_S { /* used for %%ViewingOrientation */ +typedef struct CDSCCTM_S { /* used for %%ViewingQt::Orientation */ float xx; float xy; float yx; diff --git a/kghostview/dscparse/dscparse_adapter.cpp b/kghostview/dscparse/dscparse_adapter.cpp index b04e89bc..17ae0231 100644 --- a/kghostview/dscparse/dscparse_adapter.cpp +++ b/kghostview/dscparse/dscparse_adapter.cpp @@ -111,7 +111,7 @@ unsigned int KDSCError::lineNumber() const KDSCErrorHandler::Response KDSCOkErrorHandler::error( const KDSCError& err ) { cout << "KDSC: error in line " << err.lineNumber() << endl; - cout << err.line() << endl; + cout << err.line().data() << endl; return Ok; } diff --git a/kghostview/dscparse/dscparse_adapter.h b/kghostview/dscparse/dscparse_adapter.h index c5c1cbf9..5fefa631 100644 --- a/kghostview/dscparse/dscparse_adapter.h +++ b/kghostview/dscparse/dscparse_adapter.h @@ -185,7 +185,7 @@ public: For = CDSC_FOR, LanguageLevel = CDSC_LANGUAGELEVEL, BoundingBox = CDSC_BOUNDINGBOX, - Orientation = CDSC_ORIENTATION, + Qt::Orientation = CDSC_ORIENTATION, PageOrder = CDSC_PAGEORDER, DocumentMedia = CDSC_DOCUMENTMEDIA, DocumentPaperSizes = CDSC_DOCUMENTPAPERSIZES, @@ -193,7 +193,7 @@ public: DocumentPaperColors = CDSC_DOCUMENTPAPERCOLORS, DocumentPaperWeights = CDSC_DOCUMENTPAPERWEIGHTS, DocumentData = CDSC_DOCUMENTDATA, - Requirements = CDSC_REQUIREMENTS, + Requirements = CDSC_RETQUIREMENTS, DocumentNeededFonts = CDSC_DOCUMENTNEEDEDFONTS, DocumentSuppliedFonts = CDSC_DOCUMENTSUPPLIEDFONTS, HiResBoundingBox = CDSC_HIRESBOUNDINGBOX, @@ -206,7 +206,7 @@ public: // Defaults section BeginDefaults = CDSC_BEGINDEFAULTS, EndDefaults = CDSC_ENDDEFAULTS, - // also %%PageMedia, %%PageOrientation, %%PageBoundingBox + // also %%PageMedia, %%PageQt::Orientation, %%PageBoundingBox // Prolog section BeginProlog = CDSC_BEGINPROLOG, @@ -237,16 +237,16 @@ public: EndPageSetup = CDSC_ENDPAGESETUP, PageMedia = CDSC_PAGEMEDIA, // also %%PaperColor, %%PaperForm, %%PaperWeight, %%PaperSize - PageOrientation = CDSC_PAGEORIENTATION, + PageQt::Orientation = CDSC_PAGEORIENTATION, PageBoundingBox = CDSC_PAGEBOUNDINGBOX, // also %%Begin/EndFont, %%Begin/EndFeature // also %%Begin/EndResource, %%Begin/EndProcSet IncludeFont = CDSC_INCLUDEFONT, - ViewingOrientation = CDSC_VIEWINGORIENTATION, + ViewingQt::Orientation = CDSC_VIEWINGORIENTATION, // Trailer section Trailer = CDSC_TRAILER, - // also %%Pages, %%BoundingBox, %%Orientation, %%PageOrder, + // also %%Pages, %%BoundingBox, %%Qt::Orientation, %%PageOrder, // %%DocumentMedia // %%Page is recognised as an error // also %%DocumentNeededFonts, %%DocumentSuppliedFonts diff --git a/kghostview/fullscreenfilter.cpp b/kghostview/fullscreenfilter.cpp index 724031f4..9efe8a6c 100644 --- a/kghostview/fullscreenfilter.cpp +++ b/kghostview/fullscreenfilter.cpp @@ -1,5 +1,5 @@ /** - * Copyright (C) 2003, Luís Pedro Coelho + * Copyright (C) 2003, Lu�s Pedro Coelho * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,26 +22,26 @@ #include "kgv_miniwidget.h" #include "kgvpageview.h" -FullScreenFilter::FullScreenFilter( KGVShell& parent ) - :TQObject( &parent, "full-screen-filter" ), - parent( parent ) +FullScreenFilter::FullScreenFilter( KGVShell& tqparent ) + :TQObject( &tqparent, "full-screen-filter" ), + tqparent( tqparent ) { } bool FullScreenFilter::eventFilter( TQObject* /*object*/, TQEvent* ev) { if ( TQKeyEvent* keyevent = dynamic_cast<TQKeyEvent*>( ev ) ) { if ( keyevent->key() == Key_Escape ) { - parent.setFullScreen( false ); + tqparent.setFullScreen( false ); keyevent->accept(); return true; } } if ( TQMouseEvent* mouseevent = dynamic_cast<TQMouseEvent*>( ev ) ) { - if ( mouseevent->stateAfter() & mouseevent->button() & LeftButton ) { + if ( mouseevent->stateAfter() & mouseevent->button() & Qt::LeftButton ) { // if ( The whole image is visible at once ) - if ( parent.m_gvpart->pageView()->contentsHeight() <= parent.m_gvpart->widget()->height() && - parent.m_gvpart->pageView()->contentsWidth() <= parent.m_gvpart->widget()->width() ) { - parent.m_gvpart->miniWidget()->nextPage(); + if ( tqparent.m_gvpart->pageView()->contentsHeight() <= tqparent.m_gvpart->widget()->height() && + tqparent.m_gvpart->pageView()->contentsWidth() <= tqparent.m_gvpart->widget()->width() ) { + tqparent.m_gvpart->miniWidget()->nextPage(); mouseevent->accept(); return true; } diff --git a/kghostview/fullscreenfilter.h b/kghostview/fullscreenfilter.h index 7d5fa489..4a175c25 100644 --- a/kghostview/fullscreenfilter.h +++ b/kghostview/fullscreenfilter.h @@ -28,15 +28,16 @@ class KGVShell; */ class FullScreenFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: - FullScreenFilter( KGVShell& parent ); + FullScreenFilter( KGVShell& tqparent ); /** * @reimplemented */ virtual bool eventFilter( TQObject*, TQEvent* ); private: - KGVShell& parent; + KGVShell& tqparent; }; diff --git a/kghostview/generalsettingswidget.ui b/kghostview/generalsettingswidget.ui index 60ffbdf3..09ab2764 100644 --- a/kghostview/generalsettingswidget.ui +++ b/kghostview/generalsettingswidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>GeneralSettingsWidget</class> <author>Nadeem Hasan <nhasan@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>GeneralSettingsWidget</cstring> </property> @@ -20,7 +20,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_Antialiasing</cstring> </property> @@ -31,7 +31,7 @@ <string>Anti-aliasing makes the result look better, but it makes the display take longer</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_PlatformFonts</cstring> </property> @@ -42,7 +42,7 @@ <string>&Use platform fonts</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_Messages</cstring> </property> @@ -54,7 +54,7 @@ In case of problems you might want to see its error messages</string> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_Palette</cstring> </property> @@ -65,7 +65,7 @@ In case of problems you might want to see its error messages</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>Mono</cstring> </property> @@ -76,7 +76,7 @@ In case of problems you might want to see its error messages</string> <number>2</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>Gray</cstring> </property> @@ -87,7 +87,7 @@ In case of problems you might want to see its error messages</string> <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>Color</cstring> </property> @@ -106,6 +106,6 @@ In case of problems you might want to see its error messages</string> <include location="global" impldecl="in implementation">kdialog.h</include> <include location="local" impldecl="in implementation">generalsettingswidget.ui.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/kghostview/generalsettingswidget.ui.h b/kghostview/generalsettingswidget.ui.h index 8dd6920d..512d1d05 100644 --- a/kghostview/generalsettingswidget.ui.h +++ b/kghostview/generalsettingswidget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kghostview/gssettingswidget.ui b/kghostview/gssettingswidget.ui index 06779f3b..a92ecc39 100644 --- a/kghostview/gssettingswidget.ui +++ b/kghostview/gssettingswidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>GSSettingsWidget</class> <author>Nadeem Hasan <nhasan@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>GSSettingsWidget</cstring> </property> @@ -46,14 +46,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>286</width> <height>20</height> </size> </property> </spacer> - <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -64,7 +64,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -83,7 +83,7 @@ <string>Ghostscript is the basic renderer (i.e. the program which draws)</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>mDetectedVersion</cstring> </property> @@ -91,7 +91,7 @@ <string>(detected gs version: %1)</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -110,7 +110,7 @@ <string>Anti-aliasing makes the result look better, but it makes the display take longer</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -139,14 +139,14 @@ <include location="global" impldecl="in implementation">kdialog.h</include> <include location="local" impldecl="in implementation">gssettingswidget.ui.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>configClicked()</signal> -</signals> -<slots> - <slot specifier="non virtual">setDetectedVersion( QString v )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</Q_SIGNALS> +<Q_SLOTS> + <slot specifier="non virtual">setDetectedVersion( TQString v )</slot> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>kurlrequester.h</includehint> diff --git a/kghostview/gssettingswidget.ui.h b/kghostview/gssettingswidget.ui.h index fb2209c7..11f4bf63 100644 --- a/kghostview/gssettingswidget.ui.h +++ b/kghostview/gssettingswidget.ui.h @@ -2,13 +2,13 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ void GSSettingsWidget::setDetectedVersion( TQString v) { - mDetectedVersion->setText(mDetectedVersion->text().arg( v )); + mDetectedVersion->setText(mDetectedVersion->text().tqarg( v )); } diff --git a/kghostview/infodialog.cpp b/kghostview/infodialog.cpp index e429d712..d65348ef 100644 --- a/kghostview/infodialog.cpp +++ b/kghostview/infodialog.cpp @@ -32,8 +32,8 @@ // // Using KDialogBase in message box mode (gives centered action button) // -InfoDialog::InfoDialog( TQWidget *parent, const char *name, bool modal ) - :KDialogBase( i18n("Document Information"), Yes, Yes, Yes, parent, +InfoDialog::InfoDialog( TQWidget *tqparent, const char *name, bool modal ) + :KDialogBase( i18n("Document Information"), Yes, Yes, Yes, tqparent, name, modal, true, KStdGuiItem::ok() ) { TQFrame *page = makeMainWidget(); @@ -90,7 +90,7 @@ namespace { "(?:(\\+|\\-)(\\d\\d)\'?(\\d\\d)\'?)?" "\\)" ); if ( exp.exactMatch( dateStr ) ) { - TQStringList list = exp.capturedTexts(); + TQStringList list = exp.tqcapturedTexts(); TQStringList::iterator iter = list.begin(); ++iter; // whole string! #undef GET diff --git a/kghostview/infodialog.h b/kghostview/infodialog.h index 689790d0..8b295b88 100644 --- a/kghostview/infodialog.h +++ b/kghostview/infodialog.h @@ -27,9 +27,10 @@ class TQLabel; class InfoDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - InfoDialog( TQWidget *parent=0, const char *name=0, bool modal=true ); + InfoDialog( TQWidget *tqparent=0, const char *name=0, bool modal=true ); void setup( const TQString &fileName, const TQString &documentTitle, const TQString &publicationDate ); diff --git a/kghostview/kdscerrordialog.cpp b/kghostview/kdscerrordialog.cpp index 61245ed5..b219a061 100644 --- a/kghostview/kdscerrordialog.cpp +++ b/kghostview/kdscerrordialog.cpp @@ -46,8 +46,8 @@ KDSCErrorHandler::Response KDSCErrorThreshold::error( const KDSCError& err ) return Cancel; } -KDSCErrorDialog::KDSCErrorDialog( TQWidget* parent ) : - KDialog( parent, "dscerrordialog", true ), +KDSCErrorDialog::KDSCErrorDialog( TQWidget* tqparent ) : + KDialog( tqparent, "dscerrordialog", true ), _response( Ok ) { TQVBoxLayout* vbox = new TQVBoxLayout( this, marginHint(), spacingHint() ); @@ -97,7 +97,7 @@ KDSCErrorHandler::Response KDSCErrorDialog::error( const KDSCError& err ) break; } - _lineNumberLabel->setText( i18n( "On line %1:" ).arg( err.lineNumber() ) ); + _lineNumberLabel->setText( i18n( "On line %1:" ).tqarg( err.lineNumber() ) ); _lineLabel->setText( err.line() ); _descriptionLabel->setText( description( err.type() ) ); diff --git a/kghostview/kdscerrordialog.h b/kghostview/kdscerrordialog.h index 67d3dd4a..27f948c5 100644 --- a/kghostview/kdscerrordialog.h +++ b/kghostview/kdscerrordialog.h @@ -42,9 +42,10 @@ private: class KDSCErrorDialog : public KDialog, public KDSCErrorHandler { Q_OBJECT + TQ_OBJECT public: - KDSCErrorDialog( TQWidget* parent = 0 ); + KDSCErrorDialog( TQWidget* tqparent = 0 ); Response error( const KDSCError& ); diff --git a/kghostview/kgv_miniwidget.cpp b/kghostview/kgv_miniwidget.cpp index a6acdd53..115434b9 100644 --- a/kghostview/kgv_miniwidget.cpp +++ b/kghostview/kgv_miniwidget.cpp @@ -124,7 +124,7 @@ void KGVMiniWidget::goToPage() #else TQString num; bool b = false; - num = KLineEditDlg::getText(i18n("Go to Page"), i18n("Page:"), TQString::null, &b, _part->widget(), new TQIntValidator(1, dsc()->page_count(), this)); + num = KLineEditDlg::getText(i18n("Go to Page"), i18n("Page:"), TQString(), &b, _part->widget(), new TQIntValidator(1, dsc()->page_count(), this)); if (b) goToPage( num.toInt() - 1 ); #endif } @@ -384,7 +384,7 @@ void KGVMiniWidget::showPage( int pagenumber ) kdDebug(4500) << "KGVMiniWidget::showPage( " << pagenumber << " )" << endl; - static_cast< TQWidget* >( _psWidget->parent() )->show(); + TQT_TQWIDGET( _psWidget->tqparent() )->show(); _psWidget->setFileName(_document->fileName(), dsc()->isStructured() ); _psWidget->clear(); @@ -441,7 +441,7 @@ void KGVMiniWidget::showPage( int pagenumber ) /* KNotifyClient::userEvent (i18n("KGhostview cannot load the document, \"%1\".\n" - "It appears to be broken.").arg( _fileName ), + "It appears to be broken.").tqarg( _fileName ), KNotifyClient::Messagebox); _psWidget->disableInterpreter(); _psFile=0; @@ -452,8 +452,8 @@ void KGVMiniWidget::showPage( int pagenumber ) } } // Do this after ajusting pagenumber above - _thumbnailService->cancelRequests( -1 , _part->scrollBox(), TQT_SLOT( setThumbnail( TQPixmap ) ) ); - _thumbnailService->delayedGetThumbnail( pagenumber, _part->scrollBox(), TQT_SLOT( setThumbnail( TQPixmap ) ), true ); + _thumbnailService->cancelRequests( -1 , TQT_TQOBJECT(_part->scrollBox()), TQT_SLOT( setThumbnail( TQPixmap ) ) ); + _thumbnailService->delayedGetThumbnail( pagenumber, TQT_TQOBJECT(_part->scrollBox()), TQT_SLOT( setThumbnail( TQPixmap ) ), true ); emit newPageShown( pagenumber ); } @@ -486,13 +486,13 @@ void KGVMiniWidget::updateStatusBarText( int pageNumber ) else if( !_usePageLabels || document()->format() == KGVDocument::PDF ) text = i18n( "Page %1 of %2" ) - .arg( pageNumber + 1 ) - .arg( dsc()->page_count() ); + .tqarg( pageNumber + 1 ) + .tqarg( dsc()->page_count() ); else text = i18n( "Page %1 (%2 of %3)" ) - .arg( dsc()->page()[ _options.page() ].label ) - .arg( pageNumber + 1 ) - .arg( dsc()->page_count() ); + .tqarg( dsc()->page()[ _options.page() ].label ) + .tqarg( pageNumber + 1 ) + .tqarg( dsc()->page_count() ); emit setStatusBarText( text ); } @@ -534,7 +534,7 @@ void KGVMiniWidget::buildTOC() } } else { - marklist->insertItem( TQString::fromLatin1( "1" ), 0 ); + marklist->insertItem( TQString::tqfromLatin1( "1" ), 0 ); } } diff --git a/kghostview/kgv_miniwidget.h b/kghostview/kgv_miniwidget.h index a518657b..7b212157 100644 --- a/kghostview/kgv_miniwidget.h +++ b/kghostview/kgv_miniwidget.h @@ -35,9 +35,10 @@ class KGVPart; class KPSWidget; class MarkList; -class KGVMiniWidget : public QObject +class KGVMiniWidget : public TQObject { Q_OBJECT + TQ_OBJECT public: KGVMiniWidget( KGVPart* part, const char* name = 0 ); diff --git a/kghostview/kgv_view.cpp b/kghostview/kgv_view.cpp index ed08e8e4..1056d22b 100644 --- a/kghostview/kgv_view.cpp +++ b/kghostview/kgv_view.cpp @@ -59,7 +59,7 @@ namespace KGV { /* - * This is because Qt's iterators + * This is because TQt's iterators * are not standard iterators bc of missing typedefs, * so they are only *almost* STL compatible */ @@ -74,10 +74,10 @@ namespace KGV { } } -KGVPart::KGVPart( TQWidget* parentWidget, const char*, - TQObject* parent, const char* name, +KGVPart::KGVPart( TQWidget* tqparentWidget, const char*, + TQObject* tqparent, const char* name, const TQStringList &args ) : - KParts::ReadOnlyPart( parent, name ), + KParts::ReadOnlyPart( tqparent, name ), _fitTimer( new TQTimer( this ) ), _job( 0 ), _mimetypeScanner( 0 ), @@ -85,13 +85,13 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _isGuiInitialized( false ), _isFileDirty( false ), _stickyOptions( false ), - _embeddedInKGhostView( !args.contains( "KParts::ReadOnlyPart" ) ), + _embeddedInKGhostView( !args.tqcontains( "KParts::ReadOnlyPart" ) ), _customZoomIndex( -1 ) { setInstance( KGVFactory::instance() ); // Don't show the progress info dialog if we're embedded in Konqueror. - setProgressInfoEnabled( !args.contains( "Browser/View") ); + setProgressInfoEnabled( !args.tqcontains( "Browser/View") ); _document = new KGVDocument( this ); connect( _document, TQT_SIGNAL( fileChangeFailed() ), @@ -108,8 +108,8 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, this, TQT_SLOT( slotDoFileDirty() ) ); // Setup main widget - _mainWidget = new KGVMainWidget( parentWidget ); - _mainWidget->setFocusPolicy( TQWidget::StrongFocus ); + _mainWidget = new KGVMainWidget( tqparentWidget ); + _mainWidget->setFocusPolicy( TQ_StrongFocus ); _mainWidget->installEventFilter( this ); _mainWidget->setAcceptDrops( true ); connect( _mainWidget, TQT_SIGNAL( spacePressed() ), @@ -165,14 +165,14 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _markList = new MarkList( _mainWidget, "marklist", _docManager ); _markList->setFixedWidth( PAGELIST_WIDTH ); vlay->addWidget( _markList, 1 ); - connect( _markList, TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& ) ), + connect( TQT_TQOBJECT(_markList), TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& ) ), this, TQT_SLOT( showPopup( int, int, const TQPoint& ) ) ); - connect( _markList, TQT_SIGNAL( selected( int ) ), + connect( TQT_TQOBJECT(_markList), TQT_SIGNAL( selected( int ) ), _docManager, TQT_SLOT( goToPage( int ) ) ); connect( _docManager, TQT_SIGNAL( newPageShown( int ) ), - _markList, TQT_SLOT( select( int ) ) ); + TQT_TQOBJECT(_markList), TQT_SLOT( select( int ) ) ); connect( _docManager, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) ); connect( _scrollBox, TQT_SIGNAL( valueChangedRelative( int, int ) ), @@ -195,34 +195,34 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _popup = new KPopupMenu( _markList, "marklist_menu" ); KAction *act = new KAction( i18n( "Mark Current Page" ), "flag", CTRL+SHIFT+Key_M, - _markList, TQT_SLOT( markCurrent() ), + TQT_TQOBJECT(_markList), TQT_SLOT( markCurrent() ), actionCollection(), "mark_current" ); act->plug( _popup ); act = new KAction( i18n( "Mark &All Pages" ), 0, - _markList, TQT_SLOT( markAll() ), + TQT_TQOBJECT(_markList), TQT_SLOT( markAll() ), actionCollection(), "mark_all" ); act->plug( _popup ); act = new KAction( i18n( "Mark &Even Pages" ), 0, - _markList, TQT_SLOT( markEven() ), + TQT_TQOBJECT(_markList), TQT_SLOT( markEven() ), actionCollection(), "mark_even" ); act->plug( _popup ); act = new KAction( i18n( "Mark &Odd Pages" ), 0, - _markList, TQT_SLOT( markOdd() ), + TQT_TQOBJECT(_markList), TQT_SLOT( markOdd() ), actionCollection(), "mark_odd" ); act->plug( _popup ); act = new KAction( i18n( "&Toggle Page Marks" ), 0, - _markList, TQT_SLOT( toggleMarks() ), + TQT_TQOBJECT(_markList), TQT_SLOT( toggleMarks() ), actionCollection(), "toggle" ); act->plug( _popup ); act = new KAction( i18n("&Remove Page Marks"), 0, - _markList, TQT_SLOT( removeMarks() ), + TQT_TQOBJECT(_markList), TQT_SLOT( removeMarks() ), actionCollection(), "remove" ); act->plug( _popup ); // TODO -- disable entry if there aren't any page names //-- View Menu ---------------------------------------------------------- - _selectOrientation = new KSelectAction( i18n( "&Orientation" ), 0, 0, 0, + _selectOrientation = new KSelectAction( i18n( "&Qt::Orientation" ), 0, 0, 0, actionCollection(), "orientation_menu" ); _selectMedia = new KSelectAction( i18n( "Paper &Size" ), 0, 0, 0, actionCollection(), "media_menu" ); @@ -264,7 +264,7 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, for ( TQValueList<double>::iterator first = mags.begin(), last = mags.end(); first != last; ++first ) { - TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( *first * 100.0, 2 )); + TQString str = TQString( "%1%" ).tqarg( KGlobal::locale()->formatNumber( *first * 100.0, 2 )); str.remove( KGlobal::locale()->decimalSymbol() + "00" ); zooms << str; if ( *first == 1.0 ) idx = cur; @@ -426,7 +426,7 @@ bool KGVPart::closeURL() _mimetypeScanner->abort(); if( !m_file.isEmpty() ) _fileWatcher->removeFile( m_file ); - _mimetype = TQString::null; + _mimetype = TQString(); updatePageDepActions(); stateChanged( "initState" ); return KParts::ReadOnlyPart::closeURL(); @@ -582,7 +582,7 @@ void KGVPart::updateZoomActions() first != last; ++first ) { TQString cur = *first; - cur.remove( cur.find( '%' ), 1 ); + cur.remove( cur.tqfind( '%' ), 1 ); cur = cur.simplifyWhiteSpace(); bool ok = false; double z = cur.toDouble(&ok); @@ -600,7 +600,7 @@ void KGVPart::updateZoomActions() } // Show percentage that isn't predefined - TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( zoom, 2 )); + TQString str = TQString( "%1%" ).tqarg( KGlobal::locale()->formatNumber( zoom, 2 )); str.remove( KGlobal::locale()->decimalSymbol() + "00" ); items.insert( items.at(idx), 1, str ); _zoomTo->setItems( items ); @@ -682,10 +682,10 @@ void KGVPart::openURLContinue() // mimetype-determination (e.g. koffice) TQString extension; TQString fileName = m_url.fileName(); - int extensionPos = fileName.findRev( '.' ); + int extensionPos = fileName.tqfindRev( '.' ); if( extensionPos != -1 ) extension = fileName.mid( extensionPos ); // keep the '.' - KTempFile tempFile( TQString::null, extension ); + KTempFile tempFile( TQString(), extension ); m_file = tempFile.name(); _tmpFile.setName( m_file ); _tmpFile.open( IO_ReadWrite ); @@ -750,8 +750,8 @@ void KGVPart::slotGhostscriptError( const TQString& error ) "Below are any error messages which were received from Ghostscript " "(<nobr><strong>%2</strong></nobr>) " "which may help you.</qt>" ) - .arg( error ) - .arg( Configuration::interpreter() ), + .tqarg( error ) + .tqarg( Configuration::interpreter() ), true ); // The true above makes it show a "configure gs" option, but maybe we // should trigger an auto-redetection? @@ -784,7 +784,7 @@ void KGVPart::slotMimetypeFinished( const TQString& type ) kdDebug(4500) << "KGVPart::slotMimetypeFinished( " << type << " )" << endl; _mimetype = type; if( !_mimetypeScanner || _mimetypeScanner->hasError() ) - emit canceled( TQString::null ); + emit canceled( TQString() ); else openURLContinue(); _mimetypeScanner = 0; @@ -796,7 +796,7 @@ void KGVPart::slotMimetypeError() _mimetypeScanner = 0; emit started( 0 ); //kapp->processEvents(); - emit canceled( TQString::null ); + emit canceled( TQString() ); } void KGVPart::slotJobFinished( KIO::Job* job ) @@ -839,7 +839,7 @@ void KGVPart::slotNewPage( int ) { updatePageDepActions(); //media->setCurrentItem (miniWidget()->getSize()-1); - //orientation->setCurrentItem (miniWidget()->getOrientation()-1); + //orientation->setCurrentItem (miniWidget()->getQt::Orientation()-1); //TODO -- zoom } @@ -901,7 +901,7 @@ void KGVPart::slotZoom( const TQString& nz ) { TQString z = nz; double zoom; - z.remove( z.find( '%' ), 1 ); + z.remove( z.tqfind( '%' ), 1 ); zoom = KGlobal::locale()->readNumber( z ) / 100; kdDebug( 4500 ) << "ZOOM = " << nz << ", setting zoom = " << zoom << endl; @@ -968,7 +968,7 @@ void KGVPart::setDisplayOptions( const DisplayOptions& options ) _docManager->setDisplayOptions( options ); _selectOrientation->setCurrentItem( options.overrideOrientation() ); TQStringList medias = document()->mediaNames(); - TQStringList::Iterator now = medias.find( options.overridePageMedia() ); + TQStringList::Iterator now = medias.tqfind( options.overridePageMedia() ); if ( now != medias.end() ){ // The options are displayed in inverted order. // Therefore, size() - index gets you the display index @@ -979,8 +979,8 @@ void KGVPart::setDisplayOptions( const DisplayOptions& options ) } -KGVBrowserExtension::KGVBrowserExtension( KGVPart *parent ) : - KParts::BrowserExtension( parent, "KGVBrowserExtension" ) +KGVBrowserExtension::KGVBrowserExtension( KGVPart *tqparent ) : + KParts::BrowserExtension( tqparent, "KGVBrowserExtension" ) { emit enableAction( "print", true ); setURLDropHandlingEnabled( true ); @@ -988,7 +988,7 @@ KGVBrowserExtension::KGVBrowserExtension( KGVPart *parent ) : void KGVBrowserExtension::print() { - ((KGVPart *)parent())->document()->print(); + ((KGVPart *)tqparent())->document()->print(); } diff --git a/kghostview/kgv_view.h b/kghostview/kgv_view.h index 634704fe..4576a0d0 100644 --- a/kghostview/kgv_view.h +++ b/kghostview/kgv_view.h @@ -19,7 +19,7 @@ #ifndef __KGV_VIEW_H #define __KGV_VIEW_H -#include <tqcstring.h> // QByteArray +#include <tqcstring.h> // TQByteArray #include <tqfile.h> #include <kio/job.h> @@ -55,9 +55,10 @@ class ScrollBox; class KGVPart: public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - KGVPart( TQWidget* parentWidget, const char* widgetName, - TQObject* parent, const char* name, + KGVPart( TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent, const char* name, const TQStringList& args = TQStringList() ); virtual ~KGVPart(); @@ -230,9 +231,10 @@ private: class KGVBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT friend class KGVPart; // emits our signals public: - KGVBrowserExtension( KGVPart* parent ); + KGVBrowserExtension( KGVPart* tqparent ); virtual ~KGVBrowserExtension() {} public slots: @@ -243,6 +245,7 @@ public slots: class KGVRun : public KRun { Q_OBJECT + TQ_OBJECT public: KGVRun( const KURL& url, mode_t mode = 0, diff --git a/kghostview/kgvconfigdialog.cpp b/kghostview/kgvconfigdialog.cpp index ed55df1e..6159a6f2 100644 --- a/kghostview/kgvconfigdialog.cpp +++ b/kghostview/kgvconfigdialog.cpp @@ -100,7 +100,7 @@ namespace { { if ( version < TQString::number( 6.53 ) ) return TQString::number( 6.53 ); if ( version[ 0 ] == '7' && version < TQString::number( 7.04 ) ) return TQString::number( 7.05 ); - return TQString::null; + return TQString(); } // This function should contain all the gs version specific workarounds. void redoGSDetection() @@ -114,13 +114,13 @@ namespace { "which are impossible to resolve. Please upgrade to a newer version.\n" "KGhostView will try to work with it, but it may not display any files at all.\n" "Version %2 seems to be appropriate on your system, although newer versions will work as well." ) - .arg( version ) - .arg( recommended ) ); + .tqarg( version ) + .tqarg( recommended ) ); } if ( version < TQString::number( 7.00 ) ) { TQStringList arguments = TQStringList::split( ' ', Configuration::antialiasingArguments() ); - arguments.remove( TQString::fromLatin1( "-dMaxBitmap=10000000" ) ); + arguments.remove( TQString::tqfromLatin1( "-dMaxBitmap=10000000" ) ); TQString antiAliasArgs = arguments.join( " " ); Configuration::setAntialiasingArguments( antiAliasArgs ); @@ -140,9 +140,9 @@ void ConfigDialog::showSettings( KGVPart* main ) { KConfigDialog* dialog = new KConfigDialog( 0, name, Configuration::self(), KDialogBase::IconList ); dialog->addPage( new GeneralSettingsWidget( 0, "general-settings" ), - i18n( "General" ), TQString::fromLatin1( "kghostview" ) ); + i18n( "General" ), TQString::tqfromLatin1( "kghostview" ) ); GSSettingsWidget *gssw = new GSSettingsWidget( 0, "gs-settings" ); - dialog->addPage( gssw, i18n( "Ghostscript\nConfiguration" ), TQString::fromLatin1( "pdf" ) ); + dialog->addPage( gssw, i18n( "Ghostscript\nConfiguration" ), TQString::tqfromLatin1( "pdf" ) ); gssw->setDetectedVersion(Configuration::version()); diff --git a/kghostview/kgvdocument.cpp b/kghostview/kgvdocument.cpp index 8b522f5d..9d314596 100644 --- a/kghostview/kgvdocument.cpp +++ b/kghostview/kgvdocument.cpp @@ -98,7 +98,7 @@ void KGVDocument::doOpenFile() KMessageBox::sorry( _part->widget(), i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: " "File does not exist.</qt>" ) - .arg( _fileName ) ); + .tqarg( _fileName ) ); emit canceled( TQString() ); return; } @@ -107,7 +107,7 @@ void KGVDocument::doOpenFile() KMessageBox::sorry( _part->widget(), i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: " "Permission denied.</qt>" ) - .arg( _fileName ) ); + .tqarg( _fileName ) ); emit canceled( TQString() ); return; } @@ -127,12 +127,12 @@ void KGVDocument::doOpenFile() if( _mimetype == "application/pdf" || _mimetype == "application/x-pdf" ) // see bug:67474 { - _tmpDSC = new KTempFile( TQString::null, ".ps" ); + _tmpDSC = new KTempFile( TQString(), ".ps" ); Q_CHECK_PTR( _tmpDSC ); if( _tmpDSC->status() != 0 ) { KMessageBox::error( _part->widget(), i18n( "Could not create temporary file: %1" ) - .arg( strerror( _tmpDSC->status() ) ) ); + .tqarg( strerror( _tmpDSC->status() ) ) ); emit canceled( TQString() ); return; } @@ -159,8 +159,8 @@ void KGVDocument::doOpenFile() "which has type <strong>%2</strong>. KGhostview can " "only load PostScript (.ps, .eps) and Portable " "Document Format (.pdf) files.</qt>" ) - .arg( _fileName ) - .arg( _mimetype ) ); + .tqarg( _fileName ) + .tqarg( _mimetype ) ); emit canceled( TQString() ); return; } @@ -190,7 +190,7 @@ bool KGVDocument::uncompressFile() { KMessageBox::error( _part->widget(), i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" ) - .arg( _fileName ) ); + .tqarg( _fileName ) ); emit canceled( TQString() ); return false; } @@ -201,7 +201,7 @@ bool KGVDocument::uncompressFile() { KMessageBox::error( _part->widget(), i18n( "Could not create temporary file: %2" ) - .arg( strerror( _tmpUnzipped->status() ) ) ); + .tqarg( strerror( _tmpUnzipped->status() ) ) ); emit canceled( TQString() ); return false; } @@ -221,7 +221,7 @@ bool KGVDocument::uncompressFile() { KMessageBox::error( _part->widget(), i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" ) - .arg( _fileName ) ); + .tqarg( _fileName ) ); emit canceled( TQString() ); return false; } @@ -239,7 +239,7 @@ void KGVDocument::openPDFFileContinue( bool pdf2dscResult ) { KMessageBox::error( _part->widget(), i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr>.</qt>" ) - .arg( _part->url().url() ) ); + .tqarg( _part->url().url() ) ); emit canceled( TQString() ); return; } @@ -260,8 +260,8 @@ void KGVDocument::openPSFile(const TQString &file) { KMessageBox::error( _part->widget(), i18n( "<qt>Error opening file <nobr><strong>%1</strong></nobr>: %2</qt>" ) - .arg( _part->url().url() ) - .arg( strerror( errno ) ) ); + .tqarg( _part->url().url() ) + .tqarg( strerror( errno ) ) ); emit canceled( "" ); return; } @@ -353,14 +353,14 @@ bool KGVDocument::convertFromPDF( const TQString& saveFileName, << "-dSAFER" << "-dPARANOIDSAFER" << "-sDEVICE=pswrite" - << ( TQCString("-sOutputFile=")+TQFile::encodeName(saveFileName) ) + << ( TQCString("-sOutputFile=")+TQFile::encodeName(saveFileName).data() ) << ( TQString("-dFirstPage=")+TQString::number( firstPage ) ) << ( TQString("-dLastPage=")+TQString::number( lastPage ) ) << "-c" << "save" << "pop" << "-f" - << TQFile::encodeName(_fileName); + << TQFile::encodeName(_fileName).data(); /*TQValueList<TQCString> args = process.args(); TQValueList<TQCString>::Iterator it = args.begin(); @@ -497,7 +497,7 @@ TQString KGVDocument::pageListToRange( const PageList& pageList ) if( bss == ess ) range += TQString::number( *ess ); else - range += TQString( "%1-%2" ).arg( *bss ).arg( *ess ); + range += TQString( "%1-%2" ).tqarg( *bss ).tqarg( *ess ); bss = it; } @@ -521,9 +521,9 @@ void KGVDocument::print() printer.setOption( "kde-range", pageListToRange( _part->markList()->markList() ) ); - if( printer.setup( _part->widget(), i18n("Print %1").arg(_part->url().fileName()) ) ) + if( printer.setup( _part->widget(), i18n("Print %1").tqarg(_part->url().fileName()) ) ) { - KTempFile tf( TQString::null, ".ps" ); + KTempFile tf( TQString(), ".ps" ); if( tf.status() == 0 ) { if ( printer.pageList().empty() ) { @@ -548,7 +548,7 @@ void KGVDocument::print() { printer.setPageSelection( KPrinter::SystemSide ); - if( printer.setup( _part->widget(), i18n("Print %1").arg(_part->url().fileName()) ) ) + if( printer.setup( _part->widget(), i18n("Print %1").tqarg(_part->url().fileName()) ) ) printer.printFiles( _fileName ); } } @@ -562,9 +562,9 @@ void KGVDocument::saveAs() _part->url().isLocalFile() ? _part->url().url() : _part->url().fileName(), - TQString::null, + TQString(), _part->widget(), - TQString::null ); + TQString() ); if( !KIO::NetAccess::upload( _fileName, saveURL, static_cast<TQWidget*>( 0 ) ) ) { @@ -580,7 +580,7 @@ bool KGVDocument::savePages( const TQString& saveFileName, if( _format == PDF ) { - KTempFile psSaveFile( TQString::null, ".ps" ); + KTempFile psSaveFile( TQString(), ".ps" ); psSaveFile.setAutoDelete( true ); if( psSaveFile.status() != 0 ) return false; @@ -590,8 +590,8 @@ bool KGVDocument::savePages( const TQString& saveFileName, for( PageList::const_iterator ci = pageList.begin(); ci != pageList.end(); ++ci ) { - minPage = QMIN( *ci, minPage ); - maxPage = QMAX( *ci, maxPage ); + minPage = TQMIN( *ci, minPage ); + maxPage = TQMAX( *ci, maxPage ); } @@ -774,14 +774,14 @@ void KGVDocument::runPdf2ps( const TQString& pdfName, KProcess process; process << _interpreterPath << "-dNODISPLAY" - << "-dQUIET" - << TQString( "-sPDFname=%1" ).arg( pdfName ) + << "-dTQUIET" + << TQString( "-sPDFname=%1" ).tqarg( pdfName ) << TQString( "-sDSCnamale locale( "kghostview" ); _fallBackPageMedia = pageSizeToString( static_cast< TQPrinter::PageSize >( locale.pageSize() ) ); _usePageLabels = false; -e=%1" ).arg( dscName ) +e=%1" ).tqarg( dscName ) << "pdf2dsc.ps" << "-c" << "quit"; @@ -801,8 +801,8 @@ void KGVDocument::pdf2psExited( KProcess* process ) } */ -Pdf2dsc::Pdf2dsc( const TQString& ghostscriptPath, TQObject* parent, const char* name ) : - TQObject( parent, name ), +Pdf2dsc::Pdf2dsc( const TQString& ghostscriptPath, TQObject* tqparent, const char* name ) : + TQObject( tqparent, name ), _process( 0 ), _ghostscriptPath( ghostscriptPath ) {} @@ -822,9 +822,9 @@ void Pdf2dsc::run( const TQString& pdfName, const TQString& dscName ) << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNODISPLAY" - << "-dQUIET" - << TQString( "-sPDFname=%1" ).arg( pdfName ) - << TQString( "-sDSCname=%1" ).arg( dscName ) + << "-dTQUIET" + << TQString( "-sPDFname=%1" ).tqarg( pdfName ) + << TQString( "-sDSCname=%1" ).tqarg( dscName ) << "-c" << "<< /PermitFileReading [ PDFname ] /PermitFileWriting [ DSCname ] /PermitFileControl [] >> setuserparams .locksafe" << "-f" diff --git a/kghostview/kgvdocument.h b/kghostview/kgvdocument.h index 581e5ba8..dc68765b 100644 --- a/kghostview/kgvdocument.h +++ b/kghostview/kgvdocument.h @@ -31,9 +31,10 @@ class KPrinter; class KTempFile; class Pdf2dsc; -class KGVDocument : public QObject +class KGVDocument : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Format { PS, PDF }; @@ -116,7 +117,7 @@ protected: * kdelibs installed. Generally it will work for .gz and .bz2 */ bool uncompressFile(); - void openPSFile(const TQString &file=TQString::null); + void openPSFile(const TQString &file=TQString()); protected: bool savePages( const TQString& saveFileName, @@ -156,12 +157,13 @@ private: }; -class Pdf2dsc : public QObject +class Pdf2dsc : public TQObject { Q_OBJECT + TQ_OBJECT public: - Pdf2dsc( const TQString& ghostscriptPath, TQObject* parent = 0, const char* name = 0 ); + Pdf2dsc( const TQString& ghostscriptPath, TQObject* tqparent = 0, const char* name = 0 ); ~Pdf2dsc(); void run( const TQString& pdfName, const TQString& dscName ); diff --git a/kghostview/kgvfactory.cpp b/kghostview/kgvfactory.cpp index d7a082b0..7a41aa57 100644 --- a/kghostview/kgvfactory.cpp +++ b/kghostview/kgvfactory.cpp @@ -52,8 +52,8 @@ KGVFactory *KGVFactory::s_self; KInstance *KGVFactory::s_instance; KAboutData *KGVFactory::s_aboutData; -KParts::Part *KGVFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +KParts::Part *KGVFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const char *className, const TQStringList &args_ ) { @@ -64,13 +64,13 @@ KParts::Part *KGVFactory::createPartObject( TQWidget *parentWidget, const char * * * as we did before. */ - args << TQString::fromLatin1( className ); + args << TQString::tqfromLatin1( className ); if ( !strcmp( className, "Browser/View" ) ) { className = "KParts::ReadOnlyPart"; } - KGVPart *part = KDEPrivate::ConcreteFactory<KGVPart>::create( parentWidget, + KGVPart *part = KDEPrivate::ConcreteFactory<KGVPart>::create( tqparentWidget, widgetName, - parent, + tqparent, name, className, args ); diff --git a/kghostview/kgvfactory.h b/kghostview/kgvfactory.h index 9a5d507f..67829b91 100644 --- a/kghostview/kgvfactory.h +++ b/kghostview/kgvfactory.h @@ -33,8 +33,8 @@ class KDE_EXPORT KGVFactory : public KParts::Factory static KInstance *instance(); static KAboutData *aboutData(); - virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, + virtual KParts::Part *createPartObject( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const char *className, const TQStringList &args ); diff --git a/kghostview/kgvmainwidget.cpp b/kghostview/kgvmainwidget.cpp index 5e9bd40b..49823ad0 100644 --- a/kghostview/kgvmainwidget.cpp +++ b/kghostview/kgvmainwidget.cpp @@ -20,8 +20,8 @@ #include <kurl.h> #include <kurldrag.h> -KGVMainWidget::KGVMainWidget( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) {} +KGVMainWidget::KGVMainWidget( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) {} void KGVMainWidget::keyPressEvent( TQKeyEvent* event ) { diff --git a/kghostview/kgvmainwidget.h b/kghostview/kgvmainwidget.h index 99b9dc9b..0aa464d3 100644 --- a/kghostview/kgvmainwidget.h +++ b/kghostview/kgvmainwidget.h @@ -23,12 +23,13 @@ class KURL; -class KGVMainWidget : public QWidget +class KGVMainWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KGVMainWidget( TQWidget* parent = 0, const char* name = 0 ); + KGVMainWidget( TQWidget* tqparent = 0, const char* name = 0 ); signals: void spacePressed(); diff --git a/kghostview/kgvpagedecorator.cpp b/kghostview/kgvpagedecorator.cpp index b6304c1d..d7ea7e0d 100644 --- a/kghostview/kgvpagedecorator.cpp +++ b/kghostview/kgvpagedecorator.cpp @@ -23,8 +23,8 @@ #include "kgvpagedecorator.h" -KGVPageDecorator::KGVPageDecorator( TQWidget* parent, const char* name ) : - TQHBox( parent, name ), +KGVPageDecorator::KGVPageDecorator( TQWidget* tqparent, const char* name ) : + TQHBox( tqparent, name ), _margin( 5 ), _borderWidth( 1 ), _shadowOffset( 2, 2 ) @@ -63,7 +63,7 @@ void KGVPageDecorator::drawFrame( TQPainter* p ) if( !r.isValid() ) return; - const TQColorGroup& cg = colorGroup(); + const TQColorGroup& cg = tqcolorGroup(); r.moveCenter( r.center() + _shadowOffset ); qDrawPlainRect( p, r, cg.shadow(), _shadowOffset.manhattanLength() ); diff --git a/kghostview/kgvpagedecorator.h b/kghostview/kgvpagedecorator.h index 40839fdc..546063bf 100644 --- a/kghostview/kgvpagedecorator.h +++ b/kghostview/kgvpagedecorator.h @@ -21,10 +21,10 @@ #include <tqhbox.h> -class KGVPageDecorator : public QHBox +class KGVPageDecorator : public TQHBox { public: - KGVPageDecorator( TQWidget* parent = 0, const char* name = 0 ); + KGVPageDecorator( TQWidget* tqparent = 0, const char* name = 0 ); ~KGVPageDecorator() { ; } unsigned int margin() const; @@ -49,13 +49,13 @@ protected: virtual void drawFrame( TQPainter* ); /** - * Draw the mask of both the frame and the contents in order to create a + * Draw the tqmask of both the frame and the contents in order to create a * partially transparent frame. */ virtual void drawMask( TQPainter* ); /** - * Reimplemented from TQWidget. It uses @ref drawMask() to draw the mask + * Reimplemented from TQWidget. It uses @ref drawMask() to draw the tqmask * of the frame when transparency is required. */ virtual void updateMask(); diff --git a/kghostview/kgvpageview.cpp b/kghostview/kgvpageview.cpp index 2cc5f7e6..577a8c98 100644 --- a/kghostview/kgvpageview.cpp +++ b/kghostview/kgvpageview.cpp @@ -22,13 +22,13 @@ #include "kgvpageview.h" -KGVPageView::KGVPageView( TQWidget* parent, const char* name ) - : TQScrollView( parent, name ) +KGVPageView::KGVPageView( TQWidget* tqparent, const char* name ) + : TQScrollView( tqparent, name ) { _page = 0; - setFocusPolicy( TQWidget::StrongFocus ); - viewport()->setFocusPolicy( TQWidget::WheelFocus ); + setFocusPolicy( TQ_StrongFocus ); + viewport()->setFocusPolicy( TQ_WheelFocus ); } void KGVPageView::setPage( TQWidget* page ) @@ -52,7 +52,7 @@ bool KGVPageView::atBottom() const bool KGVPageView::eventFilter( TQObject* o, TQEvent* e ) { - if ( o == _page && e->type() == TQEvent::Resize ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(_page) && e->type() == TQEvent::Resize ) { // We need to call TQScrollView::eventFilter before centerContents, // otherwise a loop will be introduced. bool result = TQScrollView::eventFilter( o, e ); @@ -88,16 +88,16 @@ void KGVPageView::wheelEvent( TQWheelEvent *e ) } void KGVPageView::mousePressEvent( TQMouseEvent * e ) { - if ( e->button() & LeftButton ) + if ( e->button() & Qt::LeftButton ) { _dragGrabPos = e -> globalPos(); setCursor( sizeAllCursor ); } - else if ( e->button() & MidButton ) + else if ( e->button() & Qt::MidButton ) { emit ReadDown(); } - else if ( e -> button() & RightButton ) + else if ( e -> button() & Qt::RightButton ) { emit rightClick(); } @@ -105,7 +105,7 @@ void KGVPageView::mousePressEvent( TQMouseEvent * e ) void KGVPageView::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e -> button() & LeftButton ) + if ( e -> button() & Qt::LeftButton ) { setCursor( arrowCursor ); } @@ -113,7 +113,7 @@ void KGVPageView::mouseReleaseEvent( TQMouseEvent *e ) void KGVPageView::mouseMoveEvent( TQMouseEvent * e ) { - if ( e->state() & LeftButton ) + if ( e->state() & Qt::LeftButton ) { TQPoint delta = _dragGrabPos - e->globalPos(); scrollBy( delta.x(), delta.y() ); @@ -126,7 +126,7 @@ bool KGVPageView::readUp() if( atTop() ) return false; else { - int newValue = QMAX( verticalScrollBar()->value() - height() + 50, + int newValue = TQMAX( verticalScrollBar()->value() - height() + 50, verticalScrollBar()->minValue() ); /* @@ -148,7 +148,7 @@ bool KGVPageView::readDown() if( atBottom() ) return false; else { - int newValue = QMIN( verticalScrollBar()->value() + height() - 50, + int newValue = TQMIN( verticalScrollBar()->value() + height() - 50, verticalScrollBar()->maxValue() ); /* diff --git a/kghostview/kgvpageview.h b/kghostview/kgvpageview.h index 6f76f458..63f9c5af 100644 --- a/kghostview/kgvpageview.h +++ b/kghostview/kgvpageview.h @@ -27,12 +27,13 @@ * will be centered on the viewport. Furthermore it adds the ability to scroll * the page by dragging it using the mouse. */ -class KGVPageView : public QScrollView +class KGVPageView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - KGVPageView( TQWidget* parent = 0, const char* name = 0 ); + KGVPageView( TQWidget* tqparent = 0, const char* name = 0 ); ~KGVPageView() { ; } void setPage( TQWidget* ); diff --git a/kghostview/kgvshell.cpp b/kghostview/kgvshell.cpp index 708921ab..fcbda90c 100644 --- a/kghostview/kgvshell.cpp +++ b/kghostview/kgvshell.cpp @@ -50,7 +50,7 @@ #include "displayoptions.h" #include "fullscreenfilter.h" -#undef Always // avoid X11/Qt namespace clash +#undef Always // avoid X11/TQt namespace clash #include "kgvshell.moc" //TODO -- disable GUI when no file @@ -60,29 +60,29 @@ KGVShell::KGVShell() : _tmpFile( 0 ) { m_gvpart = KParts::ComponentFactory::createPartInstanceFromLibrary< KGVPart >( "libkghostviewpart", this, "kgvpart", - this, "kgvpart" ); + TQT_TQOBJECT(this), "kgvpart" ); /*---- File -----------------------------------------------------------*/ openact = - KStdAction::open( this, TQT_SLOT( slotFileOpen() ), + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), actionCollection() ); recent = - KStdAction::openRecent( this, TQT_SLOT( openURL( const KURL& ) ), + KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); KStdAction::print( m_gvpart->document(), TQT_SLOT( print() ), actionCollection() ); (void) - KStdAction::quit( this, TQT_SLOT( slotQuit() ), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotQuit() ), actionCollection() ); /*---- View -----------------------------------------------------------*/ new KAction( i18n( "&Reload" ), "reload", KStdAccel::shortcut( KStdAccel::Reload ), m_gvpart, TQT_SLOT( reloadFile() ), actionCollection(), "reload" ); - new KAction( i18n( "&Maximize" ), Key_M, this, + new KAction( i18n( "&Maximize" ), Key_M, TQT_TQOBJECT(this), TQT_SLOT( slotMaximize() ), actionCollection(), "maximize"); - _showMenuBarAction = KStdAction::showMenubar( this, TQT_SLOT( slotShowMenubar() ), actionCollection() ); + _showMenuBarAction = KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotShowMenubar() ), actionCollection() ); /*---- Settings -------------------------------------------------------*/ #if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90) @@ -91,11 +91,11 @@ KGVShell::KGVShell() : setAutoSaveSettings(); setStandardToolBarMenuEnabled(true); #if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90) - m_fullScreenAction = KStdAction::fullScreen( this, TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); + m_fullScreenAction = KStdAction::fullScreen( TQT_TQOBJECT(this), TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); #else m_fullScreenAction = new KToggleAction( this, TQT_SLOT( slotUpdateFullScreen() ) ); #endif - KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); + KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); @@ -115,7 +115,7 @@ actionCollection()); // We could, at the user's option, make this connection and kghostview // will always resize to fit the width of the page. But, for now, // let's not. - // connect ( m_gvpart->widget(), TQT_SIGNAL (sizeHintChanged()), this, TQT_SLOT (slotResize ()) ); + // connect ( m_gvpart->widget(), TQT_SIGNAL (tqsizeHintChanged()), this, TQT_SLOT (slotResize ()) ); setCentralWidget( m_gvpart->widget() ); createGUI( m_gvpart ); @@ -252,7 +252,7 @@ KGVShell::openStdin() if( _tmpFile->status() != 0 ) { KMessageBox::error( this, i18n( "Could not create temporary file: %1" ) - .arg( strerror( _tmpFile->status() ) ) ); + .tqarg( strerror( _tmpFile->status() ) ) ); return; } @@ -269,7 +269,7 @@ KGVShell::openStdin() if( read != 0 ) { KMessageBox::error( this, i18n( "Could not open standard input stream: %1" ) - .arg( strerror( errno ) ) ); + .tqarg( strerror( errno ) ) ); return; } @@ -309,7 +309,7 @@ void KGVShell::slotMaximize() void KGVShell::slotResize() { - resize( m_gvpart->pageView()->sizeHint().width(), height() ); + resize( m_gvpart->pageView()->tqsizeHint().width(), height() ); } void KGVShell::setFullScreen( bool useFullScreen ) diff --git a/kghostview/kgvshell.h b/kghostview/kgvshell.h index 73b7f128..7152fc88 100644 --- a/kghostview/kgvshell.h +++ b/kghostview/kgvshell.h @@ -38,6 +38,7 @@ class FullScreenFilter; class KDE_EXPORT KGVShell : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: KGVShell(); diff --git a/kghostview/kpswidget.cpp b/kghostview/kpswidget.cpp index 85f22827..389b5284 100644 --- a/kghostview/kpswidget.cpp +++ b/kghostview/kpswidget.cpp @@ -80,8 +80,8 @@ TQCString palette2String( Configuration::EnumPalette::type palette ) } -KPSWidget::KPSWidget( TQWidget* parent, const char* name ) : - TQWidget ( parent, name ), +KPSWidget::KPSWidget( TQWidget* tqparent, const char* name ) : + TQWidget ( tqparent, name ), _gsWindow ( None ), _usePipe ( false ), _doubleBuffer ( false ), @@ -279,8 +279,8 @@ void KPSWidget::setupWidget() Q_ASSERT( orientation() != CDSC_ORIENT_UNKNOWN ); - const float dpiX = _magnification * x11AppDpiX(); - const float dpiY = _magnification * x11AppDpiY(); + const float dpiX = _magnification * TQT_TQPAINTDEVICE(this)->x11AppDpiX(); + const float dpiY = _magnification * TQT_TQPAINTDEVICE(this)->x11AppDpiY(); int newWidth = 0, newHeight = 0; if( orientation() == CDSC_PORTRAIT || orientation() == CDSC_UPSIDEDOWN ) @@ -333,7 +333,7 @@ void KPSWidget::setupWidget() // Make sure the properties are updated immediately. XSync( x11Display(), false ); - repaint(); + tqrepaint(); _widgetDirty = false; } @@ -343,7 +343,7 @@ bool KPSWidget::startInterpreter() setupWidget(); _process = new KProcess; - if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) ); + if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).tqarg( winId() ).tqarg( _backgroundPixmap.handle() ) ); else _process->setEnvironment( "GHOSTVIEW", TQString::number( winId() ) ); *_process << _ghostscriptPath.local8Bit(); @@ -420,7 +420,7 @@ void KPSWidget::slotProcessExited( KProcess* process ) { kdDebug( 4500 ) << "KPSWidget::slotProcessExited(): looks like it was not a clean exit." << endl; if ( process->normalExit() ) { - emit ghostscriptError( TQString( i18n( "Exited with error code %1." ).arg( process->exitStatus() ) ) ); + emit ghostscriptError( TQString( i18n( "Exited with error code %1." ).tqarg( process->exitStatus() ) ) ); } else { emit ghostscriptError( TQString( i18n( "Process killed or crashed." ) ) ); } @@ -464,7 +464,7 @@ void KPSWidget::gs_input( KProcess* process ) const unsigned buffer_size = 4096; if ( !_buffer ) _buffer = static_cast<char*>( operator new( buffer_size ) ); const int bytesRead = fread( _buffer, sizeof (char), - QMIN( buffer_size, current.len ), + TQMIN( buffer_size, current.len ), current.fp ); if( bytesRead > 0 ) { @@ -493,7 +493,7 @@ void KPSWidget::readSettings() if( !Configuration::platformFonts() ) arguments << "-dNOPLATFONTS"; - arguments << "-dNOPAUSE" << "-dQUIET" << "-dSAFER" << "-dPARANOIDSAFER"; + arguments << "-dNOPAUSE" << "-dTQUIET" << "-dSAFER" << "-dPARANOIDSAFER"; setGhostscriptArguments( arguments ); diff --git a/kghostview/kpswidget.h b/kghostview/kpswidget.h index c2ca49cb..3420aa6b 100644 --- a/kghostview/kpswidget.h +++ b/kghostview/kpswidget.h @@ -43,12 +43,13 @@ class MessagesDialog; * @ref ghostscript_interface */ -class KPSWidget : public QWidget +class KPSWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KPSWidget( TQWidget* parent = 0, const char* name = 0 ); + KPSWidget( TQWidget* tqparent = 0, const char* name = 0 ); ~KPSWidget(); /** diff --git a/kghostview/logwindow.cpp b/kghostview/logwindow.cpp index 69c61ac3..f3f41deb 100644 --- a/kghostview/logwindow.cpp +++ b/kghostview/logwindow.cpp @@ -27,8 +27,8 @@ #include "logwindow.h" LogWindow::LogWindow( const TQString& caption, - TQWidget* parent, const char* name) : - KDialogBase( parent, name, false, caption, User1|Close, Close, false, + TQWidget* tqparent, const char* name) : + KDialogBase( tqparent, name, false, caption, User1|Close, Close, false, KStdGuiItem::clear() ) { TQVBox * display = makeVBoxMainWidget(); @@ -36,11 +36,11 @@ LogWindow::LogWindow( const TQString& caption, _errorIndication = new TQLabel( "", display, "logview-label" ); _errorIndication->hide(); - _configureGS = new KURLLabel( i18n( "Configure Ghostscript" ), TQString::null, display ); + _configureGS = new KURLLabel( i18n( "Configure Ghostscript" ), TQString(), display ); _configureGS->hide(); _logView = new TQTextEdit( display, "logview" ); - _logView->setTextFormat( Qt::PlainText ); + _logView->setTextFormat( TQt::PlainText ); _logView->setReadOnly( true ); _logView->setWordWrap( TQTextEdit::NoWrap ); _logView->setFont( KGlobalSettings::fixedFont() ); diff --git a/kghostview/logwindow.h b/kghostview/logwindow.h index 7be4bf98..277bcdfd 100644 --- a/kghostview/logwindow.h +++ b/kghostview/logwindow.h @@ -28,10 +28,11 @@ class KURLLabel; class LogWindow : public KDialogBase { Q_OBJECT + TQ_OBJECT public: LogWindow( const TQString& caption, - TQWidget* parent = 0, const char* name = 0 ); + TQWidget* tqparent = 0, const char* name = 0 ); public slots: void append( const TQString& message ); diff --git a/kghostview/marklist.cpp b/kghostview/marklist.cpp index df06bd9d..50aa4cbc 100644 --- a/kghostview/marklist.cpp +++ b/kghostview/marklist.cpp @@ -32,8 +32,8 @@ #include "kgv_miniwidget.h" -MarkListItem::MarkListItem(TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget* miniW, int pageNum) - : TQWidget( parent ), +MarkListItem::MarkListItem(TQWidget *tqparent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget* miniW, int pageNum) + : TQWidget( tqparent ), _miniWidget( miniW ), _pageNum( pageNum ), _requested( false ) @@ -43,7 +43,7 @@ MarkListItem::MarkListItem(TQWidget *parent, const TQString &text, const TQStrin _thumbnailW = new TQWidget( this ); _checkBox = new TQCheckBox( text, this ); l->addWidget( _thumbnailW, 1 ); - l->addWidget( _checkBox, 0, Qt::AlignHCenter ); + l->addWidget( _checkBox, 0, TQt::AlignHCenter ); TQWhatsThis::add( _checkBox, i18n( "Using this checkbox you can select pages for printing." ) ); setFixedHeight( 100 ); _backgroundColor = color; @@ -72,22 +72,27 @@ void MarkListItem::setPixmap( TQPixmap thumbnail ) // The line below is needed to work around certain "features" of styles such as liquid // see bug:61711 for more info (LPC, 20 Aug '03) _thumbnailW->setBackgroundOrigin( TQWidget::WidgetOrigin ); - _thumbnailW->setPaletteBackgroundPixmap( thumbnail.convertToImage().smoothScale( _thumbnailW->size() ) ); + TQPixmap pm; + pm.convertFromImage( thumbnail.convertToImage().smoothScale( _thumbnailW->size() ) ); + _thumbnailW->setPaletteBackgroundPixmap( pm ); _requested = false; } void MarkListItem::setSelected( bool selected ) { if (selected) - setPaletteBackgroundColor( TQApplication::palette().active().highlight() ); + setPaletteBackgroundColor( TQApplication::tqpalette().active().highlight() ); else setPaletteBackgroundColor( _backgroundColor ); } void MarkListItem::resizeEvent( TQResizeEvent * ) { - if ( _thumbnailW->paletteBackgroundPixmap() ) - _thumbnailW->setPaletteBackgroundPixmap( _thumbnailW->paletteBackgroundPixmap()->convertToImage().smoothScale( _thumbnailW->size() ) ); + if ( _thumbnailW->paletteBackgroundPixmap() ) { + TQPixmap pm; + pm.convertFromImage( _thumbnailW->paletteBackgroundPixmap()->convertToImage().smoothScale( _thumbnailW->size() ) ); + _thumbnailW->setPaletteBackgroundPixmap( pm ); + } } void MarkListItem::paintEvent( TQPaintEvent* ) @@ -100,7 +105,7 @@ void MarkListItem::paintEvent( TQPaintEvent* ) */ if ( _requested ) return; if ( !_thumbnailW->paletteBackgroundPixmap() || _thumbnailW->paletteBackgroundPixmap()->isNull() ) { - _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, this, TQT_SLOT( setPixmap( TQPixmap ) ) ); + _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, TQT_TQOBJECT(this), TQT_SLOT( setPixmap( TQPixmap ) ) ); _requested = true; } } @@ -108,8 +113,8 @@ void MarkListItem::paintEvent( TQPaintEvent* ) /* MarkList */ -MarkList::MarkList( TQWidget* parent, const char* name, KGVMiniWidget* mini) - : TQTable( parent, name ), +MarkList::MarkList( TQWidget* tqparent, const char* name, KGVMiniWidget* mini) + : TQTable( tqparent, name ), _selected ( -1 ), _miniWidget( mini ) { diff --git a/kghostview/marklist.h b/kghostview/marklist.h index 4405f877..1977a18d 100644 --- a/kghostview/marklist.h +++ b/kghostview/marklist.h @@ -24,11 +24,12 @@ class KGVMiniWidget; -class MarkListItem : public QWidget +class MarkListItem : public TQWidget { Q_OBJECT + TQ_OBJECT public: - MarkListItem( TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget*, int ); + MarkListItem( TQWidget *tqparent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget*, int ); bool isChecked() const; @@ -51,16 +52,17 @@ private: bool _requested; }; -class MarkList: public QTable +class MarkList: public TQTable { Q_OBJECT + TQ_OBJECT public: - MarkList( TQWidget* parent = 0, const char* name = 0, KGVMiniWidget* = 0 ); + MarkList( TQWidget* tqparent = 0, const char* name = 0, KGVMiniWidget* = 0 ); TQValueList<int> markList() const; void insertItem( const TQString& text, int index = -1, - const TQString& tip = TQString::null ); + const TQString& tip = TQString() ); public slots: void select( int index ); diff --git a/kghostview/scrollbox.cpp b/kghostview/scrollbox.cpp index d318ec31..f9c23904 100644 --- a/kghostview/scrollbox.cpp +++ b/kghostview/scrollbox.cpp @@ -22,8 +22,8 @@ #include "scrollbox.h" -ScrollBox::ScrollBox( TQWidget* parent, const char* name ) - : TQFrame( parent, name ) +ScrollBox::ScrollBox( TQWidget* tqparent, const char* name ) + : TQFrame( tqparent, name ) { setFrameStyle( Panel | Sunken ); } @@ -31,15 +31,15 @@ ScrollBox::ScrollBox( TQWidget* parent, const char* name ) void ScrollBox::mousePressEvent( TQMouseEvent* e ) { mouse = e->pos(); - if( e->button() == RightButton ) + if( e->button() == Qt::RightButton ) emit button3Pressed(); - if( e->button() == MidButton ) + if( e->button() == Qt::MidButton ) emit button2Pressed(); } void ScrollBox::mouseMoveEvent( TQMouseEvent* e ) { - if( e->state() != LeftButton ) + if( e->state() != Qt::LeftButton ) return; int dx = ( e->pos().x() - mouse.x() ) * pagesize.width() / width(); @@ -57,8 +57,11 @@ void ScrollBox::mouseMoveEvent( TQMouseEvent* e ) void ScrollBox::resizeEvent( TQResizeEvent * ) { - if ( paletteBackgroundPixmap() ) - setPaletteBackgroundPixmap( paletteBackgroundPixmap()->convertToImage().smoothScale( size() ) ); + if ( paletteBackgroundPixmap() ) { + TQPixmap pm; + pm.convertFromImage(paletteBackgroundPixmap()->convertToImage().smoothScale( size() )); + setPaletteBackgroundPixmap( pm ); + } } void ScrollBox::drawContents( TQPainter* paint ) @@ -77,7 +80,7 @@ void ScrollBox::drawContents( TQPainter* paint ) TQRect c( contentsRect() ); - paint -> setPen( Qt::red ); + paint -> setPen( TQt::red ); int len = pagesize.width(); int x = c.x() + c.width() * viewpos.x() / len; @@ -96,19 +99,19 @@ void ScrollBox::setPageSize( const TQSize& s ) { pagesize = s; setFixedHeight( s.height() * width() / s.width() ); - repaint(); + tqrepaint(); } void ScrollBox::setViewSize( const TQSize& s ) { viewsize = s; - repaint(); + tqrepaint(); } void ScrollBox::setViewPos( const TQPoint& pos ) { viewpos = pos; - repaint(); + tqrepaint(); } void ScrollBox::setThumbnail( TQPixmap img ) @@ -116,7 +119,9 @@ void ScrollBox::setThumbnail( TQPixmap img ) // The line below is needed to work around certain "features" of styles such as liquid // see bug:61711 for more info (LPC, 20 Aug '03) setBackgroundOrigin( TQWidget::WidgetOrigin ); - setPaletteBackgroundPixmap( img.convertToImage().smoothScale( size() ) ); + TQPixmap pm; + pm.convertFromImage(img.convertToImage().smoothScale( size() )); + setPaletteBackgroundPixmap( pm ); } void ScrollBox::clear() diff --git a/kghostview/scrollbox.h b/kghostview/scrollbox.h index 487e2c7e..04722166 100644 --- a/kghostview/scrollbox.h +++ b/kghostview/scrollbox.h @@ -22,12 +22,13 @@ #include <tqframe.h> #include <tqimage.h> -class ScrollBox: public QFrame +class ScrollBox: public TQFrame { Q_OBJECT + TQ_OBJECT public: - ScrollBox( TQWidget* parent = 0, const char* name = 0 ); + ScrollBox( TQWidget* tqparent = 0, const char* name = 0 ); public slots: void setPageSize( const TQSize& ); diff --git a/kghostview/thumbnailservice.cpp b/kghostview/thumbnailservice.cpp index 817d1c03..9887ec4b 100644 --- a/kghostview/thumbnailservice.cpp +++ b/kghostview/thumbnailservice.cpp @@ -28,14 +28,14 @@ #include <cassert> #include <cstring> -ThumbnailService::ThumbnailService( KGVMiniWidget* parent, const char* name ) : - TQObject( parent, name ), - _mini( parent ), +ThumbnailService::ThumbnailService( KGVMiniWidget* tqparent, const char* name ) : + TQObject( tqparent, name ), + _mini( tqparent ), timer_( new TQTimer( this ) ), _busy( false ), _enabled( false ) { - _thumbnailDrawer = new KPSWidget( parent->_part->widget(), "thumbnail-drawer" ); + _thumbnailDrawer = new KPSWidget( tqparent->_part->widget(), "thumbnail-drawer" ); _thumbnailDrawer->readSettings(); connect( _thumbnailDrawer, TQT_SIGNAL( newPageImage( TQPixmap ) ), TQT_SLOT( slotDone( TQPixmap ) ) ); connect( timer_, TQT_SIGNAL( timeout() ), TQT_SLOT( processOne() ) ); diff --git a/kghostview/thumbnailservice.h b/kghostview/thumbnailservice.h index 50bc2d6d..e57f18bf 100644 --- a/kghostview/thumbnailservice.h +++ b/kghostview/thumbnailservice.h @@ -30,8 +30,9 @@ class TQTimer; class ThumbnailService : public TQObject { Q_OBJECT + TQ_OBJECT public: - ThumbnailService( KGVMiniWidget* parent, const char* name = 0 ); + ThumbnailService( KGVMiniWidget* tqparent, const char* name = 0 ); ~ThumbnailService(); public slots: diff --git a/kghostview/viewcontrol.cpp b/kghostview/viewcontrol.cpp index 1740bf4d..5a912a0c 100644 --- a/kghostview/viewcontrol.cpp +++ b/kghostview/viewcontrol.cpp @@ -25,10 +25,10 @@ #include <kbuttonbox.h> #include <kseparator.h> -ViewControl::ViewControl( TQWidget *parent, const char *name ) - : TQDialog( parent, name ) +ViewControl::ViewControl( TQWidget *tqparent, const char *name ) + : TQDialog( tqparent, name ) { - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); TQBoxLayout *topLayout = new TQVBoxLayout( this, 10 ); @@ -36,7 +36,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) vcGroupBox = new TQGroupBox( this ); vcGroupBox->setFrameStyle( TQFrame::NoFrame ); //vcGroupBox->setTitle( i18n("Force Changes To") ); - //vcGroupBox->setAlignment( 1 ); + //vcGroupBox->tqsetAlignment( 1 ); topLayout->addWidget( vcGroupBox, 10 ); @@ -51,7 +51,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) magComboBox = new TQComboBox( FALSE, vcGroupBox ); - magComboBox->setFixedHeight( magComboBox->sizeHint().height() ); + magComboBox->setFixedHeight( magComboBox->tqsizeHint().height() ); //magComboBox->hide(); @@ -63,7 +63,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) mediaComboBox = new TQComboBox( FALSE, vcGroupBox ); - mediaComboBox->setFixedHeight( magComboBox->sizeHint().height() ); + mediaComboBox->setFixedHeight( magComboBox->tqsizeHint().height() ); connect ( mediaComboBox, TQT_SIGNAL (activated (int)), this, TQT_SLOT (slotMediaSelection (int)) ); @@ -75,7 +75,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) orientComboBox->insertItem(i18n("Landscape")); orientComboBox->insertItem(i18n("Seascape")); orientComboBox->insertItem(i18n("Upside Down")); - orientComboBox->setFixedHeight( magComboBox->sizeHint().height() ); + orientComboBox->setFixedHeight( magComboBox->tqsizeHint().height() ); connect ( orientComboBox, TQT_SIGNAL (activated (int)), this, TQT_SLOT (slotOrientSelection (int)) ); @@ -85,9 +85,9 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) TQLabel* vcLabel; vcLabel = new TQLabel( magComboBox, i18n("&Magnification"), vcGroupBox ); - vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix ); - if ( vcLabel->sizeHint().width() > labelWidth ) - labelWidth = vcLabel->sizeHint().width(); + vcLabel->tqsetAlignment( AlignRight | AlignVCenter | ShowPrefix ); + if ( vcLabel->tqsizeHint().width() > labelWidth ) + labelWidth = vcLabel->tqsizeHint().width(); vcLabel->setMinimumWidth( labelWidth ); vcLabel->hide(); @@ -96,24 +96,24 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) vcLabel = new TQLabel( mediaComboBox, i18n("M&edia"), vcGroupBox ); - vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix ); - if ( vcLabel->sizeHint().width() > labelWidth ) - labelWidth = vcLabel->sizeHint().width(); + vcLabel->tqsetAlignment( AlignRight | AlignVCenter | ShowPrefix ); + if ( vcLabel->tqsizeHint().width() > labelWidth ) + labelWidth = vcLabel->tqsizeHint().width(); vcLabel->setMinimumWidth( labelWidth ); grid->addWidget( vcLabel, 1, 0 ); - vcLabel = new TQLabel( orientComboBox, i18n("&Orientation"), vcGroupBox ); - vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix ); - if ( vcLabel->sizeHint().width() > labelWidth ) - labelWidth = vcLabel->sizeHint().width(); + vcLabel = new TQLabel( orientComboBox, i18n("&Qt::Orientation"), vcGroupBox ); + vcLabel->tqsetAlignment( AlignRight | AlignVCenter | ShowPrefix ); + if ( vcLabel->tqsizeHint().width() > labelWidth ) + labelWidth = vcLabel->tqsizeHint().width(); vcLabel->setMinimumWidth( labelWidth ); grid->addWidget( vcLabel, 2, 0 ); - vcGroupBox->setMinimumHeight( 2*orientComboBox->sizeHint().height()+20 ); + vcGroupBox->setMinimumHeight( 2*orientComboBox->tqsizeHint().height()+20 ); vcGroupBox->setMinimumWidth( - 40 + labelWidth + orientComboBox->sizeHint().width() ); + 40 + labelWidth + orientComboBox->tqsizeHint().width() ); KSeparator* sep = new KSeparator( KSeparator::HLine, this); topLayout->addWidget( sep ); @@ -130,7 +130,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) connect( closebtn, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); - bbox->layout(); + bbox->tqlayout(); topLayout->addWidget( bbox ); topLayout->activate(); diff --git a/kghostview/viewcontrol.h b/kghostview/viewcontrol.h index de766247..7f2c07c1 100644 --- a/kghostview/viewcontrol.h +++ b/kghostview/viewcontrol.h @@ -6,11 +6,12 @@ class TQComboBox; class TQPushButton; -class ViewControl : public QDialog +class ViewControl : public TQDialog { Q_OBJECT + TQ_OBJECT public: - ViewControl( TQWidget *parent, const char *name ); + ViewControl( TQWidget *tqparent, const char *name ); TQComboBox* magComboBox; TQComboBox* mediaComboBox; TQComboBox* orientComboBox; diff --git a/kiconedit/kcolorgrid.cpp b/kiconedit/kcolorgrid.cpp index 35b0dfaa..e08529e1 100644 --- a/kiconedit/kcolorgrid.cpp +++ b/kiconedit/kcolorgrid.cpp @@ -69,8 +69,8 @@ uint KColorArray::closestMatch(uint color) return c|OPAQUE_MASK; } -KColorGrid::KColorGrid(TQWidget *parent, const char *name, int space) - : TQWidget(parent, name, Qt::WResizeNoErase|Qt::WRepaintNoErase) +KColorGrid::KColorGrid(TQWidget *tqparent, const char *name, int space) + : TQWidget(tqparent, name, TQt::WResizeNoErase|TQt::WRepaintNoErase) { //kdDebug(4640) << "KColorGrid - constructor" << endl; s = space; @@ -163,7 +163,7 @@ void KColorGrid::resizeEvent(TQResizeEvent *) } */ -TQSize KColorGrid::sizeHint() const +TQSize KColorGrid::tqsizeHint() const { return TQSize(totalwidth, totalheight); } @@ -203,7 +203,7 @@ void KColorGrid::setNumRows(int n) rows = n; gridcolors.resize(n*numCols()); - //QTableView::setNumRows(n); + //TQTableView::setNumRows(n); totalheight = (n * cellsize) + 1; resize(totalwidth, totalheight); //kdDebug(4640) << "setNumRows() - gridcolors: " << gridcolors.size() << " size: " << numCols()*numRows() << endl; @@ -269,9 +269,9 @@ void KColorGrid::setColor( int colNum, uint col, bool update ) return; //kdDebug(4640) << "KColorGrid::setColor - before adding" << endl; - if(!numcolors.contains(col)) + if(!numcolors.tqcontains(col)) { - //kdDebug(4640) << "KColorGrid::setColor() - adding " << // col << " - " << qRed(col) << " " << qGreen(col) << " " << qBlue(col) << endl; + //kdDebug(4640) << "KColorGrid::setColor() - adding " << // col << " - " << tqRed(col) << " " << tqGreen(col) << " " << tqBlue(col) << endl; numcolors.append(col); //kdDebug(4640) << "KColorGrid::setColor() - adding done " << numcolors.size()-1 << endl; //numcolors++; @@ -279,12 +279,12 @@ void KColorGrid::setColor( int colNum, uint col, bool update ) } //kdDebug(4640) << "KColorGrid::setColor - before removing" << endl; - if(!gridcolors.contains(oldcolor)) + if(!gridcolors.tqcontains(oldcolor)) { - int idx = numcolors.find(oldcolor); + int idx = numcolors.tqfind(oldcolor); if(idx != -1) { - //kdDebug(4640) << "KColorGrid::setColor() - removing " << // oldcolor << " - " << qRed(oldcolor) << " " << qGreen(oldcolor) << " " << qBlue(oldcolor) << endl; + //kdDebug(4640) << "KColorGrid::setColor() - removing " << // oldcolor << " - " << tqRed(oldcolor) << " " << tqGreen(oldcolor) << " " << tqBlue(oldcolor) << endl; numcolors.remove(idx); //kdDebug(4640) << "KColorGrid::setColor() - removing done" << endl; emit colorschanged(numcolors.size(), numcolors.data()); @@ -293,14 +293,14 @@ void KColorGrid::setColor( int colNum, uint col, bool update ) } //kdDebug(4640) << "KColorGrid::setColor - before updateCell" << endl; - repaint((colNum%numCols())*cellsize,(colNum/numCols())*cellsize, cellsize, cellsize); + tqrepaint((colNum%numCols())*cellsize,(colNum/numCols())*cellsize, cellsize, cellsize); //updateCell( colNum/numCols(), colNum%numCols(), false ); //kdDebug(4640) << "KColorGrid::setColor - after updateCell" << endl; } void KColorGrid::updateCell( int row, int col, bool ) { - //kdDebug(4640) << "updateCell - before repaint" << endl; + //kdDebug(4640) << "updateCell - before tqrepaint" << endl; TQWMatrix matrix; TQPainter p; p.begin( this ); @@ -317,7 +317,7 @@ void KColorGrid::updateColors() for(int i = 0; i < (int)gridcolors.size(); i++) { uint col = gridcolors.at(i); - if(!numcolors.contains(col)) + if(!numcolors.tqcontains(col)) numcolors.append(col); } emit colorschanged(numcolors.size(), numcolors.data()); @@ -330,6 +330,6 @@ void KColorGrid::setCellSize( int s ) totalheight = (numRows() * s) + 1; resize(totalwidth, totalheight); if ( isVisible() ) - repaint(viewRect(), false); + tqrepaint(viewRect(), false); } #include "kcolorgrid.moc" diff --git a/kiconedit/kcolorgrid.h b/kiconedit/kcolorgrid.h index 76091b45..00a3d478 100644 --- a/kiconedit/kcolorgrid.h +++ b/kiconedit/kcolorgrid.h @@ -37,12 +37,13 @@ public: uint closestMatch(uint); }; -class KColorGrid : public QWidget +class KColorGrid : public TQWidget { private: Q_OBJECT + TQ_OBJECT public: - KColorGrid( TQWidget * parent = 0, const char *name = 0, int spacing = 0); + KColorGrid( TQWidget * tqparent = 0, const char *name = 0, int spacing = 0); virtual ~KColorGrid() {}; enum GridState { Plain, Shaded }; @@ -55,7 +56,7 @@ public: bool hasGrid() { return hasgrid; } uint numColors() { return numcolors.size(); } uint colors( uint *c ) { c = numcolors.data(); return numcolors.size(); } - bool contains(uint c) { return numcolors.contains(c); } + bool tqcontains(uint c) { return numcolors.tqcontains(c); } uint colorAt(int idx) { return gridcolors.at(idx); } uint *data() {return numcolors.data(); } void fill(uint color); @@ -64,7 +65,7 @@ public: virtual void setCellSize( int s ); virtual int cellSize() { return cellsize; } - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; void setSize(const TQSize s) { setNumRows(s.height()); setNumCols(s.width()); } diff --git a/kiconedit/kicon.cpp b/kiconedit/kicon.cpp index 9da72c9b..f1f31590 100644 --- a/kiconedit/kicon.cpp +++ b/kiconedit/kicon.cpp @@ -32,8 +32,8 @@ #include "kicon.h" #include "utils.h" -KIconEditIcon::KIconEditIcon(TQObject *parent, const TQImage *img, KURL url) - : TQObject(parent) +KIconEditIcon::KIconEditIcon(TQObject *tqparent, const TQImage *img, KURL url) + : TQObject(tqparent) { f = 0; _lastdir = "/"; @@ -70,8 +70,8 @@ bool KIconEditIcon::open(const TQImage *image, KURL url) if(!url.isValid()) // Giving up { - TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url()); - KMessageBox::sorry((TQWidget*)parent(), msg); + TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").tqarg(url.url()); + KMessageBox::sorry((TQWidget*)tqparent(), msg); return false; } } @@ -84,10 +84,10 @@ bool KIconEditIcon::open(const TQImage *image, KURL url) } else { - if(!KIO::NetAccess::download( url, filename, (TQWidget*)parent() )) + if(!KIO::NetAccess::download( url, filename, (TQWidget*)tqparent() )) { - TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL()); - KMessageBox::error((TQWidget*)parent(), msg); + TQString msg = i18n("There was an error loading:\n%1\n").tqarg(url.prettyURL()); + KMessageBox::error((TQWidget*)tqparent(), msg); return false; } } @@ -101,8 +101,8 @@ bool KIconEditIcon::open(const TQImage *image, KURL url) if(!loadedOk) { - TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL()); - KMessageBox::error((TQWidget*)parent(), msg); + TQString msg = i18n("There was an error loading:\n%1\n").tqarg(url.prettyURL()); + KMessageBox::error((TQWidget*)tqparent(), msg); } else { @@ -152,10 +152,10 @@ bool KIconEditIcon::promptForFile(const TQImage *img) "*.ico|Icon files (*.ico)\n"); - KURL url = KFileDialog::getOpenURL( TQString::null, filter ); + KURL url = KFileDialog::getOpenURL( TQString(), filter ); */ bool loaded = false; - KURL url = KFileDialog::getImageOpenURL( TQString::null, static_cast<TQWidget *>(parent()) ); + KURL url = KFileDialog::getImageOpenURL( TQString(), TQT_TQWIDGET(tqparent()) ); if( !url.isEmpty() ) { @@ -174,7 +174,7 @@ bool KIconEditIcon::saveAs(const TQImage *image) TQString file; //Get list of file types.. - KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, static_cast<TQWidget *>(parent()), "file dialog", true); + KFileDialog *dialog=new KFileDialog(TQString(), TQString(), TQT_TQWIDGET(tqparent()), "file dialog", true); dialog->setCaption( i18n("Save Icon As") ); dialog->setKeepLocation( true ); dialog->setMimeFilter( KImageIO::mimeTypes(KImageIO::Writing), "image/png" ); @@ -206,9 +206,9 @@ bool KIconEditIcon::saveAs(const TQImage *image) if(TQFile::exists(file)) { - int r=KMessageBox::warningContinueCancel(static_cast<TQWidget *>(parent()), + int r=KMessageBox::warningContinueCancel(TQT_TQWIDGET(tqparent()), i18n( "A file named \"%1\" already exists. " - "Overwrite it?" ).arg(file), + "Overwrite it?" ).tqarg(file), i18n( "Overwrite File?" ), i18n( "&Overwrite" ) ); @@ -265,8 +265,8 @@ bool KIconEditIcon::save(const TQImage *image, const TQString &_filename) } else { - TQString msg = i18n("There was an error saving:\n%1\n").arg(str); - KMessageBox::error((TQWidget*)parent(), msg); + TQString msg = i18n("There was an error saving:\n%1\n").tqarg(str); + KMessageBox::error((TQWidget*)tqparent(), msg); kdDebug(4640) << "KIconEditIcon::save - " << msg << endl; } diff --git a/kiconedit/kicon.h b/kiconedit/kicon.h index d808995e..f38e4cca 100644 --- a/kiconedit/kicon.h +++ b/kiconedit/kicon.h @@ -43,9 +43,10 @@ class TQImage; -class KIconEditIcon : public QObject +class KIconEditIcon : public TQObject { Q_OBJECT + TQ_OBJECT public: KIconEditIcon(TQObject*, const TQImage*, KURL url = KURL() ); ~KIconEditIcon(); @@ -57,7 +58,7 @@ public: public slots: bool open(const TQImage*, KURL url = KURL()); bool promptForFile(const TQImage*); - bool save(const TQImage*, const TQString &filename=TQString::null); + bool save(const TQImage*, const TQString &filename=TQString()); bool saveAs(const TQImage*); signals: diff --git a/kiconedit/kiconcolors.cpp b/kiconedit/kiconcolors.cpp index d3046ad4..c2042432 100644 --- a/kiconedit/kiconcolors.cpp +++ b/kiconedit/kiconcolors.cpp @@ -25,7 +25,7 @@ #include "kiconcolors.h" -KDrawColors::KDrawColors(TQWidget *parent) : KColorGrid(parent, 0, 3) +KDrawColors::KDrawColors(TQWidget *tqparent) : KColorGrid(tqparent, 0, 3) { kdDebug(4640) << "KDrawColors - constructor" << endl; setCellSize(17); @@ -43,7 +43,7 @@ void KDrawColors::paintCell( TQPainter *painter, int row, int col ) int d = spacing(); qDrawShadePanel( painter, d, d, cellSize()-d, cellSize()-d, - colorGroup(), true, 1, &brush); + tqcolorGroup(), true, 1, &brush); if ( row * numCols() + col == selected) painter->drawWinFocusRect( d+1, d+1, cellSize()-(2*d)+1, cellSize()-(2*d)+1 ); } @@ -65,7 +65,7 @@ void KDrawColors::mouseReleaseEvent( TQMouseEvent *e ) emit newColor(colorAt(cell)|OPAQUE_MASK); } -KSysColors::KSysColors(TQWidget *parent) : KDrawColors(parent) +KSysColors::KSysColors(TQWidget *tqparent) : KDrawColors(tqparent) { kdDebug(4640) << "KSysColors - constructor" << endl; @@ -85,7 +85,7 @@ KSysColors::KSysColors(TQWidget *parent) : KDrawColors(parent) kdDebug(4640) << "KSysColors - constructor - done" << endl; } -KCustomColors::KCustomColors(TQWidget *parent) : KDrawColors(parent) +KCustomColors::KCustomColors(TQWidget *tqparent) : KDrawColors(tqparent) { kdDebug(4640) << "KCustomColors - constructor" << endl; setNumRows(3); @@ -119,7 +119,7 @@ void KCustomColors::mouseDoubleClickEvent(TQMouseEvent *e) void KCustomColors::addColor(uint c) { - if(!contains(c)) + if(!tqcontains(c)) { int f = getFreeCell(); if(f != -1) @@ -130,7 +130,7 @@ void KCustomColors::addColor(uint c) kdDebug(4640) << "KCustomColors::addColor: Not a valid color: " << c << endl; return; } - //kdDebug(4640) << "KCustomColors::addColor: Adding color: " << c << " - " << qRed(c) << " " << qGreen(c) << " " << qBlue(c) << endl; + //kdDebug(4640) << "KCustomColors::addColor: Adding color: " << c << " - " << tqRed(c) << " " << tqGreen(c) << " " << tqBlue(c) << endl; setColor(f, c); freecells[f] = false; } diff --git a/kiconedit/kiconcolors.h b/kiconedit/kiconcolors.h index 71d8b240..90f07d09 100644 --- a/kiconedit/kiconcolors.h +++ b/kiconedit/kiconcolors.h @@ -31,8 +31,9 @@ class KDrawColors : public KColorGrid { Q_OBJECT + TQ_OBJECT public: - KDrawColors(TQWidget *parent); + KDrawColors(TQWidget *tqparent); //bool hasColor(uint); @@ -49,8 +50,9 @@ protected: class KCustomColors : public KDrawColors { Q_OBJECT + TQ_OBJECT public: - KCustomColors(TQWidget *parent); + KCustomColors(TQWidget *tqparent); ~KCustomColors(); void addColor(uint); @@ -69,9 +71,10 @@ protected: class KSysColors : public KDrawColors { Q_OBJECT + TQ_OBJECT public: - KSysColors(TQWidget *parent); + KSysColors(TQWidget *tqparent); }; diff --git a/kiconedit/kiconconfig.cpp b/kiconedit/kiconconfig.cpp index d4621a0b..e0e223a5 100644 --- a/kiconedit/kiconconfig.cpp +++ b/kiconedit/kiconconfig.cpp @@ -49,20 +49,20 @@ static inline TQPixmap loadIcon( const char * name ) { return KGlobal::instance()->iconLoader() - ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); + ->loadIcon( TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); } -KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent) - : KDialogBase(parent, "KTemplateEditDlg", true, i18n( "Icon Template" ), +KTemplateEditDlg::KTemplateEditDlg(TQWidget *tqparent) + : KDialogBase(tqparent, "KTemplateEditDlg", true, i18n( "Icon Template" ), Ok|Cancel ) { TQFrame *frame = makeMainWidget(); TQVBoxLayout *ml = new TQVBoxLayout(frame); TQGroupBox *grp = new TQGroupBox(i18n("Template"), frame); grp->setColumnLayout(0, Qt::Vertical); - grp->layout()->setSpacing(spacingHint()); - grp->layout()->setMargin(marginHint()); - TQGridLayout *l = new TQGridLayout(grp->layout()); + grp->tqlayout()->setSpacing(spacingHint()); + grp->tqlayout()->setMargin(marginHint()); + TQGridLayout *l = new TQGridLayout(grp->tqlayout()); ln_name = new TQLineEdit( grp ); connect( ln_name, TQT_SIGNAL( textChanged( const TQString & ) ), @@ -112,7 +112,7 @@ TQString KTemplateEditDlg::path() return ln_path->url(); } -KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent) +KTemplateConfig::KTemplateConfig(TQWidget *tqparent) : TQWidget(tqparent) { kdDebug(4640) << "KTemplateConfig constructor" << endl; @@ -130,7 +130,7 @@ KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent) TQVBoxLayout* ml = new TQVBoxLayout( this ); ml->addWidget( grp ); - TQVBoxLayout* l = new TQVBoxLayout( grp->layout(), KDialog::spacingHint() ); + TQVBoxLayout* l = new TQVBoxLayout( grp->tqlayout(), KDialog::spacingHint() ); l->addWidget( templates ); for( unsigned int i = 0; i < KIconTemplateContainer::self()->count(); i++ ) @@ -151,7 +151,7 @@ KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent) bbox->addStretch( 1 ); - bbox->layout(); + bbox->tqlayout(); l->addWidget( bbox ); } @@ -224,8 +224,8 @@ void KTemplateConfig::edit() } } -KBackgroundConfig::KBackgroundConfig( TQWidget* parent ) - : TQWidget( parent ) +KBackgroundConfig::KBackgroundConfig( TQWidget* tqparent ) + : TQWidget( tqparent ) { kdDebug(4640) << "KBackgroundConfig - constructor" << endl; @@ -246,11 +246,11 @@ KBackgroundConfig::KBackgroundConfig( TQWidget* parent ) TQGroupBox *grp1 = new TQGroupBox( i18n( "Select Background" ), this ); grp1->setColumnLayout(0, Qt::Vertical ); - grp1->layout()->setSpacing( KDialog::spacingHint() ); - grp1->layout()->setMargin( KDialog::marginHint() ); + grp1->tqlayout()->setSpacing( KDialog::spacingHint() ); + grp1->tqlayout()->setMargin( KDialog::marginHint() ); mainLayout->addWidget( grp1 ); - TQGridLayout *grp1Layout = new TQGridLayout( grp1->layout(), 3, 2 ); + TQGridLayout *grp1Layout = new TQGridLayout( grp1->tqlayout(), 3, 2 ); TQButtonGroup* btngrp = new TQButtonGroup( grp1 ); btngrp->setExclusive( true ); @@ -373,7 +373,7 @@ void KBackgroundConfig::selectPixmap() } } -KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent) +KMiscConfig::KMiscConfig(TQWidget *tqparent) : TQWidget(tqparent) { kdDebug(4640) << "KMiscConfig - constructor" << endl; @@ -524,32 +524,32 @@ void KMiscConfig::slotTransparencyDisplayType(int id) } } -KIconConfig::KIconConfig(TQWidget *parent) +KIconConfig::KIconConfig(TQWidget *tqparent) : KDialogBase(KDialogBase::IconList, i18n("Configure"), KDialogBase::Help | KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel, KDialogBase::Ok, - parent, "configDialog", true, true) + tqparent, "configDialog", true, true) { - setHelp(TQString::null); + setHelp(TQString()); //KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(finis())); - TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString::null, loadIcon("icons")); + TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString(), loadIcon("icons")); temps = new KTemplateConfig(page); - page = addVBoxPage(i18n("Background"), TQString::null, loadIcon("background")); + page = addVBoxPage(i18n("Background"), TQString(), loadIcon("background")); backs = new KBackgroundConfig(page); - page = addVBoxPage(i18n("Icon Grid"), TQString::null, loadIcon("kiconedit")); + page = addVBoxPage(i18n("Icon Grid"), TQString(), loadIcon("kiconedit")); misc = new KMiscConfig(page); TQSize min(300, 400); - if (300 < sizeHint().width()) { min.setWidth(sizeHint().width()); } - if (400 < sizeHint().height()) { min.setHeight(sizeHint().height()); } + if (300 < tqsizeHint().width()) { min.setWidth(tqsizeHint().width()); } + if (400 < tqsizeHint().height()) { min.setHeight(tqsizeHint().height()); } resize(min); } diff --git a/kiconedit/kiconconfig.h b/kiconedit/kiconconfig.h index be1450d3..df143c54 100644 --- a/kiconedit/kiconconfig.h +++ b/kiconedit/kiconconfig.h @@ -41,6 +41,7 @@ class TQComboBox; class KTemplateEditDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: KTemplateEditDlg(TQWidget *); ~KTemplateEditDlg() {}; @@ -58,9 +59,10 @@ protected: KURLRequester *ln_path; }; -class KTemplateConfig : public QWidget +class KTemplateConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: KTemplateConfig(TQWidget*); ~KTemplateConfig(); @@ -78,11 +80,12 @@ protected: TQPushButton *btadd, *btedit, *btremove; }; -class KBackgroundConfig : public QWidget +class KBackgroundConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KBackgroundConfig(TQWidget *parent); + KBackgroundConfig(TQWidget *tqparent); ~KBackgroundConfig(); public slots: @@ -104,11 +107,12 @@ protected: TQLabel *lb_ex; }; -class KMiscConfig : public QWidget +class KMiscConfig : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KMiscConfig(TQWidget *parent); + KMiscConfig(TQWidget *tqparent); ~KMiscConfig(); public slots: @@ -133,10 +137,11 @@ protected: class KIconConfig : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KIconConfig(TQWidget *parent); + KIconConfig(TQWidget *tqparent); ~KIconConfig(); protected slots: diff --git a/kiconedit/kiconedit.cpp b/kiconedit/kiconedit.cpp index 74325458..f6a6c335 100644 --- a/kiconedit/kiconedit.cpp +++ b/kiconedit/kiconedit.cpp @@ -64,7 +64,7 @@ void KIconEdit::init() gridview = new KGridView(&img, history, this); grid = gridview->grid(); - icon = new KIconEditIcon(this, &grid->image()); + icon = new KIconEditIcon(TQT_TQOBJECT(this), &grid->image()); setAcceptDrops(true); @@ -146,7 +146,7 @@ void KIconEdit::init() updateAccels(); show(); - moveDockWindow( m_paletteToolBar, Qt::DockRight, true, 0 ); + moveDockWindow( m_paletteToolBar, TQt::DockRight, true, 0 ); } KIconEdit::~KIconEdit() @@ -165,7 +165,7 @@ bool KIconEdit::queryClose() if (grid->isModified()) { int r = KMessageBox::warningYesNoCancel(this, - i18n("The current file has been modified.\nDo you want to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current file has been modified.\nDo you want to save it?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); switch(r) { @@ -222,10 +222,10 @@ void KIconEdit::writeConfig() saveMainWindowSettings( config, "MainWindowSettings" ); } -TQSize KIconEdit::sizeHint() const +TQSize KIconEdit::tqsizeHint() const { if(gridview) - return gridview->sizeHint(); + return gridview->tqsizeHint(); else return TQSize(-1, -1); } @@ -240,43 +240,43 @@ void KIconEdit::setupActions() // File Menu action = new KAction(i18n("New &Window"), "window_new", cut, - this, TQT_SLOT(slotNewWin()), actionCollection(), "file_new_window"); + TQT_TQOBJECT(this), TQT_SLOT(slotNewWin()), actionCollection(), "file_new_window"); action->setWhatsThis(i18n("New window\n\nOpens a new icon editor window.")); - action = KStdAction::openNew(this, TQT_SLOT(slotNew()), actionCollection()); + action = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotNew()), actionCollection()); action->setWhatsThis(i18n("New\n\nCreate a new icon, either from a" " template or by specifying the size")); - action = KStdAction::open(this, TQT_SLOT(slotOpen()), actionCollection()); + action = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotOpen()), actionCollection()); action->setWhatsThis(i18n("Open\n\nOpen an existing icon")); - m_actRecent = KStdAction::openRecent(this, + m_actRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotOpenRecent(const KURL&)), actionCollection()); m_actRecent->setMaxItems(15); // FIXME should be configurable! m_actRecent->loadEntries(kapp->config()); - action = KStdAction::save(this, TQT_SLOT(slotSave()), actionCollection()); + action = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSave()), actionCollection()); action->setWhatsThis(i18n("Save\n\nSave the current icon")); - KStdAction::saveAs(this, TQT_SLOT(slotSaveAs()), actionCollection()); + KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), actionCollection()); - action = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection()); + action = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection()); action->setWhatsThis(i18n("Print\n\nOpens a print dialog to let you print" " the current icon.")); - KStdAction::close(this, TQT_SLOT(slotClose()), actionCollection()); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); // Edit Menu - m_actCut = KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection()); + m_actCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection()); m_actCut->setWhatsThis(i18n("Cut\n\nCut the current selection out of the" " icon.\n\n(Tip: You can make both rectangular and circular selections)")); - m_actCopy = KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection()); + m_actCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection()); m_actCopy->setWhatsThis(i18n("Copy\n\nCopy the current selection out of the" " icon.\n\n(Tip: You can make both rectangular and circular selections)")); - m_actPaste = KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection()); + m_actPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection()); m_actPaste->setWhatsThis(i18n("Paste\n\n" "Paste the contents of the clipboard into the current icon.\n\n" "If the contents are larger than the current icon you can paste them" @@ -284,29 +284,29 @@ void KIconEdit::setupActions() "(Tip: Select \"Paste transparent pixels\" in the configuration dialog" " if you also want to paste transparency.)")); - m_actPasteNew = new KAction( i18n( "Paste as &New" ), cut, grid, + m_actPasteNew = new KAction( i18n( "Paste as &New" ), cut, TQT_TQOBJECT(grid), TQT_SLOT( editPasteAsNew() ), actionCollection(), "edit_paste_as_new" ); - KStdAction::clear(this, TQT_SLOT(slotClear()), actionCollection()); - KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection()); + KStdAction::clear(TQT_TQOBJECT(this), TQT_SLOT(slotClear()), actionCollection()); + KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection()); action = new KAction(i18n("Resi&ze..."), "transform", cut, - grid, TQT_SLOT(editResize()), actionCollection(), "edit_resize"); + TQT_TQOBJECT(grid), TQT_SLOT(editResize()), actionCollection(), "edit_resize"); action->setWhatsThis(i18n("Resize\n\nSmoothly resizes the icon while" " trying to preserve the contents")); action = new KAction(i18n("&GrayScale"), "grayscale", cut, - grid, TQT_SLOT(grayScale()), actionCollection(), "edit_grayscale"); + TQT_TQOBJECT(grid), TQT_SLOT(grayScale()), actionCollection(), "edit_grayscale"); action->setWhatsThis(i18n("Gray scale\n\nGray scale the current icon.\n" "(Warning: The result is likely to contain colors not in the icon" " palette")); // View Menu - m_actZoomIn = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), + m_actZoomIn = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(slotZoomIn()), actionCollection()); m_actZoomIn->setWhatsThis(i18n("Zoom in\n\nZoom in by one.")); - m_actZoomOut = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), + m_actZoomOut = KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(slotZoomOut()), actionCollection()); m_actZoomOut->setWhatsThis(i18n("Zoom out\n\nZoom out by one.")); @@ -314,26 +314,26 @@ void KIconEdit::setupActions() actionCollection(), "view_zoom" ); // xgettext:no-c-format - action = new KAction( i18n( "100%" ), cut, this, TQT_SLOT( slotZoom1() ), + action = new KAction( i18n( "100%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom1() ), actionCollection(), "view_zoom_1" ); actMenu->insert( action ); // xgettext:no-c-format - action = new KAction( i18n( "200%" ), cut, this, TQT_SLOT( slotZoom2() ), + action = new KAction( i18n( "200%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom2() ), actionCollection(), "view_zoom_2" ); actMenu->insert( action ); // xgettext:no-c-format - action = new KAction( i18n( "500%" ), cut, this, TQT_SLOT( slotZoom5() ), + action = new KAction( i18n( "500%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom5() ), actionCollection(), "view_zoom_5" ); actMenu->insert( action ); // xgettext:no-c-format - action = new KAction( i18n( "1000%" ), cut, this, TQT_SLOT( slotZoom10() ), + action = new KAction( i18n( "1000%" ), cut, TQT_TQOBJECT(this), TQT_SLOT( slotZoom10() ), actionCollection(), "view_zoom_10" ); actMenu->insert( action ); // Settings Menu - KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(slotConfigureSettings()), + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureSettings()), actionCollection()); createStandardStatusBarAction(); @@ -341,7 +341,7 @@ void KIconEdit::setupActions() KToggleAction *toggle; toggle = new KToggleAction( i18n( "Show &Grid" ), "grid", - cut, this, TQT_SLOT( slotShowGrid() ), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT( slotShowGrid() ), actionCollection(), "options_show_grid" ); toggle->setCheckedState(i18n("Hide &Grid")); toggle->setWhatsThis( i18n( "Show grid\n\nToggles the grid in the icon" @@ -350,14 +350,14 @@ void KIconEdit::setupActions() // Tools Menu toolAction = new KRadioAction(i18n("Color Picker"), "colorpicker", - cut, this, TQT_SLOT(slotToolPointer()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolPointer()), actionCollection(), "tool_find_pixel"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Color Picker\n\nThe color of the pixel clicked" " on will be the current draw color")); toolAction = new KRadioAction(i18n("Freehand"), "paintbrush", - cut, this, TQT_SLOT(slotToolFreehand()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFreehand()), actionCollection(), "tool_freehand"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Free hand\n\nDraw non-linear lines")); @@ -366,64 +366,64 @@ void KIconEdit::setupActions() grid->setTool(KIconEditGrid::Freehand); toolAction = new KRadioAction(i18n("Rectangle"), "rectangle", - cut, this, TQT_SLOT(slotToolRectangle()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolRectangle()), actionCollection(), "tool_rectangle"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Rectangle\n\nDraw a rectangle")); toolAction = new KRadioAction(i18n("Filled Rectangle"), "filledrectangle", - cut, this, TQT_SLOT(slotToolFilledRectangle()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledRectangle()), actionCollection(), "tool_filled_rectangle"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Filled rectangle\n\nDraw a filled rectangle")); toolAction = new KRadioAction(i18n("Circle"), "circle", - cut, this, TQT_SLOT(slotToolCircle()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolCircle()), actionCollection(), "tool_circle"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Circle\n\nDraw a circle")); toolAction = new KRadioAction(i18n("Filled Circle"), "filledcircle", - cut, this, TQT_SLOT(slotToolFilledCircle()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledCircle()), actionCollection(), "tool_filled_circle"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Filled circle\n\nDraw a filled circle")); toolAction = new KRadioAction(i18n("Ellipse"), "ellipse", - cut, this, TQT_SLOT(slotToolEllipse()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolEllipse()), actionCollection(), "tool_ellipse"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Ellipse\n\nDraw an ellipse")); toolAction = new KRadioAction(i18n("Filled Ellipse"), "filledellipse", - cut, this, TQT_SLOT(slotToolFilledEllipse()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFilledEllipse()), actionCollection(), "tool_filled_ellipse"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Filled ellipse\n\nDraw a filled ellipse")); toolAction = new KRadioAction(i18n("Spray"), "airbrush", - cut, this, TQT_SLOT(slotToolSpray()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolSpray()), actionCollection(), "tool_spray"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Spray\n\nDraw scattered pixels in the" " current color")); toolAction = new KRadioAction(i18n("Flood Fill"), "fill", - cut, this, TQT_SLOT(slotToolFlood()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolFlood()), actionCollection(), "tool_flood_fill"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Flood fill\n\nFill adjoining pixels with" " the same color with the current color")); toolAction = new KRadioAction(i18n("Line"), "line", - cut, this, TQT_SLOT(slotToolLine()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolLine()), actionCollection(), "tool_line"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Line\n\nDraw a straight line vertically," " horizontally or at 45 deg. angles")); toolAction = new KRadioAction(i18n("Eraser (Transparent)"), "eraser", - cut, this, TQT_SLOT(slotToolEraser()), actionCollection(), + cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolEraser()), actionCollection(), "tool_eraser"); toolAction->setExclusiveGroup("toolActions"); toolAction->setWhatsThis(i18n("Erase\n\nErase pixels. Set the pixels to" @@ -432,14 +432,14 @@ void KIconEdit::setupActions() " to use)")); toolAction = new KRadioAction(i18n("Rectangular Selection"), - "selectrect", cut, this, TQT_SLOT(slotToolSelectRect()), + "selectrect", cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolSelectRect()), actionCollection(), "edit_select_rectangle"); toolAction->setExclusiveGroup( "toolActions" ); toolAction->setWhatsThis(i18n("Select\n\nSelect a rectangular section" " of the icon using the mouse.")); toolAction = new KRadioAction(i18n("Circular Selection"), - "selectcircle", cut, this, TQT_SLOT(slotToolSelectCircle()), + "selectcircle", cut, TQT_TQOBJECT(this), TQT_SLOT(slotToolSelectCircle()), actionCollection(), "edit_select_circle"); toolAction->setExclusiveGroup( "toolActions" ); toolAction->setWhatsThis(i18n("Select\n\nSelect a circular section of the" @@ -451,7 +451,7 @@ void KIconEdit::updateAccels() actionCollection()->readShortcutSettings(); } -TQWidget *KIconEdit::createContainer( TQWidget *parent, int index, +TQWidget *KIconEdit::createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id ) { if ( element.attribute( "name" ) == "paletteToolBar" ) @@ -461,7 +461,7 @@ TQWidget *KIconEdit::createContainer( TQWidget *parent, int index, return m_paletteToolBar; } - return KXMLGUIBuilder::createContainer( parent, index, element, id ); + return KXMLGUIBuilder::createContainer( tqparent, index, element, id ); } bool KIconEdit::setupStatusBar() @@ -477,7 +477,7 @@ bool KIconEdit::setupStatusBar() statusbar->insertFixedItem("99999,99999", 0, true); statusbar->insertFixedItem("99999 x 99999", 1, true); statusbar->insertFixedItem(" 1:999", 2, true); - str = i18n("Colors: %1").arg(9999999); + str = i18n("Colors: %1").tqarg(9999999); statusbar->insertFixedItem(str, 3, true); statusbar->insertItem("", 4); diff --git a/kiconedit/kiconedit.h b/kiconedit/kiconedit.h index 021223de..e912e0f7 100644 --- a/kiconedit/kiconedit.h +++ b/kiconedit/kiconedit.h @@ -59,12 +59,13 @@ class PaletteToolBar; class KIconEdit : public KMainWindow { Q_OBJECT + TQ_OBJECT public: KIconEdit( KURL url = KURL(), const char *name = "kiconedit"); KIconEdit( const TQImage image, const char *name = "kiconedit"); ~KIconEdit(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; static WindowList windowList; signals: diff --git a/kiconedit/kiconeditslots.cpp b/kiconedit/kiconeditslots.cpp index ffcca476..63af706b 100644 --- a/kiconedit/kiconeditslots.cpp +++ b/kiconedit/kiconeditslots.cpp @@ -81,7 +81,7 @@ void KIconEdit::slotNew() if (grid->isModified()) { int r = KMessageBox::warningYesNoCancel(this, - i18n("The current file has been modified.\nDo you want to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current file has been modified.\nDo you want to save it?"), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); switch(r) { @@ -136,7 +136,7 @@ void KIconEdit::slotOpen() if( grid->isModified() ) { int r = KMessageBox::warningYesNoCancel(this, - i18n("The current file has been modified.\nDo you want to save it?"),TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current file has been modified.\nDo you want to save it?"),TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); switch( r ) { @@ -195,7 +195,7 @@ void KIconEdit::slotPrint() { KPrinter printer; - if ( printer.setup(this, i18n("Print %1").arg(icon->url().section('/', -1))) ) + if ( printer.setup(this, i18n("Print %1").tqarg(icon->url().section('/', -1))) ) { int margin = 10, yPos = 0; printer.setCreator("KDE Icon Editor"); @@ -280,7 +280,7 @@ void KIconEdit::slotOpenRecent(const KURL& iconFile) if( grid->isModified() ) { int r = KMessageBox::warningYesNoCancel(this, - i18n("The current file has been modified.\nDo you want to save it?"),TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()); + i18n("The current file has been modified.\nDo you want to save it?"),TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); switch( r ) { @@ -422,13 +422,13 @@ void KIconEdit::slotUpdateZoom( int s ) void KIconEdit::slotUpdateStatusPos(int x, int y) { - TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y); + TQString str = i18n("tqStatus Position", "%1, %2").tqarg(x).tqarg(y); statusbar->changeItem( str, 0); } void KIconEdit::slotUpdateStatusSize(int x, int y) { - TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y); + TQString str = i18n("tqStatus Size", "%1 x %2").tqarg(x).tqarg(y); statusbar->changeItem( str, 1); } @@ -443,13 +443,13 @@ void KIconEdit::slotUpdateStatusScaling(int s) void KIconEdit::slotUpdateStatusColors(uint) { - TQString str = i18n("Colors: %1").arg(grid->numColors()); + TQString str = i18n("Colors: %1").tqarg(grid->numColors()); statusbar->changeItem( str, 3); } void KIconEdit::slotUpdateStatusColors(uint n, uint *) { - TQString str = i18n("Colors: %1").arg(n); + TQString str = i18n("Colors: %1").tqarg(n); statusbar->changeItem( str, 3); } @@ -512,7 +512,7 @@ void KIconEdit::dragEnterEvent(TQDragEnterEvent* e) */ void KIconEdit::dropEvent( TQDropEvent *e ) { - //kdDebug(4640) << "Got QDropEvent!" << endl; + //kdDebug(4640) << "Got TQDropEvent!" << endl; KURL::List fileList; bool loadedinthis = false; diff --git a/kiconedit/kicongrid.cpp b/kiconedit/kicongrid.cpp index 2c9faeb7..d794cbe5 100644 --- a/kiconedit/kicongrid.cpp +++ b/kiconedit/kicongrid.cpp @@ -2,7 +2,7 @@ KDE Icon Editor - a small graphics drawing program for the KDE. Copyright (C) 1998 Thomas Tanghus (tanghus@kde.org) - Includes portions of code from Qt, + Includes portions of code from TQt, Copyright (C) 1992-2000 Trolltech AS. This program is free software; you can redistribute it and/or @@ -67,8 +67,8 @@ void RepaintCommand::execute() grid->update( area); } -KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent, const char *name) -: TQFrame(parent, name) +KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *tqparent, const char *name) +: TQFrame(tqparent, name) { _corner = 0L; _hruler = _vruler = 0L; @@ -290,8 +290,8 @@ void KGridView::resizeEvent(TQResizeEvent*) } -KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *parent, const char *name) - : KColorGrid(parent, name, 1) +KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *tqparent, const char *name) + : KColorGrid(tqparent, name, 1) { img = image; history = h; @@ -310,7 +310,7 @@ KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *paren img->setAlphaBuffer(true); clearImage(img); - currentcolor = qRgb(0,0,0)|OPAQUE_MASK; + currentcolor = tqRgb(0,0,0)|OPAQUE_MASK; emit colorSelected(currentcolor); setMouseTracking(true); @@ -348,13 +348,13 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) //time.start(); - QRgb *imageBuffer = new QRgb[paintCellsRect.width() * paintCellsRect.height()]; + TQRgb *imageBuffer = new TQRgb[paintCellsRect.width() * paintCellsRect.height()]; const int cellsize = cellSize(); const int firstCellPixelsRemaining = cellsize - paintCellsRect.left() % cellsize; if(transparencyDisplayType() == TRD_SOLIDCOLOR) { - const QRgb backgroundColor = transparencySolidColor().rgb(); + const TQRgb backgroundColor = transparencySolidColor().rgb(); const int backgroundRed = transparencySolidColor().red(); const int backgroundGreen = transparencySolidColor().green(); const int backgroundBlue = transparencySolidColor().blue(); @@ -362,19 +362,19 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) for(int y = paintCellsRect.top(); y <= paintCellsRect.bottom(); y++) { - QRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width(); + TQRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width(); if(y % cellsize == 0 || dest == imageBuffer) { // Paint the first scanline in each block of cellSize() identical lines. // The remaineder can just be copied from this one. const int cellY = y / cellsize; - QRgb *src = gridcolors.data() + cellY * numCols() + firstCellX; + TQRgb *src = gridcolors.data() + cellY * numCols() + firstCellX; - QRgb sourcePixel = *src++; - int sourceAlpha = qAlpha(sourcePixel); + TQRgb sourcePixel = *src++; + int sourceAlpha = tqAlpha(sourcePixel); - QRgb c; + TQRgb c; if(sourceAlpha == 255) { @@ -387,9 +387,9 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) } else { - const int sourceRed = qRed(sourcePixel); - const int sourceGreen = qGreen(sourcePixel); - const int sourceBlue = qBlue(sourcePixel); + const int sourceRed = tqRed(sourcePixel); + const int sourceGreen = tqGreen(sourcePixel); + const int sourceBlue = tqBlue(sourcePixel); int r = (sourceAlpha * (sourceRed - backgroundRed)) + 0x80; r = backgroundRed + ((r + (r >> 8)) >> 8); @@ -400,7 +400,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80; b = backgroundBlue + ((b + (b >> 8)) >> 8); - c = qRgb(r, g, b); + c = tqRgb(r, g, b); } int cellPixelsRemaining = firstCellPixelsRemaining; @@ -413,7 +413,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) // Fetch the next source pixel sourcePixel = *src++; - sourceAlpha = qAlpha(sourcePixel); + sourceAlpha = tqAlpha(sourcePixel); if(sourceAlpha == 255) { @@ -426,9 +426,9 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) } else { - const int sourceRed = qRed(sourcePixel); - const int sourceGreen = qGreen(sourcePixel); - const int sourceBlue = qBlue(sourcePixel); + const int sourceRed = tqRed(sourcePixel); + const int sourceGreen = tqGreen(sourcePixel); + const int sourceBlue = tqBlue(sourcePixel); //int r = backgroundRed + (sourceAlpha * (sourceRed - backgroundRed)) / 255; //int g = backgroundGreen + (sourceAlpha * (sourceGreen - backgroundGreen)) / 255; @@ -443,7 +443,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80; b = backgroundBlue + ((b + (b >> 8)) >> 8); - c = qRgb(r, g, b); + c = tqRgb(r, g, b); } } @@ -455,7 +455,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) else { // Copy the scanline above. - memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(QRgb)); + memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(TQRgb)); } } } @@ -478,10 +478,10 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) squareSize = (2 * cellSize() * fixedPointMultiplier) / 2; } - QRgb *color1ScanLine = new QRgb[paintCellsRect.width()]; - QRgb *color2ScanLine = new QRgb[paintCellsRect.width()]; - QRgb *color1Buffer = color1ScanLine; - QRgb *color2Buffer = color2ScanLine; + TQRgb *color1ScanLine = new TQRgb[paintCellsRect.width()]; + TQRgb *color2ScanLine = new TQRgb[paintCellsRect.width()]; + TQRgb *color1Buffer = color1ScanLine; + TQRgb *color2Buffer = color2ScanLine; for(int x = paintCellsRect.left(); x <= paintCellsRect.right(); x++) { @@ -504,11 +504,11 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) for(int y = paintCellsRect.top(); y <= paintCellsRect.bottom(); y++) { - QRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width(); + TQRgb *dest = imageBuffer + (y - paintCellsRect.top()) * paintCellsRect.width(); const int cellY = y / cellsize; int firstSquareColour; - const QRgb *checkerboardSrc; + const TQRgb *checkerboardSrc; if((((y * fixedPointMultiplier) / squareSize) & 1) == 0) { @@ -524,17 +524,17 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) if(cellY == lastCellY && firstSquareColour == lastLineFirstSquareColour) { // Copy the scanline above. - memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(QRgb)); + memcpy(dest, dest - paintCellsRect.width(), paintCellsRect.width() * sizeof(TQRgb)); } else { - QRgb *src = gridcolors.data() + cellY * numCols() + firstCellX; + TQRgb *src = gridcolors.data() + cellY * numCols() + firstCellX; - QRgb sourcePixel = *src++; - int sourceRed = qRed(sourcePixel); - int sourceGreen = qGreen(sourcePixel); - int sourceBlue = qBlue(sourcePixel); - int sourceAlpha = qAlpha(sourcePixel); + TQRgb sourcePixel = *src++; + int sourceRed = tqRed(sourcePixel); + int sourceGreen = tqGreen(sourcePixel); + int sourceBlue = tqBlue(sourcePixel); + int sourceAlpha = tqAlpha(sourcePixel); int cellPixelsRemaining = firstCellPixelsRemaining; @@ -546,15 +546,15 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) // Fetch the next source pixel sourcePixel = *src++; - sourceRed = qRed(sourcePixel); - sourceGreen = qGreen(sourcePixel); - sourceBlue = qBlue(sourcePixel); - sourceAlpha = qAlpha(sourcePixel); + sourceRed = tqRed(sourcePixel); + sourceGreen = tqGreen(sourcePixel); + sourceBlue = tqBlue(sourcePixel); + sourceAlpha = tqAlpha(sourcePixel); } cellPixelsRemaining--; - QRgb c; + TQRgb c; if(sourceAlpha == 255) { @@ -568,9 +568,9 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) else { const int backgroundColor = *checkerboardSrc; - const int backgroundRed = qRed(backgroundColor); - const int backgroundGreen = qGreen(backgroundColor); - const int backgroundBlue = qBlue(backgroundColor); + const int backgroundRed = tqRed(backgroundColor); + const int backgroundGreen = tqGreen(backgroundColor); + const int backgroundBlue = tqBlue(backgroundColor); //int r = backgroundRed + (sourceAlpha * (sourceRed - backgroundRed)) / 255; //int g = backgroundGreen + (sourceAlpha * (sourceGreen - backgroundGreen)) / 255; @@ -585,7 +585,7 @@ void KIconEditGrid::paintEvent(TQPaintEvent *e) int b = (sourceAlpha * (sourceBlue - backgroundBlue)) + 0x80; b = backgroundBlue + ((b + (b >> 8)) >> 8); - c = qRgb(r, g, b); + c = tqRgb(r, g, b); } *dest++ = c; @@ -710,7 +710,7 @@ void KIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e) void KIconEditGrid::mousePressEvent( TQMouseEvent *e ) { - if(!e || (e->button() != LeftButton)) + if(!e || (e->button() != Qt::LeftButton)) return; int row = findRow( e->pos().y() ); @@ -886,7 +886,7 @@ void KIconEditGrid::mouseMoveEvent( TQMouseEvent *e ) void KIconEditGrid::mouseReleaseEvent( TQMouseEvent *e ) { - if(!e || (e->button() != LeftButton)) + if(!e || (e->button() != Qt::LeftButton)) return; int row = findRow( e->pos().y() ); @@ -1035,7 +1035,7 @@ void KIconEditGrid::load( TQImage *image) setColor((y*numCols())+x, *l, false); } //kdDebug(4640) << "Row: " << y << endl; - kapp->processEvents(200); + kapp->tqprocessEvents(200); } updateColors(); @@ -1044,7 +1044,7 @@ void KIconEditGrid::load( TQImage *image) emit changed(pixmap()); setUpdatesEnabled(true); emit needPainting(); - //repaint(viewRect(), false); + //tqrepaint(viewRect(), false); history->clear(); } @@ -1108,7 +1108,7 @@ void KIconEditGrid::checkClipboard() TQImage KIconEditGrid::clipboardImage(bool &ok) { //###### Remove me later. - //Workaround Qt bug -- check whether format provided first. + //Workaround TQt bug -- check whether format provided first. //Code below is from TQDragObject, to match the mimetype list.... TQStrList fileFormats = TQImageIO::inputFormats(); @@ -1118,7 +1118,7 @@ TQImage KIconEditGrid::clipboardImage(bool &ok) { TQCString format = fileFormats.current(); TQCString type = "image/" + format.lower(); - if (kapp->clipboard()->data()->provides(type ) ) + if (kapp->tqclipboard()->data()->provides(type ) ) { oneIsSupported = true; } @@ -1179,7 +1179,7 @@ TQImage KIconEditGrid::getSelection(bool cut) { int x = pntarray[i].x(); int y = pntarray[i].y(); - if(img->valid(x, y) && rect.contains(TQPoint(x, y))) + if(img->valid(x, y) && rect.tqcontains(TQPoint(x, y))) { *((uint*)tmp.scanLine(y-ny) + (x-nx)) = *((uint*)img->scanLine(y) + x); if(cut) @@ -1232,7 +1232,7 @@ void KIconEditGrid::editPaste(bool paste) { if(KMessageBox::warningYesNo(this, i18n("The clipboard image is larger than the current" - " image!\nPaste as new image?"),TQString::null,i18n("Paste"), i18n("Do Not Paste")) == 0) + " image!\nPaste as new image?"),TQString(),i18n("Paste"), i18n("Do Not Paste")) == 0) { editPasteAsNew(); } @@ -1263,12 +1263,12 @@ void KIconEditGrid::editPaste(bool paste) else { // Porter-Duff Over composition - double alphaS = qAlpha(*cl) / 255.0; - double alphaD = qAlpha(*l) / 255.0; + double alphaS = tqAlpha(*cl) / 255.0; + double alphaD = tqAlpha(*l) / 255.0; - double r = qRed(*cl) * alphaS + (1 - alphaS) * qRed(*l) * alphaD; - double g = qGreen(*cl) * alphaS + (1 - alphaS) * qGreen(*l) * alphaD; - double b = qBlue(*cl) * alphaS + (1 - alphaS) * qBlue(*l) * alphaD; + double r = tqRed(*cl) * alphaS + (1 - alphaS) * tqRed(*l) * alphaD; + double g = tqGreen(*cl) * alphaS + (1 - alphaS) * tqGreen(*l) * alphaD; + double b = tqBlue(*cl) * alphaS + (1 - alphaS) * tqBlue(*l) * alphaD; double a = alphaS + (1 - alphaS) * alphaD; // Remove multiplication by alpha @@ -1334,7 +1334,7 @@ void KIconEditGrid::editPaste(bool paste) ia = 255; } - *l = qRgba(ir, ig, ib, ia); + *l = tqRgba(ir, ig, ib, ia); } setColor((y*numCols())+x, (uint)*l, false); @@ -1379,7 +1379,7 @@ void KIconEditGrid::editPasteAsNew() *img = tmp; load(img); setModified(true); - //repaint(viewRect(), false); + //tqrepaint(viewRect(), false); p = *img; emit changed(TQPixmap(p)); @@ -1426,7 +1426,7 @@ void KIconEditGrid::setSize(const TQSize s) void KIconEditGrid::createCursors() { - TQBitmap mask(22, 22); + TQBitmap tqmask(22, 22); TQPixmap pix; cursor_normal = TQCursor(arrowCursor); @@ -1439,8 +1439,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask()); + pix.setMask(tqmask); cursor_colorpicker = TQCursor(pix, 1, 21); } @@ -1452,8 +1452,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask()); + pix.setMask(tqmask); cursor_paint = TQCursor(pix, 0, 19); } @@ -1465,8 +1465,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask()); + pix.setMask(tqmask); cursor_flood = TQCursor(pix, 3, 20); } @@ -1478,8 +1478,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask()); + pix.setMask(tqmask); cursor_aim = TQCursor(pix, 10, 10); } @@ -1491,8 +1491,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(true); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask(true)); + pix.setMask(tqmask); cursor_spray = TQCursor(pix, 0, 20); } @@ -1504,8 +1504,8 @@ void KIconEditGrid::createCursors() } else { - mask = pix.createHeuristicMask(true); - pix.setMask(mask); + tqmask = TQPixmap(pix.createHeuristicMask(true)); + pix.setMask(tqmask); cursor_erase = TQCursor(pix, 1, 16); } } @@ -1600,11 +1600,11 @@ void KIconEditGrid::drawSpray(TQPoint point) } -//This routine is from Qt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled -//It seems like KIconEdit relied on the Qt1 semantics for makeEllipse, which broke -//the tool with reasonably recent Qt versions. -//Thankfully, Qt includes the old code #ifdef'd, which is hence included here -static void QPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h ) +//This routine is from TQt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled +//It seems like KIconEdit relied on the TQt1 semantics for makeEllipse, which broke +//the tool with reasonably recent TQt versions. +//Thankfully, TQt includes the old code #ifdef'd, which is hence included here +static void TQPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h ) { // midpoint, 1/4 ellipse if ( w <= 0 || h <= 0 ) { if ( w == 0 || h == 0 ) { @@ -1712,9 +1712,9 @@ void KIconEditGrid::drawEllipse(bool drawit) drawPointArray(a, Mark); if(tool == Circle || tool == FilledCircle || tool == SelectCircle) - QPA_makeEllipse(pntarray, x, y, d, d); + TQPA_makeEllipse(pntarray, x, y, d, d); else if(tool == Ellipse || tool == FilledEllipse) - QPA_makeEllipse(pntarray, x, y, cx, cy); + TQPA_makeEllipse(pntarray, x, y, cx, cy); if((tool == FilledEllipse) || (tool == FilledCircle) || (tool == SelectCircle)) @@ -1829,7 +1829,7 @@ void KIconEditGrid::drawLine(bool drawit, bool drawStraight) x = start.x(); y = start.y(); - delta = QMAX(abs(dx), abs(dy)); + delta = TQMAX(abs(dx), abs(dy)); int deltaX = abs(dx); int deltaY = abs(dy); @@ -1909,7 +1909,7 @@ void KIconEditGrid::drawPointArray(TQPointArray a, DrawAction action) int x = a[i].x(); int y = a[i].y(); - if(img->valid(x, y) && a.boundingRect().contains(a[ i ])) + if(img->valid(x, y) && TQT_TQRECT_OBJECT(a.boundingRect()).tqcontains(a[ i ])) { //kdDebug(4640) << "x: " << x << " - y: " << y << endl; switch( action ) @@ -1982,10 +1982,10 @@ bool KIconEditGrid::isMarked(int x, int y) // Fast diffuse dither to 3x3x3 color cube -// Based on Qt's image conversion functions +// Based on TQt's image conversion functions static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) { - register QRgb *p; + register TQRgb *p; uchar *b; int y; @@ -2041,7 +2041,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) for ( bc=0; bc<=MAX_B; bc++ ) { dst->setColor( INDEXOF(rc,gc,bc), - qRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); + tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); } int sw = src->width(); @@ -2061,12 +2061,12 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) for ( y=0; y < src->height(); y++ ) { - p = (QRgb *)src->scanLine(y); + p = (TQRgb *)src->scanLine(y); b = dst->scanLine(y); int endian = (TQImage::systemByteOrder() == TQImage::BigEndian); int x; - uchar* q = src->scanLine(y); - uchar* q2 = src->scanLine(y+1 < src->height() ? y + 1 : 0); + uchar* q = const_cast<TQImage*>(src)->scanLine(y); + uchar* q2 = const_cast<TQImage*>(src)->scanLine(y+1 < src->height() ? y + 1 : 0); for (int chan = 0; chan < 3; chan++) { b = dst->scanLine(y); @@ -2087,7 +2087,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) { for (x=0; x<sw; x++) { - int pix = QMAX(QMIN(2, (l1[x] * 2 + 128)/ 255), 0); + int pix = TQMAX(TQMIN(2, (l1[x] * 2 + 128)/ 255), 0); int err = l1[x] - pix * 255 / 2; pv[chan][x] = pix; @@ -2106,7 +2106,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) { for (x=sw; x-->0; ) { - int pix = QMAX(QMIN(2, (l1[x] * 2 + 128)/ 255), 0); + int pix = TQMAX(TQMIN(2, (l1[x] * 2 + 128)/ 255), 0); int err = l1[x] - pix * 255 / 2; pv[chan][x] = pix; @@ -2180,7 +2180,7 @@ void KIconEditGrid::mapToKDEPalette() return; /* -#if QT_VERSION > 140 +#if [[[TQT_VERSION IS DEPRECATED]]] > 140 *img = img->convertDepthWithPalette(32, iconpalette, 42); load(img); return; @@ -2195,7 +2195,7 @@ void KIconEditGrid::mapToKDEPalette() { if(*l != TRANSPARENT) { - if(!iconcolors.contains(*l)) + if(!iconcolors.tqcontains(*l)) *l = iconcolors.closestMatch(*l); } } @@ -2216,8 +2216,8 @@ void KIconEditGrid::grayScale() { if(*l != TRANSPARENT) { - uint c = qGray(*l); - *l = qRgba(c, c, c, qAlpha(*l)); + uint c = tqGray(*l); + *l = tqRgba(c, c, c, tqAlpha(*l)); } } } diff --git a/kiconedit/kicongrid.h b/kiconedit/kicongrid.h index da61f3a1..3ef73690 100644 --- a/kiconedit/kicongrid.h +++ b/kiconedit/kicongrid.h @@ -80,18 +80,19 @@ class RepaintCommand : public KCommand { } TQString name() const { - return "repainted"; + return "tqrepainted"; } protected: KIconEditGrid* grid; TQRect area; }; -class KGridView : public QFrame +class KGridView : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KGridView( TQImage *image, KCommandHistory* history, TQWidget * parent = 0, const char *name = 0); + KGridView( TQImage *image, KCommandHistory* history, TQWidget * tqparent = 0, const char *name = 0); KRuler *hruler() { return _hruler;} KRuler *vruler() { return _vruler;} @@ -131,8 +132,9 @@ protected: class KIconEditGrid : public KColorGrid { Q_OBJECT + TQ_OBJECT public: - KIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * parent = 0, const char *name = 0); + KIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * tqparent = 0, const char *name = 0); virtual ~KIconEditGrid(); enum DrawTool { Line, Freehand, FloodFill, Spray, Rect, FilledRect, Circle, @@ -189,7 +191,7 @@ public slots: void editSelectAll(); void editClear(); void getImage(TQImage *image); -//#if QT_VERSION <= 140 +//#if [[[TQT_VERSION IS DEPRECATED]]] <= 140 void editResize(); //#endif void setSize(const TQSize s); diff --git a/kiconedit/knew.cpp b/kiconedit/knew.cpp index 77f7ee99..b611a624 100644 --- a/kiconedit/knew.cpp +++ b/kiconedit/knew.cpp @@ -145,7 +145,7 @@ void KIconListBoxItem::paint( TQPainter *p ) int KIconListBoxItem::height(const TQListBox *lb ) const { - return QMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 ); + return TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 ); } int KIconListBoxItem::width(const TQListBox *lb ) const @@ -153,9 +153,9 @@ int KIconListBoxItem::width(const TQListBox *lb ) const return pm.width() + lb->fontMetrics().width( text() ) + 6; } -NewSelect::NewSelect(TQWidget *parent) : TQWidget( parent ) +NewSelect::NewSelect(TQWidget *tqparent) : TQWidget( tqparent ) { - wiz = (KWizard*) parent; + wiz = (KWizard*) tqparent; grp = new TQButtonGroup( this ); connect( grp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) ); grp->setExclusive( true ); @@ -173,7 +173,7 @@ NewSelect::NewSelect(TQWidget *parent) : TQWidget( parent ) l->addWidget( rbtempl, 1 ); //l->addWidget(rbtempl, 5, AlignLeft); - //grp->setMinimumSize(grp->childrenRect().size()); + //grp->setMinimumSize(grp->tqchildrenRect().size()); grp->setButton( 0 ); } @@ -189,10 +189,10 @@ void NewSelect::buttonClicked(int id) emit iconopenstyle(id); } -NewFromTemplate::NewFromTemplate( TQWidget* parent ) - : TQWidget( parent ) +NewFromTemplate::NewFromTemplate( TQWidget* tqparent ) + : TQWidget( tqparent ) { - wiz = (KWizard*) parent; + wiz = (KWizard*) tqparent; TQVBoxLayout* ml = new TQVBoxLayout(this); @@ -223,8 +223,8 @@ void NewFromTemplate::checkSelection( int ) wiz->finishButton()->setEnabled( false ); } -KNewIcon::KNewIcon( TQWidget* parent ) - : KWizard( parent, 0, true ) +KNewIcon::KNewIcon( TQWidget* tqparent ) + : KWizard( tqparent, 0, true ) { //kdDebug(4640) << "KNewIcon" << endl; setCaption( i18n( "Create New Icon" ) ); diff --git a/kiconedit/knew.h b/kiconedit/knew.h index a2d5dc7e..4bfb7086 100644 --- a/kiconedit/knew.h +++ b/kiconedit/knew.h @@ -64,8 +64,9 @@ private: class KIconListBox : public TQListBox { Q_OBJECT + TQ_OBJECT public: - KIconListBox( TQWidget *parent ) : TQListBox(parent) {} ; + KIconListBox( TQWidget *tqparent ) : TQListBox(tqparent) {} ; const TQString path(int idx) { return ((KIconListBoxItem*)item(idx))->path(); } KIconTemplate& iconTemplate(int idx) { return ((KIconListBoxItem*)item(idx))->iconTemplate(); } @@ -93,11 +94,12 @@ private: ~KIconTemplateContainer(); }; -class NewSelect : public QWidget +class NewSelect : public TQWidget { Q_OBJECT + TQ_OBJECT public: - NewSelect(TQWidget *parent); + NewSelect(TQWidget *tqparent); ~NewSelect(); signals: @@ -112,11 +114,12 @@ protected: TQRadioButton *rbscratch, *rbtempl; }; -class NewFromTemplate : public QWidget +class NewFromTemplate : public TQWidget { Q_OBJECT + TQ_OBJECT public: - NewFromTemplate(TQWidget *parent); + NewFromTemplate(TQWidget *tqparent); ~NewFromTemplate(); const TQString path() { return TQString(templates->path(templates->currentItem())); } @@ -133,8 +136,9 @@ protected: class KNewIcon : public KWizard { Q_OBJECT + TQ_OBJECT public: - KNewIcon(TQWidget *parent); + KNewIcon(TQWidget *tqparent); ~KNewIcon(); enum { Blank = 0, Template = 1}; diff --git a/kiconedit/kresize.cpp b/kiconedit/kresize.cpp index b2af86b6..b290cce7 100644 --- a/kiconedit/kresize.cpp +++ b/kiconedit/kresize.cpp @@ -28,8 +28,8 @@ #include "kresize.h" -KResizeWidget::KResizeWidget( TQWidget* parent, const char* name, - const TQSize& size ) : TQWidget( parent, name ) +KResizeWidget::KResizeWidget( TQWidget* tqparent, const char* name, + const TQSize& size ) : TQWidget( tqparent, name ) { TQHBoxLayout* genLayout = new TQHBoxLayout( this ); @@ -37,18 +37,18 @@ KResizeWidget::KResizeWidget( TQWidget* parent, const char* name, group->setColumnLayout( 0, Qt::Horizontal ); genLayout->addWidget( group ); - TQHBoxLayout* layout = new TQHBoxLayout( group->layout(), 6 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( group->tqlayout(), 6 ); m_width = new KIntSpinBox( 1, 200, 1, 1, 10, group ); m_width->setValue( size.width() ); - layout->addWidget( m_width, 1 ); + tqlayout->addWidget( m_width, 1 ); TQLabel* label = new TQLabel( "X", group ); - layout->addWidget( label ); + tqlayout->addWidget( label ); m_height = new KIntSpinBox( 1, 200, 1, 1, 10, group); m_height->setValue( size.height() ); - layout->addWidget( m_height, 1 ); + tqlayout->addWidget( m_height, 1 ); setMinimumSize( 200, 100 ); } @@ -62,9 +62,9 @@ const TQSize KResizeWidget::getSize() return TQSize( m_width->value(), m_height->value() ); } -KResizeDialog::KResizeDialog( TQWidget* parent, const char* name, +KResizeDialog::KResizeDialog( TQWidget* tqparent, const char* name, const TQSize size ) - : KDialogBase( parent, name, true, i18n( "Select Size" ), Ok|Cancel ) + : KDialogBase( tqparent, name, true, i18n( "Select Size" ), Ok|Cancel ) { m_resize = new KResizeWidget( this, "resize widget", size ); diff --git a/kiconedit/kresize.h b/kiconedit/kresize.h index d3256232..37158ed3 100644 --- a/kiconedit/kresize.h +++ b/kiconedit/kresize.h @@ -26,13 +26,14 @@ class KIntSpinBox; -class KResizeWidget : public QWidget +class KResizeWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KResizeWidget( TQWidget* parent, const char* name, const TQSize& ); + KResizeWidget( TQWidget* tqparent, const char* name, const TQSize& ); ~KResizeWidget(); const TQSize getSize(); @@ -46,10 +47,11 @@ private: class KResizeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KResizeDialog( TQWidget* parent, const char* name, const TQSize s ); + KResizeDialog( TQWidget* tqparent, const char* name, const TQSize s ); ~KResizeDialog(); const TQSize getSize(); diff --git a/kiconedit/palettetoolbar.cpp b/kiconedit/palettetoolbar.cpp index 07fa30b1..bb9b1f1c 100644 --- a/kiconedit/palettetoolbar.cpp +++ b/kiconedit/palettetoolbar.cpp @@ -30,8 +30,8 @@ #include "kiconcolors.h" #include "palettetoolbar.h" -PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name ) - : KToolBar( parent, name ) +PaletteToolBar::PaletteToolBar( TQWidget *tqparent, const char *name ) + : KToolBar( tqparent, name ) { TQWidget *base = new TQWidget( this ); @@ -42,7 +42,7 @@ PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name ) m_lblPreview = new TQLabel( base ); m_lblPreview->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); m_lblPreview->setFixedHeight( 64 ); - m_lblPreview->setAlignment( Qt::AlignHCenter|Qt::AlignVCenter ); + m_lblPreview->tqsetAlignment( TQt::AlignHCenter|TQt::AlignVCenter ); TQWhatsThis::add(m_lblPreview, i18n( "Preview\n\nThis is a 1:1 preview" " of the current icon" ) ); m_layout->addWidget( m_lblPreview ); @@ -50,31 +50,31 @@ PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name ) m_currentColorView = new TQLabel( base ); m_currentColorView->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); m_currentColorView->setFixedHeight( 24 ); - m_currentColorView->setAlignment( Qt::AlignHCenter|Qt::AlignVCenter ); + m_currentColorView->tqsetAlignment( TQt::AlignHCenter|TQt::AlignVCenter ); TQWhatsThis::add(m_currentColorView, i18n( "Current color\n\nThis is the currently selected color" ) ); m_layout->addWidget( m_currentColorView ); - TQVBoxLayout *vlayout = new TQVBoxLayout( m_layout, 0 ); + TQVBoxLayout *vtqlayout = new TQVBoxLayout( m_layout, 0 ); TQLabel *l = new TQLabel( i18n( "System colors:" ), base ); - vlayout->addWidget( l ); + vtqlayout->addWidget( l ); m_sysColors = new KSysColors( base ); TQWhatsThis::add(m_sysColors, i18n( "System colors\n\nHere you can select" " colors from the KDE icon palette" ) ); - vlayout->addWidget( m_sysColors ); + vtqlayout->addWidget( m_sysColors ); connect( m_sysColors, TQT_SIGNAL( newColor(uint) ), TQT_SIGNAL( newColor(uint) ) ); - vlayout = new TQVBoxLayout( m_layout, 0 ); + vtqlayout = new TQVBoxLayout( m_layout, 0 ); l = new TQLabel( i18n( "Custom colors:" ), base ); - vlayout->addWidget( l ); + vtqlayout->addWidget( l ); m_customColors = new KCustomColors( base ); TQWhatsThis::add(m_customColors, i18n( "Custom colors\n\nHere you can" " build a palette of custom colors.\nDouble-click on a box to edit" " the color" ) ); - vlayout->addWidget( m_customColors ); + vtqlayout->addWidget( m_customColors ); connect( m_customColors, TQT_SIGNAL( newColor(uint) ), TQT_SIGNAL( newColor(uint) ) ); @@ -86,7 +86,7 @@ PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name ) setMovingEnabled( false ); } -void PaletteToolBar::setOrientation( Orientation o ) +void PaletteToolBar::setOrientation( Qt::Orientation o ) { if( barPos() == Floating ) o = o == Qt::Vertical ? Qt::Horizontal : Qt::Vertical; @@ -112,7 +112,7 @@ void PaletteToolBar::addColors( uint n, uint *c ) void PaletteToolBar::addColor( uint color ) { - if( !m_sysColors->contains( color ) ) + if( !m_sysColors->tqcontains( color ) ) m_customColors->addColor( color ); } @@ -128,7 +128,7 @@ void PaletteToolBar::setPreviewBackground( const TQColor& colour ) void PaletteToolBar::currentColorChanged(uint color) { - if(qAlpha(color) == 255) + if(tqAlpha(color) == 255) { m_currentColorView->setBackgroundColor(color); } @@ -136,32 +136,32 @@ void PaletteToolBar::currentColorChanged(uint color) { // Show the colour as if drawn over a checkerboard pattern const int squareWidth = 8; - const uint lightColour = qRgb(255, 255, 255); - const uint darkColour = qRgb(127, 127, 127); + const uint lightColour = tqRgb(255, 255, 255); + const uint darkColour = tqRgb(127, 127, 127); TQPixmap pm(2 * squareWidth, 2 * squareWidth); TQPainter p(&pm); - double alpha = qAlpha(color) / 255.0; + double alpha = tqAlpha(color) / 255.0; - int r = int(qRed(color) * alpha + (1 - alpha) * qRed(lightColour) + 0.5); - int g = int(qGreen(color) * alpha + (1 - alpha) * qGreen(lightColour) + 0.5); - int b = int(qBlue(color) * alpha + (1 - alpha) * qBlue(lightColour) + 0.5); + int r = int(tqRed(color) * alpha + (1 - alpha) * tqRed(lightColour) + 0.5); + int g = int(tqGreen(color) * alpha + (1 - alpha) * tqGreen(lightColour) + 0.5); + int b = int(tqBlue(color) * alpha + (1 - alpha) * tqBlue(lightColour) + 0.5); - uint squareColour = qRgb(r, g, b); + uint squareColour = tqRgb(r, g, b); - p.setPen(Qt::NoPen); - p.setBrush(squareColour); + p.setPen(TQt::NoPen); + p.setBrush(TQColor(squareColour)); p.drawRect(0, 0, squareWidth, squareWidth); p.drawRect(squareWidth, squareWidth, squareWidth, squareWidth); - r = int(qRed(color) * alpha + (1 - alpha) * qRed(darkColour) + 0.5); - g = int(qGreen(color) * alpha + (1 - alpha) * qGreen(darkColour) + 0.5); - b = int(qBlue(color) * alpha + (1 - alpha) * qBlue(darkColour) + 0.5); + r = int(tqRed(color) * alpha + (1 - alpha) * tqRed(darkColour) + 0.5); + g = int(tqGreen(color) * alpha + (1 - alpha) * tqGreen(darkColour) + 0.5); + b = int(tqBlue(color) * alpha + (1 - alpha) * tqBlue(darkColour) + 0.5); - squareColour = qRgb(r, g, b); + squareColour = tqRgb(r, g, b); - p.setBrush(squareColour); + p.setBrush(TQColor(squareColour)); p.drawRect(squareWidth, 0, squareWidth, squareWidth); p.drawRect(0, squareWidth, squareWidth, squareWidth); diff --git a/kiconedit/palettetoolbar.h b/kiconedit/palettetoolbar.h index 1fede533..0e53914e 100644 --- a/kiconedit/palettetoolbar.h +++ b/kiconedit/palettetoolbar.h @@ -32,15 +32,16 @@ class KCustomColors; class PaletteToolBar : public KToolBar { Q_OBJECT + TQ_OBJECT public: - PaletteToolBar( TQWidget *parent, const char *name = 0L ); + PaletteToolBar( TQWidget *tqparent, const char *name = 0L ); signals: void newColor( uint c ); public slots: - virtual void setOrientation( Orientation o ); + virtual void setOrientation( Qt::Orientation o ); void previewChanged( const TQPixmap &p ); void addColors( uint n, uint *c ); void addColor( uint color ); diff --git a/kiconedit/properties.h b/kiconedit/properties.h index 7e97b9b4..0f4e7b0e 100644 --- a/kiconedit/properties.h +++ b/kiconedit/properties.h @@ -26,7 +26,7 @@ #include "kicongrid.h" -class KIconEditProperties : public QObject +class KIconEditProperties : public TQObject { public: static KIconEditProperties* self(); diff --git a/kmrml/kmrml.spec b/kmrml/kmrml.spec index 79dbab29..d278a7d0 100644 --- a/kmrml/kmrml.spec +++ b/kmrml/kmrml.spec @@ -48,11 +48,11 @@ make install DESTDIR=$RPM_BUILD_ROOT cd $RPM_BUILD_ROOT -find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name} -find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} -find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} %clean rm -rf $RPM_BUILD_ROOT diff --git a/kmrml/kmrml/algorithmcombo.cpp b/kmrml/kmrml/algorithmcombo.cpp index a2db81d4..bdd56ca3 100644 --- a/kmrml/kmrml/algorithmcombo.cpp +++ b/kmrml/kmrml/algorithmcombo.cpp @@ -22,11 +22,11 @@ using namespace KMrml; -// ### copycat of CollectionCombo... moc can't handle templates unfortunately.. +// ### copycat of CollectionCombo... tqmoc can't handle templates unfortunately.. // could use base-class MrmlElement.... -AlgorithmCombo::AlgorithmCombo( TQWidget *parent, const char *name ) - : KComboBox( false, parent, name ), +AlgorithmCombo::AlgorithmCombo( TQWidget *tqparent, const char *name ) + : KComboBox( false, tqparent, name ), m_algorithms( 0L ) { connect( this, TQT_SIGNAL( activated( const TQString& ) ), diff --git a/kmrml/kmrml/algorithmcombo.h b/kmrml/kmrml/algorithmcombo.h index 8138b47a..082780b4 100644 --- a/kmrml/kmrml/algorithmcombo.h +++ b/kmrml/kmrml/algorithmcombo.h @@ -29,9 +29,10 @@ namespace KMrml class AlgorithmCombo : public KComboBox { Q_OBJECT + TQ_OBJECT public: - AlgorithmCombo( TQWidget *parent, const char *name = 0 ); + AlgorithmCombo( TQWidget *tqparent, const char *name = 0 ); ~AlgorithmCombo(); void setAlgorithms( const AlgorithmList * algorithms ); diff --git a/kmrml/kmrml/algorithmdialog.cpp b/kmrml/kmrml/algorithmdialog.cpp index bf3ed895..60926b1e 100644 --- a/kmrml/kmrml/algorithmdialog.cpp +++ b/kmrml/kmrml/algorithmdialog.cpp @@ -31,11 +31,11 @@ using namespace KMrml; -class ScrollView : public QScrollView +class ScrollView : public TQScrollView { public: - ScrollView(TQWidget* parent = 0, const char* name = 0) - : TQScrollView(parent, name) + ScrollView(TQWidget* tqparent = 0, const char* name = 0) + : TQScrollView(tqparent, name) { setFrameStyle(TQFrame::NoFrame); m_frame = new TQFrame(viewport(), "ScrollView::m_frame"); @@ -49,8 +49,8 @@ protected: virtual void viewportResizeEvent(TQResizeEvent* ev) { TQScrollView::viewportResizeEvent(ev); - m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()), - kMax(m_frame->sizeHint().height(), ev->size().height())); + m_frame->resize( kMax(m_frame->tqsizeHint().width(), ev->size().width()), + kMax(m_frame->tqsizeHint().height(), ev->size().height())); }; private: @@ -60,8 +60,8 @@ private: AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms, const CollectionList& collections, const Collection& currentColl, - TQWidget *parent, const char *name ) - : KDialogBase( parent, name, false, i18n("Configure Query Algorithms"), + TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, false, i18n("Configure Query Algorithms"), Ok | Cancel, Ok, false ), m_allAlgorithms( algorithms ), m_collections( collections ) @@ -71,7 +71,7 @@ AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms, TQVBoxLayout *mainLayout = new TQVBoxLayout( box, 0, KDialog::spacingHint(), "mainLayout"); - TQHBoxLayout *collectionLayout = new TQHBoxLayout( 0L, 0, 0, "coll layout"); + TQHBoxLayout *collectionLayout = new TQHBoxLayout( 0L, 0, 0, "coll tqlayout"); collectionLayout->addWidget( new TQLabel( i18n("Collection: "), box )); m_collectionCombo = new CollectionCombo( box, "collection combo" ); @@ -106,7 +106,7 @@ AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms, mainLayout->activate(); algoHLayout->move( groupBox->x() + 10, groupBox->y() - 12 ); - box->setMinimumWidth( algoHLayout->sizeHint().width() + + box->setMinimumWidth( algoHLayout->tqsizeHint().width() + 4 * KDialog::spacingHint() ); } diff --git a/kmrml/kmrml/algorithmdialog.h b/kmrml/kmrml/algorithmdialog.h index be119dbd..f5e02116 100644 --- a/kmrml/kmrml/algorithmdialog.h +++ b/kmrml/kmrml/algorithmdialog.h @@ -32,11 +32,12 @@ namespace KMrml class AlgorithmDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: AlgorithmDialog( const AlgorithmList&, const CollectionList&, const Collection& currentColl, - TQWidget *parent = 0, const char *name = 0 ); + TQWidget *tqparent = 0, const char *name = 0 ); ~AlgorithmDialog(); private slots: diff --git a/kmrml/kmrml/browser.cpp b/kmrml/kmrml/browser.cpp index 57ac0085..7603debb 100644 --- a/kmrml/kmrml/browser.cpp +++ b/kmrml/kmrml/browser.cpp @@ -23,9 +23,9 @@ using namespace KMrml; -Browser::Browser( MrmlPart *parent, const char *name ) - : KParts::BrowserExtension( parent, name ), - m_part( parent ) +Browser::Browser( MrmlPart *tqparent, const char *name ) + : KParts::BrowserExtension( tqparent, name ), + m_part( tqparent ) { } diff --git a/kmrml/kmrml/browser.h b/kmrml/kmrml/browser.h index 71466160..c30e148c 100644 --- a/kmrml/kmrml/browser.h +++ b/kmrml/kmrml/browser.h @@ -28,9 +28,10 @@ namespace KMrml class Browser : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: - Browser( MrmlPart *parent, const char *name ); + Browser( MrmlPart *tqparent, const char *name ); ~Browser(); virtual void saveState( TQDataStream& stream ); diff --git a/kmrml/kmrml/collectioncombo.cpp b/kmrml/kmrml/collectioncombo.cpp index 7238305e..d71a1c2a 100644 --- a/kmrml/kmrml/collectioncombo.cpp +++ b/kmrml/kmrml/collectioncombo.cpp @@ -22,8 +22,8 @@ using namespace KMrml; -CollectionCombo::CollectionCombo( TQWidget *parent, const char *name ) - : KComboBox( false, parent, name ), +CollectionCombo::CollectionCombo( TQWidget *tqparent, const char *name ) + : KComboBox( false, tqparent, name ), m_collections( 0L ) { connect( this, TQT_SIGNAL( activated( const TQString& ) ), diff --git a/kmrml/kmrml/collectioncombo.h b/kmrml/kmrml/collectioncombo.h index c39686a4..dc7722d4 100644 --- a/kmrml/kmrml/collectioncombo.h +++ b/kmrml/kmrml/collectioncombo.h @@ -29,9 +29,10 @@ namespace KMrml class CollectionCombo : public KComboBox { Q_OBJECT + TQ_OBJECT public: - CollectionCombo( TQWidget *parent, const char *name = 0 ); + CollectionCombo( TQWidget *tqparent, const char *name = 0 ); ~CollectionCombo(); void setCollections( const CollectionList * collections ); diff --git a/kmrml/kmrml/kcontrol/indexcleaner.cpp b/kmrml/kmrml/kcontrol/indexcleaner.cpp index 56e606aa..b02d6343 100644 --- a/kmrml/kmrml/kcontrol/indexcleaner.cpp +++ b/kmrml/kmrml/kcontrol/indexcleaner.cpp @@ -6,17 +6,17 @@ #include <kdeversion.h> #if KDE_VERSION < 306 - #define QUOTE( x ) x + #define TQUOTE( x ) x #else - #define QUOTE( x ) KProcess::quote( x ) + #define TQUOTE( x ) KProcess::quote( x ) #endif using namespace KMrmlConfig; IndexCleaner::IndexCleaner( const TQStringList& dirs, const KMrml::Config *config, - TQObject *parent, const char *name ) - : TQObject( parent, name ), + TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), m_dirs( dirs ), m_config( config ), m_process( 0L ) @@ -74,11 +74,11 @@ void IndexCleaner::startNext() TQString dir = m_dirs.first(); m_dirs.pop_front(); - int index = cmd.find( "%d" ); + int index = cmd.tqfind( "%d" ); if ( index != -1 ) - cmd.replace( index, 2, QUOTE( dir ) ); + cmd.tqreplace( index, 2, TQUOTE( dir ) ); else // no %d? What else can we do? - cmd.append( TQString::fromLatin1(" ") + QUOTE( dir ) ); + cmd.append( TQString::tqfromLatin1(" ") + TQUOTE( dir ) ); *m_process << cmd; diff --git a/kmrml/kmrml/kcontrol/indexcleaner.h b/kmrml/kmrml/kcontrol/indexcleaner.h index 92dcdc22..afc2ebfd 100644 --- a/kmrml/kmrml/kcontrol/indexcleaner.h +++ b/kmrml/kmrml/kcontrol/indexcleaner.h @@ -20,13 +20,14 @@ namespace KMrml namespace KMrmlConfig { - class IndexCleaner : public QObject + class IndexCleaner : public TQObject { Q_OBJECT + TQ_OBJECT public: IndexCleaner( const TQStringList& dirs, const KMrml::Config *config, - TQObject *parent = 0, const char *name = 0 ); + TQObject *tqparent = 0, const char *name = 0 ); ~IndexCleaner(); void start(); diff --git a/kmrml/kmrml/kcontrol/indexer.cpp b/kmrml/kmrml/kcontrol/indexer.cpp index f4c4b108..0308dd39 100644 --- a/kmrml/kmrml/kcontrol/indexer.cpp +++ b/kmrml/kmrml/kcontrol/indexer.cpp @@ -28,16 +28,16 @@ #include <kdeversion.h> #if KDE_VERSION < 306 - #define QUOTE( x ) x + #define TQUOTE( x ) x #else - #define QUOTE( x ) KProcess::quote( x ) + #define TQUOTE( x ) KProcess::quote( x ) #endif using namespace KMrmlConfig; Indexer::Indexer( const KMrml::Config* config, - TQObject *parent, const char *name ) - : TQObject( parent, name ), + TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ), m_config( config ), m_dirCount( 0 ) { @@ -93,14 +93,14 @@ void Indexer::processNext() TQString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace(); - // in the commandline, replace %d with the directory to process and + // in the commandline, tqreplace %d with the directory to process and // %t with the thumbnail dir - int index = cmd.find( "%d" ); // ### TQFile::encodeName()? + int index = cmd.tqfind( "%d" ); // ### TQFile::encodeName()? if ( index != -1 ) - cmd.replace( index, 2, QUOTE( m_currentDir ) ); - index = cmd.find( "%t" ); + cmd.tqreplace( index, 2, TQUOTE( m_currentDir ) ); + index = cmd.tqfind( "%t" ); if ( index != -1 ) - cmd.replace( index, 2, QUOTE(m_currentDir + "_thumbnails") ); + cmd.tqreplace( index, 2, TQUOTE(m_currentDir + "_thumbnails") ); // qDebug("****** command: %s", cmd.latin1()); #if KDE_VERSION >= 306 @@ -112,7 +112,7 @@ void Indexer::processNext() *m_process << *it; #endif - emit progress( 0, i18n("<qt>Next Folder: <br><b>%1</b>").arg( m_currentDir )); + emit progress( 0, i18n("<qt>Next Folder: <br><b>%1</b>").tqarg( m_currentDir )); m_process->start(); } @@ -160,7 +160,7 @@ void Indexer::slotCanRead( KProcIO *proc ) if ( ok ) { uint dirsLeft = m_dirs.count(); - TQString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles ); + TQString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").tqarg( m_dirCount - dirsLeft ).tqarg( m_dirCount).tqarg( m_currentDir ).tqarg( currentFile ).tqarg( numFiles ); emit progress( perc, message ); } } diff --git a/kmrml/kmrml/kcontrol/indexer.h b/kmrml/kmrml/kcontrol/indexer.h index 290c9937..d9fede24 100644 --- a/kmrml/kmrml/kcontrol/indexer.h +++ b/kmrml/kmrml/kcontrol/indexer.h @@ -28,13 +28,14 @@ class KProcIO; namespace KMrmlConfig { - class Indexer : public QObject + class Indexer : public TQObject { Q_OBJECT + TQ_OBJECT public: Indexer( const KMrml::Config *config, - TQObject *parent = 0L, const char *name = 0 ); + TQObject *tqparent = 0L, const char *name = 0 ); ~Indexer(); void startIndexing( const TQStringList& dirs ); diff --git a/kmrml/kmrml/kcontrol/indextest.h b/kmrml/kmrml/kcontrol/indextest.h index 15cda2ce..91320d2e 100644 --- a/kmrml/kmrml/kcontrol/indextest.h +++ b/kmrml/kmrml/kcontrol/indextest.h @@ -8,9 +8,10 @@ #ifndef INDEXTEST_H #define INDEXTEST_H -class IndexTest : public QObject +class IndexTest : public TQObject { Q_OBJECT + TQ_OBJECT public: IndexTest(); diff --git a/kmrml/kmrml/kcontrol/kcmkmrml.cpp b/kmrml/kmrml/kcontrol/kcmkmrml.cpp index d2b60fc0..3bff026a 100644 --- a/kmrml/kmrml/kcontrol/kcmkmrml.cpp +++ b/kmrml/kmrml/kcontrol/kcmkmrml.cpp @@ -43,8 +43,8 @@ static const int COL_FILENAME = 1; typedef KGenericFactory<KCMKMrml, TQWidget> MrmlFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kmrml, MrmlFactory("kmrml") ) -KCMKMrml::KCMKMrml(TQWidget *parent, const char *name, const TQStringList & ): - KCModule(MrmlFactory::instance(), parent, name) +KCMKMrml::KCMKMrml(TQWidget *tqparent, const char *name, const TQStringList & ): + KCModule(MrmlFactory::instance(), tqparent, name) { KAboutData* ab = new KAboutData( "kcmkmrml", @@ -58,11 +58,11 @@ KCMKMrml::KCMKMrml(TQWidget *parent, const char *name, const TQStringList & ): ab->addAuthor( "Carsten Pfeiffer", 0, "pfeiffer@kde.org" ); setAboutData( ab ); - TQVBoxLayout *layout = new TQVBoxLayout( this ); - layout->setSpacing( KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); + tqlayout->setSpacing( KDialog::spacingHint() ); m_mainPage = new MainPage( this, "main page" ); - layout->addWidget( m_mainPage ); + tqlayout->addWidget( m_mainPage ); connect( m_mainPage, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ))); @@ -86,11 +86,11 @@ void KCMKMrml::checkGiftInstallation() KMessageBox::error( this, errorMessage ); m_mainPage->hide(); TQLabel *errorLabel = new TQLabel( errorMessage, this ); - errorLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); - KURLLabel *urlLabel = new KURLLabel( "http://www.gnu.org/software/gift", TQString::null, this ); - urlLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + errorLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + KURLLabel *urlLabel = new KURLLabel( "http://www.gnu.org/software/gift", TQString(), this ); + urlLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& )), kapp, TQT_SLOT( invokeBrowser( const TQString& )) ); - TQLayout *l = layout(); + TQLayout *l = tqlayout(); l->addItem( new TQSpacerItem( 0, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); l->add( errorLabel ); l->add( urlLabel ); diff --git a/kmrml/kmrml/kcontrol/kcmkmrml.h b/kmrml/kmrml/kcontrol/kcmkmrml.h index 306e55f0..1c15a0a2 100644 --- a/kmrml/kmrml/kcontrol/kcmkmrml.h +++ b/kmrml/kmrml/kcontrol/kcmkmrml.h @@ -31,9 +31,10 @@ namespace KMrmlConfig class KCMKMrml : public KCModule { Q_OBJECT + TQ_OBJECT public: - KCMKMrml(TQWidget *parent, const char *name, const TQStringList &); + KCMKMrml(TQWidget *tqparent, const char *name, const TQStringList &); virtual ~KCMKMrml(); virtual void defaults(); diff --git a/kmrml/kmrml/kcontrol/mainpage.cpp b/kmrml/kmrml/kcontrol/mainpage.cpp index c4e65ac3..ab6fc84b 100644 --- a/kmrml/kmrml/kcontrol/mainpage.cpp +++ b/kmrml/kmrml/kcontrol/mainpage.cpp @@ -50,8 +50,8 @@ using namespace KMrmlConfig; -MainPage::MainPage( TQWidget *parent, const char *name ) - : TQVBox( parent, name ), +MainPage::MainPage( TQWidget *tqparent, const char *name ) + : TQVBox( tqparent, name ), m_indexer( 0L ), m_indexCleaner( 0L ), m_progressDialog( 0L ), @@ -132,7 +132,7 @@ void MainPage::resetDefaults() m_listBox->clear(); - // slotHostChanged(); not necessary, will be called by Qt signals + // slotHostChanged(); not necessary, will be called by TQt signals slotUseAuthChanged( m_serverWidget->m_useAuth->isChecked() ); blockSignals( false ); @@ -151,7 +151,7 @@ void MainPage::load() m_listBox->clear(); m_listBox->insertStringList( m_config->indexableDirectories() ); - // slotHostChanged(); not necessary, will be called by Qt signals + // slotHostChanged(); not necessary, will be called by TQt signals slotUseAuthChanged( m_serverWidget->m_useAuth->isChecked() ); blockSignals( false ); @@ -186,7 +186,7 @@ TQStringList MainPage::difference( const TQStringList& oldIndexDirs, { TQStringList result; - TQString slash = TQString::fromLatin1("/"); + TQString slash = TQString::tqfromLatin1("/"); TQStringList::ConstIterator oldIt = oldIndexDirs.begin(); TQString oldDir, newDir; @@ -341,7 +341,7 @@ void MainPage::slotRemoveClicked() void MainPage::enableWidgetsFor( const KMrml::ServerSettings& settings ) { TQString host = settings.host; - bool enableWidgets = (m_config->hosts().findIndex( host ) > -1); + bool enableWidgets = (m_config->hosts().tqfindIndex( host ) > -1); m_serverWidget->m_addButton->setEnabled(!enableWidgets && !host.isEmpty()); m_serverWidget->m_removeButton->setEnabled( enableWidgets && !host.isEmpty() && @@ -397,7 +397,7 @@ void MainPage::processIndexDirs( const TQStringList& removeDirs ) if ( !removeDirs.isEmpty() ) { - m_indexCleaner = new IndexCleaner( removeDirs, m_config, this ); + m_indexCleaner = new IndexCleaner( removeDirs, m_config, TQT_TQOBJECT(this) ); connect( m_indexCleaner, TQT_SIGNAL( advance( int ) ), m_progressDialog->progressBar(), TQT_SLOT( advance( int ) )); connect( m_indexCleaner, TQT_SIGNAL( finished() ), @@ -437,7 +437,7 @@ void MainPage::slotMaybeIndex() m_progressDialog->progressBar()->setProgress( 0 ); // do the indexing - m_indexer = new Indexer( m_config, this, "Indexer" ); + m_indexer = new Indexer( m_config, TQT_TQOBJECT(this), "Indexer" ); connect( m_indexer, TQT_SIGNAL( progress( int, const TQString& )), TQT_SLOT( slotIndexingProgress( int, const TQString& ) )); connect( m_indexer, TQT_SIGNAL( finished( int )), @@ -465,7 +465,7 @@ void MainPage::slotIndexingFinished( int returnCode ) if ( err ) syserr = TQString::fromLocal8Bit( err ); else - syserr = i18n("Unknown error: %1").arg( returnCode ); + syserr = i18n("Unknown error: %1").tqarg( returnCode ); } KMessageBox::detailedError( this, i18n("An error occurred during indexing. The index might be invalid."), diff --git a/kmrml/kmrml/kcontrol/mainpage.h b/kmrml/kmrml/kcontrol/mainpage.h index 8000aea9..7a7d6902 100644 --- a/kmrml/kmrml/kcontrol/mainpage.h +++ b/kmrml/kmrml/kcontrol/mainpage.h @@ -43,12 +43,13 @@ namespace KMrmlConfig class Indexer; class IndexCleaner; - class MainPage : public QVBox + class MainPage : public TQVBox { Q_OBJECT + TQ_OBJECT public: - MainPage( TQWidget *parent, const char *name ); + MainPage( TQWidget *tqparent, const char *name ); ~MainPage(); void resetDefaults(); diff --git a/kmrml/kmrml/kcontrol/serverconfigwidget.ui b/kmrml/kmrml/kcontrol/serverconfigwidget.ui index e0a08007..c78a5046 100644 --- a/kmrml/kmrml/kcontrol/serverconfigwidget.ui +++ b/kmrml/kmrml/kcontrol/serverconfigwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>ServerConfigWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ServerConfigWidget</cstring> </property> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout7</cstring> </property> @@ -36,7 +36,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -66,7 +66,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_addButton</cstring> </property> @@ -74,7 +74,7 @@ <string>&Add</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_removeButton</cstring> </property> @@ -84,7 +84,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> <cstring>Layout6</cstring> </property> @@ -114,7 +114,7 @@ <string>TCP/IP Port Number of the Indexing Server</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_autoPort</cstring> </property> @@ -135,7 +135,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>200</width> <height>0</height> @@ -144,7 +144,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_hostLabel</cstring> </property> @@ -155,7 +155,7 @@ <cstring>m_hostCombo</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_portLabel</cstring> </property> @@ -168,7 +168,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_useAuth</cstring> </property> @@ -176,7 +176,7 @@ <string>Per&form authentication</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout12</cstring> </property> @@ -200,14 +200,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout6</cstring> </property> @@ -221,7 +221,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_userLabel</cstring> </property> @@ -237,7 +237,7 @@ <cstring>m_passEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_passLabel</cstring> </property> @@ -268,5 +268,5 @@ <tabstop>m_userEdit</tabstop> <tabstop>m_passEdit</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmrml/kmrml/lib/kmrml_config.cpp b/kmrml/kmrml/lib/kmrml_config.cpp index 6358971d..6d779860 100644 --- a/kmrml/kmrml/lib/kmrml_config.cpp +++ b/kmrml/kmrml/lib/kmrml_config.cpp @@ -30,9 +30,9 @@ #include <kdeversion.h> #if KDE_VERSION < 307 - #define QUOTE( x ) x + #define TQUOTE( x ) x #else - #define QUOTE( x ) KProcess::quote( x ) + #define TQUOTE( x ) KProcess::quote( x ) #endif using namespace KMrml; @@ -104,7 +104,7 @@ bool Config::sync() void Config::setDefaultHost( const TQString& host ) { m_defaultHost = host.isEmpty() ? - TQString::fromLatin1(DEFAULT_HOST) : host; + TQString::tqfromLatin1(DEFAULT_HOST) : host; m_config->setGroup( CONFIG_GROUP ); m_config->writeEntry( "Default Host", m_defaultHost ); @@ -137,7 +137,7 @@ ServerSettings Config::settingsForHost( const TQString& host ) const void Config::addSettings( const ServerSettings& settings ) { TQString host = settings.host; - if ( m_hostList.find( host ) == m_hostList.end() ) + if ( m_hostList.tqfind( host ) == m_hostList.end() ) m_hostList.append( host ); m_config->setGroup( CONFIG_GROUP ); @@ -181,13 +181,13 @@ TQString Config::addCollectionCommandLine() const m_config->setGroup( CONFIG_GROUP ); TQString cmd = m_config->readEntry( "AddCollection Commandline", DEFAULT_ADDCOLLECTION_CMD ); - int index = cmd.find( "%h" ); + int index = cmd.tqfind( "%h" ); if ( index != -1 ) - cmd.replace( index, 2, QUOTE( mrmldDataDir() ) ); + cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); - index = cmd.find( "%e" ); + index = cmd.tqfind( "%e" ); if ( index != -1 ) - cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); + cmd.tqreplace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); return cmd; } @@ -203,13 +203,13 @@ TQString Config::removeCollectionCommandLine() const m_config->setGroup( CONFIG_GROUP ); TQString cmd = m_config->readEntry( "RemoveCollection Commandline", DEFAULT_REMOVECOLLECTION_CMD ); - int index = cmd.find( "%h" ); + int index = cmd.tqfind( "%h" ); if ( index != -1 ) - cmd.replace( index, 2, QUOTE( mrmldDataDir() ) ); + cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); - index = cmd.find( "%e" ); + index = cmd.tqfind( "%e" ); if ( index != -1 ) - cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); + cmd.tqreplace( index, 2, TQTextCodec::codecForLocale()->mimeName() ); return cmd; } @@ -231,17 +231,17 @@ TQString Config::mrmldCommandline() const DEFAULT_MRMLD_CMD ); // add data directory and port to the commandline - int index = cmd.find( "%p" ); + int index = cmd.tqfind( "%p" ); if ( index != -1 ) { TQString port = settings.autoPort ? - TQString::null : TQString::number( settings.configuredPort ); - cmd.replace( index, 2, port ); + TQString() : TQString::number( settings.configuredPort ); + cmd.tqreplace( index, 2, port ); } - index = cmd.find( "%d" ); + index = cmd.tqfind( "%d" ); if ( index != -1 ) { - cmd.replace( index, 2, QUOTE( mrmldDataDir() ) ); + cmd.tqreplace( index, 2, TQUOTE( mrmldDataDir() ) ); } qDebug("***** commandline: %s", cmd.latin1()); diff --git a/kmrml/kmrml/lib/kmrml_config.h b/kmrml/kmrml/lib/kmrml_config.h index 2208030a..4e39d3bf 100644 --- a/kmrml/kmrml/lib/kmrml_config.h +++ b/kmrml/kmrml/lib/kmrml_config.h @@ -108,7 +108,7 @@ namespace KMrml TQString settingsGroup( const TQString& host ) const { - return TQString::fromLatin1( "SettingsFor: " ).append( host ); + return TQString::tqfromLatin1( "SettingsFor: " ).append( host ); } bool m_serverStartedIndividually; diff --git a/kmrml/kmrml/lib/mrml_shared.cpp b/kmrml/kmrml/lib/mrml_shared.cpp index 3e7d6d95..932010f6 100644 --- a/kmrml/kmrml/lib/mrml_shared.cpp +++ b/kmrml/kmrml/lib/mrml_shared.cpp @@ -53,7 +53,7 @@ const TQString * MrmlShared::m_element = 0L; const TQString * MrmlShared::m_attribute = 0L; const TQString * MrmlShared::m_attributeName = 0L; const TQString * MrmlShared::m_attributeValue = 0L; -const TQString * MrmlShared::m_children = 0L; +const TQString * MrmlShared::m_tqchildren = 0L; const TQString * MrmlShared::m_none = 0L; const TQString * MrmlShared::m_multiSet = 0L; @@ -141,7 +141,7 @@ void MrmlShared::init() m_attribute = new TQString ( "attribute" ) ; m_attributeName = new TQString ( "attribute-name" ) ; m_attributeValue = new TQString ( "attribute-value" ) ; - m_children = new TQString ( "children" ) ; + m_tqchildren = new TQString ( "tqchildren" ) ; m_none = new TQString ( "none" ) ; m_multiSet = new TQString ( "multi-set" ) ; @@ -215,7 +215,7 @@ void MrmlShared::cleanup() delete m_attribute; delete m_attributeName; delete m_attributeValue; - delete m_children; + delete m_tqchildren; delete m_none; delete m_visibility; diff --git a/kmrml/kmrml/lib/mrml_shared.h b/kmrml/kmrml/lib/mrml_shared.h index 6ed2177a..175d5c3c 100644 --- a/kmrml/kmrml/lib/mrml_shared.h +++ b/kmrml/kmrml/lib/mrml_shared.h @@ -76,7 +76,7 @@ public: static const TQString& attribute() { return *m_attribute; } static const TQString& attributeName() { return *m_attributeName; } static const TQString& attributeValue() { return *m_attributeValue; } - static const TQString& children() { return *m_children; } + static const TQString& tqchildren() { return *m_tqchildren; } static const TQString& none() { return *m_none; } static const TQString& visibility() { return *m_visibility; } @@ -139,7 +139,7 @@ private: static const TQString * m_attribute; static const TQString * m_attributeName; static const TQString * m_attributeValue; - static const TQString * m_children; + static const TQString * m_tqchildren; static const TQString * m_none; static const TQString * m_visibility; diff --git a/kmrml/kmrml/lib/mrml_utils.h b/kmrml/kmrml/lib/mrml_utils.h index ee2fdb30..5707b177 100644 --- a/kmrml/kmrml/lib/mrml_utils.h +++ b/kmrml/kmrml/lib/mrml_utils.h @@ -28,7 +28,7 @@ namespace KMrml { - class Util : public QObject + class Util : public TQObject { public: static Util * self(); diff --git a/kmrml/kmrml/lib/watcher_stub.cpp b/kmrml/kmrml/lib/watcher_stub.cpp index ca9ca7b2..d10dcbc7 100644 --- a/kmrml/kmrml/lib/watcher_stub.cpp +++ b/kmrml/kmrml/lib/watcher_stub.cpp @@ -78,7 +78,7 @@ TQStringList Watcher_stub::runningDaemons() TQByteArray data, replyData; TQCString replyType; if ( dcopClient()->call( app(), obj(), "runningDaemons()", data, replyType, replyData ) ) { - if ( replyType == "TQStringList" ) { + if ( replyType == TQSTRINGLIST_OBJECT_NAME_STRING ) { TQDataStream _reply_stream( replyData, IO_ReadOnly ); _reply_stream >> result; setStatus( CallSucceeded ); diff --git a/kmrml/kmrml/loader.cpp b/kmrml/kmrml/loader.cpp index ea8803e2..f8cbecb3 100644 --- a/kmrml/kmrml/loader.cpp +++ b/kmrml/kmrml/loader.cpp @@ -72,7 +72,7 @@ void Loader::requestDownload( const KURL& url ) void Loader::slotData( KIO::Job *job, const TQByteArray& data ) { - DownloadIterator it = m_downloads.find( static_cast<KIO::TransferJob*>(job) ); + DownloadIterator it = m_downloads.tqfind( static_cast<KIO::TransferJob*>(job) ); if ( it != m_downloads.end() ) { TQBuffer& buffer = it.data()->m_buffer; if ( !buffer.isOpen() ) @@ -90,7 +90,7 @@ void Loader::slotResult( KIO::Job *job ) { KIO::TransferJob *tjob = static_cast<KIO::TransferJob*>( job ); - DownloadIterator it = m_downloads.find( tjob ); + DownloadIterator it = m_downloads.tqfind( tjob ); if ( it != m_downloads.end() ) { Download *d = it.data(); diff --git a/kmrml/kmrml/loader.h b/kmrml/kmrml/loader.h index 8e1090cf..7b0cef21 100644 --- a/kmrml/kmrml/loader.h +++ b/kmrml/kmrml/loader.h @@ -39,10 +39,11 @@ public: }; -class Loader : public QObject +class Loader : public TQObject { friend class gcc_sucks; Q_OBJECT + TQ_OBJECT public: static Loader *self(); diff --git a/kmrml/kmrml/mrml.cpp b/kmrml/kmrml/mrml.cpp index 1d998476..8fdcce29 100644 --- a/kmrml/kmrml/mrml.cpp +++ b/kmrml/kmrml/mrml.cpp @@ -214,13 +214,13 @@ bool Mrml::startSession( const KURL& url ) // desired collection-id // Wolfgang says, we shouldn't create an own session-id here, as gcc 2.95 - // apparently makes problems in exception handling somehow. So we simply + // aptqparently makes problems in exception handling somehow. So we simply // accept the server's session-id. - TQString msg = mrmlString( TQString::null ).arg( + TQString msg = mrmlString( TQString() ).tqarg( "<open-session user-name=\"%1\" session-name=\"kio_mrml session\" /> \ <get-algorithms /> \ <get-collections /> \ - </mrml>" ).arg( user( url )); + </mrml>" ).tqarg( user( url )); TQCString utf8 = msg.utf8(); // qDebug(":::Writing: %s", utf8.data()); @@ -240,13 +240,13 @@ TQString Mrml::mrmlString( const TQString& sessionId, const TQString& transactio </mrml>"; if ( sessionId.isEmpty() ) // when we don't have one yet - return msg.arg( "<mrml>%1" ); + return msg.tqarg( "<mrml>%1" ); if ( transactionId.isNull() ) - return msg.arg( "<mrml session-id=\"%1\">%1" ).arg( sessionId ); + return msg.tqarg( "<mrml session-id=\"%1\">%1" ).tqarg( sessionId ); else - return msg.arg( "<mrml session-id=\"%1\" transaction-id=\"%1\">%1") - .arg( sessionId ).arg( transactionId ); + return msg.tqarg( "<mrml session-id=\"%1\" transaction-id=\"%1\">%1") + .tqarg( sessionId ).tqarg( transactionId ); } void Mrml::emitData( const TQCString& msg ) diff --git a/kmrml/kmrml/mrml.h b/kmrml/kmrml/mrml.h index c6ee01b2..d0493168 100644 --- a/kmrml/kmrml/mrml.h +++ b/kmrml/kmrml/mrml.h @@ -56,7 +56,7 @@ private: } static TQString mrmlString( const TQString& sessionId, - const TQString& transactionId = TQString::null ); + const TQString& transactionId = TQString() ); static TQCString loginString(); static TQCString getConfigurationString(); diff --git a/kmrml/kmrml/mrml_creator.cpp b/kmrml/kmrml/mrml_creator.cpp index fe4a14c6..03f2ef77 100644 --- a/kmrml/kmrml/mrml_creator.cpp +++ b/kmrml/kmrml/mrml_creator.cpp @@ -65,12 +65,12 @@ TQDomElement MrmlCreator::addRelevanceList( TQDomElement& query ) * Creates a <user-relevance-element> with the given attributes set. */ void MrmlCreator::createRelevanceElement( TQDomDocument& doc, - TQDomElement& parent, + TQDomElement& tqparent, const TQString& url, Relevance relevance ) { TQDomElement element = doc.createElement( "user-relevance-element" ); element.setAttribute( "image-location", url ); element.setAttribute( "user-relevance", TQString::number( relevance ) ); - parent.appendChild( element ); + tqparent.appendChild( element ); } diff --git a/kmrml/kmrml/mrml_creator.h b/kmrml/kmrml/mrml_creator.h index 18e49551..2c9e33c3 100644 --- a/kmrml/kmrml/mrml_creator.h +++ b/kmrml/kmrml/mrml_creator.h @@ -32,7 +32,7 @@ namespace MrmlCreator TQDomElement createMrml( TQDomDocument& doc, const TQString& sessionId, - const TQString& transactionId = TQString::null ); + const TQString& transactionId = TQString() ); TQDomElement configureSession( TQDomElement& mrml, const KMrml::Algorithm& algo, const TQString& sessionId ); @@ -41,7 +41,7 @@ namespace MrmlCreator /** * Creates a <user-relevance-element> with the given attributes set. */ - void createRelevanceElement( TQDomDocument& doc, TQDomElement& parent, + void createRelevanceElement( TQDomDocument& doc, TQDomElement& tqparent, const TQString& url, Relevance relevance ); } diff --git a/kmrml/kmrml/mrml_elements.cpp b/kmrml/kmrml/mrml_elements.cpp index 3fadcaba..a5a0ebb1 100644 --- a/kmrml/kmrml/mrml_elements.cpp +++ b/kmrml/kmrml/mrml_elements.cpp @@ -28,7 +28,7 @@ using namespace KMrml; // // MrmlElement is currently the baseclass for Algorithm and Collection. Both // may have a single child-element <query-paradigm-list>, with a number of -// <query-paradigm> elements as children. +// <query-paradigm> elements as tqchildren. // MrmlElement::MrmlElement( const TQDomElement& elem ) @@ -144,11 +144,11 @@ Algorithm Algorithm::defaultAlgorithm() return algo; } -TQDomElement Algorithm::toElement( TQDomElement& parent ) const +TQDomElement Algorithm::toElement( TQDomElement& tqparent ) const { - TQDomDocument doc = parent.ownerDocument(); + TQDomDocument doc = tqparent.ownerDocument(); TQDomElement algorithm = doc.createElement( MrmlShared::algorithm() ); - parent.appendChild( algorithm ); + tqparent.appendChild( algorithm ); setOtherAttributes( algorithm ); if ( !m_name.isEmpty() ) @@ -194,7 +194,7 @@ bool QueryParadigm::equalMaps( const TQMap<TQString,TQString> m1, TQMapConstIterator<TQString,TQString> it = m1.begin(); for ( ; it != m1.end(); ++it ) { - TQMapConstIterator<TQString,TQString> it2 = m2.find( it.key() ); + TQMapConstIterator<TQString,TQString> it2 = m2.tqfind( it.key() ); if ( it2 == m2.end() || it.data() != it2.data() ) return false; } @@ -242,12 +242,12 @@ bool QueryParadigmList::matches( const QueryParadigmList& other ) const /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// -TQValueList<TQDomElement> KMrml::directChildElements( const TQDomElement& parent, +TQValueList<TQDomElement> KMrml::directChildElements( const TQDomElement& tqparent, const TQString& tagName ) { TQValueList<TQDomElement> list; - TQDomNode node = parent.firstChild(); + TQDomNode node = tqparent.firstChild(); while ( !node.isNull() ) { if ( node.isElement() && node.nodeName() == tagName ) @@ -259,10 +259,10 @@ TQValueList<TQDomElement> KMrml::directChildElements( const TQDomElement& parent return list; } -TQDomElement KMrml::firstChildElement( const TQDomElement& parent, +TQDomElement KMrml::firstChildElement( const TQDomElement& tqparent, const TQString& tagName ) { - TQDomNode node = parent.firstChild(); + TQDomNode node = tqparent.firstChild(); while ( !node.isNull() ) { if ( node.isElement() && node.nodeName() == tagName ) diff --git a/kmrml/kmrml/mrml_elements.h b/kmrml/kmrml/mrml_elements.h index 6fe6767d..ae66dcab 100644 --- a/kmrml/kmrml/mrml_elements.h +++ b/kmrml/kmrml/mrml_elements.h @@ -106,7 +106,7 @@ namespace KMrml m_collectionId = id; } - TQDomElement toElement( TQDomElement& parent ) const; + TQDomElement toElement( TQDomElement& tqparent ) const; const PropertySheet& propertySheet() const; static Algorithm defaultAlgorithm(); @@ -221,9 +221,9 @@ namespace KMrml }; - TQValueList<TQDomElement> directChildElements( const TQDomElement& parent, + TQValueList<TQDomElement> directChildElements( const TQDomElement& tqparent, const TQString& tagName); - TQDomElement firstChildElement( const TQDomElement& parent, + TQDomElement firstChildElement( const TQDomElement& tqparent, const TQString& tagName ); diff --git a/kmrml/kmrml/mrml_part.cpp b/kmrml/kmrml/mrml_part.cpp index ba0cad5e..2ec0af90 100644 --- a/kmrml/kmrml/mrml_part.cpp +++ b/kmrml/kmrml/mrml_part.cpp @@ -90,14 +90,14 @@ KInstance * PartFactory::instance() return s_instance; } -KParts::Part * PartFactory::createPartObject( TQWidget *parentWidget, +KParts::Part * PartFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, - TQObject *parent, + TQObject *tqparent, const char *name, const char *, const TQStringList& args ) { - return new MrmlPart( parentWidget, widgetName, parent, name, args ); + return new MrmlPart( tqparentWidget, widgetName, tqparent, name, args ); } @@ -111,10 +111,10 @@ KParts::Part * PartFactory::createPartObject( TQWidget *parentWidget, uint MrmlPart::s_sessionId = 0; -MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */, - TQObject *parent, const char *name, +MrmlPart::MrmlPart( TQWidget *tqparentWidget, const char * /* widgetName */, + TQObject *tqparent, const char *name, const TQStringList& /* args */ ) - : KParts::ReadOnlyPart( parent, name ), + : KParts::ReadOnlyPart( tqparent, name ), m_job( 0L ), m_status( NeedCollection ) { @@ -126,7 +126,7 @@ MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */, KConfig *config = PartFactory::instance()->config(); config->setGroup("MRML Settings"); - TQVBox *box = new TQVBox( parentWidget, "main mrml box" ); + TQVBox *box = new TQVBox( tqparentWidget, "main mrml box" ); m_view = new MrmlView( box, "MrmlView" ); connect( m_view, TQT_SIGNAL( activated( const KURL&, ButtonState )), this, TQT_SLOT( slotActivated( const KURL&, ButtonState ))); @@ -151,15 +151,15 @@ MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */, // prevent crashes when the connection to the server fails m_collectionCombo->setCollections( &m_collections ); - m_algoButton = new TQPushButton( TQString::null, m_panel ); + m_algoButton = new TQPushButton( TQString(), m_panel ); m_algoButton->setPixmap( SmallIcon("configure") ); - m_algoButton->setFixedSize( m_algoButton->sizeHint() ); + m_algoButton->setFixedSize( m_algoButton->tqsizeHint() ); connect( m_algoButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureAlgorithm() )); TQToolTip::add( m_algoButton, i18n("Configure algorithm") ); TQWidget *spacer = new TQWidget( m_panel ); - spacer->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, + spacer->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum ) ); int resultSize = config->readNumEntry( "Result-size", 20 ); @@ -170,15 +170,15 @@ MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */, TQVBox *tmp = new TQVBox( m_panel ); m_random = new TQCheckBox( i18n("Random search"), tmp ); - m_startButton = new TQPushButton( TQString::null, tmp ); + m_startButton = new TQPushButton( TQString(), tmp ); connect( m_startButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStartClicked() )); - setStatus( NeedCollection ); + settqStatus( NeedCollection ); setWidget( box ); // setXMLFile( "mrml_part.rc" ); - slotSetStatusBar( TQString::null ); + slotSetStatusBar( TQString() ); enableServerDependentWidgets( false ); } @@ -206,7 +206,7 @@ void MrmlPart::initCollections( const TQDomElement& elem ) KMessageBox::information( widget(), i18n("There is no image collection available\n" "at %1.\n"), i18n("No Image Collection")); - setStatus( NeedCollection ); + settqStatus( NeedCollection ); } else m_collectionCombo->updateGeometry(); // adjust the entire grid @@ -229,7 +229,7 @@ bool MrmlPart::openURL( const KURL& url ) m_url = url; TQString host = url.host().isEmpty() ? - TQString::fromLatin1("localhost") : url.host(); + TQString::tqfromLatin1("localhost") : url.host(); m_hostCombo->setCurrentItem( host ); @@ -285,8 +285,8 @@ bool MrmlPart::openURL( const KURL& url ) == KMessageBox::Yes ) { KApplication::kdeinitExec( "kcmshell", - TQString::fromLatin1("kcmkmrml")); - setStatus( NeedCollection ); + TQString::tqfromLatin1("kcmkmrml")); + settqStatus( NeedCollection ); return false; } } @@ -308,9 +308,9 @@ void MrmlPart::contactServer( const KURL& url ) m_job->addMetaData( MrmlShared::kio_task(), MrmlShared::kio_initialize() ); TQString host = url.host().isEmpty() ? - TQString::fromLatin1("localhost") : url.host(); + TQString::tqfromLatin1("localhost") : url.host(); - slotSetStatusBar( i18n("Connecting to indexing server at %1...").arg( host )); + slotSetStatusBar( i18n("Connecting to indexing server at %1...").tqarg( host )); } // @@ -325,11 +325,11 @@ void MrmlPart::downloadReferenceFiles( const KURL::List& downloadList ) for ( ; it != downloadList.end(); it++ ) { TQString extension; - int index = (*it).fileName().findRev( '.' ); + int index = (*it).fileName().tqfindRev( '.' ); if ( index != -1 ) extension = (*it).fileName().mid( index ); - KTempFile tmpFile( TQString::null, extension ); + KTempFile tmpFile( TQString(), extension ); if ( tmpFile.status() != 0 ) { kdWarning() << "Can't create temporary file, skipping: " << *it << endl; @@ -376,7 +376,7 @@ bool MrmlPart::closeURL() m_job = 0L; } - setStatus( NeedCollection ); + settqStatus( NeedCollection ); return true; } @@ -400,7 +400,7 @@ KIO::TransferJob * MrmlPart::transferJob( const KURL& url ) emit started( job ); emit setWindowCaption( url.prettyURL() ); - setStatus( InProgress ); + settqStatus( InProgress ); return job; } @@ -410,7 +410,7 @@ void MrmlPart::slotResult( KIO::Job *job ) if ( job == m_job ) m_job = 0L; - slotSetStatusBar( TQString::null ); + slotSetStatusBar( TQString() ); if ( !job->error() ) emit completed(); @@ -423,7 +423,7 @@ void MrmlPart::slotResult( KIO::Job *job ) bool auto_random = m_view->isEmpty() && m_queryList.isEmpty(); m_random->setChecked( auto_random ); m_random->setEnabled( !auto_random ); - setStatus( job->error() ? NeedCollection : CanSearch ); + settqStatus( job->error() ? NeedCollection : CanSearch ); if ( !job->error() && !m_queryList.isEmpty() ) { // we have a connection and we got a list of relevant URLs to query for @@ -495,7 +495,7 @@ void MrmlPart::parseMrml( TQDomDocument& doc ) else if ( tagName == "error" ) { KMessageBox::information( widget(), i18n("Server returned error:\n%1\n") - .arg( elem.attribute( "message" )), + .tqarg( elem.attribute( "message" )), i18n("Server Error") ); } @@ -560,8 +560,8 @@ void MrmlPart::slotStartClicked() // cut off an eventual query and reference from the url, when the user // performs a real query (otherwise restoreState() would restore and // re-do the query from the URL - m_url.setRef( TQString::null ); - m_url.setQuery( TQString::null ); + m_url.setRef( TQString() ); + m_url.setQuery( TQString() ); createQuery(); m_browser->openURLNotify(); @@ -677,7 +677,7 @@ void MrmlPart::performQuery( TQDomDocument& doc ) queryStep.setAttribute("query-type", "at-random"); // remove user-relevance-element-list element for random search - relevanceList.parentNode().removeChild( relevanceList ); + relevanceList.tqparentNode().removeChild( relevanceList ); } } else @@ -705,13 +705,13 @@ void MrmlPart::slotSetStatusBar( const TQString& text ) void MrmlPart::slotActivated( const KURL& url, ButtonState button ) { - if ( button == LeftButton ) + if ( button == Qt::LeftButton ) emit m_browser->openURLRequest( url ); - else if ( button == MidButton ) + else if ( button == Qt::MidButton ) emit m_browser->createNewWindow( url ); - else if ( button == RightButton ) { + else if ( button == Qt::RightButton ) { // enableExtensionActions( url, true ); // for now - emit m_browser->popupMenu( TQCursor::pos(), url, TQString::null ); + emit m_browser->popupMenu( TQCursor::pos(), url, TQString() ); // enableExtensionActions( url, false ); } } @@ -776,7 +776,7 @@ void MrmlPart::slotHostComboActivated( const TQString& host ) openURL( settings.getUrl() ); } -void MrmlPart::setStatus( Status status ) +void MrmlPart::settqStatus( tqStatus status ) { switch ( status ) { diff --git a/kmrml/kmrml/mrml_part.h b/kmrml/kmrml/mrml_part.h index 84ce0529..fbe82d25 100644 --- a/kmrml/kmrml/mrml_part.h +++ b/kmrml/kmrml/mrml_part.h @@ -54,16 +54,17 @@ class MrmlView; class MrmlPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - enum Status { NeedCollection, CanSearch, InProgress }; + enum tqStatus { NeedCollection, CanSearch, InProgress }; - MrmlPart( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, const TQStringList& args ); + MrmlPart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList& args ); ~MrmlPart(); TQString sessionId() const { return m_sessionId; } - TQString transactionId() const { return TQString::null; } // ### + TQString transactionId() const { return TQString(); } // ### void saveState( TQDataStream& stream ); void restoreState( TQDataStream& stream ); @@ -115,7 +116,7 @@ private: void initHostCombo(); void enableServerDependentWidgets( bool enable ); - void setStatus( Status status ); + void settqStatus( tqStatus status ); void contactServer( const KURL& url ); void downloadReferenceFiles( const KURL::List& downloadList ); @@ -142,7 +143,7 @@ private: CollectionList m_collections; AlgorithmList m_algorithms; - Status m_status; + tqStatus m_status; static uint s_sessionId; }; @@ -150,6 +151,7 @@ private: class PartFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: PartFactory(); @@ -158,9 +160,9 @@ public: static KInstance * instance(); protected: - virtual KParts::Part * createPartObject( TQWidget *parentWidget = 0, + virtual KParts::Part * createPartObject( TQWidget *tqparentWidget = 0, const char *widgetName = 0, - TQObject *parent = 0, + TQObject *tqparent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList& args = TQStringList() ); diff --git a/kmrml/kmrml/mrml_view.cpp b/kmrml/kmrml/mrml_view.cpp index 89c15061..254307e0 100644 --- a/kmrml/kmrml/mrml_view.cpp +++ b/kmrml/kmrml/mrml_view.cpp @@ -37,8 +37,8 @@ using namespace KMrml; -MrmlView::MrmlView( TQWidget *parent, const char *name ) - : TQScrollView( parent, name ) +MrmlView::MrmlView( TQWidget *tqparent, const char *name ) + : TQScrollView( tqparent, name ) { setStaticBackground( true ); setResizePolicy( Manual ); @@ -57,11 +57,11 @@ MrmlView::MrmlView( TQWidget *parent, const char *name ) // query result image TQLabel l( i18n( "No thumbnail available" ), 0L ); l.setFixedSize( 80, 80 ); - l.setAlignment( WordBreak | AlignCenter ); + l.tqsetAlignment( WordBreak | AlignCenter ); // l.setFrameStyle( TQLabel::Box | TQLabel::Plain ); // l.setLineWidth( 1 ); - l.setPaletteBackgroundColor( Qt::white ); - l.setPaletteForegroundColor( Qt::black ); + l.setPaletteBackgroundColor( TQt::white ); + l.setPaletteForegroundColor( TQt::black ); m_unavailablePixmap = TQPixmap::grabWidget( &l ); } @@ -103,11 +103,11 @@ MrmlViewItem * MrmlView::addItem( const KURL& url, const KURL& thumbURL, } void MrmlView::addRelevanceToQuery( TQDomDocument& document, - TQDomElement& parent ) + TQDomElement& tqparent ) { TQPtrListIterator<MrmlViewItem> it( m_items ); for( ; it.current(); ++it ) { - it.current()->createRelevanceElement( document, parent ); + it.current()->createRelevanceElement( document, tqparent ); } } @@ -120,7 +120,7 @@ void MrmlView::clear() TQPixmap * MrmlView::getPixmap( const KURL& url ) { TQString u = url.url(); - TQPixmap *pix = m_pixmapCache.find( u ); + TQPixmap *pix = m_pixmapCache.tqfind( u ); if ( pix ) return pix; @@ -130,7 +130,7 @@ TQPixmap * MrmlView::getPixmap( const KURL& url ) p = m_unavailablePixmap; m_pixmapCache.insert( u, p ); - return m_pixmapCache.find( u ); + return m_pixmapCache.tqfind( u ); } else { // remote url, download with KIO Loader::self()->requestDownload( url ); @@ -176,7 +176,7 @@ void MrmlView::slotLayout() TQPtrListIterator<MrmlViewItem> it( m_items ); for ( ; it.current(); ++it ) { - itemWidth = QMAX( itemWidth, it.current()->sizeHint().width() ); + itemWidth = TQMAX( itemWidth, it.current()->tqsizeHint().width() ); } if ( itemWidth == 0 ) @@ -202,7 +202,7 @@ void MrmlView::slotLayout() if ( item == 0 ) rowIt = it; - rowHeight = QMAX( rowHeight, it.current()->sizeHint().height() ); + rowHeight = TQMAX( rowHeight, it.current()->tqsizeHint().height() ); addChild( it.current(), margin + item * itemWidth, y ); it.current()->show(); @@ -251,7 +251,7 @@ void MrmlView::restoreState( TQDataStream& stream ) KURL url, thumbURL; double similarity; - Q_UINT32 relevance; + TQ_UINT32 relevance; MrmlViewItem *item; @@ -274,7 +274,7 @@ TQDataStream& KMrml::operator<<( TQDataStream& stream, return stream << item.url() << item.thumbURL() << item.similarity() - << static_cast<Q_UINT32>( item.relevance() ); + << static_cast<TQ_UINT32>( item.relevance() ); } /////////////////////////////////////////////////////////////////// @@ -292,7 +292,7 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL, m_hasRemotePixmap( false ) { if ( m_similarity != -1 ) - m_similarity = QMAX( 0.0, QMIN( 1.0, similarity )); + m_similarity = TQMAX( 0.0, TQMIN( 1.0, similarity )); setFrameStyle( Panel | Sunken ); setMouseTracking( true ); @@ -306,11 +306,11 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL, /* if ( similarity > -1 ) - TQToolTip::add( this, TQString::fromLatin1("<qt>%1<br>%1</qt>") - .arg( url ) - .arg(i18n("Similarity: %1").arg( TQString::number(similarity)))); + TQToolTip::add( this, TQString::tqfromLatin1("<qt>%1<br>%1</qt>") + .tqarg( url ) + .tqarg(i18n("Similarity: %1").tqarg( TQString::number(similarity)))); else - TQToolTip::add( this, TQString::fromLatin1("<qt>%1</qt>").arg( url ) ); + TQToolTip::add( this, TQString::tqfromLatin1("<qt>%1</qt>").tqarg( url ) ); */ setMinimumSize( 130, 130 ); // ### @@ -342,14 +342,14 @@ void MrmlViewItem::paintEvent( TQPaintEvent *e ) if ( m_similarity >= 0 ) { TQPainter p( this ); - TQPen pen( colorGroup().highlight(), 1, TQPen::SolidLine ); + TQPen pen( tqcolorGroup().highlight(), 1, TQPen::SolidLine ); p.setPen( pen ); int x = margin; int y = m_combo->y() - similarityHeight - 2; int w = (int) (similarityFullWidth * m_similarity); int h = similarityHeight; p.drawRect( x, y, similarityFullWidth, h ); - p.fillRect( x, y, w, h, colorGroup().highlight() ); + p.fillRect( x, y, w, h, tqcolorGroup().highlight() ); } } @@ -361,9 +361,9 @@ void MrmlViewItem::resizeEvent( TQResizeEvent *e ) m_combo->move( width()/2 - m_combo->width()/2, y ); } -TQSize MrmlViewItem::sizeHint() const +TQSize MrmlViewItem::tqsizeHint() const { - int w = QMAX( QMAX(minimumHeight(), m_combo->width()), m_pixmap.width() ); + int w = TQMAX( TQMAX(minimumHeight(), m_combo->width()), m_pixmap.width() ); w += 2 * margin; int h = m_pixmap.isNull() ? margin : margin + spacing + m_pixmap.height(); @@ -380,11 +380,11 @@ void MrmlViewItem::mousePressEvent( TQMouseEvent *e ) pressedPos.setY( 0 ); - if ( e->button() == LeftButton || e->button() == MidButton ) { + if ( e->button() == Qt::LeftButton || e->button() == Qt::MidButton ) { if ( hitsPixmap( e->pos() ) ) pressedPos = e->pos(); } - else if ( e->button() == RightButton && hitsPixmap( e->pos() ) ) + else if ( e->button() == Qt::RightButton && hitsPixmap( e->pos() ) ) emit view()->activated( m_url, e->button() ); } @@ -403,7 +403,7 @@ void MrmlViewItem::mouseMoveEvent( TQMouseEvent *e ) } } - if ( (e->state() & LeftButton) && !pressedPos.isNull() ) { + if ( (e->state() & Qt::LeftButton) && !pressedPos.isNull() ) { TQPoint dist = e->pos() - pressedPos; if ( dist.manhattanLength() > KGlobalSettings::dndEventDelay() ) { // start drag here @@ -439,13 +439,13 @@ bool MrmlViewItem::hitsPixmap( const TQPoint& pos ) const } void MrmlViewItem::createRelevanceElement( TQDomDocument& document, - TQDomElement& parent ) + TQDomElement& tqparent ) { int rel = m_combo->currentItem(); if ( rel == Neutral ) return; - MrmlCreator::createRelevanceElement( document, parent, m_url.url(), + MrmlCreator::createRelevanceElement( document, tqparent, m_url.url(), (rel == Relevant) ? MrmlCreator::Relevant : MrmlCreator::Irrelevant ); } diff --git a/kmrml/kmrml/mrml_view.h b/kmrml/kmrml/mrml_view.h index f48c80be..d666910f 100644 --- a/kmrml/kmrml/mrml_view.h +++ b/kmrml/kmrml/mrml_view.h @@ -47,14 +47,15 @@ protected: }; -class MrmlView : public QScrollView +class MrmlView : public TQScrollView { friend class MrmlViewItem; Q_OBJECT + TQ_OBJECT public: - MrmlView( TQWidget *parent = 0L, const char *name = 0L ); + MrmlView( TQWidget *tqparent = 0L, const char *name = 0L ); ~MrmlView(); MrmlViewItem * addItem( const KURL& url, const KURL& thumbURL, @@ -63,7 +64,7 @@ public: double similarity ); - void addRelevanceToQuery( TQDomDocument&, TQDomElement& parent ); + void addRelevanceToQuery( TQDomDocument&, TQDomElement& tqparent ); void clear(); @@ -100,9 +101,10 @@ private: }; -class MrmlViewItem : public QFrame +class MrmlViewItem : public TQFrame { Q_OBJECT + TQ_OBJECT public: enum Relevance @@ -118,13 +120,13 @@ public: void setPixmap( const TQPixmap& pixmap ); - void createRelevanceElement( TQDomDocument& document, TQDomElement& parent ); + void createRelevanceElement( TQDomDocument& document, TQDomElement& tqparent ); double similarity() const { return m_similarity; } void setSimilarity( double value ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; const KURL& url() const { return m_url; } const KURL& thumbURL() const { return m_thumbURL; } @@ -147,7 +149,7 @@ private: MrmlView * view() const { return m_view; } inline int pixmapX() const { - return QMAX( margin, (width() - m_pixmap.width()) / 2); + return TQMAX( margin, (width() - m_pixmap.width()) / 2); } inline int pixmapY() const { return m_combo->y() - similarityHeight - m_pixmap.height() - margin; diff --git a/kmrml/kmrml/propertysheet.cpp b/kmrml/kmrml/propertysheet.cpp index af913558..6391c62e 100644 --- a/kmrml/kmrml/propertysheet.cpp +++ b/kmrml/kmrml/propertysheet.cpp @@ -98,14 +98,14 @@ void PropertySheet::initFromDOM( const TQDomElement& elem ) m_minSubsetSize = toInt( elem.attribute( MrmlShared::minSubsetSize() )); m_maxSubsetSize = toInt( elem.attribute( MrmlShared::maxSubsetSize() )); - TQValueList<TQDomElement> children = + TQValueList<TQDomElement> tqchildren = KMrml::directChildElements( elem, MrmlShared::propertySheet() ); - TQValueListConstIterator<TQDomElement> it = children.begin(); - for ( ; it != children.end(); ++it ) + TQValueListConstIterator<TQDomElement> it = tqchildren.begin(); + for ( ; it != tqchildren.end(); ++it ) m_subSheets.append( new PropertySheet( *it ) ); } -TQWidget * PropertySheet::createWidget( TQWidget */*parent*/, const char */*name*/ ) +TQWidget * PropertySheet::createWidget( TQWidget */*tqparent*/, const char */*name*/ ) { TQWidget *w = 0L; @@ -190,7 +190,7 @@ PropertySheet::SendType PropertySheet::getSendType( const TQString& value ) type = AttributeName; else if ( value == MrmlShared::attributeValue() ) type = AttributeValue; - else if ( value == MrmlShared::children() ) + else if ( value == MrmlShared::tqchildren() ) type = Children; else if ( value == MrmlShared::none() ) type = None; diff --git a/kmrml/kmrml/propertysheet.h b/kmrml/kmrml/propertysheet.h index e4759282..89d9a37f 100644 --- a/kmrml/kmrml/propertysheet.h +++ b/kmrml/kmrml/propertysheet.h @@ -34,7 +34,7 @@ namespace KMrml { MultiSet = 1, // ?? Subset, // radio-button/combobox or listbox - SetElement, // CheckBox -> disables/enables children? + SetElement, // CheckBox -> disables/enables tqchildren? Boolean, // CheckBox Numeric, // Slider/Spinbox Textual, // lineedit @@ -71,9 +71,9 @@ namespace KMrml } void initFromDOM( const TQDomElement& elem ); - void toElement( TQDomElement& parent ); + void toElement( TQDomElement& tqparent ); - TQWidget * createWidget( TQWidget *parent, const char *name = 0 ); + TQWidget * createWidget( TQWidget *tqparent, const char *name = 0 ); private: static Visibility getVisibility( const TQString& value ); diff --git a/kmrml/kmrml/propertywidgets.cpp b/kmrml/kmrml/propertywidgets.cpp index 18508f3a..5c562588 100644 --- a/kmrml/kmrml/propertywidgets.cpp +++ b/kmrml/kmrml/propertywidgets.cpp @@ -19,8 +19,8 @@ #include "propertywidgets.h" IntegerWidget::IntegerWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } @@ -39,8 +39,8 @@ int IntegerWidget::value() const /////////////////////////////////////////////////////////////////// ComboWidget::ComboWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } @@ -60,8 +60,8 @@ TQString ComboWidget::value() const /////////////////////////////////////////////////////////////////// CheckBoxWidget::CheckBoxWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } @@ -81,8 +81,8 @@ bool CheckBoxWidget::value() const /////////////////////////////////////////////////////////////////// LineEditWidget::LineEditWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } @@ -102,8 +102,8 @@ TQString LineEditWidget::value() const /////////////////////////////////////////////////////////////////// ListBoxWidget::ListBoxWidget( const PropertySheet& sheet, - TQWidget *parent, const char *name ) - : TQHBox( parent, name ) + TQWidget *tqparent, const char *name ) + : TQHBox( tqparent, name ) { } diff --git a/kmrml/kmrml/propertywidgets.h b/kmrml/kmrml/propertywidgets.h index def1d2ca..1048e6f0 100644 --- a/kmrml/kmrml/propertywidgets.h +++ b/kmrml/kmrml/propertywidgets.h @@ -25,13 +25,14 @@ namespace KMrml { - class IntegerWidget : public QHBox + class IntegerWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: IntegerWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~IntegerWidget(); int value() const; @@ -40,13 +41,14 @@ namespace KMrml }; - class ComboWidget : public QHBox + class ComboWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: ComboWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~ComboWidget(); TQString value() const; @@ -55,13 +57,14 @@ namespace KMrml }; - class CheckBoxWidget : public QHBox + class CheckBoxWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: CheckBoxWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~CheckBoxWidget(); bool value(); @@ -72,13 +75,14 @@ namespace KMrml }; - class LineEditWidget : public QHBox + class LineEditWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: LineEditWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~LineEditWidget(); TQString value(); @@ -87,13 +91,14 @@ namespace KMrml }; - class ListBoxWidget : public QHBox + class ListBoxWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: ListBoxWidget( const PropertySheet& sheet, - TQWidget *parent = parent, const char *name = 0L ); + TQWidget *tqparent = tqparent, const char *name = 0L ); ~ListBoxWidget(); TQStringList values(); diff --git a/kmrml/kmrml/server/watcher.cpp b/kmrml/kmrml/server/watcher.cpp index 96314257..46a7221c 100644 --- a/kmrml/kmrml/server/watcher.cpp +++ b/kmrml/kmrml/server/watcher.cpp @@ -56,11 +56,11 @@ bool Watcher::requireDaemon( const TQCString& clientAppId, << ": Client AppID is not registered with DCOP: " << clientAppId << endl; - DaemonData *daemon = m_daemons.find( daemonKey ); + DaemonData *daemon = m_daemons.tqfind( daemonKey ); if ( daemon ) { - if ( !daemon->apps.find( clientAppId ) ) + if ( !daemon->apps.tqfind( clientAppId ) ) daemon->apps.append( clientAppId ); // timeout, commandline and restart values are: first come, first serve @@ -93,7 +93,7 @@ bool Watcher::requireDaemon( const TQCString& clientAppId, void Watcher::unrequireDaemon( const TQCString& clientAppId, const TQString& daemonKey ) { - unrequireDaemon( m_daemons.find( daemonKey ), clientAppId ); + unrequireDaemon( m_daemons.tqfind( daemonKey ), clientAppId ); } void Watcher::unrequireDaemon( DaemonData *daemon, @@ -101,7 +101,7 @@ void Watcher::unrequireDaemon( DaemonData *daemon, { if ( daemon ) { - daemon->apps.remove( clientAppId ); + daemon->apps.remove( clientAppId.data() ); if ( daemon->apps.isEmpty() ) { if ( !daemon->timer ) @@ -146,7 +146,7 @@ void Watcher::slotProcExited( KProcess *proc ) i18n("<qt>The server with the command line" "<br>%1<br>" "is not available anymore. Do you want to " - "restart it?" ).arg( daemon->commandline ), + "restart it?" ).tqarg( daemon->commandline ), i18n("Service Failure"), i18n("Restart Server"), i18n("Do Not Restart") ) == KMessageBox::Yes ) { @@ -175,7 +175,7 @@ bool Watcher::startDaemon( DaemonData *daemon ) i18n("Unable to start the server with the " "command line" "<br>%1<br>" - "Try again?").arg( daemon->commandline ), + "Try again?").tqarg( daemon->commandline ), i18n("Service Failure"), i18n("Try Again"), i18n("Do Not Try") ) == KMessageBox::Yes ) { @@ -188,7 +188,7 @@ bool Watcher::startDaemon( DaemonData *daemon ) void Watcher::slotTimeout() { - TQTimer *timer = static_cast<TQTimer*>( const_cast<TQObject *>( sender() ) ); + TQTimer *timer = static_cast<TQTimer*>( TQT_TQOBJECT( sender() ) ); DaemonData *daemon = findDaemonFromTimer( timer ); if ( daemon ) { @@ -243,7 +243,7 @@ void Watcher::slotAppUnregistered( const TQCString& appId ) TQDictIterator<DaemonData> it( m_daemons ); for ( ; (daemon = it.current()); ++it ) { - if ( daemon->apps.find( appId ) != -1 ) + if ( daemon->apps.tqfind( appId ) != -1 ) unrequireDaemon( daemon, appId ); } } diff --git a/kmrml/kmrml/server/watcher.h b/kmrml/kmrml/server/watcher.h index ef7ae9eb..941d7ebf 100644 --- a/kmrml/kmrml/server/watcher.h +++ b/kmrml/kmrml/server/watcher.h @@ -61,6 +61,7 @@ namespace KMrml class Watcher : public KDEDModule { Q_OBJECT +// TQ_OBJECT K_DCOP public: diff --git a/kolourpaint/BUGS b/kolourpaint/BUGS index 84f3391f..25814d61 100644 --- a/kolourpaint/BUGS +++ b/kolourpaint/BUGS @@ -27,8 +27,8 @@ This file lists known bugs in this version that are not considered manifestations of the current QSpinBox behaviour. 6. a) The undo history and document modified state are not updated during - the drawing of multi-segment shapes (Polygon, Connected Lines, - Curve). They are however updated after shapes' completion. + the drawing of multi-segment tqshapes (Polygon, Connected Lines, + Curve). They are however updated after tqshapes' completion. b) The text and brush-like tools set the document modified flag even if user cancels the draw operation. @@ -37,7 +37,7 @@ This file lists known bugs in this version that are not considered still marked as modified (because 2 commands - the create selection and the move - were added but only one was undone). -7. Certain shapes may have the wrong size (usually only a pixel off and +7. Certain tqshapes may have the wrong size (usually only a pixel off and only in extreme cases) e.g. an ellipse of height 1 always has a width 1 pixel less than it should be. This is a Qt bug. diff --git a/kolourpaint/cursors/kpcursorlightcross.cpp b/kolourpaint/cursors/kpcursorlightcross.cpp index 34051dbf..dc52f9bd 100644 --- a/kolourpaint/cursors/kpcursorlightcross.cpp +++ b/kolourpaint/cursors/kpcursorlightcross.cpp @@ -42,7 +42,7 @@ enum PixelValue }; static void setPixel (unsigned char *colorBitmap, - unsigned char *maskBitmap, + unsigned char *tqmaskBitmap, int width, int y, int x, enum PixelValue pv) { @@ -52,32 +52,32 @@ static void setPixel (unsigned char *colorBitmap, const int MaskOpaque = 1; const int MaskTransparent = 0; - int colorValue, maskValue; + int colorValue, tqmaskValue; switch (pv) { case White: colorValue = ColorWhite; - maskValue = MaskOpaque; + tqmaskValue = MaskOpaque; break; case Black: colorValue = ColorBlack; - maskValue = MaskOpaque; + tqmaskValue = MaskOpaque; break; case Transparent: default: colorValue = ColorWhite; - maskValue = MaskTransparent; + tqmaskValue = MaskTransparent; break; } if (colorValue) colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); - if (maskValue) - maskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); + if (tqmaskValue) + tqmaskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); } @@ -90,10 +90,10 @@ const TQCursor *kpMakeCursorLightCross () const int side = 24; const int byteSize = (side * side) / 8; unsigned char *colorBitmap = new unsigned char [byteSize]; - unsigned char *maskBitmap = new unsigned char [byteSize]; + unsigned char *tqmaskBitmap = new unsigned char [byteSize]; memset (colorBitmap, 0, byteSize); - memset (maskBitmap, 0, byteSize); + memset (tqmaskBitmap, 0, byteSize); const int oddSide = side - 1; const int strokeLen = oddSide * 3 / 8; @@ -104,7 +104,7 @@ const TQCursor *kpMakeCursorLightCross () #define X_(val) (val) #define Y_(val) (val) - #define DRAW(y,x) setPixel (colorBitmap, maskBitmap, side, (y), (x), pv) + #define DRAW(y,x) setPixel (colorBitmap, tqmaskBitmap, side, (y), (x), pv) // horizontal DRAW (Y_(side / 2), X_(1 + i)); DRAW (Y_(side / 2), X_(side - 1 - i)); @@ -118,9 +118,9 @@ const TQCursor *kpMakeCursorLightCross () } TQCursor *cursor = new TQCursor (TQBitmap (side, side, colorBitmap, true/*little endian bit order*/), - TQBitmap (side, side, maskBitmap, true/*little endian bit order*/)); + TQBitmap (side, side, tqmaskBitmap, true/*little endian bit order*/)); - delete [] maskBitmap; + delete [] tqmaskBitmap; delete [] colorBitmap; return cursor; diff --git a/kolourpaint/kolourpaint.cpp b/kolourpaint/kolourpaint.cpp index e1b41fc5..37cff567 100644 --- a/kolourpaint/kolourpaint.cpp +++ b/kolourpaint/kolourpaint.cpp @@ -191,7 +191,7 @@ int main (int argc, char *argv []) KImageIO::registerFormats (); - // Qt says this is necessary but I don't think it is... + // TQt says this is necessary but I don't think it is... TQObject::connect (&app, TQT_SIGNAL (lastWindowClosed ()), &app, TQT_SLOT (quit ())); diff --git a/kolourpaint/kpcolor.cpp b/kolourpaint/kpcolor.cpp index 1c325d39..2efa3c9e 100644 --- a/kolourpaint/kpcolor.cpp +++ b/kolourpaint/kpcolor.cpp @@ -66,22 +66,22 @@ kpColor::kpColor (int red, int green, int blue, bool isTransparent) return; } - m_rgba = qRgba (red, green, blue, isTransparent ? 0 : 255/*opaque*/); + m_rgba = tqRgba (red, green, blue, isTransparent ? 0 : 255/*opaque*/); m_rgbaIsValid = true; } -kpColor::kpColor (const QRgb &rgba) +kpColor::kpColor (const TQRgb &rgba) : m_colorCacheIsValid (false) { - if (qAlpha (rgba) > 0 && qAlpha (rgba) < 255) + if (tqAlpha (rgba) > 0 && tqAlpha (rgba) < 255) { - kdError () << "kpColor::<ctor>(QRgb) passed translucent alpha " - << qAlpha (rgba) + kdError () << "kpColor::<ctor>(TQRgb) passed translucent alpha " + << tqAlpha (rgba) << " - trying to recover" << endl; // Forget the alpha channel - make it opaque - m_rgba = qRgb (qRed (m_rgba), qGreen (m_rgba), qBlue (m_rgba)); + m_rgba = tqRgb (tqRed (m_rgba), tqGreen (m_rgba), tqBlue (m_rgba)); m_rgbaIsValid = true; } else @@ -198,9 +198,9 @@ bool kpColor::isSimilarTo (const kpColor &rhs, int processedSimilarity) const return false; else { - return (square (qRed (m_rgba) - qRed (rhs.m_rgba)) + - square (qGreen (m_rgba) - qGreen (rhs.m_rgba)) + - square (qBlue (m_rgba) - qBlue (rhs.m_rgba)) + return (square (tqRed (m_rgba) - tqRed (rhs.m_rgba)) + + square (tqGreen (m_rgba) - tqGreen (rhs.m_rgba)) + + square (tqBlue (m_rgba) - tqBlue (rhs.m_rgba)) <= processedSimilarity); } } @@ -232,7 +232,7 @@ int kpColor::red () const return 0; } - return qRed (m_rgba); + return tqRed (m_rgba); } // public @@ -250,7 +250,7 @@ int kpColor::green () const return 0; } - return qGreen (m_rgba); + return tqGreen (m_rgba); } // public @@ -268,7 +268,7 @@ int kpColor::blue () const return 0; } - return qBlue (m_rgba); + return tqBlue (m_rgba); } // public @@ -280,7 +280,7 @@ int kpColor::alpha () const return 0; } - const int alpha = qAlpha (m_rgba); + const int alpha = tqAlpha (m_rgba); if (alpha > 0 && alpha < 255) { @@ -309,11 +309,11 @@ bool kpColor::isOpaque () const // public -QRgb kpColor::toQRgb () const +TQRgb kpColor::toTQRgb () const { if (!m_rgbaIsValid) { - kdError () << "kpColor::toQRgb() called with invalid kpColor" << endl; + kdError () << "kpColor::toTQRgb() called with invalid kpColor" << endl; return 0; } @@ -321,31 +321,31 @@ QRgb kpColor::toQRgb () const } // public -const TQColor &kpColor::toQColor () const +const TQColor &kpColor::toTQColor () const { if (!m_rgbaIsValid) { - kdError () << "kpColor::toQColor() called with invalid kpColor" << endl; - return Qt::black; + kdError () << "kpColor::toTQColor() called with invalid kpColor" << endl; + return TQt::black; } if (m_colorCacheIsValid) return m_colorCache; - if (qAlpha (m_rgba) < 255) + if (tqAlpha (m_rgba) < 255) { - kdError () << "kpColor::toQColor() called with not fully opaque kpColor alpha=" - << qAlpha (m_rgba) + kdError () << "kpColor::toTQColor() called with not fully opaque kpColor alpha=" + << tqAlpha (m_rgba) << endl; - return Qt::black; + return TQt::black; } m_colorCache = TQColor (m_rgba); if (!m_colorCache.isValid ()) { - kdError () << "kpColor::toQColor () internal error - could not return valid TQColor" + kdError () << "kpColor::toTQColor () internal error - could not return valid TQColor" << endl; - return Qt::black; + return TQt::black; } m_colorCacheIsValid = true; @@ -354,7 +354,7 @@ const TQColor &kpColor::toQColor () const } // public -TQColor kpColor::maskColor () const +TQColor kpColor::tqmaskColor () const { - return isTransparent () ? Qt::color0 : Qt::color1; + return isTransparent () ? TQt::color0 : TQt::color1; } diff --git a/kolourpaint/kpcolor.h b/kolourpaint/kpcolor.h index 255d645f..ece77e57 100644 --- a/kolourpaint/kpcolor.h +++ b/kolourpaint/kpcolor.h @@ -36,13 +36,13 @@ class TQDataStream; // -// kpColor is an object-oriented abstraction of QRgb, with the additional +// kpColor is an object-oriented abstraction of TQRgb, with the additional // restriction of following the KolourPaint convention of only supporting // totally transparent and totally opaque colors. It also provides better // error handling, reporting (noisy kdError()'s) and recovery. // -// In general, you should pass around kpColor objects instead of QRgb -// and TQColor. Only convert an opaque kpColor to a TQColor (using toQColor()) +// In general, you should pass around kpColor objects instead of TQRgb +// and TQColor. Only convert an opaque kpColor to a TQColor (using toTQColor()) // if you need to draw something onscreen. Constructing a kpColor object // from TQColor is probably wrong since onscreen representations of color // are not guaranteed to be faithful (due to TQColor color allocation). @@ -52,7 +52,7 @@ class kpColor public: kpColor (); kpColor (int red, int green, int blue, bool isTransparent = false); - kpColor (const QRgb &rgba); + kpColor (const TQRgb &rgba); kpColor (const kpColor &rhs); friend TQDataStream &operator<< (TQDataStream &stream, const kpColor &color); friend TQDataStream &operator>> (TQDataStream &stream, kpColor &color); @@ -81,17 +81,17 @@ public: // Cast operators will most likely result in careless conversions so // use explicit functions instead: - QRgb toQRgb () const; + TQRgb toTQRgb () const; // (only valid if isOpaque()) // (const TQColor & return results in fewer color reallocations) - const TQColor &toQColor () const; + const TQColor &toTQColor () const; - TQColor maskColor () const; + TQColor tqmaskColor () const; private: bool m_rgbaIsValid; - QRgb m_rgba; + TQRgb m_rgba; mutable bool m_colorCacheIsValid; mutable TQColor m_colorCache; diff --git a/kolourpaint/kpcommandhistory.cpp b/kolourpaint/kpcommandhistory.cpp index 6849ebf4..d92c43e6 100644 --- a/kolourpaint/kpcommandhistory.cpp +++ b/kolourpaint/kpcommandhistory.cpp @@ -257,13 +257,13 @@ kpCommandHistoryBase::kpCommandHistoryBase (bool doReadConfig, : d (new kpCommandHistoryBasePrivate ()) { m_actionUndo = new KToolBarPopupAction (undoActionText (), - TQString::fromLatin1 ("undo"), + TQString::tqfromLatin1 ("undo"), KStdAccel::shortcut (KStdAccel::Undo), this, TQT_SLOT (undo ()), ac, KStdAction::name (KStdAction::Undo)); m_actionRedo = new KToolBarPopupAction (redoActionText (), - TQString::fromLatin1 ("redo"), + TQString::tqfromLatin1 ("redo"), KStdAccel::shortcut (KStdAccel::Redo), this, TQT_SLOT (redo ()), ac, KStdAction::name (KStdAction::Redo)); @@ -763,7 +763,7 @@ void kpCommandHistoryBase::trimCommandLists () -m_documentRestoredPosition > (int) m_undoCommandList.size ()) { #if DEBUG_KP_COMMAND_HISTORY - kdDebug () << "\t\t\tinvalidate documentRestoredPosition" << endl; + kdDebug () << "\t\t\ttqinvalidate documentRestoredPosition" << endl; #endif m_documentRestoredPosition = INT_MAX; } @@ -911,7 +911,7 @@ void kpCommandHistory::undo () if (m_mainWindow && m_mainWindow->toolHasBegunShape ()) { #if DEBUG_KP_COMMAND_HISTORY - kdDebug () << "\thas begun shape - cancel draw" << endl; + kdDebug () << "\thas begun tqshape - cancel draw" << endl; #endif m_mainWindow->tool ()->cancelShapeInternal (); } @@ -927,8 +927,8 @@ void kpCommandHistory::redo () // Not completely obvious but what else can we do? // // Ignoring the request would not be intuitive for tools like - // Polygon & Polyline (where it's not always apparent to the user - // that s/he's still drawing a shape even though the mouse isn't + // Polygon & Polyline (where it's not always aptqparent to the user + // that s/he's still drawing a tqshape even though the mouse isn't // down). m_mainWindow->tool ()->cancelShapeInternal (); } diff --git a/kolourpaint/kpcommandhistory.h b/kolourpaint/kpcommandhistory.h index c29d68fc..da415663 100644 --- a/kolourpaint/kpcommandhistory.h +++ b/kolourpaint/kpcommandhistory.h @@ -130,9 +130,10 @@ private: // Features not required by KolourPaint (e.g. commandExecuted()) are not // implemented and undo limit == redo limit. So compared to // KCommandHistory, this is only "almost source compatible". -class kpCommandHistoryBase : public QObject +class kpCommandHistoryBase : public TQObject { Q_OBJECT + TQ_OBJECT public: kpCommandHistoryBase (bool doReadConfig, KActionCollection *ac); @@ -221,16 +222,16 @@ private: // Intercepts Undo/Redo requests: // -// If the user is currently drawing a shape, it cancels it. +// If the user is currently drawing a tqshape, it cancels it. // Else it passes on the Undo/Redo request to kpCommandHistoryBase. // // TODO: This is wrong. It won't work if the Undo action is disabled, // for instance. // // Maybe the real solution is to call kpCommandHistoryBase::addCommand() -// as _soon_ as the shape starts - not after it ends. But the +// as _soon_ as the tqshape starts - not after it ends. But the // trouble with this solution is that if the user Undoes/cancels -// the shape s/he's currently drawing, it would replace a Redo +// the tqshape s/he's currently drawing, it would replace a Redo // slot in the history. Arguably you shouldn't be able to Redo // something you never finished drawing. // @@ -238,6 +239,7 @@ private: class kpCommandHistory : public kpCommandHistoryBase { Q_OBJECT + TQ_OBJECT public: kpCommandHistory (bool doReadConfig, kpMainWindow *mainWindow); diff --git a/kolourpaint/kpdefs.h b/kolourpaint/kpdefs.h index a437c2d5..c46ccec9 100644 --- a/kolourpaint/kpdefs.h +++ b/kolourpaint/kpdefs.h @@ -40,7 +40,7 @@ #include <kdeversion.h> -#define KP_IS_QT_3_3 (QT_VERSION >= 0x030300 && 1) +#define KP_IS_TQT_3_3 ([[[TQT_VERSION IS DEPRECATED]]] >= 0x030300 && 1) #define KP_IS_KDE_3_3 ((KDE_VERSION_MAJOR >= 3 && KDE_VERSION_MINOR >= 3) && 1) @@ -65,71 +65,71 @@ // Settings // -#define kpSettingsGroupGeneral TQString::fromLatin1 ("General Settings") -#define kpSettingFirstTime TQString::fromLatin1 ("First Time") -#define kpSettingShowGrid TQString::fromLatin1 ("Show Grid") -#define kpSettingShowPath TQString::fromLatin1 ("Show Path") -#define kpSettingColorSimilarity TQString::fromLatin1 ("Color Similarity") -#define kpSettingDitherOnOpen TQString::fromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than") -#define kpSettingPrintImageCenteredOnPage TQString::fromLatin1 ("Print Image Centered On Page") +#define kpSettingsGroupGeneral TQString::tqfromLatin1 ("General Settings") +#define kpSettingFirstTime TQString::tqfromLatin1 ("First Time") +#define kpSettingShowGrid TQString::tqfromLatin1 ("Show Grid") +#define kpSettingShowPath TQString::tqfromLatin1 ("Show Path") +#define kpSettingColorSimilarity TQString::tqfromLatin1 ("Color Similarity") +#define kpSettingDitherOnOpen TQString::tqfromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than") +#define kpSettingPrintImageCenteredOnPage TQString::tqfromLatin1 ("Print Image Centered On Page") -#define kpSettingsGroupFileSaveAs TQString::fromLatin1 ("File/Save As") -#define kpSettingsGroupFileExport TQString::fromLatin1 ("File/Export") -#define kpSettingsGroupEditCopyTo TQString::fromLatin1 ("Edit/Copy To") +#define kpSettingsGroupFileSaveAs TQString::tqfromLatin1 ("File/Save As") +#define kpSettingsGroupFileExport TQString::tqfromLatin1 ("File/Export") +#define kpSettingsGroupEditCopyTo TQString::tqfromLatin1 ("Edit/Copy To") -#define kpSettingForcedMimeType TQString::fromLatin1 ("Forced MimeType") -#define kpSettingForcedColorDepth TQString::fromLatin1 ("Forced Color Depth") -#define kpSettingForcedDither TQString::fromLatin1 ("Forced Dither") -#define kpSettingForcedQuality TQString::fromLatin1 ("Forced Quality") +#define kpSettingForcedMimeType TQString::tqfromLatin1 ("Forced MimeType") +#define kpSettingForcedColorDepth TQString::tqfromLatin1 ("Forced Color Depth") +#define kpSettingForcedDither TQString::tqfromLatin1 ("Forced Dither") +#define kpSettingForcedQuality TQString::tqfromLatin1 ("Forced Quality") -#define kpSettingLastDocSize TQString::fromLatin1 ("Last Document Size") +#define kpSettingLastDocSize TQString::tqfromLatin1 ("Last Document Size") -#define kpSettingMoreEffectsLastEffect TQString::fromLatin1 ("More Effects - Last Effect") +#define kpSettingMoreEffectsLastEffect TQString::tqfromLatin1 ("More Effects - Last Effect") -#define kpSettingResizeScaleLastKeepAspect TQString::fromLatin1 ("Resize Scale - Last Keep Aspect") +#define kpSettingResizeScaleLastKeepAspect TQString::tqfromLatin1 ("Resize Scale - Last Keep Aspect") -#define kpSettingsGroupMimeTypeProperties TQString::fromLatin1 ("MimeType Properties Version 1.2-2") -#define kpSettingMimeTypeMaximumColorDepth TQString::fromLatin1 ("Maximum Color Depth") -#define kpSettingMimeTypeHasConfigurableColorDepth TQString::fromLatin1 ("Configurable Color Depth") -#define kpSettingMimeTypeHasConfigurableQuality TQString::fromLatin1 ("Configurable Quality Setting") +#define kpSettingsGroupMimeTypeProperties TQString::tqfromLatin1 ("MimeType Properties Version 1.2-2") +#define kpSettingMimeTypeMaximumColorDepth TQString::tqfromLatin1 ("Maximum Color Depth") +#define kpSettingMimeTypeHasConfigurableColorDepth TQString::tqfromLatin1 ("Configurable Color Depth") +#define kpSettingMimeTypeHasConfigurableQuality TQString::tqfromLatin1 ("Configurable Quality Setting") -#define kpSettingsGroupUndoRedo TQString::fromLatin1 ("Undo/Redo Settings") -#define kpSettingUndoMinLimit TQString::fromLatin1 ("Min Limit") -#define kpSettingUndoMaxLimit TQString::fromLatin1 ("Max Limit") -#define kpSettingUndoMaxLimitSizeLimit TQString::fromLatin1 ("Max Limit Size Limit") +#define kpSettingsGroupUndoRedo TQString::tqfromLatin1 ("Undo/Redo Settings") +#define kpSettingUndoMinLimit TQString::tqfromLatin1 ("Min Limit") +#define kpSettingUndoMaxLimit TQString::tqfromLatin1 ("Max Limit") +#define kpSettingUndoMaxLimitSizeLimit TQString::tqfromLatin1 ("Max Limit Size Limit") -#define kpSettingsGroupThumbnail TQString::fromLatin1 ("Thumbnail Settings") -#define kpSettingThumbnailShown TQString::fromLatin1 ("Shown") -#define kpSettingThumbnailGeometry TQString::fromLatin1 ("Geometry") -#define kpSettingThumbnailZoomed TQString::fromLatin1 ("Zoomed") -#define kpSettingThumbnailShowRectangle TQString::fromLatin1 ("ShowRectangle") +#define kpSettingsGroupThumbnail TQString::tqfromLatin1 ("Thumbnail Settings") +#define kpSettingThumbnailShown TQString::tqfromLatin1 ("Shown") +#define kpSettingThumbnailGeometry TQString::tqfromLatin1 ("Geometry") +#define kpSettingThumbnailZoomed TQString::tqfromLatin1 ("Zoomed") +#define kpSettingThumbnailShowRectangle TQString::tqfromLatin1 ("ShowRectangle") -#define kpSettingsGroupPreviewSave TQString::fromLatin1 ("Save Preview Settings") -#define kpSettingPreviewSaveGeometry TQString::fromLatin1 ("Geometry") -#define kpSettingPreviewSaveUpdateDelay TQString::fromLatin1 ("Update Delay") +#define kpSettingsGroupPreviewSave TQString::tqfromLatin1 ("Save Preview Settings") +#define kpSettingPreviewSaveGeometry TQString::tqfromLatin1 ("Geometry") +#define kpSettingPreviewSaveUpdateDelay TQString::tqfromLatin1 ("Update Delay") -#define kpSettingsGroupTools TQString::fromLatin1 ("Tool Settings") -#define kpSettingLastTool TQString::fromLatin1 ("Last Used Tool") -#define kpSettingToolBoxIconSize TQString::fromLatin1 ("Tool Box Icon Size") +#define kpSettingsGroupTools TQString::tqfromLatin1 ("Tool Settings") +#define kpSettingLastTool TQString::tqfromLatin1 ("Last Used Tool") +#define kpSettingToolBoxIconSize TQString::tqfromLatin1 ("Tool Box Icon Size") -#define kpSettingsGroupText TQString::fromLatin1 ("Text Settings") -#define kpSettingFontFamily TQString::fromLatin1 ("Font Family") -#define kpSettingFontSize TQString::fromLatin1 ("Font Size") -#define kpSettingBold TQString::fromLatin1 ("Bold") -#define kpSettingItalic TQString::fromLatin1 ("Italic") -#define kpSettingUnderline TQString::fromLatin1 ("Underline") -#define kpSettingStrikeThru TQString::fromLatin1 ("Strike Thru") +#define kpSettingsGroupText TQString::tqfromLatin1 ("Text Settings") +#define kpSettingFontFamily TQString::tqfromLatin1 ("Font Family") +#define kpSettingFontSize TQString::tqfromLatin1 ("Font Size") +#define kpSettingBold TQString::tqfromLatin1 ("Bold") +#define kpSettingItalic TQString::tqfromLatin1 ("Italic") +#define kpSettingUnderline TQString::tqfromLatin1 ("Underline") +#define kpSettingStrikeThru TQString::tqfromLatin1 ("Strike Thru") -#define kpSettingsGroupFlattenEffect TQString::fromLatin1 ("Flatten Effect Settings") -#define kpSettingFlattenEffectColor1 TQString::fromLatin1 ("Color1") -#define kpSettingFlattenEffectColor2 TQString::fromLatin1 ("Color2") +#define kpSettingsGroupFlattenEffect TQString::tqfromLatin1 ("Flatten Effect Settings") +#define kpSettingFlattenEffectColor1 TQString::tqfromLatin1 ("Color1") +#define kpSettingFlattenEffectColor2 TQString::tqfromLatin1 ("Color2") // @@ -140,11 +140,11 @@ // // This key only exists if the document does. If it exists, it can be empty. // The URL need not point to a file that exists e.g. "kolourpaint doesnotexist.png". -#define kpSessionSettingDocumentUrl TQString::fromLatin1 ("Session Document Url") +#define kpSessionSettingDocumentUrl TQString::tqfromLatin1 ("Session Document Url") // The size of a document which is not from a URL e.g. "kolourpaint doesnotexist.png". // This key does not exist for documents from URLs. -#define kpSessionSettingNotFromUrlDocumentSize TQString::fromLatin1 ("Session Not-From-Url Document Size") +#define kpSessionSettingNotFromUrlDocumentSize TQString::tqfromLatin1 ("Session Not-From-Url Document Size") #endif // __kp_defs_h__ diff --git a/kolourpaint/kpdocument.cpp b/kolourpaint/kpdocument.cpp index aa078c85..2886d077 100644 --- a/kolourpaint/kpdocument.cpp +++ b/kolourpaint/kpdocument.cpp @@ -94,7 +94,7 @@ kpDocument::kpDocument (int w, int h, kpMainWindow *mainWindow) #endif m_pixmap = new TQPixmap (w, h); - m_pixmap->fill (Qt::white); + m_pixmap->fill (TQt::white); } kpDocument::~kpDocument () @@ -156,7 +156,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible ( metaInfo->setDotsPerMeterY (image.dotsPerMeterY ()); metaInfo->setOffset (image.offset ()); - TQValueList <TQImageTextKeyLang> keyList = image.textList (); + TQValueList <TQImageTextKeyLang> keyList = image.tqtextList (); for (TQValueList <TQImageTextKeyLang>::const_iterator it = keyList.begin (); it != keyList.end (); it++) @@ -179,7 +179,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible ( { for (int x = 0; x < image.width (); x++) { - const QRgb rgb = image.pixel (x, y); + const TQRgb rgb = image.pixel (x, y); fprintf (stderr, " %08X", rgb); } fprintf (stderr, "\n"); @@ -204,7 +204,7 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible ( { for (int x = 0; x < image2.width (); x++) { - const QRgb rgb = image2.pixel (x, y); + const TQRgb rgb = image2.pixel (x, y); hash += ((x % 2) + 1) * rgb; if (rgb != image.pixel (x, y)) { @@ -231,12 +231,12 @@ TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible ( // public static TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog, - TQWidget *parent, + TQWidget *tqparent, kpDocumentSaveOptions *saveOptions, kpDocumentMetaInfo *metaInfo) { #if DEBUG_KP_DOCUMENT - kdDebug () << "kpDocument::getPixmapFromFile(" << url << "," << parent << ")" << endl; + kdDebug () << "kpDocument::getPixmapFromFile(" << url << "," << tqparent << ")" << endl; #endif if (saveOptions) @@ -247,11 +247,11 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis TQString tempFile; - if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, parent)) + if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, tqparent)) { if (!suppressDoesntExistDialog) { - KMessageBox::sorry (parent, + KMessageBox::sorry (tqparent, i18n ("Could not open \"%1\".") .arg (kpDocument::prettyFilenameForURL (url))); } @@ -277,7 +277,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis if (detectedMimeType.isEmpty ()) { - KMessageBox::sorry (parent, + KMessageBox::sorry (tqparent, i18n ("Could not open \"%1\" - unknown mimetype.") .arg (kpDocument::prettyFilenameForURL (url))); KIO::NetAccess::removeTempFile (tempFile); @@ -292,7 +292,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis if (image.isNull ()) { - KMessageBox::sorry (parent, + KMessageBox::sorry (tqparent, i18n ("Could not open \"%1\" - unsupported image format.\n" "The file may be corrupt.") .arg (kpDocument::prettyFilenameForURL (url))); @@ -310,7 +310,7 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis " contains translucency which is not fully" " supported. The translucency data will be" - " approximated with a 1-bit transparency mask.") + " approximated with a 1-bit transparency tqmask.") .arg (prettyFilenameForURL (url)), i18n ("The image \"%1\"" " may have more colors than the current screen mode." @@ -320,16 +320,16 @@ TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExis i18n ("The image \"%1\"" " contains translucency which is not fully" " supported. The translucency data will be" - " approximated with a 1-bit transparency mask.") + " approximated with a 1-bit transparency tqmask.") .arg (prettyFilenameForURL (url)), "docOpen", - parent), + tqparent), saveOptions, metaInfo); if (newPixmap.isNull ()) { - KMessageBox::sorry (parent, + KMessageBox::sorry (tqparent, i18n ("Could not open \"%1\" - out of graphics memory.") .arg (kpDocument::prettyFilenameForURL (url))); return TQPixmap (); @@ -352,7 +352,7 @@ void kpDocument::openNew (const KURL &url) kdDebug () << "KpDocument::openNew (" << url << ")" << endl; #endif - m_pixmap->fill (Qt::white); + m_pixmap->fill (TQt::white); setURL (url, false/*not from url*/); *m_saveOptions = kpDocumentSaveOptions (); @@ -446,13 +446,13 @@ bool kpDocument::save (bool overwritePrompt, bool lossyPrompt) // public static bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap, const kpDocumentSaveOptions &saveOptions, - TQWidget *parent) + TQWidget *tqparent) { #if DEBUG_KP_DOCUMENT kdDebug () << "kpDocument::lossyPromptContinue()" << endl; #endif -#define QUIT_IF_CANCEL(messageBoxCommand) \ +#define TQUIT_IF_CANCEL(messageBoxCommand) \ { \ if (messageBoxCommand != KMessageBox::Continue) \ { \ @@ -464,8 +464,8 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap, if (lossyType & (kpDocumentSaveOptions::MimeTypeMaximumColorDepthLow | kpDocumentSaveOptions::Quality)) { - QUIT_IF_CANCEL ( - KMessageBox::warningContinueCancel (parent, + TQUIT_IF_CANCEL ( + KMessageBox::warningContinueCancel (tqparent, i18n ("<qt><p>The <b>%1</b> format may not be able" " to preserve all of the image's color information.</p>" @@ -475,12 +475,12 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap, // low maximum colour depth i18n ("Lossy File Format"), KStdGuiItem::save (), - TQString::fromLatin1 ("SaveInLossyMimeTypeDontAskAgain"))); + TQString::tqfromLatin1 ("SaveInLossyMimeTypeDontAskAgain"))); } else if (lossyType & kpDocumentSaveOptions::ColorDepthLow) { - QUIT_IF_CANCEL ( - KMessageBox::warningContinueCancel (parent, + TQUIT_IF_CANCEL ( + KMessageBox::warningContinueCancel (tqparent, i18n ("<qt><p>Saving the image at the low color depth of %1-bit" " may result in the loss of color information." @@ -490,9 +490,9 @@ bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap, .arg (saveOptions.colorDepth ()), i18n ("Low Color Depth"), KStdGuiItem::save (), - TQString::fromLatin1 ("SaveAtLowColorDepthDontAskAgain"))); + TQString::tqfromLatin1 ("SaveAtLowColorDepthDontAskAgain"))); } -#undef QUIT_IF_CANCEL +#undef TQUIT_IF_CANCEL return true; } @@ -503,7 +503,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, const kpDocumentSaveOptions &saveOptions, const kpDocumentMetaInfo &metaInfo, bool lossyPrompt, - TQWidget *parent, + TQWidget *tqparent, bool *userCancelled) { if (userCancelled) @@ -515,7 +515,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, << " type=" << type << endl; #endif - if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent)) + if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, tqparent)) { if (userCancelled) *userCancelled = true; @@ -529,7 +529,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, TQPixmap pixmapToSave = kpPixmapFX::pixmapWithDefinedTransparentPixels (pixmap, - Qt::white); // CONFIG + TQt::white); // CONFIG TQImage imageToSave = kpPixmapFX::convertToImage (pixmapToSave); @@ -584,7 +584,7 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, if (!imageToSave.save (device, type.latin1 (), quality)) { #if DEBUG_KP_DOCUMENT - kdDebug () << "\tQImage::save() returned false" << endl; + kdDebug () << "\tTQImage::save() returned false" << endl; #endif return false; } @@ -596,16 +596,16 @@ bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap, return true; } -static void CouldNotCreateTemporaryFileDialog (TQWidget *parent) +static void CouldNotCreateTemporaryFileDialog (TQWidget *tqparent) { - KMessageBox::error (parent, + KMessageBox::error (tqparent, i18n ("Could not save image - unable to create temporary file.")); } -static void CouldNotSaveDialog (const KURL &url, TQWidget *parent) +static void CouldNotSaveDialog (const KURL &url, TQWidget *tqparent) { // TODO: use file.errorString() - KMessageBox::error (parent, + KMessageBox::error (tqparent, i18n ("Could not save as \"%1\".") .arg (kpDocument::prettyFilenameForURL (url))); } @@ -617,7 +617,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, const kpDocumentMetaInfo &metaInfo, bool overwritePrompt, bool lossyPrompt, - TQWidget *parent) + TQWidget *tqparent) { // TODO: Use KIO::NetAccess:mostLocalURL() for accessing home:/ (and other // such local URLs) for efficiency and because only local writes @@ -628,17 +628,17 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, << ",overwritePrompt=" << overwritePrompt << ",lossyPrompt=" << lossyPrompt << ")" << endl; - saveOptions.printDebug (TQString::fromLatin1 ("\tsaveOptions")); - metaInfo.printDebug (TQString::fromLatin1 ("\tmetaInfo")); + saveOptions.printDebug (TQString::tqfromLatin1 ("\tsaveOptions")); + metaInfo.printDebug (TQString::tqfromLatin1 ("\tmetaInfo")); #endif - if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, parent)) + if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, tqparent)) { - int result = KMessageBox::warningContinueCancel (parent, + int result = KMessageBox::warningContinueCancel (tqparent, i18n ("A document called \"%1\" already exists.\n" "Do you want to overwrite it?") .arg (prettyFilenameForURL (url)), - TQString::null, + TQString(), i18n ("Overwrite")); if (result != KMessageBox::Continue) @@ -652,7 +652,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, } - if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, parent)) + if (lossyPrompt && !lossyPromptContinue (pixmap, saveOptions, tqparent)) { #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because of lossyPrompt" << endl; @@ -681,15 +681,15 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, kdDebug () << "\treturning false because could not open KSaveFile" << " status=" << atomicFileWriter.status () << endl; #endif - ::CouldNotCreateTemporaryFileDialog (parent); + ::CouldNotCreateTemporaryFileDialog (tqparent); return false; } // Write to local temporary file. - if (!savePixmapToDevice (pixmap, atomicFileWriter.file (), + if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(atomicFileWriter.file ()), saveOptions, metaInfo, false/*no lossy prompt*/, - parent)) + tqparent)) { atomicFileWriter.abort (); @@ -697,7 +697,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, kdDebug () << "\treturning false because could not save pixmap to device" << endl; #endif - ::CouldNotSaveDialog (url, parent); + ::CouldNotSaveDialog (url, tqparent); return false; } @@ -710,7 +710,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, #if DEBUG_KP_DOCUMENT kdDebug () << "\tcould not close KSaveFile" << endl; #endif - ::CouldNotSaveDialog (url, parent); + ::CouldNotSaveDialog (url, tqparent); return false; } } // sync KSaveFile.abort() @@ -729,7 +729,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because tempFile empty" << endl; #endif - ::CouldNotCreateTemporaryFileDialog (parent); + ::CouldNotCreateTemporaryFileDialog (tqparent); return false; } @@ -742,20 +742,20 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, kdDebug () << "\treturning false because can't open file" << " errorString=" << file.errorString () << endl; #endif - ::CouldNotCreateTemporaryFileDialog (parent); + ::CouldNotCreateTemporaryFileDialog (tqparent); return false; } - if (!savePixmapToDevice (pixmap, &file, + if (!savePixmapToDevice (pixmap, TQT_TQIODEVICE(&file), saveOptions, metaInfo, false/*no lossy prompt*/, - parent)) + tqparent)) { #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because could not save pixmap to device" << endl; #endif - ::CouldNotSaveDialog (url, parent); + ::CouldNotSaveDialog (url, tqparent); return false; } } @@ -765,7 +765,7 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because could not close" << endl; #endif - ::CouldNotSaveDialog (url, parent); + ::CouldNotSaveDialog (url, tqparent); return false; } @@ -773,12 +773,12 @@ bool kpDocument::savePixmapToFile (const TQPixmap &pixmap, // TODO: No one seems to know how to do this atomically // [http://lists.kde.org/?l=kde-core-devel&m=117845162728484&w=2]. // At least, fish:// (ssh) is definitely not atomic. - if (!KIO::NetAccess::upload (filename, url, parent)) + if (!KIO::NetAccess::upload (filename, url, tqparent)) { #if DEBUG_KP_DOCUMENT kdDebug () << "\treturning false because could not upload" << endl; #endif - KMessageBox::error (parent, + KMessageBox::error (tqparent, i18n ("Could not save image - failed to upload.")); return false; } @@ -1109,22 +1109,22 @@ void kpDocument::setSelection (const kpSelection &selection) (selection.type () == kpSelection::Text)); // We don't change the Selection Tool if the new selection's - // shape is merely different to the current tool's (e.g. rectangular + // tqshape is merely different to the current tool's (e.g. rectangular // vs elliptical) because: // // 1. All image selection tools support editing selections of all the - // different shapes anyway. + // different tqshapes anyway. // 2. Suppose the user is trying out different drags of selection borders - // and then decides to paste a differently shaped selection before continuing + // and then decides to paste a differently tqshaped selection before continuing // to try out different borders. If the pasting were to switch to - // a differently shaped tool, the borders drawn after the paste would - // be using a new shape rather than the shape before the paste. This + // a differently tqshaped tool, the borders drawn after the paste would + // be using a new tqshape rather than the tqshape before the paste. This // could get irritating so we don't do the switch. // if (m_mainWindow && (!m_mainWindow->toolIsASelectionTool () || isTextChanged)) { - // Switch to the appropriately shaped selection tool + // Switch to the appropriately tqshaped selection tool // _before_ we change the selection // (all selection tool's ::end() functions nuke the current selection) switch (selection.type ()) @@ -1235,7 +1235,7 @@ void kpDocument::setSelection (const kpSelection &selection) } // public -TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const +TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &tqmaskBitmap_) const { kpSelection *sel = selection (); @@ -1259,15 +1259,15 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const } - TQBitmap maskBitmap = maskBitmap_; - if (maskBitmap.isNull () && + TQBitmap tqmaskBitmap = tqmaskBitmap_; + if (tqmaskBitmap.isNull () && !sel->isRectangular ()) { - maskBitmap = sel->maskForOwnType (); + tqmaskBitmap = sel->tqmaskForOwnType (); - if (maskBitmap.isNull ()) + if (tqmaskBitmap.isNull ()) { - kdError () << "kpDocument::getSelectedPixmap() could not get mask" << endl; + kdError () << "kpDocument::getSelectedPixmap() could not get tqmask" << endl; return TQPixmap (); } } @@ -1275,7 +1275,7 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const TQPixmap selPixmap = getPixmapAt (boundingRect); - if (!maskBitmap.isNull ()) + if (!tqmaskBitmap.isNull ()) { // Src Dest = Result // ----------------- @@ -1286,9 +1286,9 @@ TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const TQBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap); bitBlt (&selMaskBitmap, TQPoint (0, 0), - &maskBitmap, - TQRect (0, 0, maskBitmap.width (), maskBitmap.height ()), - Qt::AndROP); + &tqmaskBitmap, + TQRect (0, 0, tqmaskBitmap.width (), tqmaskBitmap.height ()), + TQt::AndROP); selPixmap.setMask (selMaskBitmap); } @@ -1325,17 +1325,17 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor) // - // Figure out mask for non-rectangular selections + // Figure out tqmask for non-rectangular selections // - TQBitmap maskBitmap = sel->maskForOwnType (true/*return null bitmap for rectangular*/); + TQBitmap tqmaskBitmap = sel->tqmaskForOwnType (true/*return null bitmap for rectangular*/); // // Get selection pixmap from document // - TQPixmap selPixmap = getSelectedPixmap (maskBitmap); + TQPixmap selPixmap = getSelectedPixmap (tqmaskBitmap); if (vm) vm->setQueueUpdates (); @@ -1353,10 +1353,10 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor) if (backgroundColor.isOpaque ()) { TQPixmap erasePixmap (boundingRect.width (), boundingRect.height ()); - erasePixmap.fill (backgroundColor.toQColor ()); + erasePixmap.fill (backgroundColor.toTQColor ()); - if (selTransparentPixmap.mask ()) - erasePixmap.setMask (*selTransparentPixmap.mask ()); + if (selTransparentPixmap.tqmask ()) + erasePixmap.setMask (*selTransparentPixmap.tqmask ()); paintPixmapAt (erasePixmap, boundingRect.topLeft ()); } diff --git a/kolourpaint/kpdocument.h b/kolourpaint/kpdocument.h index a0369566..bc11990b 100644 --- a/kolourpaint/kpdocument.h +++ b/kolourpaint/kpdocument.h @@ -52,9 +52,10 @@ class kpMainWindow; class kpSelection; -class kpDocument : public QObject +class kpDocument : public TQObject { Q_OBJECT + TQ_OBJECT public: kpDocument (int w, int h, kpMainWindow *mainWindow); @@ -77,7 +78,7 @@ public: kpDocumentMetaInfo *metaInfo = 0); static TQPixmap getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog, - TQWidget *parent, + TQWidget *tqparent, kpDocumentSaveOptions *saveOptions = 0, kpDocumentMetaInfo *metaInfo = 0); // TODO: fix: open*() should only be called once. @@ -87,13 +88,13 @@ public: static bool lossyPromptContinue (const TQPixmap &pixmap, const kpDocumentSaveOptions &saveOptions, - TQWidget *parent); + TQWidget *tqparent); static bool savePixmapToDevice (const TQPixmap &pixmap, TQIODevice *device, const kpDocumentSaveOptions &saveOptions, const kpDocumentMetaInfo &metaInfo, bool lossyPrompt, - TQWidget *parent, + TQWidget *tqparent, bool *userCancelled = 0); static bool savePixmapToFile (const TQPixmap &pixmap, const KURL &url, @@ -101,7 +102,7 @@ public: const kpDocumentMetaInfo &metaInfo, bool overwritePrompt, bool lossyPrompt, - TQWidget *parent); + TQWidget *tqparent); bool save (bool overwritePrompt = false, bool lossyPrompt = false); bool saveAs (const KURL &url, const kpDocumentSaveOptions &saveOptions, @@ -188,7 +189,7 @@ public: void setSelection (const kpSelection &selection); // TODO: this always returns opaque pixmap - need transparent ver - TQPixmap getSelectedPixmap (const TQBitmap &maskBitmap = TQBitmap ()) const; + TQPixmap getSelectedPixmap (const TQBitmap &tqmaskBitmap = TQBitmap ()) const; bool selectionPullFromDocument (const kpColor &backgroundColor); bool selectionDelete (); diff --git a/kolourpaint/kpdocumentmetainfo.cpp b/kolourpaint/kpdocumentmetainfo.cpp index 36c1dde6..cf5d9987 100644 --- a/kolourpaint/kpdocumentmetainfo.cpp +++ b/kolourpaint/kpdocumentmetainfo.cpp @@ -82,8 +82,8 @@ kpDocumentMetaInfo &kpDocumentMetaInfo::operator= (const kpDocumentMetaInfo &rhs void kpDocumentMetaInfo::printDebug (const TQString &prefix) const { const TQString usedPrefix = !prefix.isEmpty () ? - prefix + TQString::fromLatin1 (":") : - TQString::null; + prefix + TQString::tqfromLatin1 (":") : + TQString(); kdDebug () << usedPrefix << endl; @@ -96,9 +96,9 @@ void kpDocumentMetaInfo::printDebug (const TQString &prefix) const it != keyList.end (); it++) { - kdDebug () << "key=" << (*it).key - << " lang=" << (*it).lang - << " text=" << text (*it) + kdDebug () << "key=" << (*it).key.data() + << " lang=" << (*it).lang.data() + << " text=" << text (*it).data() << endl; } diff --git a/kolourpaint/kpdocumentsaveoptions.cpp b/kolourpaint/kpdocumentsaveoptions.cpp index 5151e739..a5b2988c 100644 --- a/kolourpaint/kpdocumentsaveoptions.cpp +++ b/kolourpaint/kpdocumentsaveoptions.cpp @@ -114,8 +114,8 @@ kpDocumentSaveOptions &kpDocumentSaveOptions::operator= (const kpDocumentSaveOpt void kpDocumentSaveOptions::printDebug (const TQString &prefix) const { const TQString usedPrefix = !prefix.isEmpty () ? - prefix + TQString::fromLatin1 (": ") : - TQString::null; + prefix + TQString::tqfromLatin1 (": ") : + TQString(); kdDebug () << usedPrefix << "mimeType=" << mimeType () @@ -142,7 +142,7 @@ void kpDocumentSaveOptions::setMimeType (const TQString &mimeType) // public static TQString kpDocumentSaveOptions::invalidMimeType () { - return TQString::null; + return TQString(); } // public static @@ -246,7 +246,7 @@ bool kpDocumentSaveOptions::qualityIsInvalid () const TQString kpDocumentSaveOptions::defaultMimeType (KConfigBase *config) { return config->readEntry (kpSettingForcedMimeType, - TQString::fromLatin1 ("image/png")); + TQString::tqfromLatin1 ("image/png")); } // public static @@ -396,7 +396,7 @@ static bool mimeTypeSupportsProperty (const TQString &mimeType, const TQStringList mimeTypeList = mimeTypesSupportingProperty ( property, defaultMimeTypesWithPropertyList); - return mimeTypeList.contains (mimeType); + return mimeTypeList.tqcontains (mimeType); } @@ -445,19 +445,19 @@ int kpDocumentSaveOptions::mimeTypeMaximumColorDepth (const TQString &mimeType) // SYNC: update mime info here // Greyscale actually (unenforced since depth not set to configurable) - defaultList << TQString::fromLatin1 ("image/x-eps:32"); + defaultList << TQString::tqfromLatin1 ("image/x-eps:32"); - defaultList << TQString::fromLatin1 ("image/x-portable-bitmap:1"); + defaultList << TQString::tqfromLatin1 ("image/x-portable-bitmap:1"); // Greyscale actually (unenforced since depth not set to configurable) - defaultList << TQString::fromLatin1 ("image/x-portable-greymap:8"); + defaultList << TQString::tqfromLatin1 ("image/x-portable-greymap:8"); - defaultList << TQString::fromLatin1 ("image/x-xbm:1"); + defaultList << TQString::tqfromLatin1 ("image/x-xbm:1"); const TQStringList mimeTypeList = mimeTypesSupportingProperty ( kpSettingMimeTypeMaximumColorDepth, defaultList); - const TQString mimeTypeColon = mimeType + TQString::fromLatin1 (":"); + const TQString mimeTypeColon = mimeType + TQString::tqfromLatin1 (":"); for (TQStringList::const_iterator it = mimeTypeList.begin (); it != mimeTypeList.end (); it++) @@ -488,16 +488,16 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableColorDepth (const TQString &m TQStringList defaultMimeTypes; // SYNC: update mime info here - defaultMimeTypes << TQString::fromLatin1 ("image/png"); - defaultMimeTypes << TQString::fromLatin1 ("image/x-bmp"); - defaultMimeTypes << TQString::fromLatin1 ("image/x-pcx"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/png"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/x-bmp"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/x-pcx"); - // TODO: Only 1, 24 not 8; Qt only sees 32 but "file" cmd realises + // TODO: Only 1, 24 not 8; TQt only sees 32 but "file" cmd realises // it's either 1 or 24. - defaultMimeTypes << TQString::fromLatin1 ("image/x-rgb"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/x-rgb"); // TODO: Only 8 and 24 - no 1. - defaultMimeTypes << TQString::fromLatin1 ("image/x-xpm"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/x-xpm"); return mimeTypeSupportsProperty (mimeType, kpSettingMimeTypeHasConfigurableColorDepth, @@ -517,8 +517,8 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableQuality (const TQString &mime TQStringList defaultMimeTypes; // SYNC: update mime info here - defaultMimeTypes << TQString::fromLatin1 ("image/jp2"); - defaultMimeTypes << TQString::fromLatin1 ("image/jpeg"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/jp2"); + defaultMimeTypes << TQString::tqfromLatin1 ("image/jpeg"); return mimeTypeSupportsProperty (mimeType, kpSettingMimeTypeHasConfigurableQuality, @@ -545,7 +545,7 @@ int kpDocumentSaveOptions::isLossyForSaving (const TQPixmap &pixmap) const if (mimeTypeHasConfigurableColorDepth () && !colorDepthIsInvalid () /*TODO: prevent*/ && (colorDepth () < pixmap.depth () || - colorDepth () < 32 && pixmap.mask ())) + colorDepth () < 32 && pixmap.tqmask ())) { ret |= ColorDepthLow; } diff --git a/kolourpaint/kpdocumentsaveoptions.h b/kolourpaint/kpdocumentsaveoptions.h index d6279885..22feaaa9 100644 --- a/kolourpaint/kpdocumentsaveoptions.h +++ b/kolourpaint/kpdocumentsaveoptions.h @@ -119,7 +119,7 @@ public: bool mimeTypeHasConfigurableQuality () const; - // TODO: checking for mask loss due to format e.g. BMP + // TODO: checking for tqmask loss due to format e.g. BMP enum LossyType { LossLess = 0, @@ -127,7 +127,7 @@ public: // mimeTypeMaximumColorDepth() < <pixmap>.depth() MimeTypeMaximumColorDepthLow = 1, // i.e. colorDepth() < <pixmap>.depth() || - // colorDepth() < 32 && <pixmap>.mask() + // colorDepth() < 32 && <pixmap>.tqmask() ColorDepthLow = 2, // i.e. mimeTypeHasConfigurableQuality() Quality = 4 diff --git a/kolourpaint/kpdocumentsaveoptionswidget.cpp b/kolourpaint/kpdocumentsaveoptionswidget.cpp index 4847c72d..223bac5a 100644 --- a/kolourpaint/kpdocumentsaveoptionswidget.cpp +++ b/kolourpaint/kpdocumentsaveoptionswidget.cpp @@ -62,15 +62,15 @@ const TQSize kpDocumentSaveOptionsPreviewDialog::s_pixmapLabelMinimumSize (25, 2 kpDocumentSaveOptionsPreviewDialog::kpDocumentSaveOptionsPreviewDialog ( - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TQWidget (parent, name, - Qt::WType_TopLevel | - Qt::WStyle_Customize | - Qt::WStyle_DialogBorder | - Qt::WStyle_Title), + : TQWidget (tqparent, name, + TQt::WType_TopLevel | + TQt::WStyle_Customize | + TQt::WStyle_DialogBorder | + TQt::WStyle_Title), #if 0 -KDialogBase (parent, name, false/*non-modal*/, +KDialogBase (tqparent, name, false/*non-modal*/, i18n ("Save Preview"), 0/*no buttons*/), #endif @@ -94,7 +94,7 @@ KDialogBase (parent, name, false/*non-modal*/, lay->addWidget (m_filePixmapLabel, 0, 0); - lay->addWidget (m_fileSizeLabel, 1, 0, Qt::AlignHCenter); + lay->addWidget (m_fileSizeLabel, 1, 0, TQt::AlignHCenter); lay->setRowStretch (0, 1); @@ -134,7 +134,7 @@ void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const TQPixmap &p const int pixmapSize = kpPixmapFX::pixmapSize (pixmap); const int percent = pixmapSize ? - QMAX (1, fileSize * 100 / pixmapSize) : + TQMAX (1, fileSize * 100 / pixmapSize) : 0; #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET kdDebug () << "kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize()" @@ -173,9 +173,9 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview () if (m_filePixmap) { - int maxNewWidth = QMIN (m_filePixmap->width (), + int maxNewWidth = TQMIN (m_filePixmap->width (), m_filePixmapLabel->width ()), - maxNewHeight = QMIN (m_filePixmap->height (), + maxNewHeight = TQMIN (m_filePixmap->height (), m_filePixmapLabel->height ()); double keepsAspect = kpToolPreviewDialog::aspectScale ( @@ -229,7 +229,7 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDocumentSaveOptionsPreviewDialog::closeEvent (TQCloseEvent *e) { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET @@ -241,7 +241,7 @@ void kpDocumentSaveOptionsPreviewDialog::closeEvent (TQCloseEvent *e) emit finished (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDocumentSaveOptionsPreviewDialog::moveEvent (TQMoveEvent *e) { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET @@ -253,7 +253,7 @@ void kpDocumentSaveOptionsPreviewDialog::moveEvent (TQMoveEvent *e) emit moved (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDocumentSaveOptionsPreviewDialog::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET @@ -270,9 +270,9 @@ kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget ( const TQPixmap &docPixmap, const kpDocumentSaveOptions &saveOptions, const kpDocumentMetaInfo &metaInfo, - TQWidget *parent, const char *name) - : TQWidget (parent, name), - m_visualParent (parent) + TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name), + m_visualParent (tqparent) { init (); setDocumentSaveOptions (saveOptions); @@ -281,9 +281,9 @@ kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget ( } kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget ( - TQWidget *parent, const char *name) - : TQWidget (parent, name), - m_visualParent (parent) + TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name), + m_visualParent (tqparent) { init (); } @@ -320,15 +320,15 @@ void kpDocumentSaveOptionsWidget::init () TQHBoxLayout *lay = new TQHBoxLayout (this, 0/*margin*/, KDialog::spacingHint ()); - lay->addWidget (m_colorDepthLabel, 0/*stretch*/, Qt::AlignLeft); + lay->addWidget (m_colorDepthLabel, 0/*stretch*/, TQt::AlignLeft); lay->addWidget (m_colorDepthCombo, 0/*stretch*/); lay->addWidget (m_colorDepthSpaceWidget, 1/*stretch*/); - lay->addWidget (m_qualityLabel, 0/*stretch*/, Qt::AlignLeft); + lay->addWidget (m_qualityLabel, 0/*stretch*/, TQt::AlignLeft); lay->addWidget (m_qualityInput, 2/*stretch*/); - lay->addWidget (m_previewButton, 0/*stretch*/, Qt::AlignRight); + lay->addWidget (m_previewButton, 0/*stretch*/, TQt::AlignRight); connect (m_colorDepthCombo, TQT_SIGNAL (activated (int)), @@ -704,17 +704,17 @@ void kpDocumentSaveOptionsWidget::setMode (Mode mode) // SYNC: HACK: When changing between color depth and quality widgets, // we change the height of "this", causing the text on the labels // to move but the first instance of the text doesn't get erased. - // Qt bug. - TQTimer::singleShot (0, this, TQT_SLOT (repaintLabels ())); + // TQt bug. + TQTimer::singleShot (0, this, TQT_SLOT (tqrepaintLabels ())); } // protected slot -void kpDocumentSaveOptionsWidget::repaintLabels () +void kpDocumentSaveOptionsWidget::tqrepaintLabels () { if (mode () != Quality) - m_colorDepthLabel->repaint (); + m_colorDepthLabel->tqrepaint (); if (mode () == Quality) - m_qualityLabel->repaint (); + m_qualityLabel->tqrepaint (); } @@ -767,7 +767,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes) if (m_previewDialogLastRelativeGeometry.isEmpty ()) { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET - kdDebug () << "\tread cfg preview dialog last rel geometry" << endl; + kdDebug () << "\tread cfg preview dialog last rel tqgeometry" << endl; #endif KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave); KConfigBase *cfg = cfgGroupSaver.config (); @@ -826,7 +826,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes) #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET - kdDebug () << "\tgeometry after show=" + kdDebug () << "\ttqgeometry after show=" << TQRect (m_previewDialog->x (), m_previewDialog->y (), m_previewDialog->width (), m_previewDialog->height ()) << endl; @@ -852,9 +852,9 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes) cfg->sync (); #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET - kdDebug () << "\tsaving preview geometry " + kdDebug () << "\tsaving preview tqgeometry " << m_previewDialogLastRelativeGeometry - << " (Qt would have us believe " + << " (TQt would have us believe " << kpWidgetMapper::fromGlobal (m_visualParent, TQRect (m_previewDialog->x (), m_previewDialog->y (), m_previewDialog->width (), m_previewDialog->height ())) @@ -891,14 +891,14 @@ void kpDocumentSaveOptionsWidget::updatePreview () m_updatePreviewTimer->stop (); - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQByteArray data; TQBuffer buffer (data); buffer.open (IO_WriteOnly); kpDocument::savePixmapToDevice (*m_documentPixmap, - &buffer, + TQT_TQIODEVICE(&buffer), documentSaveOptions (), m_documentMetaInfo, false/*no lossy prompt*/, @@ -942,7 +942,7 @@ void kpDocumentSaveOptionsWidget::updatePreviewDialogLastRelativeGeometry () else { #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET - kdDebug () << "\tnot visible - ignoring geometry" << endl; + kdDebug () << "\tnot visible - ignoring tqgeometry" << endl; #endif } } diff --git a/kolourpaint/kpdocumentsaveoptionswidget.h b/kolourpaint/kpdocumentsaveoptionswidget.h index 1aeb8cb1..a01e8784 100644 --- a/kolourpaint/kpdocumentsaveoptionswidget.h +++ b/kolourpaint/kpdocumentsaveoptionswidget.h @@ -41,12 +41,13 @@ class TQLabel; class kpResizeSignallingLabel; -class kpDocumentSaveOptionsPreviewDialog : public QWidget +class kpDocumentSaveOptionsPreviewDialog : public TQWidget { Q_OBJECT + TQ_OBJECT public: - kpDocumentSaveOptionsPreviewDialog (TQWidget *parent, const char *name = 0); + kpDocumentSaveOptionsPreviewDialog (TQWidget *tqparent, const char *name = 0); virtual ~kpDocumentSaveOptionsPreviewDialog (); TQSize preferredMinimumSize () const; @@ -92,16 +93,17 @@ class KIntNumInput; class KPushButton; -class kpDocumentSaveOptionsWidget : public QWidget +class kpDocumentSaveOptionsWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: kpDocumentSaveOptionsWidget (const TQPixmap &docPixmap, const kpDocumentSaveOptions &saveOptions, const kpDocumentMetaInfo &metaInfo, - TQWidget *parent, const char *name = 0); - kpDocumentSaveOptionsWidget (TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); + kpDocumentSaveOptionsWidget (TQWidget *tqparent, const char *name = 0); private: void init (); public: @@ -159,7 +161,7 @@ protected: void setMode (Mode mode); protected slots: - void repaintLabels (); + void tqrepaintLabels (); protected slots: diff --git a/kolourpaint/kpmainwindow.cpp b/kolourpaint/kpmainwindow.cpp index 9e760c2c..c600d36b 100644 --- a/kolourpaint/kpmainwindow.cpp +++ b/kolourpaint/kpmainwindow.cpp @@ -64,7 +64,7 @@ kpMainWindow::kpMainWindow () - : KMainWindow (0/*parent*/, "mainWindow"), + : KMainWindow (0/*tqparent*/, "mainWindow"), m_isFullyConstructed (false) { init (); @@ -74,7 +74,7 @@ kpMainWindow::kpMainWindow () } kpMainWindow::kpMainWindow (const KURL &url) - : KMainWindow (0/*parent*/, "mainWindow"), + : KMainWindow (0/*tqparent*/, "mainWindow"), m_isFullyConstructed (false) { init (); @@ -84,7 +84,7 @@ kpMainWindow::kpMainWindow (const KURL &url) } kpMainWindow::kpMainWindow (kpDocument *newDoc) - : KMainWindow (0/*parent*/, "mainWindow"), + : KMainWindow (0/*tqparent*/, "mainWindow"), m_isFullyConstructed (false) { init (); @@ -157,7 +157,7 @@ void kpMainWindow::readThumbnailSettings () #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\t\tThumbnail Settings: shown=" << m_configThumbnailShown - << " geometry=" << m_configThumbnailGeometry + << " tqgeometry=" << m_configThumbnailGeometry << " zoomed=" << m_configZoomedThumbnail << " showRectangle=" << d->m_configThumbnailShowRectangle << endl; @@ -658,11 +658,11 @@ void kpMainWindow::setDocument (kpDocument *newDoc) if (!m_lastCopyToURL.isEmpty ()) - m_lastCopyToURL.setFileName (TQString::null); + m_lastCopyToURL.setFileName (TQString()); m_copyToFirstTime = true; if (!m_lastExportURL.isEmpty ()) - m_lastExportURL.setFileName (TQString::null); + m_lastExportURL.setFileName (TQString()); m_exportFirstTime = true; @@ -731,7 +731,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc) connect (m_document, TQT_SIGNAL (selectionIsTextChanged (bool)), this, TQT_SLOT (slotImageMenuUpdateDueToSelection ())); - // Status bar + // tqStatus bar connect (m_document, TQT_SIGNAL (documentOpened ()), this, TQT_SLOT (recalculateStatusBar ())); @@ -808,7 +808,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc) #endif slotCreateThumbnail (); } - // this' geometry is weird ATM + // this' tqgeometry is weird ATM else { #if DEBUG_KP_MAIN_WINDOW @@ -855,7 +855,7 @@ bool kpMainWindow::queryClose () i18n ("The document \"%1\" has been modified.\n" "Do you want to save it?") .arg (m_document->prettyFilename ()), - TQString::null/*caption*/, + TQString()/*caption*/, KStdGuiItem::save (), KStdGuiItem::discard ()); switch (result) @@ -870,7 +870,7 @@ bool kpMainWindow::queryClose () } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpMainWindow::dragEnterEvent (TQDragEnterEvent *e) { e->accept (kpSelectionDrag::canDecode (e) || @@ -878,7 +878,7 @@ void kpMainWindow::dragEnterEvent (TQDragEnterEvent *e) TQTextDrag::canDecode (e)); } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpMainWindow::dropEvent (TQDropEvent *e) { #if DEBUG_KP_MAIN_WINDOW @@ -939,7 +939,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e) #endif if (m_thumbnailView && kpWidgetMapper::toGlobal (m_thumbnailView, m_thumbnailView->rect ()) - .contains (globalPos)) + .tqcontains (globalPos)) { // TODO: Code will never get executed. // Thumbnail doesn't accept drops. @@ -947,13 +947,13 @@ void kpMainWindow::dropEvent (TQDropEvent *e) } else if (m_mainView && kpWidgetMapper::toGlobal (m_mainView, m_mainView->rect ()) - .contains (globalPos) && + .tqcontains (globalPos) && m_scrollView && kpWidgetMapper::toGlobal (m_scrollView, TQRect (0, 0, m_scrollView->visibleWidth (), m_scrollView->visibleHeight ())) - .contains (globalPos)) + .tqcontains (globalPos)) { view = m_mainView; } @@ -967,7 +967,7 @@ void kpMainWindow::dropEvent (TQDropEvent *e) // viewUnderCursor() is hacky and can return a view when we aren't // over one thanks to drags. - if (m_document && m_document->rect ().contains (docPoint)) + if (m_document && m_document->rect ().tqcontains (docPoint)) { selTopLeft = docPoint; @@ -1021,7 +1021,7 @@ void kpMainWindow::slotScrollViewAfterScroll () } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpMainWindow::moveEvent (TQMoveEvent * /*e*/) { if (m_thumbnail) @@ -1045,7 +1045,7 @@ void kpMainWindow::slotUpdateCaption () } else { - setCaption (TQString::null, false); + setCaption (TQString(), false); } } diff --git a/kolourpaint/kpmainwindow.h b/kolourpaint/kpmainwindow.h index abc5434b..bd0df32b 100644 --- a/kolourpaint/kpmainwindow.h +++ b/kolourpaint/kpmainwindow.h @@ -88,6 +88,7 @@ class kpZoomedView; class kpMainWindow : public KMainWindow { Q_OBJECT + TQ_OBJECT public: // Opens a new window with a blank document. @@ -639,7 +640,7 @@ private slots: /* - * Status Bar + * tqStatus Bar */ private: @@ -665,7 +666,7 @@ private: void createStatusBar (); private slots: - void setStatusBarMessage (const TQString &message = TQString::null); + void setStatusBarMessage (const TQString &message = TQString()); void setStatusBarShapePoints (const TQPoint &startPoint = KP_INVALID_POINT, const TQPoint &endPoint = KP_INVALID_POINT); void setStatusBarShapeSize (const TQSize &size = KP_INVALID_SIZE); diff --git a/kolourpaint/kpmainwindow_edit.cpp b/kolourpaint/kpmainwindow_edit.cpp index 1dfdb3fd..103b6e11 100644 --- a/kolourpaint/kpmainwindow_edit.cpp +++ b/kolourpaint/kpmainwindow_edit.cpp @@ -72,7 +72,7 @@ kpPixmapFX::WarnAboutLossInfo kpMainWindow::pasteWarnAboutLossInfo () " contains translucency which is not fully" " supported. The translucency data will be" - " approximated with a 1-bit transparency mask."), + " approximated with a 1-bit transparency tqmask."), i18n ("The image to be pasted" " may have more colors than the current screen mode." " In order to display it, some colors may be changed." @@ -80,7 +80,7 @@ kpPixmapFX::WarnAboutLossInfo kpMainWindow::pasteWarnAboutLossInfo () i18n ("The image to be pasted" " contains translucency which is not fully" " supported. The translucency data will be" - " approximated with a 1-bit transparency mask."), + " approximated with a 1-bit transparency tqmask."), "paste", this); } @@ -103,25 +103,25 @@ void kpMainWindow::setupEditMenuActions () } - m_actionCut = KStdAction::cut (this, TQT_SLOT (slotCut ()), ac); - m_actionCopy = KStdAction::copy (this, TQT_SLOT (slotCopy ()), ac); - m_actionPaste = KStdAction::paste (this, TQT_SLOT (slotPaste ()), ac); + m_actionCut = KStdAction::cut (TQT_TQOBJECT(this), TQT_SLOT (slotCut ()), ac); + m_actionCopy = KStdAction::copy (TQT_TQOBJECT(this), TQT_SLOT (slotCopy ()), ac); + m_actionPaste = KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT (slotPaste ()), ac); m_actionPasteInNewWindow = new KAction (i18n ("Paste in &New Window"), - Qt::CTRL + Qt::SHIFT + Qt::Key_V, - this, TQT_SLOT (slotPasteInNewWindow ()), ac, "edit_paste_in_new_window"); + TQt::CTRL + TQt::SHIFT + TQt::Key_V, + TQT_TQOBJECT(this), TQT_SLOT (slotPasteInNewWindow ()), ac, "edit_paste_in_new_window"); //m_actionDelete = KStdAction::clear (this, TQT_SLOT (slotDelete ()), ac); m_actionDelete = new KAction (i18n ("&Delete Selection"), 0, - this, TQT_SLOT (slotDelete ()), ac, "edit_clear"); + TQT_TQOBJECT(this), TQT_SLOT (slotDelete ()), ac, "edit_clear"); - m_actionSelectAll = KStdAction::selectAll (this, TQT_SLOT (slotSelectAll ()), ac); - m_actionDeselect = KStdAction::deselect (this, TQT_SLOT (slotDeselect ()), ac); + m_actionSelectAll = KStdAction::selectAll (TQT_TQOBJECT(this), TQT_SLOT (slotSelectAll ()), ac); + m_actionDeselect = KStdAction::deselect (TQT_TQOBJECT(this), TQT_SLOT (slotDeselect ()), ac); m_actionCopyToFile = new KAction (i18n ("C&opy to File..."), 0, - this, TQT_SLOT (slotCopyToFile ()), ac, "edit_copy_to_file"); + TQT_TQOBJECT(this), TQT_SLOT (slotCopyToFile ()), ac, "edit_copy_to_file"); m_actionPasteFromFile = new KAction (i18n ("Paste &From File..."), 0, - this, TQT_SLOT (slotPasteFromFile ()), ac, "edit_paste_from_file"); + TQT_TQOBJECT(this), TQT_SLOT (slotPasteFromFile ()), ac, "edit_paste_from_file"); m_editMenuDocumentActionsEnabled = false; @@ -129,8 +129,8 @@ void kpMainWindow::setupEditMenuActions () // Paste should always be enabled, as long as there is something paste // (independent of whether we have a document or not) - connect (TQApplication::clipboard (), TQT_SIGNAL (dataChanged ()), - this, TQT_SLOT (slotEnablePaste ())); + connect (TQApplication::tqclipboard (), TQT_SIGNAL (dataChanged ()), + TQT_TQOBJECT(this), TQT_SLOT (slotEnablePaste ())); slotEnablePaste (); } @@ -180,7 +180,7 @@ void kpMainWindow::slotCut () } - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); @@ -208,14 +208,14 @@ void kpMainWindow::slotCopy () } - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); kpSelection sel = *m_document->selection (); // Transparency doesn't get sent across the aether so nuke it now - // so that transparency mask doesn't get needlessly recalculated + // so that transparency tqmask doesn't get needlessly recalculated // if we ever call sel.setPixmap(). sel.setTransparency (kpSelectionTransparency ()); @@ -223,8 +223,8 @@ void kpMainWindow::slotCopy () { if (!sel.text ().isEmpty ()) { - TQApplication::clipboard ()->setData (new TQTextDrag (sel.text ()), - QClipboard::Clipboard); + TQApplication::tqclipboard ()->setData (new TQTextDrag (sel.text ()), + TQClipboard::Clipboard); // SYNC: Normally, users highlight text and press CTRL+C. // Highlighting text copies it to the X11 "middle @@ -238,13 +238,13 @@ void kpMainWindow::slotCopy () // as no one ever middle-mouse-pastes images. // // Note that we don't share the TQTextDrag pointer with - // the above in case Qt doesn't expect it. + // the above in case TQt doesn't expect it. // // Once we change KolourPaint to support highlighted text // and CTRL+C to copy only the highlighted text, delete // this code. - TQApplication::clipboard ()->setData (new TQTextDrag (sel.text ()), - QClipboard::Selection); + TQApplication::tqclipboard ()->setData (new TQTextDrag (sel.text ()), + TQClipboard::Selection); } } else @@ -256,20 +256,20 @@ void kpMainWindow::slotCopy () else rawPixmap = m_document->getSelectedPixmap (); - // Some apps, such as OpenOffice.org 2.0.4, ignore the image mask + // Some apps, such as OpenOffice.org 2.0.4, ignore the image tqmask // when pasting. For transparent pixels, the uninitialized RGB // values are used. Fix this by initializing those values to a // neutral color -- white. // - // Strangely enough, OpenOffice.org respects the mask when inserting + // Strangely enough, OpenOffice.org respects the tqmask when inserting // an image from a file, as opposed to pasting one from the clipboard. sel.setPixmap ( kpPixmapFX::pixmapWithDefinedTransparentPixels ( rawPixmap, - Qt::white)); // CONFIG + TQt::white)); // CONFIG - TQApplication::clipboard ()->setData (new kpSelectionDrag (sel), - QClipboard::Clipboard); + TQApplication::tqclipboard ()->setData (new kpSelectionDrag (sel), + TQClipboard::Clipboard); } TQApplication::restoreOverrideCursor (); @@ -288,7 +288,7 @@ static bool HasSomethingToPaste (kpMainWindow *mw) bool hasSomething = false; - TQMimeSource *ms = TQApplication::clipboard ()->data (QClipboard::Clipboard); + TQMimeSource *ms = TQApplication::tqclipboard ()->data (TQClipboard::Clipboard); if (ms) { // It's faster to test for TQTextDrag::canDecode() first due to the @@ -311,7 +311,7 @@ static bool HasSomethingToPaste (kpMainWindow *mw) return hasSomething; } -// HACK: SYNC: Non-Qt apps do not cause TQApplication::clipboard() to +// HACK: SYNC: Non-TQt apps do not cause TQApplication::tqtqclipboard() to // emit dataChanged(). We don't want to have our paste // action disabled when we can actually paste something. // @@ -332,7 +332,7 @@ static bool HasSomethingToPasteWithDialogIfNot (kpMainWindow *mw) #if 1 (void) mw; #else - TQApplication::setOverrideCursor (Qt::arrowCursor); + TQApplication::setOverrideCursor (TQt::arrowCursor); KMessageBox::sorry (mw, STRING_FREEZE_i18n ("<qt><p>There is nothing in the clipboard to paste.</p></qt>"), @@ -428,7 +428,7 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft) return; } - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); @@ -482,8 +482,8 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft) m_commandHistory->addCommand ( new kpToolResizeScaleCommand ( false/*act on doc, not sel*/, - QMAX (sel.width (), m_document->width ()), - QMAX (sel.height (), m_document->height ()), + TQMAX (sel.width (), m_document->width ()), + TQMAX (sel.height (), m_document->height ()), kpToolResizeScaleCommand::Resize, this)); } @@ -509,18 +509,18 @@ void kpMainWindow::pasteText (const TQString &text, // sync: restoreOverrideCursor() in all exit paths - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); - TQValueVector <TQString> textLines (1, TQString::null); + TQValueVector <TQString> textLines (1, TQString()); for (int i = 0; i < (int) text.length (); i++) { if (text [i] == '\n') - textLines.push_back (TQString::null); + textLines.push_back (TQString()); else textLines [textLines.size () - 1].append (text [i]); } @@ -544,7 +544,7 @@ void kpMainWindow::pasteText (const TQString &text, { macroCmd->addCommand ( new kpToolTextEnterCommand ( - TQString::null/*uninteresting child of macroCmd*/, + TQString()/*uninteresting child of macroCmd*/, m_viewManager->textCursorRow (), m_viewManager->textCursorCol (), this)); @@ -552,7 +552,7 @@ void kpMainWindow::pasteText (const TQString &text, macroCmd->addCommand ( new kpToolTextInsertCommand ( - TQString::null/*uninteresting child of macroCmd*/, + TQString()/*uninteresting child of macroCmd*/, m_viewManager->textCursorRow (), m_viewManager->textCursorCol (), textLines [i], @@ -585,9 +585,9 @@ void kpMainWindow::pasteText (const TQString &text, } - const int selWidth = QMAX (kpSelection::minimumWidthForTextStyle (ts), + const int selWidth = TQMAX (kpSelection::minimumWidthForTextStyle (ts), width + kpSelection::textBorderSize () * 2); - const int selHeight = QMAX (kpSelection::minimumHeightForTextStyle (ts), + const int selHeight = TQMAX (kpSelection::minimumHeightForTextStyle (ts), height + kpSelection::textBorderSize () * 2); kpSelection sel (TQRect (0, 0, selWidth, selHeight), textLines, @@ -620,7 +620,7 @@ void kpMainWindow::pasteTextAt (const TQString &text, const TQPoint &point, << ")" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); @@ -666,7 +666,7 @@ void kpMainWindow::slotPaste () #endif // sync: restoreOverrideCursor() in all exit paths - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); @@ -683,7 +683,7 @@ void kpMainWindow::slotPaste () // Acquire the pixmap // - TQMimeSource *ms = TQApplication::clipboard ()->data (QClipboard::Clipboard); + TQMimeSource *ms = TQApplication::tqclipboard ()->data (TQClipboard::Clipboard); if (!ms) { kdError () << "kpMainWindow::slotPaste() without mimeSource" << endl; @@ -763,7 +763,7 @@ void kpMainWindow::slotPasteInNewWindow () #endif // sync: restoreOverrideCursor() in all exit paths - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (toolHasBegunShape ()) tool ()->endShapeInternal (); diff --git a/kolourpaint/kpmainwindow_file.cpp b/kolourpaint/kpmainwindow_file.cpp index a3a10433..caf7a75d 100644 --- a/kolourpaint/kpmainwindow_file.cpp +++ b/kolourpaint/kpmainwindow_file.cpp @@ -67,41 +67,41 @@ void kpMainWindow::setupFileMenuActions () #endif KActionCollection *ac = actionCollection (); - m_actionNew = KStdAction::openNew (this, TQT_SLOT (slotNew ()), ac); - m_actionOpen = KStdAction::open (this, TQT_SLOT (slotOpen ()), ac); + m_actionNew = KStdAction::openNew (TQT_TQOBJECT(this), TQT_SLOT (slotNew ()), ac); + m_actionOpen = KStdAction::open (TQT_TQOBJECT(this), TQT_SLOT (slotOpen ()), ac); - m_actionOpenRecent = KStdAction::openRecent (this, TQT_SLOT (slotOpenRecent (const KURL &)), ac); + m_actionOpenRecent = KStdAction::openRecent (TQT_TQOBJECT(this), TQT_SLOT (slotOpenRecent (const KURL &)), ac); m_actionOpenRecent->loadEntries (kapp->config ()); #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\trecent URLs=" << m_actionOpenRecent->items () << endl; #endif - m_actionSave = KStdAction::save (this, TQT_SLOT (slotSave ()), ac); - m_actionSaveAs = KStdAction::saveAs (this, TQT_SLOT (slotSaveAs ()), ac); + m_actionSave = KStdAction::save (TQT_TQOBJECT(this), TQT_SLOT (slotSave ()), ac); + m_actionSaveAs = KStdAction::saveAs (TQT_TQOBJECT(this), TQT_SLOT (slotSaveAs ()), ac); m_actionExport = new KAction (i18n ("E&xport..."), 0, - this, TQT_SLOT (slotExport ()), ac, "file_export"); + TQT_TQOBJECT(this), TQT_SLOT (slotExport ()), ac, "file_export"); m_actionScan = new KAction (i18n ("Scan..."), SmallIcon ("scanner"), 0, - this, TQT_SLOT (slotScan ()), ac, "file_scan"); + TQT_TQOBJECT(this), TQT_SLOT (slotScan ()), ac, "file_scan"); //m_actionRevert = KStdAction::revert (this, TQT_SLOT (slotRevert ()), ac); m_actionReload = new KAction (i18n ("Reloa&d"), KStdAccel::reload (), - this, TQT_SLOT (slotReload ()), ac, "file_revert"); + TQT_TQOBJECT(this), TQT_SLOT (slotReload ()), ac, "file_revert"); slotEnableReload (); - m_actionPrint = KStdAction::print (this, TQT_SLOT (slotPrint ()), ac); - m_actionPrintPreview = KStdAction::printPreview (this, TQT_SLOT (slotPrintPreview ()), ac); + m_actionPrint = KStdAction::print (TQT_TQOBJECT(this), TQT_SLOT (slotPrint ()), ac); + m_actionPrintPreview = KStdAction::printPreview (TQT_TQOBJECT(this), TQT_SLOT (slotPrintPreview ()), ac); - m_actionMail = KStdAction::mail (this, TQT_SLOT (slotMail ()), ac); + m_actionMail = KStdAction::mail (TQT_TQOBJECT(this), TQT_SLOT (slotMail ()), ac); m_actionSetAsWallpaperCentered = new KAction (i18n ("Set as Wa&llpaper (Centered)"), 0, - this, TQT_SLOT (slotSetAsWallpaperCentered ()), ac, "file_set_as_wallpaper_centered"); + TQT_TQOBJECT(this), TQT_SLOT (slotSetAsWallpaperCentered ()), ac, "file_set_as_wallpaper_centered"); m_actionSetAsWallpaperTiled = new KAction (i18n ("Set as Wallpaper (&Tiled)"), 0, - this, TQT_SLOT (slotSetAsWallpaperTiled ()), ac, "file_set_as_wallpaper_tiled"); + TQT_TQOBJECT(this), TQT_SLOT (slotSetAsWallpaperTiled ()), ac, "file_set_as_wallpaper_tiled"); - m_actionClose = KStdAction::close (this, TQT_SLOT (slotClose ()), ac); - m_actionQuit = KStdAction::quit (this, TQT_SLOT (slotQuit ()), ac); + m_actionClose = KStdAction::close (TQT_TQOBJECT(this), TQT_SLOT (slotClose ()), ac); + m_actionQuit = KStdAction::quit (TQT_TQOBJECT(this), TQT_SLOT (slotQuit ()), ac); m_scanDialog = 0; @@ -247,8 +247,8 @@ TQSize kpMainWindow::defaultDocSize () const { // Don't get too big or you'll thrash (or even lock up) the computer // just by opening a window - docSize = TQSize (QMIN (2048, docSize.width ()), - QMIN (2048, docSize.height ())); + docSize = TQSize (TQMIN (2048, docSize.width ()), + TQMIN (2048, docSize.height ())); } return docSize; @@ -370,7 +370,7 @@ void kpMainWindow::slotOpen () const KURL::List urls = askForOpenURLs (i18n ("Open Image"), - m_document ? m_document->url ().url () : TQString::null); + m_document ? m_document->url ().url () : TQString()); for (KURL::List::const_iterator it = urls.begin (); it != urls.end (); @@ -548,7 +548,7 @@ bool kpMainWindow::save (bool localOnly) { if (m_document->url ().isEmpty () || KImageIO::mimeTypes (KImageIO::Writing) - .findIndex (m_document->saveOptions ()->mimeType ()) < 0 || + .tqfindIndex (m_document->saveOptions ()->mimeType ()) < 0 || // SYNC: kpDocument::getPixmapFromFile() can't determine quality // from file so it has been set initially to an invalid value. (m_document->saveOptions ()->mimeTypeHasConfigurableQuality () && @@ -639,7 +639,7 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption, } #define MIME_TYPE_IS_VALID() (!fdSaveOptions.mimeTypeIsInvalid () && \ - mimeTypes.findIndex (fdSaveOptions.mimeType ()) >= 0) + mimeTypes.tqfindIndex (fdSaveOptions.mimeType ()) >= 0) if (!MIME_TYPE_IS_VALID ()) { #if DEBUG_KP_MAIN_WINDOW @@ -658,9 +658,9 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption, kdDebug () << "\tmimeType=" << fdSaveOptions.mimeType () << " not valid, get hardcoded" << endl; #endif - if (mimeTypes.findIndex ("image/png") > -1) + if (mimeTypes.tqfindIndex ("image/png") > -1) fdSaveOptions.setMimeType ("image/png"); - else if (mimeTypes.findIndex ("image/x-bmp") > -1) + else if (mimeTypes.tqfindIndex ("image/x-bmp") > -1) fdSaveOptions.setMimeType ("image/x-bmp"); else fdSaveOptions.setMimeType (mimeTypes.first ()); @@ -692,7 +692,7 @@ KURL kpMainWindow::askForSaveURL (const TQString &caption, docMetaInfo, this); - KFileDialog fd (startURL, TQString::null, this, "fd", true/*modal*/, + KFileDialog fd (startURL, TQString(), this, "fd", true/*modal*/, saveOptionsWidget); saveOptionsWidget->setVisualParent (&fd); fd.setCaption (caption); @@ -898,7 +898,7 @@ bool kpMainWindow::slotReload () "Reloading will lose all changes since you last saved it.\n" "Are you sure?") .arg (m_document->prettyFilename ()), - TQString::null/*caption*/, + TQString()/*caption*/, i18n ("&Reload")); } else @@ -908,7 +908,7 @@ bool kpMainWindow::slotReload () "Reloading will lose all changes.\n" "Are you sure?") .arg (m_document->prettyFilename ()), - TQString::null/*caption*/, + TQString()/*caption*/, i18n ("&Reload")); } @@ -964,7 +964,7 @@ void kpMainWindow::sendFilenameToPrinter (KPrinter *printer) int dot; TQString fileName = url.fileName (); - dot = fileName.findRev ('.'); + dot = fileName.tqfindRev ('.'); // file.ext but not .hidden-file? if (dot > 0) @@ -1045,7 +1045,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, #endif // Image DPI invalid (e.g. new image, could not read from file - // or Qt3 doesn't implement DPI for JPEG)? + // or TQt3 doesn't implement DPI for JPEG)? if (pixmapDotsPerMeterX < 1 || pixmapDotsPerMeterY < 1) { // Even if just one DPI dimension is invalid, mutate both DPI @@ -1113,7 +1113,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, / dpiX; const double scaleDpiY = (pixmap.height () / (printerHeightMM / 25.4)) / dpiY; - const double scaleDpi = QMAX (scaleDpiX, scaleDpiY); + const double scaleDpi = TQMAX (scaleDpiX, scaleDpiY); #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\t\tscaleDpi: x=" << scaleDpiX << " y=" << scaleDpiY << " --> scale at " << scaleDpi << " to fit?" @@ -1145,7 +1145,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, #endif kpPixmapFX::scale (&pixmap, pixmap.width (), - QMAX (1, qRound (pixmap.height () * dpiX / dpiY)), + TQMAX (1, tqRound (pixmap.height () * dpiX / dpiY)), false/*don't antialias*/); dpiY = dpiX; @@ -1157,7 +1157,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, << dpiY << endl; #endif kpPixmapFX::scale (&pixmap, - QMAX (1, qRound (pixmap.width () * dpiY / dpiX)), + TQMAX (1, tqRound (pixmap.width () * dpiY / dpiX)), pixmap.height (), false/*don't antialias*/); @@ -1167,7 +1167,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, // ASSERT: dpiX == dpiY // TQPrinter::setResolution() has to be called before TQPrinter::setup(). - printer->setResolution (QMAX (1, qRound (dpiX))); + printer->setResolution (TQMAX (1, tqRound (dpiX))); double originX = 0, originY = 0; @@ -1199,7 +1199,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer, // Send pixmap to printer. TQPainter painter; painter.begin (printer); - painter.drawPixmap (qRound (originX), qRound (originY), pixmap); + painter.drawPixmap (tqRound (originX), tqRound (originY), pixmap); painter.end (); } @@ -1224,7 +1224,7 @@ void kpMainWindow::slotPrintPreview () // TODO: get it to reflect default printer's settings KPrinter printer (false/*separate settings from ordinary printer*/); - // TODO: pass "this" as parent + // TODO: pass "this" as tqparent printer.setPreviewOnly (true); sendPixmapToPrinter (&printer, false/*don't showPrinterSetupDialog*/); @@ -1244,7 +1244,7 @@ void kpMainWindow::slotMail () int result = KMessageBox::questionYesNo (this, i18n ("You must save this image before sending it.\n" "Do you want to save it?"), - TQString::null, + TQString(), KStdGuiItem::save (), KStdGuiItem::cancel ()); if (result == KMessageBox::Yes) @@ -1263,12 +1263,12 @@ void kpMainWindow::slotMail () } kapp->invokeMailer ( - TQString::null/*to*/, - TQString::null/*cc*/, - TQString::null/*bcc*/, + TQString()/*to*/, + TQString()/*cc*/, + TQString()/*bcc*/, m_document->prettyFilename()/*subject*/, - TQString::null/*body*/, - TQString::null/*messageFile*/, + TQString()/*body*/, + TQString()/*messageFile*/, TQStringList (m_document->url ().url ())/*attachments*/); } @@ -1297,7 +1297,7 @@ void kpMainWindow::setAsWallpaper (bool centered) } int result = KMessageBox::questionYesNo (this, - question, TQString::null, + question, TQString(), KStdGuiItem::save (), KStdGuiItem::cancel ()); if (result == KMessageBox::Yes) diff --git a/kolourpaint/kpmainwindow_help.cpp b/kolourpaint/kpmainwindow_help.cpp index 9d69143c..78ec0265 100644 --- a/kolourpaint/kpmainwindow_help.cpp +++ b/kolourpaint/kpmainwindow_help.cpp @@ -57,7 +57,7 @@ void kpMainWindow::setupHelpMenuActions () // -- Thurston d->m_actionHelpTakingScreenshots = new KAction ( i18n ("Acquiring &Screenshots"), 0, - this, TQT_SLOT (slotHelpTakingScreenshots ()), + TQT_TQOBJECT(this), TQT_SLOT (slotHelpTakingScreenshots ()), ac, "help_taking_screenshots"); @@ -92,7 +92,7 @@ static TQString printScreenShortcutString () else { // (localised) - return KKey (Qt::CTRL + Qt::Key_Print).toString (); + return KKey (TQt::CTRL + TQt::Key_Print).toString (); } } @@ -114,7 +114,7 @@ void kpMainWindow::slotHelpTakingScreenshots () #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\tdcopApps=" << dcopApps << endl; #endif - bool isRunningKDE = (dcopApps.findIndex ("kwin") >= 0); + bool isRunningKDE = (dcopApps.tqfindIndex ("kwin") >= 0); #if 0 { @@ -188,7 +188,7 @@ void kpMainWindow::slotHelpTakingScreenshots () disconnect (messageLabel, TQT_SIGNAL (linkClicked (const TQString &)), messageLabel, TQT_SLOT (openLink (const TQString &))); connect (messageLabel, TQT_SIGNAL (linkClicked (const TQString &)), - this, TQT_SLOT (slotHelpTakingScreenshotsFollowLink (const TQString &))); + TQT_TQOBJECT(this), TQT_SLOT (slotHelpTakingScreenshotsFollowLink (const TQString &))); dlg.setMainWidget (messageLabel); diff --git a/kolourpaint/kpmainwindow_image.cpp b/kolourpaint/kpmainwindow_image.cpp index a00f0fd3..7de1b158 100644 --- a/kolourpaint/kpmainwindow_image.cpp +++ b/kolourpaint/kpmainwindow_image.cpp @@ -89,38 +89,38 @@ void kpMainWindow::setupImageMenuActions () { KActionCollection *ac = actionCollection (); - m_actionResizeScale = new KAction (i18n ("R&esize / Scale..."), Qt::CTRL + Qt::Key_E, - this, TQT_SLOT (slotResizeScale ()), ac, "image_resize_scale"); + m_actionResizeScale = new KAction (i18n ("R&esize / Scale..."), TQt::CTRL + TQt::Key_E, + TQT_TQOBJECT(this), TQT_SLOT (slotResizeScale ()), ac, "image_resize_scale"); - m_actionCrop = new KAction (i18n ("Se&t as Image (Crop)"), Qt::CTRL + Qt::Key_T, - this, TQT_SLOT (slotCrop ()), ac, "image_crop"); + m_actionCrop = new KAction (i18n ("Se&t as Image (Crop)"), TQt::CTRL + TQt::Key_T, + TQT_TQOBJECT(this), TQT_SLOT (slotCrop ()), ac, "image_crop"); - m_actionAutoCrop = new KAction (autoCropText (), Qt::CTRL + Qt::Key_U, - this, TQT_SLOT (slotAutoCrop ()), ac, "image_auto_crop"); + m_actionAutoCrop = new KAction (autoCropText (), TQt::CTRL + TQt::Key_U, + TQT_TQOBJECT(this), TQT_SLOT (slotAutoCrop ()), ac, "image_auto_crop"); - m_actionFlip = new KAction (i18n ("&Flip..."), Qt::CTRL + Qt::Key_F, - this, TQT_SLOT (slotFlip ()), ac, "image_flip"); + m_actionFlip = new KAction (i18n ("&Flip..."), TQt::CTRL + TQt::Key_F, + TQT_TQOBJECT(this), TQT_SLOT (slotFlip ()), ac, "image_flip"); - m_actionRotate = new KAction (i18n ("&Rotate..."), Qt::CTRL + Qt::Key_R, - this, TQT_SLOT (slotRotate ()), ac, "image_rotate"); + m_actionRotate = new KAction (i18n ("&Rotate..."), TQt::CTRL + TQt::Key_R, + TQT_TQOBJECT(this), TQT_SLOT (slotRotate ()), ac, "image_rotate"); - m_actionSkew = new KAction (i18n ("S&kew..."), Qt::CTRL + Qt::Key_K, - this, TQT_SLOT (slotSkew ()), ac, "image_skew"); + m_actionSkew = new KAction (i18n ("S&kew..."), TQt::CTRL + TQt::Key_K, + TQT_TQOBJECT(this), TQT_SLOT (slotSkew ()), ac, "image_skew"); m_actionConvertToBlackAndWhite = new KAction (i18n ("Reduce to Mo&nochrome (Dithered)"), 0, - this, TQT_SLOT (slotConvertToBlackAndWhite ()), ac, "image_convert_to_black_and_white"); + TQT_TQOBJECT(this), TQT_SLOT (slotConvertToBlackAndWhite ()), ac, "image_convert_to_black_and_white"); m_actionConvertToGrayscale = new KAction (i18n ("Reduce to &Grayscale"), 0, - this, TQT_SLOT (slotConvertToGrayscale ()), ac, "image_convert_to_grayscale"); + TQT_TQOBJECT(this), TQT_SLOT (slotConvertToGrayscale ()), ac, "image_convert_to_grayscale"); - m_actionInvertColors = new KAction (i18n ("&Invert Colors"), Qt::CTRL + Qt::Key_I, - this, TQT_SLOT (slotInvertColors ()), ac, "image_invert_colors"); + m_actionInvertColors = new KAction (i18n ("&Invert Colors"), TQt::CTRL + TQt::Key_I, + TQT_TQOBJECT(this), TQT_SLOT (slotInvertColors ()), ac, "image_invert_colors"); - m_actionClear = new KAction (i18n ("C&lear"), Qt::CTRL + Qt::SHIFT + Qt::Key_N, - this, TQT_SLOT (slotClear ()), ac, "image_clear"); + m_actionClear = new KAction (i18n ("C&lear"), TQt::CTRL + TQt::SHIFT + TQt::Key_N, + TQT_TQOBJECT(this), TQT_SLOT (slotClear ()), ac, "image_clear"); - m_actionMoreEffects = new KAction (i18n ("&More Effects..."), Qt::CTRL + Qt::Key_M, - this, TQT_SLOT (slotMoreEffects ()), ac, "image_more_effects"); + m_actionMoreEffects = new KAction (i18n ("&More Effects..."), TQt::CTRL + TQt::Key_M, + TQT_TQOBJECT(this), TQT_SLOT (slotMoreEffects ()), ac, "image_more_effects"); enableImageMenuDocumentActions (false); } @@ -260,7 +260,7 @@ void kpMainWindow::addImageOrSelectionCommand (kpCommand *cmd, kpMacroCommand *macroCmd = new kpMacroCommand (cmd->name (), this); macroCmd->addCommand (new kpToolSelectionPullFromDocumentCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, this)); macroCmd->addCommand (cmd); diff --git a/kolourpaint/kpmainwindow_settings.cpp b/kolourpaint/kpmainwindow_settings.cpp index 9e3914e8..c9ce8b74 100644 --- a/kolourpaint/kpmainwindow_settings.cpp +++ b/kolourpaint/kpmainwindow_settings.cpp @@ -57,19 +57,19 @@ void kpMainWindow::setupSettingsMenuActions () createStandardStatusBarAction (); - m_actionFullScreen = KStdAction::fullScreen (this, TQT_SLOT (slotFullScreen ()), ac, + m_actionFullScreen = KStdAction::fullScreen (TQT_TQOBJECT(this), TQT_SLOT (slotFullScreen ()), ac, this/*window*/); m_actionShowPath = new KToggleAction (i18n ("Show &Path"), 0, - this, TQT_SLOT (slotShowPathToggled ()), ac, "settings_show_path"); + TQT_TQOBJECT(this), TQT_SLOT (slotShowPathToggled ()), ac, "settings_show_path"); m_actionShowPath->setCheckedState (i18n ("Hide &Path")); slotEnableSettingsShowPath (); - m_actionKeyBindings = KStdAction::keyBindings (this, TQT_SLOT (slotKeyBindings ()), ac); - m_actionConfigureToolbars = KStdAction::configureToolbars (this, TQT_SLOT (slotConfigureToolBars ()), ac); - // m_actionConfigure = KStdAction::preferences (this, TQT_SLOT (slotConfigure ()), ac); + m_actionKeyBindings = KStdAction::keyBindings (TQT_TQOBJECT(this), TQT_SLOT (slotKeyBindings ()), ac); + m_actionConfigureToolbars = KStdAction::configureToolbars (TQT_TQOBJECT(this), TQT_SLOT (slotConfigureToolBars ()), ac); + // m_actionConfigure = KStdAction::preferences (TQT_TQOBJECT(this), TQT_SLOT (slotConfigure ()), ac); enableSettingsMenuDocumentActions (false); @@ -168,9 +168,9 @@ void kpMainWindow::slotConfigureToolBars () //saveMainWindowSettings (kapp->config (), autoSaveGroup ()); KEditToolbar dialog (actionCollection (), - TQString::null/*default ui.rc file*/, + TQString()/*default ui.rc file*/, true/*global resource*/, - this/*parent*/); + this/*tqparent*/); // Clicking on OK after Apply brings up the dialog (below) again. // Bug with KEditToolBar. dialog.showButtonApply (false); @@ -195,7 +195,7 @@ void kpMainWindow::slotNewToolBarConfig () KMessageBox::information (this, i18n ("You have to restart KolourPaint for these changes to take effect."), i18n ("Toolbar Settings Changed"), - TQString::fromLatin1 ("ToolBarSettingsChanged")); + TQString::tqfromLatin1 ("ToolBarSettingsChanged")); //createGUI(); //applyMainWindowSettings (kapp->config (), autoSaveGroup ()); diff --git a/kolourpaint/kpmainwindow_statusbar.cpp b/kolourpaint/kpmainwindow_statusbar.cpp index ba3b8702..bc1bc296 100644 --- a/kolourpaint/kpmainwindow_statusbar.cpp +++ b/kolourpaint/kpmainwindow_statusbar.cpp @@ -56,7 +56,7 @@ void kpMainWindow::addPermanentStatusBarItem (int id, int maxTextLen) maxTextLen); //+ 2/*spaces on either side*/); sb->insertFixedItem (textWithMaxLen, id, true/*permanent, place on the right*/); - sb->changeItem (TQString::null, id); + sb->changeItem (TQString(), id); } // private @@ -67,8 +67,8 @@ void kpMainWindow::createStatusBar () // 9999 pixels "ought to be enough for anybody" const int maxDimenLength = 4; - //sb->insertItem (TQString::null, StatusBarItemMessage, 1/*stretch*/); - //sb->setItemAlignment (StatusBarItemMessage, Qt::AlignLeft | Qt::AlignVCenter); + //sb->insertItem (TQString(), StatusBarItemMessage, 1/*stretch*/); + //sb->setItemAlignment (StatusBarItemMessage, TQt::AlignLeft | TQt::AlignVCenter); m_statusBarMessageLabel = new kpSqueezedTextLabel (sb); //m_statusBarMessageLabel->setShowEllipsis (false); @@ -137,7 +137,7 @@ void kpMainWindow::setStatusBarShapePoints (const TQPoint &startPoint, if (startPoint == KP_INVALID_POINT) { - statusBar ()->changeItem (TQString::null, StatusBarItemShapePoints); + statusBar ()->changeItem (TQString(), StatusBarItemShapePoints); } else if (endPoint == KP_INVALID_POINT) { @@ -185,7 +185,7 @@ void kpMainWindow::setStatusBarShapeSize (const TQSize &size) if (size == KP_INVALID_SIZE) { - statusBar ()->changeItem (TQString::null, StatusBarItemShapeSize); + statusBar ()->changeItem (TQString(), StatusBarItemShapeSize); } else { @@ -214,7 +214,7 @@ void kpMainWindow::setStatusBarDocSize (const TQSize &size) if (size == KP_INVALID_SIZE) { - statusBar ()->changeItem (TQString::null, StatusBarItemDocSize); + statusBar ()->changeItem (TQString(), StatusBarItemDocSize); } else { @@ -240,7 +240,7 @@ void kpMainWindow::setStatusBarDocDepth (int depth) if (depth <= 0) { - statusBar ()->changeItem (TQString::null, StatusBarItemDocDepth); + statusBar ()->changeItem (TQString(), StatusBarItemDocDepth); } else { @@ -264,7 +264,7 @@ void kpMainWindow::setStatusBarZoom (int zoom) if (zoom <= 0) { - statusBar ()->changeItem (TQString::null, StatusBarItemZoom); + statusBar ()->changeItem (TQString(), StatusBarItemZoom); } else { @@ -289,7 +289,7 @@ void kpMainWindow::recalculateStatusBarMessage () #endif // HACK: To work around kpViewScrollableContainer's unreliable - // status messages (which in turn is due to Qt not updating + // status messages (which in turn is due to TQt not updating // TQWidget::hasMouse() on drags and we needing to hack around it) if (!scrollViewMessage.isEmpty () && m_scrollView->newDocSize ().isEmpty () && @@ -303,7 +303,7 @@ void kpMainWindow::recalculateStatusBarMessage () m_scrollView->clearStatusMessage (); m_scrollView->blockSignals (false); - scrollViewMessage = TQString::null; + scrollViewMessage = TQString(); #if DEBUG_STATUS_BAR && 1 kdDebug () << "\t\t\tdone" << endl; #endif diff --git a/kolourpaint/kpmainwindow_text.cpp b/kolourpaint/kpmainwindow_text.cpp index 233ba5b5..859e33f0 100644 --- a/kolourpaint/kpmainwindow_text.cpp +++ b/kolourpaint/kpmainwindow_text.cpp @@ -50,22 +50,22 @@ void kpMainWindow::setupTextToolBarActions () KActionCollection *ac = actionCollection (); m_actionTextFontFamily = new KFontAction (i18n ("Font Family"), 0/*shortcut*/, - this, TQT_SLOT (slotTextFontFamilyChanged ()), ac, "text_font_family"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextFontFamilyChanged ()), ac, "text_font_family"); m_actionTextFontSize = new KFontSizeAction (i18n ("Font Size"), 0/*shortcut*/, - this, TQT_SLOT (slotTextFontSizeChanged ()), ac, "text_font_size"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextFontSizeChanged ()), ac, "text_font_size"); m_actionTextBold = new KToggleAction (i18n ("Bold"), "text_bold"/*icon*/, 0/*shortcut*/, - this, TQT_SLOT (slotTextBoldChanged ()), ac, "text_bold"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextBoldChanged ()), ac, "text_bold"); m_actionTextItalic = new KToggleAction (i18n ("Italic"), "text_italic"/*icon*/, 0/*shortcut*/, - this, TQT_SLOT (slotTextItalicChanged ()), ac, "text_italic"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextItalicChanged ()), ac, "text_italic"); m_actionTextUnderline = new KToggleAction (i18n ("Underline"), "text_under"/*icon*/, 0/*shortcut*/, - this, TQT_SLOT (slotTextUnderlineChanged ()), ac, "text_underline"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextUnderlineChanged ()), ac, "text_underline"); m_actionTextStrikeThru = new KToggleAction (i18n ("Strike Through"), "text_strike"/*icon*/, 0/*shortcut*/, - this, TQT_SLOT (slotTextStrikeThruChanged ()), ac, "text_strike_thru"); + TQT_TQOBJECT(this), TQT_SLOT (slotTextStrikeThruChanged ()), ac, "text_strike_thru"); readAndApplyTextSettings (); @@ -80,7 +80,7 @@ void kpMainWindow::readAndApplyTextSettings () KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupText); KConfigBase *cfg = cfgGroupSaver.config (); - m_actionTextFontFamily->setFont (cfg->readEntry (kpSettingFontFamily, TQString::fromLatin1 ("Times"))); + m_actionTextFontFamily->setFont (cfg->readEntry (kpSettingFontFamily, TQString::tqfromLatin1 ("Times"))); m_actionTextFontSize->setFontSize (cfg->readNumEntry (kpSettingFontSize, 14)); m_actionTextBold->setChecked (cfg->readBoolEntry (kpSettingBold, false)); m_actionTextItalic->setChecked (cfg->readBoolEntry (kpSettingItalic, false)); diff --git a/kolourpaint/kpmainwindow_tools.cpp b/kolourpaint/kpmainwindow_tools.cpp index de48e1df..e4832f59 100644 --- a/kolourpaint/kpmainwindow_tools.cpp +++ b/kolourpaint/kpmainwindow_tools.cpp @@ -102,24 +102,24 @@ void kpMainWindow::setupToolActions () m_actionPrevToolOptionGroup1 = new kpSingleKeyTriggersAction ( i18n ("Previous Tool Option (Group #1)"), - kpTool::shortcutForKey (Qt::Key_1), - this, TQT_SLOT (slotActionPrevToolOptionGroup1 ()), + kpTool::shortcutForKey (TQt::Key_1), + TQT_TQOBJECT(this), TQT_SLOT (slotActionPrevToolOptionGroup1 ()), ac, "prev_tool_option_group_1"); m_actionNextToolOptionGroup1 = new kpSingleKeyTriggersAction ( i18n ("Next Tool Option (Group #1)"), - kpTool::shortcutForKey (Qt::Key_2), - this, TQT_SLOT (slotActionNextToolOptionGroup1 ()), + kpTool::shortcutForKey (TQt::Key_2), + TQT_TQOBJECT(this), TQT_SLOT (slotActionNextToolOptionGroup1 ()), ac, "next_tool_option_group_1"); m_actionPrevToolOptionGroup2 = new kpSingleKeyTriggersAction ( i18n ("Previous Tool Option (Group #2)"), - kpTool::shortcutForKey (Qt::Key_3), - this, TQT_SLOT (slotActionPrevToolOptionGroup2 ()), + kpTool::shortcutForKey (TQt::Key_3), + TQT_TQOBJECT(this), TQT_SLOT (slotActionPrevToolOptionGroup2 ()), ac, "prev_tool_option_group_2"); m_actionNextToolOptionGroup2 = new kpSingleKeyTriggersAction ( i18n ("Next Tool Option (Group #2)"), - kpTool::shortcutForKey (Qt::Key_4), - this, TQT_SLOT (slotActionNextToolOptionGroup2 ()), + kpTool::shortcutForKey (TQt::Key_4), + TQT_TQOBJECT(this), TQT_SLOT (slotActionNextToolOptionGroup2 ()), ac, "next_tool_option_group_2"); } @@ -289,7 +289,7 @@ void kpMainWindow::setSelectionTransparency (const kpSelectionTransparency &tran { #if DEBUG_KP_MAIN_WINDOW && 1 kdDebug () << "kpMainWindow::setSelectionTransparency() isOpaque=" << transparency.isOpaque () - << " color=" << (transparency.transparentColor ().isValid () ? (int *) transparency.transparentColor ().toQRgb () : 0) + << " color=" << (transparency.transparentColor ().isValid () ? (int *) transparency.transparentColor ().toTQRgb () : 0) << " forceColorChange=" << forceColorChange << endl; #endif diff --git a/kolourpaint/kpmainwindow_view.cpp b/kolourpaint/kpmainwindow_view.cpp index 5459f1a7..b1fbdf67 100644 --- a/kolourpaint/kpmainwindow_view.cpp +++ b/kolourpaint/kpmainwindow_view.cpp @@ -67,18 +67,18 @@ void kpMainWindow::setupViewMenuActions () m_actionFullScreen->setEnabled (false);*/ - m_actionActualSize = KStdAction::actualSize (this, TQT_SLOT (slotActualSize ()), ac); - /*m_actionFitToPage = KStdAction::fitToPage (this, TQT_SLOT (slotFitToPage ()), ac); - m_actionFitToWidth = KStdAction::fitToWidth (this, TQT_SLOT (slotFitToWidth ()), ac); - m_actionFitToHeight = KStdAction::fitToHeight (this, TQT_SLOT (slotFitToHeight ()), ac);*/ + m_actionActualSize = KStdAction::actualSize (TQT_TQOBJECT(this), TQT_SLOT (slotActualSize ()), ac); + /*m_actionFitToPage = KStdAction::fitToPage (TQT_TQOBJECT(this), TQT_SLOT (slotFitToPage ()), ac); + m_actionFitToWidth = KStdAction::fitToWidth (TQT_TQOBJECT(this), TQT_SLOT (slotFitToWidth ()), ac); + m_actionFitToHeight = KStdAction::fitToHeight (TQT_TQOBJECT(this), TQT_SLOT (slotFitToHeight ()), ac);*/ - m_actionZoomIn = KStdAction::zoomIn (this, TQT_SLOT (slotZoomIn ()), ac); - m_actionZoomOut = KStdAction::zoomOut (this, TQT_SLOT (slotZoomOut ()), ac); + m_actionZoomIn = KStdAction::zoomIn (TQT_TQOBJECT(this), TQT_SLOT (slotZoomIn ()), ac); + m_actionZoomOut = KStdAction::zoomOut (TQT_TQOBJECT(this), TQT_SLOT (slotZoomOut ()), ac); m_actionZoom = new KSelectAction (i18n ("&Zoom"), 0, - this, TQT_SLOT (slotZoom ()), actionCollection (), "view_zoom_to"); + TQT_TQOBJECT(this), TQT_SLOT (slotZoom ()), actionCollection (), "view_zoom_to"); m_actionZoom->setEditable (true); // create the zoom list for the 1st call to zoomTo() below @@ -91,7 +91,7 @@ void kpMainWindow::setupViewMenuActions () m_actionShowGrid = new KToggleAction (i18n ("Show &Grid"), CTRL + Key_G, - this, TQT_SLOT (slotShowGridToggled ()), actionCollection (), "view_show_grid"); + TQT_TQOBJECT(this), TQT_SLOT (slotShowGridToggled ()), actionCollection (), "view_show_grid"); m_actionShowGrid->setCheckedState (i18n ("Hide &Grid")); @@ -99,12 +99,12 @@ void kpMainWindow::setupViewMenuActions () // Testcase: Press CTRL+H twice on a fresh KolourPaint. // The second CTRL+H doesn't close the thumbnail. m_actionShowThumbnail = new KToggleAction (i18n ("Show T&humbnail"), CTRL + Key_H, - this, TQT_SLOT (slotShowThumbnailToggled ()), actionCollection (), "view_show_thumbnail"); + TQT_TQOBJECT(this), TQT_SLOT (slotShowThumbnailToggled ()), actionCollection (), "view_show_thumbnail"); m_actionShowThumbnail->setCheckedState (i18n ("Hide T&humbnail")); // Please do not use setCheckedState() here - it wouldn't make sense m_actionZoomedThumbnail = new KToggleAction (i18n ("Zoo&med Thumbnail Mode"), 0, - this, TQT_SLOT (slotZoomedThumbnailToggled ()), actionCollection (), "view_zoomed_thumbnail"); + TQT_TQOBJECT(this), TQT_SLOT (slotZoomedThumbnailToggled ()), actionCollection (), "view_zoomed_thumbnail"); // For consistency with the above action, don't use setCheckedState() // @@ -114,7 +114,7 @@ void kpMainWindow::setupViewMenuActions () d->m_actionShowThumbnailRectangle = new KToggleAction ( i18n ("Enable Thumbnail &Rectangle"), 0, - this, TQT_SLOT (slotThumbnailShowRectangleToggled ()), + TQT_TQOBJECT(this), TQT_SLOT (slotThumbnailShowRectangleToggled ()), actionCollection (), "view_show_thumbnail_rectangle"); @@ -238,7 +238,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) "results in imprecise editing and redraw glitches.\n" "Do you really want to set to zoom level to %1%?") .arg (zoomLevel), - TQString::null/*caption*/, + TQString()/*caption*/, i18n ("Set Zoom Level to %1%").arg (zoomLevel), "DoNotAskAgain_ZoomLevelNotMultipleOf100") != KMessageBox::Continue) { @@ -289,7 +289,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) // Ordinary flicker is better than the whole view moving TQPainter p (m_mainView); p.fillRect (m_mainView->rect (), - m_scrollView->viewport ()->colorGroup ().background ()); + m_scrollView->viewport ()->tqcolorGroup ().background ()); } } @@ -311,7 +311,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) << endl; #endif - // TODO: when changing from no scrollbars to scrollbars, Qt lies about + // TODO: when changing from no scrollbars to scrollbars, TQt lies about // visibleWidth() & visibleHeight() (doesn't take into account the // space taken by the would-be scrollbars) until it updates the // scrollview; hence the centring is off by about 5-10 pixels. @@ -344,10 +344,10 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) else { viewX = m_scrollView->contentsX () + - QMIN (m_mainView->width (), + TQMIN (m_mainView->width (), m_scrollView->visibleWidth ()) / 2; viewY = m_scrollView->contentsY () + - QMIN (m_mainView->height (), + TQMIN (m_mainView->height (), m_scrollView->visibleHeight ()) / 2; } @@ -404,7 +404,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) << endl; #endif - if (vuc->clipRegion ().contains (viewPoint)) + if (vuc->clipRegion ().tqcontains (viewPoint)) { const TQPoint globalPoint = kpWidgetMapper::toGlobal (vuc, viewPoint); @@ -505,13 +505,13 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor) #endif #endif - // HACK: make sure all of Qt's update() calls trigger + // HACK: make sure all of TQt's update() calls trigger // kpView::paintEvent() _now_ so that they can be queued by us // (until kpViewManager::restoreQueueUpdates()) to reduce flicker // caused mainly by m_scrollView->center() // // TODO: remove flicker completely - //TQTimer::singleShot (0, this, TQT_SLOT (finishZoomTo ())); + //TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT (finishZoomTo ())); // Later: I don't think there is an update() that needs to be queued // - let's reduce latency instead. @@ -626,7 +626,7 @@ void kpMainWindow::slotFitToPage () // doc_height * zoom / 100 <= view_height && // 1 <= zoom <= 3200 - zoomTo (QMIN (3200, QMAX (1, QMIN (m_scrollView->visibleWidth () * 100 / m_document->width (), + zoomTo (TQMIN (3200, TQMAX (1, TQMIN (m_scrollView->visibleWidth () * 100 / m_document->width (), m_scrollView->visibleHeight () * 100 / m_document->height ())))); } @@ -639,7 +639,7 @@ void kpMainWindow::slotFitToWidth () // doc_width * zoom / 100 <= view_width && // 1 <= zoom <= 3200 - zoomTo (QMIN (3200, QMAX (1, m_scrollView->visibleWidth () * 100 / m_document->width ()))); + zoomTo (TQMIN (3200, TQMAX (1, m_scrollView->visibleWidth () * 100 / m_document->width ()))); } // private slot @@ -651,7 +651,7 @@ void kpMainWindow::slotFitToHeight () // doc_height * zoom / 100 <= view_height && // 1 <= zoom <= 3200 - zoomTo (QMIN (3200, QMAX (1, m_scrollView->visibleHeight () * 100 / m_document->height ()))); + zoomTo (TQMIN (3200, TQMAX (1, m_scrollView->visibleHeight () * 100 / m_document->height ()))); } @@ -823,7 +823,7 @@ void kpMainWindow::notifyThumbnailGeometryChanged () { m_thumbnailSaveConfigTimer = new TQTimer (this); connect (m_thumbnailSaveConfigTimer, TQT_SIGNAL (timeout ()), - this, TQT_SLOT (slotSaveThumbnailGeometry ())); + TQT_TQOBJECT(this), TQT_SLOT (slotSaveThumbnailGeometry ())); } m_thumbnailSaveConfigTimer->start (500/*msec*/, true/*single shot*/); @@ -842,13 +842,13 @@ void kpMainWindow::slotSaveThumbnailGeometry () TQRect rect (m_thumbnail->x (), m_thumbnail->y (), m_thumbnail->width (), m_thumbnail->height ()); #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\tthumbnail relative geometry=" << rect << endl; + kdDebug () << "\tthumbnail relative tqgeometry=" << rect << endl; #endif m_configThumbnailGeometry = mapFromGlobal (rect); #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\tCONFIG: saving thumbnail geometry " + kdDebug () << "\tCONFIG: saving thumbnail tqgeometry " << m_configThumbnailGeometry << endl; #endif @@ -1067,11 +1067,11 @@ void kpMainWindow::updateThumbnail () kdDebug () << "\tcreating thumbnail" << endl; #endif - // Read last saved geometry before creating thumbnail & friends + // Read last saved tqgeometry before creating thumbnail & friends // in case they call notifyThumbnailGeometryChanged() TQRect thumbnailGeometry = m_configThumbnailGeometry; #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\t\tlast used geometry=" << thumbnailGeometry << endl; + kdDebug () << "\t\tlast used tqgeometry=" << thumbnailGeometry << endl; #endif m_thumbnail = new kpThumbnail (this, "thumbnail"); @@ -1084,9 +1084,9 @@ void kpMainWindow::updateThumbnail () if (!thumbnailGeometry.isEmpty () && TQRect (0, 0, width (), height ()).intersects (thumbnailGeometry)) { - const TQRect geometry = mapToGlobal (thumbnailGeometry); - m_thumbnail->resize (geometry.size ()); - m_thumbnail->move (geometry.topLeft ()); + const TQRect tqgeometry = mapToGlobal (thumbnailGeometry); + m_thumbnail->resize (tqgeometry.size ()); + m_thumbnail->move (tqgeometry.topLeft ()); } else { @@ -1095,21 +1095,21 @@ void kpMainWindow::updateThumbnail () const int margin = 20; const int initialWidth = 160, initialHeight = 120; - TQRect geometryRect (width () - initialWidth - margin * 2, + TQRect tqgeometryRect (width () - initialWidth - margin * 2, m_scrollView->y () + margin, initialWidth, initialHeight); #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\t\tcreating geometry=" << geometryRect << endl; + kdDebug () << "\t\tcreating tqgeometry=" << tqgeometryRect << endl; #endif - geometryRect = mapToGlobal (geometryRect); + tqgeometryRect = mapToGlobal (tqgeometryRect); #if DEBUG_KP_MAIN_WINDOW - kdDebug () << "\t\tmap to global=" << geometryRect << endl; + kdDebug () << "\t\tmap to global=" << tqgeometryRect << endl; #endif - m_thumbnail->resize (geometryRect.size ()); - m_thumbnail->move (geometryRect.topLeft ()); + m_thumbnail->resize (tqgeometryRect.size ()); + m_thumbnail->move (tqgeometryRect.topLeft ()); } } @@ -1122,7 +1122,7 @@ void kpMainWindow::updateThumbnail () kdDebug () << "\t\tconnecting thumbnail::visibilityChange to destroy slot" << endl; #endif connect (m_thumbnail, TQT_SIGNAL (visibilityChanged (bool)), - this, TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool))); #if DEBUG_KP_MAIN_WINDOW kdDebug () << "\t\tDONE" << endl; #endif @@ -1144,7 +1144,7 @@ void kpMainWindow::updateThumbnail () disconnect (m_thumbnail, TQT_SIGNAL (visibilityChanged (bool)), - this, TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool))); m_thumbnail->deleteLater (); m_thumbnail = 0; } diff --git a/kolourpaint/kpselection.cpp b/kolourpaint/kpselection.cpp index 728fbad9..8947f8d0 100644 --- a/kolourpaint/kpselection.cpp +++ b/kolourpaint/kpselection.cpp @@ -337,11 +337,11 @@ int kpSelection::size () const // public -TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const +TQBitmap kpSelection::tqmaskForOwnType (bool nullForRectangular) const { if (!m_rect.isValid ()) { - kdError () << "kpSelection::maskForOwnType() boundingRect invalid" << endl; + kdError () << "kpSelection::tqmaskForOwnType() boundingRect invalid" << endl; return TQBitmap (); } @@ -351,19 +351,19 @@ TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const if (nullForRectangular) return TQBitmap (); - TQBitmap maskBitmap (m_rect.width (), m_rect.height ()); - maskBitmap.fill (Qt::color1/*opaque*/); - return maskBitmap; + TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ()); + tqmaskBitmap.fill (TQt::color1/*opaque*/); + return tqmaskBitmap; } - TQBitmap maskBitmap (m_rect.width (), m_rect.height ()); - maskBitmap.fill (Qt::color0/*transparent*/); + TQBitmap tqmaskBitmap (m_rect.width (), m_rect.height ()); + tqmaskBitmap.fill (TQt::color0/*transparent*/); TQPainter painter; - painter.begin (&maskBitmap); - painter.setPen (Qt::color1)/*opaque*/; - painter.setBrush (Qt::color1/*opaque*/); + painter.begin (&tqmaskBitmap); + painter.setPen (TQt::color1)/*opaque*/; + painter.setBrush (TQt::color1/*opaque*/); if (m_type == kpSelection::Ellipse) painter.drawEllipse (0, 0, m_rect.width (), m_rect.height ()); @@ -373,13 +373,13 @@ TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const points.detach (); points.translate (-m_rect.x (), -m_rect.y ()); - painter.drawPolygon (points, false/*even-odd algo*/); + painter.tqdrawPolygon (points, false/*even-odd algo*/); } painter.end (); - return maskBitmap; + return tqmaskBitmap; } @@ -490,18 +490,18 @@ int kpSelection::height () const } // public -bool kpSelection::contains (const TQPoint &point) const +bool kpSelection::tqcontains (const TQPoint &point) const { TQRect rect = boundingRect (); #if DEBUG_KP_SELECTION && 1 - kdDebug () << "kpSelection::contains(" << point + kdDebug () << "kpSelection::tqcontains(" << point << ") rect==" << rect << " #points=" << m_points.size () << endl; #endif - if (!rect.contains (point)) + if (!rect.tqcontains (point)) return false; // OPT: TQRegion is probably incredibly slow - cache @@ -514,20 +514,20 @@ bool kpSelection::contains (const TQPoint &point) const case kpSelection::Text: return true; case kpSelection::Ellipse: - return TQRegion (m_rect, TQRegion::Ellipse).contains (point); + return TQRegion (m_rect, TQRegion::Ellipse).tqcontains (point); case kpSelection::Points: // TODO: make this always include the border // (draw up a rect sel in this mode to see what I mean) - return TQRegion (m_points, false/*even-odd algo*/).contains (point); + return TQRegion (m_points, false/*even-odd algo*/).tqcontains (point); default: return false; } } // public -bool kpSelection::contains (int x, int y) +bool kpSelection::tqcontains (int x, int y) { - return contains (TQPoint (x, y)); + return tqcontains (TQPoint (x, y)); } @@ -606,20 +606,20 @@ static int mostContrastingValue (int val) return 0; } -static QRgb mostContrastingRGB (QRgb val) +static TQRgb mostContrastingRGB (TQRgb val) { - return qRgba (mostContrastingValue (qRed (val)), - mostContrastingValue (qGreen (val)), - mostContrastingValue (qBlue (val)), - mostContrastingValue (qAlpha (val))); + return tqRgba (mostContrastingValue (tqRed (val)), + mostContrastingValue (tqGreen (val)), + mostContrastingValue (tqBlue (val)), + mostContrastingValue (tqAlpha (val))); } // private -static void drawTextLines (TQPainter *painter, TQPainter *maskPainter, +static void drawTextLines (TQPainter *painter, TQPainter *tqmaskPainter, const TQRect &rect, const TQValueVector <TQString> &textLines) { - if (!painter->clipRegion ().isEmpty () || !maskPainter->clipRegion ().isEmpty ()) + if (!painter->clipRegion ().isEmpty () || !tqmaskPainter->clipRegion ().isEmpty ()) { // TODO: fix esp. before making method public kdError () << "kpselection.cpp:drawTextLines() can't deal with existing painter clip regions" << endl; @@ -632,8 +632,8 @@ static void drawTextLines (TQPainter *painter, TQPainter *maskPainter, if (painter->isActive ()) \ painter->cmd; \ \ - if (maskPainter->isActive ()) \ - maskPainter->cmd; \ + if (tqmaskPainter->isActive ()) \ + tqmaskPainter->cmd; \ } @@ -685,7 +685,7 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect) TQBitmap destPixmapMask; TQPainter destPixmapPainter, destPixmapMaskPainter; - if (destPixmap->mask ()) + if (destPixmap->tqmask ()) { if (m_textStyle.effectiveBackgroundColor ().isTransparent ()) { @@ -698,19 +698,19 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect) modifyingRectRelPixmap, kpPixmapFX::pixmapWithDefinedTransparentPixels ( kpPixmapFX::getPixmapAt (*destPixmap, modifyingRectRelPixmap), - m_textStyle.foregroundColor ().toQColor ())); + m_textStyle.foregroundColor ().toTQColor ())); } - destPixmapMask = *destPixmap->mask (); + destPixmapMask = *destPixmap->tqmask (); destPixmapMaskPainter.begin (&destPixmapMask); destPixmapMaskPainter.translate (-docRect.x (), -docRect.y ()); - destPixmapMaskPainter.setPen (Qt::color1/*opaque*/); + destPixmapMaskPainter.setPen (TQt::color1/*opaque*/); destPixmapMaskPainter.setFont (m_textStyle.font ()); } destPixmapPainter.begin (destPixmap); destPixmapPainter.translate (-docRect.x (), -docRect.y ()); - destPixmapPainter.setPen (m_textStyle.foregroundColor ().toQColor ()); + destPixmapPainter.setPen (m_textStyle.foregroundColor ().toTQColor ()); destPixmapPainter.setFont (m_textStyle.font ()); @@ -718,13 +718,13 @@ void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect) { destPixmapPainter.fillRect ( boundingRect (), - m_textStyle.effectiveBackgroundColor ().toQColor ()); + m_textStyle.effectiveBackgroundColor ().toTQColor ()); if (destPixmapMaskPainter.isActive ()) { destPixmapMaskPainter.fillRect ( boundingRect (), - Qt::color1/*opaque*/); + TQt::color1/*opaque*/); } } @@ -759,7 +759,7 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const // Iron out stupid case first if (m_textStyle.effectiveBackgroundColor ().isTransparent ()) { - pixmapMask.fill (Qt::color0/*transparent*/); + pixmapMask.fill (TQt::color0/*transparent*/); pixmap.setMask (pixmapMask); return pixmap; } @@ -775,22 +775,22 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const TQPainter pixmapPainter, pixmapMaskPainter; - pixmap.fill (m_textStyle.effectiveBackgroundColor ().toQColor ()); + pixmap.fill (m_textStyle.effectiveBackgroundColor ().toTQColor ()); pixmapPainter.begin (&pixmap); // HACK: Transparent foreground colour + antialiased fonts don't // work - they don't seem to be able to draw in - // Qt::color0/*transparent*/ (but Qt::color1 seems Ok). + // TQt::color0/*transparent*/ (but TQt::color1 seems Ok). // So we draw in a contrasting color to the background so that // we can identify the transparent pixels for manually creating - // the mask. + // the tqmask. pixmapPainter.setPen ( - TQColor (mostContrastingRGB (m_textStyle.effectiveBackgroundColor ().toQRgb () & RGB_MASK))); + TQColor (mostContrastingRGB (m_textStyle.effectiveBackgroundColor ().toTQRgb () & TQRGB_MASK))); pixmapPainter.setFont (font); - pixmapMask.fill (Qt::color1/*opaque*/); + pixmapMask.fill (TQt::color1/*opaque*/); pixmapMaskPainter.begin (&pixmapMask); - pixmapMaskPainter.setPen (Qt::color0/*transparent*/); + pixmapMaskPainter.setPen (TQt::color0/*transparent*/); pixmapMaskPainter.setFont (font); @@ -812,7 +812,7 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const kdDebug () << "\tinvoking foreground transparency hack" << endl; #endif TQImage image = kpPixmapFX::convertToImage (pixmap); - QRgb backgroundRGB = image.pixel (0, 0); // on textBorderSize() + TQRgb backgroundRGB = image.pixel (0, 0); // on textBorderSize() pixmapMaskPainter.begin (&pixmapMask); for (int y = 0; y < image.height (); y++) @@ -820,9 +820,9 @@ TQPixmap kpSelection::transparentForegroundTextPixmap () const for (int x = 0; x < image.width (); x++) { if (image.pixel (x, y) == backgroundRGB) - pixmapMaskPainter.setPen (Qt::color1/*opaque*/); + pixmapMaskPainter.setPen (TQt::color1/*opaque*/); else - pixmapMaskPainter.setPen (Qt::color0/*transparent*/); + pixmapMaskPainter.setPen (TQt::color0/*transparent*/); pixmapMaskPainter.drawPoint (x, y); } @@ -853,9 +853,9 @@ void kpSelection::paint (TQPixmap *destPixmap, const TQRect &docRect) const { #if DEBUG_KP_SELECTION kdDebug () << "kpSelection::paint() textStyle: fcol=" - << (int *) m_textStyle.foregroundColor ().toQRgb () + << (int *) m_textStyle.foregroundColor ().toTQRgb () << " bcol=" - << (int *) m_textStyle.effectiveBackgroundColor ().toQRgb () + << (int *) m_textStyle.effectiveBackgroundColor ().toTQRgb () << endl; #endif @@ -913,7 +913,7 @@ void kpSelection::calculateTextPixmap () TQString kpSelection::textForTextLines (const TQValueVector <TQString> &textLines_) { if (textLines_.isEmpty ()) - return TQString::null; + return TQString(); TQString bigString = textLines_ [0]; @@ -921,7 +921,7 @@ TQString kpSelection::textForTextLines (const TQValueVector <TQString> &textLine it != textLines_.end (); it++) { - bigString += TQString::fromLatin1 ("\n"); + bigString += TQString::tqfromLatin1 ("\n"); bigString += (*it); } @@ -933,7 +933,7 @@ TQString kpSelection::text () const { if (!isText ()) { - return TQString::null; + return TQString(); } return textForTextLines (m_textLines); @@ -964,7 +964,7 @@ void kpSelection::setTextLines (const TQValueVector <TQString> &textLines_) if (m_textLines.isEmpty ()) { kdError () << "kpSelection::setTextLines() passed no lines" << endl; - m_textLines.push_back (TQString::null); + m_textLines.push_back (TQString()); } calculateTextPixmap (); emit changed (boundingRect ()); @@ -1000,7 +1000,7 @@ bool kpSelection::pointIsInTextBorderArea (const TQPoint &globalPoint) const return false; } - return (m_rect.contains (globalPoint) && !pointIsInTextArea (globalPoint)); + return (m_rect.tqcontains (globalPoint) && !pointIsInTextArea (globalPoint)); } // public @@ -1012,7 +1012,7 @@ bool kpSelection::pointIsInTextArea (const TQPoint &globalPoint) const return false; } - return textAreaRect ().contains (globalPoint); + return textAreaRect ().tqcontains (globalPoint); } @@ -1049,7 +1049,7 @@ int kpSelection::minimumHeightForTextStyle (const kpTextStyle &) } // public static -TQSize kpSelection::minimumSizeForTextStyle (const kpTextStyle &textStyle) +TQSize kpSelection::tqminimumSizeForTextStyle (const kpTextStyle &textStyle) { return TQSize (minimumWidthForTextStyle (textStyle), minimumHeightForTextStyle (textStyle)); @@ -1061,14 +1061,14 @@ int kpSelection::preferredMinimumWidthForTextStyle (const kpTextStyle &textStyle { const int about15CharsWidth = textStyle.fontMetrics ().width ( - TQString::fromLatin1 ("1234567890abcde")); + TQString::tqfromLatin1 ("1234567890abcde")); const int preferredMinWidth = - QMAX (150, + TQMAX (150, textBorderSize () * 2 + about15CharsWidth); - return QMAX (minimumWidthForTextStyle (textStyle), - QMIN (250, preferredMinWidth)); + return TQMAX (minimumWidthForTextStyle (textStyle), + TQMIN (250, preferredMinWidth)); } // public static @@ -1077,8 +1077,8 @@ int kpSelection::preferredMinimumHeightForTextStyle (const kpTextStyle &textStyl const int preferredMinHeight = textBorderSize () * 2 + textStyle.fontMetrics ().height (); - return QMAX (minimumHeightForTextStyle (textStyle), - QMIN (150, preferredMinHeight)); + return TQMAX (minimumHeightForTextStyle (textStyle), + TQMIN (150, preferredMinHeight)); } // public static @@ -1108,7 +1108,7 @@ int kpSelection::minimumHeight () const } // public -TQSize kpSelection::minimumSize () const +TQSize kpSelection::tqminimumSize () const { return TQSize (minimumWidth (), minimumHeight ()); } @@ -1252,7 +1252,7 @@ void kpSelection::calculateTransparencyMask () if (isText ()) { #if DEBUG_KP_SELECTION - kdDebug () << "\ttext - no need for transparency mask" << endl; + kdDebug () << "\ttext - no need for transparency tqmask" << endl; #endif m_transparencyMask.resize (0, 0); return; @@ -1261,7 +1261,7 @@ void kpSelection::calculateTransparencyMask () if (!m_pixmap) { #if DEBUG_KP_SELECTION - kdDebug () << "\tno pixmap - no need for transparency mask" << endl; + kdDebug () << "\tno pixmap - no need for transparency tqmask" << endl; #endif m_transparencyMask.resize (0, 0); return; @@ -1270,7 +1270,7 @@ void kpSelection::calculateTransparencyMask () if (m_transparency.isOpaque ()) { #if DEBUG_KP_SELECTION - kdDebug () << "\topaque - no need for transparency mask" << endl; + kdDebug () << "\topaque - no need for transparency tqmask" << endl; #endif m_transparencyMask.resize (0, 0); return; @@ -1289,12 +1289,12 @@ void kpSelection::calculateTransparencyMask () if (kpPixmapFX::getColorAtPixel (image, x, y).isSimilarTo (m_transparency.transparentColor (), m_transparency.processedColorSimilarity ())) { - transparencyMaskPainter.setPen (Qt::color1/*make it transparent*/); + transparencyMaskPainter.setPen (TQt::color1/*make it transparent*/); hasTransparent = true; } else { - transparencyMaskPainter.setPen (Qt::color0/*keep pixel as is*/); + transparencyMaskPainter.setPen (TQt::color0/*keep pixel as is*/); } transparencyMaskPainter.drawPoint (x, y); @@ -1373,8 +1373,8 @@ bool kpSelection::setTransparency (const kpSelectionTransparency &transparency, { #if DEBUG_KP_SELECTION kdDebug () << "\tdiffer at " << TQPoint (x, y) - << " old=" << (int *) kpPixmapFX::getColorAtPixel (oldTransparencyMaskImage, x, y).toQRgb () - << " new=" << (int *) kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y).toQRgb () + << " old=" << (int *) kpPixmapFX::getColorAtPixel (oldTransparencyMaskImage, x, y).toTQRgb () + << " new=" << (int *) kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y).toTQRgb () << endl; #endif changed = true; @@ -1433,9 +1433,9 @@ void kpSelection::flip (bool horiz, bool vert) if (!m_transparencyMask.isNull ()) { #if DEBUG_KP_SELECTION && 1 - kdDebug () << "\thave transparency mask - flipping that" << endl; + kdDebug () << "\thave transparency tqmask - flipping that" << endl; #endif - kpPixmapFX::flip (&m_transparencyMask, horiz, vert); + kpPixmapFX::flip (TQT_TQPIXMAP(&m_transparencyMask), horiz, vert); } diff --git a/kolourpaint/kpselection.h b/kolourpaint/kpselection.h index b99f5cb9..e7e54d54 100644 --- a/kolourpaint/kpselection.h +++ b/kolourpaint/kpselection.h @@ -52,9 +52,10 @@ class TQSize; * Holds a selection - will also be used for the clipboard * so that we can retain the border. */ -class kpSelection : public QObject +class kpSelection : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Type @@ -102,7 +103,7 @@ public: int size () const; - TQBitmap maskForOwnType (bool nullForRectangular = false) const; + TQBitmap tqmaskForOwnType (bool nullForRectangular = false) const; // synonyms TQPoint topLeft () const; @@ -126,8 +127,8 @@ public: // (for non-rectangular selections, may return false even if // kpView::onSelectionResizeHandle()) - bool contains (const TQPoint &point) const; - bool contains (int x, int y); + bool tqcontains (const TQPoint &point) const; + bool tqcontains (int x, int y); // (Avoid using for text selections since text selection may @@ -168,7 +169,7 @@ public: // Be more robust when external enforcement fails. static int minimumWidthForTextStyle (const kpTextStyle &); static int minimumHeightForTextStyle (const kpTextStyle &); - static TQSize minimumSizeForTextStyle (const kpTextStyle &); + static TQSize tqminimumSizeForTextStyle (const kpTextStyle &); static int preferredMinimumWidthForTextStyle (const kpTextStyle &textStyle); static int preferredMinimumHeightForTextStyle (const kpTextStyle &textStyle); @@ -176,7 +177,7 @@ public: int minimumWidth () const; int minimumHeight () const; - TQSize minimumSize () const; + TQSize tqminimumSize () const; int textRowForPoint (const TQPoint &globalPoint) const; int textColForPoint (const TQPoint &globalPoint) const; diff --git a/kolourpaint/kpselectiondrag.cpp b/kolourpaint/kpselectiondrag.cpp index 91ecf35c..22cdeb4a 100644 --- a/kolourpaint/kpselectiondrag.cpp +++ b/kolourpaint/kpselectiondrag.cpp @@ -74,7 +74,7 @@ void kpSelectionDrag::setSelection (const kpSelection &sel) m_selection = sel; - // OPT: an awful waste of memory storing image in both selection and QImage + // OPT: an awful waste of memory storing image in both selection and TQImage // HACK: need to set image else TQImageDrag::format() lies setImage (kpPixmapFX::convertToImage (*m_selection.pixmap ())); @@ -87,7 +87,7 @@ bool kpSelectionDrag::holdsSelection () const } -// public virtual [base QMimeSource] +// public virtual [base TQMimeSource] const char *kpSelectionDrag::format (int which) const { #if DEBUG_KP_SELECTION_DRAG && 0 @@ -97,7 +97,7 @@ const char *kpSelectionDrag::format (int which) const if (ret) { #if DEBUG_KP_SELECTION_DRAG && 0 - kdDebug () << "\tQImageDrag reports " << ret << endl; + kdDebug () << "\tTQImageDrag reports " << ret << endl; #endif return ret; } @@ -126,8 +126,8 @@ const char *kpSelectionDrag::format (int which) const } } -// public virtual [base QMimeSource] -// Don't need to override in Qt 3.2 (the TQMimeSource base will work) +// public virtual [base TQMimeSource] +// Don't need to override in TQt 3.2 (the TQMimeSource base will work) // but we do so just in case TQImageDrag later decides to override it. bool kpSelectionDrag::provides (const char *mimeType) const { @@ -142,11 +142,11 @@ bool kpSelectionDrag::provides (const char *mimeType) const TQImageDrag::provides (mimeType)); } -// public virtual [base QMimeSource] -TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const +// public virtual [base TQMimeSource] +TQByteArray kpSelectionDrag::tqencodedData (const char *mimeType) const { #if DEBUG_KP_SELECTION_DRAG - kdDebug () << "kpSelectionDrag::encodedData(" << mimeType << ")" << endl; + kdDebug () << "kpSelectionDrag::tqencodedData(" << mimeType << ")" << endl; #endif if (!mimeType) @@ -192,7 +192,7 @@ TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const } else { - kdError () << "kpSelectionDrag::encodedData(" << mimeType << ")" + kdError () << "kpSelectionDrag::tqencodedData(" << mimeType << ")" << " kpSelectionDrag(TQImage) could not decode data into TQImage" << endl; stream << kpSelection (); @@ -207,7 +207,7 @@ TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const kdDebug () << "\twant it as TQImage in TQByteArray" << endl; #endif - return TQImageDrag::encodedData (mimeType); + return TQImageDrag::tqencodedData (mimeType); } } @@ -255,10 +255,10 @@ bool kpSelectionDrag::decode (const TQMimeSource *e, kpSelection &sel, #if DEBUG_KP_SELECTION_DRAG kdDebug () << "\tmimeSource provides selection - just return it in TQByteArray" << endl; #endif - TQByteArray data = e->encodedData (kpSelectionDrag::selectionMimeType); + TQByteArray data = e->tqencodedData (kpSelectionDrag::selectionMimeType); TQDataStream stream (data, IO_ReadOnly); - // (no need for wali as kpSelection's by definition only support QPixmap's) + // (no need for wali as kpSelection's by definition only support TQPixmap's) stream >> sel; } else diff --git a/kolourpaint/kpselectiondrag.h b/kolourpaint/kpselectiondrag.h index e2b81e62..93473509 100644 --- a/kolourpaint/kpselectiondrag.h +++ b/kolourpaint/kpselectiondrag.h @@ -35,9 +35,10 @@ #include <kpselection.h> -class kpSelectionDrag : public QImageDrag +class kpSelectionDrag : public TQImageDrag { Q_OBJECT + TQ_OBJECT public: kpSelectionDrag (TQWidget *dragSource = 0, const char *name = 0); @@ -55,7 +56,7 @@ protected: public: virtual const char *format (int which = 0) const; virtual bool provides (const char *mimeType) const; - virtual TQByteArray encodedData (const char *mimeType) const; + virtual TQByteArray tqencodedData (const char *mimeType) const; static bool canDecode (const TQMimeSource *e); static bool decode (const TQMimeSource *e, TQImage &img); diff --git a/kolourpaint/kpselectiontransparency.cpp b/kolourpaint/kpselectiontransparency.cpp index 62919be4..f3fe062b 100644 --- a/kolourpaint/kpselectiontransparency.cpp +++ b/kolourpaint/kpselectiontransparency.cpp @@ -83,8 +83,8 @@ bool kpSelectionTransparency::operator== (const kpSelectionTransparency &rhs) co } #if DEBUG_KP_SELECTION_TRANSPARENCY && 0 - kdDebug () << "\tcolours: lhs=" << (int *) m_transparentColor.toQRgb () - << " rhs=" << (int *) rhs.m_transparentColor.toQRgb () + kdDebug () << "\tcolours: lhs=" << (int *) m_transparentColor.toTQRgb () + << " rhs=" << (int *) rhs.m_transparentColor.toTQRgb () << endl; kdDebug () << "\tcolour similarity: lhs=" << m_colorSimilarity << " rhs=" << rhs.m_colorSimilarity diff --git a/kolourpaint/kpsinglekeytriggersaction.cpp b/kolourpaint/kpsinglekeytriggersaction.cpp index 07573bf4..54e083c7 100644 --- a/kolourpaint/kpsinglekeytriggersaction.cpp +++ b/kolourpaint/kpsinglekeytriggersaction.cpp @@ -119,8 +119,8 @@ void kpSingleKeyTriggersActionInterface::enableSingleKeyTriggers (bool enable) kpSingleKeyTriggersAction::kpSingleKeyTriggersAction (const TQString &text, const KShortcut &shortcut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name) - : KAction (text, shortcut, receiver, slot, parent, name) + KActionCollection *tqparent, const char *name) + : KAction (text, shortcut, receiver, slot, tqparent, name) { } diff --git a/kolourpaint/kpsinglekeytriggersaction.h b/kolourpaint/kpsinglekeytriggersaction.h index 2c1ddf3f..7b7001ff 100644 --- a/kolourpaint/kpsinglekeytriggersaction.h +++ b/kolourpaint/kpsinglekeytriggersaction.h @@ -60,12 +60,13 @@ class kpSingleKeyTriggersAction : public KAction, public kpSingleKeyTriggersActionInterface { Q_OBJECT + TQ_OBJECT public: kpSingleKeyTriggersAction (const TQString &text, const KShortcut &shortcut, const TQObject *receiver, const char *slot, - KActionCollection *parent, const char *name); + KActionCollection *tqparent, const char *name); virtual ~kpSingleKeyTriggersAction (); diff --git a/kolourpaint/kptemppixmap.h b/kolourpaint/kptemppixmap.h index 2bd9d7bc..e66d622e 100644 --- a/kolourpaint/kptemppixmap.h +++ b/kolourpaint/kptemppixmap.h @@ -69,7 +69,7 @@ public: int height () const; - // Returns whether a call to paint() may change <*destPixmap>'s mask + // Returns whether a call to paint() may change <*destPixmap>'s tqmask bool mayChangeDocumentMask () const; /* diff --git a/kolourpaint/kpthumbnail.cpp b/kolourpaint/kpthumbnail.cpp index 5c57b12d..08a2331e 100644 --- a/kolourpaint/kpthumbnail.cpp +++ b/kolourpaint/kpthumbnail.cpp @@ -45,54 +45,36 @@ // TODO: get out of the Alt+Tab list -kpThumbnail::kpThumbnail (kpMainWindow *parent, const char *name) -#if KP_IS_QT_3_3 - : TQDockWindow (TQDockWindow::OutsideDock, parent, name), -#else // With Qt <3.3, OutsideDock requires parent = 0, - // sync: make sure outside of dock - : TQDockWindow (TQDockWindow::InDock, parent, name), - #warning "Using Qt <3.3: the thumbnail will flicker more when appearing" -#endif - m_mainWindow (parent), +kpThumbnail::kpThumbnail (kpMainWindow *tqparent, const char *name) + : TQDockWindow (TQDockWindow::OutsideDock, tqparent, name), + m_mainWindow (tqparent), m_view (0) { - if (!parent) - kdError () << "kpThumbnail::kpThumbnail() requires parent" << endl; - - -#if !KP_IS_QT_3_3 - if (parent) - { - hide (); - - // sync: make sure outside of dock - parent->moveDockWindow (this, Qt::DockTornOff); - } -#endif - + if (!tqparent) + kdError () << "kpThumbnail::kpThumbnail() requires tqparent" << endl; - if (parent) + if (tqparent) { // Prevent thumbnail from docking - it's _really_ irritating otherwise - parent->leftDock ()->setAcceptDockWindow (this, false); - parent->rightDock ()->setAcceptDockWindow (this, false); - parent->topDock ()->setAcceptDockWindow (this, false); - parent->bottomDock ()->setAcceptDockWindow (this, false); + tqparent->leftDock ()->setAcceptDockWindow (this, false); + tqparent->rightDock ()->setAcceptDockWindow (this, false); + tqparent->topDock ()->setAcceptDockWindow (this, false); + tqparent->bottomDock ()->setAcceptDockWindow (this, false); } - TQSize layoutMinimumSize = layout () ? layout ()->minimumSize () : TQSize (); + TQSize tqlayoutMinimumSize = tqlayout () ? tqlayout ()->tqminimumSize () : TQSize (); #if DEBUG_KP_THUMBNAIL - kdDebug () << "\tlayout=" << layout () - << " minSize=" << (layout () ? layout ()->minimumSize () : TQSize ()) << endl; + kdDebug () << "\ttqlayout=" << tqlayout () + << " minSize=" << (tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ()) << endl; kdDebug () << "\tboxLayout=" << boxLayout () - << " minSize=" << (boxLayout () ? boxLayout ()->minimumSize () : TQSize ()) + << " minSize=" << (boxLayout () ? boxLayout ()->tqminimumSize () : TQSize ()) << endl; #endif - if (layout ()) - layout ()->setResizeMode (TQLayout::FreeResize); - setMinimumSize (QMAX (layoutMinimumSize.width (), 64), - QMAX (layoutMinimumSize.height (), 64)); + if (tqlayout ()) + tqlayout ()->setResizeMode (TQLayout::FreeResize); + setMinimumSize (TQMAX (tqlayoutMinimumSize.width (), 64), + TQMAX (tqlayoutMinimumSize.height (), 64)); // Enable "X" Close Button @@ -158,7 +140,7 @@ void kpThumbnail::updateCaption () } -// public slot virtual [base QDockWindow] +// public slot virtual [base TQDockWindow] void kpThumbnail::dock () { #if DEBUG_KP_THUMBNAIL @@ -181,7 +163,7 @@ void kpThumbnail::slotViewDestroyed () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpThumbnail::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_THUMBNAIL @@ -202,7 +184,7 @@ void kpThumbnail::resizeEvent (TQResizeEvent *e) } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpThumbnail::moveEvent (TQMoveEvent * /*e*/) { if (m_mainWindow) diff --git a/kolourpaint/kpthumbnail.h b/kolourpaint/kpthumbnail.h index 9ed738dc..1bb97ff3 100644 --- a/kolourpaint/kpthumbnail.h +++ b/kolourpaint/kpthumbnail.h @@ -35,12 +35,13 @@ class kpMainWindow; class kpThumbnailView; -class kpThumbnail : public QDockWindow +class kpThumbnail : public TQDockWindow { Q_OBJECT + TQ_OBJECT public: - kpThumbnail (kpMainWindow *parent, const char *name = 0); + kpThumbnail (kpMainWindow *tqparent, const char *name = 0); virtual ~kpThumbnail (); public: diff --git a/kolourpaint/kptool.cpp b/kolourpaint/kptool.cpp index 3d016fdb..7c6a057b 100644 --- a/kolourpaint/kptool.cpp +++ b/kolourpaint/kptool.cpp @@ -153,7 +153,7 @@ void kpTool::createAction () m_action = new kpToolAction (text (), iconName (), shortcutForKey (m_key), this, TQT_SLOT (slotActionActivated ()), m_mainWindow->actionCollection (), name ()); - m_action->setExclusiveGroup (TQString::fromLatin1 ("Tool Box Actions")); + m_action->setExclusiveGroup (TQString::tqfromLatin1 ("Tool Box Actions")); m_action->setWhatsThis (description ()); connect (m_action, TQT_SIGNAL (toolTipChanged (const TQString &)), @@ -239,7 +239,7 @@ KShortcut kpTool::shortcutForKey (int key) shortcut.append (KKeySequence (KKey (key))); // (CTRL+<key>, ALT+<key>, CTRL+ALT+<key>, CTRL+SHIFT+<key> // all clash with global KDE shortcuts) - shortcut.append (KKeySequence (KKey (Qt::ALT + Qt::SHIFT + key))); + shortcut.append (KKeySequence (KKey (TQt::ALT + TQt::SHIFT + key))); } return shortcut; @@ -256,7 +256,7 @@ KShortcut kpTool::shortcut () const bool kpTool::keyIsText (int key) { // TODO: should work like !TQKeyEvent::text().isEmpty() - return !(key & (Qt::MODIFIER_MASK ^ Qt::SHIFT)); + return !(key & (TQt::MODIFIER_MASK ^ TQt::SHIFT)); } // public static @@ -744,7 +744,7 @@ void kpTool::endDrawInternal (const TQPoint &thisPoint, const TQRect &normalized // private void kpTool::endShapeInternal (const TQPoint &thisPoint, const TQRect &normalizedRect) { - endDrawInternal (thisPoint, normalizedRect, true/*end shape*/); + endDrawInternal (thisPoint, normalizedRect, true/*end tqshape*/); } // virtual @@ -940,11 +940,11 @@ void kpTool::mousePressEvent (TQMouseEvent *e) #endif // state of all the buttons - not just the one that triggered the event (button()) - Qt::ButtonState buttonState = e->stateAfter (); + TQt::ButtonState buttonState = e->stateAfter (); if (m_mainWindow && e->button () == Qt::MidButton) { - const TQString text = TQApplication::clipboard ()->text (QClipboard::Selection); + const TQString text = TQApplication::tqclipboard ()->text (TQClipboard::Selection); #if DEBUG_KP_TOOL && 1 kdDebug () << "\tMMB pasteText='" << text << "'" << endl; #endif @@ -1016,9 +1016,9 @@ void kpTool::mousePressEvent (TQMouseEvent *e) // let user know what mouse button is being used for entire draw m_mouseButton = mouseButton (buttonState); - m_shiftPressed = (buttonState & Qt::ShiftButton); - m_controlPressed = (buttonState & Qt::ControlButton); - m_altPressed = (buttonState & Qt::AltButton); + m_shiftPressed = (buttonState & TQt::ShiftButton); + m_controlPressed = (buttonState & TQt::ControlButton); + m_altPressed = (buttonState & TQt::AltButton); m_startPoint = m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : TQPoint (-1, -1); m_currentViewPoint = view ? e->pos () : TQPoint (-1, -1); m_viewUnderStartPoint = view; @@ -1040,19 +1040,19 @@ void kpTool::mouseMoveEvent (TQMouseEvent *e) kdDebug () << "kpTool::mouseMoveEvent pos=" << e->pos () << " btnStateAfter=" << (int) e->stateAfter () << endl; kpView *v0 = viewUnderCursor (), - *v1 = viewManager ()->viewUnderCursor (true/*use Qt*/), + *v1 = viewManager ()->viewUnderCursor (true/*use TQt*/), *v2 = viewUnderStartPoint (); kdDebug () << "\tviewUnderCursor=" << (v0 ? v0->name () : "(none)") - << " viewUnderCursorQt=" << (v1 ? v1->name () : "(none)") + << " viewUnderCursorTQt=" << (v1 ? v1->name () : "(none)") << " viewUnderStartPoint=" << (v2 ? v2->name () : "(none)") << endl; - kdDebug () << "\tfocusWidget=" << kapp->focusWidget () << endl; + kdDebug () << "\ttqfocusWidget=" << kapp->tqfocusWidget () << endl; #endif - Qt::ButtonState buttonState = e->stateAfter (); - m_shiftPressed = (buttonState & Qt::ShiftButton); - m_controlPressed = (buttonState & Qt::ControlButton); - m_altPressed = (buttonState & Qt::AltButton); + TQt::ButtonState buttonState = e->stateAfter (); + m_shiftPressed = (buttonState & TQt::ShiftButton); + m_controlPressed = (buttonState & TQt::ControlButton); + m_altPressed = (buttonState & TQt::AltButton); if (m_beganDraw) { @@ -1151,10 +1151,10 @@ void kpTool::wheelEvent (TQWheelEvent *e) e->ignore (); // If CTRL not pressed, bye. - if ((e->state () & Qt::ControlButton) == 0) + if ((e->state () & TQt::ControlButton) == 0) return; - // If drawing, bye; don't care if a shape in progress though. + // If drawing, bye; don't care if a tqshape in progress though. if (hasBegunDraw ()) return; @@ -1196,20 +1196,20 @@ void kpTool::keyPressEvent (TQKeyEvent *e) switch (e->key ()) { case 0: - case Qt::Key_unknown: + case TQt::Key_unknown: #if DEBUG_KP_TOOL && 0 kdDebug () << "kpTool::keyPressEvent() picked up unknown key!" << endl; #endif // --- fall thru and update all modifiers --- - case Qt::Key_Alt: - case Qt::Key_Shift: - case Qt::Key_Control: + case TQt::Key_Alt: + case TQt::Key_Shift: + case TQt::Key_Control: keyUpdateModifierState (e); e->accept (); break; - case Qt::Key_Delete: + case TQt::Key_Delete: m_mainWindow->slotDelete (); break; @@ -1217,21 +1217,21 @@ void kpTool::keyPressEvent (TQKeyEvent *e) * TQCursor::setPos conveniently causes mouseMoveEvents :) */ - case Qt::Key_Home: dx = -1, dy = -1; break; - case Qt::Key_Up: dy = -1; break; - case Qt::Key_PageUp: dx = +1, dy = -1; break; + case TQt::Key_Home: dx = -1, dy = -1; break; + case TQt::Key_Up: dy = -1; break; + case TQt::Key_PageUp: dx = +1, dy = -1; break; - case Qt::Key_Left: dx = -1; break; - case Qt::Key_Right: dx = +1; break; + case TQt::Key_Left: dx = -1; break; + case TQt::Key_Right: dx = +1; break; - case Qt::Key_End: dx = -1, dy = +1; break; - case Qt::Key_Down: dy = +1; break; - case Qt::Key_PageDown: dx = +1, dy = +1; break; + case TQt::Key_End: dx = -1, dy = +1; break; + case TQt::Key_Down: dy = +1; break; + case TQt::Key_PageDown: dx = +1, dy = +1; break; - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_Insert: - case Qt::Key_Clear/*Numpad 5 Key*/: + case TQt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Insert: + case TQt::Key_Clear/*Numpad 5 Key*/: { kpView *view = viewUnderCursor (); // TODO: wrong for dragging lines outside of view (for e.g.) if (view) @@ -1258,8 +1258,8 @@ void kpTool::keyPressEvent (TQKeyEvent *e) #endif - const int viewIncX = (dx ? QMAX (1, view->zoomLevelX () / 100) * dx : 0); - const int viewIncY = (dy ? QMAX (1, view->zoomLevelY () / 100) * dy : 0); + const int viewIncX = (dx ? TQMAX (1, view->zoomLevelX () / 100) * dx : 0); + const int viewIncY = (dy ? TQMAX (1, view->zoomLevelY () / 100) * dy : 0); int newViewX = oldPoint.x () + viewIncX; int newViewY = oldPoint.y () + viewIncY; @@ -1282,8 +1282,8 @@ void kpTool::keyPressEvent (TQKeyEvent *e) // TODO: visible width/height (e.g. with scrollbars) - int x = QMIN (QMAX (newViewX, 0), view->width () - 1); - int y = QMIN (QMAX (newViewY, 0), view->height () - 1); + int x = TQMIN (TQMAX (newViewX, 0), view->width () - 1); + int y = TQMIN (TQMAX (newViewY, 0), view->height () - 1); TQCursor::setPos (view->mapToGlobal (TQPoint (x, y))); e->accept (); @@ -1301,23 +1301,23 @@ void kpTool::keyReleaseEvent (TQKeyEvent *e) switch (e->key ()) { case 0: - case Qt::Key_unknown: + case TQt::Key_unknown: #if DEBUG_KP_TOOL kdDebug () << "kpTool::keyReleaseEvent() picked up unknown key!" << endl; #endif - // HACK: around Qt bug: if you hold a modifier before you start the + // HACK: around TQt bug: if you hold a modifier before you start the // program and then release it over the view, - // Qt reports it as the release of an unknown key + // TQt reports it as the release of an unknown key // --- fall thru and update all modifiers --- - case Qt::Key_Alt: - case Qt::Key_Shift: - case Qt::Key_Control: + case TQt::Key_Alt: + case TQt::Key_Shift: + case TQt::Key_Control: keyUpdateModifierState (e); e->accept (); break; - case Qt::Key_Escape: + case TQt::Key_Escape: if (hasBegunDraw ()) { cancelShapeInternal (); @@ -1326,10 +1326,10 @@ void kpTool::keyReleaseEvent (TQKeyEvent *e) break; - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_Insert: - case Qt::Key_Clear/*Numpad 5 Key*/: + case TQt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Insert: + case TQt::Key_Clear/*Numpad 5 Key*/: { kpView *view = viewUnderCursor (); if (view) @@ -1351,21 +1351,21 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e) #if DEBUG_KP_TOOL && 0 kdDebug () << "kpTool::updateModifierState() e->key=" << e->key () << endl; kdDebug () << "\tshift=" - << (e->stateAfter () & Qt::ShiftButton) + << (e->stateAfter () & TQt::ShiftButton) << " control=" - << (e->stateAfter () & Qt::ControlButton) + << (e->stateAfter () & TQt::ControlButton) << " alt=" - << (e->stateAfter () & Qt::AltButton) + << (e->stateAfter () & TQt::AltButton) << endl; #endif - if (e->key () & (Qt::Key_Alt | Qt::Key_Shift | Qt::Key_Control)) + if (e->key () & (TQt::Key_Alt | TQt::Key_Shift | TQt::Key_Control)) { #if DEBUG_KP_TOOL && 0 kdDebug () << "\t\tmodifier changed - use e's claims" << endl; #endif - setShiftPressed (e->stateAfter () & Qt::ShiftButton); - setControlPressed (e->stateAfter () & Qt::ControlButton); - setAltPressed (e->stateAfter () & Qt::AltButton); + setShiftPressed (e->stateAfter () & TQt::ShiftButton); + setControlPressed (e->stateAfter () & TQt::ControlButton); + setAltPressed (e->stateAfter () & TQt::AltButton); } else { @@ -1379,7 +1379,7 @@ void kpTool::keyUpdateModifierState (TQKeyEvent *e) // TODO: Can't do much about ALT - unless it's always KApplication::Modifier1? // Ditto for everywhere else where I set SHIFT & CTRL but not alt. - setAltPressed (e->stateAfter () & Qt::AltButton); + setAltPressed (e->stateAfter () & TQt::AltButton); } } @@ -1466,14 +1466,14 @@ void kpTool::leaveEvent (TQEvent *) } // static -int kpTool::mouseButton (const Qt::ButtonState &buttonState) +int kpTool::mouseButton (const TQt::ButtonState &buttonState) { // we have nothing to do with mid-buttons if (buttonState & Qt::MidButton) return -1; // both left & right together is quite meaningless... - Qt::ButtonState bothButtons = (Qt::ButtonState) (Qt::LeftButton | Qt::RightButton); + TQt::ButtonState bothButtons = (TQt::ButtonState) (Qt::LeftButton | Qt::RightButton); if ((buttonState & bothButtons) == bothButtons) return -1; @@ -1618,7 +1618,7 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight, const TQString &text, const TQString &caption, const TQString &continueButtonText, - TQWidget *parent) + TQWidget *tqparent) { #if DEBUG_KP_TOOL kdDebug () << "kpTool::warnIfBigImageSize()" @@ -1648,11 +1648,11 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight, if (kpPixmapFX::pixmapSize (newWidth, newHeight, TQPixmap::defaultDepth ()) >= KP_BIG_IMAGE_SIZE) { - int accept = KMessageBox::warningContinueCancel (parent, + int accept = KMessageBox::warningContinueCancel (tqparent, text, caption, continueButtonText, - TQString::fromLatin1 ("BigImageDontAskAgain")); + TQString::tqfromLatin1 ("BigImageDontAskAgain")); return (accept == KMessageBox::Continue); } diff --git a/kolourpaint/kptool.h b/kolourpaint/kptool.h index a0309463..1094b8d1 100644 --- a/kolourpaint/kptool.h +++ b/kolourpaint/kptool.h @@ -55,9 +55,10 @@ class kpToolToolBar; // Base class for all tools -class kpTool : public QObject +class kpTool : public TQObject { Q_OBJECT + TQ_OBJECT public: kpTool (const TQString &text, const TQString &description, @@ -328,7 +329,7 @@ protected: virtual void leaveEvent (TQEvent *e); // 0 = left, 1 = right, -1 = other (none, left+right, mid) - static int mouseButton (const Qt::ButtonState &buttonState); + static int mouseButton (const TQt::ButtonState &buttonState); TQString m_text, m_description; const char *m_name; @@ -340,7 +341,7 @@ protected: /* - * User Notifications (Status Bar) + * User Notifications (tqStatus Bar) */ public: @@ -350,7 +351,7 @@ public: TQString cancelUserMessage () const; TQString userMessage () const; - void setUserMessage (const TQString &userMessage = TQString::null); + void setUserMessage (const TQString &userMessage = TQString()); TQPoint userShapeStartPoint () const; TQPoint userShapeEndPoint () const; @@ -409,7 +410,7 @@ public: const TQString &text, const TQString &caption, const TQString &continueButtonText, - TQWidget *parent); + TQWidget *tqparent); protected: diff --git a/kolourpaint/kpview.cpp b/kolourpaint/kpview.cpp index 8e0020f6..3f64bbb9 100644 --- a/kolourpaint/kpview.cpp +++ b/kolourpaint/kpview.cpp @@ -102,9 +102,9 @@ kpView::kpView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) - : TQWidget (parent, name, Qt::WNoAutoErase/*no flicker*/), + : TQWidget (tqparent, name, TQt::WNoAutoErase/*no flicker*/), d (new kpViewPrivate ()) { d->m_document = document; @@ -121,8 +121,8 @@ kpView::kpView (kpDocument *document, d->m_backBuffer = 0; - setBackgroundMode (Qt::NoBackground); // no flicker - setFocusPolicy (TQWidget::WheelFocus); + setBackgroundMode (TQt::NoBackground); // no flicker + setFocusPolicy (TQ_WheelFocus); setMouseTracking (true); // mouseMoveEvent's even when no mousebtn down setKeyCompression (true); setInputMethodEnabled (true); // ensure using InputMethod @@ -385,9 +385,9 @@ void kpView::updateBuddyViewScrollableContainerRectangle () TQRect docRect = buddyView ()->transformViewToDoc ( TQRect (buddyViewScrollableContainer ()->contentsXSoon (), buddyViewScrollableContainer ()->contentsYSoon (), - QMIN (buddyView ()->width (), + TQMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()), - QMIN (buddyView ()->height (), + TQMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ()))); @@ -462,8 +462,8 @@ TQRect kpView::transformViewToDoc (const TQRect &viewRect) const const TQPoint docTopLeft = transformViewToDoc (viewRect.topLeft ()); // (don't call transformViewToDoc[XY]() - need to round up dimensions) - const int docWidth = qRound (double (viewRect.width ()) * 100.0 / double (zoomLevelX ())); - const int docHeight = qRound (double (viewRect.height ()) * 100.0 / double (zoomLevelY ())); + const int docWidth = tqRound (double (viewRect.width ()) * 100.0 / double (zoomLevelX ())); + const int docHeight = tqRound (double (viewRect.height ()) * 100.0 / double (zoomLevelY ())); // (like TQWMatrix::Areas) return TQRect (docTopLeft.x (), docTopLeft.y (), docWidth, docHeight); @@ -505,8 +505,8 @@ TQRect kpView::transformDocToView (const TQRect &docRect) const const TQPoint viewTopLeft = transformDocToView (docRect.topLeft ()); // (don't call transformDocToView[XY]() - need to round up dimensions) - const int viewWidth = qRound (double (docRect.width ()) * double (zoomLevelX ()) / 100.0); - const int viewHeight = qRound (double (docRect.height ()) * double (zoomLevelY ()) / 100.0); + const int viewWidth = tqRound (double (docRect.width ()) * double (zoomLevelX ()) / 100.0); + const int viewHeight = tqRound (double (docRect.height ()) * double (zoomLevelY ()) / 100.0); // (like TQWMatrix::Areas) return TQRect (viewTopLeft.x (), viewTopLeft.y (), viewWidth, viewHeight); @@ -590,10 +590,10 @@ void kpView::addToQueuedArea (const TQRect &rect) } // public -void kpView::invalidateQueuedArea () +void kpView::tqinvalidateQueuedArea () { #if DEBUG_KP_VIEW && 0 - kdDebug () << "kpView::invalidateQueuedArea()" << endl; + kdDebug () << "kpView::tqinvalidateQueuedArea()" << endl; #endif d->m_queuedUpdateArea = TQRegion (); @@ -621,7 +621,7 @@ void kpView::updateQueuedArea () if (!d->m_queuedUpdateArea.isNull ()) vm->updateView (this, d->m_queuedUpdateArea); - invalidateQueuedArea (); + tqinvalidateQueuedArea (); } // public @@ -668,7 +668,7 @@ bool kpView::mouseOnSelection (const TQPoint &viewPoint) const if (!selViewRect.isValid ()) return false; - return selViewRect.contains (mouseViewPoint (viewPoint)); + return selViewRect.tqcontains (mouseViewPoint (viewPoint)); } @@ -678,7 +678,7 @@ int kpView::textSelectionMoveBorderAtomicSize () const if (!selection () || !selection ()->isText ()) return 0; - return QMAX (4, zoomLevelX () / 100); + return TQMAX (4, zoomLevelX () / 100); } // public @@ -730,7 +730,7 @@ bool kpView::selectionLargeEnoughToHaveResizeHandlesIfAtomicSize (int atomicSize // public int kpView::selectionResizeHandleAtomicSize () const { - int atomicSize = QMIN (7, QMAX (4, zoomLevelX () / 100)); + int atomicSize = TQMIN (7, TQMAX (4, zoomLevelX () / 100)); while (atomicSize > 0 && !selectionLargeEnoughToHaveResizeHandlesIfAtomicSize (atomicSize)) { @@ -783,9 +783,9 @@ TQRegion kpView::selectionResizeHandlesViewRegion (bool forRenderer) const if (selection ()->isText () && selection ()->textLines ().size () == 1) { if (zoomLevelX () <= 150) - vertEdgeAtomicLength = QMIN (vertEdgeAtomicLength, QMAX (2, zoomLevelX () / 100)); + vertEdgeAtomicLength = TQMIN (vertEdgeAtomicLength, TQMAX (2, zoomLevelX () / 100)); else if (zoomLevelX () <= 250) - vertEdgeAtomicLength = QMIN (vertEdgeAtomicLength, QMAX (3, zoomLevelX () / 100)); + vertEdgeAtomicLength = TQMIN (vertEdgeAtomicLength, TQMAX (3, zoomLevelX () / 100)); } } @@ -874,7 +874,7 @@ int kpView::mouseOnSelectionResizeHandle (const TQPoint &viewPoint) const #define LOCAL_POINT_IN_BOX_AT(x,y) \ - TQRect ((x), (y), atomicLength, atomicLength).contains (viewPointRelSel) + TQRect ((x), (y), atomicLength, atomicLength).tqcontains (viewPointRelSel) // Favour the bottom & right and the corners. if (LOCAL_POINT_IN_BOX_AT (selViewRect.width () - atomicLength, @@ -957,7 +957,7 @@ bool kpView::mouseOnSelectionToSelectText (const TQPoint &viewPoint) const } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::mouseMoveEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -969,7 +969,7 @@ void kpView::mouseMoveEvent (TQMouseEvent *e) // TODO: This is wrong if you leaveEvent the mainView by mouseMoving on the // mainView, landing on top of the thumbnailView cleverly put on top // of the mainView. - setHasMouse (rect ().contains (e->pos ())); + setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())); if (tool ()) tool ()->mouseMoveEvent (e); @@ -977,7 +977,7 @@ void kpView::mouseMoveEvent (TQMouseEvent *e) e->accept (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::mousePressEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -994,7 +994,7 @@ void kpView::mousePressEvent (TQMouseEvent *e) e->accept (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::mouseReleaseEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1003,7 +1003,7 @@ void kpView::mouseReleaseEvent (TQMouseEvent *e) << endl; #endif - setHasMouse (rect ().contains (e->pos ())); + setHasMouse (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())); if (tool ()) tool ()->mouseReleaseEvent (e); @@ -1011,7 +1011,7 @@ void kpView::mouseReleaseEvent (TQMouseEvent *e) e->accept (); } -// public virtual [base QWidget] +// public virtual [base TQWidget] void kpView::wheelEvent (TQWheelEvent *e) { if (tool ()) @@ -1019,7 +1019,7 @@ void kpView::wheelEvent (TQWheelEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::keyPressEvent (TQKeyEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1032,7 +1032,7 @@ void kpView::keyPressEvent (TQKeyEvent *e) e->accept (); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::keyReleaseEvent (TQKeyEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1046,7 +1046,7 @@ void kpView::keyReleaseEvent (TQKeyEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::focusInEvent (TQFocusEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1056,7 +1056,7 @@ void kpView::focusInEvent (TQFocusEvent *e) tool ()->focusInEvent (e); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::focusOutEvent (TQFocusEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1067,7 +1067,7 @@ void kpView::focusOutEvent (TQFocusEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::enterEvent (TQEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1076,7 +1076,7 @@ void kpView::enterEvent (TQEvent *e) // Don't call setHasMouse(true) as it displays the brush cursor (if // active) when dragging open a menu and then dragging - // past the extents of the menu due to Qt sending us an EnterEvent. + // past the extents of the menu due to TQt sending us an EnterEvent. // We're already covered by MouseMoveEvent anyway. // // But disabling this causes a more serious problem: RMB on a text @@ -1089,7 +1089,7 @@ void kpView::enterEvent (TQEvent *e) tool ()->enterEvent (e); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::leaveEvent (TQEvent *e) { #if DEBUG_KP_VIEW && 0 @@ -1102,7 +1102,7 @@ void kpView::leaveEvent (TQEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::dragEnterEvent (TQDragEnterEvent *) { #if DEBUG_KP_VIEW && 1 @@ -1112,7 +1112,7 @@ void kpView::dragEnterEvent (TQDragEnterEvent *) setHasMouse (true); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::dragLeaveEvent (TQDragLeaveEvent *) { #if DEBUG_KP_VIEW && 1 @@ -1123,7 +1123,7 @@ void kpView::dragLeaveEvent (TQDragLeaveEvent *) } -// public virtual [base QWidget] +// public virtual [base TQWidget] void kpView::resize (int w, int h) { #if DEBUG_KP_VIEW && 1 @@ -1135,7 +1135,7 @@ void kpView::resize (int w, int h) TQWidget::resize (w, h); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_VIEW && 1 @@ -1270,7 +1270,7 @@ void kpView::drawTransparentBackground (TQPainter *painter, col = TQColor (224, 224, 224); } else - col = Qt::white; + col = TQt::white; painter->fillRect (x - rect.x (), y - rect.y (), cellSize, cellSize, col); @@ -1340,27 +1340,27 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec if (vm->selectionBorderVisible ()) { TQPainter destPixmapPainter (destPixmap); - destPixmapPainter.setRasterOp (Qt::XorROP); - destPixmapPainter.setPen (TQPen (Qt::white, 1, Qt::DotLine)); + destPixmapPainter.setRasterOp (TQt::XorROP); + destPixmapPainter.setPen (TQPen (TQt::white, 1, TQt::DotLine)); - destPixmapPainter.setBackgroundMode (TQPainter::OpaqueMode); - destPixmapPainter.setBackgroundColor (Qt::blue); + destPixmapPainter.setBackgroundMode (Qt::OpaqueMode); + destPixmapPainter.setBackgroundColor (TQt::blue); - TQBitmap maskBitmap; - TQPainter maskBitmapPainter; - if (destPixmap->mask ()) + TQBitmap tqmaskBitmap; + TQPainter tqmaskBitmapPainter; + if (destPixmap->tqmask ()) { - maskBitmap = *destPixmap->mask (); - maskBitmapPainter.begin (&maskBitmap); - maskBitmapPainter.setPen (Qt::color1/*opaque*/); + tqmaskBitmap = *destPixmap->tqmask (); + tqmaskBitmapPainter.begin (&tqmaskBitmap); + tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/); } #define PAINTER_CMD(cmd) \ { \ destPixmapPainter . cmd; \ - if (maskBitmapPainter.isActive ()) \ - maskBitmapPainter . cmd; \ + if (tqmaskBitmapPainter.isActive ()) \ + tqmaskBitmapPainter . cmd; \ } TQRect boundingRect = sel->boundingRect (); @@ -1432,7 +1432,7 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec { destPixmapPainter.save (); - destPixmapPainter.setRasterOp (Qt::NotROP); + destPixmapPainter.setRasterOp (TQt::NotROP); PAINTER_CMD (drawRect (boundingRect.x () - docRect.x (), boundingRect.y () - docRect.y (), boundingRect.width (), @@ -1443,17 +1443,17 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec } else { - // SYNC: Work around Qt bug: can't draw 1x1 rectangle + // SYNC: Work around TQt bug: can't draw 1x1 rectangle PAINTER_CMD (drawPoint (boundingRect.topLeft () - docRect.topLeft ())); } #undef PAINTER_CMD destPixmapPainter.end (); - if (maskBitmapPainter.isActive ()) - maskBitmapPainter.end (); + if (tqmaskBitmapPainter.isActive ()) + tqmaskBitmapPainter.end (); - destPixmap->setMask (maskBitmap); + destPixmap->setMask (tqmaskBitmap); } @@ -1480,24 +1480,24 @@ void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRec { rect.moveBy (-docRect.x (), -docRect.y ()); - TQBitmap maskBitmap; - TQPainter destPixmapPainter, maskBitmapPainter; + TQBitmap tqmaskBitmap; + TQPainter destPixmapPainter, tqmaskBitmapPainter; - if (destPixmap->mask ()) + if (destPixmap->tqmask ()) { - maskBitmap = *destPixmap->mask (); - maskBitmapPainter.begin (&maskBitmap); - maskBitmapPainter.fillRect (rect, Qt::color1/*opaque*/); - maskBitmapPainter.end (); + tqmaskBitmap = *destPixmap->tqmask (); + tqmaskBitmapPainter.begin (&tqmaskBitmap); + tqmaskBitmapPainter.fillRect (rect, TQt::color1/*opaque*/); + tqmaskBitmapPainter.end (); } destPixmapPainter.begin (destPixmap); - destPixmapPainter.setRasterOp (Qt::XorROP); - destPixmapPainter.fillRect (rect, Qt::white); + destPixmapPainter.setRasterOp (TQt::XorROP); + destPixmapPainter.fillRect (rect, TQt::white); destPixmapPainter.end (); - if (!maskBitmap.isNull ()) - destPixmap->setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + destPixmap->setMask (tqmaskBitmap); } } } @@ -1559,16 +1559,16 @@ void kpView::paintEventDrawSelectionResizeHandles (TQPainter *painter, const TQR TQColor fillColor; if (selectionResizeHandleAtomicSizeCloseToZoomLevel ()) { - fillColor = Qt::blue; - painter->setRasterOp (Qt::CopyROP); + fillColor = TQt::blue; + painter->setRasterOp (TQt::CopyROP); } else { - fillColor = Qt::white; - painter->setRasterOp (Qt::XorROP); + fillColor = TQt::white; + painter->setRasterOp (TQt::XorROP); } - TQMemArray <TQRect> rects = selResizeHandlesRegion.rects (); + TQMemArray <TQRect> rects = selResizeHandlesRegion.tqrects (); for (TQMemArray <TQRect>::ConstIterator it = rects.begin (); it != rects.end (); it++) @@ -1607,8 +1607,8 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect int hzoomMultiple = zoomLevelX () / 100; int vzoomMultiple = zoomLevelY () / 100; - TQPen ordinaryPen (Qt::gray); - TQPen tileBoundaryPen (Qt::lightGray); + TQPen ordinaryPen (TQt::gray); + TQPen tileBoundaryPen (TQt::lightGray); painter->setPen (ordinaryPen); @@ -1622,7 +1622,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect if (0 && tileHeight > 0 && y % tileHeight == 0) { painter->setPen (tileBoundaryPen); - //painter.setRasterOp (Qt::XorROP); + //painter.setRasterOp (TQt::XorROP); } painter->drawLine (0, y, viewRect.right () - viewRect.left (), y); @@ -1630,7 +1630,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect if (0 && tileHeight > 0 && y % tileHeight == 0) { painter->setPen (ordinaryPen); - //painter.setRasterOp (Qt::CopyROP); + //painter.setRasterOp (TQt::CopyROP); } } @@ -1644,7 +1644,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect if (0 && tileWidth > 0 && x % tileWidth == 0) { painter->setPen (tileBoundaryPen); - //painter.setRasterOp (Qt::XorROP); + //painter.setRasterOp (TQt::XorROP); } painter->drawLine (x, 0, x, viewRect.bottom () - viewRect.top ()); @@ -1652,7 +1652,7 @@ void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect if (0 && tileWidth > 0 && x % tileWidth == 0) { painter->setPen (ordinaryPen); - //painter.setRasterOp (Qt::CopyROP); + //painter.setRasterOp (TQt::CopyROP); } } } @@ -1685,7 +1685,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) // uncomment to cause deliberate flicker (identifies needless updates) #if DEBUG_KP_VIEW_RENDERER && 0 TQPainter flickerPainter (this); - flickerPainter.fillRect (viewRect, Qt::red); + flickerPainter.fillRect (viewRect, TQt::red); flickerPainter.end (); #endif @@ -1711,7 +1711,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) // uncomment to catch bits of the view that the renderer forgot to update #if 0 - d->m_backBuffer->fill (Qt::green); + d->m_backBuffer->fill (TQt::green); #endif TQPainter backBufferPainter; @@ -1747,11 +1747,11 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) #endif } - if (docPixmap.mask () || + if (docPixmap.tqmask () || (tempPixmapWillBeRendered && vm->tempPixmap ()->mayChangeDocumentMask ())) { #if DEBUG_KP_VIEW_RENDERER && 1 - kdDebug () << "\tmask=" << (bool) docPixmap.mask () + kdDebug () << "\ttqmask=" << (bool) docPixmap.tqmask () << endl; #endif paintEventDrawCheckerBoard (&backBufferPainter, viewRect); @@ -1759,7 +1759,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) else { #if DEBUG_KP_VIEW_RENDERER && 1 - kdDebug () << "\tno mask" << endl; + kdDebug () << "\tno tqmask" << endl; #endif } @@ -1820,8 +1820,8 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) { backBufferPainter.save (); - backBufferPainter.setRasterOp (Qt::XorROP); - backBufferPainter.setPen (Qt::white); + backBufferPainter.setRasterOp (TQt::XorROP); + backBufferPainter.setPen (TQt::white); backBufferPainter.translate (-viewRect.x (), -viewRect.y ()); backBufferPainter.drawRect (bvsvRect); @@ -1850,7 +1850,7 @@ void kpView::paintEventDrawRect (const TQRect &viewRect) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpView::paintEvent (TQPaintEvent *e) { // sync: kpViewPrivate @@ -1888,7 +1888,7 @@ void kpView::paintEvent (TQPaintEvent *e) TQRegion viewRegion = clipRegion ().intersect (e->region ()); - TQMemArray <TQRect> rects = viewRegion.rects (); + TQMemArray <TQRect> rects = viewRegion.tqrects (); #if DEBUG_KP_VIEW_RENDERER && 1 kdDebug () << "\t#rects = " << rects.count () << endl; #endif diff --git a/kolourpaint/kpview.h b/kolourpaint/kpview.h index 6464d869..66471489 100644 --- a/kolourpaint/kpview.h +++ b/kolourpaint/kpview.h @@ -56,9 +56,10 @@ class kpViewScrollableContainer; * * @author Clarence Dang <dang@kde.org> */ -class kpView : public QWidget +class kpView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** @@ -80,7 +81,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs this view. Informs the viewManager() that the mouse @@ -147,8 +148,8 @@ public: /** * Sets the horizontal and vertical zoom levels. * - * @param hzoom Horizontal zoom level. - * @param vzoom Vertical zoom level. + * @param hzoomQt::Horizontal zoom level. + * @param vzoomQt::Vertical zoom level. * * If reimplementing, you must call this base implementation. */ @@ -227,7 +228,7 @@ protected slots: public: /** - * @param viewX Horizontal position in view coordinates. + * @param viewXQt::Horizontal position in view coordinates. * * @returns viewX transformed to document coordinates, based on the * origin() and zoomLevelX(). @@ -235,7 +236,7 @@ public: double transformViewToDocX (double viewX) const; /** - * @param viewY Vertical position in view coordinates. + * @param viewYQt::Vertical position in view coordinates. * * @returns viewY transformed to document coordinates, based on the * origin() and zoomLevelY(). @@ -264,7 +265,7 @@ public: /** - * @param docX Horizontal position in document coordinates. + * @param docXQt::Horizontal position in document coordinates. * * @returns docX transformed to view coordinates, based on the origin() * and zoomLevelX(). @@ -272,7 +273,7 @@ public: double transformDocToViewX (double docX) const; /** - * @param docY Vertical position in document coordinates. + * @param docYQt::Vertical position in document coordinates. * * @returns docY transformed to view coordinates, based on the origin() * and zoomLevelY(). @@ -343,10 +344,10 @@ protected: public: /** * Adds a region (in view coordinates) to the dirty area that is - * repainted when the parent @ref kpViewManager is set not to queue + * tqrepainted when the tqparent @ref kpViewManager is set not to queue * updates. * - * @param region Region (in view coordinates) that needs repainting. + * @param region Region (in view coordinates) that needs tqrepainting. */ void addToQueuedArea (const TQRegion ®ion); @@ -354,10 +355,10 @@ public: * Convenience function. Same as above. * * Adds a rectangle (in view coordinates) to the dirty area that is - * repainted when the parent @ref kpViewManager is set not to queue + * tqrepainted when the tqparent @ref kpViewManager is set not to queue * updates. * - * @param rect Rectangle (in view coordinates) that needs repainting. + * @param rect Rectangle (in view coordinates) that needs tqrepainting. */ void addToQueuedArea (const TQRect &rect); @@ -365,11 +366,11 @@ public: * Removes the dirty region that has been queued for updating. * Does not update the view. */ - void invalidateQueuedArea (); + void tqinvalidateQueuedArea (); /** * Updates the part of the view described by dirty region and then - * calls invalidateQueuedArea(). Does nothing if @ref kpViewManager + * calls tqinvalidateQueuedArea(). Does nothing if @ref kpViewManager * is set to queue updates. */ void updateQueuedArea (); diff --git a/kolourpaint/kpviewmanager.cpp b/kolourpaint/kpviewmanager.cpp index acff3413..e7a095fd 100644 --- a/kolourpaint/kpviewmanager.cpp +++ b/kolourpaint/kpviewmanager.cpp @@ -78,7 +78,7 @@ void kpViewManager::registerView (kpView *view) #if DEBUG_KP_VIEW_MANAGER && 1 kdDebug () << "kpViewManager::registerView (" << view << ")" << endl; #endif - if (view && m_views.findRef (view) < 0) + if (view && m_views.tqfindRef (view) < 0) { #if DEBUG_KP_VIEW_MANAGER && 1 kdDebug () << "\tadded view" << endl; @@ -152,7 +152,7 @@ void kpViewManager::setTempPixmap (const kpTempPixmap &tempPixmap) } // public -void kpViewManager::invalidateTempPixmap () +void kpViewManager::tqinvalidateTempPixmap () { if (!m_tempPixmap) return; @@ -463,13 +463,13 @@ void kpViewManager::unsetCursor () } -kpView *kpViewManager::viewUnderCursor (bool usingQt) const +kpView *kpViewManager::viewUnderCursor (bool usingTQt) const { - if (!usingQt) + if (!usingTQt) { kpViewManager *nonConstThis = const_cast <kpViewManager *> (this); - if (m_viewUnderCursor && nonConstThis->m_views.findRef (m_viewUnderCursor) < 0) + if (m_viewUnderCursor && nonConstThis->m_views.tqfindRef (m_viewUnderCursor) < 0) { kdError () << "kpViewManager::viewUnderCursor(): invalid view" << endl; nonConstThis->m_viewUnderCursor = 0; @@ -628,7 +628,7 @@ void kpViewManager::updateView (kpView *v, const TQRect &viewRect) if (!queueUpdates ()) { if (fastUpdates ()) - v->repaint (viewRect, false/*no erase*/); + v->tqrepaint (viewRect, false/*no erase*/); else v->update (viewRect); } @@ -646,7 +646,7 @@ void kpViewManager::updateView (kpView *v, const TQRegion &viewRegion) if (!queueUpdates ()) { if (fastUpdates ()) - v->repaint (viewRegion, false/*no erase*/); + v->tqrepaint (viewRegion, false/*no erase*/); else v->update (viewRegion.boundingRect ()); } @@ -719,7 +719,7 @@ void kpViewManager::updateViews (const TQRect &docRect) { TQRect viewRect = view->transformDocToView (docRect); - int diff = qRound (double (QMAX (view->zoomLevelX (), view->zoomLevelY ())) / 100.0) + 1; + int diff = tqRound (double (TQMAX (view->zoomLevelX (), view->zoomLevelY ())) / 100.0) + 1; TQRect newRect = TQRect (viewRect.x () - diff, viewRect.y () - diff, diff --git a/kolourpaint/kpviewmanager.h b/kolourpaint/kpviewmanager.h index 9bb6e8b6..db2724ce 100644 --- a/kolourpaint/kpviewmanager.h +++ b/kolourpaint/kpviewmanager.h @@ -44,9 +44,10 @@ class kpView; class kpMainWindow; class kpTempPixmap; -class kpViewManager : public QObject +class kpViewManager : public TQObject { Q_OBJECT + TQ_OBJECT public: kpViewManager (kpMainWindow *mainWindow); @@ -68,7 +69,7 @@ public: const kpTempPixmap *tempPixmap () const; void setTempPixmap (const kpTempPixmap &tempPixmap); - void invalidateTempPixmap (); + void tqinvalidateTempPixmap (); // @@ -120,7 +121,7 @@ public: // View // - kpView *viewUnderCursor (bool usingQt = false) const; + kpView *viewUnderCursor (bool usingTQt = false) const; // // TQWidget::hasMouse() is unreliable: @@ -156,18 +157,18 @@ public: // // This is better than TQWidget::setUpdatesEnabled() because // restoreQueueUpdates() automatically restores only the regions - // of the views that need to be repainted, per view. + // of the views that need to be tqrepainted, per view. bool queueUpdates () const; void setQueueUpdates (); void restoreQueueUpdates (); // Controls behaviour of updateViews(): // - // Slow: Let Qt buffer paint events via TQWidget::update(). + // Slow: Let TQt buffer paint events via TQWidget::update(). // Results in less flicker. Paint events are probably merged // so long-term efficiency is increased at the expense of // reduced responsiveness (default). - // Fast: Force Qt to redraw immediately. No paint events + // Fast: Force TQt to redraw immediately. No paint events // are merged so there is great potential for flicker, // if used inappropriately. Use this when the redraw // area is small and KolourPaint's responsiveness is diff --git a/kolourpaint/kpviewscrollablecontainer.cpp b/kolourpaint/kpviewscrollablecontainer.cpp index c3942806..feeb5a1b 100644 --- a/kolourpaint/kpviewscrollablecontainer.cpp +++ b/kolourpaint/kpviewscrollablecontainer.cpp @@ -58,8 +58,8 @@ static const int GripHandleSize = 7; kpGrip::kpGrip (GripType type, - TQWidget *parent, const char *name) - : TQWidget (parent, name), + TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name), m_type (type), m_startPoint (KP_INVALID_POINT), m_currentPoint (KP_INVALID_POINT), @@ -90,19 +90,19 @@ const TQCursor &kpGrip::cursorForType (GripType type) switch (type) { case Bottom: - return Qt::sizeVerCursor; + return TQt::sizeVerCursor; break; // one day you'll forget case Right: - return Qt::sizeHorCursor; + return TQt::sizeHorCursor; break; // one day you'll forget case BottomRight: - return Qt::sizeFDiagCursor; + return TQt::sizeFDiagCursor; break; // one day you'll forget } - return Qt::arrowCursor; + return TQt::arrowCursor; } @@ -166,7 +166,7 @@ TQString kpGrip::userMessage () const void kpGrip::setUserMessage (const TQString &message) { // Don't do NOP checking here since another grip might have changed - // the message so an apparent NOP for this grip is not a NOP in the + // the message so an aptqparent NOP for this grip is not a NOP in the // global sense (kpViewScrollableContainer::slotGripStatusMessageChanged()). m_userMessage = message; @@ -184,7 +184,7 @@ void kpGrip::updatePixmap () return; TQPixmap pixmap (width (), height ()); - pixmap.fill (colorGroup ().highlight ()); + pixmap.fill (tqcolorGroup ().highlight ()); kpPixmapFX::ensureTransparentAt (&pixmap, pixmap.rect ()); const TQRect hr = hotRect (); #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -194,8 +194,8 @@ void kpGrip::updatePixmap () kpPixmapFX::ensureOpaqueAt (&pixmap, hr); setBackgroundPixmap (pixmap); - if (pixmap.mask ()) - setMask (*pixmap.mask ()); + if (pixmap.tqmask ()) + setMask (*pixmap.tqmask ()); } @@ -212,7 +212,7 @@ void kpGrip::cancel () m_currentPoint = KP_INVALID_POINT; setUserMessage (i18n ("Resize Image: Let go of all the mouse buttons.")); - setCursor (Qt::arrowCursor); + setCursor (TQt::arrowCursor); m_shouldReleaseMouseButtons = true; releaseKeyboard (); @@ -220,17 +220,17 @@ void kpGrip::cancel () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::keyReleaseEvent (TQKeyEvent *e) { if (m_startPoint != KP_INVALID_POINT && - e->key () == Qt::Key_Escape) + e->key () == TQt::Key_Escape) { cancel (); } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::mousePressEvent (TQMouseEvent *e) { if (m_startPoint == KP_INVALID_POINT && @@ -279,7 +279,7 @@ void kpGrip::mouseMovedTo (const TQPoint &point, bool dueToDragScroll) dueToDragScroll); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::mouseMoveEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -298,7 +298,7 @@ void kpGrip::mouseMoveEvent (TQMouseEvent *e) mouseMovedTo (e->pos (), false/*not due to drag scroll*/); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::mouseReleaseEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -323,7 +323,7 @@ void kpGrip::mouseReleaseEvent (TQMouseEvent *e) if ((e->stateAfter () & Qt::MouseButtonMask) == 0) { m_shouldReleaseMouseButtons = false; - setUserMessage (TQString::null); + setUserMessage (TQString()); setCursor (cursorForType (m_type)); releaseKeyboard (); @@ -332,7 +332,7 @@ void kpGrip::mouseReleaseEvent (TQMouseEvent *e) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::resizeEvent (TQResizeEvent *) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -342,7 +342,7 @@ void kpGrip::resizeEvent (TQResizeEvent *) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::enterEvent (TQEvent * /*e*/) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -362,7 +362,7 @@ void kpGrip::enterEvent (TQEvent * /*e*/) } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::leaveEvent (TQEvent * /*e*/) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -374,12 +374,12 @@ void kpGrip::leaveEvent (TQEvent * /*e*/) if (m_startPoint == KP_INVALID_POINT && !m_shouldReleaseMouseButtons) { - setUserMessage (TQString::null); + setUserMessage (TQString()); } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpGrip::paintEvent (TQPaintEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0 @@ -390,10 +390,10 @@ void kpGrip::paintEvent (TQPaintEvent *e) // TODO: Are we checking for m_view == 0 often enough? -kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *parent, +kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *tqparent, const char *name) - : TQScrollView ((TQWidget *) parent, name, Qt::WStaticContents | Qt::WNoAutoErase), - m_mainWindow (parent), + : TQScrollView ((TQWidget *) tqparent, name, TQt::WStaticContents | TQt::WNoAutoErase), + m_mainWindow (tqparent), m_contentsXSoon (-1), m_contentsYSoon (-1), m_view (0), m_bottomGrip (new kpGrip (kpGrip::Bottom, viewport (), "Bottom Grip")), @@ -500,9 +500,9 @@ void kpViewScrollableContainer::clearStatusMessage () #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 1 kdDebug () << "kpViewScrollableContainer::clearStatusMessage()" << endl; #endif - m_bottomRightGrip->setUserMessage (TQString::null); - m_bottomGrip->setUserMessage (TQString::null); - m_rightGrip->setUserMessage (TQString::null); + m_bottomRightGrip->setUserMessage (TQString()); + m_bottomGrip->setUserMessage (TQString()); + m_rightGrip->setUserMessage (TQString()); } @@ -518,7 +518,7 @@ TQSize kpViewScrollableContainer::newDocSize (int viewDX, int viewDY) const const int docX = (int) m_view->transformViewToDocX (m_view->width () + viewDX); const int docY = (int) m_view->transformViewToDocY (m_view->height () + viewDY); - return TQSize (QMAX (1, docX), QMAX (1, docY)); + return TQSize (TQMAX (1, docX), TQMAX (1, docY)); } @@ -552,7 +552,7 @@ int kpViewScrollableContainer::bottomResizeLineWidth () const return -1; if (docResizingGrip ()->type () & kpGrip::Bottom) - return QMAX (m_view->zoomLevelY () / 100, 1); + return TQMAX (m_view->zoomLevelY () / 100, 1); else return 1; } @@ -567,7 +567,7 @@ int kpViewScrollableContainer::rightResizeLineWidth () const return -1; if (docResizingGrip ()->type () & kpGrip::Right) - return QMAX (m_view->zoomLevelX () / 100, 1); + return TQMAX (m_view->zoomLevelX () / 100, 1); else return 1; } @@ -644,7 +644,7 @@ TQRect kpViewScrollableContainer::mapViewToGlobal (const TQRect &viewRect) // protected -void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect ( +void kpViewScrollableContainer::tqrepaintWidgetAtResizeLineViewRect ( TQWidget *widget, const TQRect &resizeLineViewRect) { const TQRect resizeLineGlobalRect = mapViewToGlobal (resizeLineViewRect); @@ -660,19 +660,19 @@ void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect ( if (redrawWidgetRect.isValid ()) { - // TODO: should be "!widget->testWFlags (Qt::WRepaintNoErase)" + // TODO: should be "!widget->testWFlags (TQt::WRepaintNoErase)" // but for some reason, doesn't work for viewport(). const bool erase = !dynamic_cast <kpView *> (widget); - widget->repaint (redrawWidgetRect, erase); + widget->tqrepaint (redrawWidgetRect, erase); } } // protected -void kpViewScrollableContainer::repaintWidgetAtResizeLines (TQWidget *widget) +void kpViewScrollableContainer::tqrepaintWidgetAtResizeLines (TQWidget *widget) { - repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); - repaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ()); - repaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ()); + tqrepaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); + tqrepaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ()); + tqrepaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ()); } // protected @@ -680,12 +680,12 @@ void kpViewScrollableContainer::eraseResizeLines () { if (m_resizeRoundedLastViewX >= 0 && m_resizeRoundedLastViewY >= 0) { - repaintWidgetAtResizeLines (viewport ()); - repaintWidgetAtResizeLines (m_view); + tqrepaintWidgetAtResizeLines (viewport ()); + tqrepaintWidgetAtResizeLines (m_view); - repaintWidgetAtResizeLines (m_bottomGrip); - repaintWidgetAtResizeLines (m_rightGrip); - repaintWidgetAtResizeLines (m_bottomRightGrip); + tqrepaintWidgetAtResizeLines (m_bottomGrip); + tqrepaintWidgetAtResizeLines (m_rightGrip); + tqrepaintWidgetAtResizeLines (m_bottomRightGrip); } } @@ -702,19 +702,19 @@ void kpViewScrollableContainer::drawResizeLines () TQPainter p (viewport (), true/*unclipped*/); - p.setRasterOp (Qt::NotROP); + p.setRasterOp (TQt::NotROP); const TQRect rightRect = rightResizeLineRect (); if (rightRect.isValid ()) - p.fillRect (mapViewToViewport (rightRect), Qt::white); + p.fillRect (mapViewToViewport (rightRect), TQt::white); const TQRect bottomRect = bottomResizeLineRect (); if (bottomRect.isValid ()) - p.fillRect (mapViewToViewport (bottomRect), Qt::white); + p.fillRect (mapViewToViewport (bottomRect), TQt::white); const TQRect bottomRightRect = bottomRightResizeLineRect (); if (bottomRightRect.isValid ()) - p.fillRect (mapViewToViewport (bottomRightRect), Qt::white); + p.fillRect (mapViewToViewport (bottomRightRect), TQt::white); p.end (); } @@ -816,8 +816,8 @@ void kpViewScrollableContainer::slotGripContinuedDraw (int inViewDX, int inViewD m_haveMovedFromOriginalDocSize = true; - updateResizeLines (QMAX (1, QMAX (m_view->width () + viewDX, (int) m_view->transformDocToViewX (1))), - QMAX (1, QMAX (m_view->height () + viewDY, (int) m_view->transformDocToViewY (1))), + updateResizeLines (TQMAX (1, TQMAX (m_view->width () + viewDX, (int) m_view->transformDocToViewX (1))), + TQMAX (1, TQMAX (m_view->height () + viewDY, (int) m_view->transformDocToViewY (1))), viewDX, viewDY); emit continuedDocResize (newDocSize ()); @@ -881,7 +881,7 @@ void kpViewScrollableContainer::recalculateStatusMessage () { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER kdDebug () << "kpViewScrollabelContainer::recalculateStatusMessage()" << endl; - kdDebug () << "\tQCursor::pos=" << TQCursor::pos () + kdDebug () << "\tTQCursor::pos=" << TQCursor::pos () << " global visibleRect=" << kpWidgetMapper::toGlobal (this, TQRect (0, 0, visibleWidth (), visibleHeight ())) @@ -898,23 +898,23 @@ void kpViewScrollableContainer::recalculateStatusMessage () // if (kpWidgetMapper::toGlobal (this, TQRect (0, 0, visibleWidth (), visibleHeight ())) - .contains (TQCursor::pos ())) + .tqcontains (TQCursor::pos ())) { if (m_bottomRightGrip->isShown () && m_bottomRightGrip->hotRect (true/*to global*/) - .contains (TQCursor::pos ())) + .tqcontains (TQCursor::pos ())) { m_bottomRightGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } else if (m_bottomGrip->isShown () && m_bottomGrip->hotRect (true/*to global*/) - .contains (TQCursor::pos ())) + .tqcontains (TQCursor::pos ())) { m_bottomGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } else if (m_rightGrip->isShown () && m_rightGrip->hotRect (true/*to global*/) - .contains (TQCursor::pos ())) + .tqcontains (TQCursor::pos ())) { m_rightGrip->setUserMessage (i18n ("Left drag the handle to resize the image.")); } @@ -988,7 +988,7 @@ void kpViewScrollableContainer::connectViewSignals () } -// public virtual [base QScrollView] +// public virtual [base TQScrollView] void kpViewScrollableContainer::addChild (TQWidget *widget, int x, int y) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1119,7 +1119,7 @@ bool kpViewScrollableContainer::beginDragScroll (const TQPoint &/*docPoint*/, bool stopDragScroll = true; bool scrolled = false; - if (!noDragScrollRect ().contains (p)) + if (!noDragScrollRect ().tqcontains (p)) { if (m_dragScrollTimer->isActive ()) { @@ -1241,8 +1241,8 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething) << endl; #endif - dx *= dxMultiplier;// * QMAX (1, m_zoomLevel / 100); - dy *= dyMultiplier;// * QMAX (1, m_zoomLevel / 100); + dx *= dxMultiplier;// * TQMAX (1, m_zoomLevel / 100); + dy *= dyMultiplier;// * TQMAX (1, m_zoomLevel / 100); if (dx || dy) { @@ -1269,7 +1269,7 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething) // Repaint newly exposed region immediately to reduce tearing // of scrollView. - m_view->repaint (region, false/*no erase*/); + m_view->tqrepaint (region, false/*no erase*/); } } @@ -1284,7 +1284,7 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething) return scrolled; } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::contentsDragMoveEvent (TQDragMoveEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1303,7 +1303,7 @@ bool kpViewScrollableContainer::slotDragScroll () } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::contentsMouseMoveEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1315,7 +1315,7 @@ void kpViewScrollableContainer::contentsMouseMoveEvent (TQMouseEvent *e) TQScrollView::contentsMouseMoveEvent (e); } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::mouseMoveEvent (TQMouseEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1328,7 +1328,7 @@ void kpViewScrollableContainer::mouseMoveEvent (TQMouseEvent *e) } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::contentsWheelEvent (TQWheelEvent *e) { e->ignore (); @@ -1348,13 +1348,13 @@ TQRect kpViewScrollableContainer::noDragScrollRect () const height () - DragScrollLeftTopMargin - DragScrollRightBottomMargin); } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] bool kpViewScrollableContainer::eventFilter (TQObject *watchedObject, TQEvent *event) { return TQScrollView::eventFilter (watchedObject, event); } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::viewportPaintEvent (TQPaintEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER @@ -1366,7 +1366,7 @@ void kpViewScrollableContainer::viewportPaintEvent (TQPaintEvent *e) TQScrollView::viewportPaintEvent (e); } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpViewScrollableContainer::paintEvent (TQPaintEvent *e) { #if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0 @@ -1378,7 +1378,7 @@ void kpViewScrollableContainer::paintEvent (TQPaintEvent *e) TQScrollView::paintEvent (e); } -// protected virtual [base QScrollView] +// protected virtual [base TQScrollView] void kpViewScrollableContainer::resizeEvent (TQResizeEvent *e) { TQScrollView::resizeEvent (e); diff --git a/kolourpaint/kpviewscrollablecontainer.h b/kolourpaint/kpviewscrollablecontainer.h index ad948e9a..08f79b1e 100644 --- a/kolourpaint/kpviewscrollablecontainer.h +++ b/kolourpaint/kpviewscrollablecontainer.h @@ -45,9 +45,10 @@ class kpMainWindow; // TODO: refactor by sharing iface's with kpTool -class kpGrip : public QWidget +class kpGrip : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum GripType @@ -57,7 +58,7 @@ public: }; kpGrip (GripType type, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpGrip (); GripType type () const; @@ -112,12 +113,13 @@ protected: }; -class kpViewScrollableContainer : public QScrollView +class kpViewScrollableContainer : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - kpViewScrollableContainer (kpMainWindow *parent, const char *name = 0); + kpViewScrollableContainer (kpMainWindow *tqparent, const char *name = 0); virtual ~kpViewScrollableContainer (); // Same as contentsX() and contentsY() except that after @@ -169,9 +171,9 @@ protected: TQRect mapViewportToGlobal (const TQRect &viewportRect); TQRect mapViewToGlobal (const TQRect &viewRect); - void repaintWidgetAtResizeLineViewRect (TQWidget *widget, + void tqrepaintWidgetAtResizeLineViewRect (TQWidget *widget, const TQRect &resizeLineViewRect); - void repaintWidgetAtResizeLines (TQWidget *widget); + void tqrepaintWidgetAtResizeLines (TQWidget *widget); void eraseResizeLines (); void drawResizeLines (); @@ -211,7 +213,7 @@ protected slots: void slotViewDestroyed (); public slots: - // TODO: Why the QPoint's? + // TODO: Why the TQPoint's? // Why the need for view's zoomLevel? We have the view() anyway. bool beginDragScroll (const TQPoint &, const TQPoint &, int zoomLevel, diff --git a/kolourpaint/patches/doc_resize_no_flicker.diff b/kolourpaint/patches/doc_resize_no_flicker.diff index ae5f9aba..3e763f95 100644 --- a/kolourpaint/patches/doc_resize_no_flicker.diff +++ b/kolourpaint/patches/doc_resize_no_flicker.diff @@ -117,9 +117,9 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp + // protected --void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect ( +-void kpViewScrollableContainer::tqrepaintWidgetAtResizeLineViewRect ( - QWidget *widget, const QRect &resizeLineViewRect) -+void kpViewScrollableContainer::repaintWidgetRegion ( ++void kpViewScrollableContainer::tqrepaintWidgetRegion ( + QWidget *widget, + const QRegion &viewRegion) { @@ -147,18 +147,18 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp // TODO: should be "!widget->testWFlags (Qt::WRepaintNoErase)" // but for some reason, doesn't work for viewport(). const bool erase = !dynamic_cast <kpView *> (widget); -- widget->repaint (redrawWidgetRect, erase); -+ widget->repaint (redrawWidgetRegion, erase); +- widget->tqrepaint (redrawWidgetRect, erase); ++ widget->tqrepaint (redrawWidgetRegion, erase); } } // protected --void kpViewScrollableContainer::repaintWidgetAtResizeLines (QWidget *widget) +-void kpViewScrollableContainer::tqrepaintWidgetAtResizeLines (QWidget *widget) +void kpViewScrollableContainer::eraseResizeLines (const QRegion &viewRegion) { -- repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); -- repaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ()); -- repaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ()); +- tqrepaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ()); +- tqrepaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ()); +- tqrepaintWidgetAtResizeLineViewRect (widget, bottomRightResizeLineRect ()); -} + if (viewRegion.isEmpty ()) + return; @@ -168,19 +168,19 @@ diff -u -p -r1.7 kpviewscrollablecontainer.cpp -{ - if (m_resizeRoundedLastViewX >= 0 && m_resizeRoundedLastViewY >= 0) - { -- repaintWidgetAtResizeLines (viewport ()); -- repaintWidgetAtResizeLines (m_view); +- tqrepaintWidgetAtResizeLines (viewport ()); +- tqrepaintWidgetAtResizeLines (m_view); -- repaintWidgetAtResizeLines (m_bottomGrip); -- repaintWidgetAtResizeLines (m_rightGrip); -- repaintWidgetAtResizeLines (m_bottomRightGrip); +- tqrepaintWidgetAtResizeLines (m_bottomGrip); +- tqrepaintWidgetAtResizeLines (m_rightGrip); +- tqrepaintWidgetAtResizeLines (m_bottomRightGrip); - } -+ repaintWidgetRegion (viewport (), viewRegion); -+ repaintWidgetRegion (m_view, viewRegion); ++ tqrepaintWidgetRegion (viewport (), viewRegion); ++ tqrepaintWidgetRegion (m_view, viewRegion); + -+ repaintWidgetRegion (m_bottomGrip, viewRegion); -+ repaintWidgetRegion (m_rightGrip, viewRegion); -+ repaintWidgetRegion (m_bottomRightGrip, viewRegion); ++ tqrepaintWidgetRegion (m_bottomGrip, viewRegion); ++ tqrepaintWidgetRegion (m_rightGrip, viewRegion); ++ tqrepaintWidgetRegion (m_bottomRightGrip, viewRegion); } @@ -502,11 +502,11 @@ diff -u -p -r1.3 kpviewscrollablecontainer.h QRect mapViewToGlobal (const QRect &viewRect); + QRegion mapViewToGlobal (const QRegion &viewRegion); -- void repaintWidgetAtResizeLineViewRect (QWidget *widget, +- void tqrepaintWidgetAtResizeLineViewRect (QWidget *widget, - const QRect &resizeLineViewRect); -- void repaintWidgetAtResizeLines (QWidget *widget); +- void tqrepaintWidgetAtResizeLines (QWidget *widget); - void eraseResizeLines (); -+ void repaintWidgetRegion (QWidget *widget, ++ void tqrepaintWidgetRegion (QWidget *widget, + const QRegion &viewRegion); + void eraseResizeLines (const QRegion &viewRegion); @@ -519,7 +519,7 @@ diff -u -p -r1.3 kpviewscrollablecontainer.h virtual void viewportPaintEvent (QPaintEvent *e); virtual void paintEvent (QPaintEvent *e); -+protected slots: ++protected Q_SLOTS: + void windowActivationChanged (); +protected: + virtual void windowActivationChange (bool wasActive); diff --git a/kolourpaint/pixmapfx/kpcoloreffect.cpp b/kolourpaint/pixmapfx/kpcoloreffect.cpp index b0e04496..9b8262dd 100644 --- a/kolourpaint/pixmapfx/kpcoloreffect.cpp +++ b/kolourpaint/pixmapfx/kpcoloreffect.cpp @@ -80,7 +80,7 @@ void kpColorEffectCommand::execute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); const TQPixmap oldPixmap = *doc->pixmap (m_actOnSelection); @@ -107,7 +107,7 @@ void kpColorEffectCommand::unexecute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap newPixmap; @@ -133,8 +133,8 @@ void kpColorEffectCommand::unexecute () kpColorEffectWidget::kpColorEffectWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : TQWidget (parent, name), + TQWidget *tqparent, const char *name) + : TQWidget (tqparent, name), m_actOnSelection (actOnSelection), m_mainWindow (mainWindow) { @@ -148,7 +148,7 @@ kpColorEffectWidget::~kpColorEffectWidget () // public TQString kpColorEffectWidget::caption () const { - return TQString::null; + return TQString(); } diff --git a/kolourpaint/pixmapfx/kpcoloreffect.h b/kolourpaint/pixmapfx/kpcoloreffect.h index afd60a5e..1286e794 100644 --- a/kolourpaint/pixmapfx/kpcoloreffect.h +++ b/kolourpaint/pixmapfx/kpcoloreffect.h @@ -71,14 +71,15 @@ private: }; -class kpColorEffectWidget : public QWidget +class kpColorEffectWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: kpColorEffectWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpColorEffectWidget (); signals: diff --git a/kolourpaint/pixmapfx/kpeffectbalance.cpp b/kolourpaint/pixmapfx/kpeffectbalance.cpp index d4e26a9c..c19c352b 100644 --- a/kolourpaint/pixmapfx/kpeffectbalance.cpp +++ b/kolourpaint/pixmapfx/kpeffectbalance.cpp @@ -91,7 +91,7 @@ static inline int contrast (int base, int strength) static inline int gamma (int base, int strength) { - return between0And255 (qRound (255.0 * pow (base / 255.0, 1.0 / pow (10, strength / 50.0)))); + return between0And255 (tqRound (255.0 * pow (base / 255.0, 1.0 / pow (10, strength / 50.0)))); } @@ -105,13 +105,13 @@ static inline int brightnessContrastGamma (int base, newGamma); } -static inline QRgb brightnessContrastGammaForRGB (QRgb rgb, +static inline TQRgb brightnessContrastGammaForRGB (TQRgb rgb, int channels, int brightness, int contrast, int gamma) { - int red = qRed (rgb); - int green = qGreen (rgb); - int blue = qBlue (rgb); + int red = tqRed (rgb); + int green = tqGreen (rgb); + int blue = tqBlue (rgb); if (channels & kpEffectBalanceCommand::Red) @@ -122,7 +122,7 @@ static inline QRgb brightnessContrastGammaForRGB (QRgb rgb, blue = brightnessContrastGamma (blue, brightness, contrast, gamma); - return qRgba (red, green, blue, qAlpha (rgb)); + return tqRgba (red, green, blue, tqAlpha (rgb)); } @@ -147,13 +147,13 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap, #endif - Q_UINT8 transformRed [256], + TQ_UINT8 transformRed [256], transformGreen [256], transformBlue [256]; for (int i = 0; i < 256; i++) { - Q_UINT8 applied = (Q_UINT8) brightnessContrastGamma (i, brightness, contrast, gamma); + TQ_UINT8 applied = (TQ_UINT8) brightnessContrastGamma (i, brightness, contrast, gamma); if (channels & kpEffectBalanceCommand::Red) transformRed [i] = applied; @@ -182,15 +182,15 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap, { for (int x = 0; x < image.width (); x++) { - const QRgb rgb = image.pixel (x, y); + const TQRgb rgb = image.pixel (x, y); - const Q_UINT8 red = (Q_UINT8) qRed (rgb); - const Q_UINT8 green = (Q_UINT8) qGreen (rgb); - const Q_UINT8 blue = (Q_UINT8) qBlue (rgb); - const Q_UINT8 alpha = (Q_UINT8) qAlpha (rgb); + const TQ_UINT8 red = (TQ_UINT8) tqRed (rgb); + const TQ_UINT8 green = (TQ_UINT8) tqGreen (rgb); + const TQ_UINT8 blue = (TQ_UINT8) tqBlue (rgb); + const TQ_UINT8 alpha = (TQ_UINT8) tqAlpha (rgb); image.setPixel (x, y, - qRgba (transformRed [red], + tqRgba (transformRed [red], transformGreen [green], transformBlue [blue], alpha)); @@ -208,15 +208,15 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap, { for (int i = 0; i < image.numColors (); i++) { - const QRgb rgb = image.color (i); + const TQRgb rgb = image.color (i); - const Q_UINT8 red = (Q_UINT8) qRed (rgb); - const Q_UINT8 green = (Q_UINT8) qGreen (rgb); - const Q_UINT8 blue = (Q_UINT8) qBlue (rgb); - const Q_UINT8 alpha = (Q_UINT8) qAlpha (rgb); + const TQ_UINT8 red = (TQ_UINT8) tqRed (rgb); + const TQ_UINT8 green = (TQ_UINT8) tqGreen (rgb); + const TQ_UINT8 blue = (TQ_UINT8) tqBlue (rgb); + const TQ_UINT8 alpha = (TQ_UINT8) tqAlpha (rgb); image.setColor (i, - qRgba (transformRed [red], + tqRgba (transformRed [red], transformGreen [green], transformBlue [blue], alpha)); @@ -253,8 +253,8 @@ TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + TQWidget *tqparent, const char *name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQGridLayout *lay = new TQGridLayout (this, 5, 5, marginHint (), spacingHint ()); @@ -275,9 +275,9 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection, // TODO: This is what should be shown in the m_gammaInput spinbox m_gammaLabel = new TQLabel (this); // TODO: This doesn't seem to be wide enough with some fonts so the - // whole layout moves when we drag the gamma slider. + // whole tqlayout moves when we drag the gamma slider. m_gammaLabel->setMinimumWidth (m_gammaLabel->fontMetrics ().width (" 10.00 ")); - m_gammaLabel->setAlignment (m_gammaLabel->alignment () | Qt::AlignRight); + m_gammaLabel->tqsetAlignment (m_gammaLabel->tqalignment () | TQt::AlignRight); TQPushButton *gammaResetPushButton = new TQPushButton (i18n ("Rese&t"), this); @@ -317,11 +317,11 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection, lay->addWidget (gammaResetPushButton, 2, 4); lay->addMultiCellWidget (spaceWidget, 3, 3, 0, 4); - lay->addMultiCellWidget (resetPushButton, 4, 4, 2, 4, Qt::AlignRight); + lay->addMultiCellWidget (resetPushButton, 4, 4, 2, 4, TQt::AlignRight); lay->addWidget (channelLabel, 4, 0); - lay->addWidget (m_channelsComboBox, 4, 1, Qt::AlignLeft); - //lay->addWidget (resetPushButton, 4, 2, Qt::AlignRight); + lay->addWidget (m_channelsComboBox, 4, 1, TQt::AlignLeft); + //lay->addWidget (resetPushButton, 4, 2, TQt::AlignRight); lay->setColStretch (1, 1); @@ -438,7 +438,7 @@ void kpEffectBalanceWidget::recalculateGammaLabel () 'f'/*[-]9.9*/, 2/*precision*/) + " "); - m_gammaLabel->repaint (); + m_gammaLabel->tqrepaint (); } @@ -499,7 +499,7 @@ void kpEffectBalanceWidget::resetAll () return; // Prevent multiple settingsChanged() which would normally result in - // redundant, expensive preview repaints + // redundant, expensive preview tqrepaints blockSignals (true); resetBrightness (); diff --git a/kolourpaint/pixmapfx/kpeffectbalance.h b/kolourpaint/pixmapfx/kpeffectbalance.h index e80bb7a6..f44004a2 100644 --- a/kolourpaint/pixmapfx/kpeffectbalance.h +++ b/kolourpaint/pixmapfx/kpeffectbalance.h @@ -74,11 +74,12 @@ protected: class kpEffectBalanceWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectBalanceWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectBalanceWidget (); virtual TQString caption () const; diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp index 9986df4f..145ed78c 100644 --- a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp +++ b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp @@ -52,7 +52,7 @@ static TQString nameForType (kpEffectBlurSharpenCommand::Type type) else if (type == kpEffectBlurSharpenCommand::Sharpen) return i18n ("Sharpen"); else - return TQString::null; + return TQString(); } @@ -88,10 +88,10 @@ TQPixmap kpEffectBlurSharpenCommand::apply (const TQPixmap &pixmap, << endl; #endif - // (KImageEffect::(blur|sharpen)() ignores mask) + // (KImageEffect::(blur|sharpen)() ignores tqmask) TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels ( pixmap, - Qt::white/*arbitrarily chosen*/); + TQt::white/*arbitrarily chosen*/); TQImage image = kpPixmapFX::convertToImage (usePixmap); @@ -107,9 +107,9 @@ TQPixmap kpEffectBlurSharpenCommand::apply (const TQPixmap &pixmap, TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image); - // KImageEffect::(blur|sharpen)() nukes mask - restore it - if (usePixmap.mask ()) - retPixmap.setMask (*usePixmap.mask ()); + // KImageEffect::(blur|sharpen)() nukes tqmask - restore it + if (usePixmap.tqmask ()) + retPixmap.setMask (*usePixmap.tqmask ()); return retPixmap; @@ -125,8 +125,8 @@ TQPixmap kpEffectBlurSharpenCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + TQWidget *tqparent, const char *name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ()); @@ -144,7 +144,7 @@ kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection, lay->addWidget (amountLabel, 0, 0); lay->addWidget (m_amountInput, 0, 1); - lay->addMultiCellWidget (m_typeLabel, 1, 1, 0, 1, Qt::AlignCenter); + lay->addMultiCellWidget (m_typeLabel, 1, 1, 0, 1, TQt::AlignCenter); lay->setColStretch (1, 1); @@ -164,7 +164,7 @@ kpEffectBlurSharpenWidget::~kpEffectBlurSharpenWidget () // public virtual [base kpColorEffectWidget] TQString kpEffectBlurSharpenWidget::caption () const { - return TQString::null; + return TQString(); } @@ -281,7 +281,7 @@ int kpEffectBlurSharpenWidget::repeat () const const double SharpenMin = 1; const double SharpenMax = 2; - return qRound (SharpenMin + + return tqRound (SharpenMin + (m_amountInput->value () - 1) * (SharpenMax - SharpenMin) / (m_amountInput->maxValue () - 1)); diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.h b/kolourpaint/pixmapfx/kpeffectblursharpen.h index 54b9c993..e4db5f86 100644 --- a/kolourpaint/pixmapfx/kpeffectblursharpen.h +++ b/kolourpaint/pixmapfx/kpeffectblursharpen.h @@ -74,11 +74,12 @@ protected: class kpEffectBlurSharpenWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectBlurSharpenWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectBlurSharpenWidget (); virtual TQString caption () const; diff --git a/kolourpaint/pixmapfx/kpeffectemboss.cpp b/kolourpaint/pixmapfx/kpeffectemboss.cpp index f58f248a..647794db 100644 --- a/kolourpaint/pixmapfx/kpeffectemboss.cpp +++ b/kolourpaint/pixmapfx/kpeffectemboss.cpp @@ -75,10 +75,10 @@ TQPixmap kpEffectEmbossCommand::apply (const TQPixmap &pixmap, << endl; #endif - // (KImageEffect::emboss() ignores mask) + // (KImageEffect::emboss() ignores tqmask) TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels ( pixmap, - Qt::white/*arbitrarily chosen*/); + TQt::white/*arbitrarily chosen*/); TQImage image = kpPixmapFX::convertToImage (usePixmap); @@ -91,9 +91,9 @@ TQPixmap kpEffectEmbossCommand::apply (const TQPixmap &pixmap, TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image); - // KImageEffect::emboss() nukes mask - restore it - if (usePixmap.mask ()) - retPixmap.setMask (*usePixmap.mask ()); + // KImageEffect::emboss() nukes tqmask - restore it + if (usePixmap.tqmask ()) + retPixmap.setMask (*usePixmap.tqmask ()); return retPixmap; @@ -109,8 +109,8 @@ TQPixmap kpEffectEmbossCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + TQWidget *tqparent, const char *name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ()); @@ -138,7 +138,7 @@ kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection, m_enableCheckBox = new TQCheckBox (i18n ("E&nable"), this); - lay->addMultiCellWidget (m_enableCheckBox, 0, 0, 0, 1, Qt::AlignCenter); + lay->addMultiCellWidget (m_enableCheckBox, 0, 0, 0, 1, TQt::AlignCenter); // (settingsChangedDelayed() instead of settingsChanged() so that the @@ -156,7 +156,7 @@ kpEffectEmbossWidget::~kpEffectEmbossWidget () // public virtual [base kpColorEffectWidget] TQString kpEffectEmbossWidget::caption () const { - return TQString::null; + return TQString(); } diff --git a/kolourpaint/pixmapfx/kpeffectemboss.h b/kolourpaint/pixmapfx/kpeffectemboss.h index b77f69e7..215a3cfa 100644 --- a/kolourpaint/pixmapfx/kpeffectemboss.h +++ b/kolourpaint/pixmapfx/kpeffectemboss.h @@ -66,11 +66,12 @@ protected: class kpEffectEmbossWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectEmbossWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectEmbossWidget (); virtual TQString caption () const; diff --git a/kolourpaint/pixmapfx/kpeffectflatten.cpp b/kolourpaint/pixmapfx/kpeffectflatten.cpp index b8dee16c..4357e086 100644 --- a/kolourpaint/pixmapfx/kpeffectflatten.cpp +++ b/kolourpaint/pixmapfx/kpeffectflatten.cpp @@ -131,9 +131,9 @@ TQColor kpEffectFlattenWidget::s_lastColor2; kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { if (!s_lastColor1.isValid () || !s_lastColor2.isValid ()) { @@ -142,11 +142,11 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection, s_lastColor1 = cfg->readColorEntry (kpSettingFlattenEffectColor1); if (!s_lastColor1.isValid ()) - s_lastColor1 = Qt::red; + s_lastColor1 = TQt::red; s_lastColor2 = cfg->readColorEntry (kpSettingFlattenEffectColor2); if (!s_lastColor2.isValid ()) - s_lastColor2 = Qt::blue; + s_lastColor2 = TQt::blue; } diff --git a/kolourpaint/pixmapfx/kpeffectflatten.h b/kolourpaint/pixmapfx/kpeffectflatten.h index a4f06af9..4bdf34d4 100644 --- a/kolourpaint/pixmapfx/kpeffectflatten.h +++ b/kolourpaint/pixmapfx/kpeffectflatten.h @@ -76,11 +76,12 @@ protected: class kpEffectFlattenWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectFlattenWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectFlattenWidget (); diff --git a/kolourpaint/pixmapfx/kpeffectinvert.cpp b/kolourpaint/pixmapfx/kpeffectinvert.cpp index 67c1d6d0..aaf2c5d7 100644 --- a/kolourpaint/pixmapfx/kpeffectinvert.cpp +++ b/kolourpaint/pixmapfx/kpeffectinvert.cpp @@ -86,30 +86,30 @@ TQPixmap kpEffectInvertCommand::apply (const TQPixmap &pm, int channels) // public static void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels) { - QRgb mask = qRgba ((channels & Red) ? 0xFF : 0, + TQRgb tqmask = tqRgba ((channels & Red) ? 0xFF : 0, (channels & Green) ? 0xFF : 0, (channels & Blue) ? 0xFF : 0, 0/*don't invert alpha*/); #if DEBUG_KP_EFFECT_INVERT kdDebug () << "kpEffectInvertCommand::apply(channels=" << channels - << ") mask=" << (int *) mask + << ") tqmask=" << (int *) tqmask << endl; #endif if (destImagePtr->depth () > 8) { #if 0 - // SYNC: TODO: Qt BUG - invertAlpha argument is inverted!!! - destImagePtr->invertPixels (true/*no invert alpha (Qt 3.2)*/); + // SYNC: TODO: TQt BUG - invertAlpha argument is inverted!!! + destImagePtr->invertPixels (true/*no invert alpha (TQt 3.2)*/); #else - // Above version works for Qt 3.2 at least. + // Above version works for TQt 3.2 at least. // But this version will always work (slower, though) and supports // inverting particular channels. for (int y = 0; y < destImagePtr->height (); y++) { for (int x = 0; x < destImagePtr->width (); x++) { - destImagePtr->setPixel (x, y, destImagePtr->pixel (x, y) ^ mask); + destImagePtr->setPixel (x, y, destImagePtr->pixel (x, y) ^ tqmask); } } #endif @@ -118,7 +118,7 @@ void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels) { for (int i = 0; i < destImagePtr->numColors (); i++) { - destImagePtr->setColor (i, destImagePtr->color (i) ^ mask); + destImagePtr->setColor (i, destImagePtr->color (i) ^ tqmask); } } } @@ -149,15 +149,15 @@ TQPixmap kpEffectInvertCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectInvertWidget::kpEffectInvertWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQVBoxLayout *topLevelLay = new TQVBoxLayout (this, marginHint (), spacingHint ()); TQWidget *centerWidget = new TQWidget (this); - topLevelLay->addWidget (centerWidget, 0/*stretch*/, Qt::AlignCenter); + topLevelLay->addWidget (centerWidget, 0/*stretch*/, TQt::AlignCenter); TQVBoxLayout *centerWidgetLay = new TQVBoxLayout (centerWidget, diff --git a/kolourpaint/pixmapfx/kpeffectinvert.h b/kolourpaint/pixmapfx/kpeffectinvert.h index a63237df..67277ac3 100644 --- a/kolourpaint/pixmapfx/kpeffectinvert.h +++ b/kolourpaint/pixmapfx/kpeffectinvert.h @@ -91,11 +91,12 @@ protected: class kpEffectInvertWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectInvertWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectInvertWidget (); diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp index 44fd7ea7..80fadd8d 100644 --- a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp +++ b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp @@ -73,7 +73,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither) #endif - // Hack around Qt's braindead TQImage::convertDepth(1, ...) (with + // Hack around TQt's braindead TQImage::convertDepth(1, ...) (with // dithering off) which produces pathetic results with an image that // only has 2 colours - sometimes it just gives a completely black // result. Instead, we simply preserve the 2 colours. One use case @@ -84,7 +84,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither) #if DEBUG_KP_EFFECT_REDUCE_COLORS kdDebug () << "\tinvoking convert-to-depth 1 hack" << endl; #endif - QRgb color0, color1; + TQRgb color0, color1; bool color0Valid = false, color1Valid = false; bool moreThan2Colors = false; @@ -101,7 +101,7 @@ TQImage convertImageDepth (const TQImage &image, int depth, bool dither) { for (int x = 0; x < image.width (); x++) { - QRgb imagePixel = image.pixel (x, y); + TQRgb imagePixel = image.pixel (x, y); if (color0Valid && imagePixel == color0) monoImage.setPixel (x, y, 0); @@ -211,7 +211,7 @@ TQString kpEffectReduceColorsCommand::commandName (int depth, int dither) const } else { - return TQString::null; + return TQString(); } } @@ -240,12 +240,12 @@ void kpEffectReduceColorsCommand::apply (TQPixmap *destPixmapPtr, int depth, boo // HACK: The above "image.convertDepth()" erases the Alpha Channel // (at least for monochrome). - // tqpixmap.html says "alpha masks on monochrome images are ignored." + // tqpixmap.html says "alpha tqmasks on monochrome images are ignored." // - // Put the mask back. + // Put the tqmask back. // - if (destPixmapPtr->mask ()) - pixmap.setMask (*destPixmapPtr->mask ()); + if (destPixmapPtr->tqmask ()) + pixmap.setMask (*destPixmapPtr->tqmask ()); *destPixmapPtr = pixmap; } @@ -276,9 +276,9 @@ TQPixmap kpEffectReduceColorsCommand::applyColorEffect (const TQPixmap &pixmap) kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : kpColorEffectWidget (actOnSelection, mainWindow, parent, name) + : kpColorEffectWidget (actOnSelection, mainWindow, tqparent, name) { TQVBoxLayout *lay = new TQVBoxLayout (this, marginHint (), spacingHint ()); diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.h b/kolourpaint/pixmapfx/kpeffectreducecolors.h index bf44ef3e..df4c0bc0 100644 --- a/kolourpaint/pixmapfx/kpeffectreducecolors.h +++ b/kolourpaint/pixmapfx/kpeffectreducecolors.h @@ -53,7 +53,7 @@ public: TQString commandName (int depth, int dither) const; - // (always preserves mask) + // (always preserves tqmask) static void apply (TQPixmap *destPixmapPtr, int depth, bool dither); static TQPixmap apply (const TQPixmap &pm, int depth, bool dither); @@ -73,11 +73,12 @@ protected: class kpEffectReduceColorsWidget : public kpColorEffectWidget { Q_OBJECT + TQ_OBJECT public: kpEffectReduceColorsWidget (bool actOnSelection, kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpEffectReduceColorsWidget (); diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.cpp b/kolourpaint/pixmapfx/kpeffectsdialog.cpp index 90dfbd32..80a242c3 100644 --- a/kolourpaint/pixmapfx/kpeffectsdialog.cpp +++ b/kolourpaint/pixmapfx/kpeffectsdialog.cpp @@ -59,14 +59,14 @@ int kpEffectsDialog::s_lastHeight = 620; kpEffectsDialog::kpEffectsDialog (bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name) : kpToolPreviewDialog (kpToolPreviewDialog::Preview, true/*reserve top row*/, - TQString::null/*caption*/, - TQString::null/*afterActionText (no Dimensions Group Box)*/, + TQString()/*caption*/, + TQString()/*afterActionText (no Dimensions Group Box)*/, actOnSelection, - parent, + tqparent, name), m_delayedUpdateTimer (new TQTimer (this)), m_effectsComboBox (0), @@ -209,7 +209,7 @@ void kpEffectsDialog::selectEffect (int which) m_colorEffectWidget = 0; - m_settingsGroupBox->setCaption (TQString::null); + m_settingsGroupBox->setCaption (TQString()); #define CREATE_EFFECT_WIDGET(name) \ m_colorEffectWidget = new name (m_actOnSelection, \ @@ -255,23 +255,23 @@ void kpEffectsDialog::selectEffect (int which) // Don't resize the preview when showing the widget: // TODO: actually work - TQSize previewGroupBoxMinSize = m_previewGroupBox->minimumSize (); - TQSize previewGroupBoxMaxSize = m_previewGroupBox->maximumSize (); - TQLayout::ResizeMode previewGroupBoxResizeMode = - m_previewGroupBox->layout () ? - m_previewGroupBox->layout ()->resizeMode () : + TQSize previewGroupBoxMinSize = m_previewGroupBox->tqminimumSize (); + TQSize previewGroupBoxMaxSize = m_previewGroupBox->tqmaximumSize (); + TQLayout::ResizeMode previewGroupBoxResizeMode = + m_previewGroupBox->tqlayout () ? + m_previewGroupBox->tqlayout ()->tqresizeMode () : TQLayout::Auto; #if DEBUG_KP_EFFECTS_DIALOG kdDebug () << "\tpreviewGroupBox: minSize=" << previewGroupBoxMinSize << " maxSize=" << previewGroupBoxMaxSize << " size=" << m_previewGroupBox->size () - << " layout=" << m_previewGroupBox->layout () + << " tqlayout=" << m_previewGroupBox->tqlayout () << " resizeMode=" << previewGroupBoxResizeMode << endl; #endif - if (m_previewGroupBox->layout ()) - m_previewGroupBox->layout ()->setResizeMode (TQLayout::FreeResize); + if (m_previewGroupBox->tqlayout ()) + m_previewGroupBox->tqlayout ()->setResizeMode (TQLayout::FreeResize); #if DEBUG_KP_EFFECTS_DIALOG kdDebug () << "\tafter set resizeMode, previewGroupBox.size=" << m_previewGroupBox->size () << endl; @@ -300,8 +300,8 @@ void kpEffectsDialog::selectEffect (int which) kdDebug () << "\tafter set fixedSize, previewGroupBox.size=" << m_previewGroupBox->size () << endl; #endif - if (m_previewGroupBox->layout ()) - m_previewGroupBox->layout ()->setResizeMode (previewGroupBoxResizeMode); + if (m_previewGroupBox->tqlayout ()) + m_previewGroupBox->tqlayout ()->setResizeMode (previewGroupBoxResizeMode); #if DEBUG_KP_EFFECTS_DIALOG kdDebug () << "\tafter restore resizeMode, previewGroupBox.size=" << m_previewGroupBox->size () << endl; diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.h b/kolourpaint/pixmapfx/kpeffectsdialog.h index c0086cbb..ddb3f8c2 100644 --- a/kolourpaint/pixmapfx/kpeffectsdialog.h +++ b/kolourpaint/pixmapfx/kpeffectsdialog.h @@ -48,10 +48,11 @@ class kpMainWindow; class kpEffectsDialog : public kpToolPreviewDialog { Q_OBJECT + TQ_OBJECT public: kpEffectsDialog (bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name = 0); virtual ~kpEffectsDialog (); diff --git a/kolourpaint/pixmapfx/kpfloodfill.cpp b/kolourpaint/pixmapfx/kpfloodfill.cpp index 55238f2d..76731d23 100644 --- a/kolourpaint/pixmapfx/kpfloodfill.cpp +++ b/kolourpaint/pixmapfx/kpfloodfill.cpp @@ -95,22 +95,22 @@ bool kpFloodFill::fill () // not trying to do a NOP fill if (m_boundingRect.isValid ()) { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); - TQPainter painter, maskPainter; - TQBitmap maskBitmap; + TQPainter painter, tqmaskPainter; + TQBitmap tqmaskBitmap; - if (m_pixmapPtr->mask () || m_color.isTransparent ()) + if (m_pixmapPtr->tqmask () || m_color.isTransparent ()) { - maskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (m_color.maskColor ()); + tqmaskBitmap = kpPixmapFX::getNonNullMask (*m_pixmapPtr); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (m_color.tqmaskColor ()); } if (m_color.isOpaque ()) { painter.begin (m_pixmapPtr); - painter.setPen (m_color.toQColor ()); + painter.setPen (m_color.toTQColor ()); } const TQValueList <FillLine>::ConstIterator fillLinesEnd = m_fillLines.end (); @@ -124,18 +124,18 @@ bool kpFloodFill::fill () if (painter.isActive ()) painter.drawLine (p1, p2); - if (maskPainter.isActive ()) - maskPainter.drawLine (p1, p2); + if (tqmaskPainter.isActive ()) + tqmaskPainter.drawLine (p1, p2); } if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); - if (!maskBitmap.isNull ()) - m_pixmapPtr->setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + m_pixmapPtr->setMask (tqmaskBitmap); TQApplication::restoreOverrideCursor (); } @@ -196,7 +196,7 @@ bool kpFloodFill::prepare () kdDebug () << "\tperforming NOP check" << endl; #endif - // get the color we need to replace + // get the color we need to tqreplace if (m_processedColorSimilarity == 0 && m_color == m_colorToChange) { // need to do absolutely nothing (this is a significant optimisation diff --git a/kolourpaint/pixmapfx/kppixmapfx.cpp b/kolourpaint/pixmapfx/kppixmapfx.cpp index 5457ef50..1837a22e 100644 --- a/kolourpaint/pixmapfx/kppixmapfx.cpp +++ b/kolourpaint/pixmapfx/kppixmapfx.cpp @@ -214,7 +214,7 @@ int kpPixmapFX::pointArraySize (const TQPointArray &points) // -// QPixmap/TQImage Conversion Functions +// TQPixmap/TQImage Conversion Functions // // public static @@ -238,9 +238,9 @@ static bool imageHasAlphaChannel (const TQImage &image) { for (int x = 0; x < image.width (); x++) { - const QRgb rgb = image.pixel (x, y); + const TQRgb rgb = image.pixel (x, y); - if (qAlpha (rgb) > 0 && qAlpha (rgb) < 255) + if (tqAlpha (rgb) > 0 && tqAlpha (rgb) < 255) return true; } } @@ -250,7 +250,7 @@ static bool imageHasAlphaChannel (const TQImage &image) static int imageNumColorsUpTo (const TQImage &image, int max) { - TQMap <QRgb, bool> rgbMap; + TQMap <TQRgb, bool> rgbMap; if (image.depth () <= 8) { @@ -309,7 +309,7 @@ static void convertToPixmapWarnAboutLoss (const TQImage &image, int screenDepthNeeded = 0; if (moreColorsThanDisplay) - screenDepthNeeded = QMIN (24, image.depth ()); + screenDepthNeeded = TQMIN (24, image.depth ()); #if DEBUG_KP_PIXMAP_FX && 1 kdDebug () << "\ttranslucencyShouldBeShown=" @@ -331,14 +331,14 @@ static void convertToPixmapWarnAboutLoss (const TQImage &image, #endif - TQApplication::setOverrideCursor (Qt::arrowCursor); + TQApplication::setOverrideCursor (TQt::arrowCursor); if (moreColorsThanDisplay && hasAlphaChannel) { KMessageBox::information (wali.m_parent, wali.m_moreColorsThanDisplayAndHasAlphaChannelMessage .arg (screenDepthNeeded), - TQString::null, // or would you prefer "Low Screen Depth and Image Contains Transparency"? :) + TQString(), // or would you prefer "Low Screen Depth and Image Contains Transparency"? :) colorDepthTranslucencyDontAskAgain); if (!KMessageBox::shouldBeShownContinue (colorDepthTranslucencyDontAskAgain)) @@ -387,18 +387,18 @@ TQPixmap kpPixmapFX::convertToPixmap (const TQImage &image, bool pretty, if (!pretty) { destPixmap.convertFromImage (image, - Qt::ColorOnly/*always display depth*/ | - Qt::ThresholdDither/*no dither*/ | - Qt::ThresholdAlphaDither/*no dither alpha*/| - Qt::AvoidDither); + TQt::ColorOnly/*always display depth*/ | + TQt::ThresholdDither/*no dither*/ | + TQt::ThresholdAlphaDither/*no dither alpha*/| + TQt::AvoidDither); } else { destPixmap.convertFromImage (image, - Qt::ColorOnly/*always display depth*/ | - Qt::DiffuseDither/*hi quality dither*/ | - Qt::ThresholdAlphaDither/*no dither alpha*/ | - Qt::PreferDither/*(dither even if <256 colours)*/); + TQt::ColorOnly/*always display depth*/ | + TQt::DiffuseDither/*hi quality dither*/ | + TQt::ThresholdAlphaDither/*no dither alpha*/ | + TQt::PreferDither/*(dither even if <256 colours)*/); } #if DEBUG_KP_PIXMAP_FX && 1 @@ -449,7 +449,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, << " (AvoidDither | ThresholdDither)" << endl; #endif - ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither); + ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither); } // PRE: image.depth() > screenDepth // ASSERT: screenDepth < 32 @@ -470,7 +470,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, kdDebug () << "\t\tcolors fit on screen - don't dither" << " (AvoidDither | ThresholdDither)" << endl; #endif - ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither); + ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither); } else { @@ -478,7 +478,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, kdDebug () << "\t\tcolors don't fit on screen - dither" << " (PreferDither | DiffuseDither)" << endl; #endif - ditherFlags = (Qt::PreferDither | Qt::DiffuseDither); + ditherFlags = (TQt::PreferDither | TQt::DiffuseDither); } } // PRE: image.depth() > screenDepth && @@ -519,7 +519,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, kdDebug () << "\t\t\talways dither (PreferDither | DiffuseDither)" << endl; #endif - ditherFlags = (Qt::PreferDither | Qt::DiffuseDither); + ditherFlags = (TQt::PreferDither | TQt::DiffuseDither); } else { @@ -527,14 +527,14 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, kdDebug () << "\t\t\tdon't dither (AvoidDither | ThresholdDither)" << endl; #endif - ditherFlags = (Qt::AvoidDither | Qt::ThresholdDither); + ditherFlags = (TQt::AvoidDither | TQt::ThresholdDither); } } destPixmap.convertFromImage (image, - Qt::ColorOnly/*always display depth*/ | - Qt::ThresholdAlphaDither/*no dither alpha*/ | + TQt::ColorOnly/*always display depth*/ | + TQt::ThresholdAlphaDither/*no dither alpha*/ | ditherFlags); #if DEBUG_KP_PIXMAP_FX && 1 @@ -556,7 +556,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image, TQPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap, const TQColor &transparentColor) { - if (!pixmap.mask ()) + if (!pixmap.tqmask ()) return pixmap; TQPixmap retPixmap (pixmap.width (), pixmap.height ()); @@ -566,7 +566,7 @@ TQPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap, p.drawPixmap (TQPoint (0, 0), pixmap); p.end (); - retPixmap.setMask (*pixmap.mask ()); + retPixmap.setMask (*pixmap.tqmask ()); return retPixmap; } @@ -583,7 +583,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect) #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "kpPixmapFX::getPixmapAt(pm.hasMask=" - << (pm.mask () ? 1 : 0) + << (pm.tqmask () ? 1 : 0) << ",rect=" << rect << ")" @@ -599,7 +599,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect) kdDebug () << "\tret would contain undefined pixels - setting them to transparent" << endl; #endif TQBitmap transparentMask (rect.width (), rect.height ()); - transparentMask.fill (Qt::color0/*transparent*/); + transparentMask.fill (TQt::color0/*transparent*/); retPixmap.setMask (transparentMask); } @@ -614,14 +614,14 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect) const TQPoint destTopLeft = validSrcRect.topLeft () - rect.topLeft (); - // copy data _and_ mask (if avail) + // copy data _and_ tqmask (if avail) copyBlt (&retPixmap, /* dest */ destTopLeft.x (), destTopLeft.y (), /* dest pt */ &pm, /* src */ validSrcRect.x (), validSrcRect.y (), /* src pt */ validSrcRect.width (), validSrcRect.height ()); - if (wouldHaveUndefinedPixels && retPixmap.mask () && !pm.mask ()) + if (wouldHaveUndefinedPixels && retPixmap.tqmask () && !pm.tqmask ()) { #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\tensure opaque in valid region" << endl; @@ -633,7 +633,7 @@ TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect) #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\tretPixmap.hasMask=" - << (retPixmap.mask () ? 1 : 0) + << (retPixmap.tqmask () ? 1 : 0) << endl; #endif @@ -652,19 +652,19 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, kdDebug () << "kpPixmapFX::setPixmapAt(destPixmap->rect=" << destPixmapPtr->rect () << ",destPixmap->hasMask=" - << (destPixmapPtr->mask () ? 1 : 0) + << (destPixmapPtr->tqmask () ? 1 : 0) << ",destRect=" << destRect << ",srcPixmap.rect=" << srcPixmap.rect () << ",srcPixmap.hasMask=" - << (srcPixmap.mask () ? 1 : 0) + << (srcPixmap.tqmask () ? 1 : 0) << ")" << endl; #endif #if DEBUG_KP_PIXMAP_FX && 0 - if (destPixmapPtr->mask ()) + if (destPixmapPtr->tqmask ()) { TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr); int numTrans = 0; @@ -673,7 +673,7 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, { for (int x = 0; x < image.width (); x++) { - if (qAlpha (image.pixel (x, y)) == 0) + if (tqAlpha (image.pixel (x, y)) == 0) numTrans++; } } @@ -685,38 +685,38 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, #if 0 // TODO: why does undo'ing a single pen dot on a transparent pixel, // result in a opaque image, except for that single transparent pixel??? - // Qt bug on boundary case? + // TQt bug on boundary case? - // copy data _and_ mask + // copy data _and_ tqmask copyBlt (destPixmapPtr, destAt.x (), destAt.y (), &srcPixmap, 0, 0, destRect.width (), destRect.height ()); #else - bitBlt (destPixmapPtr, + bitBlt (TQT_TQPAINTDEVICE(destPixmapPtr), destRect.x (), destRect.y (), - &srcPixmap, + TQT_TQPAINTDEVICE(const_cast<TQPixmap*>(&srcPixmap)), 0, 0, destRect.width (), destRect.height (), - Qt::CopyROP, - true/*ignore mask*/); + TQt::CopyROP, + true/*ignore tqmask*/); - if (srcPixmap.mask ()) + if (srcPixmap.tqmask ()) { - TQBitmap mask = getNonNullMask (*destPixmapPtr); - bitBlt (&mask, + TQBitmap tqmask = getNonNullMask (*destPixmapPtr); + bitBlt (TQT_TQPAINTDEVICE(&tqmask), destRect.x (), destRect.y (), - srcPixmap.mask (), + TQT_TQPAINTDEVICE(const_cast<TQBitmap*>(srcPixmap.tqmask ())), 0, 0, destRect.width (), destRect.height (), - Qt::CopyROP, - true/*ignore mask*/); - destPixmapPtr->setMask (mask); + TQt::CopyROP, + true/*ignore tqmask*/); + destPixmapPtr->setMask (tqmask); } #endif - if (destPixmapPtr->mask () && !srcPixmap.mask ()) + if (destPixmapPtr->tqmask () && !srcPixmap.tqmask ()) { #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\t\topaque'ing dest rect" << endl; @@ -726,9 +726,9 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\tdestPixmap->hasMask=" - << (destPixmapPtr->mask () ? 1 : 0) + << (destPixmapPtr->tqmask () ? 1 : 0) << endl; - if (destPixmapPtr->mask ()) + if (destPixmapPtr->tqmask ()) { TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr); int numTrans = 0; @@ -737,7 +737,7 @@ void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, { for (int x = 0; x < image.width (); x++) { - if (qAlpha (image.pixel (x, y)) == 0) + if (tqAlpha (image.pixel (x, y)) == 0) numTrans++; } } @@ -772,7 +772,7 @@ void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt, if (!destPixmapPtr) return; - // Copy src (masked by src's mask) on top of dest. + // Copy src (tqmasked by src's tqmask) on top of dest. bitBlt (destPixmapPtr, /* dest */ destAt.x (), destAt.y (), /* dest pt */ &srcPixmap, /* src */ @@ -825,7 +825,7 @@ kpColor kpPixmapFX::getColorAtPixel (const TQImage &img, const TQPoint &at) if (!img.valid (at.x (), at.y ())) return kpColor::invalid; - QRgb rgba = img.pixel (at.x (), at.y ()); + TQRgb rgba = img.pixel (at.x (), at.y ()); return kpColor (rgba); } @@ -852,14 +852,14 @@ void kpPixmapFX::ensureNoAlphaChannel (TQPixmap *destPixmapPtr) // public static TQBitmap kpPixmapFX::getNonNullMask (const TQPixmap &pm) { - if (pm.mask ()) - return *pm.mask (); + if (pm.tqmask ()) + return *pm.tqmask (); else { - TQBitmap maskBitmap (pm.width (), pm.height ()); - maskBitmap.fill (Qt::color1/*opaque*/); + TQBitmap tqmaskBitmap (pm.width (), pm.height ()); + tqmaskBitmap.fill (TQt::color1/*opaque*/); - return maskBitmap; + return tqmaskBitmap; } } @@ -870,18 +870,18 @@ void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &des if (!destPixmapPtr) return; - TQBitmap maskBitmap = getNonNullMask (*destPixmapPtr); + TQBitmap tqmaskBitmap = getNonNullMask (*destPixmapPtr); - TQPainter p (&maskBitmap); + TQPainter p (&tqmaskBitmap); - p.setPen (Qt::color0/*transparent*/); - p.setBrush (Qt::color0/*transparent*/); + p.setPen (TQt::color0/*transparent*/); + p.setBrush (TQt::color0/*transparent*/); p.drawRect (destRect); p.end (); - destPixmapPtr->setMask (maskBitmap); + destPixmapPtr->setMask (tqmaskBitmap); } @@ -916,7 +916,7 @@ void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, const T &brushBitmap, 0, 0, brushBitmap.width (), brushBitmap.height (), - Qt::NotAndROP); + TQt::NotAndROP); destPixmapPtr->setMask (destMaskBitmap); } @@ -934,46 +934,46 @@ void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, int des // public static void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect) { - if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/) + if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/) return; - TQBitmap maskBitmap = *destPixmapPtr->mask (); + TQBitmap tqmaskBitmap = *destPixmapPtr->tqmask (); - TQPainter p (&maskBitmap); + TQPainter p (&tqmaskBitmap); - p.setPen (Qt::color1/*opaque*/); - p.setBrush (Qt::color1/*opaque*/); + p.setPen (TQt::color1/*opaque*/); + p.setBrush (TQt::color1/*opaque*/); p.drawRect (destRect); p.end (); - destPixmapPtr->setMask (maskBitmap); + destPixmapPtr->setMask (tqmaskBitmap); } // public static void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQPoint &destAt, const TQPixmap &srcPixmap) { - if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/) + if (!destPixmapPtr || !destPixmapPtr->tqmask ()/*already opaque*/) return; - TQBitmap destMask = *destPixmapPtr->mask (); + TQBitmap destMask = *destPixmapPtr->tqmask (); - if (srcPixmap.mask ()) + if (srcPixmap.tqmask ()) { bitBlt (&destMask, /* dest */ destAt, /* dest pt */ - srcPixmap.mask (), /* src */ + srcPixmap.tqmask (), /* src */ TQRect (0, 0, srcPixmap.width (), srcPixmap.height ()), /* src rect */ - Qt::OrROP/*if either is opaque, it's opaque*/); + TQt::OrROP/*if either is opaque, it's opaque*/); } else { TQPainter p (&destMask); - p.setPen (Qt::color1/*opaque*/); - p.setBrush (Qt::color1/*opaque*/); + p.setPen (TQt::color1/*opaque*/); + p.setBrush (TQt::color1/*opaque*/); p.drawRect (destAt.x (), destAt.y (), srcPixmap.width (), srcPixmap.height ()); @@ -1012,16 +1012,16 @@ TQPixmap kpPixmapFX::convertToGrayscale (const TQPixmap &pm) return kpPixmapFX::convertToPixmap (image); } -static QRgb toGray (QRgb rgb) +static TQRgb toGray (TQRgb rgb) { // naive way that doesn't preserve brightness - // int gray = (qRed (rgb) + qGreen (rgb) + qBlue (rgb)) / 3; + // int gray = (tqRed (rgb) + tqGreen (rgb) + tqBlue (rgb)) / 3; // over-exaggerates red & blue - // int gray = qGray (rgb); + // int gray = tqGray (rgb); - int gray = (212671 * qRed (rgb) + 715160 * qGreen (rgb) + 72169 * qBlue (rgb)) / 1000000; - return qRgba (gray, gray, gray, qAlpha (rgb)); + int gray = (212671 * tqRed (rgb) + 715160 * tqGreen (rgb) + 72169 * tqBlue (rgb)) / 1000000; + return tqRgba (gray, gray, gray, tqAlpha (rgb)); } // public static @@ -1064,8 +1064,8 @@ void kpPixmapFX::fill (TQPixmap *destPixmapPtr, const kpColor &color) if (color.isOpaque ()) { - destPixmapPtr->setMask (TQBitmap ()); // no mask = opaque - destPixmapPtr->fill (color.toQColor ()); + destPixmapPtr->setMask (TQBitmap ()); // no tqmask = opaque + destPixmapPtr->fill (color.toTQColor ()); } else { @@ -1107,22 +1107,22 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h, #if DEBUG_KP_PIXMAP_FX && 1 kdDebug () << "\tfilling in new areas" << endl; #endif - TQBitmap maskBitmap; - TQPainter painter, maskPainter; + TQBitmap tqmaskBitmap; + TQPainter painter, tqmaskPainter; if (backgroundColor.isOpaque ()) { painter.begin (destPixmapPtr); - painter.setPen (backgroundColor.toQColor ()); - painter.setBrush (backgroundColor.toQColor ()); + painter.setPen (backgroundColor.toTQColor ()); + painter.setBrush (backgroundColor.toTQColor ()); } - if (backgroundColor.isTransparent () || destPixmapPtr->mask ()) + if (backgroundColor.isTransparent () || destPixmapPtr->tqmask ()) { - maskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (backgroundColor.maskColor ()); - maskPainter.setBrush (backgroundColor.maskColor ()); + tqmaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (backgroundColor.tqmaskColor ()); + tqmaskPainter.setBrush (backgroundColor.tqmaskColor ()); } #define PAINTER_CALL(cmd) \ @@ -1130,8 +1130,8 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h, if (painter.isActive ()) \ painter . cmd ; \ \ - if (maskPainter.isActive ()) \ - maskPainter . cmd ; \ + if (tqmaskPainter.isActive ()) \ + tqmaskPainter . cmd ; \ } if (w > oldWidth) PAINTER_CALL (drawRect (oldWidth, 0, w - oldWidth, oldHeight)); @@ -1140,14 +1140,14 @@ void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h, PAINTER_CALL (drawRect (0, oldHeight, w, h - oldHeight)); #undef PAINTER_CALL - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); if (painter.isActive ()) painter.end (); - if (!maskBitmap.isNull ()) - destPixmapPtr->setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + destPixmapPtr->setMask (tqmaskBitmap); } } @@ -1373,12 +1373,12 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_, TQBitmap newBitmapMask; if (backgroundColor.isOpaque ()) - newPixmap.fill (backgroundColor.toQColor ()); + newPixmap.fill (backgroundColor.toTQColor ()); - if (backgroundColor.isTransparent () || pm.mask ()) + if (backgroundColor.isTransparent () || pm.tqmask ()) { newBitmapMask.resize (newPixmap.width (), newPixmap.height ()); - newBitmapMask.fill (backgroundColor.maskColor ()); + newBitmapMask.fill (backgroundColor.tqmaskColor ()); } TQPainter painter (&newPixmap); @@ -1403,12 +1403,12 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_, painter.setWorldMatrix (transformMatrix); #if DEBUG_KP_PIXMAP_FX && 0 kdDebug () << "\ttranslate top=" << painter.xForm (TQPoint (0, 0)) << endl; - kdDebug () << "\tmatrix: m11=" << painter.worldMatrix ().m11 () - << " m12=" << painter.worldMatrix ().m12 () - << " m21=" << painter.worldMatrix ().m21 () - << " m22=" << painter.worldMatrix ().m22 () - << " dx=" << painter.worldMatrix ().dx () - << " dy=" << painter.worldMatrix ().dy () + kdDebug () << "\tmatrix: m11=" << painter.tqworldMatrix ().m11 () + << " m12=" << painter.tqworldMatrix ().m12 () + << " m21=" << painter.tqworldMatrix ().m21 () + << " m22=" << painter.tqworldMatrix ().m22 () + << " dx=" << painter.tqworldMatrix ().dx () + << " dy=" << painter.tqworldMatrix ().dy () << endl; #endif painter.drawPixmap (TQPoint (0, 0), pm); @@ -1416,10 +1416,10 @@ static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_, if (!newBitmapMask.isNull ()) { - TQPainter maskPainter (&newBitmapMask); - maskPainter.setWorldMatrix (transformMatrix); - maskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm)); - maskPainter.end (); + TQPainter tqmaskPainter (&newBitmapMask); + tqmaskPainter.setWorldMatrix (transformMatrix); + tqmaskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm)); + tqmaskPainter.end (); newPixmap.setMask (newBitmapMask); } diff --git a/kolourpaint/pixmapfx/kppixmapfx.h b/kolourpaint/pixmapfx/kppixmapfx.h index ac52e992..738d82fa 100644 --- a/kolourpaint/pixmapfx/kppixmapfx.h +++ b/kolourpaint/pixmapfx/kppixmapfx.h @@ -87,7 +87,7 @@ public: // - // QPixmap/TQImage Conversion Functions + // TQPixmap/TQImage Conversion Functions // // @@ -100,7 +100,7 @@ public: // <result> is slightly differently colored to <pixmap>. // // KolourPaint needs to convert to TQImage occasionally as - // TQImage allows KolourPaint to read pixels and because the QImage + // TQImage allows KolourPaint to read pixels and because the TQImage // methods give reliable results and pixel-identical results on // all platforms. The TQPixmap paint engine has no such guarantee // and even depends on the quality of the video driver. @@ -128,7 +128,7 @@ public: // // " contains translucency which is not fully" // " supported. The translucency data will be" - // " approximated with a 1-bit transparency mask.") + // " approximated with a 1-bit transparency tqmask.") // // <moreColorsThanDisplayMessage>: // i18n ("The (image \"example.jpg\"|image from the clipboard)" @@ -140,21 +140,21 @@ public: // i18n ("The (image \"example.jpg\"|image from the clipboard)" // " contains translucency which is not fully" // " supported. The translucency data will be" - // " approximated with a 1-bit transparency mask.") + // " approximated with a 1-bit transparency tqmask.") // // <dontAskAgainPrefix>: // // Don'tAskAgain ID for dialog. // - // <parent>: + // <tqparent>: // - // Dialog parent + // Dialog tqparent // WarnAboutLossInfo (const TQString &moreColorsThanDisplayAndHasAlphaChannelMessage, const TQString &moreColorsThanDisplayMessage, const TQString &hasAlphaChannelMessage, const TQString &dontAskAgainPrefix, - TQWidget *parent) + TQWidget *tqparent) : m_moreColorsThanDisplayAndHasAlphaChannelMessage ( moreColorsThanDisplayAndHasAlphaChannelMessage), @@ -164,7 +164,7 @@ public: hasAlphaChannelMessage), m_dontAskAgainPrefix ( dontAskAgainPrefix), - m_parent (parent), + m_parent (tqparent), m_isValid (true) { } @@ -227,7 +227,7 @@ public: // Sets the RGB values of the pixels where <pixmap> is transparent to // <transparentColor>. This has visually no effect on the <pixmap> - // unless the mask is lost. + // unless the tqmask is lost. static TQPixmap pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap, const TQColor &transparentColor); @@ -238,19 +238,19 @@ public: // - // Returns the pixel and mask data found at the <rect> in <pm>. + // Returns the pixel and tqmask data found at the <rect> in <pm>. // static TQPixmap getPixmapAt (const TQPixmap &pm, const TQRect &rect); // - // Sets the pixel and mask data at <destRect> in <*destPixmapPtr> + // Sets the pixel and tqmask data at <destRect> in <*destPixmapPtr> // to <srcPixmap>. // static void setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect, const TQPixmap &srcPixmap); // - // Sets the pixel and mask data at the rectangle in <*destPixmapPtr>, + // Sets the pixel and tqmask data at the rectangle in <*destPixmapPtr>, // with the top-left <destAt> and dimensions <srcPixmap.rect()>, // to <srcPixmap>. // @@ -261,7 +261,7 @@ public: // // Draws <srcPixmap> on top of <*destPixmapPtr> at <destAt>. - // The mask of <*destPixmapPtr> is adjusted so that all opaque + // The tqmask of <*destPixmapPtr> is adjusted so that all opaque // pixels in <srcPixmap> will be opaque in <*destPixmapPtr>. // static void paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt, @@ -293,16 +293,16 @@ public: // // Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it - // to a mask. KolourPaint - and TQPixmap to a great extent - does not - // support Alpha Channels - only masks. Call this whenever you get + // to a tqmask. KolourPaint - and TQPixmap to a great extent - does not + // support Alpha Channels - only tqmasks. Call this whenever you get // a pixmap from a foreign source; else all KolourPaint code will // exhibit "undefined behaviour". // static void ensureNoAlphaChannel (TQPixmap *destPixmapPtr); // - // Returns <pm>'s mask or a fully opaque mask (with <pm>'s dimensions) - // if <pm> does not have a mask. + // Returns <pm>'s tqmask or a fully opaque tqmask (with <pm>'s dimensions) + // if <pm> does not have a tqmask. // static TQBitmap getNonNullMask (const TQPixmap &pm); @@ -312,7 +312,7 @@ public: static void ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &destRect); // - // Sets the mask of <*destPixmapPtr> at the rectangle, with the + // Sets the tqmask of <*destPixmapPtr> at the rectangle, with the // top-left <destAt> and dimensions <srcMaskBitmap.rect()>, // to transparent where <brushBitmap> is opaque. // diff --git a/kolourpaint/tools/kptoolaction.cpp b/kolourpaint/tools/kptoolaction.cpp index d45acb30..269fd0d0 100644 --- a/kolourpaint/tools/kptoolaction.cpp +++ b/kolourpaint/tools/kptoolaction.cpp @@ -34,11 +34,11 @@ kpToolAction::kpToolAction (const TQString &text, const TQString &pic, const KShortcut &shortcut, const TQObject *receiver, const char *slot, - TQObject *parent, const char *name) + TQObject *tqparent, const char *name) : KToggleAction (text, pic, shortcut, receiver, slot, - parent, name) + tqparent, name) { updateToolTip (); } diff --git a/kolourpaint/tools/kptoolaction.h b/kolourpaint/tools/kptoolaction.h index bf3257c2..c9af7d6d 100644 --- a/kolourpaint/tools/kptoolaction.h +++ b/kolourpaint/tools/kptoolaction.h @@ -38,12 +38,13 @@ class kpToolAction : public KToggleAction, public kpSingleKeyTriggersActionInterface { Q_OBJECT + TQ_OBJECT public: kpToolAction (const TQString &text, const TQString &pic, const KShortcut &shortcut, const TQObject *receiver, const char *slot, - TQObject *parent, const char *name); + TQObject *tqparent, const char *name); virtual ~kpToolAction (); diff --git a/kolourpaint/tools/kptoolairspray.cpp b/kolourpaint/tools/kptoolairspray.cpp index 7f9a2b04..022c534d 100644 --- a/kolourpaint/tools/kptoolairspray.cpp +++ b/kolourpaint/tools/kptoolairspray.cpp @@ -60,7 +60,7 @@ kpToolAirSpray::kpToolAirSpray (kpMainWindow *mainWindow) : kpTool (i18n ("Spraycan"), i18n ("Sprays graffiti"), - Qt::Key_Y, + TQt::Key_Y, mainWindow, "tool_spraycan"), m_currentCommand (0) { @@ -312,21 +312,21 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points) #endif TQPixmap pixmap = document ()->getPixmapAt (docRect); - TQBitmap mask; + TQBitmap tqmask; - TQPainter painter, maskPainter; + TQPainter painter, tqmaskPainter; if (m_color.isOpaque ()) { painter.begin (&pixmap); - painter.setPen (m_color.toQColor ()); + painter.setPen (m_color.toTQColor ()); } - if (pixmap.mask () || m_color.isTransparent ()) + if (pixmap.tqmask () || m_color.isTransparent ()) { - mask = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&mask); - maskPainter.setPen (m_color.maskColor ()); + tqmask = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmask); + tqmaskPainter.setPen (m_color.tqmaskColor ()); } for (int i = 0; i < (int) points.count (); i++) @@ -337,18 +337,18 @@ void kpToolAirSprayCommand::addPoints (const TQPointArray &points) if (painter.isActive ()) painter.drawPoint (pt); - if (maskPainter.isActive ()) - maskPainter.drawPoint (pt); + if (tqmaskPainter.isActive ()) + tqmaskPainter.drawPoint (pt); } - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); if (painter.isActive ()) painter.end (); - if (!mask.isNull ()) - pixmap.setMask (mask); + if (!tqmask.isNull ()) + pixmap.setMask (tqmask); viewManager ()->setFastUpdates (); document ()->setPixmapAt (pixmap, docRect.topLeft ()); diff --git a/kolourpaint/tools/kptoolairspray.h b/kolourpaint/tools/kptoolairspray.h index ed983980..f968bb97 100644 --- a/kolourpaint/tools/kptoolairspray.h +++ b/kolourpaint/tools/kptoolairspray.h @@ -47,6 +47,7 @@ class kpViewManager; class kpToolAirSpray : public kpTool { Q_OBJECT + TQ_OBJECT public: kpToolAirSpray (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolautocrop.cpp b/kolourpaint/tools/kptoolautocrop.cpp index f0284116..0d103af7 100644 --- a/kolourpaint/tools/kptoolautocrop.cpp +++ b/kolourpaint/tools/kptoolautocrop.cpp @@ -34,7 +34,7 @@ // at the other extreme would not be deemed similar enough. The // key is to find the median color as the reference but how do // you do this if you don't know which pixels to sample in the first -// place (that's what you're trying to find)? Chicken and egg situation. +// place (that's what you're trying to tqfind)? Chicken and egg situation. // // The other heuristic that is in doubt is the use of the average // color in determining the similarity of sides (it is possible @@ -70,7 +70,7 @@ kpToolAutoCropBorder::kpToolAutoCropBorder (const TQPixmap *pixmapPtr, : m_pixmapPtr (pixmapPtr), m_processedColorSimilarity (processedColorSimilarity) { - invalidate (); + tqinvalidate (); } @@ -280,7 +280,7 @@ bool kpToolAutoCropBorder::exists () const } // public -void kpToolAutoCropBorder::invalidate () +void kpToolAutoCropBorder::tqinvalidate () { m_rect = TQRect (); m_referenceColor = kpColor::invalid; @@ -306,7 +306,7 @@ public: void showNothingToAutocropMessage (kpMainWindow *mainWindow, bool actOnSelection) { - kpSetOverrideCursorSaver cursorSaver (Qt::arrowCursor); + kpSetOverrideCursorSaver cursorSaver (TQt::arrowCursor); if (actOnSelection) { @@ -367,14 +367,14 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow) botBorder (&pixmap, processedColorSimilarity); - kpSetOverrideCursorSaver cursorSaver (Qt::waitCursor); + kpSetOverrideCursorSaver cursorSaver (TQt::waitCursor); // TODO: With Colour Similarity, a lot of weird (and wonderful) things can // happen resulting in a huge number of code paths. Needs refactoring // and regression testing. // // TODO: e.g. When the top fills entire rect but bot doesn't we could - // invalidate top and continue autocrop. + // tqinvalidate top and continue autocrop. int numRegions = 0; if (!leftBorder.calculate (true/*x*/, +1/*going right*/) || leftBorder.fillsEntirePixmap () || @@ -403,20 +403,20 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow) #if DEBUG_KP_TOOL_AUTO_CROP kdDebug () << "\tnumRegions=" << numRegions << endl; kdDebug () << "\t\tleft=" << leftBorder.rect () - << " refCol=" << (leftBorder.exists () ? (int *) leftBorder.referenceColor ().toQRgb () : 0) - << " avgCol=" << (leftBorder.exists () ? (int *) leftBorder.averageColor ().toQRgb () : 0) + << " refCol=" << (leftBorder.exists () ? (int *) leftBorder.referenceColor ().toTQRgb () : 0) + << " avgCol=" << (leftBorder.exists () ? (int *) leftBorder.averageColor ().toTQRgb () : 0) << endl; kdDebug () << "\t\tright=" << rightBorder.rect () - << " refCol=" << (rightBorder.exists () ? (int *) rightBorder.referenceColor ().toQRgb () : 0) - << " avgCol=" << (rightBorder.exists () ? (int *) rightBorder.averageColor ().toQRgb () : 0) + << " refCol=" << (rightBorder.exists () ? (int *) rightBorder.referenceColor ().toTQRgb () : 0) + << " avgCol=" << (rightBorder.exists () ? (int *) rightBorder.averageColor ().toTQRgb () : 0) << endl; kdDebug () << "\t\ttop=" << topBorder.rect () - << " refCol=" << (topBorder.exists () ? (int *) topBorder.referenceColor ().toQRgb () : 0) - << " avgCol=" << (topBorder.exists () ? (int *) topBorder.averageColor ().toQRgb () : 0) + << " refCol=" << (topBorder.exists () ? (int *) topBorder.referenceColor ().toTQRgb () : 0) + << " avgCol=" << (topBorder.exists () ? (int *) topBorder.averageColor ().toTQRgb () : 0) << endl; kdDebug () << "\t\tbot=" << botBorder.rect () - << " refCol=" << (botBorder.exists () ? (int *) botBorder.referenceColor ().toQRgb () : 0) - << " avgCol=" << (botBorder.exists () ? (int *) botBorder.averageColor ().toQRgb () : 0) + << " refCol=" << (botBorder.exists () ? (int *) botBorder.referenceColor ().toTQRgb () : 0) + << " avgCol=" << (botBorder.exists () ? (int *) botBorder.averageColor ().toTQRgb () : 0) << endl; #endif @@ -439,7 +439,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow) #if DEBUG_KP_TOOL_AUTO_CROP kdDebug () << "\tignoring left border" << endl; #endif - leftBorder.invalidate (); + leftBorder.tqinvalidate (); } } @@ -454,7 +454,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow) #if DEBUG_KP_TOOL_AUTO_CROP kdDebug () << "\tignoring top border" << endl; #endif - topBorder.invalidate (); + topBorder.tqinvalidate (); } } @@ -654,7 +654,7 @@ void kpToolAutoCropCommand::unexecute () return; TQPixmap pixmap (m_oldWidth, m_oldHeight); - TQBitmap maskBitmap; + TQBitmap tqmaskBitmap; // restore the position of the centre image kpPixmapFX::setPixmapAt (&pixmap, m_contentsRect, @@ -663,7 +663,7 @@ void kpToolAutoCropCommand::unexecute () // draw the borders TQPainter painter (&pixmap); - TQPainter maskPainter; + TQPainter tqmaskPainter; const kpToolAutoCropBorder *borders [] = { @@ -690,23 +690,23 @@ void kpToolAutoCropCommand::unexecute () kpColor col = (*b)->referenceColor (); #if DEBUG_KP_TOOL_AUTO_CROP && 1 kdDebug () << "\tdrawing border " << (*b)->rect () - << " rgb=" << (int *) col.toQRgb () /* %X hack */ << endl; + << " rgb=" << (int *) col.toTQRgb () /* %X hack */ << endl; #endif if (col.isOpaque ()) { - painter.fillRect ((*b)->rect (), col.toQColor ()); + painter.fillRect ((*b)->rect (), col.toTQColor ()); } else { - if (maskBitmap.isNull ()) + if (tqmaskBitmap.isNull ()) { // TODO: dangerous when a painter is active on pixmap? - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); } - maskPainter.fillRect ((*b)->rect (), Qt::color0/*transparent*/); + tqmaskPainter.fillRect ((*b)->rect (), TQt::color0/*transparent*/); } } else @@ -720,24 +720,24 @@ void kpToolAutoCropCommand::unexecute () // and the other branch would execute. if (*p) { - // TODO: We should really edit the mask here. Due to good - // luck (if "maskBitmap" is initialized above, this region - // will be marked as opaque in the mask; if it's not + // TODO: We should really edit the tqmask here. Due to good + // luck (if "tqmaskBitmap" is initialized above, this region + // will be marked as opaque in the tqmask; if it's not // initialized, we will be opaque by default), we - // don't actually have to edit the mask but this is + // don't actually have to edit the tqmask but this is // highly error-prone. painter.drawPixmap ((*b)->rect (), **p); } } } - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); painter.end (); - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); if (!m_actOnSelection) diff --git a/kolourpaint/tools/kptoolautocrop.h b/kolourpaint/tools/kptoolautocrop.h index bb1a5d4a..886b4223 100644 --- a/kolourpaint/tools/kptoolautocrop.h +++ b/kolourpaint/tools/kptoolautocrop.h @@ -69,7 +69,7 @@ public: bool fillsEntirePixmap () const; bool exists () const; - void invalidate (); + void tqinvalidate (); private: const TQPixmap *m_pixmapPtr; diff --git a/kolourpaint/tools/kptoolbrush.cpp b/kolourpaint/tools/kptoolbrush.cpp index 6e684ed9..30c68aee 100644 --- a/kolourpaint/tools/kptoolbrush.cpp +++ b/kolourpaint/tools/kptoolbrush.cpp @@ -32,8 +32,8 @@ kpToolBrush::kpToolBrush (kpMainWindow *mainWindow) : kpToolPen (kpToolPen::Brush, i18n ("Brush"), - i18n ("Draw using brushes of different shapes and sizes"), - Qt::Key_B, + i18n ("Draw using brushes of different tqshapes and sizes"), + TQt::Key_B, mainWindow, "tool_brush") { } diff --git a/kolourpaint/tools/kptoolbrush.h b/kolourpaint/tools/kptoolbrush.h index 69498495..4b86ab9f 100644 --- a/kolourpaint/tools/kptoolbrush.h +++ b/kolourpaint/tools/kptoolbrush.h @@ -34,6 +34,7 @@ class kpToolBrush : public kpToolPen { Q_OBJECT + TQ_OBJECT public: kpToolBrush (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolclear.cpp b/kolourpaint/tools/kptoolclear.cpp index 7b1a775b..b6fa2eab 100644 --- a/kolourpaint/tools/kptoolclear.cpp +++ b/kolourpaint/tools/kptoolclear.cpp @@ -108,7 +108,7 @@ void kpToolClearCommand::execute () kpPixmapFX::fill (&newPixmap, m_newColor); // TODO: maybe disable Image/Clear if transparent colour if (m_newColor.isOpaque ()) - newPixmap.setMask (sel->maskForOwnType ()); + newPixmap.setMask (sel->tqmaskForOwnType ()); sel->setPixmap (newPixmap); } diff --git a/kolourpaint/tools/kptoolcolorpicker.cpp b/kolourpaint/tools/kptoolcolorpicker.cpp index 615012cd..d02a9572 100644 --- a/kolourpaint/tools/kptoolcolorpicker.cpp +++ b/kolourpaint/tools/kptoolcolorpicker.cpp @@ -52,7 +52,7 @@ kpToolColorPicker::kpToolColorPicker (kpMainWindow *mainWindow) : kpTool (i18n ("Color Picker"), i18n ("Lets you select a color from the image"), - Qt::Key_C, + TQt::Key_C, mainWindow, "tool_color_picker") { } diff --git a/kolourpaint/tools/kptoolcolorpicker.h b/kolourpaint/tools/kptoolcolorpicker.h index 6ebaa6d7..b8e79370 100644 --- a/kolourpaint/tools/kptoolcolorpicker.h +++ b/kolourpaint/tools/kptoolcolorpicker.h @@ -42,6 +42,7 @@ class kpColorToolBar; class kpToolColorPicker : public kpTool { Q_OBJECT + TQ_OBJECT public: kpToolColorPicker (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolcolorwasher.cpp b/kolourpaint/tools/kptoolcolorwasher.cpp index 6c2d091f..27679276 100644 --- a/kolourpaint/tools/kptoolcolorwasher.cpp +++ b/kolourpaint/tools/kptoolcolorwasher.cpp @@ -33,7 +33,7 @@ kpToolColorWasher::kpToolColorWasher (kpMainWindow *mainWindow) : kpToolPen (kpToolPen::ColorWasher, i18n ("Color Eraser"), i18n ("Replaces pixels of the foreground color with the background color"), - Qt::Key_O, + TQt::Key_O, mainWindow, "tool_color_washer") { } diff --git a/kolourpaint/tools/kptoolcolorwasher.h b/kolourpaint/tools/kptoolcolorwasher.h index 1a707c3e..537e5723 100644 --- a/kolourpaint/tools/kptoolcolorwasher.h +++ b/kolourpaint/tools/kptoolcolorwasher.h @@ -34,6 +34,7 @@ class kpToolColorWasher : public kpToolPen { Q_OBJECT + TQ_OBJECT public: kpToolColorWasher (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolconverttograyscale.cpp b/kolourpaint/tools/kptoolconverttograyscale.cpp index 524e3e6d..7fe544f2 100644 --- a/kolourpaint/tools/kptoolconverttograyscale.cpp +++ b/kolourpaint/tools/kptoolconverttograyscale.cpp @@ -79,7 +79,7 @@ void kpToolConvertToGrayscaleCommand::execute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); m_oldPixmapPtr = new TQPixmap (); *m_oldPixmapPtr = *doc->pixmap (m_actOnSelection); diff --git a/kolourpaint/tools/kptoolcrop.cpp b/kolourpaint/tools/kptoolcrop.cpp index f1e530ca..e5483a90 100644 --- a/kolourpaint/tools/kptoolcrop.cpp +++ b/kolourpaint/tools/kptoolcrop.cpp @@ -68,7 +68,7 @@ public: virtual ~kpToolCropSetImageCommand (); /* (uninteresting child of macro cmd) */ - virtual TQString name () const { return TQString::null; } + virtual TQString name () const { return TQString(); } virtual int size () const { @@ -132,7 +132,7 @@ void kpToolCropSetImageCommand::execute () // // The selection is deleted. // - // TODO: Do not introduce a mask if the result will not contain + // TODO: Do not introduce a tqmask if the result will not contain // any transparent pixels. // @@ -167,7 +167,7 @@ void kpToolCropSetImageCommand::execute () kpPixmapFX::paintMaskTransparentWithBrush (&newDocPixmap, TQPoint (0, 0), - m_fromSelection.maskForOwnType ()); + m_fromSelection.tqmaskForOwnType ()); kpPixmapFX::paintPixmapAt (&newDocPixmap, TQPoint (0, 0), @@ -274,7 +274,7 @@ kpToolCropCommand::kpToolCropCommand (kpMainWindow *mainWindow) #endif kpToolSelectionMoveCommand *moveCmd = new kpToolSelectionMoveCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, mainWindow); moveCmd->moveTo (TQPoint (0, 0), true/*move on exec, not now*/); moveCmd->finalize (); @@ -291,7 +291,7 @@ kpToolCropCommand::kpToolCropCommand (kpMainWindow *mainWindow) #if 0 addCommand ( new kpToolSelectionCreateCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, selectionBorderAndMovedTo0_0 (*sel), mainWindow)); #endif diff --git a/kolourpaint/tools/kptoolcurve.cpp b/kolourpaint/tools/kptoolcurve.cpp index f889c1ba..65424026 100644 --- a/kolourpaint/tools/kptoolcurve.cpp +++ b/kolourpaint/tools/kptoolcurve.cpp @@ -35,7 +35,7 @@ kpToolCurve::kpToolCurve (kpMainWindow *mainWindow) : kpToolPolygon (Curve, i18n ("Curve"), i18n ("Draws curves"), - Qt::Key_V, + TQt::Key_V, mainWindow, "tool_curve") { } diff --git a/kolourpaint/tools/kptoolcurve.h b/kolourpaint/tools/kptoolcurve.h index 489ce1fb..29baaead 100644 --- a/kolourpaint/tools/kptoolcurve.h +++ b/kolourpaint/tools/kptoolcurve.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolCurve : public kpToolPolygon { Q_OBJECT + TQ_OBJECT public: kpToolCurve (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolellipse.cpp b/kolourpaint/tools/kptoolellipse.cpp index f3b31dbb..0f52a6ce 100644 --- a/kolourpaint/tools/kptoolellipse.cpp +++ b/kolourpaint/tools/kptoolellipse.cpp @@ -33,7 +33,7 @@ kpToolEllipse::kpToolEllipse (kpMainWindow *mainWindow) : kpToolRectangle (Ellipse, i18n ("Ellipse"), i18n ("Draws ellipses and circles"), - Qt::Key_E, + TQt::Key_E, mainWindow, "tool_ellipse") { } diff --git a/kolourpaint/tools/kptoolellipse.h b/kolourpaint/tools/kptoolellipse.h index fc9bf798..fde8708d 100644 --- a/kolourpaint/tools/kptoolellipse.h +++ b/kolourpaint/tools/kptoolellipse.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolEllipse : public kpToolRectangle { Q_OBJECT + TQ_OBJECT public: kpToolEllipse (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolellipticalselection.cpp b/kolourpaint/tools/kptoolellipticalselection.cpp index 13daf799..353fea9f 100644 --- a/kolourpaint/tools/kptoolellipticalselection.cpp +++ b/kolourpaint/tools/kptoolellipticalselection.cpp @@ -35,7 +35,7 @@ kpToolEllipticalSelection::kpToolEllipticalSelection (kpMainWindow *mainWindow) : kpToolSelection (Ellipse, i18n ("Selection (Elliptical)"), i18n ("Makes an elliptical or circular selection"), - Qt::Key_I, + TQt::Key_I, mainWindow, "tool_elliptical_selection") { } diff --git a/kolourpaint/tools/kptooleraser.cpp b/kolourpaint/tools/kptooleraser.cpp index 1acbf66e..7349f01c 100644 --- a/kolourpaint/tools/kptooleraser.cpp +++ b/kolourpaint/tools/kptooleraser.cpp @@ -32,7 +32,7 @@ kpToolEraser::kpToolEraser (kpMainWindow *mainWindow) : kpToolPen (kpToolPen::Eraser, i18n ("Eraser"), i18n ("Lets you rub out mistakes"), - Qt::Key_A, + TQt::Key_A, mainWindow, "tool_eraser") { } diff --git a/kolourpaint/tools/kptooleraser.h b/kolourpaint/tools/kptooleraser.h index 4dd7704a..8626c67b 100644 --- a/kolourpaint/tools/kptooleraser.h +++ b/kolourpaint/tools/kptooleraser.h @@ -33,7 +33,8 @@ class kpToolEraser : public kpToolPen { -Q_OBJECT +Q_OBJECT +TQ_OBJECT public: kpToolEraser (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolflip.cpp b/kolourpaint/tools/kptoolflip.cpp index 146b639f..1d85dc46 100644 --- a/kolourpaint/tools/kptoolflip.cpp +++ b/kolourpaint/tools/kptoolflip.cpp @@ -80,7 +80,7 @@ TQString kpToolFlipCommand::name () const else { kdError () << "kpToolFlipCommand::name() not asked to flip" << endl; - return TQString::null; + return TQString(); } #endif @@ -120,7 +120,7 @@ void kpToolFlipCommand::flip () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (m_actOnSelection) @@ -149,8 +149,8 @@ void kpToolFlipCommand::flip () bool kpToolFlipDialog::s_lastIsVerticalFlip = true; -kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, TQWidget *parent) - : KDialogBase (parent, 0/*name*/, true/*modal*/, +kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, TQWidget *tqparent) + : KDialogBase (tqparent, 0/*name*/, true/*modal*/, actOnSelection ? i18n ("Flip Selection") : i18n ("Flip Image"), KDialogBase::Ok | KDialogBase::Cancel) { diff --git a/kolourpaint/tools/kptoolflip.h b/kolourpaint/tools/kptoolflip.h index 8399cf40..279fcec7 100644 --- a/kolourpaint/tools/kptoolflip.h +++ b/kolourpaint/tools/kptoolflip.h @@ -65,9 +65,10 @@ private: class kpToolFlipDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - kpToolFlipDialog (bool actOnSelection, TQWidget *parent); + kpToolFlipDialog (bool actOnSelection, TQWidget *tqparent); ~kpToolFlipDialog (); private: diff --git a/kolourpaint/tools/kptoolfloodfill.cpp b/kolourpaint/tools/kptoolfloodfill.cpp index 518820ba..51e35707 100644 --- a/kolourpaint/tools/kptoolfloodfill.cpp +++ b/kolourpaint/tools/kptoolfloodfill.cpp @@ -53,7 +53,7 @@ kpToolFloodFill::kpToolFloodFill (kpMainWindow *mainWindow) : kpTool (i18n ("Flood Fill"), i18n ("Fills regions in the image"), - Qt::Key_F, + TQt::Key_F, mainWindow, "tool_flood_fill"), m_currentCommand (0) { @@ -80,7 +80,7 @@ void kpToolFloodFill::beginDraw () kdDebug () << "kpToolFloodFill::beginDraw()" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); // Flood Fill is an expensive CPU operation so we only fill at a // mouse click (beginDraw ()), not on mouse move (virtually draw()) diff --git a/kolourpaint/tools/kptoolfloodfill.h b/kolourpaint/tools/kptoolfloodfill.h index 73f5aae2..f048f3f1 100644 --- a/kolourpaint/tools/kptoolfloodfill.h +++ b/kolourpaint/tools/kptoolfloodfill.h @@ -48,6 +48,7 @@ class kpToolFloodFillCommand; class kpToolFloodFill : public kpTool { Q_OBJECT + TQ_OBJECT public: kpToolFloodFill (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolfreeformselection.cpp b/kolourpaint/tools/kptoolfreeformselection.cpp index 7c736728..6beab422 100644 --- a/kolourpaint/tools/kptoolfreeformselection.cpp +++ b/kolourpaint/tools/kptoolfreeformselection.cpp @@ -35,7 +35,7 @@ kpToolFreeFormSelection::kpToolFreeFormSelection (kpMainWindow *mainWindow) : kpToolSelection (kpToolSelection::FreeForm, i18n ("Selection (Free-Form)"), i18n ("Makes a free-form selection"), - Qt::Key_M, + TQt::Key_M, mainWindow, "tool_free_form_selection") { } diff --git a/kolourpaint/tools/kptoolline.cpp b/kolourpaint/tools/kptoolline.cpp index 809824d9..e9cf57dd 100644 --- a/kolourpaint/tools/kptoolline.cpp +++ b/kolourpaint/tools/kptoolline.cpp @@ -35,7 +35,7 @@ kpToolLine::kpToolLine (kpMainWindow *mainWindow) : kpToolPolygon (Line, i18n ("Line"), i18n ("Draws lines"), - Qt::Key_L, + TQt::Key_L, mainWindow, "tool_line") { } diff --git a/kolourpaint/tools/kptoolline.h b/kolourpaint/tools/kptoolline.h index 7a956245..82d99510 100644 --- a/kolourpaint/tools/kptoolline.h +++ b/kolourpaint/tools/kptoolline.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolLine : public kpToolPolygon { Q_OBJECT + TQ_OBJECT public: kpToolLine (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolpen.cpp b/kolourpaint/tools/kptoolpen.cpp index b738060c..5c7ff6ea 100644 --- a/kolourpaint/tools/kptoolpen.cpp +++ b/kolourpaint/tools/kptoolpen.cpp @@ -73,7 +73,7 @@ kpToolPen::kpToolPen (Mode mode, kpToolPen::kpToolPen (kpMainWindow *mainWindow) : kpTool (i18n ("Pen"), i18n ("Draws dots and freehand strokes"), - Qt::Key_P, + TQt::Key_P, mainWindow, "tool_pen"), m_mode (Pen), m_toolWidgetBrush (0), @@ -116,7 +116,7 @@ TQString kpToolPen::haventBegunDrawUserMessage () const case ColorWasher: return i18n ("Click or drag to erase pixels of the foreground color."); default: - return TQString::null; + return TQString(); } } @@ -179,7 +179,7 @@ void kpToolPen::end () if (vm) { if (vm->tempPixmap () && vm->tempPixmap ()->isBrush ()) - vm->invalidateTempPixmap (); + vm->tqinvalidateTempPixmap (); if (m_mode & (SquareBrushes | DiverseBrushes)) vm->unsetCursor (); @@ -218,7 +218,7 @@ void kpToolPen::beginDraw () // user starts drawing in the background color, we don't want to leave // the cursor in the foreground colour -- just hide it in all cases // to avoid confusion - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); setUserMessage (cancelUserMessage ()); } @@ -266,15 +266,15 @@ void kpToolPen::hover (const TQPoint &point) } #if DEBUG_KP_TOOL_PEN && 0 - if (document ()->rect ().contains (point)) + if (document ()->rect ().tqcontains (point)) { TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ()); - QRgb v = image.pixel (point.x (), point.y ()); - kdDebug () << "(" << point << "): r=" << qRed (v) - << " g=" << qGreen (v) - << " b=" << qBlue (v) - << " a=" << qAlpha (v) + TQRgb v = image.pixel (point.x (), point.y ()); + kdDebug () << "(" << point << "): r=" << tqRed (v) + << " g=" << tqGreen (v) + << " b=" << tqBlue (v) + << " a=" << tqAlpha (v) << endl; } #endif @@ -282,15 +282,15 @@ void kpToolPen::hover (const TQPoint &point) setUserShapePoints (point); } -bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter, +bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter, const TQImage &image, const kpColor &colorToReplace, const TQRect &imageRect, int plotx, int ploty) { - return wash (painter, maskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty)); + return wash (painter, tqmaskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty)); } -bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter, +bool kpToolPen::wash (TQPainter *painter, TQPainter *tqmaskPainter, const TQImage &image, const kpColor &colorToReplace, const TQRect &imageRect, const TQRect &drawRect) @@ -308,8 +308,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter, { \ if (painter && painter->isActive ()) \ painter->drawLine (startDrawX, y, x - 1, y); \ - if (maskPainter && maskPainter->isActive ()) \ - maskPainter->drawLine (startDrawX, y, x - 1, y); \ + if (tqmaskPainter && tqmaskPainter->isActive ()) \ + tqmaskPainter->drawLine (startDrawX, y, x - 1, y); \ didSomething = true; \ startDrawX = -1; \ } @@ -331,8 +331,8 @@ bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter, #if DEBUG_KP_TOOL_PEN && 0 fprintf (stderr, "y=%i x=%i colorAtPixel=%08X colorToReplace=%08X ... ", y, x, - kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).toQRgb (), - colorToReplace.toQRgb ()); + kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).toTQRgb (), + colorToReplace.toTQRgb ()); #endif if (kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).isSimilarTo (colorToReplace, processedColorSimilarity ())) { @@ -383,33 +383,33 @@ void kpToolPen::globalDraw () if (foregroundColor () == backgroundColor () && processedColorSimilarity () == 0) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); kpToolPenCommand *cmd = new kpToolPenCommand ( i18n ("Color Eraser"), mainWindow ()); - TQPainter painter, maskPainter; - TQBitmap maskBitmap; + TQPainter painter, tqmaskPainter; + TQBitmap tqmaskBitmap; if (backgroundColor ().isOpaque ()) { painter.begin (document ()->pixmap ()); - painter.setPen (backgroundColor ().toQColor ()); + painter.setPen (backgroundColor ().toTQColor ()); } if (backgroundColor ().isTransparent () || - document ()->pixmap ()->mask ()) + document ()->pixmap ()->tqmask ()) { - maskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ()); - maskPainter.begin (&maskBitmap); + tqmaskBitmap = kpPixmapFX::getNonNullMask (*document ()->pixmap ()); + tqmaskPainter.begin (&tqmaskBitmap); - maskPainter.setPen (backgroundColor ().maskColor ()); + tqmaskPainter.setPen (backgroundColor ().tqmaskColor ()); } const TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ()); TQRect rect = document ()->rect (); - const bool didSomething = wash (&painter, &maskPainter, image, + const bool didSomething = wash (&painter, &tqmaskPainter, image, foregroundColor ()/*replace foreground*/, rect, rect); @@ -417,13 +417,13 @@ void kpToolPen::globalDraw () if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); if (didSomething) { - if (!maskBitmap.isNull ()) - document ()->pixmap ()->setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + document ()->pixmap ()->setMask (tqmaskBitmap); document ()->slotContentsChanged (rect); @@ -471,14 +471,14 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const // OPT: this seems hopelessly inefficient if (c.isOpaque ()) { - pixmap.fill (c.toQColor ()); + pixmap.fill (c.toTQColor ()); } else { - TQBitmap mask (1, 1); - mask.fill (Qt::color0/*transparent*/); + TQBitmap tqmask (1, 1); + tqmask.fill (TQt::color0/*transparent*/); - pixmap.setMask (mask); + pixmap.setMask (tqmask); } // draw onto doc @@ -519,38 +519,38 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const #if DEBUG_KP_TOOL_PEN kdDebug () << "\tconvert to image: " << timer.restart () << "ms" << endl; #endif - TQPainter painter, maskPainter; - TQBitmap maskBitmap; + TQPainter painter, tqmaskPainter; + TQBitmap tqmaskBitmap; if (color (m_mouseButton).isOpaque ()) { painter.begin (&pixmap); - painter.setPen (color (m_mouseButton).toQColor ()); + painter.setPen (color (m_mouseButton).toTQColor ()); } if (color (m_mouseButton).isTransparent () || - pixmap.mask ()) + pixmap.tqmask ()) { - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (color (m_mouseButton).maskColor ()); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (color (m_mouseButton).tqmaskColor ()); } - bool didSomething = wash (&painter, &maskPainter, + bool didSomething = wash (&painter, &tqmaskPainter, image, - color (1 - m_mouseButton)/*color to replace*/, + color (1 - m_mouseButton)/*color to tqreplace*/, rect, rect); if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); if (didSomething) { - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); #if DEBUG_KP_TOOL_PEN kdDebug () << "\twashed: " << timer.restart () << "ms" << endl; @@ -594,23 +594,23 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const bool transparent = c.isTransparent (); TQPixmap pixmap = document ()->getPixmapAt (rect); - TQBitmap maskBitmap; + TQBitmap tqmaskBitmap; - TQPainter painter, maskPainter; + TQPainter painter, tqmaskPainter; if (m_mode & (DrawsPixels | WashesPixmaps)) { if (!transparent) { painter.begin (&pixmap); - painter.setPen (c.toQColor ()); + painter.setPen (c.toTQColor ()); } - if (transparent || pixmap.mask ()) + if (transparent || pixmap.tqmask ()) { - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (c.maskColor ()); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (c.tqmaskColor ()); } } @@ -635,8 +635,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (painter.isActive ()) painter.drawLine (sp, ep); - if (maskPainter.isActive ()) - maskPainter.drawLine (sp, ep); + if (tqmaskPainter.isActive ()) + tqmaskPainter.drawLine (sp, ep); didSomething = true; } @@ -678,7 +678,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (m_mode & WashesPixmaps) { - if (wash (&painter, &maskPainter, image, + if (wash (&painter, &tqmaskPainter, image, colorToReplace, rect, plotx + rect.left (), ploty + rect.top ())) { @@ -746,7 +746,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (m_mode & WashesPixmaps) { - if (wash (&painter, &maskPainter, image, + if (wash (&painter, &tqmaskPainter, image, colorToReplace, rect, plotx + rect.left (), oldploty + rect.top ())) { @@ -774,7 +774,7 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (m_mode & WashesPixmaps) { - if (wash (&painter, &maskPainter, image, + if (wash (&painter, &tqmaskPainter, image, colorToReplace, rect, plotx + rect.left (), ploty + rect.top ())) { @@ -806,8 +806,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); #if DEBUG_KP_TOOL_PEN if (m_mode & WashesPixmaps) @@ -824,8 +824,8 @@ void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const if (didSomething) { - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); // draw onto doc document ()->setPixmapAt (pixmap, rect.topLeft ()); @@ -920,7 +920,7 @@ void kpToolPen::slotForegroundColorChanged (const kpColor &col) kdDebug () << "kpToolPen::slotForegroundColorChanged()" << endl; #endif if (col.isOpaque ()) - m_brushPixmap [(m_mode & SwappedColors) ? 1 : 0].fill (col.toQColor ()); + m_brushPixmap [(m_mode & SwappedColors) ? 1 : 0].fill (col.toTQColor ()); updateBrushCursor (); } @@ -933,7 +933,7 @@ void kpToolPen::slotBackgroundColorChanged (const kpColor &col) #endif if (col.isOpaque ()) - m_brushPixmap [(m_mode & SwappedColors) ? 0 : 1].fill (col.toQColor ()); + m_brushPixmap [(m_mode & SwappedColors) ? 0 : 1].fill (col.toTQColor ()); updateBrushCursor (); } @@ -948,7 +948,7 @@ void kpToolPen::slotBrushChanged (const TQPixmap &pixmap, bool isDiagonalLine) { m_brushPixmap [i] = pixmap; if (color (i).isOpaque ()) - m_brushPixmap [i].fill (color (i).toQColor ()); + m_brushPixmap [i].fill (color (i).toTQColor ()); } m_brushIsDiagonalLine = isDiagonalLine; @@ -966,7 +966,7 @@ void kpToolPen::slotEraserSizeChanged (int size) for (int i = 0; i < 2; i++) { // Note: No matter what, the eraser's brush pixmap is never given - // a mask. + // a tqmask. // // With a transparent color, since we don't fill anything, the // resize by itself will leave us with garbage pixels. This @@ -978,7 +978,7 @@ void kpToolPen::slotEraserSizeChanged (int size) // which only cares about the opaqueness. m_brushPixmap [i].resize (size, size); if (color (i).isOpaque ()) - m_brushPixmap [i].fill (color (i).toQColor ()); + m_brushPixmap [i].fill (color (i).toTQColor ()); } updateBrushCursor (); diff --git a/kolourpaint/tools/kptoolpen.h b/kolourpaint/tools/kptoolpen.h index 6bf8976a..77d7c33c 100644 --- a/kolourpaint/tools/kptoolpen.h +++ b/kolourpaint/tools/kptoolpen.h @@ -48,6 +48,7 @@ class kpViewManager; class kpToolPen : public kpTool { Q_OBJECT + TQ_OBJECT public: enum Mode @@ -102,11 +103,11 @@ private slots: void slotEraserSizeChanged (int size); private: - bool wash (TQPainter *painter, TQPainter *maskPainter, + bool wash (TQPainter *painter, TQPainter *tqmaskPainter, const TQImage &image, const kpColor &colorToReplace, const TQRect &imageRect, int plotx, int ploty); - bool wash (TQPainter *painter, TQPainter *maskPainter, + bool wash (TQPainter *painter, TQPainter *tqmaskPainter, const TQImage &image, const kpColor &colorToReplace, const TQRect &imageRect, const TQRect &drawRect); diff --git a/kolourpaint/tools/kptoolpolygon.cpp b/kolourpaint/tools/kptoolpolygon.cpp index 56c7941d..0e298759 100644 --- a/kolourpaint/tools/kptoolpolygon.cpp +++ b/kolourpaint/tools/kptoolpolygon.cpp @@ -81,7 +81,7 @@ static const char *pointArrayToString (const TQPointArray &pointArray) static TQPen makeMaskPen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle) { - return TQPen (color.maskColor (), + return TQPen (color.tqmaskColor (), lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle, Qt::RoundCap, Qt::RoundJoin); } @@ -90,7 +90,7 @@ static TQPen makePen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyl { if (color.isOpaque ()) { - return TQPen (color.toQColor (), + return TQPen (color.toTQColor (), lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle, Qt::RoundCap, Qt::RoundJoin); } @@ -103,7 +103,7 @@ static TQBrush makeMaskBrush (const kpColor &foregroundColor, kpToolWidgetFillStyle *toolWidgetFillStyle) { if (toolWidgetFillStyle) - return toolWidgetFillStyle->maskBrush (foregroundColor, backgroundColor); + return toolWidgetFillStyle->tqmaskBrush (foregroundColor, backgroundColor); else return Qt::NoBrush; } @@ -155,38 +155,38 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap, // draw TQPen pen = makePen (foregroundColor, lineWidth, lineStyle), - maskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle); + tqmaskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle); TQBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle), - maskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle); + tqmaskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle); TQPixmap pixmap = oldPixmap; - TQBitmap maskBitmap; + TQBitmap tqmaskBitmap; - TQPainter painter, maskPainter; + TQPainter painter, tqmaskPainter; - if (pixmap.mask () || - (maskPen.style () != Qt::NoPen && - maskPen.color () == Qt::color0/*transparent*/) || - (maskBrush.style () != Qt::NoBrush && - maskBrush.color () == Qt::color0/*transparent*/)) + if (pixmap.tqmask () || + (tqmaskPen.style () != TQt::NoPen && + tqmaskPen.color () == TQt::color0/*transparent*/) || + (tqmaskBrush.style () != TQt::NoBrush && + tqmaskBrush.color () == TQt::color0/*transparent*/)) { - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (maskPen); - maskPainter.setBrush (maskBrush); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (tqmaskPen); + tqmaskPainter.setBrush (tqmaskBrush); #if DEBUG_KP_TOOL_POLYGON && 0 - kdDebug () << "\tmaskPainter begin because:" << endl - << "\t\tpixmap.mask=" << pixmap.mask () << endl - << "\t\t(maskPenStyle!=NoPen)=" << (maskPen.style () != Qt::NoPen) << endl - << "\t\t(maskPenColor==trans)=" << (maskPen.color () == Qt::color0) << endl - << "\t\t(maskBrushStyle!=NoBrush)=" << (maskBrush.style () != Qt::NoBrush) << endl - << "\t\t(maskBrushColor==trans)=" << (maskBrush.color () == Qt::color0) << endl; + kdDebug () << "\ttqmaskPainter begin because:" << endl + << "\t\tpixmap.tqmask=" << pixmap.tqmask () << endl + << "\t\t(tqmaskPenStyle!=NoPen)=" << (tqmaskPen.style () != TQt::NoPen) << endl + << "\t\t(tqmaskPenColor==trans)=" << (tqmaskPen.color () == TQt::color0) << endl + << "\t\t(tqmaskBrushStyle!=NoBrush)=" << (tqmaskBrush.style () != TQt::NoBrush) << endl + << "\t\t(tqmaskBrushColor==trans)=" << (tqmaskBrush.color () == TQt::color0) << endl; #endif } - if (pen.style () != Qt::NoPen || - brush.style () != Qt::NoBrush) + if (pen.style () != TQt::NoPen || + brush.style () != TQt::NoBrush) { painter.begin (&pixmap); painter.setPen (pen); @@ -204,11 +204,11 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap, if (painter.isActive ()) \ painter . cmd ; \ \ - if (maskPainter.isActive ()) \ - maskPainter . cmd ; \ + if (tqmaskPainter.isActive ()) \ + tqmaskPainter . cmd ; \ } - // SYNC: Qt bug + // SYNC: TQt bug if (only1PixelInPointArray (pointsInRect)) { PAINTER_CALL (drawPoint (pointsInRect [0])); @@ -234,25 +234,25 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap, if (painter.isActive ()) { TQPen XORpen = painter.pen (); - XORpen.setColor (Qt::white); + XORpen.setColor (TQt::white); painter.setPen (XORpen); - painter.setRasterOp (Qt::XorROP); + painter.setRasterOp (TQt::XorROP); } - if (maskPainter.isActive ()) + if (tqmaskPainter.isActive ()) { - TQPen XORpen = maskPainter.pen (); + TQPen XORpen = tqmaskPainter.pen (); // TODO??? #if 0 if (kpTool::isColorTransparent (foregroundColor)) - XORpen.setColor (Qt::color1/*opaque*/); + XORpen.setColor (TQt::color1/*opaque*/); else - XORpen.setColor (Qt::color0/*transparent*/); + XORpen.setColor (TQt::color0/*transparent*/); #endif - maskPainter.setPen (XORpen); + tqmaskPainter.setPen (XORpen); } PAINTER_CALL (drawLine (pointsInRect [0], pointsInRect [count - 1])); @@ -288,11 +288,11 @@ static TQPixmap pixmap (const TQPixmap &oldPixmap, if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); return pixmap; } @@ -315,7 +315,7 @@ kpToolPolygon::kpToolPolygon (Mode mode, kpToolPolygon::kpToolPolygon (kpMainWindow *mainWindow) : kpTool (i18n ("Polygon"), i18n ("Draws polygons"), - Qt::Key_G, + TQt::Key_G, mainWindow, "tool_polygon"), m_mode (Polygon), m_toolWidgetFillStyle (0), @@ -346,7 +346,7 @@ TQString kpToolPolygon::haventBegunShapeUserMessage () const case Curve: return i18n ("Drag out the start and end points."); default: - return TQString::null; + return TQString(); } } @@ -479,7 +479,7 @@ void kpToolPolygon::beginDraw () break; default: - kdError () << "kpToolPolygon::beginDraw() shape" << endl; + kdError () << "kpToolPolygon::beginDraw() tqshape" << endl; break; } } @@ -565,8 +565,8 @@ void kpToolPolygon::applyModifiers () #define sgn(a) ((a)<0?-1:1) // Round distances _before_ adding to any coordinate // (ensures consistent rounding behaviour in x & y directions) - const int newdx = qRound (dist * cos (angle) * sgn (diffx)); - const int newdy = qRound (dist * sin (angle) * sgn (diffy)); + const int newdx = tqRound (dist * cos (angle) * sgn (diffx)); + const int newdy = tqRound (dist * sin (angle) * sgn (diffy)); #undef sgn m_toolLineEndPoint = TQPoint (m_toolLineStartPoint.x () + newdx, @@ -671,7 +671,7 @@ void kpToolPolygon::cancelShape () endDraw (TQPoint (), TQRect ()); commandHistory ()->undo (); #else - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); #endif m_points.resize (0); @@ -781,7 +781,7 @@ void kpToolPolygon::endShape (const TQPoint &, const TQRect &) if (!hasBegunShape ()) return; - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth); diff --git a/kolourpaint/tools/kptoolpolygon.h b/kolourpaint/tools/kptoolpolygon.h index 289fb9ab..50129be3 100644 --- a/kolourpaint/tools/kptoolpolygon.h +++ b/kolourpaint/tools/kptoolpolygon.h @@ -60,6 +60,7 @@ class kpViewManager; class kpToolPolygon : public kpTool { Q_OBJECT + TQ_OBJECT public: enum Mode diff --git a/kolourpaint/tools/kptoolpolyline.cpp b/kolourpaint/tools/kptoolpolyline.cpp index 6299b5b7..aa388ef4 100644 --- a/kolourpaint/tools/kptoolpolyline.cpp +++ b/kolourpaint/tools/kptoolpolyline.cpp @@ -35,7 +35,7 @@ kpToolPolyline::kpToolPolyline (kpMainWindow *mainWindow) : kpToolPolygon (Polyline, i18n ("Connected Lines"), i18n ("Draws connected lines"), - Qt::Key_N, + TQt::Key_N, mainWindow, "tool_polyline") { } diff --git a/kolourpaint/tools/kptoolpolyline.h b/kolourpaint/tools/kptoolpolyline.h index f76a3959..96cfcac5 100644 --- a/kolourpaint/tools/kptoolpolyline.h +++ b/kolourpaint/tools/kptoolpolyline.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolPolyline : public kpToolPolygon { Q_OBJECT + TQ_OBJECT public: kpToolPolyline (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolpreviewdialog.cpp b/kolourpaint/tools/kptoolpreviewdialog.cpp index 5149664b..a9542989 100644 --- a/kolourpaint/tools/kptoolpreviewdialog.cpp +++ b/kolourpaint/tools/kptoolpreviewdialog.cpp @@ -51,14 +51,14 @@ kpToolPreviewDialog::kpToolPreviewDialog (Features features, const TQString &caption, const TQString &afterActionText, bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name) - : KDialogBase (parent, name, true/*modal*/, + : KDialogBase (tqparent, name, true/*modal*/, caption, KDialogBase::Ok | KDialogBase::Cancel), m_afterActionText (afterActionText), m_actOnSelection (actOnSelection), - m_mainWindow (parent), + m_mainWindow (tqparent), m_dimensionsGroupBox (0), m_afterTransformDimensionsLabel (0), m_previewGroupBox (0), @@ -149,10 +149,10 @@ void kpToolPreviewDialog::createDimensionsGroupBox () 2, 2, marginHint () * 2, spacingHint ()); - dimensionsLayout->addWidget (originalLabel, 0, 0, Qt::AlignBottom); - dimensionsLayout->addWidget (originalDimensionsLabel, 0, 1, Qt::AlignBottom); - dimensionsLayout->addWidget (afterTransformLabel, 1, 0, Qt::AlignTop); - dimensionsLayout->addWidget (m_afterTransformDimensionsLabel, 1, 1, Qt::AlignTop); + dimensionsLayout->addWidget (originalLabel, 0, 0, TQt::AlignBottom); + dimensionsLayout->addWidget (originalDimensionsLabel, 0, 1, TQt::AlignBottom); + dimensionsLayout->addWidget (afterTransformLabel, 1, 0, TQt::AlignTop); + dimensionsLayout->addWidget (m_afterTransformDimensionsLabel, 1, 1, TQt::AlignTop); } // private @@ -173,10 +173,10 @@ void kpToolPreviewDialog::createPreviewGroupBox () TQVBoxLayout *previewLayout = new TQVBoxLayout (m_previewGroupBox, marginHint () * 2, - QMAX (1, spacingHint () / 2)); + TQMAX (1, spacingHint () / 2)); previewLayout->addWidget (m_previewPixmapLabel, 1/*stretch*/); - previewLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter); + previewLayout->addWidget (updatePushButton, 0/*stretch*/, TQt::AlignHCenter); } @@ -231,15 +231,15 @@ double kpToolPreviewDialog::aspectScale (int newWidth, int newHeight, double heightScale = double (newHeight) / double (oldHeight); // Keeps aspect ratio - return QMIN (widthScale, heightScale); + return TQMIN (widthScale, heightScale); } // public static int kpToolPreviewDialog::scaleDimension (int dimension, double scale, int min, int max) { - return QMAX (min, - QMIN (max, - qRound (dimension * scale))); + return TQMAX (min, + TQMIN (max, + tqRound (dimension * scale))); } @@ -389,7 +389,7 @@ void kpToolPreviewDialog::updatePreview () m_previewPixmapLabel->setPixmap (previewPixmap); // immediate update esp. for expensive previews - m_previewPixmapLabel->repaint (false/*no erase*/); + m_previewPixmapLabel->tqrepaint (false/*no erase*/); #if DEBUG_KP_TOOL_PREVIEW_DIALOG kdDebug () << "\tafter TQLabel::setPixmap() previewPixmapLabel: w=" @@ -420,7 +420,7 @@ void kpToolPreviewDialog::slotUpdateWithWaitCursor () << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); slotUpdate (); diff --git a/kolourpaint/tools/kptoolpreviewdialog.h b/kolourpaint/tools/kptoolpreviewdialog.h index 074a03ec..98cf28dc 100644 --- a/kolourpaint/tools/kptoolpreviewdialog.h +++ b/kolourpaint/tools/kptoolpreviewdialog.h @@ -46,6 +46,7 @@ class kpResizeSignallingLabel; class kpToolPreviewDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum Features @@ -62,7 +63,7 @@ public: // (in the Dimensions Group Box) e.g. "After Skew:" const TQString &afterActionText, bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name = 0); virtual ~kpToolPreviewDialog (); @@ -76,7 +77,7 @@ public: protected: kpDocument *document () const; - // All widgets must have mainWidget() as their parent + // All widgets must have mainWidget() as their tqparent void addCustomWidgetToFront (TQWidget *w); // see <reserveTopRow> in ctor void addCustomWidget (TQWidget *w); void addCustomWidgetToBack (TQWidget *w) diff --git a/kolourpaint/tools/kptoolrectangle.cpp b/kolourpaint/tools/kptoolrectangle.cpp index 2c717fee..ea749da6 100644 --- a/kolourpaint/tools/kptoolrectangle.cpp +++ b/kolourpaint/tools/kptoolrectangle.cpp @@ -53,43 +53,43 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode, kpDocument *document, const TQRect &rect, const TQPoint &startPoint, const TQPoint &endPoint, - const TQPen &pen, const TQPen &maskPen, - const TQBrush &brush, const TQBrush &maskBrush) + const TQPen &pen, const TQPen &tqmaskPen, + const TQBrush &brush, const TQBrush &tqmaskBrush) { TQPixmap pixmap = document->getPixmapAt (rect); - TQBitmap maskBitmap; + TQBitmap tqmaskBitmap; - TQPainter painter, maskPainter; + TQPainter painter, tqmaskPainter; #if DEBUG_KP_TOOL_RECTANGLE && 1 kdDebug () << "pixmap: rect=" << rect << " startPoint=" << startPoint << " endPoint=" << endPoint << endl; - kdDebug () << "\tm: p=" << (maskPen.style () != Qt::NoPen) - << " b=" << (maskBrush.style () != Qt::NoBrush) - << " o: p=" << (pen.style () != Qt::NoPen) - << " b=" << (brush.style () != Qt::NoBrush) + kdDebug () << "\tm: p=" << (tqmaskPen.style () != TQt::NoPen) + << " b=" << (tqmaskBrush.style () != TQt::NoBrush) + << " o: p=" << (pen.style () != TQt::NoPen) + << " b=" << (brush.style () != TQt::NoBrush) << endl; - kdDebug () << "\tmaskPen.color()=" << (int *) maskPen.color ().rgb () - << " transparent=" << (int *) Qt::color0.rgb ()/*transparent*/ + kdDebug () << "\ttqmaskPen.color()=" << (int *) tqmaskPen.color ().rgb () + << " transparent=" << (int *) TQt::color0.rgb ()/*transparent*/ << endl; #endif - if (pixmap.mask () || - (maskPen.style () != Qt::NoPen && - maskPen.color () == Qt::color0/*transparent*/) || - (maskBrush.style () != Qt::NoBrush && - maskBrush.color () == Qt::color0/*transparent*/)) + if (pixmap.tqmask () || + (tqmaskPen.style () != TQt::NoPen && + tqmaskPen.color () == TQt::color0/*transparent*/) || + (tqmaskBrush.style () != TQt::NoBrush && + tqmaskBrush.color () == TQt::color0/*transparent*/)) { - maskBitmap = kpPixmapFX::getNonNullMask (pixmap); - maskPainter.begin (&maskBitmap); - maskPainter.setPen (maskPen); - maskPainter.setBrush (maskBrush); + tqmaskBitmap = kpPixmapFX::getNonNullMask (pixmap); + tqmaskPainter.begin (&tqmaskBitmap); + tqmaskPainter.setPen (tqmaskPen); + tqmaskPainter.setBrush (tqmaskBrush); } - if (pen.style () != Qt::NoPen || - brush.style () != Qt::NoBrush) + if (pen.style () != TQt::NoPen || + brush.style () != TQt::NoBrush) { painter.begin (&pixmap); painter.setPen (pen); @@ -101,14 +101,14 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode, if (painter.isActive ()) \ painter . cmd ; \ \ - if (maskPainter.isActive ()) \ - maskPainter . cmd ; \ + if (tqmaskPainter.isActive ()) \ + tqmaskPainter . cmd ; \ } if (startPoint != endPoint) { #if DEBUG_KP_TOOL_RECTANGLE && 1 - kdDebug () << "\tdraw shape" << endl; + kdDebug () << "\tdraw tqshape" << endl; #endif // TODO: Rectangle of pen width 1, height 1 and width X is rendered @@ -134,7 +134,7 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode, #if DEBUG_KP_TOOL_RECTANGLE && 1 kdDebug () << "\tstartPoint == endPoint" << endl; #endif - // SYNC: Work around Qt bug: can't draw 1x1 rectangle + // SYNC: Work around TQt bug: can't draw 1x1 rectangle // Not strictly correct for border width > 1 // but better than not drawing at all PAINTER_CALL (drawPoint (startPoint - rect.topLeft ())); @@ -144,11 +144,11 @@ static TQPixmap pixmap (const kpToolRectangle::Mode mode, if (painter.isActive ()) painter.end (); - if (maskPainter.isActive ()) - maskPainter.end (); + if (tqmaskPainter.isActive ()) + tqmaskPainter.end (); - if (!maskBitmap.isNull ()) - pixmap.setMask (maskBitmap); + if (!tqmaskBitmap.isNull ()) + pixmap.setMask (tqmaskBitmap); return pixmap; } @@ -173,7 +173,7 @@ kpToolRectangle::kpToolRectangle (Mode mode, kpToolRectangle::kpToolRectangle (kpMainWindow *mainWindow) : kpTool (i18n ("Rectangle"), i18n ("Draws rectangles and squares"), - Qt::Key_R, + TQt::Key_R, mainWindow, "tool_rectangle"), m_mode (Rectangle), m_toolWidgetLineWidth (0), @@ -231,29 +231,29 @@ void kpToolRectangle::slotBackgroundColorChanged (const kpColor &) // private void kpToolRectangle::updatePen (int mouseButton) { - TQColor maskPenColor = color (mouseButton).maskColor (); + TQColor tqmaskPenColor = color (mouseButton).tqmaskColor (); if (!m_toolWidgetLineWidth) { if (color (mouseButton).isOpaque ()) - m_pen [mouseButton] = TQPen (color (mouseButton).toQColor ()); + m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor ()); else - m_pen [mouseButton] = Qt::NoPen; - m_maskPen [mouseButton] = TQPen (maskPenColor); + m_pen [mouseButton] = TQPen(Qt::NoPen); + m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor); } else { if (color (mouseButton).isOpaque ()) { - m_pen [mouseButton] = TQPen (color (mouseButton).toQColor (), + m_pen [mouseButton] = TQPen (color (mouseButton).toTQColor (), m_toolWidgetLineWidth->lineWidth (), - Qt::SolidLine); + TQt::SolidLine); } else - m_pen [mouseButton] = Qt::NoPen; - m_maskPen [mouseButton] = TQPen (maskPenColor, + m_pen [mouseButton] = TQPen(Qt::NoPen); + m_tqmaskPen [mouseButton] = TQPen (tqmaskPenColor, m_toolWidgetLineWidth->lineWidth (), - Qt::SolidLine); + TQt::SolidLine); } } @@ -270,14 +270,14 @@ void kpToolRectangle::updateBrush (int mouseButton) color (mouseButton)/*foreground colour*/, color (1 - mouseButton)/*background colour*/); - m_maskBrush [mouseButton] = m_toolWidgetFillStyle->maskBrush ( + m_tqmaskBrush [mouseButton] = m_toolWidgetFillStyle->tqmaskBrush ( color (mouseButton)/*foreground colour*/, color (1 - mouseButton)/*background colour*/); } else { - m_brush [mouseButton] = Qt::NoBrush; - m_maskBrush [mouseButton] = Qt::NoBrush; + m_brush [mouseButton] = TQBrush(Qt::NoBrush); + m_tqmaskBrush [mouseButton] = TQBrush(Qt::NoBrush); } } @@ -436,8 +436,8 @@ void kpToolRectangle::applyModifiers () m_toolRectangleEndPoint = rect.bottomRight (); m_toolRectangleRectWithoutLineWidth = rect; - m_toolRectangleRect = kpTool::neededRect (rect, QMAX (m_pen [m_mouseButton].width (), - m_maskPen [m_mouseButton].width ())); + m_toolRectangleRect = kpTool::neededRect (rect, TQMAX (m_pen [m_mouseButton].width (), + m_tqmaskPen [m_mouseButton].width ())); } void kpToolRectangle::beginDraw () @@ -451,8 +451,8 @@ void kpToolRectangle::updateShape () TQPixmap newPixmap = pixmap (m_mode, document (), m_toolRectangleRect, m_toolRectangleStartPoint, m_toolRectangleEndPoint, - m_pen [m_mouseButton], m_maskPen [m_mouseButton], - m_brush [m_mouseButton], m_maskBrush [m_mouseButton]); + m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton], + m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton]); kpTempPixmap newTempPixmap (false/*always display*/, kpTempPixmap::SetPixmap/*render mode*/, m_toolRectangleRect.topLeft (), @@ -511,7 +511,7 @@ void kpToolRectangle::cancelShape () endDraw (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); mainWindow ()->commandHistory ()->undo (); #else - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); #endif setUserMessage (i18n ("Let go of all the mouse buttons.")); @@ -527,13 +527,13 @@ void kpToolRectangle::endDraw (const TQPoint &, const TQRect &) applyModifiers (); // TODO: flicker - viewManager ()->invalidateTempPixmap (); + viewManager ()->tqinvalidateTempPixmap (); mainWindow ()->commandHistory ()->addCommand ( new kpToolRectangleCommand (m_mode, - m_pen [m_mouseButton], m_maskPen [m_mouseButton], - m_brush [m_mouseButton], m_maskBrush [m_mouseButton], + m_pen [m_mouseButton], m_tqmaskPen [m_mouseButton], + m_brush [m_mouseButton], m_tqmaskBrush [m_mouseButton], m_toolRectangleRect, m_toolRectangleStartPoint, m_toolRectangleEndPoint, mainWindow ())); @@ -546,15 +546,15 @@ void kpToolRectangle::endDraw (const TQPoint &, const TQRect &) */ kpToolRectangleCommand::kpToolRectangleCommand (kpToolRectangle::Mode mode, - const TQPen &pen, const TQPen &maskPen, - const TQBrush &brush, const TQBrush &maskBrush, + const TQPen &pen, const TQPen &tqmaskPen, + const TQBrush &brush, const TQBrush &tqmaskBrush, const TQRect &rect, const TQPoint &startPoint, const TQPoint &endPoint, kpMainWindow *mainWindow) : kpCommand (mainWindow), m_mode (mode), - m_pen (pen), m_maskPen (maskPen), - m_brush (brush), m_maskBrush (maskBrush), + m_pen (pen), m_tqmaskPen (tqmaskPen), + m_brush (brush), m_tqmaskBrush (tqmaskBrush), m_rect (rect), m_startPoint (startPoint), m_endPoint (endPoint), @@ -581,7 +581,7 @@ TQString kpToolRectangleCommand::name () const return i18n ("Ellipse"); default: kdError () << "kpToolRectangleCommand::name() passed unknown mode: " << int (m_mode) << endl; - return TQString::null; + return TQString(); } } @@ -612,8 +612,8 @@ void kpToolRectangleCommand::execute () doc->setPixmapAt (pixmap (m_mode, doc, m_rect, m_startPoint, m_endPoint, - m_pen, m_maskPen, - m_brush, m_maskBrush), + m_pen, m_tqmaskPen, + m_brush, m_tqmaskBrush), m_rect.topLeft ()); } diff --git a/kolourpaint/tools/kptoolrectangle.h b/kolourpaint/tools/kptoolrectangle.h index a412a475..03ade5a7 100644 --- a/kolourpaint/tools/kptoolrectangle.h +++ b/kolourpaint/tools/kptoolrectangle.h @@ -50,9 +50,10 @@ class kpViewManager; class kpToolRectangle : public kpTool { Q_OBJECT + TQ_OBJECT public: - // it turns out that these shapes are all really the same thing + // it turns out that these tqshapes are all really the same thing // (same options, same feel) - the only real difference is the // drawing functions (a one line change) enum Mode {Rectangle, RoundedRectangle, Ellipse}; @@ -102,10 +103,10 @@ private: kpToolWidgetFillStyle *m_toolWidgetFillStyle; void updatePen (int mouseButton); - TQPen m_pen [2], m_maskPen [2]; + TQPen m_pen [2], m_tqmaskPen [2]; void updateBrush (int mouseButton); - TQBrush m_brush [2], m_maskBrush [2]; + TQBrush m_brush [2], m_tqmaskBrush [2]; void applyModifiers (); TQPoint m_toolRectangleStartPoint, m_toolRectangleEndPoint; @@ -116,8 +117,8 @@ class kpToolRectangleCommand : public kpCommand { public: kpToolRectangleCommand (kpToolRectangle::Mode mode, - const TQPen &pen, const TQPen &maskPen, - const TQBrush &brush, const TQBrush &maskBrush, + const TQPen &pen, const TQPen &tqmaskPen, + const TQBrush &brush, const TQBrush &tqmaskBrush, const TQRect &rect, const TQPoint &startPoint, const TQPoint &endPoint, kpMainWindow *mainWindow); @@ -132,8 +133,8 @@ public: private: kpToolRectangle::Mode m_mode; - TQPen m_pen, m_maskPen; - TQBrush m_brush, m_maskBrush; + TQPen m_pen, m_tqmaskPen; + TQBrush m_brush, m_tqmaskBrush; TQRect m_rect; TQPoint m_startPoint, m_endPoint; TQPixmap *m_oldPixmapPtr; diff --git a/kolourpaint/tools/kptoolrectselection.cpp b/kolourpaint/tools/kptoolrectselection.cpp index 3726cbfe..4c5b2b78 100644 --- a/kolourpaint/tools/kptoolrectselection.cpp +++ b/kolourpaint/tools/kptoolrectselection.cpp @@ -35,7 +35,7 @@ kpToolRectSelection::kpToolRectSelection (kpMainWindow *mainWindow) : kpToolSelection (Rectangle, i18n ("Selection (Rectangular)"), i18n ("Makes a rectangular selection"), - Qt::Key_S, + TQt::Key_S, mainWindow, "tool_rect_selection") { } diff --git a/kolourpaint/tools/kptoolresizescale.cpp b/kolourpaint/tools/kptoolresizescale.cpp index e7f14c5d..40270e1f 100644 --- a/kolourpaint/tools/kptoolresizescale.cpp +++ b/kolourpaint/tools/kptoolresizescale.cpp @@ -138,7 +138,7 @@ TQString kpToolResizeScaleCommand::name () const } } - return TQString::null; + return TQString(); } // public virtual [base kpCommand] @@ -283,7 +283,7 @@ void kpToolResizeScaleCommand::execute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); document ()->selection ()->textResize (m_newWidth, m_newHeight); if (m_mainWindow->tool ()) @@ -294,7 +294,7 @@ void kpToolResizeScaleCommand::execute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (m_newWidth < m_oldWidth) @@ -321,7 +321,7 @@ void kpToolResizeScaleCommand::execute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap oldPixmap = *document ()->pixmap (m_actOnSelection); @@ -395,7 +395,7 @@ void kpToolResizeScaleCommand::unexecute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); document ()->selection ()->textResize (m_oldWidth, m_oldHeight); if (m_mainWindow->tool ()) @@ -406,7 +406,7 @@ void kpToolResizeScaleCommand::unexecute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap newPixmap (m_oldWidth, m_oldHeight); @@ -436,7 +436,7 @@ void kpToolResizeScaleCommand::unexecute () } else { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap oldPixmap; @@ -634,7 +634,7 @@ static void toolButtonSetLook (TQToolButton *button, button->setUsesTextLabel (true); button->setTextLabel (name, false/*no tooltip*/); button->setAccel (TQAccel::shortcutKey (name)); - button->setFocusPolicy (TQWidget::StrongFocus); + button->setFocusPolicy (TQ_StrongFocus); button->setToggleButton (true); } @@ -665,17 +665,17 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget) // TODO: ALT+R doesn't select the button. m_resizeButton = new TQToolButton (m_operationGroupBox); toolButtonSetLook (m_resizeButton, - TQString::fromLatin1 ("resize"), + TQString::tqfromLatin1 ("resize"), i18n ("&Resize")); m_scaleButton = new TQToolButton (m_operationGroupBox); toolButtonSetLook (m_scaleButton, - TQString::fromLatin1 ("scale"), + TQString::tqfromLatin1 ("scale"), i18n ("&Scale")); m_smoothScaleButton = new TQToolButton (m_operationGroupBox); toolButtonSetLook (m_smoothScaleButton, - TQString::fromLatin1 ("smooth_scale"), + TQString::tqfromLatin1 ("smooth_scale"), i18n ("S&mooth Scale")); @@ -684,9 +684,9 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget) //m_smoothScaleLabel = new TQLabel (i18n ("S&mooth scale"), m_operationGroupBox); - //m_resizeLabel->setAlignment (m_resizeLabel->alignment () | Qt::ShowPrefix); - //m_scaleLabel->setAlignment (m_scaleLabel->alignment () | Qt::ShowPrefix); - //m_smoothScaleLabel->setAlignment (m_smoothScaleLabel->alignment () | Qt::ShowPrefix); + //m_resizeLabel->tqsetAlignment (m_resizeLabel->tqalignment () | TQt::ShowPrefix); + //m_scaleLabel->tqsetAlignment (m_scaleLabel->tqalignment () | TQt::ShowPrefix); + //m_smoothScaleLabel->tqsetAlignment (m_smoothScaleLabel->tqalignment () | TQt::ShowPrefix); TQButtonGroup *resizeScaleButtonGroup = new TQButtonGroup (baseWidget); @@ -703,14 +703,14 @@ void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget) marginHint () * 2/*don't overlap groupbox title*/, spacingHint ()); - operationLayout->addWidget (m_resizeButton, 0, 0, Qt::AlignCenter); - //operationLayout->addWidget (m_resizeLabel, 1, 0, Qt::AlignCenter); + operationLayout->addWidget (m_resizeButton, 0, 0, TQt::AlignCenter); + //operationLayout->addWidget (m_resizeLabel, 1, 0, TQt::AlignCenter); - operationLayout->addWidget (m_scaleButton, 0, 1, Qt::AlignCenter); - //operationLayout->addWidget (m_scaleLabel, 1, 1, Qt::AlignCenter); + operationLayout->addWidget (m_scaleButton, 0, 1, TQt::AlignCenter); + //operationLayout->addWidget (m_scaleLabel, 1, 1, TQt::AlignCenter); - operationLayout->addWidget (m_smoothScaleButton, 0, 2, Qt::AlignCenter); - //operationLayout->addWidget (m_smoothScaleLabel, 1, 2, Qt::AlignCenter); + operationLayout->addWidget (m_smoothScaleButton, 0, 2, TQt::AlignCenter); + //operationLayout->addWidget (m_smoothScaleLabel, 1, 2, TQt::AlignCenter); connect (m_resizeButton, TQT_SIGNAL (toggled (bool)), @@ -727,9 +727,9 @@ void kpToolResizeScaleDialog::createDimensionsGroupBox (TQWidget *baseWidget) m_dimensionsGroupBox = new TQGroupBox (i18n ("Dimensions"), baseWidget); TQLabel *widthLabel = new TQLabel (i18n ("Width:"), m_dimensionsGroupBox); - widthLabel->setAlignment (widthLabel->alignment () | Qt::AlignHCenter); + widthLabel->tqsetAlignment (widthLabel->tqalignment () | TQt::AlignHCenter); TQLabel *heightLabel = new TQLabel (i18n ("Height:"), m_dimensionsGroupBox); - heightLabel->setAlignment (heightLabel->alignment () | Qt::AlignHCenter); + heightLabel->tqsetAlignment (heightLabel->tqalignment () | TQt::AlignHCenter); TQLabel *originalLabel = new TQLabel (i18n ("Original:"), m_dimensionsGroupBox); m_originalWidthInput = new KIntNumInput ( @@ -822,7 +822,7 @@ void kpToolResizeScaleDialog::widthFitHeightToAspectRatio () { // width / height = oldWidth / oldHeight // height = width * oldHeight / oldWidth - const int newHeight = qRound (double (imageWidth ()) * double (originalHeight ()) + const int newHeight = tqRound (double (imageWidth ()) * double (originalHeight ()) / double (originalWidth ())); IGNORE_KEEP_ASPECT_RATIO (m_newHeightInput->setValue (newHeight)); } @@ -835,7 +835,7 @@ void kpToolResizeScaleDialog::heightFitWidthToAspectRatio () { // width / height = oldWidth / oldHeight // width = height * oldWidth / oldHeight - const int newWidth = qRound (double (imageHeight ()) * double (originalWidth ()) + const int newWidth = tqRound (double (imageHeight ()) * double (originalWidth ()) / double (originalHeight ())); IGNORE_KEEP_ASPECT_RATIO (m_newWidthInput->setValue (newWidth)); } @@ -979,7 +979,7 @@ void kpToolResizeScaleDialog::slotPercentWidthChanged (double percentWidth) #endif SET_VALUE_WITHOUT_SIGNAL_EMISSION (m_newWidthInput, - qRound (percentWidth * originalWidth () / 100.0)); + tqRound (percentWidth * originalWidth () / 100.0)); widthFitHeightToAspectRatio (); @@ -996,7 +996,7 @@ void kpToolResizeScaleDialog::slotPercentHeightChanged (double percentHeight) #endif SET_VALUE_WITHOUT_SIGNAL_EMISSION (m_newHeightInput, - qRound (percentHeight * originalHeight () / 100.0)); + tqRound (percentHeight * originalHeight () / 100.0)); heightFitWidthToAspectRatio (); diff --git a/kolourpaint/tools/kptoolresizescale.h b/kolourpaint/tools/kptoolresizescale.h index 1dd95aa0..f0fa2150 100644 --- a/kolourpaint/tools/kptoolresizescale.h +++ b/kolourpaint/tools/kptoolresizescale.h @@ -107,6 +107,7 @@ protected: class kpToolResizeScaleDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: kpToolResizeScaleDialog (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolrotate.cpp b/kolourpaint/tools/kptoolrotate.cpp index fe3a4cbe..5def33ca 100644 --- a/kolourpaint/tools/kptoolrotate.cpp +++ b/kolourpaint/tools/kptoolrotate.cpp @@ -97,7 +97,7 @@ void kpToolRotateCommand::execute () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (!m_losslessRotation) @@ -181,7 +181,7 @@ void kpToolRotateCommand::unexecute () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap oldPixmap; @@ -294,10 +294,10 @@ void kpToolRotateDialog::createDirectionGroupBox () TQGridLayout *directionLayout = new TQGridLayout (directionGroupBox, 2, 2, marginHint () * 2, spacingHint ()); - directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, Qt::AlignCenter); - directionLayout->addWidget (clockwisePixmapLabel, 0, 1, Qt::AlignCenter); - directionLayout->addWidget (m_antiClockwiseRadioButton, 1, 0, Qt::AlignCenter); - directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, Qt::AlignCenter); + directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, TQt::AlignCenter); + directionLayout->addWidget (clockwisePixmapLabel, 0, 1, TQt::AlignCenter); + directionLayout->addWidget (m_antiClockwiseRadioButton, 1, 0, TQt::AlignCenter); + directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, TQt::AlignCenter); connect (m_antiClockwiseRadioButton, TQT_SIGNAL (toggled (bool)), diff --git a/kolourpaint/tools/kptoolrotate.h b/kolourpaint/tools/kptoolrotate.h index 1cff0884..618b29c0 100644 --- a/kolourpaint/tools/kptoolrotate.h +++ b/kolourpaint/tools/kptoolrotate.h @@ -81,10 +81,11 @@ private: class kpToolRotateDialog : public kpToolPreviewDialog { Q_OBJECT + TQ_OBJECT public: kpToolRotateDialog (bool actOnSelection, - kpMainWindow *parent, + kpMainWindow *tqparent, const char *name = 0); virtual ~kpToolRotateDialog (); diff --git a/kolourpaint/tools/kptoolroundedrectangle.cpp b/kolourpaint/tools/kptoolroundedrectangle.cpp index b0f4ba05..0c4c6b6d 100644 --- a/kolourpaint/tools/kptoolroundedrectangle.cpp +++ b/kolourpaint/tools/kptoolroundedrectangle.cpp @@ -33,7 +33,7 @@ kpToolRoundedRectangle::kpToolRoundedRectangle (kpMainWindow *mainWindow) : kpToolRectangle (RoundedRectangle, i18n ("Rounded Rectangle"), i18n ("Draws rectangles and squares with rounded corners"), - Qt::Key_U, + TQt::Key_U, mainWindow, "tool_rounded_rectangle") { } diff --git a/kolourpaint/tools/kptoolroundedrectangle.h b/kolourpaint/tools/kptoolroundedrectangle.h index 924c1b34..cedd3e7f 100644 --- a/kolourpaint/tools/kptoolroundedrectangle.h +++ b/kolourpaint/tools/kptoolroundedrectangle.h @@ -36,6 +36,7 @@ class kpMainWindow; class kpToolRoundedRectangle : public kpToolRectangle { Q_OBJECT + TQ_OBJECT public: kpToolRoundedRectangle (kpMainWindow *); diff --git a/kolourpaint/tools/kptoolselection.cpp b/kolourpaint/tools/kptoolselection.cpp index 7812c4f9..dc689c4b 100644 --- a/kolourpaint/tools/kptoolselection.cpp +++ b/kolourpaint/tools/kptoolselection.cpp @@ -141,7 +141,7 @@ TQString kpToolSelection::haventBegunDrawUserMessage () const else return i18n ("Left drag to scale selection."); } - else if (sel && sel->contains (m_currentPoint)) + else if (sel && sel->tqcontains (m_currentPoint)) { if (m_mode == Text) { @@ -300,7 +300,7 @@ void kpToolSelection::beginDraw () } viewManager ()->restoreQueueUpdates (); } - else if (sel->contains (m_currentPoint)) + else if (sel->tqcontains (m_currentPoint)) { if (m_mode == Text && onSelectionToSelectText () && !controlOrShiftPressed ()) { @@ -391,24 +391,24 @@ const TQCursor &kpToolSelection::cursor () const { case (kpView::Top | kpView::Left): case (kpView::Bottom | kpView::Right): - return Qt::sizeFDiagCursor; + return TQt::sizeFDiagCursor; case (kpView::Bottom | kpView::Left): case (kpView::Top | kpView::Right): - return Qt::sizeBDiagCursor; + return TQt::sizeBDiagCursor; case kpView::Top: case kpView::Bottom: - return Qt::sizeVerCursor; + return TQt::sizeVerCursor; case kpView::Left: case kpView::Right: - return Qt::sizeHorCursor; + return TQt::sizeHorCursor; } - return Qt::arrowCursor; + return TQt::arrowCursor; } - else if (sel && sel->contains (m_currentPoint)) + else if (sel && sel->tqcontains (m_currentPoint)) { #if DEBUG_KP_TOOL_SELECTION && 1 kdDebug () << "\tsel contains currentPoint; selecting text? " @@ -416,16 +416,16 @@ const TQCursor &kpToolSelection::cursor () const #endif if (m_mode == Text && onSelectionToSelectText () && !controlOrShiftPressed ()) - return Qt::ibeamCursor; + return TQt::ibeamCursor; else - return Qt::sizeAllCursor; + return TQt::sizeAllCursor; } else { #if DEBUG_KP_TOOL_SELECTION && 1 kdDebug () << "\tnot on sel" << endl; #endif - return Qt::crossCursor; + return TQt::crossCursor; } } @@ -617,8 +617,8 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo mainWindow ()->selectionTransparency ())); setUserShapePoints (m_startPoint, - TQPoint (QMAX (0, QMIN (m_currentPoint.x (), document ()->width () - 1)), - QMAX (0, QMIN (m_currentPoint.y (), document ()->height () - 1)))); + TQPoint (TQMAX (0, TQMIN (m_currentPoint.x (), document ()->width () - 1)), + TQMAX (0, TQMIN (m_currentPoint.y (), document ()->height () - 1)))); break; } case kpToolSelection::Text: @@ -646,7 +646,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo { if (m_startPoint.x () + minimumWidth - 1 >= document ()->width ()) { - minimumWidth = QMAX (kpSelection::minimumWidthForTextStyle (textStyle), + minimumWidth = TQMAX (kpSelection::minimumWidthForTextStyle (textStyle), document ()->width () - m_startPoint.x ()); } } @@ -654,7 +654,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo { if (m_startPoint.x () - minimumWidth + 1 < 0) { - minimumWidth = QMAX (kpSelection::minimumWidthForTextStyle (textStyle), + minimumWidth = TQMAX (kpSelection::minimumWidthForTextStyle (textStyle), m_startPoint.x () + 1); } } @@ -664,7 +664,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo { if (m_startPoint.y () + minimumHeight - 1 >= document ()->height ()) { - minimumHeight = QMAX (kpSelection::minimumHeightForTextStyle (textStyle), + minimumHeight = TQMAX (kpSelection::minimumHeightForTextStyle (textStyle), document ()->height () - m_startPoint.y ()); } } @@ -672,7 +672,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo { if (m_startPoint.y () - minimumHeight + 1 < 0) { - minimumHeight = QMAX (kpSelection::minimumHeightForTextStyle (textStyle), + minimumHeight = TQMAX (kpSelection::minimumHeightForTextStyle (textStyle), m_startPoint.y () + 1); } } @@ -845,7 +845,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo if (!sel->pixmap () && !m_currentPullFromDocumentCommand) { m_currentPullFromDocumentCommand = new kpToolSelectionPullFromDocumentCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, mainWindow ()); m_currentPullFromDocumentCommand->execute (); } @@ -853,7 +853,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo if (!m_currentMoveCommand) { m_currentMoveCommand = new kpToolSelectionMoveCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, mainWindow ()); m_currentMoveCommandIsSmear = false; } @@ -903,7 +903,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo if (!sel->pixmap () && !m_currentPullFromDocumentCommand) { m_currentPullFromDocumentCommand = new kpToolSelectionPullFromDocumentCommand ( - TQString::null/*uninteresting child of macro cmd*/, + TQString()/*uninteresting child of macro cmd*/, mainWindow ()); m_currentPullFromDocumentCommand->execute (); } @@ -929,7 +929,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo int newWidth = oldWidth + userXSign * (thisPoint.x () - m_startPoint.x ()); - newWidth = QMAX (originalSelection.minimumWidth (), newWidth); + newWidth = TQMAX (originalSelection.minimumWidth (), newWidth); // Determine new height. @@ -942,7 +942,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo int newHeight = oldHeight + userYSign * (thisPoint.y () - m_startPoint.y ()); - newHeight = QMAX (originalSelection.minimumHeight (), newHeight); + newHeight = TQMAX (originalSelection.minimumHeight (), newHeight); // Keep aspect ratio? @@ -954,7 +954,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo (userYSign ? double (newHeight) / oldHeight : 0)) { newHeight = newWidth * oldHeight / oldWidth; - newHeight = QMAX (originalSelection.minimumHeight (), + newHeight = TQMAX (originalSelection.minimumHeight (), newHeight); } // Height changed more than width? @@ -962,7 +962,7 @@ void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPo else { newWidth = newHeight * oldWidth / oldHeight; - newWidth = QMAX (originalSelection.minimumWidth (), newWidth); + newWidth = TQMAX (originalSelection.minimumWidth (), newWidth); } } @@ -1243,7 +1243,7 @@ void kpToolSelection::keyPressEvent (TQKeyEvent *e) if (document ()->selection () && !hasBegunDraw () && - e->key () == Qt::Key_Escape) + e->key () == TQt::Key_Escape) { #if DEBUG_KP_TOOL_SELECTION && 0 kdDebug () << "\tescape pressed with sel when not begun draw - deselecting" << endl; @@ -1307,7 +1307,7 @@ void kpToolSelection::selectionTransparencyChanged (const TQString & /*name*/) // Undo. // The rectangle is no longer invisible. // - //if (document ()->selection ()->setTransparency (st, true/*check harder for no change in mask*/)) + //if (document ()->selection ()->setTransparency (st, true/*check harder for no change in tqmask*/)) document ()->selection ()->setTransparency (st); if (true) @@ -1356,7 +1356,7 @@ void kpToolSelection::slotIsOpaqueChanged () kdDebug () << "\thave sel - set transparency" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); if (hasBegunShape ()) endShapeInternal (); @@ -1400,7 +1400,7 @@ void kpToolSelection::slotBackgroundColorChanged (const kpColor &) kdDebug () << "\thave sel - set transparency" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); kpSelectionTransparency st = mainWindow ()->selectionTransparency (); kpSelectionTransparency oldST = st; @@ -1439,7 +1439,7 @@ void kpToolSelection::slotColorSimilarityChanged (double, int) kdDebug () << "\thave sel - set transparency" << endl; #endif - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); kpSelectionTransparency st = mainWindow ()->selectionTransparency (); kpSelectionTransparency oldST = st; @@ -1747,7 +1747,7 @@ void kpToolSelectionTransparencyCommand::execute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); m_mainWindow->setSelectionTransparency (m_st, true/*force colour change*/); @@ -1768,7 +1768,7 @@ void kpToolSelectionTransparencyCommand::unexecute () if (!doc) return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); m_mainWindow->setSelectionTransparency (m_oldST, true/*force colour change*/); @@ -2203,7 +2203,7 @@ void kpToolSelectionResizeScaleCommand::finalize () // public virtual [base kpToolResizeScaleCommand] void kpToolSelectionResizeScaleCommand::execute () { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); killSmoothScaleTimer (); @@ -2218,7 +2218,7 @@ void kpToolSelectionResizeScaleCommand::execute () // public virtual [base kpToolResizeScaleCommand] void kpToolSelectionResizeScaleCommand::unexecute () { - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); killSmoothScaleTimer (); diff --git a/kolourpaint/tools/kptoolselection.h b/kolourpaint/tools/kptoolselection.h index 1f209d86..531f1b78 100644 --- a/kolourpaint/tools/kptoolselection.h +++ b/kolourpaint/tools/kptoolselection.h @@ -59,6 +59,7 @@ class kpToolWidgetOpaqueOrTransparent; class kpToolSelection : public kpTool { Q_OBJECT + TQ_OBJECT public: enum Mode {Rectangle, Ellipse, FreeForm, Text}; @@ -242,6 +243,7 @@ class kpToolSelectionResizeScaleCommand : public TQObject, public kpNamedCommand { Q_OBJECT + TQ_OBJECT public: kpToolSelectionResizeScaleCommand (kpMainWindow *mainWindow); diff --git a/kolourpaint/tools/kptoolskew.cpp b/kolourpaint/tools/kptoolskew.cpp index dff1d19b..7cc4aa7b 100644 --- a/kolourpaint/tools/kptoolskew.cpp +++ b/kolourpaint/tools/kptoolskew.cpp @@ -100,7 +100,7 @@ void kpToolSkewCommand::execute () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); m_oldPixmapPtr = new TQPixmap (); @@ -181,7 +181,7 @@ void kpToolSkewCommand::unexecute () return; - TQApplication::setOverrideCursor (Qt::waitCursor); + TQApplication::setOverrideCursor (TQt::waitCursor); TQPixmap oldPixmap = *m_oldPixmapPtr; @@ -218,13 +218,13 @@ int kpToolSkewDialog::s_lastHorizontalAngle = 0, kpToolSkewDialog::s_lastVerticalAngle = 0; -kpToolSkewDialog::kpToolSkewDialog (bool actOnSelection, kpMainWindow *parent, +kpToolSkewDialog::kpToolSkewDialog (bool actOnSelection, kpMainWindow *tqparent, const char *name) : kpToolPreviewDialog (kpToolPreviewDialog::AllFeatures, false/*don't reserve top row*/, actOnSelection ? i18n ("Skew Selection") : i18n ("Skew Image"), i18n ("After Skew:"), - actOnSelection, parent, name) + actOnSelection, tqparent, name) { // Too confusing - disable for now s_lastHorizontalAngle = s_lastVerticalAngle = 0; diff --git a/kolourpaint/tools/kptoolskew.h b/kolourpaint/tools/kptoolskew.h index ae368020..63703c9b 100644 --- a/kolourpaint/tools/kptoolskew.h +++ b/kolourpaint/tools/kptoolskew.h @@ -76,9 +76,10 @@ private: class kpToolSkewDialog : public kpToolPreviewDialog { Q_OBJECT + TQ_OBJECT public: - kpToolSkewDialog (bool actOnSelection, kpMainWindow *parent, + kpToolSkewDialog (bool actOnSelection, kpMainWindow *tqparent, const char *name = 0); virtual ~kpToolSkewDialog (); diff --git a/kolourpaint/tools/kptooltext.cpp b/kolourpaint/tools/kptooltext.cpp index e2261278..352715ed 100644 --- a/kolourpaint/tools/kptooltext.cpp +++ b/kolourpaint/tools/kptooltext.cpp @@ -46,7 +46,7 @@ kpToolText::kpToolText (kpMainWindow *mainWindow) : kpToolSelection (Text, i18n ("Text"), i18n ("Writes text"), - Qt::Key_T, + TQt::Key_T, mainWindow, "tool_text"), m_isIMStarted (false), m_IMStartCursorRow (0), @@ -193,7 +193,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) #define IS_SPACE(c) ((c).isSpace () || (c).isNull ()) - if (e->key () == Qt::Key_Enter || e->key () == Qt::Key_Return) + if (e->key () == TQt::Key_Enter || e->key () == TQt::Key_Return) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tenter pressed" << endl; @@ -214,7 +214,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Backspace) + else if (e->key () == TQt::Key_Backspace) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tbackspace pressed" << endl; @@ -235,7 +235,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Delete) + else if (e->key () == TQt::Key_Delete) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tdelete pressed" << endl; @@ -256,7 +256,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Up) + else if (e->key () == TQt::Key_Up) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tup pressed" << endl; @@ -268,13 +268,13 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (cursorRow > 0) { cursorRow--; - cursorCol = QMIN (cursorCol, (int) textLines [cursorRow].length ()); + cursorCol = TQMIN (cursorCol, (int) textLines [cursorRow].length ()); viewManager ()->setTextCursorPosition (cursorRow, cursorCol); } e->accept (); } - else if (e->key () == Qt::Key_Down) + else if (e->key () == TQt::Key_Down) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tdown pressed" << endl; @@ -286,13 +286,13 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (cursorRow < (int) textLines.size () - 1) { cursorRow++; - cursorCol = QMIN (cursorCol, (int) textLines [cursorRow].length ()); + cursorCol = TQMIN (cursorCol, (int) textLines [cursorRow].length ()); viewManager ()->setTextCursorPosition (cursorRow, cursorCol); } e->accept (); } - else if (e->key () == Qt::Key_Left) + else if (e->key () == TQt::Key_Left) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tleft pressed" << endl; @@ -318,7 +318,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (hasBegunShape ()) endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); - if ((e->state () & Qt::ControlButton) == 0) + if ((e->state () & TQt::ControlButton) == 0) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tmove single char" << endl; @@ -367,7 +367,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Right) + else if (e->key () == TQt::Key_Right) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tright pressed" << endl; @@ -393,7 +393,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (hasBegunShape ()) endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); - if ((e->state () & Qt::ControlButton) == 0) + if ((e->state () & TQt::ControlButton) == 0) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tmove single char" << endl; @@ -438,7 +438,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_Home) + else if (e->key () == TQt::Key_Home) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\thome pressed" << endl; @@ -447,7 +447,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (hasBegunShape ()) endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); - if (e->state () & Qt::ControlButton) + if (e->state () & TQt::ControlButton) cursorRow = 0; cursorCol = 0; @@ -456,7 +456,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) e->accept (); } - else if (e->key () == Qt::Key_End) + else if (e->key () == TQt::Key_End) { #if DEBUG_KP_TOOL_TEXT kdDebug () << "\tend pressed" << endl; @@ -465,7 +465,7 @@ void kpToolText::keyPressEvent (TQKeyEvent *e) if (hasBegunShape ()) endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ()); - if (e->state () & Qt::ControlButton) + if (e->state () & TQt::ControlButton) cursorRow = textLines.size () - 1; cursorCol = textLines [cursorRow].length (); @@ -545,7 +545,7 @@ void kpToolText::imStartEvent (TQIMEvent *e) m_IMStartCursorRow = viewManager ()->textCursorRow (); m_IMStartCursorCol = viewManager ()->textCursorCol (); - m_IMPreeditStr = TQString::null; + m_IMPreeditStr = TQString(); } void kpToolText::imComposeEvent (TQIMEvent *e) @@ -651,7 +651,7 @@ void kpToolText::imEndEvent (TQIMEvent *e) m_deleteCommand->addDelete (); } } - m_IMPreeditStr = TQString::null; + m_IMPreeditStr = TQString(); // commit string TQString inputStr = e->text(); @@ -1056,7 +1056,7 @@ void kpToolTextInsertCommand::execute () viewManager ()->setTextCursorPosition (m_row, m_col); TQString text = m_newText; - m_newText = TQString::null; + m_newText = TQString(); addText (text); } @@ -1242,7 +1242,7 @@ void kpToolTextBackspaceCommand::execute () { viewManager ()->setTextCursorPosition (m_row, m_col); - m_deletedText = TQString::null; + m_deletedText = TQString(); int oldNumBackspaces = m_numBackspaces; m_numBackspaces = 0; @@ -1279,7 +1279,7 @@ void kpToolTextBackspaceCommand::unexecute () } } - m_deletedText = TQString::null; + m_deletedText = TQString(); selection ()->setTextLines (textLines); @@ -1350,7 +1350,7 @@ void kpToolTextDeleteCommand::execute () { viewManager ()->setTextCursorPosition (m_row, m_col); - m_deletedText = TQString::null; + m_deletedText = TQString(); int oldNumDeletes = m_numDeletes; m_numDeletes = 0; @@ -1383,7 +1383,7 @@ void kpToolTextDeleteCommand::unexecute () } } - m_deletedText = TQString::null; + m_deletedText = TQString(); selection ()->setTextLines (textLines); diff --git a/kolourpaint/tools/kptooltext.h b/kolourpaint/tools/kptooltext.h index 15cda865..44edc0f9 100644 --- a/kolourpaint/tools/kptooltext.h +++ b/kolourpaint/tools/kptooltext.h @@ -44,6 +44,7 @@ class kpViewManager; class kpToolText : public kpToolSelection { Q_OBJECT + TQ_OBJECT public: kpToolText (kpMainWindow *mainWindow); diff --git a/kolourpaint/views/kpthumbnailview.cpp b/kolourpaint/views/kpthumbnailview.cpp index 179f7c92..7332433a 100644 --- a/kolourpaint/views/kpthumbnailview.cpp +++ b/kolourpaint/views/kpthumbnailview.cpp @@ -39,12 +39,12 @@ kpThumbnailView::kpThumbnailView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { } @@ -77,7 +77,7 @@ void kpThumbnailView::resizeEvent (TQResizeEvent *e) << endl; #endif - // For QResizeEvent's, Qt already throws an entire widget repaint into + // For TQResizeEvent's, TQt already throws an entire widget tqrepaint into // the event loop. So eat useless update() calls that can only slow // things down. // TODO: this doesn't seem to work. diff --git a/kolourpaint/views/kpthumbnailview.h b/kolourpaint/views/kpthumbnailview.h index 9bc4dad8..5f2e1664 100644 --- a/kolourpaint/views/kpthumbnailview.h +++ b/kolourpaint/views/kpthumbnailview.h @@ -41,6 +41,7 @@ class kpThumbnailView : public kpView { Q_OBJECT + TQ_OBJECT public: /** @@ -53,7 +54,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs this thumbnail view. @@ -69,7 +70,7 @@ public: protected: /** - * Sets the mask to cover the rectangle with top-left, origin() and + * Sets the tqmask to cover the rectangle with top-left, origin() and * dimensions equal to or slightly less than (in case of rounding * error) the size of the document in view coordinates. This ensures * that all pixels are initialised with either document pixels or the diff --git a/kolourpaint/views/kpunzoomedthumbnailview.cpp b/kolourpaint/views/kpunzoomedthumbnailview.cpp index 4f019905..dea4e089 100644 --- a/kolourpaint/views/kpunzoomedthumbnailview.cpp +++ b/kolourpaint/views/kpunzoomedthumbnailview.cpp @@ -50,12 +50,12 @@ kpUnzoomedThumbnailView::kpUnzoomedThumbnailView ( kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpThumbnailView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name), + tqparent, name), d (new kpUnzoomedThumbnailViewPrivate ()) { if (buddyViewScrollableContainer ()) @@ -112,7 +112,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () if (document ()->width () > width ()) { x = (int) buddyView ()->transformViewToDocX (scrollViewContentsX); - const int rightMostAllowedX = QMAX (0, document ()->width () - width ()); + const int rightMostAllowedX = TQMAX (0, document ()->width () - width ()); #if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW kdDebug () << "\tdocX=" << x << " docWidth=" << document ()->width () @@ -135,7 +135,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () if (document ()->height () > height ()) { y = (int) buddyView ()->transformViewToDocY (scrollViewContentsY); - const int bottomMostAllowedY = QMAX (0, document ()->height () - height ()); + const int bottomMostAllowedY = TQMAX (0, document ()->height () - height ()); #if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW kdDebug () << "\tdocY=" << y << " docHeight=" << document ()->height () @@ -163,12 +163,12 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () TQRect docRect = buddyView ()->transformViewToDoc ( TQRect (buddyViewScrollableContainer ()->contentsXSoon (), buddyViewScrollableContainer ()->contentsYSoon (), - QMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()), - QMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ()))); + TQMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()), + TQMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ()))); x = docRect.x () - (width () - docRect.width ()) / 2; kdDebug () << "\tnew suggest x=" << x << endl; - const int rightMostAllowedX = QMAX (0, document ()->width () - width ()); + const int rightMostAllowedX = TQMAX (0, document ()->width () - width ()); if (x < 0) x = 0; if (x > rightMostAllowedX) @@ -176,7 +176,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () y = docRect.y () - (height () - docRect.height ()) / 2; kdDebug () << "\tnew suggest y=" << y << endl; - const int bottomMostAllowedY = QMAX (0, document ()->height () - height ()); + const int bottomMostAllowedY = TQMAX (0, document ()->height () - height ()); if (y < 0) y = 0; if (y > bottomMostAllowedY) diff --git a/kolourpaint/views/kpunzoomedthumbnailview.h b/kolourpaint/views/kpunzoomedthumbnailview.h index cff6bdab..7e81a5db 100644 --- a/kolourpaint/views/kpunzoomedthumbnailview.h +++ b/kolourpaint/views/kpunzoomedthumbnailview.h @@ -55,6 +55,7 @@ class kpViewScrollableContainer; /*sealed*/ class kpUnzoomedThumbnailView : public kpThumbnailView { Q_OBJECT + TQ_OBJECT public: /** @@ -65,7 +66,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs an unzoomed thumbnail view. @@ -86,7 +87,7 @@ public slots: * container will be visible. * * It tries to maximise the used area of this view. Unused areas will - * be set to the widget background thanks to the mask. + * be set to the widget background thanks to the tqmask. * * Call this if the size of the document changes. * Already connected to buddyViewScrollableContainer()'s diff --git a/kolourpaint/views/kpzoomedthumbnailview.cpp b/kolourpaint/views/kpzoomedthumbnailview.cpp index c5bde48d..adef47c0 100644 --- a/kolourpaint/views/kpzoomedthumbnailview.cpp +++ b/kolourpaint/views/kpzoomedthumbnailview.cpp @@ -43,12 +43,12 @@ kpZoomedThumbnailView::kpZoomedThumbnailView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpThumbnailView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { // Call to virtual function - this is why the class is sealed adjustToEnvironment (); @@ -97,8 +97,8 @@ void kpZoomedThumbnailView::adjustToEnvironment () } - int hzoom = QMAX (1, width () * 100 / document ()->width ()); - int vzoom = QMAX (1, height () * 100 / document ()->height ()); + int hzoom = TQMAX (1, width () * 100 / document ()->width ()); + int vzoom = TQMAX (1, height () * 100 / document ()->height ()); // keep aspect ratio if (hzoom < vzoom) diff --git a/kolourpaint/views/kpzoomedthumbnailview.h b/kolourpaint/views/kpzoomedthumbnailview.h index 882c6d08..c35c22bb 100644 --- a/kolourpaint/views/kpzoomedthumbnailview.h +++ b/kolourpaint/views/kpzoomedthumbnailview.h @@ -50,6 +50,7 @@ /*sealed*/ class kpZoomedThumbnailView : public kpThumbnailView { Q_OBJECT + TQ_OBJECT public: /** @@ -60,7 +61,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs a zoomed thumbnail view. @@ -77,7 +78,7 @@ public: public slots: /** * Changes its zoom level to accommodate the display of entire document - * in the view. It maintains aspect by changing the origin and mask. + * in the view. It maintains aspect by changing the origin and tqmask. * * Call this if the size of the document changes. * Already called by @ref kpThumbnailView resizeEvent(). diff --git a/kolourpaint/views/kpzoomedview.cpp b/kolourpaint/views/kpzoomedview.cpp index c2b1f47d..402b8e39 100644 --- a/kolourpaint/views/kpzoomedview.cpp +++ b/kolourpaint/views/kpzoomedview.cpp @@ -43,12 +43,12 @@ kpZoomedView::kpZoomedView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { // Call to virtual function - this is why the class is sealed adjustToEnvironment (); diff --git a/kolourpaint/views/kpzoomedview.h b/kolourpaint/views/kpzoomedview.h index 12565ab4..e0228fde 100644 --- a/kolourpaint/views/kpzoomedview.h +++ b/kolourpaint/views/kpzoomedview.h @@ -51,6 +51,7 @@ /*sealed*/ class kpZoomedView : public kpView { Q_OBJECT + TQ_OBJECT public: /** @@ -61,7 +62,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs an unzoomed view. diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.cpp b/kolourpaint/widgets/kpcolorsimilaritycube.cpp index c09e495a..07693130 100644 --- a/kolourpaint/widgets/kpcolorsimilaritycube.cpp +++ b/kolourpaint/widgets/kpcolorsimilaritycube.cpp @@ -49,9 +49,9 @@ const double kpColorSimilarityCube::colorCubeDiagonalDistance = kpColorSimilarityCube::kpColorSimilarityCube (int look, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/), + : TQFrame (tqparent, name, TQt::WNoAutoErase/*no flicker*/), m_mainWindow (mainWindow), m_colorSimilarity (-1) { @@ -133,12 +133,12 @@ void kpColorSimilarityCube::setColorSimilarity (double similarity) m_colorSimilarity = similarity; - repaint (false/*no erase*/); + tqrepaint (false/*no erase*/); } -// protected virtual [base QWidget] -TQSize kpColorSimilarityCube::sizeHint () const +// protected virtual [base TQWidget] +TQSize kpColorSimilarityCube::tqsizeHint () const { return TQSize (52, 52); } @@ -193,8 +193,8 @@ static void drawQuadrant (TQPainter *p, points.resize (3); - p->setPen (Qt::black); - p->setBrush (Qt::NoBrush); + p->setPen (TQt::black); + p->setBrush (TQt::NoBrush); p->drawPolyline (points); @@ -233,7 +233,7 @@ void kpColorSimilarityCube::drawFace (TQPainter *p, const TQPoint mm (::pointBetween (ml, mr)); - const int baseBrightness = QMAX (127, + const int baseBrightness = TQMAX (127, 255 - int (kpColorSimilarityDialog::maximumColorSimilarity * kpColorSimilarityCube::colorCubeDiagonalDistance / 2)); TQColor colors [2] = @@ -247,8 +247,8 @@ void kpColorSimilarityCube::drawFace (TQPainter *p, #if DEBUG_KP_COLOR_SIMILARITY_CUBE kdDebug () << "\tnot enabled - making us grey" << endl; #endif - colors [0] = colorGroup ().background (); - colors [1] = colorGroup ().background (); + colors [0] = tqcolorGroup ().background (); + colors [1] = tqcolorGroup ().background (); } #if DEBUG_KP_COLOR_SIMILARITY_CUBE @@ -256,8 +256,8 @@ void kpColorSimilarityCube::drawFace (TQPainter *p, << " colorCubeDiagDist=" << kpColorSimilarityCube::colorCubeDiagonalDistance << endl << "\tbaseBrightness=" << baseBrightness - << " color[0]=" << ((colors [0].rgb () & RGB_MASK) >> ((2 - redOrGreenOrBlue) * 8)) - << " color[1]=" << ((colors [1].rgb () & RGB_MASK) >> ((2 - redOrGreenOrBlue) * 8)) + << " color[0]=" << ((colors [0].rgb () & TQRGB_MASK) >> ((2 - redOrGreenOrBlue) * 8)) + << " color[1]=" << ((colors [1].rgb () & TQRGB_MASK) >> ((2 - redOrGreenOrBlue) * 8)) << endl; #endif @@ -268,17 +268,17 @@ void kpColorSimilarityCube::drawFace (TQPainter *p, ::drawQuadrant (p, colors [0], bm, br, mr, mm); } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpColorSimilarityCube::drawContents (TQPainter *p) { TQRect cr (contentsRect ()); TQPixmap backBuffer (cr.width (), cr.height ()); - backBuffer.fill (colorGroup ().background ()); + backBuffer.fill (tqcolorGroup ().background ()); TQPainter backBufferPainter (&backBuffer); - int cubeRectSize = QMIN (cr.width () * 6 / 8, cr.height () * 6 / 8); + int cubeRectSize = TQMIN (cr.width () * 6 / 8, cr.height () * 6 / 8); int dx = (cr.width () - cubeRectSize) / 2, dy = (cr.height () - cubeRectSize) / 2; backBufferPainter.translate (dx, dy); @@ -336,7 +336,7 @@ void kpColorSimilarityCube::drawContents (TQPainter *p) #if 0 backBufferPainter.save (); - backBufferPainter.setPen (Qt::cyan); + backBufferPainter.setPen (TQt::cyan); backBufferPainter.drawRect (0, 0, cubeRectSize, cubeRectSize); backBufferPainter.restore (); #endif diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.h b/kolourpaint/widgets/kpcolorsimilaritycube.h index ee074d55..d2fb85d2 100644 --- a/kolourpaint/widgets/kpcolorsimilaritycube.h +++ b/kolourpaint/widgets/kpcolorsimilaritycube.h @@ -34,7 +34,7 @@ class kpColor; class kpMainWindow; -class kpColorSimilarityCube : public QFrame +class kpColorSimilarityCube : public TQFrame { public: enum Look @@ -46,7 +46,7 @@ public: kpColorSimilarityCube (int look, kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); virtual ~kpColorSimilarityCube (); @@ -55,7 +55,7 @@ public: double colorSimilarity () const; void setColorSimilarity (double similarity); - virtual TQSize sizeHint () const; + virtual TQSize tqsizeHint () const; protected: TQColor color (int redOrGreenOrBlue, int baseBrightness, int similarityDirection) const; diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp index 5831c62f..ee4ff1b0 100644 --- a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp +++ b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp @@ -44,9 +44,9 @@ const double kpColorSimilarityDialog::maximumColorSimilarity = .30; kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : KDialogBase (parent, name, true/*modal*/, + : KDialogBase (tqparent, name, true/*modal*/, i18n ("Color Similarity"), KDialogBase::Ok | KDialogBase::Cancel), m_mainWindow (mainWindow) @@ -66,7 +66,7 @@ kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow, TQVBoxLayout *cubeLayout = new TQVBoxLayout (cubeGroupBox, marginHint () * 2, spacingHint ()); cubeLayout->addWidget (m_colorSimilarityCube, 1/*stretch*/); - cubeLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter); + cubeLayout->addWidget (updatePushButton, 0/*stretch*/, TQt::AlignHCenter); connect (updatePushButton, TQT_SIGNAL (clicked ()), @@ -109,7 +109,7 @@ double kpColorSimilarityDialog::colorSimilarity () const // public void kpColorSimilarityDialog::setColorSimilarity (double similarity) { - m_colorSimilarityInput->setValue (qRound (similarity * 100)); + m_colorSimilarityInput->setValue (tqRound (similarity * 100)); } diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.h b/kolourpaint/widgets/kpcolorsimilaritydialog.h index 7dee17b8..df4e2445 100644 --- a/kolourpaint/widgets/kpcolorsimilaritydialog.h +++ b/kolourpaint/widgets/kpcolorsimilaritydialog.h @@ -38,10 +38,11 @@ class kpMainWindow; class kpColorSimilarityDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: kpColorSimilarityDialog (kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); virtual ~kpColorSimilarityDialog (); diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp index 327229df..89357d1c 100644 --- a/kolourpaint/widgets/kpcolortoolbar.cpp +++ b/kolourpaint/widgets/kpcolortoolbar.cpp @@ -61,8 +61,8 @@ */ kpDualColorButton::kpDualColorButton (kpMainWindow *mainWindow, - TQWidget *parent, const char *name) - : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/), + TQWidget *tqparent, const char *name) + : TQFrame (tqparent, name, TQt::WNoAutoErase/*no flicker*/), m_mainWindow (mainWindow), m_backBuffer (0) { @@ -149,8 +149,8 @@ kpColor kpDualColorButton::oldBackgroundColor () const } -// public virtual [base QWidget] -TQSize kpDualColorButton::sizeHint () const +// public virtual [base TQWidget] +TQSize kpDualColorButton::tqsizeHint () const { return TQSize (52, 52); } @@ -200,15 +200,15 @@ TQRect kpDualColorButton::backgroundRect () const // TODO: drag a colour from this widget -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::dragMoveEvent (TQDragMoveEvent *e) { - e->accept ((foregroundRect ().contains (e->pos ()) || - backgroundRect ().contains (e->pos ())) && + e->accept ((foregroundRect ().tqcontains (e->pos ()) || + backgroundRect ().tqcontains (e->pos ())) && KColorDrag::canDecode (e)); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::dropEvent (TQDropEvent *e) { TQColor col; @@ -216,35 +216,35 @@ void kpDualColorButton::dropEvent (TQDropEvent *e) if (col.isValid ()) { - if (foregroundRect ().contains (e->pos ())) + if (foregroundRect ().tqcontains (e->pos ())) setForegroundColor (kpColor (col.rgb ())); - else if (backgroundRect ().contains (e->pos ())) + else if (backgroundRect ().tqcontains (e->pos ())) setBackgroundColor (kpColor (col.rgb ())); } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::mousePressEvent (TQMouseEvent * /*e*/) { // eat right-mouse click to prevent it from getting to the toolbar } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e) { int whichColor = -1; - if (foregroundRect ().contains (e->pos ())) + if (foregroundRect ().tqcontains (e->pos ())) whichColor = 0; - else if (backgroundRect ().contains (e->pos ())) + else if (backgroundRect ().tqcontains (e->pos ())) whichColor = 1; if (whichColor == 0 || whichColor == 1) { - TQColor col = Qt::black; + TQColor col = TQt::black; if (color (whichColor).isOpaque ()) - col = color (whichColor).toQColor (); + col = color (whichColor).toTQColor (); else { // TODO: If you double-click on a transparent color and press OK, you get @@ -257,16 +257,16 @@ void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e) // to opaque colors. } - // TODO: parent + // TODO: tqparent if (KColorDialog::getColor (col/*ref*/)) setColor (whichColor, kpColor (col.rgb ())); } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e) { - if (swapPixmapRect ().contains (e->pos ()) && + if (swapPixmapRect ().tqcontains (e->pos ()) && m_color [0] != m_color [1]) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 @@ -288,7 +288,7 @@ void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e) } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpDualColorButton::drawContents (TQPainter *p) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 @@ -318,14 +318,14 @@ void kpDualColorButton::drawContents (TQPainter *p) else { backBufferPainter.fillRect (m_backBuffer->rect (), - colorGroup ().color (TQColorGroup::Background)); + tqcolorGroup ().color (TQColorGroup::Background)); } TQPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16"); if (!isEnabled ()) { - // swapPixmap has a mask after all - swapPixmap.fill (colorGroup ().color (TQColorGroup::Dark)); + // swapPixmap has a tqmask after all + swapPixmap.fill (tqcolorGroup ().color (TQColorGroup::Dark)); } backBufferPainter.drawPixmap (swapPixmapRect ().topLeft (), swapPixmap); @@ -337,17 +337,17 @@ void kpDualColorButton::drawContents (TQPainter *p) if (isEnabled ()) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 - kdDebug () << "\tbackgroundColor=" << (int *) m_color [1].toQRgb () + kdDebug () << "\tbackgroundColor=" << (int *) m_color [1].toTQRgb () << endl; #endif if (m_color [1].isOpaque ()) - backBufferPainter.fillRect (bgRectInside, m_color [1].toQColor ()); + backBufferPainter.fillRect (bgRectInside, m_color [1].toTQColor ()); else backBufferPainter.drawPixmap (bgRectInside, UserIcon ("color_transparent_26x26")); } else - backBufferPainter.fillRect (bgRectInside, colorGroup ().color (TQColorGroup::Button)); - qDrawShadePanel (&backBufferPainter, bgRect, colorGroup (), + backBufferPainter.fillRect (bgRectInside, tqcolorGroup ().color (TQColorGroup::Button)); + qDrawShadePanel (&backBufferPainter, bgRect, tqcolorGroup (), false/*not sunken*/, 2/*lineWidth*/, 0/*never fill*/); @@ -357,17 +357,17 @@ void kpDualColorButton::drawContents (TQPainter *p) if (isEnabled ()) { #if DEBUG_KP_COLOR_TOOL_BAR && 1 - kdDebug () << "\tforegroundColor=" << (int *) m_color [0].toQRgb () + kdDebug () << "\tforegroundColor=" << (int *) m_color [0].toTQRgb () << endl; #endif if (m_color [0].isOpaque ()) - backBufferPainter.fillRect (fgRectInside, m_color [0].toQColor ()); + backBufferPainter.fillRect (fgRectInside, m_color [0].toTQColor ()); else backBufferPainter.drawPixmap (fgRectInside, UserIcon ("color_transparent_26x26")); } else - backBufferPainter.fillRect (fgRectInside, colorGroup ().color (TQColorGroup::Button)); - qDrawShadePanel (&backBufferPainter, fgRect, colorGroup (), + backBufferPainter.fillRect (fgRectInside, tqcolorGroup ().color (TQColorGroup::Button)); + qDrawShadePanel (&backBufferPainter, fgRect, tqcolorGroup (), false/*not sunken*/, 2/*lineWidth*/, 0/*never fill*/); @@ -421,8 +421,8 @@ static TQColor add (const TQColor &a, const TQColor &b) // -// make our own colors in case weird ones like "Qt::cyan" -// (turquoise) get changed by Qt +// make our own colors in case weird ones like "TQt::cyan" +// (turquoise) get changed by TQt // // primary colors + B&W @@ -461,10 +461,10 @@ static bool ownColorsInitialised = false; */ #define rows 2 #define cols 11 -kpColorCells::kpColorCells (TQWidget *parent, +kpColorCells::kpColorCells (TQWidget *tqparent, Qt::Orientation o, const char *name) - : KColorCells (parent, rows, cols), + : KColorCells (tqparent, rows, cols), m_mouseButton (-1) { setName (name); @@ -657,7 +657,7 @@ void kpColorCells::mouseReleaseEvent (TQMouseEvent *e) { m_mouseButton = -1; - Qt::ButtonState button = e->button (); + TQt::ButtonState button = e->button (); #if DEBUG_KP_COLOR_TOOL_BAR kdDebug () << "kpColorCells::mouseReleaseEvent(left=" << (button & Qt::LeftButton) @@ -729,7 +729,7 @@ void kpColorCells::slotColorDoubleClicked (int cell) TQColor color = KColorCells::color (cell); - // TODO: parent + // TODO: tqparent if (KColorDialog::getColor (color/*ref*/)) KColorCells::setColor (cell, color); } @@ -739,8 +739,8 @@ void kpColorCells::slotColorDoubleClicked (int cell) * kpTransparentColorCell */ -kpTransparentColorCell::kpTransparentColorCell (TQWidget *parent, const char *name) - : TQFrame (parent, name) +kpTransparentColorCell::kpTransparentColorCell (TQWidget *tqparent, const char *name) + : TQFrame (tqparent, name) { #if DEBUG_KP_COLOR_TOOL_BAR kdDebug () << "kpTransparentColorCell::kpTransparentColorCell()" << endl; @@ -767,23 +767,23 @@ kpTransparentColorCell::~kpTransparentColorCell () } -// public virtual [base QWidget] -TQSize kpTransparentColorCell::sizeHint () const +// public virtual [base TQWidget] +TQSize kpTransparentColorCell::tqsizeHint () const { return TQSize (m_pixmap.width () + frameWidth () * 2, m_pixmap.height () + frameWidth () * 2); } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/) { // eat right-mouse click to prevent it from getting to the toolbar } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e) { - if (rect ().contains (e->pos ())) + if (TQT_TQRECT_OBJECT(rect ()).tqcontains (e->pos ())) { if (e->button () == Qt::LeftButton) { @@ -798,7 +798,7 @@ void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e) } } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpTransparentColorCell::drawContents (TQPainter *p) { TQFrame::drawContents (p); @@ -818,10 +818,10 @@ void kpTransparentColorCell::drawContents (TQPainter *p) * kpColorPalette */ -kpColorPalette::kpColorPalette (TQWidget *parent, +kpColorPalette::kpColorPalette (TQWidget *tqparent, Qt::Orientation o, const char *name) - : TQWidget (parent, name), + : TQWidget (tqparent, name), m_boxLayout (0) { #if DEBUG_KP_COLOR_TOOL_BAR @@ -829,7 +829,7 @@ kpColorPalette::kpColorPalette (TQWidget *parent, #endif m_transparentColorCell = new kpTransparentColorCell (this); - m_transparentColorCell->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_transparentColorCell->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); connect (m_transparentColorCell, TQT_SIGNAL (foregroundColorChanged (const kpColor &)), this, TQT_SIGNAL (foregroundColorChanged (const kpColor &))); connect (m_transparentColorCell, TQT_SIGNAL (backgroundColorChanged (const kpColor &)), @@ -863,13 +863,13 @@ void kpColorPalette::setOrientation (Qt::Orientation o) if (o == Qt::Horizontal) { m_boxLayout = new TQBoxLayout (this, TQBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/); - m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignVCenter); + m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignVCenter); m_boxLayout->addWidget (m_colorCells); } else { m_boxLayout = new TQBoxLayout (this, TQBoxLayout::TopToBottom, 0/*margin*/, 5/*spacing*/); - m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignHCenter); + m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, TQt::AlignHCenter); m_boxLayout->addWidget (m_colorCells); } @@ -882,11 +882,11 @@ void kpColorPalette::setOrientation (Qt::Orientation o) */ kpColorSimilarityToolBarItem::kpColorSimilarityToolBarItem (kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name) : kpColorSimilarityCube (kpColorSimilarityCube::Depressed | kpColorSimilarityCube::DoubleClickInstructions, - mainWindow, parent, name), + mainWindow, tqparent, name), m_mainWindow (mainWindow), m_processedColorSimilarity (kpColor::Exact) { @@ -912,7 +912,7 @@ void kpColorSimilarityToolBarItem::setColorSimilarity (double similarity) kpColorSimilarityCube::setColorSimilarity (similarity); if (similarity > 0) - TQToolTip::add (this, i18n ("Color similarity: %1%").arg (qRound (similarity * 100))); + TQToolTip::add (this, i18n ("Color similarity: %1%").arg (tqRound (similarity * 100))); else TQToolTip::add (this, i18n ("Color similarity: Exact")); @@ -930,13 +930,13 @@ double kpColorSimilarityToolBarItem::oldColorSimilarity () const } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpColorSimilarityToolBarItem::mousePressEvent (TQMouseEvent * /*e*/) { // eat right-mouse click to prevent it from getting to the toolbar } -// private virtual [base QWidget] +// private virtual [base TQWidget] void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (TQMouseEvent * /*e*/) { kpColorSimilarityDialog dialog (m_mainWindow, this); @@ -964,7 +964,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, 5/*margin*/, (10 * 4)/*spacing*/); m_dualColorButton = new kpDualColorButton (mainWindow, base); - m_dualColorButton->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_dualColorButton->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); connect (m_dualColorButton, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)), this, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &))); connect (m_dualColorButton, TQT_SIGNAL (foregroundColorChanged (const kpColor &)), @@ -981,7 +981,7 @@ kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, m_boxLayout->addWidget (m_colorPalette, 0/*stretch*/); m_colorSimilarityToolBarItem = new kpColorSimilarityToolBarItem (mainWindow, base); - m_colorSimilarityToolBarItem->setSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_colorSimilarityToolBarItem->tqsetSizePolicy (TQSizePolicy::Fixed, TQSizePolicy::Fixed); connect (m_colorSimilarityToolBarItem, TQT_SIGNAL (colorSimilarityChanged (double, int)), this, TQT_SIGNAL (colorSimilarityChanged (double, int))); m_boxLayout->addWidget (m_colorSimilarityToolBarItem, 0/*stretch*/); diff --git a/kolourpaint/widgets/kpcolortoolbar.h b/kolourpaint/widgets/kpcolortoolbar.h index 3b50c825..b1e8faa8 100644 --- a/kolourpaint/widgets/kpcolortoolbar.h +++ b/kolourpaint/widgets/kpcolortoolbar.h @@ -56,13 +56,14 @@ class kpMainWindow; // used by kpTransparentColorCell // - no obscure "current" colour // -class kpDualColorButton : public QFrame +class kpDualColorButton : public TQFrame { Q_OBJECT + TQ_OBJECT public: kpDualColorButton (kpMainWindow *mainWindow, - TQWidget *parent, const char *name = 0); + TQWidget *tqparent, const char *name = 0); virtual ~kpDualColorButton (); kpColor color (int which) const; @@ -90,7 +91,7 @@ public: kpColor oldBackgroundColor () const; public: - virtual TQSize sizeHint () const; + virtual TQSize tqsizeHint () const; protected: TQRect swapPixmapRect () const; @@ -118,9 +119,10 @@ protected: class kpColorCells : public KColorCells { Q_OBJECT + TQ_OBJECT public: - kpColorCells (TQWidget *parent, + kpColorCells (TQWidget *tqparent, Qt::Orientation o = Qt::Horizontal, const char *name = 0); virtual ~kpColorCells (); @@ -152,15 +154,16 @@ protected slots: }; -class kpTransparentColorCell : public QFrame +class kpTransparentColorCell : public TQFrame { Q_OBJECT + TQ_OBJECT public: - kpTransparentColorCell (TQWidget *parent, const char *name = 0); + kpTransparentColorCell (TQWidget *tqparent, const char *name = 0); virtual ~kpTransparentColorCell (); - virtual TQSize sizeHint () const; + virtual TQSize tqsizeHint () const; signals: void transparentColorSelected (int mouseButton); @@ -179,12 +182,13 @@ protected: }; -class kpColorPalette : public QWidget +class kpColorPalette : public TQWidget { Q_OBJECT + TQ_OBJECT public: - kpColorPalette (TQWidget *parent, + kpColorPalette (TQWidget *tqparent, Qt::Orientation o = Qt::Horizontal, const char *name = 0); virtual ~kpColorPalette (); @@ -208,10 +212,11 @@ protected: class kpColorSimilarityToolBarItem : public kpColorSimilarityCube { Q_OBJECT + TQ_OBJECT public: kpColorSimilarityToolBarItem (kpMainWindow *mainWindow, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); virtual ~kpColorSimilarityToolBarItem (); @@ -243,6 +248,7 @@ private: class kpColorToolBar : public KToolBar { Q_OBJECT + TQ_OBJECT public: kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, const char *name = 0); diff --git a/kolourpaint/widgets/kpresizesignallinglabel.cpp b/kolourpaint/widgets/kpresizesignallinglabel.cpp index cb5a2311..b62f3679 100644 --- a/kolourpaint/widgets/kpresizesignallinglabel.cpp +++ b/kolourpaint/widgets/kpresizesignallinglabel.cpp @@ -34,15 +34,15 @@ kpResizeSignallingLabel::kpResizeSignallingLabel (const TQString &string, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TQLabel (string, parent, name) + : TQLabel (string, tqparent, name) { } -kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *parent, +kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *tqparent, const char *name) - : TQLabel (parent, name) + : TQLabel (tqparent, name) { } @@ -51,7 +51,7 @@ kpResizeSignallingLabel::~kpResizeSignallingLabel () } -// protected virtual [base QLabel] +// protected virtual [base TQLabel] void kpResizeSignallingLabel::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_RESIZE_SIGNALLING_LABEL diff --git a/kolourpaint/widgets/kpresizesignallinglabel.h b/kolourpaint/widgets/kpresizesignallinglabel.h index 5a53dcf2..88f4477c 100644 --- a/kolourpaint/widgets/kpresizesignallinglabel.h +++ b/kolourpaint/widgets/kpresizesignallinglabel.h @@ -32,13 +32,14 @@ #include <tqlabel.h> -class kpResizeSignallingLabel : public QLabel +class kpResizeSignallingLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - kpResizeSignallingLabel (const TQString &string, TQWidget *parent, const char *name = 0); - kpResizeSignallingLabel (TQWidget *parent, const char *name = 0); + kpResizeSignallingLabel (const TQString &string, TQWidget *tqparent, const char *name = 0); + kpResizeSignallingLabel (TQWidget *tqparent, const char *name = 0); virtual ~kpResizeSignallingLabel (); signals: diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.cpp b/kolourpaint/widgets/kpsqueezedtextlabel.cpp index 613c93a9..8cd4dfbb 100644 --- a/kolourpaint/widgets/kpsqueezedtextlabel.cpp +++ b/kolourpaint/widgets/kpsqueezedtextlabel.cpp @@ -25,7 +25,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG_KP_SQUEEZED_TEXT_LABEL 0 +#define DEBUG_KP_STQUEEZED_TEXT_LABEL 0 #include <kpsqueezedtextlabel.h> @@ -38,14 +38,14 @@ #include <klocale.h> -kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *parent, const char *name) - : TQLabel (parent, name), +kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *tqparent, const char *name) + : TQLabel (tqparent, name), m_showEllipsis (true) { } -kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name) - : TQLabel (parent, name), +kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *tqparent, const char *name) + : TQLabel (tqparent, name), m_showEllipsis (true) { setText (text); @@ -53,11 +53,11 @@ kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent // public virtual -TQSize kpSqueezedTextLabel::minimumSizeHint () const +TQSize kpSqueezedTextLabel::tqminimumSizeHint () const { -#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 - kdDebug () << "kpSqueezedTextLabel::minimumSizeHint() qLabel prefers" - << TQLabel::minimumSizeHint () << endl; +#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 + kdDebug () << "kpSqueezedTextLabel::tqminimumSizeHint() qLabel prefers" + << TQLabel::tqminimumSizeHint () << endl; #endif return TQSize (-1/*no minimum width*/, TQLabel::minimumHeight ()); } @@ -88,7 +88,7 @@ void kpSqueezedTextLabel::setShowEllipsis (bool yes) } -// public slots virtual [base QLabel] +// public slots virtual [base TQLabel] void kpSqueezedTextLabel::setText (const TQString &text) { m_fullText = text; @@ -96,10 +96,10 @@ void kpSqueezedTextLabel::setText (const TQString &text) } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e) { -#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 +#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "kpSqueezedTextLabeL::resizeEvent() size=" << e->size () << " oldSize=" << e->oldSize () << endl; @@ -111,19 +111,19 @@ void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e) // protected TQString kpSqueezedTextLabel::ellipsisText () const { - return m_showEllipsis ? i18n ("...") : TQString::null; + return m_showEllipsis ? i18n ("...") : TQString(); } // protected void kpSqueezedTextLabel::squeezeText () { -#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 +#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "kpSqueezedTextLabeL::squeezeText" << endl; #endif TQFontMetrics fontMetrics (font ()); int fullTextWidth = fontMetrics.width (m_fullText); -#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 +#if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\tfullText=" << m_fullText << " fullTextWidth=" << fullTextWidth << " labelWidth=" << width () @@ -132,14 +132,14 @@ void kpSqueezedTextLabel::squeezeText () if (fullTextWidth <= width ()) { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\tfullText will fit - display" << endl; #endif TQLabel::setText (m_fullText); } else { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\tfullText won't fit :( - squeeze" << endl; kdDebug () << "\t\twidth of \"...\"=" << fontMetrics.width (ellipsisText ()) @@ -148,10 +148,10 @@ void kpSqueezedTextLabel::squeezeText () #endif if (fontMetrics.width (ellipsisText ()) > width ()) { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\t\tcan't even fit \"...\" - forget it" << endl; #endif - TQLabel::setText (TQString::null); + TQLabel::setText (TQString()); return; } @@ -164,7 +164,7 @@ void kpSqueezedTextLabel::squeezeText () { int numLettersToUseMid = (numLettersToUseLo + numLettersToUseHi) / 2; int squeezedWidth = fontMetrics.width (m_fullText.left (numLettersToUseMid) + ellipsisText ()); - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\tbsearch: lo=" << numLettersToUseLo << " hi=" << numLettersToUseHi << " mid=" << numLettersToUseMid @@ -175,7 +175,7 @@ void kpSqueezedTextLabel::squeezeText () if (squeezedWidth == width ()) { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\tperfect match!" << endl; #endif numLettersToUse = numLettersToUseMid; @@ -183,14 +183,14 @@ void kpSqueezedTextLabel::squeezeText () } else if (squeezedWidth < width ()) { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\tsmall enough - numLettersToUse=" << numLettersToUse << endl; #endif if (numLettersToUseMid > numLettersToUse) { numLettersToUse = numLettersToUseMid; - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\t\tset numLettersToUse=" << numLettersToUse << endl; @@ -201,7 +201,7 @@ void kpSqueezedTextLabel::squeezeText () } else { - #if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1 + #if DEBUG_KP_STQUEEZED_TEXT_LABEL && 1 kdDebug () << "\t\ttoo big" << endl; #endif numLettersToUseHi = numLettersToUseMid - 1; diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.h b/kolourpaint/widgets/kpsqueezedtextlabel.h index f4bd320d..1169be63 100644 --- a/kolourpaint/widgets/kpsqueezedtextlabel.h +++ b/kolourpaint/widgets/kpsqueezedtextlabel.h @@ -34,15 +34,16 @@ // KSqueezedTextLabel done properly - squeeze at the end of the string, // not the middle. -class kpSqueezedTextLabel : public QLabel +class kpSqueezedTextLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - kpSqueezedTextLabel (TQWidget *parent, const char *name = 0); - kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name = 0); + kpSqueezedTextLabel (TQWidget *tqparent, const char *name = 0); + kpSqueezedTextLabel (const TQString &text, TQWidget *tqparent, const char *name = 0); - virtual TQSize minimumSizeHint () const; + virtual TQSize tqminimumSizeHint () const; // TODO: maybe text() should return the full text? TQString fullText () const; diff --git a/kolourpaint/widgets/kptooltoolbar.cpp b/kolourpaint/widgets/kptooltoolbar.cpp index 26c610e9..163a7f49 100644 --- a/kolourpaint/widgets/kptooltoolbar.cpp +++ b/kolourpaint/widgets/kptooltoolbar.cpp @@ -55,11 +55,11 @@ #include <kptoolwidgetspraycansize.h> -class kpToolButton : public QToolButton +class kpToolButton : public TQToolButton { public: - kpToolButton (kpTool *tool, TQWidget *parent) - : TQToolButton (parent), + kpToolButton (kpTool *tool, TQWidget *tqparent) + : TQToolButton (tqparent), m_tool (tool) { } @@ -69,7 +69,7 @@ public: } protected: - // virtual [base QWidget] + // virtual [base TQWidget] void mouseDoubleClickEvent (TQMouseEvent *e) { if (e->button () == Qt::LeftButton && m_tool) @@ -144,7 +144,7 @@ kpToolToolBar::kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, i setOrientation (orientation ()); #if DEBUG_KP_TOOL_TOOL_BAR - kdDebug () << "kpToolToolBar::<ctor> layout tool widgets msec=" + kdDebug () << "kpToolToolBar::<ctor> tqlayout tool widgets msec=" << timer.elapsed () << endl; #endif @@ -199,7 +199,7 @@ int kpToolToolBar::defaultIconSize () if (m_defaultIconSize <= 0) { - // Adapt according to screen geometry + // Adapt according to screen tqgeometry const TQRect desktopSize = KGlobalSettings::desktopGeometry (this); #if DEBUG_KP_TOOL_TOOL_BAR kdDebug () << "\tadapting to screen size=" << desktopSize << endl; @@ -547,7 +547,7 @@ void kpToolToolBar::slotToolActionToolTipChanged () } -// public slot virtual [base QDockWindow] +// public slot virtual [base TQDockWindow] void kpToolToolBar::setOrientation (Qt::Orientation o) { #if DEBUG_KP_TOOL_TOOL_BAR @@ -616,7 +616,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o) { m_baseLayout->addWidget (*it, 0/*stretch*/, - o == Qt::Vertical ? Qt::AlignHCenter : Qt::AlignVCenter); + o == Qt::Vertical ? TQt::AlignHCenter : TQt::AlignVCenter); } } diff --git a/kolourpaint/widgets/kptooltoolbar.h b/kolourpaint/widgets/kptooltoolbar.h index 417ae022..5005396f 100644 --- a/kolourpaint/widgets/kptooltoolbar.h +++ b/kolourpaint/widgets/kptooltoolbar.h @@ -54,6 +54,7 @@ class kpToolWidgetSpraycanSize; class kpToolToolBar : public KToolBar { Q_OBJECT + TQ_OBJECT public: kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, int colsOrRows = 2, const char *name = 0); diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp index 0d0a9245..c230c1ee 100644 --- a/kolourpaint/widgets/kptoolwidgetbase.cpp +++ b/kolourpaint/widgets/kptoolwidgetbase.cpp @@ -45,8 +45,8 @@ #include <kpeffectinvert.h> -kpToolWidgetBase::kpToolWidgetBase (TQWidget *parent, const char *name) - : TQFrame (parent, name), +kpToolWidgetBase::kpToolWidgetBase (TQWidget *tqparent, const char *name) + : TQFrame (tqparent, name), m_invertSelectedPixmap (true), m_selectedRow (-1), m_selectedCol (-1) { @@ -92,9 +92,9 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol) << endl; #endif - relayoutOptions (); + retqlayoutOptions (); - const QPair <int, int> rowColPair = defaultSelectedRowAndCol (); + const TQPair <int, int> rowColPair = defaultSelectedRowAndCol (); if (!setSelected (rowColPair.first, rowColPair.second, false/*don't save*/)) { if (!setSelected (fallBackRow, fallBackCol)) @@ -166,7 +166,7 @@ TQValueVector <int> kpToolWidgetBase::spreadOutElements (const TQValueVector <in // public -QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const +TQPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const { int row = -1, col = -1; @@ -175,10 +175,10 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools); KConfigBase *cfg = cfgGroupSaver.config (); - TQString nameString = TQString::fromLatin1 (name ()); + TQString nameString = TQString::tqfromLatin1 (name ()); - row = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Row"), -1); - col = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Col"), -1); + row = cfg->readNumEntry (nameString + TQString::tqfromLatin1 (" Row"), -1); + col = cfg->readNumEntry (nameString + TQString::tqfromLatin1 (" Col"), -1); } #if DEBUG_KP_TOOL_WIDGET_BASE @@ -188,7 +188,7 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const << endl; #endif - return qMakePair (row, col); + return tqMakePair (row, col); } // public @@ -218,18 +218,18 @@ void kpToolWidgetBase::saveSelectedAsDefault () const KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools); KConfigBase *cfg = cfgGroupSaver.config (); - TQString nameString = TQString::fromLatin1 (name ()); - cfg->writeEntry (nameString + TQString::fromLatin1 (" Row"), m_selectedRow); - cfg->writeEntry (nameString + TQString::fromLatin1 (" Col"), m_selectedCol); + TQString nameString = TQString::tqfromLatin1 (name ()); + cfg->writeEntry (nameString + TQString::tqfromLatin1 (" Row"), m_selectedRow); + cfg->writeEntry (nameString + TQString::tqfromLatin1 (" Col"), m_selectedCol); cfg->sync (); } // public -void kpToolWidgetBase::relayoutOptions () +void kpToolWidgetBase::retqlayoutOptions () { #if DEBUG_KP_TOOL_WIDGET_BASE - kdDebug () << "kpToolWidgetBase::relayoutOptions()" << endl; + kdDebug () << "kpToolWidgetBase::retqlayoutOptions()" << endl; #endif while (!m_pixmaps.isEmpty () && m_pixmaps.last ().count () == 0) @@ -536,7 +536,7 @@ bool kpToolWidgetBase::selectNextOption () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e) { e->ignore (); @@ -549,7 +549,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e) { for (int j = 0; j < (int) m_pixmapRects [i].count (); j++) { - if (m_pixmapRects [i][j].contains (e->pos ())) + if (m_pixmapRects [i][j].tqcontains (e->pos ())) { setSelected (i, j); e->accept (); @@ -559,7 +559,7 @@ void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e) } } -// protected virtual [base QFrame] +// protected virtual [base TQFrame] void kpToolWidgetBase::drawContents (TQPainter *painter) { #if DEBUG_KP_TOOL_WIDGET_BASE && 1 @@ -583,7 +583,7 @@ void kpToolWidgetBase::drawContents (TQPainter *painter) if (i == m_selectedRow && j == m_selectedCol) { - painter->fillRect (rect, Qt::blue/*selection color*/); + painter->fillRect (rect, TQt::blue/*selection color*/); if (m_invertSelectedPixmap) kpEffectInvertCommand::apply (&pixmap); diff --git a/kolourpaint/widgets/kptoolwidgetbase.h b/kolourpaint/widgets/kptoolwidgetbase.h index 1a4c8a6f..033f4946 100644 --- a/kolourpaint/widgets/kptoolwidgetbase.h +++ b/kolourpaint/widgets/kptoolwidgetbase.h @@ -40,17 +40,18 @@ class TQPainter; -// TODO: frame becomes a combobox when its parent kpToolToolBar becomes too small -class kpToolWidgetBase : public QFrame +// TODO: frame becomes a combobox when its tqparent kpToolToolBar becomes too small +class kpToolWidgetBase : public TQFrame { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetBase (TQWidget *parent, const char *name); // must provide a name for config to work + kpToolWidgetBase (TQWidget *tqparent, const char *name); // must provide a name for config to work virtual ~kpToolWidgetBase (); public: - void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString::null); + void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString()); void startNewOptionRow (); // Call this at the end of your constructor. @@ -63,13 +64,13 @@ private: public: // (only have to use these if you don't use finishConstruction()) // (rereads from config file) - QPair <int, int> defaultSelectedRowAndCol () const; + TQPair <int, int> defaultSelectedRowAndCol () const; int defaultSelectedRow () const; int defaultSelectedCol () const; void saveSelectedAsDefault () const; - void relayoutOptions (); + void retqlayoutOptions (); public: int selectedRow () const; diff --git a/kolourpaint/widgets/kptoolwidgetbrush.cpp b/kolourpaint/widgets/kptoolwidgetbrush.cpp index 1e53891e..69445905 100644 --- a/kolourpaint/widgets/kptoolwidgetbrush.cpp +++ b/kolourpaint/widgets/kptoolwidgetbrush.cpp @@ -52,14 +52,14 @@ static int brushSize [][3] = #define BRUSH_SIZE_NUM_COLS (int (sizeof (brushSize [0]) / sizeof (brushSize [0][0]))) #define BRUSH_SIZE_NUM_ROWS (int (sizeof (brushSize) / sizeof (brushSize [0]))) -kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (); TQPixmap *pm = m_brushBitmaps; - for (int shape = 0; shape < BRUSH_SIZE_NUM_ROWS; shape++) + for (int tqshape = 0; tqshape < BRUSH_SIZE_NUM_ROWS; tqshape++) { for (int i = 0; i < BRUSH_SIZE_NUM_COLS; i++) { @@ -68,7 +68,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name) pm->resize ((w <= 0 ? width () : w), (h <= 0 ? height () : h)); - const int s = brushSize [shape][i]; + const int s = brushSize [tqshape][i]; TQRect rect; if (s >= pm->width () || s >= pm->height ()) @@ -85,14 +85,14 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name) kdDebug () << "kpToolWidgetBrush::kpToolWidgetBrush() rect=" << rect << endl; #endif - pm->fill (Qt::white); + pm->fill (TQt::white); TQPainter painter (pm); - painter.setPen (Qt::black); - painter.setBrush (Qt::black); + painter.setPen (TQt::black); + painter.setBrush (TQt::black); // sync: <brushes> - switch (shape) + switch (tqshape) { case 0: painter.drawEllipse (rect); @@ -110,7 +110,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name) painter.end (); pm->setMask (pm->createHeuristicMask ()); - addOption (*pm, brushName (shape, i)/*tooltip*/); + addOption (*pm, brushName (tqshape, i)/*tooltip*/); pm++; } @@ -127,38 +127,38 @@ kpToolWidgetBrush::~kpToolWidgetBrush () // private -TQString kpToolWidgetBrush::brushName (int shape, int whichSize) +TQString kpToolWidgetBrush::brushName (int tqshape, int whichSize) { - int s = brushSize [shape][whichSize]; + int s = brushSize [tqshape][whichSize]; if (s == 1) return i18n ("1x1"); - TQString shapeName; + TQString tqshapeName; // sync: <brushes> - switch (shape) + switch (tqshape) { case 0: - shapeName = i18n ("Circle"); + tqshapeName = i18n ("Circle"); break; case 1: - shapeName = i18n ("Square"); + tqshapeName = i18n ("Square"); break; case 2: - // TODO: is this really the name of a shape? :) - shapeName = i18n ("Slash"); + // TODO: is this really the name of a tqshape? :) + tqshapeName = i18n ("Slash"); break; case 3: - // TODO: is this really the name of a shape? :) - shapeName = i18n ("Backslash"); + // TODO: is this really the name of a tqshape? :) + tqshapeName = i18n ("Backslash"); break; } - if (shapeName.isEmpty ()) - return TQString::null; + if (tqshapeName.isEmpty ()) + return TQString(); - return i18n ("%1x%2 %3").arg (s).arg (s).arg (shapeName); + return i18n ("%1x%2 %3").arg (s).arg (s).arg (tqshapeName); } TQPixmap kpToolWidgetBrush::brush () const diff --git a/kolourpaint/widgets/kptoolwidgetbrush.h b/kolourpaint/widgets/kptoolwidgetbrush.h index 563d9625..7fc2ffe0 100644 --- a/kolourpaint/widgets/kptoolwidgetbrush.h +++ b/kolourpaint/widgets/kptoolwidgetbrush.h @@ -36,13 +36,14 @@ class kpToolWidgetBrush : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetBrush (TQWidget *parent, const char *name); + kpToolWidgetBrush (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetBrush (); private: - TQString brushName (int shape, int whichSize); + TQString brushName (int tqshape, int whichSize); public: TQPixmap brush () const; diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.cpp b/kolourpaint/widgets/kptoolwidgeterasersize.cpp index 9b9ffe8a..effd631f 100644 --- a/kolourpaint/widgets/kptoolwidgeterasersize.cpp +++ b/kolourpaint/widgets/kptoolwidgeterasersize.cpp @@ -44,8 +44,8 @@ static int eraserSizes [] = {2, 3, 5, 9, 17, 29}; static const int numEraserSizes = int (sizeof (eraserSizes) / sizeof (eraserSizes [0])); -kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (); @@ -60,29 +60,29 @@ kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *na int s = eraserSizes [i]; cursorPixmap->resize (s, s); - cursorPixmap->fill (Qt::black); + cursorPixmap->fill (TQt::black); TQPixmap previewPixmap (s, s); if (i < 3) { - // HACK: kpToolWidgetBase's layout code sucks and gives uneven spacing + // HACK: kpToolWidgetBase's tqlayout code sucks and gives uneven spacing previewPixmap.resize ((width () - 4) / 3, 9); } TQPainter painter (&previewPixmap); TQRect rect ((previewPixmap.width () - s) / 2, (previewPixmap.height () - s) / 2, s, s); - painter.fillRect (rect, Qt::black); + painter.fillRect (rect, TQt::black); painter.end (); - TQBitmap mask (previewPixmap.width (), previewPixmap.height ()); - mask.fill (Qt::color0/*transparent*/); + TQBitmap tqmask (previewPixmap.width (), previewPixmap.height ()); + tqmask.fill (TQt::color0/*transparent*/); - TQPainter maskPainter (&mask); - maskPainter.fillRect (rect, Qt::color1/*opaque*/); - maskPainter.end (); + TQPainter tqmaskPainter (&tqmask); + tqmaskPainter.fillRect (rect, TQt::color1/*opaque*/); + tqmaskPainter.end (); - previewPixmap.setMask (mask); + previewPixmap.setMask (tqmask); addOption (previewPixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/); @@ -115,7 +115,7 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const // TODO: why are we even storing m_cursorPixmaps? TQPixmap pixmap = m_cursorPixmaps [selected ()]; if (color.isOpaque ()) - pixmap.fill (color.toQColor ()); + pixmap.fill (color.toTQColor ()); bool showBorder = (pixmap.width () > 2 && pixmap.height () > 2); @@ -123,26 +123,26 @@ TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const if (showBorder) { TQPainter painter (&pixmap); - painter.setPen (Qt::black); + painter.setPen (TQt::black); painter.drawRect (pixmap.rect ()); } if (color.isTransparent ()) { - TQBitmap maskBitmap (pixmap.width (), pixmap.height ()); - maskBitmap.fill (Qt::color0/*transparent*/); + TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ()); + tqmaskBitmap.fill (TQt::color0/*transparent*/); if (showBorder) { - TQPainter maskBitmapPainter (&maskBitmap); - maskBitmapPainter.setPen (Qt::color1/*opaque*/); - maskBitmapPainter.drawRect (maskBitmap.rect ()); + TQPainter tqmaskBitmapPainter (&tqmaskBitmap); + tqmaskBitmapPainter.setPen (TQt::color1/*opaque*/); + tqmaskBitmapPainter.drawRect (tqmaskBitmap.rect ()); } - pixmap.setMask (maskBitmap); + pixmap.setMask (tqmaskBitmap); } diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.h b/kolourpaint/widgets/kptoolwidgeterasersize.h index 09b8c0f8..1568088d 100644 --- a/kolourpaint/widgets/kptoolwidgeterasersize.h +++ b/kolourpaint/widgets/kptoolwidgeterasersize.h @@ -38,9 +38,10 @@ class kpColor; class kpToolWidgetEraserSize : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetEraserSize (TQWidget *parent, const char *name); + kpToolWidgetEraserSize (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetEraserSize (); int eraserSize () const; diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp index 9b780b3f..c59b730e 100644 --- a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp +++ b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp @@ -42,8 +42,8 @@ #include <kptool.h> -kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (); @@ -71,34 +71,34 @@ kpToolWidgetFillStyle::~kpToolWidgetFillStyle () TQPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h) { TQPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h)); - pixmap.fill (Qt::white); + pixmap.fill (TQt::white); TQPainter painter (&pixmap); - painter.setPen (TQPen (Qt::black, 2)); + painter.setPen (TQPen (TQt::black, 2)); painter.setBrush (brushForFillStyle (fs, - kpColor (Qt::black.rgb ())/*foreground*/, - kpColor (Qt::gray.rgb ())/*background*/)); + kpColor (TQt::black.rgb ())/*foreground*/, + kpColor (TQt::gray.rgb ())/*background*/)); painter.drawRect (2, 2, w - 3, h - 3); painter.end (); - TQBitmap mask (pixmap.width (), pixmap.height ()); - mask.fill (Qt::color0); + TQBitmap tqmask (pixmap.width (), pixmap.height ()); + tqmask.fill (TQt::color0); - painter.begin (&mask); - painter.setPen (TQPen (Qt::color1, 2)); + painter.begin (&tqmask); + painter.setPen (TQPen (TQt::color1, 2)); if (fs == FillWithBackground || fs == FillWithForeground) - painter.setBrush (Qt::color1); + painter.setBrush (TQt::color1); painter.drawRect (2, 2, w - 3, h - 3); painter.end (); - pixmap.setMask (mask); + pixmap.setMask (tqmask); return pixmap; } @@ -121,7 +121,7 @@ TQString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const return i18n ("Fill with Foreground Color"); break; default: - return TQString::null; + return TQString(); break; } } @@ -139,7 +139,7 @@ kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const } // public static -TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs, +TQBrush kpToolWidgetFillStyle::tqmaskBrushForFillStyle (FillStyle fs, const kpColor &foregroundColor, const kpColor &backgroundColor) { @@ -152,10 +152,10 @@ TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs, return Qt::NoBrush; break; case FillWithBackground: - return TQBrush (backgroundColor.maskColor ()); + return TQBrush (backgroundColor.tqmaskColor ()); break; case FillWithForeground: - return TQBrush (foregroundColor.maskColor ()); + return TQBrush (foregroundColor.tqmaskColor ()); break; default: return Qt::NoBrush; @@ -163,10 +163,10 @@ TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs, } } -TQBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor, +TQBrush kpToolWidgetFillStyle::tqmaskBrush (const kpColor &foregroundColor, const kpColor &backgroundColor) { - return maskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor); + return tqmaskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor); } // public static @@ -186,13 +186,13 @@ TQBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs, break; case FillWithBackground: if (backgroundColor.isOpaque ()) - return TQBrush (backgroundColor.toQColor ()); + return TQBrush (backgroundColor.toTQColor ()); else return Qt::NoBrush; break; case FillWithForeground: if (foregroundColor.isOpaque ()) - return TQBrush (foregroundColor.toQColor ()); + return TQBrush (foregroundColor.toTQColor ()); else return Qt::NoBrush; break; diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.h b/kolourpaint/widgets/kptoolwidgetfillstyle.h index 86a47270..221d0245 100644 --- a/kolourpaint/widgets/kptoolwidgetfillstyle.h +++ b/kolourpaint/widgets/kptoolwidgetfillstyle.h @@ -38,9 +38,10 @@ class kpColor; class kpToolWidgetFillStyle : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetFillStyle (TQWidget *parent, const char *name); + kpToolWidgetFillStyle (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetFillStyle (); enum FillStyle @@ -58,10 +59,10 @@ private: public: FillStyle fillStyle () const; - static TQBrush maskBrushForFillStyle (FillStyle fs, + static TQBrush tqmaskBrushForFillStyle (FillStyle fs, const kpColor &foregroundColor, const kpColor &backgroundColor); - TQBrush maskBrush (const kpColor &foregroundColor, + TQBrush tqmaskBrush (const kpColor &foregroundColor, const kpColor &backgroundColor); static TQBrush brushForFillStyle (FillStyle fs, diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp index ded51a03..e7804149 100644 --- a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp +++ b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp @@ -36,8 +36,8 @@ static int lineWidths [] = {1, 2, 3, 5, 8}; -kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (); @@ -50,24 +50,24 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name { TQPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h)); - pixmap.fill (Qt::white); + pixmap.fill (TQt::white); - TQBitmap maskBitmap (pixmap.width (), pixmap.height ()); - maskBitmap.fill (Qt::color0/*transparent*/); + TQBitmap tqmaskBitmap (pixmap.width (), pixmap.height ()); + tqmaskBitmap.fill (TQt::color0/*transparent*/); - TQPainter painter (&pixmap), maskPainter (&maskBitmap); - painter.setPen (Qt::black), maskPainter.setPen (Qt::color1/*opaque*/); - painter.setBrush (Qt::black), maskPainter.setBrush (Qt::color1/*opaque*/); + TQPainter painter (&pixmap), tqmaskPainter (&tqmaskBitmap); + painter.setPen (TQt::black), tqmaskPainter.setPen (TQt::color1/*opaque*/); + painter.setBrush (TQt::black), tqmaskPainter.setBrush (TQt::color1/*opaque*/); TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2, pixmap.width (), lineWidths [i]); - painter.drawRect (rect), maskPainter.drawRect (rect); + painter.drawRect (rect), tqmaskPainter.drawRect (rect); - painter.end (), maskPainter.end (); + painter.end (), tqmaskPainter.end (); - pixmap.setMask (maskBitmap); + pixmap.setMask (tqmaskBitmap); addOption (pixmap, TQString::number (lineWidths [i])); startNewOptionRow (); diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.h b/kolourpaint/widgets/kptoolwidgetlinewidth.h index 8fa041a0..8ac76909 100644 --- a/kolourpaint/widgets/kptoolwidgetlinewidth.h +++ b/kolourpaint/widgets/kptoolwidgetlinewidth.h @@ -34,9 +34,10 @@ class kpToolWidgetLineWidth : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetLineWidth (TQWidget *parent, const char *name); + kpToolWidgetLineWidth (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetLineWidth (); int lineWidth () const; diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp index 4cd5b6f6..6479d891 100644 --- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp +++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp @@ -35,8 +35,8 @@ #include <klocale.h> -kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { setInvertSelectedPixmap (false); diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h index 82ea3f50..45e49a2f 100644 --- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h +++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h @@ -35,9 +35,10 @@ class kpToolWidgetOpaqueOrTransparent : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name); + kpToolWidgetOpaqueOrTransparent (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetOpaqueOrTransparent (); bool isOpaque () const; diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp index 2f426df5..cce8f1b5 100644 --- a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp +++ b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp @@ -44,8 +44,8 @@ static int spraycanSizes [] = {9, 17, 29}; -kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char *name) - : kpToolWidgetBase (parent, name) +kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name) + : kpToolWidgetBase (tqparent, name) { #if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE kdDebug () << "kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize() CALLED!" << endl; @@ -54,14 +54,14 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++) { int s = spraycanSizes [i]; - TQString iconName = TQString ("tool_spraycan_%1x%1").arg (s).arg(s); + TQString iconName = TQString ("tool_spraycan_%1x%1").tqarg (s).tqarg(s); #if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE kdDebug () << "\ticonName=" << iconName << endl; #endif TQPixmap pixmap (s, s); - pixmap.fill (Qt::white); + pixmap.fill (TQt::white); TQPainter painter (&pixmap); painter.drawPixmap (0, 0, UserIcon (iconName)); @@ -69,24 +69,24 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char TQImage image = kpPixmapFX::convertToImage (pixmap); - TQBitmap mask (pixmap.width (), pixmap.height ()); - mask.fill (Qt::color0); + TQBitmap tqmask (pixmap.width (), pixmap.height ()); + tqmask.fill (TQt::color0); - painter.begin (&mask); - painter.setPen (Qt::color1); + painter.begin (&tqmask); + painter.setPen (TQt::color1); for (int y = 0; y < image.height (); y++) { for (int x = 0; x < image.width (); x++) { - if ((image.pixel (x, y) & RGB_MASK) == 0/*black*/) + if ((image.pixel (x, y) & TQRGB_MASK) == 0/*black*/) painter.drawPoint (x, y); // mark as opaque } } painter.end (); - pixmap.setMask (mask); + pixmap.setMask (tqmask); addOption (pixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/); if (i == 1) diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.h b/kolourpaint/widgets/kptoolwidgetspraycansize.h index 6cc7d11e..ef86891f 100644 --- a/kolourpaint/widgets/kptoolwidgetspraycansize.h +++ b/kolourpaint/widgets/kptoolwidgetspraycansize.h @@ -34,9 +34,10 @@ class kpToolWidgetSpraycanSize : public kpToolWidgetBase { Q_OBJECT + TQ_OBJECT public: - kpToolWidgetSpraycanSize (TQWidget *parent, const char *name); + kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name); virtual ~kpToolWidgetSpraycanSize (); int spraycanSize () const; diff --git a/kooka/CHANGES b/kooka/CHANGES index 0b384de6..550637d7 100644 --- a/kooka/CHANGES +++ b/kooka/CHANGES @@ -20,7 +20,7 @@ scanned with about 150 dpi. via mime mechanism of KDE (KRun). OCR-Parameter get stored via KConfig. OCR may be performed on the entire image or the selection. -* Reworked the save assistant: New layout and fully KDE2-Compliant. +* Reworked the save assistant: New tqlayout and fully KDE2-Compliant. Still no new Image format help texts. * Reworked the startup dialog: Allows to select the scan device from a diff --git a/kooka/dwmenuaction.cpp b/kooka/dwmenuaction.cpp index 920fb433..d77c8d16 100644 --- a/kooka/dwmenuaction.cpp +++ b/kooka/dwmenuaction.cpp @@ -22,8 +22,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -32,9 +32,9 @@ //------------------------------------- dwMenuAction::dwMenuAction( const TQString& text, const KShortcut& cut, - KDockWidget *dw,TQObject* parent, + KDockWidget *dw,TQObject* tqparent, KDockMainWindow *mw, const char* name ) - :KToggleAction(text,cut,parent,name),m_dw(dw),m_mw(mw) + :KToggleAction(text,cut,tqparent,name),m_dw(dw),m_mw(mw) { connect(this,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool))); connect(m_dw->dockManager(),TQT_SIGNAL(change()),this,TQT_SLOT(anDWChanged())); diff --git a/kooka/dwmenuaction.h b/kooka/dwmenuaction.h index e260a094..d6cac229 100644 --- a/kooka/dwmenuaction.h +++ b/kooka/dwmenuaction.h @@ -22,8 +22,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -35,7 +35,7 @@ /** * This class is just a helper class since the KDockWidget classes do not yet - * export KActions but only a QPopup-Pointer, which is quite useless in case + * export KActions but only a TQPopup-Pointer, which is quite useless in case * you have a xml-file driven gui. * This class provides Actions for show and hide parts of the GUI (dockwidgets) * Maybe that classes can be removed as soon the DockWidget know Actions @@ -43,10 +43,11 @@ class dwMenuAction:public KToggleAction { Q_OBJECT + TQ_OBJECT public: dwMenuAction( const TQString& text, const KShortcut& cut = KShortcut(), - KDockWidget *dw=0, TQObject* parent = 0, + KDockWidget *dw=0, TQObject* tqparent = 0, KDockMainWindow * mw=0, const char* name = 0 ); virtual ~dwMenuAction(); diff --git a/kooka/formathelp.h b/kooka/formathelp.h index 7887a240..9e754bdb 100644 --- a/kooka/formathelp.h +++ b/kooka/formathelp.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ diff --git a/kooka/imageselectline.cpp b/kooka/imageselectline.cpp index 4145cc30..99ba935e 100644 --- a/kooka/imageselectline.cpp +++ b/kooka/imageselectline.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ #include <tqhbox.h> @@ -47,8 +47,8 @@ * together in a row. The button opens a file selector box to pick a file. */ -ImageSelectLine::ImageSelectLine( TQWidget *parent, const TQString& text ) - : TQHBox( parent ) +ImageSelectLine::ImageSelectLine( TQWidget *tqparent, const TQString& text ) + : TQHBox( tqparent ) { setSpacing( 5 ); (void) new TQLabel( text, this ); diff --git a/kooka/imageselectline.h b/kooka/imageselectline.h index 92cfec17..a9672edf 100644 --- a/kooka/imageselectline.h +++ b/kooka/imageselectline.h @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -40,11 +40,12 @@ class KURLComboBox; class TQPushButton; class TQStringList; -class ImageSelectLine:public QHBox +class ImageSelectLine:public TQHBox { Q_OBJECT + TQ_OBJECT public: - ImageSelectLine( TQWidget *parent, const TQString& text ); + ImageSelectLine( TQWidget *tqparent, const TQString& text ); KURL selectedURL() const; void setURL( const KURL& ); diff --git a/kooka/img_saver.cpp b/kooka/img_saver.cpp index b8c789fc..01a19461 100644 --- a/kooka/img_saver.cpp +++ b/kooka/img_saver.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -58,8 +58,8 @@ #include "previewer.h" #include "kookaimage.h" -FormatDialog::FormatDialog( TQWidget *parent, const TQString&, const char *name ) - :KDialogBase( parent, name, true, +FormatDialog::FormatDialog( TQWidget *tqparent, const TQString&, const char *name ) + :KDialogBase( tqparent, name, true, /* Tabbed,*/ i18n( "Kooka Save Assistant" ), Ok|Cancel, Ok ) @@ -116,7 +116,7 @@ FormatDialog::FormatDialog( TQWidget *parent, const TQString&, const char *name Q_CHECK_PTR(l_help); l_help->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); l_help->setText( i18n("-No format selected-" )); - l_help->setAlignment( AlignVCenter | AlignHCenter ); + l_help->tqsetAlignment( AlignVCenter | AlignHCenter ); l_help->setMinimumWidth(230); // Insert Selbox for subformat @@ -176,7 +176,7 @@ void FormatDialog::check_subformat( const TQString & format ) void FormatDialog::setSelectedFormat( TQString fo ) { - TQListBoxItem *item = lb_format->findItem( fo ); + TQListBoxItem *item = lb_format->tqfindItem( fo ); if( item ) { @@ -208,18 +208,18 @@ TQCString FormatDialog::getSubFormat( ) const #include "formathelp.h" void FormatDialog::buildHelp( void ) { - format_help.insert( TQString::fromLatin1("BMP"), HELP_BMP ); - format_help.insert( TQString::fromLatin1("PNM"), HELP_PNM ); - format_help.insert( TQString::fromLatin1("JPEG"), HELP_JPG ); - format_help.insert( TQString::fromLatin1("JPG"), HELP_JPG ); - format_help.insert( TQString::fromLatin1("EPS"), HELP_EPS ); + format_help.insert( TQString::tqfromLatin1("BMP"), HELP_BMP ); + format_help.insert( TQString::tqfromLatin1("PNM"), HELP_PNM ); + format_help.insert( TQString::tqfromLatin1("JPEG"), HELP_JPG ); + format_help.insert( TQString::tqfromLatin1("JPG"), HELP_JPG ); + format_help.insert( TQString::tqfromLatin1("EPS"), HELP_EPS ); } /* ********************************************************************** */ -ImgSaver::ImgSaver( TQWidget *parent, const KURL dir_name ) - : TQObject( parent ) +ImgSaver::ImgSaver( TQWidget *tqparent, const KURL dir_name ) + : TQObject( tqparent ) { if( dir_name.isEmpty() || dir_name.protocol() != "file" ) @@ -250,8 +250,8 @@ ImgSaver::ImgSaver( TQWidget *parent, const KURL dir_name ) } -ImgSaver::ImgSaver( TQWidget *parent ) - :TQObject( parent ) +ImgSaver::ImgSaver( TQWidget *tqparent ) + :TQObject( tqparent ) { directory = Previewer::galleryRoot(); createDir( directory ); @@ -276,14 +276,14 @@ void ImgSaver::createDir( const TQString& dir ) if( KIO::mkdir( KURL(dir))) { KMessageBox::sorry(0, i18n("The folder\n%1\n does not exist and could not be created;\n" - "please check the permissions.").arg(dir)); + "please check the permissions.").tqarg(dir)); } } #if 0 if( ! fi.isWritable() ) { KMessageBox::sorry(0, i18n("The directory\n%1\n is not writeable;\nplease check the permissions.") - .arg(dir)); + .tqarg(dir)); } #endif } @@ -395,7 +395,7 @@ TQString ImgSaver::createFilename( TQString format ) } /** - * This function gets a filename from the parent. The filename must not be relative. + * This function gets a filename from the tqparent. The filename must not be relative. **/ ImgSaveStat ImgSaver::saveImage( TQImage *image, const KURL& filename, const TQString& imgFormat ) { @@ -728,7 +728,7 @@ TQString ImgSaver::extension( const KURL& url ) { TQString extension = url.fileName(); - int dotPos = extension.findRev( '.' ); + int dotPos = extension.tqfindRev( '.' ); if( dotPos > 0 ) { int len = extension.length(); @@ -766,7 +766,7 @@ bool ImgSaver::renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt, TQWi TQString s; s = i18n("The filename you supplied has no file extension.\nShould the correct one be added automatically? "); - s += i18n( "That would result in the new filename: %1" ).arg( fName); + s += i18n( "That would result in the new filename: %1" ).tqarg( fName); result = KMessageBox::questionYesNo(overWidget, s, i18n( "Extension Missing"), i18n("Add Extension"), i18n("Do Not Add"), @@ -863,7 +863,7 @@ bool ImgSaver::copyImage( const KURL& fromUrl, const KURL& toUrl, TQWidget *over TQString s; s = i18n("The filename you supplied has no file extension.\nShould the correct one be added automatically? "); - s += i18n( "That would result in the new filename: %1" ).arg( fName); + s += i18n( "That would result in the new filename: %1" ).tqarg( fName); result = KMessageBox::questionYesNo(overWidget, s, i18n( "Extension Missing"), i18n("Add Extension"), i18n("Do Not Add"), diff --git a/kooka/img_saver.h b/kooka/img_saver.h index 95204ad7..31f6d8ab 100644 --- a/kooka/img_saver.h +++ b/kooka/img_saver.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -101,8 +101,9 @@ class KookaImage; class FormatDialog:public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FormatDialog( TQWidget *parent, const TQString&, const char * ); + FormatDialog( TQWidget *tqparent, const TQString&, const char * ); TQString getFormat( ) const; @@ -129,7 +130,7 @@ private: TQComboBox *cb_subf; TQListBox *lb_format; TQLabel *l_help; - QLabel *l2; + TQLabel *l2; TQCheckBox *cbRemember; TQCheckBox *cbDontAsk; }; @@ -144,6 +145,7 @@ private: class ImgSaver:public TQObject { Q_OBJECT + TQ_OBJECT public: /** * constructor of the image-saver object. @@ -153,8 +155,8 @@ public: * @param dir Name of the save root directory * @param name Name of a subdirectory in the saveroot. **/ - ImgSaver( TQWidget *parent, const KURL ); - ImgSaver( TQWidget *parent ); + ImgSaver( TQWidget *tqparent, const KURL ); + ImgSaver( TQWidget *tqparent ); TQString errorString( ImgSaveStat ); /** diff --git a/kooka/imgnamecombo.cpp b/kooka/imgnamecombo.cpp index 0e06646b..94faa083 100644 --- a/kooka/imgnamecombo.cpp +++ b/kooka/imgnamecombo.cpp @@ -20,8 +20,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -38,8 +38,8 @@ #include "imgnamecombo.h" #include "img_saver.h" -ImageNameCombo::ImageNameCombo( TQWidget *parent ) - : KComboBox( parent ) +ImageNameCombo::ImageNameCombo( TQWidget *tqparent ) + : KComboBox( tqparent ) { setInsertionPolicy( TQComboBox::AtTop ); } @@ -51,12 +51,12 @@ ImageNameCombo::~ImageNameCombo() void ImageNameCombo::slotPathRemove( KFileTreeBranch *branch, const TQString& relPath ) { - TQString path = branch->name() + TQString::fromLatin1(" - ") + relPath; + TQString path = branch->name() + TQString::tqfromLatin1(" - ") + relPath; kdDebug(28000) << "ImageNameCombo: Removing " << path << endl; TQString select = currentText(); - if( items.contains( path )) + if( items.tqcontains( path )) { kdDebug(28000) << "ImageNameCombo: Item exists-> deleting" << endl; items.remove( path ); @@ -74,7 +74,7 @@ void ImageNameCombo::rewriteList( KFileTreeBranch *branch, const TQString& selTe insertItem( branch->pixmap(), *it ); } - int index = items.findIndex( selText ); + int index = items.tqfindIndex( selText ); setCurrentItem( index ); } @@ -82,7 +82,7 @@ void ImageNameCombo::slotGalleryPathChanged( KFileTreeBranch* branch, const TQSt { TQString newPath; - newPath = branch->name() + TQString::fromLatin1(" - ") + relativPath; + newPath = branch->name() + TQString::tqfromLatin1(" - ") + relativPath; kdDebug( 28000) << "Inserting " << newPath << " to combobox" << endl; diff --git a/kooka/imgnamecombo.h b/kooka/imgnamecombo.h index 1beb1235..3a44aee3 100644 --- a/kooka/imgnamecombo.h +++ b/kooka/imgnamecombo.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -41,6 +41,7 @@ class KFileBranch; class ImageNameCombo: public KComboBox { Q_OBJECT + TQ_OBJECT public: ImageNameCombo( TQWidget* ); ~ImageNameCombo(); diff --git a/kooka/imgprintdialog.cpp b/kooka/imgprintdialog.cpp index fa7ee620..98a783f4 100644 --- a/kooka/imgprintdialog.cpp +++ b/kooka/imgprintdialog.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ #include "imgprintdialog.h" @@ -47,15 +47,15 @@ #define ID_CUSTOM 2 #define ID_FIT_PAGE 3 -ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *parent, const char* name ) - : KPrintDialogPage( parent, name ), +ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *tqparent, const char* name ) + : KPrintDialogPage( tqparent, name ), m_image(img), m_ignoreSignal(false) { setTitle(i18n("Image Printing")); - TQVBoxLayout *layout = new TQVBoxLayout( this ); - // layout->setMargin( KDialog::marginHint() ); - // layout->setSpacing( KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); + // tqlayout->setMargin( KDialog::marginHint() ); + // tqlayout->setSpacing( KDialog::spacingHint() ); m_scaleRadios = new TQButtonGroup( 2, Qt::Vertical, i18n("Image Print Size"), this ); m_scaleRadios->setRadioButtonExclusive(true); @@ -84,11 +84,11 @@ ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *parent, const char* n TQToolTip::add( m_rbFitPage, i18n("Printout uses maximum space on the selected pager. Aspect ratio is maintained.")); m_scaleRadios->insert( m_rbFitPage, ID_FIT_PAGE ); - layout->addWidget( m_scaleRadios ); + tqlayout->addWidget( m_scaleRadios ); TQHBoxLayout *hbox = new TQHBoxLayout( this ); - layout->addLayout( hbox ); + tqlayout->addLayout( hbox ); /** Box for Image Resolutions **/ TQVGroupBox *group1 = new TQVGroupBox( i18n("Resolutions"), this ); @@ -127,8 +127,8 @@ ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *parent, const char* n TQWidget *spaceEater = new TQWidget( this ); - spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); - layout->addWidget( spaceEater ); + spaceEater->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + tqlayout->addWidget( spaceEater ); /* Set start values */ m_rbScreen->setChecked(true); @@ -167,7 +167,7 @@ void ImgPrintDialog::setOptions(const TQMap<TQString,TQString>& opts) m_sizeH->setValue( help ); help = opts[OPT_SCREEN_RES].toInt(); - m_screenRes->setText(i18n( "Screen resolution: %1 dpi").arg(help)); + m_screenRes->setText(i18n( "Screen resolution: %1 dpi").tqarg(help)); help = opts[OPT_PSGEN_DRAFT].toInt(); m_psDraft->setChecked( help == 1 ); diff --git a/kooka/imgprintdialog.h b/kooka/imgprintdialog.h index f710820e..389a546c 100644 --- a/kooka/imgprintdialog.h +++ b/kooka/imgprintdialog.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -53,8 +53,9 @@ class TQCheckBox; class ImgPrintDialog: public KPrintDialogPage { Q_OBJECT + TQ_OBJECT public: - ImgPrintDialog( KookaImage *img, TQWidget *parent=0L, const char* name=0L ); + ImgPrintDialog( KookaImage *img, TQWidget *tqparent=0L, const char* name=0L ); void setOptions(const TQMap<TQString,TQString>& opts); void getOptions(TQMap<TQString,TQString>& opts, bool include_def = false); diff --git a/kooka/kadmosocr.cpp b/kooka/kadmosocr.cpp index d0d41e13..3110451f 100644 --- a/kooka/kadmosocr.cpp +++ b/kooka/kadmosocr.cpp @@ -25,8 +25,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -313,12 +313,12 @@ void CRep::partStrings( int line, int graphKnode, TQString soFar ) void CRep::drawCharBox( TQPixmap *pix, const TQRect& r ) { - drawBox( pix, r, TQColor( Qt::red )); + drawBox( pix, r, TQColor( TQt::red )); } void CRep::drawLineBox( TQPixmap* pix, const TQRect& r ) { - drawBox( pix, r, TQColor( Qt::blue )); + drawBox( pix, r, TQColor( TQt::blue )); } void CRep::drawBox( TQPixmap* pix, const TQRect& r, const TQColor& color ) @@ -356,7 +356,7 @@ KADMOS_ERROR CRep::SetImage(TQImage *Image) m_RepData.image.width = Image->width(); m_RepData.image.height = Image->height(); m_RepData.image.bitsperpixel = Image->depth(); - m_RepData.image.alignment = 1; + m_RepData.image.tqalignment = 1; m_RepData.image.fillorder = FILLORDER_MSB2LSB; // color if( Image->depth() == 1 || (Image->numColors()==2 && Image->depth() == 8) ) diff --git a/kooka/kadmosocr.h b/kooka/kadmosocr.h index cc4d225f..ca7edcb4 100644 --- a/kooka/kadmosocr.h +++ b/kooka/kadmosocr.h @@ -23,8 +23,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -66,9 +66,10 @@ namespace Kadmos { const char CPP_ERROR[] = "Kadmos CPP interface error"; /* ==== CRep ========================================= */ - class CRep : public QObject + class CRep : public TQObject { Q_OBJECT + TQ_OBJECT public: CRep(); virtual ~CRep(); diff --git a/kooka/kocrbase.cpp b/kooka/kocrbase.cpp index 3ede6ef0..4c9ccc14 100644 --- a/kooka/kocrbase.cpp +++ b/kooka/kocrbase.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -59,10 +59,10 @@ #include <tqgroupbox.h> #include <tqcheckbox.h> -KOCRBase::KOCRBase( TQWidget *parent, KSpellConfig *spellConfig, +KOCRBase::KOCRBase( TQWidget *tqparent, KSpellConfig *spellConfig, KDialogBase::DialogType face ) :KDialogBase( face, i18n("Optical Character Recognition"), - User2|Close|User1, User1, parent,0, false, true, + User2|Close|User1, User1, tqparent,0, false, true, KGuiItem( i18n("Start OCR" ), "launch", i18n("Start the Optical Character Recognition process" )), KGuiItem( i18n("Cancel" ), "stopocr", @@ -98,11 +98,11 @@ KOCRBase::KOCRBase( TQWidget *parent, KSpellConfig *spellConfig, } -KAnimWidget* KOCRBase::getAnimation(TQWidget *parent) +KAnimWidget* KOCRBase::getAnimation(TQWidget *tqparent) { if( ! m_animation ) { - m_animation = new KAnimWidget( TQString("kde"), 48, parent, "ANIMATION" ); + m_animation = new KAnimWidget( TQString("kde"), 48, tqparent, "ANIMATION" ); } return( m_animation ); } @@ -129,7 +129,7 @@ void KOCRBase::imgIntro() m_previewPix = new TQLabel( m_imgHBox ); m_previewPix->setPixmap(TQPixmap()); m_previewPix->setFixedSize(m_previewSize); - m_previewPix->setAlignment( Qt::AlignCenter ); + m_previewPix->tqsetAlignment( TQt::AlignCenter ); m_previewPix->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); // m_previewPix->resize(m_previewSize); @@ -164,7 +164,7 @@ void KOCRBase::ocrIntro( ) hb_cap->setSpacing( KDialog::spacingHint()); TQLabel *imgLab = new TQLabel( hb_cap ); - imgLab->setAlignment( Qt::AlignHCenter | Qt::AlignTop ); + imgLab->tqsetAlignment( TQt::AlignHCenter | TQt::AlignTop ); imgLab->setPixmap( pix ); pa = hb_cap; } @@ -188,7 +188,7 @@ void KOCRBase::spellCheckIntro() KSpellConfig *sCfg = new KSpellConfig( m_gbSpellOpts, "SPELLCHK", m_spellConfig, false ); /* A space eater */ TQWidget *spaceEater = new TQWidget(m_spellchkPage); - spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + spaceEater->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); /* connect toggle button */ connect( m_cbWantCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slWantSpellcheck(bool))); @@ -285,7 +285,7 @@ void KOCRBase::introduceImage( KookaImage* img) } } TQWidget *spaceEater = new TQWidget( m_metaBox ); - spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + spaceEater->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); m_metaBox->show(); } diff --git a/kooka/kocrbase.h b/kooka/kocrbase.h index a2a04342..5f7e55a9 100644 --- a/kooka/kocrbase.h +++ b/kooka/kocrbase.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -54,6 +54,7 @@ class TQGroupBox; class KOCRBase: public KDialogBase { Q_OBJECT + TQ_OBJECT public: KOCRBase( TQWidget *, KSpellConfig *spellConfig, KDialogBase::DialogType face = KDialogBase::Plain ); @@ -106,7 +107,7 @@ protected: * ocr engine used. * It calls the virtual subs ocrEngineName, ocrEngineLogo and ocrEngineDesc which * must return the approbiate values for the engines. - * @return a pointer to a VBox in which further elements can be layouted + * @return a pointer to a VBox in which further elements can be tqlayouted */ virtual void ocrIntro(); diff --git a/kooka/kocrgocr.cpp b/kooka/kocrgocr.cpp index aa6eb333..dbb255c4 100644 --- a/kooka/kocrgocr.cpp +++ b/kooka/kocrgocr.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -58,8 +58,8 @@ -KGOCRDialog::KGOCRDialog( TQWidget *parent, KSpellConfig *spellConfig ) - :KOCRBase( parent, spellConfig, KDialogBase::Tabbed ), +KGOCRDialog::KGOCRDialog( TQWidget *tqparent, KSpellConfig *spellConfig ) + :KOCRBase( tqparent, spellConfig, KDialogBase::Tabbed ), m_ocrCmd( TQString()) { kdDebug(28000) << "Starting KOCR-Start-Dialog!" << endl; @@ -96,7 +96,7 @@ EngineError KGOCRDialog::setupGui() KConfig *conf = KGlobal::config (); conf->setGroup( CFG_GROUP_OCR_DIA ); - // Horizontal line + //Qt::Horizontal line // (void) new KSeparator( KSeparator::HLine, page); // Entry-Field. diff --git a/kooka/kocrgocr.h b/kooka/kocrgocr.h index f17cdd0a..2b42ebfb 100644 --- a/kooka/kocrgocr.h +++ b/kooka/kocrgocr.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -45,6 +45,7 @@ class KSpellConfig; class KGOCRDialog: public KOCRBase { Q_OBJECT + TQ_OBJECT public: KGOCRDialog( TQWidget*, KSpellConfig* ); ~KGOCRDialog(); diff --git a/kooka/kocrkadmos.cpp b/kooka/kocrkadmos.cpp index 6ac6fb12..97d8310f 100644 --- a/kooka/kocrkadmos.cpp +++ b/kooka/kocrkadmos.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -64,8 +64,8 @@ #define CNTRY_CZ i18n( "Czech Republic, Slovakia") #define CNTRY_GB i18n( "Great Britain, USA" ) -KadmosDialog::KadmosDialog( TQWidget *parent, KSpellConfig *spellConfig ) - :KOCRBase( parent, spellConfig, KDialogBase::Tabbed ), +KadmosDialog::KadmosDialog( TQWidget *tqparent, KSpellConfig *spellConfig ) + :KOCRBase( tqparent, spellConfig, KDialogBase::Tabbed ), m_cbNoise(0), m_cbAutoscale(0), m_haveNorm(false) @@ -163,7 +163,7 @@ EngineError KadmosDialog::findClassifiers() if( name.startsWith( "ttf" ) ) { TQString lang = name.mid(3,2); - if( allCountries.contains(lang) ) + if( allCountries.tqcontains(lang) ) { TQString lngCountry = locale->twoAlphaToCountryName(lang); if( lngCountry.isEmpty() ) @@ -188,7 +188,7 @@ EngineError KadmosDialog::findClassifiers() else if( name.startsWith( "hand" ) ) { TQString lang = name.mid(4,2); - if( allCountries.contains(lang) ) + if( allCountries.tqcontains(lang) ) { TQString lngCountry = locale->twoAlphaToCountryName(lang); if( lngCountry.isEmpty() ) @@ -271,7 +271,7 @@ EngineError KadmosDialog::setupGui() /* continue page setup on the first page */ TQVBox *page = ocrPage(); - // Horizontal line + //Qt::Horizontal line (void) new KSeparator( KSeparator::HLine, page); // FIXME: dynamic classifier reading. @@ -422,14 +422,14 @@ bool KadmosDialog::getSelClassifier( TQString& path ) const if( res && ! fi.exists() ) { kdDebug(28000) << "Classifier file does not exist" << endl; - path = i18n("Classifier file %1 does not exist").arg(classifier); + path = i18n("Classifier file %1 does not exist").tqarg(classifier); res = false; } if( res && ! fi.isReadable() ) { kdDebug(28000) << "Classifier file could not be read" << endl; - path = i18n("Classifier file %1 is not readable").arg(classifier); + path = i18n("Classifier file %1 is not readable").tqarg(classifier); res = false; } @@ -461,7 +461,7 @@ TQString KadmosDialog::getSelClassifierName() const /* Get the long text from the combo box */ TQString selLang = m_cbLang->currentText(); TQString trans; - if( fType != "norm" && m_longCountry2short.contains( selLang )) + if( fType != "norm" && m_longCountry2short.tqcontains( selLang )) { TQString langType = m_longCountry2short[selLang]; trans = fType+langType+".rec"; diff --git a/kooka/kocrkadmos.h b/kooka/kocrkadmos.h index 567af55b..ac9a4176 100644 --- a/kooka/kocrkadmos.h +++ b/kooka/kocrkadmos.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -66,6 +66,7 @@ private: class KadmosDialog: public KOCRBase { Q_OBJECT + TQ_OBJECT public: KadmosDialog( TQWidget *, KSpellConfig *spellConfig ); ~KadmosDialog(); @@ -105,7 +106,7 @@ private: TQCheckBox *m_cbAutoscale; TQString m_customClassifierPath; - QButtonGroup *m_bbFont; + TQButtonGroup *m_bbFont; TQRadioButton *m_rbMachine; TQRadioButton *m_rbHand; diff --git a/kooka/kocrocrad.cpp b/kooka/kocrocrad.cpp index aab63405..31c3bc40 100644 --- a/kooka/kocrocrad.cpp +++ b/kooka/kocrocrad.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -54,8 +54,8 @@ -ocradDialog::ocradDialog( TQWidget *parent, KSpellConfig *spellConfig ) - :KOCRBase( parent, spellConfig, KDialogBase::Tabbed ), +ocradDialog::ocradDialog( TQWidget *tqparent, KSpellConfig *spellConfig ) + :KOCRBase( tqparent, spellConfig, KDialogBase::Tabbed ), m_ocrCmd( TQString()), m_orfUrlRequester(0L), m_layoutMode(0), @@ -92,7 +92,7 @@ TQString ocradDialog::ocrEngineDesc() const } -int ocradDialog::layoutDetectionMode() const +int ocradDialog::tqlayoutDetectionMode() const { return m_layoutMode->currentItem(); } @@ -107,7 +107,7 @@ EngineError ocradDialog::setupGui() KConfig *conf = KGlobal::config (); conf->setGroup( CFG_GROUP_OCR_DIA ); - // Horizontal line + //Qt::Horizontal line // (void) new KSeparator( KSeparator::HLine, page); // Entry-Field. @@ -129,20 +129,20 @@ EngineError ocradDialog::setupGui() else m_ocrCmd = res; - /** layout detection button **/ + /** tqlayout detection button **/ conf->setGroup( CFG_GROUP_OCRAD ); - int layoutDetect = conf->readNumEntry( CFG_OCRAD_LAYOUT_DETECTION, 0 ); - kdDebug(28000) << "Layout detection from config: " << layoutDetect << endl; + int tqlayoutDetect = conf->readNumEntry( CFG_OCRAD_LAYOUT_DETECTION, 0 ); + kdDebug(28000) << "Layout detection from config: " << tqlayoutDetect << endl; (void) new KSeparator( KSeparator::HLine, page); TQHBox *hb1 = new TQHBox(page); hb1->setSpacing( KDialog::spacingHint() ); - (void) new TQLabel( i18n("OCRAD layout analysis mode: "), hb1); + (void) new TQLabel( i18n("OCRAD tqlayout analysis mode: "), hb1); m_layoutMode = new TQComboBox(hb1); m_layoutMode->insertItem(i18n("No Layout Detection"), 0 ); m_layoutMode->insertItem(i18n("Column Detection"), 1 ); m_layoutMode->insertItem(i18n("Full Layout Detection"), 2); - m_layoutMode->setCurrentItem(layoutDetect); + m_layoutMode->setCurrentItem(tqlayoutDetect); /** stating the ocrad binary **/ (void) new KSeparator( KSeparator::HLine, page); diff --git a/kooka/kocrocrad.h b/kooka/kocrocrad.h index 828aceed..d33f03a3 100644 --- a/kooka/kocrocrad.h +++ b/kooka/kocrocrad.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -38,7 +38,7 @@ #include "kocrbase.h" #define CFG_GROUP_OCRAD "ocrad" -#define CFG_OCRAD_LAYOUT_DETECTION "layoutDetection" +#define CFG_OCRAD_LAYOUT_DETECTION "tqlayoutDetection" #define CFG_OCRAD_EXTRA_ARGUMENTS "extraArguments" #define CFG_OCRAD_FORMAT "format" #define CFG_OCRAD_CHARSET "charset" @@ -55,6 +55,7 @@ class TQComboBox; class ocradDialog: public KOCRBase { Q_OBJECT + TQ_OBJECT public: ocradDialog( TQWidget*, KSpellConfig* ); ~ocradDialog(); @@ -70,7 +71,7 @@ public: TQString orfUrl() const; - int layoutDetectionMode() const; + int tqlayoutDetectionMode() const; /** * returns the numeric version of the ocrad program. diff --git a/kooka/kooka.cpp b/kooka/kooka.cpp index aea6c2d8..dc05a622 100644 --- a/kooka/kooka.cpp +++ b/kooka/kooka.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ #include "kooka.h" @@ -96,7 +96,7 @@ Kooka::Kooka( const TQCString& deviceToUse) changeCaption( i18n( "KDE Scanning" )); - setAutoSaveSettings( TQString::fromLatin1("General Options"), + setAutoSaveSettings( TQString::tqfromLatin1("General Options"), true ); } @@ -125,14 +125,14 @@ void Kooka::startup( void ) void Kooka::setupActions() { - KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection()); - KStdAction::quit(this , TQT_SLOT(close()), actionCollection()); + KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(filePrint()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this) , TQT_SLOT(close()), actionCollection()); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection()); m_view->createDockMenu(actionCollection(), this, "settings_show_docks" ); @@ -161,7 +161,7 @@ actionCollection()); actionCollection(), "scaleOriginal" ); m_view->connectViewerAction( act ); -#ifdef QICONSET_HONOUR_ON_OFF +#ifdef TQICONSET_HONOUR_ON_OFF /* The Toggleaction does not seem to handle the on/off icon from TQIconSet */ TQIconSet lockSet; lockSet.setPixmap(BarIcon("lock") , TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::On ); @@ -180,68 +180,68 @@ actionCollection()); /* thumbview and gallery actions */ act = new KAction(i18n("Set Zoom..."), "viewmag", 0, - m_view, TQT_SLOT( slIVShowZoomDialog()), + TQT_TQOBJECT(m_view), TQT_SLOT( slIVShowZoomDialog()), actionCollection(), "showZoomDialog" ); m_view->connectViewerAction( act ); (void) new KAction(i18n("Create From Selectio&n"), "crop", CTRL+Key_N, - m_view, TQT_SLOT( slCreateNewImgFromSelection() ), + TQT_TQOBJECT(m_view), TQT_SLOT( slCreateNewImgFromSelection() ), actionCollection(), "createFromSelection" ); (void) new KAction(i18n("Mirror Image &Vertically"), "mirror-vert", CTRL+Key_V, - this, TQT_SLOT( slMirrorVertical() ), + TQT_TQOBJECT(this), TQT_SLOT( slMirrorVertical() ), actionCollection(), "mirrorVertical" ); - (void) new KAction(i18n("&Mirror Image Horizontally"), "mirror-horiz", CTRL+Key_M, - this, TQT_SLOT( slMirrorHorizontal() ), + (void) new KAction(i18n("&Mirror ImageQt::Horizontally"), "mirror-horiz", CTRL+Key_M, + TQT_TQOBJECT(this), TQT_SLOT( slMirrorHorizontal() ), actionCollection(), "mirrorHorizontal" ); (void) new KAction(i18n("Mirror Image &Both Directions"), "mirror-both", CTRL+Key_B, - this, TQT_SLOT( slMirrorBoth() ), + TQT_TQOBJECT(this), TQT_SLOT( slMirrorBoth() ), actionCollection(), "mirrorBoth" ); (void) new KAction(i18n("Open Image in &Graphic Application..."), "fileopen", CTRL+Key_G, - m_view, TQT_SLOT( slOpenCurrInGraphApp() ), + TQT_TQOBJECT(m_view), TQT_SLOT( slOpenCurrInGraphApp() ), actionCollection(), "openInGraphApp" ); act = new KAction(i18n("&Rotate Image Clockwise"), "rotate_cw", CTRL+Key_R, - this, TQT_SLOT( slRotateClockWise() ), + TQT_TQOBJECT(this), TQT_SLOT( slRotateClockWise() ), actionCollection(), "rotateClockwise" ); m_view->connectViewerAction( act ); act = new KAction(i18n("Rotate Image Counter-Clock&wise"), "rotate_ccw", CTRL+Key_W, - this, TQT_SLOT( slRotateCounterClockWise() ), + TQT_TQOBJECT(this), TQT_SLOT( slRotateCounterClockWise() ), actionCollection(), "rotateCounterClockwise" ); m_view->connectViewerAction( act ); act = new KAction(i18n("Rotate Image 180 &Degrees"), "rotate", CTRL+Key_D, - this, TQT_SLOT( slRotate180() ), + TQT_TQOBJECT(this), TQT_SLOT( slRotate180() ), actionCollection(), "upsitedown" ); m_view->connectViewerAction( act ); /* Gallery actions */ act = new KAction(i18n("&Create Folder..."), "folder_new", 0, - m_view->gallery(), TQT_SLOT( slotCreateFolder() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotCreateFolder() ), actionCollection(), "foldernew" ); m_view->connectGalleryAction( act ); act = new KAction(i18n("&Save Image..."), "filesave", 0, - m_view->gallery(), TQT_SLOT( slotExportFile() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotExportFile() ), actionCollection(), "saveImage" ); m_view->connectGalleryAction( act ); act = new KAction(i18n("&Import Image..."), "inline_image", 0, - m_view->gallery(), TQT_SLOT( slotImportFile() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotImportFile() ), actionCollection(), "importImage" ); m_view->connectGalleryAction( act ); act = new KAction(i18n("&Delete Image"), "edittrash", 0, - m_view->gallery(), TQT_SLOT( slotDeleteItems() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotDeleteItems() ), actionCollection(), "deleteImage" ); m_view->connectGalleryAction( act ); act = new KAction(i18n("&Unload Image"), "fileclose", 0, - m_view->gallery(), TQT_SLOT( slotUnloadItems() ), + TQT_TQOBJECT(m_view->gallery()),TQT_SLOT( slotUnloadItems() ), actionCollection(), "unloadImage" ); m_view->connectGalleryAction( act ); @@ -257,11 +257,11 @@ actionCollection()); #endif (void) new KAction(i18n("Select Scan Device"), "scanner", 0, - m_view, TQT_SLOT( slSelectDevice()), + TQT_TQOBJECT(m_view), TQT_SLOT( slSelectDevice()), actionCollection(), "selectsource" ); (void) new KAction( i18n("Enable All Warnings && Messages"), 0, - this, TQT_SLOT(slEnableWarnings()), + TQT_TQOBJECT(this), TQT_SLOT(slEnableWarnings()), actionCollection(), "enable_msgs"); @@ -308,7 +308,7 @@ void Kooka::dragEnterEvent(TQDragEnterEvent *event) void Kooka::dropEvent(TQDropEvent *event) { // this is a very simplistic implementation of a drop event. we - // will only accept a dropped URL. the Qt dnd code can do *much* + // will only accept a dropped URL. the TQt dnd code can do *much* // much more, so please read the docs there KURL::List uri; diff --git a/kooka/kooka.h b/kooka/kooka.h index 91a98fea..6fa12078 100644 --- a/kooka/kooka.h +++ b/kooka/kooka.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -55,6 +55,7 @@ class KookaView; class Kooka : public KParts::DockMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -74,7 +75,7 @@ public: protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ virtual void dragEnterEvent(TQDragEnterEvent *event); // virtual void dropEvent(TQDropEvent *event); diff --git a/kooka/kookaimage.cpp b/kooka/kookaimage.cpp index 5857440a..a89a97cb 100644 --- a/kooka/kookaimage.cpp +++ b/kooka/kookaimage.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -167,7 +167,7 @@ bool KookaImage::loadFromUrl( const KURL& url ) #endif if( !haveTiff ) { - /* Qt can only read one image */ + /* TQt can only read one image */ ret = load(filename); if( ret ) { @@ -205,15 +205,15 @@ void KookaImage::extractNow() { kdDebug(28000) << "extracting a subimage number " << m_subNo << endl; - KookaImage *parent = parentImage(); + KookaImage *tqparent = tqparentImage(); - if( parent ) + if( tqparent ) { - loadTiffDir( parent->localFileName(), m_subNo ); + loadTiffDir( tqparent->localFileName(), m_subNo ); } else { - kdDebug(28000) << "ERR: No parent defined - can not laod subimage" << endl; + kdDebug(28000) << "ERR: No tqparent defined - can not laod subimage" << endl; } } @@ -300,7 +300,7 @@ bool KookaImage::loadTiffDir( const TQString& filename, int no ) float yScalefactor = xReso / yReso; kdDebug(28000) << "Different resolution x/y, rescaling with factor " << yScalefactor << endl; /* rescale the image */ - *this = smoothScale( imgWidth, int(imgHeight*yScalefactor), TQImage::ScaleFree ); + *this = smoothScale( imgWidth, int(imgHeight*yScalefactor), TQ_ScaleFree ); } else { @@ -308,7 +308,7 @@ bool KookaImage::loadTiffDir( const TQString& filename, int no ) float scalefactor = yReso / xReso; kdDebug(28000) << "Different resolution x/y, rescaling x with factor " << scalefactor << endl; /* rescale the image */ - *this = smoothScale( int(imgWidth*scalefactor), imgHeight, TQImage::ScaleFree ); + *this = smoothScale( int(imgWidth*scalefactor), imgHeight, TQ_ScaleFree ); } } @@ -328,7 +328,7 @@ KookaImage::~KookaImage() } -KookaImage* KookaImage::parentImage() const +KookaImage* KookaImage::tqparentImage() const { return( m_parent ); } diff --git a/kooka/kookaimage.h b/kooka/kookaimage.h index c75c2dae..53ae5eaf 100644 --- a/kooka/kookaimage.h +++ b/kooka/kookaimage.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -47,15 +47,15 @@ class KFileItem; typedef enum { MaxCut, MediumCut } TileMode; -class KookaImage: public QImage +class KookaImage: public TQImage { public: KookaImage( ); /** - * creating a subimage for a parent image. + * creating a subimage for a tqparent image. * @param subNo contains the sequence number of subimages to create. - * @param p is the parent image. + * @param p is the tqparent image. */ KookaImage( int subNo, KookaImage *p ); KookaImage( const TQImage& img ); @@ -76,9 +76,9 @@ public: int subImagesCount() const; /** - * the parent image. + * the tqparent image. */ - KookaImage* parentImage() const; + KookaImage* tqparentImage() const; /** * returns true if this is a subimage. @@ -144,7 +144,7 @@ private: bool loadTiffDir( const TQString&, int ); /* if subNo is 0, the image is the one and only. If it is larger than 0, the - * parent contains the filename */ + * tqparent contains the filename */ int m_subNo; /* In case being a subimage */ diff --git a/kooka/kookaimagemeta.cpp b/kooka/kookaimagemeta.cpp index 7ba1963d..cac78bdc 100644 --- a/kooka/kookaimagemeta.cpp +++ b/kooka/kookaimagemeta.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ diff --git a/kooka/kookaimagemeta.h b/kooka/kookaimagemeta.h index fd269ddd..7b090037 100644 --- a/kooka/kookaimagemeta.h +++ b/kooka/kookaimagemeta.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ diff --git a/kooka/kookapref.cpp b/kooka/kookapref.cpp index 06274670..b453045a 100644 --- a/kooka/kookapref.cpp +++ b/kooka/kookapref.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -149,7 +149,7 @@ void KookaPreferences::setupOCRPage() #endif top->addWidget( kgp ); TQWidget *spaceEater = new TQWidget( page ); - spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); + spaceEater->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored )); top->addWidget( spaceEater ); /* @@ -176,17 +176,17 @@ void KookaPreferences::setupOCRPage() } } -KURLRequester* KookaPreferences::binaryCheckBox( TQWidget *parent, const TQString& program ) +KURLRequester* KookaPreferences::binaryCheckBox( TQWidget *tqparent, const TQString& program ) { - TQHBox *hbox = new TQHBox( parent ); + TQHBox *hbox = new TQHBox( tqparent ); - (void) new TQLabel( i18n("Select the %1 binary to use:").arg( program ), hbox ); - KURLRequester* urlRequester = new KURLRequester( parent ); + (void) new TQLabel( i18n("Select the %1 binary to use:").tqarg( program ), hbox ); + KURLRequester* urlRequester = new KURLRequester( tqparent ); urlRequester->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ); TQToolTip::add( urlRequester, i18n( "Enter the path to %1, the optical-character-recognition " - "command line tool.").arg(program)); + "command line tool.").tqarg(program)); return urlRequester; } @@ -207,7 +207,7 @@ TQString KookaPreferences::tryFindBinary( const TQString& bin, const TQString& c if( res != "notFound" ) { TQFileInfo fi( res ); - if( fi.exists() && fi.isExecutable() && !fi.isDir() && res.contains(bin) ) + if( fi.exists() && fi.isExecutable() && !fi.isDir() && res.tqcontains(bin) ) { return res; } @@ -272,7 +272,7 @@ void KookaPreferences::checkOCRBinarySilent( const TQString& cmd ) #endif bool KookaPreferences::checkOCRBinIntern( const TQString& cmd, const TQString& tool, bool show_msg ) { - if( ! cmd.contains( tool )) return false; + if( ! cmd.tqcontains( tool )) return false; bool ret = true; TQFileInfo fi( cmd ); @@ -316,7 +316,7 @@ void KookaPreferences::setupStartupPage() /* Query for network scanner (Checkbox) */ cbNetQuery = new TQCheckBox( i18n("Query network for available scanners"), - page, "CB_NET_QUERY" ); + page, "CB_NET_TQUERY" ); TQToolTip::add( cbNetQuery, i18n( "Check this if you want a network query for available scanners.\nNote that this does not mean a query over the entire network but only the stations configured for SANE!" )); cbNetQuery->setChecked( ! (konf->readBoolEntry( STARTUP_ONLY_LOCAL, false )) ); @@ -356,7 +356,7 @@ void KookaPreferences::setupSaveFormatPage( ) /* Skip the format asking if a format entry exists */ cbSkipFormatAsk = new TQCheckBox( i18n("Always display image save assistant"), - page, "CB_IMGASSIST_QUERY" ); + page, "CB_IMGASSIST_TQUERY" ); cbSkipFormatAsk->setChecked( konf->readBoolEntry( OP_FILE_ASK_FORMAT, true )); TQToolTip::add( cbSkipFormatAsk, i18n("Check this if you want to see the image save assistant even if there is a default format for the image type." )); top->addWidget( cbSkipFormatAsk ); @@ -418,8 +418,8 @@ void KookaPreferences::setupThumbnailPage() /* Frame Stuff */ int frameWidth = konf->readNumEntry( THUMB_MARGIN, 3 ); - TQColor col1 = konf->readColorEntry( MARGIN_COLOR1, &(colorGroup().base())); - TQColor col2 = konf->readColorEntry( MARGIN_COLOR2, &(colorGroup().foreground())); + TQColor col1 = konf->readColorEntry( MARGIN_COLOR1, &(tqcolorGroup().base())); + TQColor col2 = konf->readColorEntry( MARGIN_COLOR2, &(tqcolorGroup().foreground())); TQGrid *fGrid = new TQGrid( 2, hgb3 ); fGrid->setSpacing( 2 ); @@ -457,7 +457,7 @@ void KookaPreferences::slotApply( void ) /* ** startup options ** */ /** write the global one, to read from libkscan also */ - konf->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + konf->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); bool cbVal = !(cbShowScannerSelection->isChecked()); kdDebug(28000) << "Writing for " << STARTUP_SKIP_ASK << ": " << cbVal << endl; konf->writeEntry( STARTUP_SKIP_ASK, cbVal, true, true ); /* global flag goes to kdeglobals */ @@ -532,8 +532,8 @@ void KookaPreferences::slotDefault( void ) m_tileSelector->setURL( KURL(bgImg) ); m_thumbWidth->setValue( 100 ); m_thumbHeight->setValue( 120 ); - TQColor col1 = TQColor( colorGroup().base()); - TQColor col2 = TQColor( colorGroup().foreground()); + TQColor col1 = TQColor( tqcolorGroup().base()); + TQColor col2 = TQColor( tqcolorGroup().foreground()); m_frameWidth->setValue( 3 ); m_colButt1->setColor( col1 ); diff --git a/kooka/kookapref.h b/kooka/kookapref.h index 46f27bb4..e199fabd 100644 --- a/kooka/kookapref.h +++ b/kooka/kookapref.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ #ifndef KOOKAPREF_H @@ -47,6 +47,7 @@ class TQCheckBox; class KookaPreferences : public KDialogBase { Q_OBJECT + TQ_OBJECT public: KookaPreferences(); static TQString tryFindGocr( void ); diff --git a/kooka/kookaprint.cpp b/kooka/kookaprint.cpp index 5dad1f33..829cd8a5 100644 --- a/kooka/kookaprint.cpp +++ b/kooka/kookaprint.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -112,7 +112,7 @@ bool KookaPrint::printImage( KookaImage *img ) kdDebug(28000) << "Scaling to printer size " << newWidth << " x " << newHeight << endl; - tmpImg = img->smoothScale(newWidth, newHeight, TQImage::ScaleFree); + tmpImg = img->smoothScale(newWidth, newHeight, TQ_ScaleFree); TQSize sz = tmpImg.size(); // the current image size TQSize maxOnPage = maxPageSize(); // the maximum space on one side @@ -177,7 +177,7 @@ void KookaPrint::printFittingToPage(KookaImage *img) newHeight = int( double( img->height() ) * hAspect ); } - tmpImg = img->smoothScale(newWidth, newHeight, TQImage::ScaleFree); + tmpImg = img->smoothScale(newWidth, newHeight, TQ_ScaleFree); m_painter->drawImage( 0,0, tmpImg ); @@ -201,7 +201,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) int start = 0; const int radius=20; - TQColor brushColor( Qt::red ); + TQColor brushColor( TQt::red ); int toffX=0; int toffY=0; TQString numStr = TQString::number(num); @@ -215,7 +215,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) { case SW: start = -90; - brushColor = Qt::green; + brushColor = TQt::green; toffX =-1; toffY = 1; textXOff = -1*textWidth; @@ -223,7 +223,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) break; case NW: start = -180; - brushColor = Qt::blue; + brushColor = TQt::blue; toffX =-1; toffY =-1; textXOff = -1*textWidth; @@ -231,7 +231,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) break; case NO: start = -270; - brushColor = Qt::yellow; + brushColor = TQt::yellow; toffX = 1; toffY = -1; textXOff = -1*textWidth; @@ -240,7 +240,7 @@ void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir ) break; case SO: start = 0; - brushColor = Qt::magenta; + brushColor = TQt::magenta; toffX = 1; toffY = 1; textXOff = -1*textWidth; diff --git a/kooka/kookaprint.h b/kooka/kookaprint.h index 0373b642..d1470251 100644 --- a/kooka/kookaprint.h +++ b/kooka/kookaprint.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -52,9 +52,10 @@ private: }; -class KookaPrint:public QObject +class KookaPrint:public TQObject { Q_OBJECT + TQ_OBJECT public: KookaPrint(KPrinter*); diff --git a/kooka/kookarc b/kooka/kookarc index 13875fff..a604a280 100644 --- a/kooka/kookarc +++ b/kooka/kookarc @@ -2,17 +2,17 @@ Kookas MainDock,Preview ,Thumbs:first_name=Kookas MainDock,Preview\s Kookas MainDock,Preview ,Thumbs:last_name=Thumbs Kookas MainDock,Preview ,Thumbs:orientation=0 -Kookas MainDock,Preview ,Thumbs:parent=yes +Kookas MainDock,Preview ,Thumbs:tqparent=yes Kookas MainDock,Preview ,Thumbs:sepPos=72 Kookas MainDock,Preview ,Thumbs:stayButton=false Kookas MainDock,Preview ,Thumbs:type=GROUP Kookas MainDock,Preview :curTab=0 -Kookas MainDock,Preview :parent=yes +Kookas MainDock,Preview :tqparent=yes Kookas MainDock,Preview :stayButton=false Kookas MainDock,Preview :tabNames=Kookas MainDock,Preview\s Kookas MainDock,Preview :type=TAB_GROUP Kookas MainDock,Thumbs,Preview :curTab=1 -Kookas MainDock,Thumbs,Preview :parent=yes +Kookas MainDock,Thumbs,Preview :tqparent=yes Kookas MainDock,Thumbs,Preview :stayButton=false Kookas MainDock,Thumbs,Preview :tabNames=Kookas MainDock,Thumbs,Preview\s Kookas MainDock,Thumbs,Preview :type=TAB_GROUP @@ -20,7 +20,7 @@ Kookas MainDock,Thumbs:curTab=1 Kookas MainDock,Thumbs:first_name=Kookas MainDock Kookas MainDock,Thumbs:last_name=Thumbs Kookas MainDock,Thumbs:orientation=0 -Kookas MainDock,Thumbs:parent=yes +Kookas MainDock,Thumbs:tqparent=yes Kookas MainDock,Thumbs:sepPos=54 Kookas MainDock,Thumbs:stayButton=false Kookas MainDock,Thumbs:tabNames=Kookas MainDock,Thumbs @@ -35,28 +35,28 @@ NameList=Kookas MainDock,Thumbs,Scanpackager,Recent,Scan Parameter,Preview ,Kook Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:first_name=Preview ,Scanpackager,Recent,Scan Parameter Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:last_name=Kookas MainDock,Thumbs Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:orientation=1 -Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:parent=yes +Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:tqparent=yes Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:sepPos=38 Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:stayButton=false Preview ,Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs:type=GROUP Preview ,Scanpackager,Recent,Scan Parameter:first_name=Preview ,Scanpackager,Recent Preview ,Scanpackager,Recent,Scan Parameter:last_name=Scan Parameter Preview ,Scanpackager,Recent,Scan Parameter:orientation=0 -Preview ,Scanpackager,Recent,Scan Parameter:parent=yes +Preview ,Scanpackager,Recent,Scan Parameter:tqparent=yes Preview ,Scanpackager,Recent,Scan Parameter:sepPos=50 Preview ,Scanpackager,Recent,Scan Parameter:stayButton=false Preview ,Scanpackager,Recent,Scan Parameter:type=GROUP Preview ,Scanpackager,Recent:first_name=Preview ,Scanpackager Preview ,Scanpackager,Recent:last_name=Recent Preview ,Scanpackager,Recent:orientation=0 -Preview ,Scanpackager,Recent:parent=yes +Preview ,Scanpackager,Recent:tqparent=yes Preview ,Scanpackager,Recent:sepPos=84 Preview ,Scanpackager,Recent:stayButton=false Preview ,Scanpackager,Recent:type=GROUP Preview ,Scanpackager:first_name=Preview\s Preview ,Scanpackager:last_name=Scanpackager Preview ,Scanpackager:orientation=0 -Preview ,Scanpackager:parent=yes +Preview ,Scanpackager:tqparent=yes Preview ,Scanpackager:sepPos=50 Preview ,Scanpackager:stayButton=false Preview ,Scanpackager:type=GROUP @@ -65,7 +65,7 @@ Preview :type=DOCK Recent,Scan Parameter:first_name=Recent Recent,Scan Parameter:last_name=Scan Parameter Recent,Scan Parameter:orientation=0 -Recent,Scan Parameter:parent=yes +Recent,Scan Parameter:tqparent=yes Recent,Scan Parameter:sepPos=14 Recent,Scan Parameter:stayButton=false Recent,Scan Parameter:type=GROUP @@ -76,40 +76,40 @@ Scan Parameter:type=DOCK Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:first_name=Scanpackager,Preview ,Recent,Scan Parameter Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:last_name=Kookas MainDock,Thumbs Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:orientation=1 -Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:parent=yes +Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:tqparent=yes Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:sepPos=38 Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:stayButton=false Scanpackager,Preview ,Recent,Scan Parameter,Kookas MainDock,Thumbs:type=GROUP Scanpackager,Preview ,Recent,Scan Parameter:first_name=Scanpackager,Preview\s Scanpackager,Preview ,Recent,Scan Parameter:last_name=Recent,Scan Parameter Scanpackager,Preview ,Recent,Scan Parameter:orientation=0 -Scanpackager,Preview ,Recent,Scan Parameter:parent=yes +Scanpackager,Preview ,Recent,Scan Parameter:tqparent=yes Scanpackager,Preview ,Recent,Scan Parameter:sepPos=48 Scanpackager,Preview ,Recent,Scan Parameter:stayButton=false Scanpackager,Preview ,Recent,Scan Parameter:type=GROUP Scanpackager,Preview :curTab=0 -Scanpackager,Preview :parent=yes +Scanpackager,Preview :tqparent=yes Scanpackager,Preview :stayButton=false Scanpackager,Preview :tabNames=Scanpackager,Preview\s Scanpackager,Preview :type=TAB_GROUP Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:first_name=Scanpackager,Recent,Scan Parameter Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:last_name=Kookas MainDock,Preview ,Thumbs Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:orientation=1 -Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:parent=yes +Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:tqparent=yes Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:sepPos=41 Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:stayButton=false Scanpackager,Recent,Scan Parameter,Kookas MainDock,Preview ,Thumbs:type=GROUP Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :first_name=Scanpackager,Recent,Scan Parameter Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :last_name=Kookas MainDock,Thumbs,Preview\s Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :orientation=1 -Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :parent=yes +Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :tqparent=yes Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :sepPos=38 Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :stayButton=false Scanpackager,Recent,Scan Parameter,Kookas MainDock,Thumbs,Preview :type=GROUP Scanpackager,Recent,Scan Parameter:first_name=Scanpackager Scanpackager,Recent,Scan Parameter:last_name=Recent,Scan Parameter Scanpackager,Recent,Scan Parameter:orientation=0 -Scanpackager,Recent,Scan Parameter:parent=yes +Scanpackager,Recent,Scan Parameter:tqparent=yes Scanpackager,Recent,Scan Parameter:sepPos=42 Scanpackager,Recent,Scan Parameter:stayButton=false Scanpackager,Recent,Scan Parameter:type=GROUP diff --git a/kooka/kookaview.cpp b/kooka/kookaview.cpp index 2843535f..fb0d57fc 100644 --- a/kooka/kookaview.cpp +++ b/kooka/kookaview.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -82,7 +82,7 @@ #define STARTUP_IMG_SELECTION "SelectedImageOnStartup" -KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToUse) +KookaView::KookaView( KParts::DockMainWindow *tqparent, const TQCString& deviceToUse) : TQObject(), m_ocrResultImg(0), ocrFabric(0), @@ -93,21 +93,21 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU m_dockRecent(0), m_dockPreview(0), m_dockOCRText(0), - m_mainWindow(parent), + m_mainWindow(tqparent), m_ocrResEdit(0) { KIconLoader *loader = KGlobal::iconLoader(); scan_params = 0L; preview_canvas = 0L; - m_mainDock = parent->createDockWidget( "Kookas MainDock", + m_mainDock = tqparent->createDockWidget( "Kookas MainDock", loader->loadIcon( "folder_image", KIcon::Small ), 0L, i18n("Image Viewer")); m_mainDock->setEnableDocking(KDockWidget::DockNone ); m_mainDock->setDockSite( KDockWidget::DockFullSite ); - parent->setView( m_mainDock); - parent->setMainDockWidget( m_mainDock); + tqparent->setView( m_mainDock); + tqparent->setMainDockWidget( m_mainDock); img_canvas = new ImageCanvas( m_mainDock ); img_canvas->setMinimumSize(100,200); @@ -121,7 +121,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU m_mainDock->setWidget( img_canvas ); /** Thumbview **/ - m_dockThumbs = parent->createDockWidget( "Thumbs", + m_dockThumbs = tqparent->createDockWidget( "Thumbs", loader->loadIcon( "thumbnail", KIcon::Small ), 0L, i18n("Thumbnails")); m_dockThumbs->setDockSite(KDockWidget::DockFullSite ); @@ -136,7 +136,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU /** Packager Dock **/ /* A new packager to contain the already scanned images */ - m_dockPackager = parent->createDockWidget( "Scanpackager", + m_dockPackager = tqparent->createDockWidget( "Scanpackager", loader->loadIcon( "palette_color", KIcon::Small ), 0L, i18n("Gallery")); m_dockPackager->setDockSite(KDockWidget::DockFullSite); @@ -155,7 +155,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU /* * Create a Kombobox that holds the last folders visible even on the preview page */ - m_dockRecent = parent->createDockWidget( "Recent", + m_dockRecent = tqparent->createDockWidget( "Recent", loader->loadIcon( "image", KIcon::Small ), 0L, i18n("Gallery Folders")); @@ -164,7 +164,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU TQHBox *recentBox = new TQHBox( m_dockRecent ); recentBox->setMargin(KDialog::marginHint()); TQLabel *lab = new TQLabel( i18n("Gallery:"), recentBox ); - lab->setSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed) ); + lab->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed) ); recentFolder = new ImageNameCombo( recentBox ); m_dockRecent->setWidget( recentBox ); @@ -184,14 +184,14 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU packager, TQT_SLOT(slotSelectDirectory( const TQString& ))); /* the object from the kscan lib to handle low level scanning */ - m_dockScanParam = parent->createDockWidget( "Scan Parameter", + m_dockScanParam = tqparent->createDockWidget( "Scan Parameter", loader->loadIcon( "folder", KIcon::Small ), 0L, i18n("Scan Parameter")); // m_dockScanParam->setDockSite(KDockWidget::DockFullSite); m_dockScanParam->setWidget( 0 ); // later - sane = new KScanDevice( m_dockScanParam ); + sane = new KScanDevice( TQT_TQOBJECT(m_dockScanParam) ); Q_CHECK_PTR(sane); m_dockScanParam->manualDock( m_dockRecent, // dock target @@ -203,7 +203,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU * the complete scanner options dialog * scan_params must be zero for that */ - m_dockPreview = parent->createDockWidget( "Preview ", + m_dockPreview = tqparent->createDockWidget( "Preview ", loader->loadIcon( "viewmag", KIcon::Small ), 0L, i18n("Scan Preview")); @@ -222,7 +222,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU /* Create a text editor part for ocr results */ - m_dockOCRText = parent->createDockWidget( "OCRResults", + m_dockOCRText = tqparent->createDockWidget( "OCRResults", loader->loadIcon("edit", KIcon::Small ), 0L, i18n("OCR Result Text")); // m_textEdit @@ -235,7 +235,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU KDockWidget::DockCenter, // dock site 100 ); // relation target/this (in percent) - m_ocrResEdit->setTextFormat( Qt::PlainText ); + m_ocrResEdit->setTextFormat( TQt::PlainText ); m_ocrResEdit->setWordWrap( TQTextEdit::NoWrap ); // m_dockOCRText->hide(); } @@ -277,7 +277,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU packager->openRoots(); - /* Status Bar */ + /* tqStatus Bar */ KStatusBar *statBar = m_mainWindow->statusBar(); // statBar->insertItem(TQString("1"), SBAR_ZOOM, 0, true ); @@ -472,7 +472,7 @@ void KookaView::print() printer.setUsePrinterResolution(true); printer.addDialogPage( new ImgPrintDialog( img )); - if( printer.setup( m_mainWindow, i18n("Print %1").arg(img->localFileName().section('/', -1)) )) + if( printer.setup( m_mainWindow, i18n("Print %1").tqarg(img->localFileName().section('/', -1)) )) { KookaPrint kookaprint( &printer ); kookaprint.printImage(img); @@ -564,8 +564,8 @@ void KookaView::startOCR( KookaImage *img ) connect( ocrFabric, TQT_SIGNAL( newOCRResultText( const TQString& )), m_dockOCRText, TQT_SLOT( show() )); - connect( ocrFabric, TQT_SIGNAL( repaintOCRResImage( )), - img_canvas, TQT_SLOT(repaint())); + connect( ocrFabric, TQT_SIGNAL( tqrepaintOCRResImage( )), + img_canvas, TQT_SLOT(tqrepaint())); connect( ocrFabric, TQT_SIGNAL( clearOCRResultText()), m_ocrResEdit, TQT_SLOT(clear())); @@ -626,7 +626,7 @@ void KookaView::slScanStart( ) KLed *led = scan_params->operationLED(); if( led ) { - led->setColor( Qt::red ); + led->setColor( TQt::red ); led->setState( KLed::On ); } } @@ -640,7 +640,7 @@ void KookaView::slAcquireStart( ) KLed *led = scan_params->operationLED(); if( led ) { - led->setColor( Qt::green ); + led->setColor( TQt::green ); } } } @@ -663,7 +663,7 @@ void KookaView::slScanFinished( KScanStat stat ) KLed *led = scan_params->operationLED(); if( led ) { - led->setColor( Qt::green ); + led->setColor( TQt::green ); led->setState( KLed::Off ); } } @@ -842,7 +842,7 @@ void KookaView::slShowAImage( KookaImage *img ) ocrFabric->slSetImage( img ); } - /* Status Bar */ + /* tqStatus Bar */ KStatusBar *statBar = m_mainWindow->statusBar(); if( img_canvas ) statBar->changeItem( img_canvas->imageInfoString(), StatusImage ); @@ -876,7 +876,7 @@ void KookaView::slShowThumbnails(KFileTreeViewItem *dirKfi, bool forceRedraw ) } else { - kftvi = static_cast<KFileTreeViewItem*>(static_cast<TQListViewItem*>(kftvi)->parent()); + kftvi = static_cast<KFileTreeViewItem*>(static_cast<TQListViewItem*>(kftvi)->tqparent()); dirKfi = kftvi; forceRedraw = true; packager->setSelected( static_cast<TQListViewItem*>(dirKfi), true ); @@ -913,7 +913,7 @@ void KookaView::slShowThumbnails(KFileTreeViewItem *dirKfi, bool forceRedraw ) */ void KookaView::slStartLoading( const KURL& url ) { - emit( signalChangeStatusbar( i18n("Loading %1" ).arg( url.prettyURL() ) )); + emit( signalChangeStatusbar( i18n("Loading %1" ).tqarg( url.prettyURL() ) )); // if( m_stack->visibleWidget() != img_canvas ) // { diff --git a/kooka/kookaview.h b/kooka/kookaview.h index 10017e88..21d5509a 100644 --- a/kooka/kookaview.h +++ b/kooka/kookaview.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ #ifndef KOOKAVIEW_H @@ -66,9 +66,10 @@ class ocrResEdit; * @author Klaas Freitag <freitag@suse.de> * @version 0.1 */ -class KookaView : public QObject +class KookaView : public TQObject { Q_OBJECT + TQ_OBJECT public: typedef enum { MirrorVertical, MirrorHorizontal, MirrorBoth } MirrorType; typedef enum { StatusTemp, StatusImage } StatusBarIDs; @@ -76,7 +77,7 @@ public: /** * Default constructor */ - KookaView(KParts::DockMainWindow *parent, const TQCString& deviceToUse); + KookaView(KParts::DockMainWindow *tqparent, const TQCString& deviceToUse); /** * Destructor diff --git a/kooka/ksaneocr.cpp b/kooka/ksaneocr.cpp index 365624c6..709b1f1f 100644 --- a/kooka/ksaneocr.cpp +++ b/kooka/ksaneocr.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -183,26 +183,26 @@ void KSANEOCR::slLineBox( const TQRect& ) * starts visual ocr process. Depending on the ocr engine, this function creates * a new dialog, and shows it. */ -bool KSANEOCR::startOCRVisible( TQWidget *parent ) +bool KSANEOCR::startOCRVisible( TQWidget *tqparent ) { if( visibleOCRRunning ) return( false ); bool res = true; - m_parent = parent; + m_parent = tqparent; if( m_ocrEngine == GOCR ) { - m_ocrProcessDia = new KGOCRDialog ( parent, m_spellInitialConfig ); + m_ocrProcessDia = new KGOCRDialog ( tqparent, m_spellInitialConfig ); } else if( m_ocrEngine == OCRAD ) { - m_ocrProcessDia = new ocradDialog( parent, m_spellInitialConfig ); + m_ocrProcessDia = new ocradDialog( tqparent, m_spellInitialConfig ); } else if( m_ocrEngine == KADMOS ) { #ifdef HAVE_KADMOS /*** Kadmos Engine OCR ***/ - m_ocrProcessDia = new KadmosDialog( parent, m_spellInitialConfig ); + m_ocrProcessDia = new KadmosDialog( tqparent, m_spellInitialConfig ); #else KMessageBox::sorry(0, i18n("This version of Kooka was not compiled with KADMOS support.\n" "Please select another OCR engine in Kooka's options dialog.")); @@ -399,9 +399,9 @@ void KSANEOCR::startOCRAD( ) *daemon << cmd; *daemon << TQString("-x"); *daemon << m_tmpOrfName; // the orf result file - *daemon << TQFile::encodeName( m_ocrImagePBM ); // The name of the image + *daemon << TQFile::encodeName( m_ocrImagePBM ).data(); // The name of the image *daemon << TQString("-l"); - *daemon << TQString::number( ocrDia->layoutDetectionMode()); + *daemon << TQString::number( ocrDia->tqlayoutDetectionMode()); KConfig *konf = KGlobal::config (); KConfigGroupSaver( konf, CFG_GROUP_OCRAD ); @@ -543,7 +543,7 @@ void KSANEOCR::startOCRProcess( void ) this, TQT_SLOT( gocrStdErr(KProcess*, char*, int))); TQString opt; - *daemon << TQFile::encodeName(cmd); + *daemon << TQFile::encodeName(cmd).data(); *daemon << "-x"; *daemon << "-"; if( !( m_img->numColors() > 0 && m_img->numColors() <3 )) /* not a bw-image */ @@ -566,7 +566,7 @@ void KSANEOCR::startOCRProcess( void ) // Unfortunately this is fixed by gocr. m_ocrResultImage = "out30.bmp"; - *daemon << TQFile::encodeName(tmpFile); + *daemon << TQFile::encodeName(tmpFile).data(); m_ocrCurrLine = 0; // Important in gocrStdIn to store the results @@ -631,7 +631,7 @@ void KSANEOCR::startOCRProcess( void ) // rep.Recognize(); m_rep.run(); - /* Dealing with threads or no threads (using QT_THREAD_SUPPORT to distinguish) + /* Dealing with threads or no threads (using TQT_THREAD_SUPPORT to distinguish) * If threads are here, the recognition task is started in its own thread. The gui thread * needs to wait until the recognition thread is finished. Therefore, a timer is fired once * that calls slotKadmosResult and checks if the recognition task is finished. If it is not, @@ -647,7 +647,7 @@ void KSANEOCR::startOCRProcess( void ) * It does not :( That is why it is not used here. Maybe some day... */ } -#ifdef QT_THREAD_SUPPORT +#ifdef TQT_THREAD_SUPPORT /* start a timer and wait until it fires. */ TQTimer::singleShot( 500, this, TQT_SLOT( slotKadmosResult() )); #else @@ -660,7 +660,7 @@ void KSANEOCR::startOCRProcess( void ) /* * This method is called to check if the kadmos process was already finished, if - * thread support is enabled (check for preprocessor variable QT_THREAD_SUPPORT) + * thread support is enabled (check for preprocessor variable TQT_THREAD_SUPPORT) * The problem is that the kadmos library seems not to be thread stable so thread * support should not be enabled by default. In case threads are enabled, this slot * checks if the KADMOS engine is finished already and if not it fires a timer. @@ -814,11 +814,11 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr ) TQFileInfo fi( fileName ); if( ! fi.exists() ) { error = true; - errStr = i18n("The orf %1 does not exist.").arg(fileName); + errStr = i18n("The orf %1 does not exist.").tqarg(fileName); } if( ! error && ! fi.isReadable() ) { error = true; - errStr = i18n("Permission denied on file %1.").arg(fileName); + errStr = i18n("Permission denied on file %1.").tqarg(fileName); } @@ -890,7 +890,7 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr ) { /* Read one line per character */ TQString charLine = stream.readLine(); - int semiPos = charLine.find(';'); + int semiPos = charLine.tqfind(';'); if( semiPos == -1 ) { kdDebug(28000) << "invalid line: " << charLine << endl; @@ -906,7 +906,7 @@ bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr ) // find the amount of alternatives. int altCount = 0; - int h = results.find(','); // search the first comma + int h = results.tqfind(','); // search the first comma if( h > -1 ) { // kdDebug(28000) << "Results of count search: " << results.left(h) << endl; altCount = results.left(h).toInt(); @@ -1127,7 +1127,7 @@ bool KSANEOCR::eventFilter( TQObject *object, TQEvent *event ) { if( event->type() == TQEvent::MouseButtonDblClick ) { - TQMouseEvent *mev = static_cast<TQMouseEvent*>(event); + TQMouseEvent *mev = TQT_TQMOUSEEVENT(event); int x = mev->x(); int y = mev->y(); @@ -1328,7 +1328,7 @@ void KSANEOCR::slMisspelling( const TQString& originalword, const TQStringList& /* draw a line under the word to check */ /* copy the source */ - emit repaintOCRResImage(); + emit tqrepaintOCRResImage(); } else { diff --git a/kooka/ksaneocr.h b/kooka/ksaneocr.h index fabb25e8..4996819a 100644 --- a/kooka/ksaneocr.h +++ b/kooka/ksaneocr.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -72,16 +72,17 @@ class KConfig; */ typedef enum{ ENG_ERROR, ENG_OK, ENG_DATA_MISSING, ENG_BAD_SETUP } EngineError; -class KSANEOCR : public QObject +class KSANEOCR : public TQObject { Q_OBJECT + TQ_OBJECT public: enum OCREngines{ GOCR, OCRAD, KADMOS }; KSANEOCR( TQWidget*, KConfig *); ~KSANEOCR(); - bool startOCRVisible( TQWidget* parent=0); + bool startOCRVisible( TQWidget* tqparent=0); void finishedOCRVisible( bool ); @@ -161,7 +162,7 @@ signals: /** * signal the tells that the result image was modified. */ - void repaintOCRResImage( ); + void tqrepaintOCRResImage( ); /** * indicates that the text editor holding the text that came through diff --git a/kooka/main.cpp b/kooka/main.cpp index 67f014c9..f0f3c32a 100644 --- a/kooka/main.cpp +++ b/kooka/main.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -58,8 +58,8 @@ static const char license[] = "Kreuzlingen and distribute the resulting executable without\n" "including the source code for KADMOS in the source distribution.\n\n" "As a special exception, permission is given to link this program\n" -"with any edition of Qt, and distribute the resulting executable,\n" -"without including the source code for Qt in the source distribution.\n"; +"with any edition of TQt, and distribute the resulting executable,\n" +"without including the source code for TQt in the source distribution.\n"; static KCmdLineOptions options[] = diff --git a/kooka/ocrresedit.cpp b/kooka/ocrresedit.cpp index a8d842a1..8465d09c 100644 --- a/kooka/ocrresedit.cpp +++ b/kooka/ocrresedit.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ #include <tqcolor.h> @@ -36,8 +36,8 @@ /* -------------------- ocrResEdit -------------------- */ -ocrResEdit::ocrResEdit( TQWidget *parent ) - : TQTextEdit(parent) +ocrResEdit::ocrResEdit( TQWidget *tqparent ) + : TQTextEdit(tqparent) { m_updateColor.setNamedColor( "SeaGreen"); m_ignoreColor.setNamedColor( "CadetBlue4" ); @@ -75,11 +75,11 @@ void ocrResEdit::slSelectWord( int line, const ocrWord& word ) if( line < paragraphs() ) { TQString editLine = text(line); - int cnt = editLine.contains( word); + int cnt = editLine.tqcontains( word); if( cnt > 0 ) { - int pos = editLine.find(word); + int pos = editLine.tqfind(word); setCursorPosition( line, pos ); setSelection( line, pos, line, pos + word.length()); } @@ -96,11 +96,11 @@ void ocrResEdit::slReplaceWord( int line, const TQString& wordFrom, if( line < paragraphs() ) { TQString editLine = text(line); - int cnt = editLine.contains( wordFrom ); + int cnt = editLine.tqcontains( wordFrom ); if( cnt > 0 ) { - int pos = editLine.find(wordFrom); + int pos = editLine.tqfind(wordFrom); setSelection( line, pos, line, pos+wordFrom.length()); TQColor saveCol = this->color(); diff --git a/kooka/ocrresedit.h b/kooka/ocrresedit.h index 19191266..f7e40dca 100644 --- a/kooka/ocrresedit.h +++ b/kooka/ocrresedit.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -33,11 +33,12 @@ class TQString; class TQColor; class ocrWord; -class ocrResEdit : public QTextEdit +class ocrResEdit : public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - ocrResEdit( TQWidget *parent ); + ocrResEdit( TQWidget *tqparent ); public slots: void slUpdateOCRResult( int line, const TQString& wordFrom, diff --git a/kooka/ocrword.cpp b/kooka/ocrword.cpp index 4b04ea6e..2260e770 100644 --- a/kooka/ocrword.cpp +++ b/kooka/ocrword.cpp @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -76,7 +76,7 @@ TQStringList ocrWordList::stringList() * decided. Solution: KSpell should treat dash-linked words correctly. * We live with the problem here that dashes bring confusion ;-) */ - if( (*it).contains( rx ) ) + if( (*it).tqcontains( rx ) ) res += TQStringList::split( rx, (*it) ); else #endif @@ -95,9 +95,9 @@ bool ocrWordList::updateOCRWord( const TQString& from, const TQString& to ) { TQString word = (*it); kdDebug(28000) << "updateOCRWord in list: Comparing word " << word << endl; - if( word.contains( from, true ) ) // case sensitive search + if( word.tqcontains( from, true ) ) // case sensitive search { - word.replace( from, to ); + word.tqreplace( from, to ); *it = ocrWord( word ); res = true; break; diff --git a/kooka/ocrword.h b/kooka/ocrword.h index fd906367..5fbc209e 100644 --- a/kooka/ocrword.h +++ b/kooka/ocrword.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -37,7 +37,7 @@ class TQRect; /* ==== ocrWord ====================================== */ -class ocrWord : public QString +class ocrWord : public TQString { public: ocrWord(const TQString& s); diff --git a/kooka/resource.h b/kooka/resource.h index 51c9488f..687a7ddc 100644 --- a/kooka/resource.h +++ b/kooka/resource.h @@ -20,8 +20,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -52,7 +52,7 @@ #define ID_FILE_PRINT 10080 -#define ID_FILE_QUIT 10100 +#define ID_FILE_TQUIT 10100 /////////////////////////////////////////////////////////////////// diff --git a/kooka/scanpackager.cpp b/kooka/scanpackager.cpp index 2dd3096b..230acae1 100644 --- a/kooka/scanpackager.cpp +++ b/kooka/scanpackager.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -71,7 +71,7 @@ /* ----------------------------------------------------------------------- */ /* Constructor Scan Packager */ -ScanPackager::ScanPackager( TQWidget *parent ) : KFileTreeView( parent ) +ScanPackager::ScanPackager( TQWidget *tqparent ) : KFileTreeView( tqparent ) { // TODO: setItemsRenameable (true ); @@ -245,7 +245,7 @@ void ScanPackager::slotDecorate( KFileTreeViewItem* item ) } /* set image size in pixels */ - TQString t = i18n( "%1 x %2" ).arg( img->width()).arg(img->height()); + TQString t = i18n( "%1 x %2" ).tqarg( img->width()).tqarg(img->height()); item->setText( 1, t ); kdDebug( 28000) << "Image loaded and decorated!" << endl; } @@ -412,7 +412,7 @@ TQString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relati if( ! item ) { kdDebug(28000) << "ERR: itemDirectory without item" << endl; - return TQString::null; + return TQString(); } TQString relativUrl= (item->url()).prettyURL(); @@ -420,7 +420,7 @@ TQString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relati if( ! item->isDir() ) { // Cut off the filename in case it is not a dir - relativUrl.truncate( relativUrl.findRev( '/' )+1); + relativUrl.truncate( relativUrl.tqfindRev( '/' )+1); } else { @@ -463,8 +463,8 @@ void ScanPackager::slotSelectDirectory( const TQString & dirString ) { kdDebug(28000) << "Trying to decode directory string " << dirString << endl; - TQString searchFor = TQString::fromLatin1(" - "); - int pos = dirString.find( searchFor ); + TQString searchFor = TQString::tqfromLatin1(" - "); + int pos = dirString.tqfind( searchFor ); if( pos > -1 ) { @@ -531,7 +531,7 @@ void ScanPackager::slClicked( TQListViewItem *newItem ) } else { - emit( showThumbnails( static_cast<KFileTreeViewItem*>(item->parent()))); + emit( showThumbnails( static_cast<KFileTreeViewItem*>(item->tqparent()))); } } else @@ -600,7 +600,7 @@ void ScanPackager::loadImageForItem( KFileTreeViewItem *item ) prevItem = subImgItem; subImgItem->setPixmap( 0, loader->loadIcon( "editcopy", KIcon::Small )); - subImgItem->setText( 0, i18n("Sub-image %1").arg( i ) ); + subImgItem->setText( 0, i18n("Sub-image %1").tqarg( i ) ); KookaImage *subImgImg = new KookaImage( i, img ); subImgImg->setFileItem( newKfi ); newKfi->setExtraData( (void*) this, (void*) subImgImg ); @@ -711,7 +711,7 @@ TQCString ScanPackager::getImgFormat( KFileTreeViewItem* item ) const TQString ScanPackager::localFileName( KFileTreeViewItem *it ) const { - if( ! it ) return( TQString::null ); + if( ! it ) return( TQString() ); KURL url = it->url(); @@ -853,15 +853,15 @@ void ScanPackager::slAddImage( TQImage *img, KookaImageMeta* ) m_nextUrlToShow = lurl; TQString s; - /* Count amount of children of the father */ - TQListViewItem *paps = curr->parent(); + /* Count amount of tqchildren of the father */ + TQListViewItem *paps = curr->tqparent(); if( curr->isDir() ) /* take only father if the is no directory */ paps = curr; if( paps ) { int childcount = paps->childCount(); - s = i18n("%1 images").arg(childcount); + s = i18n("%1 images").tqarg(childcount); paps->setText( 1, s); setOpen( paps, true ); } @@ -1012,7 +1012,7 @@ void ScanPackager::slotImportFile() if( ! curr->isDir() ) { - KFileTreeViewItem *pa = static_cast<KFileTreeViewItem*>(curr->parent()); + KFileTreeViewItem *pa = static_cast<KFileTreeViewItem*>(curr->tqparent()); impTarget = pa->url(); } kdDebug(28000) << "Importing to " << impTarget.url() << endl; @@ -1136,7 +1136,7 @@ void ScanPackager::slotDeleteItems( ) s = i18n("Do you really want to delete this image?\nIt cannot be restored!" ); if( item->isDir() ) { - s = i18n("Do you really want to delete the folder %1\nand all the images inside?").arg(""); + s = i18n("Do you really want to delete the folder %1\nand all the images inside?").tqarg(""); } result = KMessageBox::warningContinueCancel(this, s, i18n( "Delete Collection Item"), KStdGuiItem::del(), "AskForDeleteFiles" ); @@ -1168,7 +1168,7 @@ void ScanPackager::slotCreateFolder( ) { bool ok; TQString folder = KInputDialog::getText( i18n( "New Folder" ), - i18n( "Please enter a name for the new folder:" ), TQString::null, + i18n( "Please enter a name for the new folder:" ), TQString(), &ok, this ); if( ok ) @@ -1214,7 +1214,7 @@ TQString ScanPackager::getImgName( TQString name_on_disk ) TQString s; (void) name_on_disk; - s = i18n("image %1").arg(img_counter++); + s = i18n("image %1").tqarg(img_counter++); return( s ); } @@ -1239,12 +1239,12 @@ void ScanPackager::contentsDragMoveEvent( TQDragMoveEvent *e ) } TQListViewItem *afterme = 0; - TQListViewItem *parent = 0; + TQListViewItem *tqparent = 0; - findDrop( e->pos(), parent, afterme ); + findDrop( e->pos(), tqparent, afterme ); // "afterme" is 0 when aiming at a directory itself - TQListViewItem *item = afterme ? afterme : parent; + TQListViewItem *item = afterme ? afterme : tqparent; if( item ) { diff --git a/kooka/scanpackager.h b/kooka/scanpackager.h index 496d6dee..c50c4d56 100644 --- a/kooka/scanpackager.h +++ b/kooka/scanpackager.h @@ -19,8 +19,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -74,8 +74,9 @@ private: class ScanPackager : public KFileTreeView { Q_OBJECT + TQ_OBJECT public: - ScanPackager( TQWidget *parent); + ScanPackager( TQWidget *tqparent); ~ScanPackager(); virtual TQString getImgName( TQString name_on_disk ); @@ -142,7 +143,7 @@ private: KFileTreeViewItem *spFindItem( SearchType type, const TQString name, const KFileTreeBranch* branch = 0 ); TQString itemDirectory( const KFileTreeViewItem*, bool relativ = false ) const; - // int readDir( TQListViewItem *parent, TQString dir_to_read ); + // int readDir( TQListViewItem *tqparent, TQString dir_to_read ); void showContextMenu( TQPoint p, bool show_folder = true ); TQString m_currImportDir; diff --git a/kooka/thumbview.cpp b/kooka/thumbview.cpp index b085e197..60312bad 100644 --- a/kooka/thumbview.cpp +++ b/kooka/thumbview.cpp @@ -22,8 +22,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -47,8 +47,8 @@ -ThumbView::ThumbView( TQWidget *parent, const char *name ) - : TQVBox( parent ), +ThumbView::ThumbView( TQWidget *tqparent, const char *name ) + : TQVBox( tqparent ), m_iconView(0), m_job(0) { @@ -91,14 +91,14 @@ bool ThumbView::readSettings() bool dirty = false; TQColor color; - color = cfg->readColorEntry( MARGIN_COLOR1, &(colorGroup().base())); + color = cfg->readColorEntry( MARGIN_COLOR1, &(tqcolorGroup().base())); if( color != m_marginColor1 ) { dirty = true; m_marginColor1 = color; } - color = cfg->readColorEntry( MARGIN_COLOR2, &(colorGroup().foreground())); + color = cfg->readColorEntry( MARGIN_COLOR2, &(tqcolorGroup().foreground())); if( color != m_marginColor2 ) { dirty = true; @@ -238,7 +238,7 @@ void ThumbView::slCheckForUpdate( KFileItem *kfit ) bool haveItem = false; /* iterate over all icon items and compare urls. - * TODO: Check the parent url to avoid iteration over all */ + * TODO: Check the tqparent url to avoid iteration over all */ for ( TQIconViewItem *item = m_iconView->firstItem(); item && !haveItem; item = item->nextItem() ) { @@ -269,7 +269,7 @@ bool ThumbView::deleteImage( KFileItem *kfit ) bool haveItem = false; /* iterate over all icon items and compare urls. - * TODO: Check the parent url to avoid iteration over all */ + * TODO: Check the tqparent url to avoid iteration over all */ for ( TQIconViewItem *item = m_iconView->firstItem(); item && !haveItem; item = item->nextItem() ) { if( searchUrl == static_cast<ThumbViewItem*>(item)->itemUrl() ) diff --git a/kooka/thumbview.h b/kooka/thumbview.h index e1bc78cb..52b2bf05 100644 --- a/kooka/thumbview.h +++ b/kooka/thumbview.h @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -59,10 +59,11 @@ class KIO::PreviewJob; class ThumbView: public TQVBox /* KIconView */ { Q_OBJECT + TQ_OBJECT public: - ThumbView( TQWidget *parent, const char *name=0 ); + ThumbView( TQWidget *tqparent, const char *name=0 ); ~ThumbView(); void setCurrentDir( const KURL& s) diff --git a/kooka/thumbviewitem.cpp b/kooka/thumbviewitem.cpp index c8f8dab3..fe62e7e8 100644 --- a/kooka/thumbviewitem.cpp +++ b/kooka/thumbviewitem.cpp @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -32,10 +32,10 @@ #include "thumbview.h" #include "thumbviewitem.h" -ThumbViewItem::ThumbViewItem(TQIconView *parent, const TQString &text, +ThumbViewItem::ThumbViewItem(TQIconView *tqparent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi ) - :KFileIconViewItem( parent, text, pixmap,fi ) + :KFileIconViewItem( tqparent, text, pixmap,fi ) { } diff --git a/kooka/thumbviewitem.h b/kooka/thumbviewitem.h index 74dad84b..5bf829dd 100644 --- a/kooka/thumbviewitem.h +++ b/kooka/thumbviewitem.h @@ -21,8 +21,8 @@ * including the source code for KADMOS in the source distribution. * * * As a special exception, permission is given to link this program * - * with any edition of Qt, and distribute the resulting executable, * - * without including the source code for Qt in the source distribution. * + * with any edition of TQt, and distribute the resulting executable, * + * without including the source code for TQt in the source distribution. * * * ***************************************************************************/ @@ -41,7 +41,7 @@ class KFileTreeViewItem; class ThumbViewItem: public KFileIconViewItem { public: - ThumbViewItem( TQIconView *parent, + ThumbViewItem( TQIconView *tqparent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi ); diff --git a/kpdf/conf/dlgaccessibility.ui b/kpdf/conf/dlgaccessibility.ui index a9f6495d..3aa7eb2f 100644 --- a/kpdf/conf/dlgaccessibility.ui +++ b/kpdf/conf/dlgaccessibility.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DlgAccessibility</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DlgAccessibility</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HighlightImages</cstring> </property> @@ -27,7 +27,7 @@ <string>Draw border around &Images</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HighlightLinks</cstring> </property> @@ -35,7 +35,7 @@ <string>Draw border around &Links</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>kcfg_ChangeColors</cstring> </property> @@ -60,7 +60,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>warn</cstring> </property> @@ -86,7 +86,7 @@ <enum>PlainText</enum> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_RenderMode</cstring> </property> @@ -117,7 +117,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioInverted</cstring> </property> @@ -128,7 +128,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioNormal</cstring> </property> @@ -136,9 +136,9 @@ <string>Change &paper color</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -154,14 +154,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -196,7 +196,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -205,7 +205,7 @@ </spacer> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioRecolor</cstring> </property> @@ -213,9 +213,9 @@ <string>&Change dark and light colors</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> @@ -234,7 +234,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> @@ -262,7 +262,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -290,14 +290,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -318,14 +318,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -338,7 +338,7 @@ </widget> </grid> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioContrast</cstring> </property> @@ -346,15 +346,15 @@ <string>Convert to &black and white</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -375,7 +375,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> @@ -392,7 +392,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -409,7 +409,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -426,14 +426,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> </size> </property> </spacer> - <widget class="QSlider" row="1" column="2"> + <widget class="TQSlider" row="1" column="2"> <property name="name"> <cstring>kcfg_BWContrast</cstring> </property> @@ -455,7 +455,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QSlider" row="0" column="2"> + <widget class="TQSlider" row="0" column="2"> <property name="name"> <cstring>kcfg_BWThreshold</cstring> </property> @@ -477,7 +477,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -567,7 +567,7 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="5" margin="11"/> +<tqlayoutdefaults spacing="5" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/kpdf/conf/dlggeneral.ui b/kpdf/conf/dlggeneral.ui index 0319d1b4..e577b81b 100644 --- a/kpdf/conf/dlggeneral.ui +++ b/kpdf/conf/dlggeneral.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DlgGeneral</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DlgGeneral</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -30,15 +30,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowSearchBar</cstring> </property> @@ -49,7 +49,7 @@ <string>Show &search bar in thumbnails list</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_SyncThumbnailsViewport</cstring> </property> @@ -60,7 +60,7 @@ <string>Link the &thumbnails with the page</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowScrollBars</cstring> </property> @@ -68,7 +68,7 @@ <string>Show scroll&bars</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowOSD</cstring> </property> @@ -76,7 +76,7 @@ <string>Show &hints and info messages</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ObeyDRM</cstring> </property> @@ -84,7 +84,7 @@ <string>&Obey DRM limitations</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_WatchFile</cstring> </property> @@ -94,15 +94,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3_2</cstring> + <cstring>tqlayout3_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapLabel1_2</cstring> </property> @@ -128,7 +128,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>1</height> @@ -149,7 +149,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -164,8 +164,8 @@ <include location="local" impldecl="in implementation">dlggeneral.ui.h</include> </includes> <functions> - <function access="protected" specifier="non virtual">showEvent( QShowEvent * )</function> + <function access="protected" specifier="non virtual">showEvent( TQShowEvent * )</function> </functions> <pixmapfunction>DesktopIcon</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kpdf/conf/dlggeneral.ui.h b/kpdf/conf/dlggeneral.ui.h index 316b009f..c7b9b6ec 100644 --- a/kpdf/conf/dlggeneral.ui.h +++ b/kpdf/conf/dlggeneral.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/kpdf/conf/dlgperformance.ui b/kpdf/conf/dlgperformance.ui index c0c90eb1..408075b0 100644 --- a/kpdf/conf/dlgperformance.ui +++ b/kpdf/conf/dlgperformance.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DlgPerformance</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DlgPerformance</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -38,15 +38,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_EnableCompositing</cstring> </property> @@ -54,7 +54,7 @@ <string>Enable &transparency effects</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_EnableThreading</cstring> </property> @@ -64,15 +64,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6_2</cstring> + <cstring>tqlayout6_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapLabel1_2</cstring> </property> @@ -98,7 +98,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>1</height> @@ -109,7 +109,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_MemoryLevel</cstring> </property> @@ -128,7 +128,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>descLabel</cstring> </property> @@ -138,19 +138,19 @@ <property name="textFormat"> <enum>PlainText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>lowRadio</cstring> </property> @@ -158,7 +158,7 @@ <string>&Low</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>normalRadio</cstring> </property> @@ -166,7 +166,7 @@ <string>&Normal (default)</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>aggressiveRadio</cstring> </property> @@ -176,15 +176,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapLabel1</cstring> </property> @@ -210,7 +210,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>1</height> @@ -231,7 +231,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>16</height> @@ -265,14 +265,14 @@ <include location="global" impldecl="in implementation">kiconloader.h</include> <include location="local" impldecl="in implementation">dlgperformance.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>lowRadio_toggled( bool on )</slot> <slot>normalRadio_toggled( bool on )</slot> <slot>aggressiveRadio_toggled( bool on )</slot> -</slots> +</Q_SLOTS> <functions> <function access="private">init()</function> </functions> <pixmapfunction>DesktopIcon</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kpdf/conf/dlgpresentation.ui b/kpdf/conf/dlgpresentation.ui index ba65f7b1..9df30f3d 100644 --- a/kpdf/conf/dlgpresentation.ui +++ b/kpdf/conf/dlgpresentation.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DlgPresentation</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DlgPresentation</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -30,15 +30,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>kcfg_SlidesAdvanceTime</cstring> </property> @@ -52,7 +52,7 @@ <number>5</number> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_SlidesAdvance</cstring> </property> @@ -60,7 +60,7 @@ <string>Advance every:</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>kcfg_SlidesLoop</cstring> </property> @@ -72,7 +72,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -83,15 +83,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <item> <property name="text"> - <string>Blinds Vertical</string> + <string>BlindsQt::Vertical</string> </property> </item> <item> <property name="text"> - <string>Blinds Horizontal</string> + <string>BlindsQt::Horizontal</string> </property> </item> <item> @@ -136,22 +136,22 @@ </item> <item> <property name="text"> - <string>Split Horizontal In</string> + <string>SplitQt::Horizontal In</string> </property> </item> <item> <property name="text"> - <string>Split Horizontal Out</string> + <string>SplitQt::Horizontal Out</string> </property> </item> <item> <property name="text"> - <string>Split Vertical In</string> + <string>SplitQt::Vertical In</string> </property> </item> <item> <property name="text"> - <string>Split Vertical Out</string> + <string>SplitQt::Vertical Out</string> </property> </item> <item> @@ -178,7 +178,7 @@ <cstring>kcfg_SlidesTransition</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -186,7 +186,7 @@ <string>Default transition:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -194,7 +194,7 @@ <string>Mouse cursor:</string> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <item> <property name="text"> <string>Hidden After Delay</string> @@ -214,7 +214,7 @@ <cstring>kcfg_SlidesCursor</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -230,7 +230,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_SlidesShowSummary</cstring> </property> @@ -238,7 +238,7 @@ <string>Show s&ummary page</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_SlidesShowProgress</cstring> </property> @@ -258,7 +258,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>1</height> @@ -275,7 +275,7 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> </includehints> diff --git a/kpdf/conf/preferencesdialog.cpp b/kpdf/conf/preferencesdialog.cpp index 61211008..418517a1 100644 --- a/kpdf/conf/preferencesdialog.cpp +++ b/kpdf/conf/preferencesdialog.cpp @@ -18,8 +18,8 @@ // reimplementing this #include "preferencesdialog.h" -PreferencesDialog::PreferencesDialog( TQWidget * parent, KConfigSkeleton * skeleton ) - : KConfigDialog( parent, "preferences", skeleton ) +PreferencesDialog::PreferencesDialog( TQWidget * tqparent, KConfigSkeleton * skeleton ) + : KConfigDialog( tqparent, "preferences", skeleton ) { m_general = new DlgGeneral(0); m_performance = new DlgPerformance(0); diff --git a/kpdf/conf/preferencesdialog.h b/kpdf/conf/preferencesdialog.h index 36aaa909..316aa05b 100644 --- a/kpdf/conf/preferencesdialog.h +++ b/kpdf/conf/preferencesdialog.h @@ -25,7 +25,7 @@ class PreferencesDialog : public KConfigDialog { public: - PreferencesDialog( TQWidget * parent, KConfigSkeleton * config ); + PreferencesDialog( TQWidget * tqparent, KConfigSkeleton * config ); protected: // void updateSettings(); // Called when OK/Apply is pressed. diff --git a/kpdf/configure.in.in b/kpdf/configure.in.in index db883adb..f8c6eac2 100644 --- a/kpdf/configure.in.in +++ b/kpdf/configure.in.in @@ -117,8 +117,11 @@ AC_ARG_ENABLE(force-kpdf-drm, , AC_DEFINE(KPDF_FORCE_DRM, 0, [Defines if force the use DRM in kpdf]) ) +kde_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $qt_includes" KDE_CHECK_COMPILER_FLAG([fno-regmove], SUPPORTS_NOREGMOVE=true, SUPPORTS_NOREGMOVE=false) if test "x$SUPPORTS_NOREGMOVE" = xtrue; then NOREGMOVE="-fno-regmove" fi AC_SUBST(NOREGMOVE) +CXXFLAGS="$kde_save_CXXFLAGS" diff --git a/kpdf/core/document.cpp b/kpdf/core/document.cpp index 02395747..6c918a4d 100644 --- a/kpdf/core/document.cpp +++ b/kpdf/core/document.cpp @@ -118,7 +118,7 @@ KPDFDocument::KPDFDocument(TQWidget *widget) TQStringList::Iterator it = list.begin(); while( it != list.end() ) { - d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").arg(*it), 0, true)->name(); + d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").tqarg(*it), 0, true)->name(); ++it; } } @@ -139,13 +139,13 @@ bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, con TQFile fileReadTest( docFile ); if ( !fileReadTest.open( IO_ReadOnly ) ) { - d->docFileName = TQString::null; + d->docFileName = TQString(); return false; } // determine the related "xml document-info" filename d->url = url; d->docFileName = docFile; - TQString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile; + TQString fn = docFile.tqcontains('/') ? docFile.section('/', -1, -1) : docFile; fn = "kpdf/" + TQString::number(fileReadTest.size()) + "." + fn + ".xml"; fileReadTest.close(); d->xmlFileName = locateLocal( "data", fn ); @@ -298,7 +298,7 @@ void KPDFDocument::addObserver( DocumentObserver * pObserver ) void KPDFDocument::removeObserver( DocumentObserver * pObserver ) { // remove observer from the map. it won't receive notifications anymore - if ( d->observers.contains( pObserver->observerId() ) ) + if ( d->observers.tqcontains( pObserver->observerId() ) ) { // free observer's pixmap data int observerId = pObserver->observerId(); @@ -331,7 +331,7 @@ void KPDFDocument::reparseConfig() // reparse generator config and if something changed clear KPDFPages if ( generator && generator->reparseConfig() ) { - // invalidate pixmaps + // tqinvalidate pixmaps TQValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end(); for ( ; it != end; ++it ) (*it)->deletePixmapsAndRects(); @@ -357,7 +357,7 @@ void KPDFDocument::reparseConfig() TQWidget *KPDFDocument::widget() const { - return static_cast<TQWidget*>(parent()); + return TQT_TQWIDGET(tqparent()); } bool KPDFDocument::isOpened() const @@ -633,7 +633,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta return false; // if searchID search not recorded, create new descriptor and init params - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) { RunningSearch * search = new RunningSearch(); search->continueOnPage = -1; @@ -707,12 +707,12 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.contains( pageNumber ) ) + if ( !pagesToNotify.tqcontains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // send page lists if found anything new @@ -747,7 +747,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { if ( currentPage >= pageCount ) { - if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes ) + if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes ) currentPage = 0; else break; @@ -764,7 +764,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // if a match has been found.. @@ -779,7 +779,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta pages_vector[ currentPage ]->setHighlight( searchID, match, color ); // ..queue page for notifying changes.. - if ( !pagesToNotify.contains( currentPage ) ) + if ( !pagesToNotify.tqcontains( currentPage ) ) pagesToNotify.append( currentPage ); // ..move the viewport to show the searched word centered @@ -793,7 +793,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta } } else if ( !noDialogs ) - KMessageBox::information( widget(), i18n("No matches found for '%1'.").arg( text ) ); + KMessageBox::information( widget(), i18n("No matches found for '%1'.").tqarg( text ) ); } // 3. PREVMATCH //TODO else if ( type == PrevMatch ) @@ -860,12 +860,12 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.contains( pageNumber ) ) + if ( !pagesToNotify.tqcontains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // send page lists to update observers (since some filter on bookmarks) @@ -884,7 +884,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta bool KPDFDocument::continueSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) return false; // start search with cached parameters from last search by searchID @@ -897,7 +897,7 @@ bool KPDFDocument::continueSearch( int searchID ) void KPDFDocument::resetSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) return; // get previous parameters for search @@ -1016,7 +1016,7 @@ void KPDFDocument::processLink( const KPDFLink * link ) KRun::run( *ptr, lst ); } else - KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).arg( mime->name() ) ); + KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).tqarg( mime->name() ) ); } break; case KPDFLink::Action: { @@ -1067,14 +1067,14 @@ void KPDFDocument::processLink( const KPDFLink * link ) case KPDFLink::Browse: { const KPDFLinkBrowse * browse = static_cast< const KPDFLinkBrowse * >( link ); // if the url is a mailto one, invoke mailer - if ( browse->url().startsWith( "mailto:", false ) ) + if ( browse->url().tqstartsWith( "mailto:", false ) ) kapp->invokeMailer( browse->url() ); else { TQString url = browse->url(); // fix for #100366, documents with relative links that are the form of http:foo.pdf - if (url.find("http:") == 0 && url.find("http://") == -1 && url.right(4) == ".pdf") + if (url.tqfind("http:") == 0 && url.tqfind("http://") == -1 && url.right(4) == ".pdf") { openRelativeFile(url.mid(5)); return; @@ -1117,7 +1117,7 @@ void KPDFDocument::requestDone( PixmapRequest * req ) break; } - if ( d->observers.contains( req->id ) ) + if ( d->observers.tqcontains( req->id ) ) { // [MEM] 1.2 append memory allocation descriptor to the FIFO int memoryBytes = 4 * req->width * req->height; @@ -1381,7 +1381,7 @@ void KPDFDocument::loadDocumentInfo() TQString KPDFDocument::giveAbsolutePath( const TQString & fileName ) { if ( !d->url.isValid() ) - return TQString::null; + return TQString(); return d->url.upURL().url() + fileName; } diff --git a/kpdf/core/document.h b/kpdf/core/document.h index c1eb840a..ee5a8a88 100644 --- a/kpdf/core/document.h +++ b/kpdf/core/document.h @@ -47,9 +47,10 @@ class KURL; * For a better understanding of hieracies @see README.internals.png * @see DocumentObserver, KPDFPage */ -class KPDFDocument : public QObject +class KPDFDocument : public TQObject { Q_OBJECT + TQ_OBJECT public: KPDFDocument( TQWidget *widget ); ~KPDFDocument(); @@ -184,7 +185,7 @@ class DocumentViewport * The Info structure can be filled in by generators to display metadata * about the currently opened file. */ -class DocumentInfo : public QDomDocument +class DocumentInfo : public TQDomDocument { public: DocumentInfo(); @@ -216,7 +217,7 @@ class DocumentInfo : public QDomDocument * - ViewportName: A 'named reference' to the viewport that must be converted * using getMetaData( "NamedViewport", *viewport_name* ) */ -class DocumentSynopsis : public QDomDocument +class DocumentSynopsis : public TQDomDocument { public: DocumentSynopsis(); diff --git a/kpdf/core/generator.h b/kpdf/core/generator.h index 841915a2..a3c1f985 100644 --- a/kpdf/core/generator.h +++ b/kpdf/core/generator.h @@ -40,7 +40,7 @@ class PixmapRequest; * class stores the resulting data into 'KPDFPage's. The data will then be * displayed by the GUI components (pageView, thumbnailList, etc..). */ -class Generator : public QObject +class Generator : public TQObject { public: /** virtual methods to reimplement **/ diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp index 9540d2fd..8ad34900 100644 --- a/kpdf/core/generator_pdf/generator_pdf.cpp +++ b/kpdf/core/generator_pdf/generator_pdf.cpp @@ -57,7 +57,7 @@ * internal: thread race prevention is done via the 'docLock' mutex. the * mutex is needed only because we have the asyncronous thread; else * the operations are all within the 'gui' thread, scheduled by the - * Qt scheduler and no mutex is needed. + * TQt scheduler and no mutex is needed. * external: dangerous operations are all locked via mutex internally, and the * only needed external thing is the 'canGeneratePixmap' method * that tells if the generator is free (since we don't want an @@ -152,7 +152,7 @@ bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector<KPDFPa } // 2. reopen the document using the password - GString * pwd2 = new GString( TQString::fromLocal8Bit(password.data()).latin1() ); + GString * pwd2 = new GString( TQString(TQString::fromLocal8Bit(password.data())).latin1() ); delete pdfdoc; pdfdoc = new PDFDoc( new GString( TQFile::encodeName( filePath ) ), pwd2, pwd2 ); delete pwd2; @@ -209,7 +209,7 @@ const DocumentInfo * PDFGenerator::generateDocumentInfo() if ( pdfdoc ) { docInfo.set( "format", i18n( "PDF v. <version>", "PDF v. %1" ) - .arg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) ); + .tqarg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) ); docInfo.set( "encryption", pdfdoc->isEncrypted() ? i18n( "Encrypted" ) : i18n( "Unencrypted" ), i18n("Security") ); docInfo.set( "optimization", pdfdoc->isLinearized() ? i18n( "Yes" ) : i18n( "No" ), @@ -423,18 +423,18 @@ bool PDFGenerator::print( KPrinter& printer ) marginBottom = (int)printer.option("kde-margin-bottom").toDouble(); bool forceRasterize = printer.option("kde-kpdf-forceRaster").toInt(); - if (ps.find(TQRegExp("w\\d+h\\d+")) == 0) + if (ps.tqfind(TQRegExp("w\\d+h\\d+")) == 0) { - // size not supported by Qt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester + // size not supported by TQt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester // remove the w ps = ps.mid(1); - int hPos = ps.find("h"); + int hPos = ps.tqfind("h"); paperWidth = ps.left(hPos).toInt(); paperHeight = ps.mid(hPos+1).toInt(); } else { - // size is supported by Qt, we get either the pageSize name or nothing because the CUPS driver + // size is supported by TQt, we get either the pageSize name or nothing because the CUPS driver // does not do any translation, then use KPrinter::pageSize to get the page size KPrinter::PageSize qtPageSize; if (!ps.isEmpty()) qtPageSize = pageNameToPageSize(ps); @@ -449,7 +449,7 @@ bool PDFGenerator::print( KPrinter& printer ) paperHeight = metrics.height(); } - KTempFile tf( TQString::null, ".ps" ); + KTempFile tf( TQString(), ".ps" ); globalParams->setPSPaperWidth(paperWidth); globalParams->setPSPaperHeight(paperHeight); TQString pstitle = getDocumentInfo("Title", true); @@ -457,7 +457,7 @@ bool PDFGenerator::print( KPrinter& printer ) { pstitle = m_document->currentDocument().fileName( false ); } - // this looks non-unicode-safe and it is. anything other than ASCII is not specified + // this looks non-tqunicode-safe and it is. anything other than ASCII is not specified // and some printers actually stop printing when they encounter non-ASCII characters in the // Postscript %%Title tag TQCString pstitle8Bit = pstitle.latin1(); @@ -524,18 +524,18 @@ bool PDFGenerator::print( KPrinter& printer ) } } -static GString *QStringToGString(const TQString &s) { +static GString *TQStringToGString(const TQString &s) { int len = s.length(); char *cstring = (char *)gmallocn(s.length(), sizeof(char)); for (int i = 0; i < len; ++i) - cstring[i] = s.at(i).unicode(); + cstring[i] = s.tqat(i).tqunicode(); return new GString(cstring, len); } -static TQString unicodeToQString(Unicode* u, int len) { +static TQString tqunicodeToTQString(Unicode* u, int len) { TQString ret; ret.setLength(len); - TQChar* qch = (TQChar*) ret.unicode(); + TQChar* qch = (TQChar*) ret.tqunicode(); for (;len;--len) *qch++ = (TQChar) *u++; return ret; @@ -568,7 +568,7 @@ static TQString UnicodeParsedString(GString *s1) { u = s1->getChar(i) & 0xff; ++i; } - result += unicodeToQString( &u, 1 ); + result += tqunicodeToTQString( &u, 1 ); } return result; } @@ -586,7 +586,7 @@ TQString PDFGenerator::getMetaData( const TQString & key, const TQString & optio // asking for the page related to a 'named link destination'. the // option is the link name. @see addSynopsisChildren. DocumentViewport viewport; - GString * namedDest = QStringToGString(option); + GString * namedDest = TQStringToGString(option); docLock.lock(); LinkDest * destination = pdfdoc->findDest( namedDest ); if ( destination ) @@ -610,7 +610,7 @@ bool PDFGenerator::reparseConfig() { // load paper color from Settings or use the white default color TQColor color = ( (KpdfSettings::renderMode() == KpdfSettings::EnumRenderMode::Paper ) && - KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : Qt::white; + KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : TQt::white; // if paper color is changed we have to rebuild every visible pixmap in addition // to the outputDevice. it's the 'heaviest' case, other effect are just recoloring // over the page rendered on 'standard' white background. @@ -789,11 +789,11 @@ TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNul // [Albert] Code adapted from pdfinfo.cc on xpdf Object info; if ( !pdfdoc ) - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); pdfdoc->getDocInfo( &info ); if ( !info.isDict() ) - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); Object obj; Dict *infoDict = info.getDict(); @@ -807,7 +807,7 @@ TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNul } obj.free(); info.free(); - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); } TQString PDFGenerator::getDocumentDate( const TQString & data ) const @@ -856,7 +856,7 @@ TQString PDFGenerator::getDocumentDate( const TQString & data ) const return result; } -void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) +void PDFGenerator::addSynopsisChildren( TQDomNode * tqparent, GList * items ) { int numItems = items->getLength(); for ( int i = 0; i < numItems; ++i ) @@ -868,11 +868,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) TQString name; Unicode * uniChar = outlineItem->getTitle(); int titleLength = outlineItem->getTitleLength(); - name = unicodeToQString(uniChar, titleLength); + name = tqunicodeToTQString(uniChar, titleLength); if ( name.isEmpty() ) continue; TQDomElement item = docSyn.createElement( name ); - parent->appendChild( item ); + tqparent->appendChild( item ); // 2. find the page the link refers to LinkAction * a = outlineItem->getAction(); @@ -888,7 +888,7 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) // so better storing the reference and provide the viewport as metadata // on demand GString *s = g->getNamedDest(); - TQChar *charArray = new QChar[s->getLength()]; + TQChar *charArray = new TQChar[s->getLength()]; for (int i = 0; i < s->getLength(); ++i) charArray[i] = TQChar(s->getCString()[i]); TQString option(charArray, s->getLength()); item.setAttribute( "ViewportName", option ); @@ -909,11 +909,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) item.setAttribute( "Open", TQVariant( (bool)outlineItem->isOpen() ).toString() ); - // 3. recursively descend over children + // 3. recursively descend over tqchildren outlineItem->open(); - GList * children = outlineItem->getKids(); - if ( children ) - addSynopsisChildren( &item, children ); + GList * tqchildren = outlineItem->getKids(); + if ( tqchildren ) + addSynopsisChildren( &item, tqchildren ); } } @@ -1017,10 +1017,10 @@ void PDFGenerator::addTransition( int pageNumber, KPDFPage * page ) switch ( pdfTransition->getAlignment() ) { case PageTransition::Horizontal: - transition->setAlignment( KPDFPageTransition::Horizontal ); + transition->tqsetAlignment( KPDFPageTransition::Horizontal ); break; case PageTransition::Vertical: - transition->setAlignment( KPDFPageTransition::Vertical ); + transition->tqsetAlignment( KPDFPageTransition::Vertical ); break; } diff --git a/kpdf/core/generator_pdf/generator_pdf.h b/kpdf/core/generator_pdf/generator_pdf.h index 662c19fd..b7d2deb2 100644 --- a/kpdf/core/generator_pdf/generator_pdf.h +++ b/kpdf/core/generator_pdf/generator_pdf.h @@ -95,7 +95,7 @@ class PDFGenerator : public Generator TQString getDocumentInfo( const TQString & data, bool canReturnNull = false ) const; TQString getDocumentDate( const TQString & data ) const; // private function for creating the document synopsis hieracy - void addSynopsisChildren( TQDomNode * parent, GList * items ); + void addSynopsisChildren( TQDomNode * tqparent, GList * items ); // private function for creating the transition information void addTransition( int pageNumber, KPDFPage * page ); // (async related) receive data from the generator thread @@ -124,7 +124,7 @@ class PDFGenerator : public Generator * @short A thread that builds contents for PDFGenerator in the background. * */ -class PDFPixmapGeneratorThread : public QThread +class PDFPixmapGeneratorThread : public TQThread { public: PDFPixmapGeneratorThread( PDFGenerator * generator ); diff --git a/kpdf/core/generator_pdf/gp_outputdev.cpp b/kpdf/core/generator_pdf/gp_outputdev.cpp index df3fd85b..b6c40520 100644 --- a/kpdf/core/generator_pdf/gp_outputdev.cpp +++ b/kpdf/core/generator_pdf/gp_outputdev.cpp @@ -109,7 +109,7 @@ void KPDFOutputDev::endPage() for (int j = 0; j < bh; j++) { getBitmap()->getPixel(i, j, pixel); - img->setPixel( i, j, qRgb( pixel[0], pixel[1], pixel[2] ) ); + img->setPixel( i, j, tqRgb( pixel[0], pixel[1], pixel[2] ) ); } } delete [] pixel; @@ -172,7 +172,7 @@ void KPDFOutputDev::processLink( Link * link, Catalog * catalog ) } void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str, - int _width, int _height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg ) + int _width, int _height, GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg ) { if ( m_generateImages ) { @@ -207,7 +207,7 @@ void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str, m_rects.push_back( rect ); } } - SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, maskColors, inlineImg ); + SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, tqmaskColors, inlineImg ); } //END - OutputDev hooked calls @@ -246,7 +246,7 @@ KPDFLink * KPDFOutputDev::generateLink( LinkAction * a ) { LinkGoTo * g = (LinkGoTo *) a; // ceate link: no ext file, namedDest, object pointer - link = new KPDFLinkGoto( TQString::null, decodeViewport( g->getNamedDest(), g->getDest() ) ); + link = new KPDFLinkGoto( TQString(), decodeViewport( g->getNamedDest(), g->getDest() ) ); } break; diff --git a/kpdf/core/generator_pdf/gp_outputdev.h b/kpdf/core/generator_pdf/gp_outputdev.h index 7788b1db..a4d33b04 100644 --- a/kpdf/core/generator_pdf/gp_outputdev.h +++ b/kpdf/core/generator_pdf/gp_outputdev.h @@ -32,7 +32,7 @@ class DocumentViewport; * @short A SplashOutputDev renderer that grabs text and links. * * This output device: - * - renders the page using SplashOutputDev (its parent) + * - renders the page using SplashOutputDev (its tqparent) * - harvests text into a textPage (for searching text) * - harvests links and collects them * - collects images and collects them @@ -63,7 +63,7 @@ class KPDFOutputDev : public SplashOutputDev virtual void processLink(Link *link, Catalog *catalog); //----- image drawing virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, - GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg); + GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg); private: // delete all interal objects and data diff --git a/kpdf/core/link.cpp b/kpdf/core/link.cpp index 33d0fe98..a872ba60 100644 --- a/kpdf/core/link.cpp +++ b/kpdf/core/link.cpp @@ -18,12 +18,12 @@ KPDFLink::~KPDFLink() TQString KPDFLinkGoto::linkTip() const { - return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).arg( m_vp.pageNumber + 1 ) : TQString::null ) : i18n("Open external file"); + return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).tqarg( m_vp.pageNumber + 1 ) : TQString() ) : i18n("Open external file"); } TQString KPDFLinkExecute::linkTip() const { - return i18n( "Execute '%1'..." ).arg( m_fileName ); + return i18n( "Execute '%1'..." ).tqarg( m_fileName ); } TQString KPDFLinkBrowse::linkTip() const @@ -61,5 +61,5 @@ TQString KPDFLinkAction::linkTip() const default: ; } - return TQString::null; + return TQString(); } diff --git a/kpdf/core/link.h b/kpdf/core/link.h index eff3573e..839292fd 100644 --- a/kpdf/core/link.h +++ b/kpdf/core/link.h @@ -27,7 +27,7 @@ class KPDFLink // get link type (inherited classes mustreturn an unique identifier) enum LinkType { Goto, Execute, Browse, Action, Movie }; virtual LinkType linkType() const = 0; - virtual TQString linkTip() const { return TQString::null; } + virtual TQString linkTip() const { return TQString(); } // virtual destructor (remove warnings) virtual ~KPDFLink(); diff --git a/kpdf/core/page.cpp b/kpdf/core/page.cpp index 6b611360..630c9480 100644 --- a/kpdf/core/page.cpp +++ b/kpdf/core/page.cpp @@ -74,7 +74,7 @@ void KPDFPage::setRotation( int r ) bool KPDFPage::hasPixmap( int id, int width, int height ) const { - if ( !m_pixmaps.contains( id ) ) + if ( !m_pixmaps.tqcontains( id ) ) return false; if ( width == -1 || height == -1 ) return true; @@ -98,7 +98,7 @@ bool KPDFPage::hasObjectRect( double x, double y ) const return false; TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->contains( x, y ) ) + if ( (*it)->tqcontains( x, y ) ) return true; return false; } @@ -131,11 +131,11 @@ NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, Nor return 0; // create a xpf's Unicode (unsigned int) array for the given text - const TQChar * str = text.unicode(); + const TQChar * str = text.tqunicode(); int len = text.length(); TQMemArray<Unicode> u(len); for (int i = 0; i < len; ++i) - u[i] = str[i].unicode(); + u[i] = str[i].tqunicode(); // find out the direction of search enum SearchDir { FromTop, NextMatch, PrevMatch } dir = lastRect ? NextMatch : FromTop; @@ -175,7 +175,7 @@ NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, Nor const TQString KPDFPage::getText( const NormalizedRect & rect ) const { if ( !m_text ) - return TQString::null; + return TQString(); int left = (int)( rect.left * m_width ), top = (int)( rect.top * m_height ), right = (int)( rect.right * m_width ), @@ -190,7 +190,7 @@ const ObjectRect * KPDFPage::hasObject( ObjectRect::ObjectType type, double x, d { TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->contains( x, y ) ) + if ( (*it)->tqcontains( x, y ) ) if ((*it)->objectType() == type) return *it; return 0; } @@ -203,7 +203,7 @@ const KPDFPageTransition * KPDFPage::getTransition() const void KPDFPage::setPixmap( int id, TQPixmap * pixmap ) { - if ( m_pixmaps.contains( id ) ) + if ( m_pixmaps.tqcontains( id ) ) delete m_pixmaps[id]; m_pixmaps[id] = pixmap; } @@ -252,7 +252,7 @@ void KPDFPage::setTransition( KPDFPageTransition * transition ) void KPDFPage::deletePixmap( int id ) { - if ( m_pixmaps.contains( id ) ) + if ( m_pixmaps.tqcontains( id ) ) { delete m_pixmaps[ id ]; m_pixmaps.remove( id ); @@ -304,7 +304,7 @@ NormalizedRect::NormalizedRect( const TQRect & r, double xScale, double yScale ) : left( (double)r.left() / xScale ), top( (double)r.top() / yScale ), right( (double)r.right() / xScale ), bottom( (double)r.bottom() / yScale ) {} -bool NormalizedRect::contains( double x, double y ) const +bool NormalizedRect::tqcontains( double x, double y ) const { return x >= left && x <= right && y >= top && y <= bottom; } @@ -319,7 +319,7 @@ bool NormalizedRect::intersects( double l, double t, double r, double b ) const return (l < right) && (r > left) && (t < bottom) && (b > top); } -TQRect NormalizedRect::geometry( int xScale, int yScale ) const +TQRect NormalizedRect::tqgeometry( int xScale, int yScale ) const { int l = (int)( left * xScale ), t = (int)( top * yScale ), diff --git a/kpdf/core/page.h b/kpdf/core/page.h index 2de7aceb..51d7781c 100644 --- a/kpdf/core/page.h +++ b/kpdf/core/page.h @@ -32,11 +32,11 @@ class NormalizedRect NormalizedRect( double l, double t, double r, double b ); NormalizedRect( const TQRect & r, double xScale, double yScale ); - bool contains( double x, double y ) const; + bool tqcontains( double x, double y ) const; bool intersects( const NormalizedRect & normRect ) const; bool intersects( double l, double t, double r, double b ) const; - TQRect geometry( int xScale, int yScale ) const; + TQRect tqgeometry( int xScale, int yScale ) const; }; /** diff --git a/kpdf/core/pagetransition.cpp b/kpdf/core/pagetransition.cpp index cdf04a7f..41d743c6 100644 --- a/kpdf/core/pagetransition.cpp +++ b/kpdf/core/pagetransition.cpp @@ -15,7 +15,7 @@ KPDFPageTransition::KPDFPageTransition( Type type ) : m_type( type ), m_duration( 1 ), - m_alignment( Horizontal ), + m_tqalignment(Horizontal ), m_direction( Inward ), m_angle( 0 ), m_scale( 1.0 ), diff --git a/kpdf/core/pagetransition.h b/kpdf/core/pagetransition.h index 70792355..25280437 100644 --- a/kpdf/core/pagetransition.h +++ b/kpdf/core/pagetransition.h @@ -51,7 +51,7 @@ class KPDFPageTransition inline int duration() const { return m_duration; } // Get dimension in which the transition effect occurs. - inline Alignment alignment() const { return m_alignment; } + inline Alignment tqalignment() const { return m_tqalignment; } // Get direction of motion of the transition effect. inline Direction direction() const { return m_direction; } @@ -67,7 +67,7 @@ class KPDFPageTransition inline void setType( Type type ) { m_type = type; } inline void setDuration( int duration ) { m_duration = duration; } - inline void setAlignment( Alignment alignment ) { m_alignment = alignment; } + inline void tqsetAlignment( Alignment tqalignment ) { m_tqalignment = tqalignment; } inline void setDirection( Direction direction ) { m_direction = direction; } inline void setAngle( int angle ) { m_angle = angle; } inline void setScale( double scale ) { m_scale = scale; } @@ -76,7 +76,7 @@ class KPDFPageTransition private: Type m_type; int m_duration; - Alignment m_alignment; + Alignment m_tqalignment; Direction m_direction; int m_angle; double m_scale; diff --git a/kpdf/error.cpp b/kpdf/error.cpp index 00d3581e..ca62437f 100644 --- a/kpdf/error.cpp +++ b/kpdf/error.cpp @@ -32,7 +32,7 @@ void CDECL error(int pos, char *msg, ...) { return; } if (pos >= 0) { - emsg = TQString("Error (%1): ").arg(pos); + emsg = TQString("Error (%1): ").tqarg(pos); } else { emsg = "Error: "; } diff --git a/kpdf/part.cpp b/kpdf/part.cpp index b2775255..e1212817 100644 --- a/kpdf/part.cpp +++ b/kpdf/part.cpp @@ -80,12 +80,12 @@ class PDFOptionsPage : public KPrintDialogPage PDFOptionsPage() { setTitle( i18n( "PDF Options" ) ); - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); m_forceRaster = new TQCheckBox(i18n("Force rasterization"), this); TQToolTip::add(m_forceRaster, i18n("Rasterize into an image before printing")); TQWhatsThis::add(m_forceRaster, i18n("Forces the rasterization of each page into an image before printing it. This usually gives somewhat worse results, but is useful when printing documents that appear to print incorrectly.")); - layout->addWidget(m_forceRaster); - layout->addStretch(1); + tqlayout->addWidget(m_forceRaster); + tqlayout->addStretch(1); } void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false ) @@ -113,10 +113,10 @@ using namespace KPDF; unsigned int Part::m_count = 0; -Part::Part(TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +Part::Part(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList & /*args*/ ) - : DCOPObject("kpdf"), KParts::ReadOnlyPart(parent, name), m_showMenuBarAction(0), m_showFullScreenAction(0), + : DCOPObject("kpdf"), KParts::ReadOnlyPart(tqparent, name), m_showMenuBarAction(0), m_showFullScreenAction(0), m_actionsSearched(false), m_searchStarted(false) { // connect the started signal to tell the job the mimetypes we like @@ -151,13 +151,13 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, connect( m_document, TQT_SIGNAL( openURL(const KURL &) ), this, TQT_SLOT( openURLFromDocument(const KURL &) ) ); connect( m_document, TQT_SIGNAL( close() ), this, TQT_SLOT( close() ) ); - if (parent && parent->metaObject()->slotNames(true).contains("slotQuit()")) - connect( m_document, TQT_SIGNAL( quit() ), parent, TQT_SLOT( slotQuit() ) ); + if (tqparent && tqparent->tqmetaObject()->slotNames(true).tqcontains("slotQuit()")) + connect( m_document, TQT_SIGNAL( quit() ), tqparent, TQT_SLOT( slotQuit() ) ); else connect( m_document, TQT_SIGNAL( quit() ), this, TQT_SLOT( cannotQuit() ) ); // widgets: ^searchbar (toolbar containing label and SearchWidget) -// m_searchToolBar = new KToolBar( parentWidget, "searchBar" ); +// m_searchToolBar = new KToolBar( tqparentWidget, "searchBar" ); // m_searchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() ); // TQLabel * sLabel = new TQLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" ); // m_searchWidget = new SearchWidget( m_searchToolBar, m_document ); @@ -165,7 +165,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, // m_searchToolBar->setStretchableWidget( m_searchWidget ); // widgets: [] splitter [] - m_splitter = new TQSplitter( parentWidget, widgetName ); + m_splitter = new TQSplitter( tqparentWidget, widgetName ); m_splitter->setOpaqueResize( true ); setWidget( m_splitter ); @@ -186,7 +186,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, int index; // [left toolbox: Table of Contents] | [] - // dummy wrapper with layout to enable horizontal scroll bars (bug: 147233) + // dummy wrapper with tqlayout to enable horizontal scroll bars (bug: 147233) TQWidget *tocWrapper = new TQWidget(m_toolBox); TQVBoxLayout *tocWrapperLayout = new TQVBoxLayout(tocWrapper); m_tocFrame = new TOC( tocWrapper, m_document ); @@ -278,8 +278,8 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_historyNext->setWhatsThis( i18n( "Go to the place you were after" ) ); // Find and other actions - m_find = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "find" ); - m_find->setEnabled( false ); + m_tqfind = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "tqfind" ); + m_tqfind->setEnabled( false ); m_findNext = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac, "find_next" ); m_findNext->setEnabled( false ); @@ -297,7 +297,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, TQT_SLOT(slotShowPresentation()), ac, "presentation"); m_showPresentation->setEnabled( false ); - // attach the actions of the children widgets too + // attach the actions of the tqchildren widgets too m_pageView->setupActions( ac ); // apply configuration (both internal settings and GUI configured items) @@ -310,7 +310,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, } m_splitter->setSizes( splitterSizes ); // get notified about splitter size changes (HACK that will be removed - // by connecting to Qt4::QSplitter's sliderMoved()) + // by connecting to TQt4::TQSplitter's sliderMoved()) m_pageView->installEventFilter( this ); m_watcher = new KDirWatch( this ); connect( m_watcher, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileDirty( const TQString& ) ) ); @@ -422,7 +422,7 @@ bool Part::openFile() { if ( TQFile::exists(m_file) ) { - KTempFile tf( TQString::null, ".pdf" ); + KTempFile tf( TQString(), ".pdf" ); if ( tf.status() == 0 ) { tf.close(); @@ -447,12 +447,12 @@ bool Part::openFile() } } - m_temporaryLocalFile = TQString::null; + m_temporaryLocalFile = TQString(); bool ok = m_document->openDocument( m_file, url(), mime ); // update one-time actions - m_find->setEnabled( ok && m_document-> supportsSearching()); + m_tqfind->setEnabled( ok && m_document-> supportsSearching()); m_findNext->setEnabled( ok && m_document-> supportsSearching()); m_saveAs->setEnabled( ok ); m_printPreview->setEnabled( ok ); @@ -482,7 +482,7 @@ bool Part::openFile() // if the 'StartFullScreen' flag is set, start presentation if ( m_document->getMetaData( "StartFullScreen" ) == "yes" ) { - KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), TQString::null, "autoPresentationWarning"); + KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), TQString(), "autoPresentationWarning"); slotShowPresentation(); } @@ -502,7 +502,7 @@ bool Part::openURL(const KURL &url) // if it matches then: download it (if not local) extract to a temp file using // KTar and proceed with the URL of the temporary file - m_jobMime = TQString::null; + m_jobMime = TQString(); // this calls the above 'openURL' method bool b = KParts::ReadOnlyPart::openURL(url); @@ -510,7 +510,7 @@ bool Part::openURL(const KURL &url) // these setWindowCaption calls only work for local files if ( !b ) { - KMessageBox::error( widget(), i18n("Could not open %1").arg( url.prettyURL() ) ); + KMessageBox::error( widget(), i18n("Could not open %1").tqarg( url.prettyURL() ) ); emit setWindowCaption(""); } else @@ -548,11 +548,11 @@ bool Part::closeURL() if (!m_temporaryLocalFile.isNull()) { TQFile::remove( m_temporaryLocalFile ); - m_temporaryLocalFile = TQString::null; + m_temporaryLocalFile = TQString(); } slotHidePresentation(); - m_find->setEnabled( false ); + m_tqfind->setEnabled( false ); m_findNext->setEnabled( false ); m_saveAs->setEnabled( false ); m_printPreview->setEnabled( false ); @@ -571,7 +571,7 @@ bool Part::closeURL() bool Part::eventFilter( TQObject * watched, TQEvent * e ) { // if pageView has been resized, save splitter sizes - if ( watched == m_pageView && e->type() == TQEvent::Resize ) + if ( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_pageView) && e->type() == TQEvent::Resize ) m_saveSplitterSizeTimer->start(500, true); // only intercept events, don't block them @@ -634,11 +634,11 @@ void Part::slotDoFileDirty() void Part::close() { - if (parent() && strcmp(parent()->name(), "KPDF::Shell") == 0) + if (tqparent() && strcmp(tqparent()->name(), "KPDF::Shell") == 0) { closeURL(); } - else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), TQString::null, "warnNoCloseIfNotInKPDF"); + else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), TQString(), "warnNoCloseIfNotInKPDF"); } void Part::updateViewActions() @@ -686,7 +686,7 @@ void Part::psTransformEnded() void Part::cannotQuit() { - KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), TQString::null, "warnNoQuitIfNotInKPDF"); + KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), TQString(), "warnNoQuitIfNotInKPDF"); } void Part::saveSplitterSize() @@ -789,7 +789,7 @@ void Part::slotFind() m_searchStarted = true; m_document->resetSearch( PART_SEARCH_ID ); m_document->searchText( PART_SEARCH_ID, dlg.pattern(), false, savedCaseSensitive, - KPDFDocument::NextMatch, true, qRgb( 255, 255, 64 ) ); + KPDFDocument::NextMatch, true, tqRgb( 255, 255, 64 ) ); } } @@ -801,22 +801,22 @@ void Part::slotFindNext() void Part::slotSaveFileAs() { - KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), TQString::null, widget() ); + KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), TQString(), widget() ); if ( saveURL.isValid() && !saveURL.isEmpty() ) { if (saveURL == url()) { - KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").arg(saveURL.filename()) ); + KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").tqarg(saveURL.filename()) ); return; } if ( KIO::NetAccess::exists( saveURL, false, widget() ) ) { - if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").arg(saveURL.filename()), TQString::null, i18n("Overwrite")) != KMessageBox::Continue) + if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").tqarg(saveURL.filename()), TQString(), i18n("Overwrite")) != KMessageBox::Continue) return; } if ( !KIO::NetAccess::file_copy( m_file, saveURL, -1, true ) ) - KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try to save it to another location.").arg( saveURL.prettyURL() ) ); + KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try to save it to another location.").tqarg( saveURL.prettyURL() ) ); } } @@ -894,7 +894,7 @@ void Part::slotPrintPreview() page = m_document->page(i); width = page->width(); height = page->height(); - if (page->rotation() == 90 || page->rotation() == 270) qSwap(width, height); + if (page->rotation() == 90 || page->rotation() == 270) tqSwap(width, height); if (width > height) landscape++; else portrait++; } @@ -939,7 +939,7 @@ void Part::slotShowMenu(const KPDFPage *page, const TQPoint &point) KPopupMenu *popup = new KPopupMenu( widget(), "rmb popup" ); if (page) { - popup->insertTitle( i18n( "Page %1" ).arg( page->number() + 1 ) ); + popup->insertTitle( i18n( "Page %1" ).tqarg( page->number() + 1 ) ); if ( page->hasBookmark() ) popup->insertItem( SmallIcon("bookmark"), i18n("Remove Bookmark"), 1 ); else @@ -1041,7 +1041,7 @@ void Part::slotPrint() page = m_document->page(i); width = page->width(); height = page->height(); - if (page->rotation() == 90 || page->rotation() == 270) qSwap(width, height); + if (page->rotation() == 90 || page->rotation() == 270) tqSwap(width, height); if (width > height) landscape++; else portrait++; } @@ -1085,8 +1085,8 @@ void Part::saveDocumentRestoreInfo(KConfig* config) /* * BrowserExtension class */ -BrowserExtension::BrowserExtension(Part* parent) - : KParts::BrowserExtension( parent, "KPDF::BrowserExtension" ) +BrowserExtension::BrowserExtension(Part* tqparent) + : KParts::BrowserExtension( tqparent, "KPDF::BrowserExtension" ) { emit enableAction("print", true); setURLDropHandlingEnabled(true); @@ -1094,7 +1094,7 @@ BrowserExtension::BrowserExtension(Part* parent) void BrowserExtension::print() { - static_cast<Part*>(parent())->slotPrint(); + static_cast<Part*>(tqparent())->slotPrint(); } #include "part.moc" diff --git a/kpdf/part.h b/kpdf/part.h index 70a3119e..23a12271 100644 --- a/kpdf/part.h +++ b/kpdf/part.h @@ -59,11 +59,12 @@ class BrowserExtension; class Part : public KParts::ReadOnlyPart, public DocumentObserver, virtual public kpdf_dcop { Q_OBJECT + TQ_OBJECT public: // Default constructor - Part(TQWidget* parentWidget, const char* widgetName, - TQObject* parent, const char* name, const TQStringList& args); + Part(TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent, const char* name, const TQStringList& args); // Destructor ~Part(); @@ -178,7 +179,7 @@ private: KAction *m_lastPage; KAction *m_historyBack; KAction *m_historyNext; - KAction *m_find; + KAction *m_tqfind; KAction *m_findNext; KAction *m_saveAs; KAction *m_printPreview; @@ -196,6 +197,7 @@ private: class BrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: BrowserExtension(Part*); diff --git a/kpdf/shell/shell.cpp b/kpdf/shell/shell.cpp index 8b6d185a..9a2f99b1 100644 --- a/kpdf/shell/shell.cpp +++ b/kpdf/shell/shell.cpp @@ -66,7 +66,7 @@ void Shell::init() { // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", this, 0, "KParts::ReadOnlyPart"); + m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", TQT_TQOBJECT(this), 0, "KParts::ReadOnlyPart"); if (m_part) { // then, setup our actions @@ -146,19 +146,19 @@ void Shell::writeSettings() void Shell::setupActions() { - KAction * openAction = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - m_recent = KStdAction::openRecent( this, TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); + KAction * openAction = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + m_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); connect( m_recent, TQT_SIGNAL( activated() ), openAction, TQT_SLOT( activate() ) ); m_recent->setWhatsThis( i18n( "<b>Click</b> to open a file or <b>Click and hold</b> to select a recent file" ) ); m_printAction = KStdAction::print( m_part, TQT_SLOT( slotPrint() ), actionCollection() ); m_printAction->setEnabled( false ); - KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); setStandardToolBarMenuEnabled(true); - m_showMenuBarAction = KStdAction::showMenubar( this, TQT_SLOT( slotShowMenubar() ), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - m_fullScreenAction = KStdAction::fullScreen( this, TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); + m_showMenuBarAction = KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotShowMenubar() ), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + m_fullScreenAction = KStdAction::fullScreen( TQT_TQOBJECT(this), TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); } void Shell::saveProperties(KConfig* config) @@ -187,7 +187,7 @@ Shell::fileOpen() // this slot is called whenever the File->Open menu is selected, // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar // button is clicked - KURL url = KFileDialog::getOpenURL( TQString::null, "application/pdf application/postscript" );//getOpenFileName(); + KURL url = KFileDialog::getOpenURL( TQString(), "application/pdf application/postscript" );//getOpenFileName(); if (!url.isEmpty()) openURL(url); diff --git a/kpdf/shell/shell.h b/kpdf/shell/shell.h index f92df5ce..d14cfd05 100644 --- a/kpdf/shell/shell.h +++ b/kpdf/shell/shell.h @@ -36,6 +36,7 @@ namespace KPDF class Shell : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kpdf/ui/minibar.cpp b/kpdf/ui/minibar.cpp index be3c9383..df3ebfce 100644 --- a/kpdf/ui/minibar.cpp +++ b/kpdf/ui/minibar.cpp @@ -25,10 +25,10 @@ #include "minibar.h" // [private widget] show progress -class ProgressWidget : public QWidget +class ProgressWidget : public TQWidget { public: - ProgressWidget( MiniBar * parent ); + ProgressWidget( MiniBar * tqparent ); void setProgress( float percentage ); protected: @@ -43,10 +43,10 @@ class ProgressWidget : public QWidget }; // [private widget] lineEdit for entering/validating page numbers -class PagesEdit : public QLineEdit +class PagesEdit : public TQLineEdit { public: - PagesEdit( MiniBar * parent ); + PagesEdit( MiniBar * tqparent ); void setPagesNumber( int pages ); void setText( const TQString & ); @@ -64,10 +64,10 @@ class PagesEdit : public QLineEdit }; // [private widget] a flat qpushbutton that enlights on hover -class HoverButton : public QPushButton +class HoverButton : public TQPushButton { public: - HoverButton( TQWidget * parent ); + HoverButton( TQWidget * tqparent ); protected: void paintEvent( TQPaintEvent * e ); @@ -78,8 +78,8 @@ class HoverButton : public QPushButton /** MiniBar **/ -MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) - : TQFrame( parent, "miniBar" ), m_document( document ), +MiniBar::MiniBar( TQWidget * tqparent, KPDFDocument * document ) + : TQFrame( tqparent, "miniBar" ), m_document( document ), m_currentPage( -1 ) { // left spacer @@ -87,7 +87,7 @@ MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) TQSpacerItem * spacerL = new TQSpacerItem( 20, 10, TQSizePolicy::Expanding ); horLayout->addItem( spacerL ); - // central 2r by 3c grid layout that contains all components + // central 2r by 3c grid tqlayout that contains all components TQGridLayout * gridLayout = new TQGridLayout( 0, 3,5, 2,1 ); // top spacer 6x6 px // TQSpacerItem * spacerTop = new TQSpacerItem( 6, 6, TQSizePolicy::Fixed, TQSizePolicy::Fixed ); @@ -127,7 +127,7 @@ MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) connect( m_nextButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( nextPage() ) ); // widget starts hidden (will be shown after opening a document) - parent->hide(); + tqparent->hide(); } MiniBar::~MiniBar() @@ -146,7 +146,7 @@ void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool if ( pages < 1 ) { m_currentPage = -1; - static_cast<TQWidget*>( parent() )->hide(); + TQT_TQWIDGET( tqparent() )->hide(); return; } @@ -171,7 +171,7 @@ void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool m_pagesButton->setText( TQString::number( pages ) ); m_prevButton->setEnabled( false ); m_nextButton->setEnabled( false ); - static_cast<TQWidget*>( parent() )->show(); + TQT_TQWIDGET( tqparent() )->show(); } void MiniBar::notifyViewportChanged( bool /*smoothMove*/ ) @@ -198,7 +198,7 @@ void MiniBar::notifyViewportChanged( bool /*smoothMove*/ ) void MiniBar::resizeEvent( TQResizeEvent * e ) { // auto-hide 'prev' and 'next' buttons if not enough space - const TQSize & myHint = minimumSizeHint(); + const TQSize & myHint = tqminimumSizeHint(); bool shown = m_prevButton->isVisible() && m_nextButton->isVisible(); if ( shown && e->size().width() < myHint.width() ) { @@ -208,7 +208,7 @@ void MiniBar::resizeEvent( TQResizeEvent * e ) } else if ( !shown ) { - int histeresis = m_prevButton->sizeHint().width() * 2 + 2; + int histeresis = m_prevButton->tqsizeHint().width() * 2 + 2; if ( e->size().width() > (myHint.width() + histeresis) ) { m_prevButton->show(); @@ -259,9 +259,9 @@ void MiniBar::slotEmitPrevPage() /** ProgressWidget **/ -ProgressWidget::ProgressWidget( MiniBar * parent ) - : TQWidget( parent, "progress", WNoAutoErase ), - m_miniBar( parent ), m_progressPercentage( -1 ) +ProgressWidget::ProgressWidget( MiniBar * tqparent ) + : TQWidget( tqparent, "progress", WNoAutoErase ), + m_miniBar( tqparent ), m_progressPercentage( -1 ) { setFixedHeight( 4 ); setMouseTracking( true ); @@ -308,36 +308,36 @@ void ProgressWidget::paintEvent( TQPaintEvent * e ) // paint rects and a separator line TQPainter p( this ); if ( cRect.isValid() ) - p.fillRect( cRect, palette().active().highlightedText() ); + p.fillRect( cRect, tqpalette().active().highlightedText() ); if ( fRect.isValid() ) - p.fillRect( fRect, palette().active().highlight() ); + p.fillRect( fRect, tqpalette().active().highlight() ); if ( l && l != w ) { - p.setPen( palette().active().highlight().dark( 120 ) ); + p.setPen( tqpalette().active().highlight().dark( 120 ) ); int delta = TQApplication::reverseLayout() ? w - l : l; p.drawLine( delta, 0, delta, h ); } // draw a frame-like outline - //p.setPen( palette().active().mid() ); + //p.setPen( tqpalette().active().mid() ); //p.drawRect( 0,0, w, h ); } /** PagesEdit **/ -PagesEdit::PagesEdit( MiniBar * parent ) - : TQLineEdit( parent ), m_miniBar( parent ), m_eatClick( false ) +PagesEdit::PagesEdit( MiniBar * tqparent ) + : TQLineEdit( tqparent ), m_miniBar( tqparent ), m_eatClick( false ) { // customize look setFrameShadow( TQFrame::Raised ); focusOutEvent( 0 ); // use an integer validator - m_validator = new TQIntValidator( 1, 1, this ); + m_validator = new TQIntValidator( 1, 1, TQT_TQOBJECT(this) ); setValidator( m_validator ); // customize text properties - setAlignment( Qt::AlignCenter ); + tqsetAlignment( TQt::AlignCenter ); setMaxLength( 4 ); } @@ -363,7 +363,7 @@ void PagesEdit::focusInEvent( TQFocusEvent * e ) m_eatClick = true; // change background color to the default 'edit' color setLineWidth( 2 ); - setPaletteBackgroundColor( Qt::white ); + setPaletteBackgroundColor( TQt::white ); // call default handler TQLineEdit::focusInEvent( e ); } @@ -372,7 +372,7 @@ void PagesEdit::focusOutEvent( TQFocusEvent * e ) { // change background color to a dark tone setLineWidth( 1 ); - setPaletteBackgroundColor( palette().active().background().light( 105 ) ); + setPaletteBackgroundColor( tqpalette().active().background().light( 105 ) ); // restore text TQLineEdit::setText( backString ); // call default handler @@ -398,8 +398,8 @@ void PagesEdit::wheelEvent( TQWheelEvent * e ) /** HoverButton **/ -HoverButton::HoverButton( TQWidget * parent ) - : TQPushButton( parent ) +HoverButton::HoverButton( TQWidget * tqparent ) + : TQPushButton( tqparent ) { setMouseTracking( true ); #if KDE_IS_VERSION(3,3,90) @@ -428,7 +428,7 @@ void HoverButton::paintEvent( TQPaintEvent * e ) else { TQPainter p( this ); - p.fillRect(e->rect(), parentWidget() ? parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor()); + p.fillRect(e->rect(), tqparentWidget() ? tqparentWidget()->tqpalette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor()); drawButtonLabel( &p ); } } diff --git a/kpdf/ui/minibar.h b/kpdf/ui/minibar.h index f532999c..99bc13aa 100644 --- a/kpdf/ui/minibar.h +++ b/kpdf/ui/minibar.h @@ -25,8 +25,9 @@ class ProgressWidget; class MiniBar : public TQFrame, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - MiniBar( TQWidget *parent, KPDFDocument * document ); + MiniBar( TQWidget *tqparent, KPDFDocument * document ); ~MiniBar(); // [INHERITED] from DocumentObserver diff --git a/kpdf/ui/pagepainter.cpp b/kpdf/ui/pagepainter.cpp index 899be054..96fb1edf 100644 --- a/kpdf/ui/pagepainter.cpp +++ b/kpdf/ui/pagepainter.cpp @@ -26,7 +26,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, TQPixmap * pixmap = 0; // if a pixmap is present for given id, use it - if ( page->m_pixmaps.contains( id ) ) + if ( page->m_pixmaps.tqcontains( id ) ) pixmap = page->m_pixmaps[ id ]; // else find the closest match using pixmaps of other IDs (great optim!) @@ -49,13 +49,13 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // if have no pixmap, draw blank page with gray cross and exit if ( !pixmap ) { - TQColor color = Qt::white; + TQColor color = TQt::white; if ( KpdfSettings::changeColors() ) { switch ( KpdfSettings::renderMode() ) { case KpdfSettings::EnumRenderMode::Inverted: - color = Qt::black; + color = TQt::black; break; case KpdfSettings::EnumRenderMode::Paper: color = KpdfSettings::paperColor(); @@ -70,7 +70,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // draw a cross (to that the pixmap as not yet been loaded) // helps a lot on pages that take much to render - destPainter->setPen( Qt::gray ); + destPainter->setPen( TQt::gray ); destPainter->drawLine( 0, 0, width-1, height-1 ); destPainter->drawLine( 0, height-1, width-1, 0 ); // idea here: draw a hourglass (or kpdf icon :-) on top-left corner @@ -122,7 +122,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, else { p->save(); - // TODO paint only the needed part (note: hope that Qt4 transforms are faster) + // TODO paint only the needed part (note: hope that TQt4 transforms are faster) p->scale( width / (double)pixmap->width(), height / (double)pixmap->height() ); p->drawPixmap( 0,0, *pixmap, 0,0, pixmap->width(), pixmap->height() ); p->restore(); @@ -139,7 +139,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, { case KpdfSettings::EnumRenderMode::Inverted: // Invert image pixels using TQImage internal function - backImage.invertPixels(false); + backImage.tqinvertPixels(false); break; case KpdfSettings::EnumRenderMode::Recolor: // Recolor image using KImageEffect::flatten with dither:0 @@ -152,7 +152,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, con = KpdfSettings::bWContrast(), thr = 255 - KpdfSettings::bWThreshold(); for( int i = 0; i < pixels; ++i ) { - val = qGray( data[i] ); + val = tqGray( data[i] ); if ( val > thr ) val = 128 + (127 * (val - thr)) / (255 - thr); else if ( val < thr ) @@ -165,7 +165,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, else if ( val < 0 ) val = 0; } - data[i] = qRgba( val, val, val, 255 ); + data[i] = tqRgba( val, val, val, 255 ); } break; } @@ -178,7 +178,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, for ( ; hIt != hEnd; ++hIt ) { HighlightRect * r = *hIt; - TQRect highlightRect = r->geometry( width, height ); + TQRect highlightRect = r->tqgeometry( width, height ); if ( highlightRect.isValid() && highlightRect.intersects( limits ) ) { // find out the rect to highlight on pixmap @@ -197,10 +197,10 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, for( int x = highlightRect.left(); x <= highlightRect.right(); ++x ) { val = data[ x + offset ]; - newR = (qRed(val) * rh) / 255; - newG = (qGreen(val) * gh) / 255; - newB = (qBlue(val) * bh) / 255; - data[ x + offset ] = qRgba( newR, newG, newB, 255 ); + newR = (tqRed(val) * rh) / 255; + newG = (tqGreen(val) * gh) / 255; + newB = (tqBlue(val) * bh) / 255; + data[ x + offset ] = tqRgba( newR, newG, newB, 255 ); } offset += backImage.width(); } @@ -213,7 +213,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // 3. visually enchance links and images if requested if ( enhanceLinks || enhanceImages ) { - TQColor normalColor = TQApplication::palette().active().highlight(); + TQColor normalColor = TQApplication::tqpalette().active().highlight(); TQColor lightColor = normalColor.light( 140 ); // enlarging limits for intersection is like growing the 'rectGeometry' below TQRect limitsEnlarged = limits; @@ -226,7 +226,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, if ( (enhanceLinks && rect->objectType() == ObjectRect::Link) || (enhanceImages && rect->objectType() == ObjectRect::Image) ) { - TQRect rectGeometry = rect->geometry( width, height ); + TQRect rectGeometry = rect->tqgeometry( width, height ); if ( rectGeometry.intersects( limitsEnlarged ) ) { // expand rect and draw inner border diff --git a/kpdf/ui/pageview.cpp b/kpdf/ui/pageview.cpp index 3b0baecd..7172c6d3 100644 --- a/kpdf/ui/pageview.cpp +++ b/kpdf/ui/pageview.cpp @@ -68,7 +68,7 @@ public: TQValueVector< PageViewItem * > items; TQValueList< PageViewItem * > visibleItems; - // view layout (columns and continuous in Settings), zoom and mouse + // view tqlayout (columns and continuous in Settings), zoom and mouse PageView::ZoomMode zoomMode; float zoomFactor; int rotation; @@ -80,7 +80,7 @@ public: TQRect mouseSelectionRect; TQColor selectionRectColor; - // type ahead find + // type ahead tqfind bool typeAheadActive; TQString typeAheadString; TQTimer * findTimeoutTimer; @@ -119,7 +119,7 @@ public: -class PageViewTip : public QToolTip +class PageViewTip : public TQToolTip { public: PageViewTip( PageView * view ) @@ -146,8 +146,8 @@ void PageViewTip::maybeTip( const TQPoint &_p ) PageViewItem * pageItem = m_view->pickItemOnPoint( p.x(), p.y() ); if ( pageItem && m_view->d->mouseMode == PageView::MouseNormal ) { - double nX = (double)(p.x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(p.y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(p.x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(p.y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); // if over a ObjectRect (of type Link) change cursor to hand const ObjectRect * object = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); @@ -158,8 +158,8 @@ void PageViewTip::maybeTip( const TQPoint &_p ) TQString strtip = link->linkTip(); if ( !strtip.isEmpty() ) { - TQRect linkRect = object->geometry( pageItem->width(), pageItem->height() ); - linkRect.moveBy( - m_view->contentsX() + pageItem->geometry().left(), - m_view->contentsY() + pageItem->geometry().top() ); + TQRect linkRect = object->tqgeometry( pageItem->width(), pageItem->height() ); + linkRect.moveBy( - m_view->contentsX() + pageItem->tqgeometry().left(), - m_view->contentsY() + pageItem->tqgeometry().top() ); tip( linkRect, strtip ); } } @@ -173,13 +173,13 @@ void PageViewTip::maybeTip( const TQPoint &_p ) * 160 - constructor and creating actions plus their connected slots (empty stuff) * 70 - DocumentObserver inherited methodes (important) * 550 - events: mouse, keyboard, drag/drop - * 170 - slotRelayoutPages: set contents of the scrollview on continuous/single modes + * 170 - slotRetqlayoutPages: set contents of the scrollview on continuous/single modes * 100 - zoom: zooming pages in different ways, keeping update the toolbar actions, etc.. * other misc functions: only slotRequestVisiblePixmaps and pickItemOnPoint noticeable, * and many insignificant stuff like this comment :-) */ -PageView::PageView( TQWidget *parent, KPDFDocument *document ) - : TQScrollView( parent, "KPDF::pageView", WStaticContents | WNoAutoErase ) +PageView::PageView( TQWidget *tqparent, KPDFDocument *document ) + : TQScrollView( tqparent, "KPDF::pageView", WStaticContents | WNoAutoErase ) { // create and initialize private storage structure d = new PageViewPrivate(); @@ -206,9 +206,9 @@ PageView::PageView( TQWidget *parent, KPDFDocument *document ) // widget setup: setup focus, accept drops and track mouse viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( StrongFocus ); - //viewport()->setPaletteBackgroundColor( Qt::white ); - viewport()->setBackgroundMode( Qt::NoBackground ); + viewport()->setFocusPolicy( TQ_StrongFocus ); + //viewport()->setPaletteBackgroundColor( TQt::white ); + viewport()->setBackgroundMode( TQt::NoBackground ); setResizePolicy( Manual ); setAcceptDrops( true ); setDragAutoScroll( false ); @@ -245,16 +245,16 @@ PageView::~PageView() void PageView::setupActions( KActionCollection * ac ) { // Zoom actions ( higher scales takes lots of memory! ) - d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, this, TQT_SLOT( slotZoom() ), ac, "zoom_to" ); + d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotZoom() ), ac, "zoom_to" ); d->aZoom->setEditable( true ); #if KDE_IS_VERSION(3,4,89) d->aZoom->setMaxComboViewCount( 13 ); #endif updateZoomText(); - KStdAction::zoomIn( this, TQT_SLOT( slotZoomIn() ), ac, "zoom_in" ); + KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT( slotZoomIn() ), ac, "zoom_in" ); - KStdAction::zoomOut( this, TQT_SLOT( slotZoomOut() ), ac, "zoom_out" ); + KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( slotZoomOut() ), ac, "zoom_out" ); d->aZoomFitWidth = new KToggleAction( i18n("Fit to Page &Width"), "view_fit_width", 0, ac, "zoom_fit_width" ); connect( d->aZoomFitWidth, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToWidthToggled( bool ) ) ); @@ -268,10 +268,10 @@ void PageView::setupActions( KActionCollection * ac ) // rotate actions KAction *action; action = new KAction( i18n("Rotate Right"), "rotate_cw", KShortcut( "Ctrl+Shift++" ), - this, TQT_SLOT( slotRotateRight() ), ac, "rotate_right" ); + TQT_TQOBJECT(this), TQT_SLOT( slotRotateRight() ), ac, "rotate_right" ); action = new KAction( i18n("Rotate Left"), "rotate_ccw", KShortcut( "Ctrl+Shift+-" ), - this, TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" ); + TQT_TQOBJECT(this), TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" ); // View-Layout actions d->aViewTwoPages = new KToggleAction( i18n("&Two Pages"), "view_left_right", 0, ac, "view_twopages" ); @@ -283,25 +283,25 @@ void PageView::setupActions( KActionCollection * ac ) d->aViewContinuous->setChecked( KpdfSettings::viewContinuous() ); // Mouse-Mode actions - d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, this, TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" ); + d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" ); d->aMouseNormal->setExclusiveGroup( "MouseType" ); d->aMouseNormal->setChecked( true ); - KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, this, TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" ); + KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" ); mz->setExclusiveGroup( "MouseType" ); - d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, this, TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" ); + d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" ); d->aMouseSelect->setExclusiveGroup( "MouseType" ); -/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, this, TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" ); +/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" ); d->aMouseEdit->setExclusiveGroup("MouseType"); d->aMouseEdit->setEnabled( false ); // implement feature before removing this line*/ // Other actions - KAction * su = new KAction( i18n("Scroll Up"), 0, this, TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" ); + KAction * su = new KAction( i18n("Scroll Up"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" ); su->setShortcut( "Shift+Up" ); - KAction * sd = new KAction( i18n("Scroll Down"), 0, this, TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" ); + KAction * sd = new KAction( i18n("Scroll Down"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" ); sd->setShortcut( "Shift+Down" ); } @@ -337,18 +337,18 @@ void PageView::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool do d->items.clear(); d->visibleItems.clear(); - // create children widgets + // create tqchildren widgets TQValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end(); for ( ; setIt != setEnd; ++setIt ) d->items.push_back( new PageViewItem( *setIt ) ); if ( pageSet.count() > 0 ) - // TODO for Enrico: Check if doing always the slotRelayoutPages() is not + // TODO for Enrico: Check if doing always the slotRetqlayoutPages() is not // suboptimal in some cases, i'd say it is not but a recheck will not hurt - // Need slotRelayoutPages() here instead of d->dirtyLayout = true + // Need slotRetqlayoutPages() here instead of d->dirtyLayout = true // because opening a pdf from another pdf will not trigger a viewportchange - // so pages are never relayouted - TQTimer::singleShot(0, this, TQT_SLOT(slotRelayoutPages())); + // so pages are never retqlayouted + TQTimer::singleShot(0, this, TQT_SLOT(slotRetqlayoutPages())); else { // update the mouse cursor when closing because we may have close through a link and @@ -392,13 +392,13 @@ void PageView::notifyViewportChanged( bool smoothMove ) return; } - // relayout in "Single Pages" mode or if a relayout is pending + // retqlayout in "Single Pages" mode or if a retqlayout is pending d->blockPixmapsRequest = true; if ( !KpdfSettings::viewContinuous() || d->dirtyLayout ) - slotRelayoutPages(); + slotRetqlayoutPages(); - // restore viewport center or use default {x-center,v-top} alignment - const TQRect & r = item->geometry(); + // restore viewport center or use default {x-center,v-top} tqalignment + const TQRect & r = item->tqgeometry(); int newCenterX = r.left(), newCenterY = r.top(); if ( vp.rePos.enabled ) @@ -462,18 +462,18 @@ void PageView::notifyPageChanged( int pageNumber, int changedFlags ) if ( changedFlags & DocumentObserver::Bookmark ) return; - // iterate over visible items: if page(pageNumber) is one of them, repaint it + // iterate over visible items: if page(pageNumber) is one of them, tqrepaint it TQValueList< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end(); for ( ; iIt != iEnd; ++iIt ) if ( (*iIt)->pageNumber() == pageNumber ) { // update item's rectangle plus the little outline - TQRect expandedRect = (*iIt)->geometry(); + TQRect expandedRect = (*iIt)->tqgeometry(); expandedRect.addCoords( -1, -1, 3, 3 ); updateContents( expandedRect ); // if we were "zoom-dragging" do not overwrite the "zoom-drag" cursor - if ( cursor().shape() != Qt::SizeVerCursor ) + if ( cursor().shape() != TQt::SizeVerCursor ) { // since the page has been regenerated below cursor, update it updateCursor( viewportToContents( mapFromGlobal( TQCursor::pos() ) ) ); @@ -532,10 +532,10 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) selectionRectInternal.addCoords( 1, 1, -1, -1 ); // color for blending TQColor selBlendColor = (selectionRect.width() > 8 || selectionRect.height() > 8) ? - d->selectionRectColor : Qt::red; + d->selectionRectColor : TQt::red; // subdivide region into rects - TQMemArray<TQRect> allRects = pe->region().rects(); + TQMemArray<TQRect> allRects = TQRegion(pe->region()).tqrects(); uint numRects = allRects.count(); // preprocess rects area to see if it worths or not using subdivision @@ -577,7 +577,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 2) Layer 1: pixmap manipulated areas // 3) Layer 2: paint (blend) transparent selection if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && - !selectionRectInternal.contains( contentsRect ) ) + !selectionRectInternal.tqcontains( contentsRect ) ) { TQRect blendRect = selectionRectInternal.intersect( contentsRect ); // skip rectangles covered by the selection's border @@ -592,7 +592,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) TQImage blendedImage = blendedPixmap.convertToImage(); KImageEffect::blend( selBlendColor.dark(140), blendedImage, 0.2 ); // copy the blended pixmap back to its place - pixmapPainter.drawPixmap( blendRect.left(), blendRect.top(), blendedImage ); + pixmapPainter.tqdrawPixmap( blendRect.left(), blendRect.top(), blendedImage ); } // draw border (red if the selection is too small) pixmapPainter.setPen( selBlendColor ); @@ -601,7 +601,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 4) Layer 3: overlays if ( KpdfSettings::debugDrawBoundaries() ) { - pixmapPainter.setPen( Qt::blue ); + pixmapPainter.setPen( TQt::blue ); pixmapPainter.drawRect( contentsRect ); } @@ -616,15 +616,15 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 2) Layer 1: opaque manipulated ares (filled / contours) // 3) Layer 2: paint opaque selection if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && - !selectionRectInternal.contains( contentsRect ) ) + !selectionRectInternal.tqcontains( contentsRect ) ) { - screenPainter.setPen( palette().active().highlight().dark(110) ); + screenPainter.setPen( tqpalette().active().highlight().dark(110) ); screenPainter.drawRect( selectionRect ); } // 4) Layer 3: overlays if ( KpdfSettings::debugDrawBoundaries() ) { - screenPainter.setPen( Qt::red ); + screenPainter.setPen( TQt::red ); screenPainter.drawRect( contentsRect ); } } @@ -637,7 +637,7 @@ void PageView::viewportResizeEvent( TQResizeEvent * ) if ( !d->delayResizeTimer ) { d->delayResizeTimer = new TQTimer( this ); - connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRelayoutPages() ) ); + connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRetqlayoutPages() ) ); } d->delayResizeTimer->start( 333, true ); } @@ -647,7 +647,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) e->accept(); // if performing a selection or dyn zooming, disable keys handling - if ( ( !d->mouseSelectionRect.isNull() && e->key() != Qt::Key_Escape ) || d->mouseMidStartY != -1 ) + if ( ( !d->mouseSelectionRect.isNull() && e->key() != TQt::Key_Escape ) || d->mouseMidStartY != -1 ) return; // handle 'find as you type' (based on khtml/khtmlview.cpp) @@ -660,9 +660,9 @@ void PageView::keyPressEvent( TQKeyEvent * e ) { d->typeAheadString = d->typeAheadString.left( d->typeAheadString.length() - 1 ); bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, true, false, - KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true ); + KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true ); TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); - d->messageWindow->display( status.arg(d->typeAheadString.lower()), + d->messageWindow->display( status.tqarg(d->typeAheadString.lower()), found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); d->findTimeoutTimer->start( 3000, true ); } @@ -682,7 +682,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) // because it activates the accel releaseKeyboard(); if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) ) - d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()), + d->messageWindow->display( i18n("Text found: \"%1\".").tqarg(d->typeAheadString.lower()), PageViewMessage::Find, 3000 ); d->findTimeoutTimer->start( 3000, true ); // it is needed to grab the keyboard becase people may have Space assigned to a @@ -784,7 +784,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) case Key_Right: horizontalScrollBar()->addLine(); break; - case Qt::Key_Escape: + case TQt::Key_Escape: selectionClear(); d->mousePressPos = TQPoint(); if ( d->aPrevAction ) @@ -840,19 +840,19 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e ) return; // if holding mouse mid button, perform zoom - if ( (e->state() & MidButton) && d->mouseMidStartY >= 0 ) + if ( (e->state() & Qt::MidButton) && d->mouseMidStartY >= 0 ) { int deltaY = d->mouseMidStartY - e->globalPos().y(); d->mouseMidStartY = e->globalPos().y(); d->zoomFactor *= ( 1.0 + ( (double)deltaY / 500.0 ) ); updateZoom( ZoomRefreshCurrent ); // uncomment following line to force a complete redraw - viewport()->repaint( false ); + viewport()->tqrepaint( false ); return; } - bool leftButton = e->state() & LeftButton, - rightButton = e->state() & RightButton; + bool leftButton = e->state() & Qt::LeftButton, + rightButton = e->state() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal: @@ -876,7 +876,7 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e ) { d->aPrevAction = d->aMouseNormal; d->aMouseSelect->activate(); - TQColor selColor = palette().active().highlight().light( 120 ); + TQColor selColor = tqpalette().active().highlight().light( 120 ); selectionStart( e->x() + deltaX, e->y() + deltaY, selColor, false ); selectionEndPoint( e->x(), e->y() ); break; @@ -920,7 +920,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) } // if pressing mid mouse button while not doing other things, begin 'comtinous zoom' mode - if ( e->button() & MidButton ) + if ( e->button() & Qt::MidButton ) { d->mouseMidStartY = e->globalPos().y(); setCursor( KCursor::sizeVerCursor() ); @@ -931,8 +931,8 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) d->mousePressPos = e->globalPos(); // handle mode dependant mouse press actions - bool leftButton = e->button() & LeftButton, - rightButton = e->button() & RightButton; + bool leftButton = e->button() & Qt::LeftButton, + rightButton = e->button() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal: // drag start / click / link following @@ -946,7 +946,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) case MouseZoom: // set first corner of the zoom rect if ( leftButton ) - selectionStart( e->x(), e->y(), palette().active().highlight(), false ); + selectionStart( e->x(), e->y(), tqpalette().active().highlight(), false ); else if ( rightButton ) updateZoom( ZoomOut ); break; @@ -954,7 +954,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) case MouseSelect: // set first corner of the selection rect if ( leftButton ) { - TQColor selColor = palette().active().highlight().light( 120 ); + TQColor selColor = tqpalette().active().highlight().light( 120 ); selectionStart( e->x(), e->y(), selColor, false ); } break; @@ -973,7 +973,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( d->items.isEmpty() ) { // ..except for right Clicks (emitted even it viewport is empty) - if ( e->button() == RightButton ) + if ( e->button() == Qt::RightButton ) emit rightClick( 0, e->globalPos() ); return; } @@ -983,7 +983,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) return; // handle mode indepent mid buttom zoom - bool midButton = e->button() & MidButton; + bool midButton = e->button() & Qt::MidButton; if ( midButton && d->mouseMidStartY > 0 ) { d->mouseMidStartY = -1; @@ -992,13 +992,13 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) return; } - bool leftButton = e->button() & LeftButton, - rightButton = e->button() & RightButton; + bool leftButton = e->button() & Qt::LeftButton, + rightButton = e->button() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal:{ // return the cursor to its normal state after dragging - if ( cursor().shape() == Qt::SizeAllCursor ) + if ( cursor().shape() == TQt::SizeAllCursor ) updateCursor( e->pos() ); PageViewItem * pageItem = pickItemOnPoint( e->x(), e->y() ); @@ -1006,8 +1006,8 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) // if the mouse has not moved since the press, that's a -click- if ( leftButton && pageItem && d->mousePressPos == e->globalPos()) { - double nX = (double)(e->x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(e->y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(e->x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(e->y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); const ObjectRect * linkRect, * imageRect; linkRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); if ( linkRect ) @@ -1052,7 +1052,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) } // find out new zoom ratio and normalized view center (relative to the contentsRect) - double zoom = QMIN( (double)visibleWidth() / (double)selRect.width(), (double)visibleHeight() / (double)selRect.height() ); + double zoom = TQMIN( (double)visibleWidth() / (double)selRect.width(), (double)visibleHeight() / (double)selRect.height() ); double nX = (double)(selRect.left() + selRect.right()) / (2.0 * (double)contentsWidth()); double nY = (double)(selRect.top() + selRect.bottom()) / (2.0 * (double)contentsHeight()); @@ -1105,16 +1105,16 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) for ( ; iIt != iEnd; ++iIt ) { PageViewItem * item = *iIt; - const TQRect & itemRect = item->geometry(); - if ( selectionRect.intersects( itemRect ) ) + const TQRect & tqitemRect = item->tqgeometry(); + if ( selectionRect.intersects( tqitemRect ) ) { // request the textpage if there isn't one const KPDFPage * kpdfPage = item->page(); if ( !kpdfPage->hasSearchPage() ) d->document->requestTextPage( kpdfPage->number() ); - // grab text in the rect that intersects itemRect - TQRect relativeRect = selectionRect.intersect( itemRect ); - relativeRect.moveBy( -itemRect.left(), -itemRect.top() ); + // grab text in the rect that intersects tqitemRect + TQRect relativeRect = selectionRect.intersect( tqitemRect ); + relativeRect.moveBy( -tqitemRect.left(), -tqitemRect.top() ); NormalizedRect normRect( relativeRect, item->width(), item->height() ); selectedText += kpdfPage->getText( normRect ); } @@ -1131,7 +1131,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( KpdfSettings::useKTTSD() ) menu.insertItem( SmallIcon("kttsd"), i18n( "Speak Text" ), 2 ); } - menu.insertTitle( i18n( "Image (%1 by %2 pixels)" ).arg( selectionRect.width() ).arg( selectionRect.height() ) ); + menu.insertTitle( i18n( "Image (%1 by %2 pixels)" ).tqarg( selectionRect.width() ).tqarg( selectionRect.height() ) ); menu.insertItem( SmallIcon("image"), i18n( "Copy to Clipboard" ), 3 ); menu.insertItem( SmallIcon("filesave"), i18n( "Save to File..." ), 4 ); int choice = menu.exec( e->globalPos() ); @@ -1147,16 +1147,16 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( choice == 3 ) { // [2] copy pixmap to clipboard - QClipboard *cb = TQApplication::clipboard(); - cb->setPixmap( copyPix, QClipboard::Clipboard ); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setPixmap( copyPix, TQClipboard::Clipboard ); if ( cb->supportsSelection() ) - cb->setPixmap( copyPix, QClipboard::Selection ); - d->messageWindow->display( i18n( "Image [%1x%2] copied to clipboard." ).arg( copyPix.width() ).arg( copyPix.height() ) ); + cb->setPixmap( copyPix, TQClipboard::Selection ); + d->messageWindow->display( i18n( "Image [%1x%2] copied to clipboard." ).tqarg( copyPix.width() ).tqarg( copyPix.height() ) ); } else if ( choice == 4 ) { // [3] save pixmap to file - TQString fileName = KFileDialog::getSaveFileName( TQString::null, "image/png image/jpeg", this ); + TQString fileName = KFileDialog::getSaveFileName( TQString(), "image/png image/jpeg", this ); if ( fileName.isNull() ) d->messageWindow->display( i18n( "File not saved." ), PageViewMessage::Warning ); else @@ -1165,7 +1165,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( type.isNull() ) type = "PNG"; copyPix.save( fileName, type.latin1() ); - d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).arg( copyPix.width() ).arg( copyPix.height() ).arg( type ) ); + d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).tqarg( copyPix.width() ).tqarg( copyPix.height() ).tqarg( type ) ); } } } @@ -1175,10 +1175,10 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( choice == 1 ) { // [1] copy text to clipboard - QClipboard *cb = TQApplication::clipboard(); - cb->setText( selectedText, QClipboard::Clipboard ); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setText( selectedText, TQClipboard::Clipboard ); if ( cb->supportsSelection() ) - cb->setText( selectedText, QClipboard::Selection ); + cb->setText( selectedText, TQClipboard::Selection ); } else if ( choice == 2 ) { @@ -1194,7 +1194,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) TQString error; if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error)) { - d->messageWindow->display( i18n("Starting KTTSD Failed: %1").arg(error) ); + d->messageWindow->display( i18n("Starting KTTSD Failed: %1").tqarg(error) ); KpdfSettings::setUseKTTSD(false); KpdfSettings::writeConfig(); } @@ -1221,7 +1221,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) } } - // clear widget selection and invalidate rect + // clear widget selection and tqinvalidate rect selectionClear(); // restore previous action if came from it using right button @@ -1323,39 +1323,39 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect ) for ( ; iIt != iEnd; ++iIt ) { // check if a piece of the page intersects the contents rect - if ( !(*iIt)->geometry().intersects( checkRect ) ) + if ( !(*iIt)->tqgeometry().intersects( checkRect ) ) continue; PageViewItem * item = *iIt; - TQRect pixmapGeometry = item->geometry(); + TQRect pixmapGeometry = item->tqgeometry(); // translate the painter so we draw top-left pixmap corner in 0,0 p->save(); p->translate( pixmapGeometry.left(), pixmapGeometry.top() ); - // item pixmap and outline geometry + // item pixmap and outline tqgeometry TQRect outlineGeometry = pixmapGeometry; outlineGeometry.addCoords( -1, -1, 3, 3 ); // draw the page outline (little black border and 2px shadow) - if ( !pixmapGeometry.contains( contentsRect ) ) + if ( !pixmapGeometry.tqcontains( contentsRect ) ) { int pixmapWidth = pixmapGeometry.width(), pixmapHeight = pixmapGeometry.height(); // draw simple outline - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( -1, -1, pixmapWidth + 2, pixmapHeight + 2 ); // draw bottom/right gradient int levels = 2; - int r = Qt::gray.red() / (levels + 2), - g = Qt::gray.green() / (levels + 2), - b = Qt::gray.blue() / (levels + 2); + int r = TQt::gray.red() / (levels + 2), + g = TQt::gray.green() / (levels + 2), + b = TQt::gray.blue() / (levels + 2); for ( int i = 0; i < levels; i++ ) { p->setPen( TQColor( r * (i+2), g * (i+2), b * (i+2) ) ); p->drawLine( i, i + pixmapHeight + 1, i + pixmapWidth + 1, i + pixmapHeight + 1 ); p->drawLine( i + pixmapWidth + 1, i, i + pixmapWidth + 1, i + pixmapHeight ); - p->setPen( Qt::gray ); + p->setPen( TQt::gray ); p->drawLine( -1, i + pixmapHeight + 1, i - 1, i + pixmapHeight + 1 ); p->drawLine( i + pixmapWidth + 1, -1, i + pixmapWidth + 1, i - 1 ); } @@ -1378,10 +1378,10 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect ) } // paint with background color the unpainted area - TQMemArray<TQRect> backRects = remainingArea.rects(); + TQMemArray<TQRect> backRects = remainingArea.tqrects(); uint backRectsNumber = backRects.count(); for ( uint jr = 0; jr < backRectsNumber; jr++ ) - p->fillRect( backRects[ jr ], Qt::gray ); + p->fillRect( backRects[ jr ], TQt::gray ); } void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight ) @@ -1407,7 +1407,7 @@ void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight { double scaleW = (double)colWidth / (double)width; double scaleH = (double)rowHeight / (double)height; - zoom = QMIN( scaleW, scaleH ); + zoom = TQMIN( scaleW, scaleH ); item->setWHZ( (int)(zoom * width), (int)(zoom * height), zoom ); d->zoomFactor = zoom; } @@ -1424,7 +1424,7 @@ PageViewItem * PageView::pickItemOnPoint( int x, int y ) for ( ; iIt != iEnd; ++iIt ) { PageViewItem * i = *iIt; - const TQRect & r = i->geometry(); + const TQRect & r = i->tqgeometry(); if ( x < r.right() && x > r.left() && y < r.bottom() ) { if ( y > r.top() ) @@ -1465,8 +1465,8 @@ void PageView::selectionEndPoint( int x, int y ) // clip selection to the viewport TQRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() ); - x = QMAX( QMIN( x, viewportRect.right() ), viewportRect.left() ); - y = QMAX( QMIN( y, viewportRect.bottom() ), viewportRect.top() ); + x = TQMAX( TQMIN( x, viewportRect.right() ), viewportRect.left() ); + y = TQMAX( TQMIN( y, viewportRect.bottom() ), viewportRect.top() ); // if selection changed update rect if ( d->mouseSelectionRect.right() != x || d->mouseSelectionRect.bottom() != y ) { @@ -1485,7 +1485,7 @@ void PageView::selectionEndPoint( int x, int y ) compoundRegion -= intersection; } // tassellate region with rects and enqueue paint events - TQMemArray<TQRect> rects = compoundRegion.rects(); + TQMemArray<TQRect> rects = compoundRegion.tqrects(); for ( uint i = 0; i < rects.count(); i++ ) updateContents( rects[i] ); } @@ -1513,7 +1513,7 @@ void PageView::updateZoom( ZoomMode newZoomMode ) { case ZoomFixed:{ //ZoomFixed case TQString z = d->aZoom->currentText(); - newFactor = KGlobal::locale()->readNumber( z.remove( z.find( '%' ), 1 ) ) / 100.0; + newFactor = KGlobal::locale()->readNumber( z.remove( z.tqfind( '%' ), 1 ) ) / 100.0; }break; case ZoomIn: newFactor += (newFactor > 0.99) ? ( newFactor > 1.99 ? 0.5 : 0.2 ) : 0.1; @@ -1544,13 +1544,13 @@ void PageView::updateZoom( ZoomMode newZoomMode ) if ( newZoomMode != d->zoomMode || (newZoomMode == ZoomFixed && newFactor != d->zoomFactor ) ) { - // rebuild layout and update the whole viewport + // rebuild tqlayout and update the whole viewport d->zoomMode = newZoomMode; d->zoomFactor = newFactor; // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -1572,7 +1572,7 @@ void PageView::updateZoomText() { // use current page zoom as zoomFactor if in ZoomFit/* mode if ( d->zoomMode != ZoomFixed && d->items.count() > 0 ) - d->zoomFactor = d->items[ QMAX( 0, (int)d->document->currentPage() ) ]->zoomFactor(); + d->zoomFactor = d->items[ TQMAX( 0, (int)d->document->currentPage() ) ]->zoomFactor(); float newFactor = d->zoomFactor; d->aZoom->clear(); @@ -1599,7 +1599,7 @@ void PageView::updateZoomText() selIdx++; TQString localValue( KGlobal::locale()->formatNumber( value * 100.0, 2 ) ); localValue.remove( KGlobal::locale()->decimalSymbol() + double_oh ); - translated << TQString( "%1%" ).arg( localValue ); + translated << TQString( "%1%" ).tqarg( localValue ); } d->aZoom->setItems( translated ); @@ -1619,8 +1619,8 @@ void PageView::updateCursor( const TQPoint &p ) PageViewItem * pageItem = pickItemOnPoint( p.x(), p.y() ); if ( pageItem && d->mouseMode == MouseNormal ) { - double nX = (double)(p.x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(p.y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(p.x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(p.y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); // if over a ObjectRect (of type Link) change cursor to hand d->mouseOnRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); @@ -1641,15 +1641,15 @@ void PageView::updateCursor( const TQPoint &p ) void PageView::doTypeAheadSearch() { bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, false, false, - KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true ); + KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true ); TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); - d->messageWindow->display( status.arg(d->typeAheadString.lower()), + d->messageWindow->display( status.tqarg(d->typeAheadString.lower()), found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); d->findTimeoutTimer->start( 3000, true ); } //BEGIN private SLOTS -void PageView::slotRelayoutPages() +void PageView::slotRetqlayoutPages() // called by: notifySetup, viewportResizeEvent, slotTwoPagesToggled, slotContinuousToggled, updateZoom { // set an empty container if we have no pages @@ -1677,7 +1677,7 @@ void PageView::slotRelayoutPages() fullHeight = 0; TQRect viewportRect( contentsX(), contentsY(), viewportWidth, viewportHeight ); - // set all items geometry and resize contents. handle 'continuous' and 'single' modes separately + // set all items tqgeometry and resize contents. handle 'continuous' and 'single' modes separately if ( KpdfSettings::viewContinuous() ) { // Here we find out column's width and row's height to compute a table @@ -1746,7 +1746,7 @@ void PageView::slotRelayoutPages() } else // viewContinuous is FALSE { - PageViewItem * currentItem = d->items[ QMAX( 0, (int)d->document->currentPage() ) ]; + PageViewItem * currentItem = d->items[ TQMAX( 0, (int)d->document->currentPage() ) ]; // setup varialbles for a 1(row) x N(columns) grid int nCols = KpdfSettings::viewColumns(), @@ -1816,11 +1816,11 @@ void PageView::slotRelayoutPages() { int prevX = contentsX(), prevY = contentsY(); - const TQRect & geometry = d->items[ vp.pageNumber ]->geometry(); + const TQRect & tqgeometry = d->items[ vp.pageNumber ]->tqgeometry(); double nX = vp.rePos.enabled ? vp.rePos.normalizedX : 0.5, nY = vp.rePos.enabled ? vp.rePos.normalizedY : 0.0; - center( geometry.left() + ROUND( nX * (double)geometry.width() ), - geometry.top() + ROUND( nY * (double)geometry.height() ) ); + center( tqgeometry.left() + ROUND( nX * (double)tqgeometry.width() ), + tqgeometry.top() + ROUND( nY * (double)tqgeometry.height() ) ); // center() usually moves the viewport, that requests pixmaps too. // if that doesn't happen we have to request them by hand if ( prevX == contentsX() && prevY == contentsY() ) @@ -1867,7 +1867,7 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop ) PageViewItem * i = *iIt; // if the item doesn't intersect the viewport, skip it - if ( !viewportRect.intersects( i->geometry() ) ) + if ( !viewportRect.intersects( i->tqgeometry() ) ) continue; // add the item to the 'visible list' @@ -1885,18 +1885,18 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop ) // position between the item and the viewport center if ( isEvent ) { - const TQRect & geometry = i->geometry(); + const TQRect & tqgeometry = i->tqgeometry(); // compute distance between item center and viewport center - double distance = hypot( (geometry.left() + geometry.right()) / 2 - viewportCenterX, - (geometry.top() + geometry.bottom()) / 2 - viewportCenterY ); + double distance = hypot( (tqgeometry.left() + tqgeometry.right()) / 2 - viewportCenterX, + (tqgeometry.top() + tqgeometry.bottom()) / 2 - viewportCenterY ); if ( distance >= minDistance && nearPageNumber != -1 ) continue; nearPageNumber = i->pageNumber(); minDistance = distance; - if ( geometry.height() > 0 && geometry.width() > 0 ) + if ( tqgeometry.height() > 0 && tqgeometry.width() > 0 ) { - focusedX = ( viewportCenterX - (double)geometry.left() ) / (double)geometry.width(); - focusedY = ( viewportCenterY - (double)geometry.top() ) / (double)geometry.height(); + focusedX = ( viewportCenterX - (double)tqgeometry.left() ) / (double)tqgeometry.width(); + focusedY = ( viewportCenterY - (double)tqgeometry.top() ) / (double)tqgeometry.height(); } } } @@ -2070,7 +2070,7 @@ void PageView::slotRotateRight() // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -2094,7 +2094,7 @@ void PageView::slotRotateLeft() // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -2108,7 +2108,7 @@ void PageView::slotTwoPagesToggled( bool on ) KpdfSettings::setViewColumns( newColumns ); KpdfSettings::writeConfig(); if ( d->document->pages() > 0 ) - slotRelayoutPages(); + slotRetqlayoutPages(); } } @@ -2119,7 +2119,7 @@ void PageView::slotContinuousToggled( bool on ) KpdfSettings::setViewContinuous( on ); KpdfSettings::writeConfig(); if ( d->document->pages() > 0 ) - slotRelayoutPages(); + slotRetqlayoutPages(); } } diff --git a/kpdf/ui/pageview.h b/kpdf/ui/pageview.h index 3742e804..97114dcc 100644 --- a/kpdf/ui/pageview.h +++ b/kpdf/ui/pageview.h @@ -39,11 +39,12 @@ class PageViewTip; class PageView : public TQScrollView, public DocumentObserver { Q_OBJECT + TQ_OBJECT friend class PageViewTip; public: - PageView( TQWidget *parent, KPDFDocument *document ); + PageView( TQWidget *tqparent, KPDFDocument *document ); ~PageView(); // Zoom mode ( last 4 are internally used only! ) @@ -100,7 +101,7 @@ class PageView : public TQScrollView, public DocumentObserver void selectionStart( int x, int y, const TQColor & color, bool aboveAll = false ); void selectionEndPoint( int x, int y ); void selectionClear(); - // update internal zoom values and end in a slotRelayoutPages(); + // update internal zoom values and end in a slotRetqlayoutPages(); void updateZoom( ZoomMode newZm ); // update the text on the label using global zoom value or current page's one void updateZoomText(); @@ -114,7 +115,7 @@ class PageView : public TQScrollView, public DocumentObserver private slots: // activated either directly or via TQTimer on the viewportResizeEvent - void slotRelayoutPages(); + void slotRetqlayoutPages(); // activated either directly or via the contentsMoving(int,int) signal void slotRequestVisiblePixmaps( int left = -1, int top = -1 ); // activated by the viewport move timer diff --git a/kpdf/ui/pageviewutils.cpp b/kpdf/ui/pageviewutils.cpp index eaf5fc95..ed5c637a 100644 --- a/kpdf/ui/pageviewutils.cpp +++ b/kpdf/ui/pageviewutils.cpp @@ -21,13 +21,13 @@ #include "core/page.h" #include "conf/settings.h" -PageViewMessage::PageViewMessage( TQWidget * parent ) - : TQWidget( parent, "pageViewMessage" ), m_timer( 0 ) +PageViewMessage::PageViewMessage( TQWidget * tqparent ) + : TQWidget( tqparent, "pageViewMessage" ), m_timer( 0 ) { - setFocusPolicy( NoFocus ); + setFocusPolicy( TQ_NoFocus ); setBackgroundMode( NoBackground ); setPaletteBackgroundColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Background)); - // if the layout is LtR, we can safely place it in the right position + // if the tqlayout is LtR, we can safely place it in the right position if ( !TQApplication::reverseLayout() ) move( 10, 10 ); resize( 0, 0 ); @@ -54,7 +54,7 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration iconXOffset = 0, shadowOffset = 1; - // load icon (if set) and update geometry + // load icon (if set) and update tqgeometry TQPixmap symbol; if ( icon != None ) { @@ -82,46 +82,46 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration textXOffset = 2 + symbol.width(); } width += 2 + symbol.width(); - height = QMAX( height, symbol.height() ); + height = TQMAX( height, symbol.height() ); } - TQRect geometry( 0, 0, width + 10, height + 8 ); + TQRect tqgeometry( 0, 0, width + 10, height + 8 ); - // resize pixmap, mask and widget - static TQBitmap mask; - mask.resize( geometry.size() ); - m_pixmap.resize( geometry.size() ); - resize( geometry.size() ); + // resize pixmap, tqmask and widget + static TQBitmap tqmask; + tqmask.resize( tqgeometry.size() ); + m_pixmap.resize( tqgeometry.size() ); + resize( tqgeometry.size() ); - // create and set transparency mask - TQPainter maskPainter( &mask); - mask.fill( Qt::black ); - maskPainter.setBrush( Qt::white ); - maskPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() ); - setMask( mask ); + // create and set transparency tqmask + TQPainter tqmaskPainter( &tqmask); + tqmask.fill( TQt::black ); + tqmaskPainter.setBrush( TQt::white ); + tqmaskPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); + setMask( tqmask ); // draw background TQPainter bufferPainter( &m_pixmap ); - bufferPainter.setPen( Qt::black ); + bufferPainter.setPen( TQt::black ); bufferPainter.setBrush( paletteBackgroundColor() ); - bufferPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() ); + bufferPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); // draw icon if present if ( !symbol.isNull() ) bufferPainter.drawPixmap( 5 + iconXOffset, 4, symbol, 0, 0, symbol.width(), symbol.height() ); // draw shadow and text - int yText = geometry.height() - height / 2; + int yText = tqgeometry.height() - height / 2; bufferPainter.setPen( paletteBackgroundColor().dark( 115 ) ); bufferPainter.drawText( 5 + textXOffset + shadowOffset, yText + 1, message ); bufferPainter.setPen( foregroundColor() ); bufferPainter.drawText( 5 + textXOffset, yText, message ); - // if the layout is RtL, we can move it to the right place only after we + // if the tqlayout is RtL, we can move it to the right place only after we // know how much size it will take if ( TQApplication::reverseLayout() ) - move( parentWidget()->width() - geometry.width() - 10, 10 ); + move( tqparentWidget()->width() - tqgeometry.width() - 10, 10 ); - // show widget and schedule a repaint + // show widget and schedule a tqrepaint show(); update(); @@ -168,19 +168,19 @@ int PageViewItem::pageNumber() const return m_page->number(); } -const TQRect& PageViewItem::geometry() const +const TQRect& PageViewItem::tqgeometry() const { - return m_geometry; + return m_tqgeometry; } int PageViewItem::width() const { - return m_geometry.width(); + return m_tqgeometry.width(); } int PageViewItem::height() const { - return m_geometry.height(); + return m_tqgeometry.height(); } double PageViewItem::zoomFactor() const @@ -190,18 +190,18 @@ double PageViewItem::zoomFactor() const void PageViewItem::setGeometry( int x, int y, int width, int height ) { - m_geometry.setRect( x, y, width, height ); + m_tqgeometry.setRect( x, y, width, height ); } void PageViewItem::setWHZ( int w, int h, double z ) { - m_geometry.setWidth( w ); - m_geometry.setHeight( h ); + m_tqgeometry.setWidth( w ); + m_tqgeometry.setHeight( h ); m_zoomFactor = z; } void PageViewItem::moveTo( int x, int y ) { - m_geometry.moveLeft( x ); - m_geometry.moveTop( y ); + m_tqgeometry.moveLeft( x ); + m_tqgeometry.moveTop( y ); } diff --git a/kpdf/ui/pageviewutils.h b/kpdf/ui/pageviewutils.h index d1e5cecf..0bd6bd32 100644 --- a/kpdf/ui/pageviewutils.h +++ b/kpdf/ui/pageviewutils.h @@ -23,7 +23,7 @@ class KPDFPage; /** * @short PageViewItem represents graphically a kpdfpage into the PageView. * - * It has methods for settings Item's geometry and other visual properties such + * It has methods for settings Item's tqgeometry and other visual properties such * as the individual zoom factor. */ class PageViewItem @@ -33,7 +33,7 @@ class PageViewItem const KPDFPage * page() const; int pageNumber() const; - const TQRect& geometry() const; + const TQRect& tqgeometry() const; int width() const; int height() const; double zoomFactor() const; @@ -45,17 +45,17 @@ class PageViewItem private: const KPDFPage * m_page; double m_zoomFactor; - TQRect m_geometry; + TQRect m_tqgeometry; }; /** * @short A widget that displays messages in the top-left corner. */ -class PageViewMessage : public QWidget +class PageViewMessage : public TQWidget { public: - PageViewMessage( TQWidget * parent ); + PageViewMessage( TQWidget * tqparent ); enum Icon { None, Info, Warning, Error, Find }; void display( const TQString & message, Icon icon = Info, int durationMs = 4000 ); diff --git a/kpdf/ui/presentationwidget.cpp b/kpdf/ui/presentationwidget.cpp index 450f25df..6767db2c 100644 --- a/kpdf/ui/presentationwidget.cpp +++ b/kpdf/ui/presentationwidget.cpp @@ -43,25 +43,25 @@ #define ENABLE_PROGRESS_OVERLAY -// a frame contains a pointer to the page object, its geometry and the +// a frame contains a pointer to the page object, its tqgeometry and the // transition effect to the next frame struct PresentationFrame { const KPDFPage * page; - TQRect geometry; + TQRect tqgeometry; }; -PresentationWidget::PresentationWidget( TQWidget * parent, KPDFDocument * doc ) - : TQDialog( parent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder), +PresentationWidget::PresentationWidget( TQWidget * tqparent, KPDFDocument * doc ) + : TQDialog( tqparent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder), m_pressedLink( 0 ), m_handCursor( false ), m_document( doc ), m_frameIndex( -1 ) { - // set look and geometry - setBackgroundMode( Qt::NoBackground ); + // set look and tqgeometry + setBackgroundMode( TQt::NoBackground ); m_width = -1; - m_accel = new KAccel( this, this, "presentationmode-accel" ); + m_accel = new KAccel( this, TQT_TQOBJECT(this), "presentationmode-accel" ); // show widget and take control showFullScreen(); @@ -100,11 +100,11 @@ PresentationWidget::~PresentationWidget() void PresentationWidget::setupActions( KActionCollection * ac ) { - m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), this, TQT_SLOT( slotPrevPage() ), false, true ); - m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), this, TQT_SLOT( slotNextPage() ), false, true ); - m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), this, TQT_SLOT( slotFirstPage() ), false, true ); - m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), this, TQT_SLOT( slotLastPage() ), false, true ); - m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), this, TQT_SLOT( close() ), false, true ); + m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ), false, true ); + m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ), false, true ); + m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotFirstPage() ), false, true ); + m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotLastPage() ), false, true ); + m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( close() ), false, true ); } void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool /*documentChanged*/ ) @@ -124,7 +124,7 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe { PresentationFrame * frame = new PresentationFrame(); frame->page = *setIt; - // calculate frame geometry keeping constant aspect ratio + // calculate frame tqgeometry keeping constant aspect ratio float pageRatio = frame->page->ratio(); int pageWidth = m_width, pageHeight = m_height; @@ -132,7 +132,7 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe pageWidth = (int)( (float)pageHeight / pageRatio ); else pageHeight = (int)( (float)pageWidth * pageRatio ); - frame->geometry.setRect( (m_width - pageWidth) / 2, + frame->tqgeometry.setRect( (m_width - pageWidth) / 2, (m_height - pageHeight) / 2, pageWidth, pageHeight ); // add the frame to the vector @@ -145,11 +145,11 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe if ( info ) { if ( !info->get( "title" ).isNull() ) - m_metaStrings += i18n( "Title: %1" ).arg( info->get( "title" ) ); + m_metaStrings += i18n( "Title: %1" ).tqarg( info->get( "title" ) ); if ( !info->get( "author" ).isNull() ) - m_metaStrings += i18n( "Author: %1" ).arg( info->get( "author" ) ); + m_metaStrings += i18n( "Author: %1" ).tqarg( info->get( "author" ) ); } - m_metaStrings += i18n( "Pages: %1" ).arg( m_document->pages() ); + m_metaStrings += i18n( "Pages: %1" ).tqarg( m_document->pages() ); m_metaStrings += i18n( "Click to begin" ); } @@ -242,7 +242,7 @@ void PresentationWidget::mousePressEvent( TQMouseEvent * e ) return; // handle clicking on top-right overlay - if ( m_overlayGeometry.contains( e->pos() ) ) + if ( m_overlayGeometry.tqcontains( e->pos() ) ) { overlayClick( e->pos() ); return; @@ -287,10 +287,10 @@ void PresentationWidget::mouseMoveEvent( TQMouseEvent * e ) else { // show the bar if reaching top 2 pixels - if ( e->y() <= (geometry().top() + 1) ) + if ( e->y() <= (tqgeometry().top() + 1) ) m_topBar->show(); - // handle "dragging the wheel" if clicking on its geometry - else if ( e->state() == Qt::LeftButton && m_overlayGeometry.contains( e->pos() ) ) + // handle "dragging the wheel" if clicking on its tqgeometry + else if ( e->state() == Qt::LeftButton && m_overlayGeometry.tqcontains( e->pos() ) ) overlayClick( e->pos() ); } } @@ -307,16 +307,16 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) m_topBar = new KToolBar( this, "presentationBar" ); m_topBar->setIconSize( 32 ); m_topBar->setMovingEnabled( false ); - m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotPrevPage() ) ); - m_topBar->insertButton( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNextPage() ) ); - m_topBar->insertButton( "exit", 1, TQT_SIGNAL( clicked() ), this, TQT_SLOT( close() ) ); + m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ) ); + m_topBar->insertButton( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ) ); + m_topBar->insertButton( "exit", 1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( close() ) ); m_topBar->setGeometry( 0, 0, m_width, 32 + 10 ); m_topBar->alignItemRight( 1 ); m_topBar->hide(); // change topbar background color - TQPalette p = m_topBar->palette(); - p.setColor( TQPalette::Active, TQColorGroup::Button, Qt::gray ); - p.setColor( TQPalette::Active, TQColorGroup::Background, Qt::darkGray ); + TQPalette p = m_topBar->tqpalette(); + p.setColor( TQPalette::Active, TQColorGroup::Button, TQt::gray ); + p.setColor( TQPalette::Active, TQColorGroup::Background, TQt::darkGray ); m_topBar->setPalette( p ); // register this observer in document. events will come immediately @@ -326,16 +326,16 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) if ( KpdfSettings::slidesShowSummary() ) generatePage(); - KMessageBox::information(this, i18n("There are two ways of exiting presentation mode, you can press either ESC key or click with the quit button that appears when placing the mouse in the top-right corner. Of course you can cycle windows (Alt+TAB by default)"), TQString::null, "presentationInfo"); + KMessageBox::information(this, i18n("There are two ways of exiting presentation mode, you can press either ESC key or click with the quit button that appears when placing the mouse in the top-right corner. Of course you can cycle windows (Alt+TAB by default)"), TQString(), "presentationInfo"); } // check painting rect consistancy - TQRect r = pe->rect().intersect( geometry() ); + TQRect r = pe->rect().intersect( tqgeometry() ); if ( r.isNull() || m_lastRenderedPixmap.isNull() ) return; // blit the pixmap to the screen - TQMemArray<TQRect> allRects = pe->region().rects(); + TQMemArray<TQRect> allRects = TQRegion(pe->region()).tqrects(); uint numRects = allRects.count(); for ( uint i = 0; i < numRects; i++ ) { @@ -370,18 +370,18 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) // </widget events> -const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * geometry ) const +const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * tqgeometry ) const { // no links on invalid pages - if ( geometry && !geometry->isNull() ) - geometry->setRect( 0, 0, -1, -1 ); + if ( tqgeometry && !tqgeometry->isNull() ) + tqgeometry->setRect( 0, 0, -1, -1 ); if ( m_frameIndex < 0 || m_frameIndex >= (int)m_frames.size() ) return 0; - // get frame, page and geometry + // get frame, page and tqgeometry const PresentationFrame * frame = m_frames[ m_frameIndex ]; const KPDFPage * page = frame->page; - const TQRect & frameGeometry = frame->geometry; + const TQRect & frameGeometry = frame->tqgeometry; // compute normalized x and y double nx = (double)(x - frameGeometry.left()) / (double)frameGeometry.width(); @@ -396,11 +396,11 @@ const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * geometry ) if ( !object ) return 0; - // compute link geometry if destination rect present - if ( geometry ) + // compute link tqgeometry if destination rect present + if ( tqgeometry ) { - *geometry = object->geometry( frameGeometry.width(), frameGeometry.height() ); - geometry->moveBy( frameGeometry.left(), frameGeometry.top() ); + *tqgeometry = object->tqgeometry( frameGeometry.width(), frameGeometry.height() ); + tqgeometry->moveBy( frameGeometry.left(), frameGeometry.top() ); } // return the link pointer @@ -416,12 +416,12 @@ void PresentationWidget::testCursorOnLink( int x, int y ) // only react on changes (in/out from a link) if ( (link && !m_handCursor) || (!link && m_handCursor) ) { - // change cursor shape + // change cursor tqshape m_handCursor = link != 0; setCursor( m_handCursor ? KCursor::handCursor() : KCursor::arrowCursor()); // set tooltip over link's rect - TQString tip = link ? link->linkTip() : TQString::null; + TQString tip = link ? link->linkTip() : TQString(); if ( m_handCursor && !tip.isEmpty() ) TQToolTip::add( this, linkRect, tip ); } @@ -451,8 +451,8 @@ void PresentationWidget::changePage( int newPage ) // check if pixmap exists or else request it m_frameIndex = newPage; PresentationFrame * frame = m_frames[ m_frameIndex ]; - int pixW = frame->geometry.width(); - int pixH = frame->geometry.height(); + int pixW = frame->tqgeometry.width(); + int pixH = frame->tqgeometry.height(); // if pixmap not inside the KPDFPage we request it and wait for // notifyPixmapChanged call or else we can proceed to pixmap generation @@ -470,16 +470,16 @@ void PresentationWidget::changePage( int newPage ) if (newPage + 1 < (int)m_document->pages()) { PresentationFrame *nextFrame = m_frames[ newPage + 1 ]; - pixW = nextFrame->geometry.width(); - pixH = nextFrame->geometry.height(); + pixW = nextFrame->tqgeometry.width(); + pixH = nextFrame->tqgeometry.height(); if ( !nextFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) ) requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage + 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) ); } if (newPage - 1 >= 0) { PresentationFrame *prevFrame = m_frames[ newPage - 1 ]; - pixW = prevFrame->geometry.width(); - pixH = prevFrame->geometry.height(); + pixW = prevFrame->tqgeometry.width(); + pixH = prevFrame->tqgeometry.height(); if ( !prevFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) ) requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage - 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) ); } @@ -542,7 +542,7 @@ void PresentationWidget::generateIntroPage( TQPainter & p ) // use a vertical gray gradient background int blend1 = m_height / 10, blend2 = 9 * m_height / 10; - int baseTint = Qt::gray.red(); + int baseTint = TQt::gray.red(); for ( int i = 0; i < m_height; i++ ) { int k = baseTint; @@ -580,7 +580,7 @@ void PresentationWidget::generateIntroPage( TQPainter & p ) p.setFont( f ); // text shadow - p.setPen( Qt::darkGray ); + p.setPen( TQt::darkGray ); p.drawText( 2, m_height / 4 + strHeight * i + 2, m_width, strHeight, AlignHCenter | AlignVCenter, m_metaStrings[i] ); // text body @@ -595,7 +595,7 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) PresentationFrame * frame = m_frames[ pageNum ]; // translate painter and contents rect - TQRect geom( frame->geometry ); + TQRect geom( frame->tqgeometry ); p.translate( geom.left(), geom.top() ); geom.moveBy( -geom.left(), -geom.top() ); @@ -605,11 +605,11 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) &p, geom, geom.width(), geom.height() ); // restore painter - p.translate( -frame->geometry.left(), -frame->geometry.top() ); + p.translate( -frame->tqgeometry.left(), -frame->tqgeometry.top() ); // fill unpainted areas with background color TQRegion unpainted( TQRect( 0, 0, m_width, m_height ) ); - TQMemArray<TQRect> rects = unpainted.subtract( frame->geometry ).rects(); + TQMemArray<TQRect> rects = TQRegion(unpainted.subtract( frame->tqgeometry )).tqrects(); for ( uint i = 0; i < rects.count(); i++ ) { const TQRect & r = rects[i]; @@ -617,12 +617,12 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) } } -// from Arthur - Qt4 - (is defined elsewhere as 'qt_div_255' to not break final compilation) +// from Arthur - TQt4 - (is defined elsewhere as 'qt_div_255' to not break final compilation) inline int qt_div255(int x) { return (x + (x>>8) + 0x80) >> 8; } void PresentationWidget::generateOverlay() { #ifdef ENABLE_PROGRESS_OVERLAY - // calculate overlay geometry and resize pixmap if needed + // calculate overlay tqgeometry and resize pixmap if needed int side = m_width / 16; m_overlayGeometry.setRect( m_width - side - 4, 4, side, side ); if ( m_lastRenderedOverlay.width() != side ) @@ -633,7 +633,7 @@ void PresentationWidget::generateOverlay() // painter on the double sized pixmap. side *= 2; TQPixmap doublePixmap( side, side ); - doublePixmap.fill( Qt::black ); + doublePixmap.fill( TQt::black ); TQPainter pixmapPainter( &doublePixmap ); // draw PIE SLICES in blue levels (the levels will then be the alpha component) @@ -642,10 +642,10 @@ void PresentationWidget::generateOverlay() { // draw continuous slices int degrees = (int)( 360 * (float)(m_frameIndex + 1) / (float)pages ); pixmapPainter.setPen( 0x05 ); - pixmapPainter.setBrush( 0x40 ); + pixmapPainter.setBrush( TQBrush(0x40) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, 90*16, (360-degrees)*16 ); pixmapPainter.setPen( 0x40 ); - pixmapPainter.setBrush( 0xF0 ); + pixmapPainter.setBrush( TQBrush(0xF0) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, 90*16, -degrees*16 ); } else @@ -655,15 +655,15 @@ void PresentationWidget::generateOverlay() { float newCoord = -90 + 360 * (float)(i + 1) / (float)pages; pixmapPainter.setPen( i <= m_frameIndex ? 0x40 : 0x05 ); - pixmapPainter.setBrush( i <= m_frameIndex ? 0xF0 : 0x40 ); + pixmapPainter.setBrush( TQBrush(i <= m_frameIndex ? 0xF0 : 0x40) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, (int)( -16*(oldCoord + 1) ), (int)( -16*(newCoord - (oldCoord + 2)) ) ); oldCoord = newCoord; } } int circleOut = side / 4; - pixmapPainter.setPen( Qt::black ); - pixmapPainter.setBrush( Qt::black ); + pixmapPainter.setPen( TQt::black ); + pixmapPainter.setBrush( TQBrush(TQt::black) ); pixmapPainter.drawEllipse( circleOut, circleOut, side - 2*circleOut, side - 2*circleOut ); // draw TEXT using maximum opacity @@ -672,7 +672,7 @@ void PresentationWidget::generateOverlay() pixmapPainter.setFont( f ); pixmapPainter.setPen( 0xFF ); // use a little offset to prettify output - pixmapPainter.drawText( 2, 2, side, side, Qt::AlignCenter, TQString::number( m_frameIndex + 1 ) ); + pixmapPainter.drawText( 2, 2, side, side, TQt::AlignCenter, TQString::number( m_frameIndex + 1 ) ); // end drawing pixmap and halve image pixmapPainter.end(); @@ -680,19 +680,19 @@ void PresentationWidget::generateOverlay() image.setAlphaBuffer( true ); // draw circular shadow using the same technique - doublePixmap.fill( Qt::black ); + doublePixmap.fill( TQt::black ); pixmapPainter.begin( &doublePixmap ); pixmapPainter.setPen( 0x40 ); - pixmapPainter.setBrush( 0x80 ); + pixmapPainter.setBrush( TQBrush(0x80) ); pixmapPainter.drawEllipse( 0, 0, side, side ); pixmapPainter.end(); TQImage shadow( doublePixmap.convertToImage().smoothScale( side / 2, side / 2 ) ); // generate a 2 colors pixmap using mixing shadow (made with highlight color) // and image (made with highlightedText color) - TQColor color = palette().active().highlightedText(); + TQColor color = tqpalette().active().highlightedText(); int red = color.red(), green = color.green(), blue = color.blue(); - color = palette().active().highlight(); + color = tqpalette().active().highlight(); int sRed = color.red(), sGreen = color.green(), sBlue = color.blue(); // pointers unsigned int * data = (unsigned int *)image.bits(), @@ -712,7 +712,7 @@ void PresentationWidget::generateOverlay() c1 = srcAlpha; c2 = shadowAlpha; // fuse color components and alpha value of image over shadow - data[i] = qRgba( + data[i] = tqRgba( cR = qt_div255( srcAlpha * red + (255 - srcAlpha) * sRed ), cG = qt_div255( srcAlpha * green + (255 - srcAlpha) * sGreen ), cB = qt_div255( srcAlpha * blue + (255 - srcAlpha) * sBlue ), @@ -720,12 +720,12 @@ void PresentationWidget::generateOverlay() ); } else - data[i] = qRgba( cR, cG, cB, cA ); + data[i] = tqRgba( cR, cG, cB, cA ); } m_lastRenderedOverlay.convertFromImage( image ); // start the autohide timer - repaint( m_overlayGeometry, false /*clear*/ ); // toggle with next line + tqrepaint( m_overlayGeometry, false /*clear*/ ); // toggle with next line //update( m_overlayGeometry ); m_overlayHideTimer->start( 2500, true ); #endif @@ -837,14 +837,14 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::BlindsHorizontal: { KPDFPageTransition transition( KPDFPageTransition::Blinds ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); return transition; break; } case KpdfSettings::EnumSlidesTransition::BlindsVertical: { KPDFPageTransition transition( KPDFPageTransition::Blinds ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); return transition; break; } @@ -896,7 +896,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitHorizontalIn: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); transition.setDirection( KPDFPageTransition::Inward ); return transition; break; @@ -904,7 +904,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitHorizontalOut: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); transition.setDirection( KPDFPageTransition::Outward ); return transition; break; @@ -912,7 +912,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitVerticalIn: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); transition.setDirection( KPDFPageTransition::Inward ); return transition; break; @@ -920,7 +920,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitVerticalOut: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); transition.setDirection( KPDFPageTransition::Outward ); return transition; break; @@ -963,7 +963,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const /** ONLY the TRANSITIONS GENERATION function from here on **/ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) { - // if it's just a 'replace' transition, repaint the screen + // if it's just a 'tqreplace' transition, tqrepaint the screen if ( transition->type() == KPDFPageTransition::Replace ) { update(); @@ -971,7 +971,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) } const bool isInward = transition->direction() == KPDFPageTransition::Inward; - const bool isHorizontal = transition->alignment() == KPDFPageTransition::Horizontal; + const bool isHorizontal = transition->tqalignment() == KPDFPageTransition::Horizontal; const float totalTime = transition->duration(); m_transitionRects.clear(); @@ -1175,7 +1175,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) m_transitionDelay = (int)( (totalTime * 1000) / steps ); } break; - // dissolve: replace 'random' rects + // dissolve: tqreplace 'random' rects case KPDFPageTransition::Dissolve: { const int gridXsteps = 50; @@ -1183,7 +1183,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) const int steps = gridXsteps * gridYsteps; int oldX = 0; int oldY = 0; - // create a grid of gridXstep by gridYstep QRects + // create a grid of gridXstep by gridYstep TQRects for ( int y = 0; y < gridYsteps; y++ ) { int newY = (int)( m_height * ((float)(y+1) / (float)gridYsteps) ); diff --git a/kpdf/ui/presentationwidget.h b/kpdf/ui/presentationwidget.h index 00ff5b35..00ae2bfb 100644 --- a/kpdf/ui/presentationwidget.h +++ b/kpdf/ui/presentationwidget.h @@ -35,8 +35,9 @@ class PresentationFrame; class PresentationWidget : public TQDialog, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - PresentationWidget( TQWidget * parent, KPDFDocument * doc ); + PresentationWidget( TQWidget * tqparent, KPDFDocument * doc ); ~PresentationWidget(); void setupActions( KActionCollection * ac ); @@ -59,7 +60,7 @@ class PresentationWidget : public TQDialog, public DocumentObserver void paintEvent( TQPaintEvent * e ); private: - const KPDFLink * getLink( int x, int y, TQRect * geometry = 0 ) const; + const KPDFLink * getLink( int x, int y, TQRect * tqgeometry = 0 ) const; void testCursorOnLink( int x, int y ); void overlayClick( const TQPoint & position ); void changePage( int newPage ); diff --git a/kpdf/ui/propertiesdialog.cpp b/kpdf/ui/propertiesdialog.cpp index df03422e..02743ccb 100644 --- a/kpdf/ui/propertiesdialog.cpp +++ b/kpdf/ui/propertiesdialog.cpp @@ -19,23 +19,23 @@ #include "propertiesdialog.h" #include "core/document.h" -PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) - : KDialogBase( Tabbed, i18n( "Unknown File" ), Ok, Ok, parent, 0, true, true ) +PropertiesDialog::PropertiesDialog(TQWidget *tqparent, KPDFDocument *doc) + : KDialogBase( Tabbed, i18n( "Unknown File" ), Ok, Ok, tqparent, 0, true, true ) { // Properties TQFrame *page = addPage(i18n("Properties")); - TQGridLayout *layout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); + TQGridLayout *tqlayout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); // get document info, if not present display blank data and a warning const DocumentInfo * info = doc->documentInfo(); if ( !info ) { - layout->addWidget( new TQLabel( i18n( "No document opened." ), page ), 0, 0 ); + tqlayout->addWidget( new TQLabel( i18n( "No document opened." ), page ), 0, 0 ); return; } // mime name based on mimetype id TQString mimeName = info->get( "mimeType" ).section( '/', -1 ).upper(); - setCaption( i18n("%1 Properties").arg( mimeName ) ); + setCaption( i18n("%1 Properties").tqarg( mimeName ) ); TQDomElement docElement = info->documentElement(); @@ -49,15 +49,15 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) if ( titleString.isEmpty() || valueString.isEmpty() ) continue; - // create labels and layout them - TQLabel *key = new TQLabel( i18n( "%1:" ).arg( titleString ), page ); + // create labels and tqlayout them + TQLabel *key = new TQLabel( i18n( "%1:" ).tqarg( titleString ), page ); TQLabel *value = new KSqueezedTextLabel( valueString, page ); - layout->addWidget( key, row, 0, AlignRight ); - layout->addWidget( value, row, 1 ); + tqlayout->addWidget( key, row, 0, AlignRight ); + tqlayout->addWidget( value, row, 1 ); row++; // refine maximum width of 'value' labels - valMaxWidth = QMAX( valMaxWidth, fontMetrics().width( valueString ) ); + valMaxWidth = TQMAX( valMaxWidth, fontMetrics().width( valueString ) ); } // add the number of pages if the generator hasn't done it already @@ -66,8 +66,8 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) TQLabel *key = new TQLabel( i18n( "Pages:" ), page ); TQLabel *value = new TQLabel( TQString::number( doc->pages() ), page ); - layout->addWidget( key, row, 0 ); - layout->addWidget( value, row, 1 ); + tqlayout->addWidget( key, row, 0 ); + tqlayout->addWidget( value, row, 1 ); } // Fonts @@ -82,13 +82,13 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) } // current width: left column + right column + dialog borders - int width = layout->minimumSize().width() + valMaxWidth + marginHint() + spacingHint() + marginHint() + 30; + int width = tqlayout->tqminimumSize().width() + valMaxWidth + marginHint() + spacingHint() + marginHint() + 30; if (page2Layout) { - width = QMAX( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 ); + width = TQMAX( width, page2Layout->tqsizeHint().width() + marginHint() + spacingHint() + 31 ); } // stay inside the 2/3 of the screen width TQRect screenContainer = KGlobalSettings::desktopGeometry( this ); - width = QMIN( width, 2*screenContainer.width()/3 ); + width = TQMIN( width, 2*screenContainer.width()/3 ); resize(width, 1); } diff --git a/kpdf/ui/propertiesdialog.h b/kpdf/ui/propertiesdialog.h index d5e3229a..f5541e34 100644 --- a/kpdf/ui/propertiesdialog.h +++ b/kpdf/ui/propertiesdialog.h @@ -17,7 +17,7 @@ class KPDFDocument; class PropertiesDialog : public KDialogBase { public: - PropertiesDialog( TQWidget *parent, KPDFDocument *doc ); + PropertiesDialog( TQWidget *tqparent, KPDFDocument *doc ); }; #endif diff --git a/kpdf/ui/searchwidget.cpp b/kpdf/ui/searchwidget.cpp index 36b8dd19..116df031 100644 --- a/kpdf/ui/searchwidget.cpp +++ b/kpdf/ui/searchwidget.cpp @@ -28,8 +28,8 @@ #define LEDIT_ID 2 #define FIND_ID 3 -SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document ) - : KToolBar( parent, "iSearchBar" ), m_document( document ), +SearchWidget::SearchWidget( TQWidget * tqparent, KPDFDocument * document ) + : KToolBar( tqparent, "iSearchBar" ), m_document( document ), m_searchType( 0 ), m_caseSensitive( false ) { // change toolbar appearance @@ -44,14 +44,14 @@ SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document ) this, TQT_SLOT( startSearch() ) ); // 1. text line - insertLined( TQString::null, LEDIT_ID, TQT_SIGNAL( textChanged(const TQString &) ), - this, TQT_SLOT( slotTextChanged(const TQString &) ), true, + insertLined( TQString(), LEDIT_ID, TQT_SIGNAL( textChanged(const TQString &) ), + TQT_TQOBJECT(this), TQT_SLOT( slotTextChanged(const TQString &) ), true, i18n( "Enter at least 3 letters to filter pages" ), 0/*size*/, 1 ); // 2. clear button (uses a lineEdit slot, so it must be created after) insertButton( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", CLEAR_ID, TQT_SIGNAL( clicked() ), - getLined( LEDIT_ID ), TQT_SLOT( clear() ), true, + TQT_TQOBJECT(getLined( LEDIT_ID )), TQT_SLOT( clear() ), true, i18n( "Clear filter" ), 0/*index*/ ); // 3.1. create the popup menu for changing filtering features @@ -79,10 +79,10 @@ void SearchWidget::clearText() void SearchWidget::slotTextChanged( const TQString & text ) { // if 0<length<3 set 'red' text and send a blank string to document - TQColor color = text.length() > 0 && text.length() < 3 ? Qt::darkRed : palette().active().text(); + TQColor color = text.length() > 0 && text.length() < 3 ? TQt::darkRed : tqpalette().active().text(); KLineEdit * lineEdit = getLined( LEDIT_ID ); lineEdit->setPaletteForegroundColor( color ); - lineEdit->setPaletteBackgroundColor( palette().active().base() ); + lineEdit->setPaletteBackgroundColor( tqpalette().active().base() ); m_inputDelayTimer->stop(); m_inputDelayTimer->start(333, true); } @@ -119,7 +119,7 @@ void SearchWidget::startSearch() ( (m_searchType > 1) ? KPDFDocument::GoogleAny : KPDFDocument::GoogleAll ); ok = m_document->searchText( SW_SEARCH_ID, text, true, m_caseSensitive, - type, false, qRgb( 0, 183, 255 ) ); + type, false, tqRgb( 0, 183, 255 ) ); } else m_document->resetSearch( SW_SEARCH_ID ); @@ -127,8 +127,8 @@ void SearchWidget::startSearch() if ( !ok ) { KLineEdit * lineEdit = getLined( LEDIT_ID ); - lineEdit->setPaletteForegroundColor( Qt::white ); - lineEdit->setPaletteBackgroundColor( Qt::red ); + lineEdit->setPaletteForegroundColor( TQt::white ); + lineEdit->setPaletteBackgroundColor( TQt::red ); } } diff --git a/kpdf/ui/searchwidget.h b/kpdf/ui/searchwidget.h index 33fb1459..45ecae99 100644 --- a/kpdf/ui/searchwidget.h +++ b/kpdf/ui/searchwidget.h @@ -20,7 +20,7 @@ class m_inputDelayTimer; #define SW_SEARCH_ID 3 /** - * @short A widget for find-as-you-type search. Outputs to the Document. + * @short A widget for tqfind-as-you-type search. Outputs to the Document. * * This widget accepts keyboard input and performs a call to findTextAll(..) * in the KPDFDocument class when there are 3 or more chars to search for. @@ -30,8 +30,9 @@ class m_inputDelayTimer; class SearchWidget : public KToolBar { Q_OBJECT + TQ_OBJECT public: - SearchWidget( TQWidget *parent, KPDFDocument *document ); + SearchWidget( TQWidget *tqparent, KPDFDocument *document ); void clearText(); private: diff --git a/kpdf/ui/thumbnaillist.cpp b/kpdf/ui/thumbnaillist.cpp index 49d22ee3..8c6ab951 100644 --- a/kpdf/ui/thumbnaillist.cpp +++ b/kpdf/ui/thumbnaillist.cpp @@ -27,10 +27,10 @@ #include "conf/settings.h" // ThumbnailWidget represents a single thumbnail in the ThumbnailList -class ThumbnailWidget : public QWidget +class ThumbnailWidget : public TQWidget { public: - ThumbnailWidget( TQWidget * parent, const KPDFPage * page, ThumbnailList * tl ); + ThumbnailWidget( TQWidget * tqparent, const KPDFPage * page, ThumbnailList * tl ); // set internal parameters to fit the page in the given width void resizeFitWidth( int width ); @@ -63,8 +63,8 @@ class ThumbnailWidget : public QWidget /** ThumbnailList implementation **/ -ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document ) - : TQScrollView( parent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ), +ThumbnailList::ThumbnailList( TQWidget *tqparent, KPDFDocument *document ) + : TQScrollView( tqparent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ), m_document( document ), m_selected( 0 ), m_delayTimer( 0 ), m_bookmarkOverlay( 0 ) { // set scrollbars @@ -76,13 +76,13 @@ ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document ) // widget setup: can be focused by tab and mouse click (not wheel) viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( StrongFocus ); + viewport()->setFocusPolicy( TQ_StrongFocus ); setResizePolicy( Manual ); setAcceptDrops( true ); setDragAutoScroll( false ); // set contents background to the 'base' color - viewport()->setPaletteBackgroundColor( palette().active().base() ); + viewport()->setPaletteBackgroundColor( tqpalette().active().base() ); setFrameStyle( StyledPanel | Raised ); connect( this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotRequestVisiblePixmaps(int, int)) ); @@ -184,7 +184,7 @@ void ThumbnailList::notifyViewportChanged( bool /*smoothMove*/ ) m_selected->setSelected( true ); if ( KpdfSettings::syncThumbnailsViewport() ) { - int yOffset = QMAX( visibleHeight() / 4, m_selected->height() / 2 ); + int yOffset = TQMAX( visibleHeight() / 4, m_selected->height() / 2 ); ensureVisible( 0, childY( m_selected ) + m_selected->height()/2, 0, yOffset ); } break; @@ -199,7 +199,7 @@ void ThumbnailList::notifyPageChanged( int pageNumber, int /*changedFlags*/ ) //if ( !(changedFlags & DocumentObserver::Pixmap) ) // return; - // iterate over visible items: if page(pageNumber) is one of them, repaint it + // iterate over visible items: if page(pageNumber) is one of them, tqrepaint it TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end(); for ( ; vIt != vEnd; ++vIt ) if ( (*vIt)->pageNumber() == pageNumber ) @@ -362,7 +362,7 @@ void ThumbnailList::viewportResizeEvent( TQResizeEvent * e ) else if ( e->size().height() <= e->oldSize().height() ) return; - // invalidate the bookmark overlay + // tqinvalidate the bookmark overlay if ( m_bookmarkOverlay ) { delete m_bookmarkOverlay; @@ -452,8 +452,8 @@ void ThumbnailList::delayedRequestVisiblePixmaps( int delayMs ) /** ThumbnailWidget implementation **/ -ThumbnailWidget::ThumbnailWidget( TQWidget * parent, const KPDFPage * kp, ThumbnailList * tl ) - : TQWidget( parent, 0, WNoAutoErase ), m_tl( tl ), m_page( kp ), +ThumbnailWidget::ThumbnailWidget( TQWidget * tqparent, const KPDFPage * kp, ThumbnailList * tl ) + : TQWidget( tqparent, 0, WNoAutoErase ), m_tl( tl ), m_page( kp ), m_selected( false ), m_pixmapWidth( 10 ), m_pixmapHeight( 10 ) { m_labelNumber = m_page->number() + 1; @@ -495,10 +495,10 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) TQPainter p( this ); // draw the bottom label + highlight mark - TQColor fillColor = m_selected ? palette().active().highlight() : palette().active().base(); + TQColor fillColor = m_selected ? tqpalette().active().highlight() : tqpalette().active().base(); p.fillRect( 0, 0, width, height, fillColor ); - p.setPen( m_selected ? palette().active().highlightedText() : palette().active().text() ); - p.drawText( 0, m_pixmapHeight + m_margin, width, m_labelHeight, Qt::AlignCenter, TQString::number( m_labelNumber ) ); + p.setPen( m_selected ? tqpalette().active().highlightedText() : tqpalette().active().text() ); + p.drawText( 0, m_pixmapHeight + m_margin, width, m_labelHeight, TQt::AlignCenter, TQString::number( m_labelNumber ) ); // draw page outline and pixmap if ( clipRect.top() < m_pixmapHeight + m_margin ) @@ -506,10 +506,10 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) // if page is bookmarked draw a colored border bool isBookmarked = m_page->hasBookmark(); // draw the inner rect - p.setPen( isBookmarked ? TQColor( 0xFF8000 ) : Qt::black ); + p.setPen( isBookmarked ? TQColor( 0xFF8000 ) : TQt::black ); p.drawRect( m_margin/2 - 1, m_margin/2 - 1, m_pixmapWidth + 2, m_pixmapHeight + 2 ); // draw the clear rect - p.setPen( isBookmarked ? TQColor( 0x804000 ) : palette().active().base() ); + p.setPen( isBookmarked ? TQColor( 0x804000 ) : tqpalette().active().base() ); // draw the bottom and right shadow edges if ( !isBookmarked ) { @@ -518,7 +518,7 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) right = m_margin/2 + m_pixmapWidth + 1; bottom = m_pixmapHeight + m_margin/2 + 1; top = m_margin/2 + 1; - p.setPen( Qt::gray ); + p.setPen( TQt::gray ); p.drawLine( left, bottom, right, bottom ); p.drawLine( right, top, right, bottom ); } @@ -552,8 +552,8 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) #define FILTERB_ID 1 -ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * list ) - : KToolBar( parent, "ThumbsControlBar" ) +ThumbnailController::ThumbnailController( TQWidget * tqparent, ThumbnailList * list ) + : KToolBar( tqparent, "ThumbsControlBar" ) { // change toolbar appearance setMargin( 3 ); @@ -564,7 +564,7 @@ ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * lis // insert a togglebutton [show only bookmarked pages] //insertSeparator(); insertButton( "bookmark", FILTERB_ID, TQT_SIGNAL( toggled( bool ) ), - list, TQT_SLOT( slotFilterBookmarks( bool ) ), + TQT_TQOBJECT(list), TQT_SLOT( slotFilterBookmarks( bool ) ), true, i18n( "Show bookmarked pages only" ) ); setToggle( FILTERB_ID ); setButton( FILTERB_ID, KpdfSettings::filterBookmarks() ); diff --git a/kpdf/ui/thumbnaillist.h b/kpdf/ui/thumbnaillist.h index a3f81b11..b28bd741 100644 --- a/kpdf/ui/thumbnaillist.h +++ b/kpdf/ui/thumbnaillist.h @@ -30,8 +30,9 @@ class ThumbnailWidget; class ThumbnailList : public TQScrollView, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - ThumbnailList(TQWidget *parent, KPDFDocument *document); + ThumbnailList(TQWidget *tqparent, KPDFDocument *document); ~ThumbnailList(); // inherited: return thumbnails observer id @@ -97,11 +98,11 @@ Q_OBJECT /** * @short A vertical boxed container with zero size hint (for insertion on left toolbox) */ -class ThumbnailsBox : public QVBox +class ThumbnailsBox : public TQVBox { public: - ThumbnailsBox( TQWidget * parent ) : TQVBox( parent ) {}; - TQSize sizeHint() const { return TQSize(); } + ThumbnailsBox( TQWidget * tqparent ) : TQVBox( tqparent ) {}; + TQSize tqsizeHint() const { return TQSize(); } }; /** @@ -115,7 +116,7 @@ class ThumbnailsBox : public QVBox class ThumbnailController : public KToolBar { public: - ThumbnailController( TQWidget * parent, ThumbnailList * thumbnailList ); + ThumbnailController( TQWidget * tqparent, ThumbnailList * thumbnailList ); }; #endif diff --git a/kpdf/ui/toc.cpp b/kpdf/ui/toc.cpp index 015ba313..a453f20d 100644 --- a/kpdf/ui/toc.cpp +++ b/kpdf/ui/toc.cpp @@ -25,8 +25,8 @@ class TOCItem : public KListViewItem { public: - TOCItem( KListView *parent, TOCItem *after, const TQDomElement & e ) - : KListViewItem( parent, after, e.tagName() ), m_element( e ) + TOCItem( KListView *tqparent, TOCItem *after, const TQDomElement & e ) + : KListViewItem( tqparent, after, e.tagName() ), m_element( e ) { #ifdef TOC_ENABLE_PAGE_COLUMN if ( e.hasAttribute( "Page" ) ) @@ -35,8 +35,8 @@ class TOCItem : public KListViewItem setMultiLinesEnabled(true); } - TOCItem( KListViewItem *parent, TOCItem *after, const TQDomElement & e ) - : KListViewItem( parent, after, e.tagName() ), m_element( e ) + TOCItem( KListViewItem *tqparent, TOCItem *after, const TQDomElement & e ) + : KListViewItem( tqparent, after, e.tagName() ), m_element( e ) { #ifdef TOC_ENABLE_PAGE_COLUMN if ( e.hasAttribute( "Page" ) ) @@ -54,7 +54,7 @@ class TOCItem : public KListViewItem TQDomElement m_element; }; -TOC::TOC(TQWidget *parent, KPDFDocument *document) : KListView(parent), m_document(document) +TOC::TOC(TQWidget *tqparent, KPDFDocument *document) : KListView(tqparent), m_document(document) { addColumn( i18n("Topic") ); #ifdef TOC_ENABLE_PAGE_COLUMN @@ -104,21 +104,21 @@ void TOC::notifySetup( const TQValueVector< KPDFPage * > & /*pages*/, bool docum emit hasTOC( true ); } -void TOC::addChildren( const TQDomNode & parentNode, KListViewItem * parentItem ) +void TOC::addChildren( const TQDomNode & tqparentNode, KListViewItem * tqparentItem ) { // keep track of the current listViewItem TOCItem * currentItem = 0; - TQDomNode n = parentNode.firstChild(); + TQDomNode n = tqparentNode.firstChild(); while( !n.isNull() ) { // convert the node to an element (sure it is) TQDomElement e = n.toElement(); - // insert the entry as top level (listview parented) or 2nd+ level - if ( !parentItem ) + // insert the entry as top level (listview tqparented) or 2nd+ level + if ( !tqparentItem ) currentItem = new TOCItem( this, currentItem, e ); else - currentItem = new TOCItem( parentItem, currentItem, e ); + currentItem = new TOCItem( tqparentItem, currentItem, e ); // descend recursively and advance to the next node if ( e.hasChildNodes() ) diff --git a/kpdf/ui/toc.h b/kpdf/ui/toc.h index 0f2915fd..2d0c76d7 100644 --- a/kpdf/ui/toc.h +++ b/kpdf/ui/toc.h @@ -20,8 +20,9 @@ class KPDFDocument; class TOC : public KListView, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - TOC(TQWidget *parent, KPDFDocument *document); + TOC(TQWidget *tqparent, KPDFDocument *document); ~TOC(); // inherited from DocumentObserver @@ -35,7 +36,7 @@ Q_OBJECT void slotExecuted(TQListViewItem *i); private: - void addChildren( const TQDomNode & parentNode, KListViewItem * parentItem = 0 ); + void addChildren( const TQDomNode & tqparentNode, KListViewItem * tqparentItem = 0 ); DocumentViewport getViewport( const TQDomElement &e ) const; KPDFDocument *m_document; }; diff --git a/kpdf/xpdf/xpdf/GlobalParams.cc b/kpdf/xpdf/xpdf/GlobalParams.cc index 519e81a4..24552664 100644 --- a/kpdf/xpdf/xpdf/GlobalParams.cc +++ b/kpdf/xpdf/xpdf/GlobalParams.cc @@ -2057,7 +2057,7 @@ FILE *GlobalParams::findToUnicodeFile(GString *name) { void parseStyle(TQString& name, int& weight, int& slant, int& width) { - if (name.find("MS-") == 0) name = "MS " + name.remove(0,3); + if (name.tqfind("MS-") == 0) name = "MS " + name.remove(0,3); if (!name.contains('-') && !name.contains(',')) return; TQString type = name.section(TQRegExp("[-,]"),-1); diff --git a/kpovmodeler/StyleConvention b/kpovmodeler/StyleConvention index eddc404f..f4951d75 100644 --- a/kpovmodeler/StyleConvention +++ b/kpovmodeler/StyleConvention @@ -201,11 +201,11 @@ things are set multiple times. But it works :-) (load-library "vc") ;;for QT - (setq c-C++-access-key "\\<\\(signals\\|public\\|protected\\|private - \\|public slots\\|protected slots\\|private slots\\)\\>[ \t]*:") - ;; modify the colour of slots to match public, private, etc ... + (setq c-C++-access-key "\\<\\(Q_SIGNALS\\|public\\|protected\\|private + \\|public Q_SLOTS\\|protected Q_SLOTS\\|private Q_SLOTS\\)\\>[ \t]*:") + ;; modify the colour of Q_SLOTS to match public, private, etc ... (font-lock-add-keywords 'c++-mode - '(("\\<\\(slots\\|signals\\)\\>" . font-lock-type-face))) + '(("\\<\\(Q_SLOTS\\|Q_SIGNALS\\)\\>" . font-lock-type-face))) ;; make new font for rest of qt keywords (make-face 'qt-keywords-face) (set-face-foreground 'qt-keywords-face "green") diff --git a/kpovmodeler/baseinsertrules.xml b/kpovmodeler/baseinsertrules.xml index 24aa7dd5..1d6547ce 100644 --- a/kpovmodeler/baseinsertrules.xml +++ b/kpovmodeler/baseinsertrules.xml @@ -166,7 +166,7 @@ </rule> <rule> <group name="ObjectModifier"/> - <not><parent><class name="Mesh"/></parent></not> + <not><tqparent><class name="Mesh"/></tqparent></not> </rule> </targetclass> @@ -182,11 +182,11 @@ </rule> <rule> <class name="Texture"/> - <contains><class name="Texture"/></contains> + <tqcontains><class name="Texture"/></tqcontains> </rule> <rule> <class name="InteriorTexture"/> - <contains><class name="InteriorTexture"/></contains> + <tqcontains><class name="InteriorTexture"/></tqcontains> </rule> </targetclass> @@ -211,16 +211,16 @@ <class name="SolidColor"/> <class name="ColorList"/> <class name="DensityList"/> - <not><contains><group name="Sum"/></contains></not> + <not><tqcontains><group name="Sum"/></tqcontains></not> </rule> <rule> <class name="Pattern"/> <and> <not> - <contains> + <tqcontains> <class name="Pattern"/> <group name="ListPattern"/> - </contains> + </tqcontains> </not> <not><after><group name="Map"/></after></not> <not><after><class name="Warp"/></after></not> @@ -236,11 +236,11 @@ <group name="Map"/> <and> <not> - <contains> + <tqcontains> <group name="Map"/> <group name="ListPattern"/> <class name="SolidColor"/> - </contains> + </tqcontains> </not> <not><before><class name="Pattern"/></before></not> </and> @@ -297,15 +297,15 @@ </rule> <rule> <class name="LooksLike"/> - <not><contains><class name="LooksLike"/></contains></not> + <not><tqcontains><class name="LooksLike"/></tqcontains></not> </rule> <rule> <class name="ProjectedThrough"/> - <not><contains><class name="ProjectedThrough"/></contains></not> + <not><tqcontains><class name="ProjectedThrough"/></tqcontains></not> </rule> <rule> <class name="Photons"/> - <not><contains><class name="Photons"/></contains></not> + <not><tqcontains><class name="Photons"/></tqcontains></not> </rule> </targetclass> @@ -420,9 +420,9 @@ <rule> <class name="GraphicalObject"/> <not> - <contains> + <tqcontains> <class name="GraphicalObject"/> - </contains> + </tqcontains> </not> </rule> </targetclass> @@ -435,9 +435,9 @@ <rule> <class name="GraphicalObject"/> <not> - <contains> + <tqcontains> <class name="GraphicalObject"/> - </contains> + </tqcontains> </not> </rule> </targetclass> @@ -450,9 +450,9 @@ <rule> <class name="GraphicalObject"/> <not> - <contains> + <tqcontains> <class name="GraphicalObject"/> - </contains> + </tqcontains> </not> </rule> </targetclass> @@ -485,7 +485,7 @@ <rule> <class name="BumpMap"/> <not> - <contains> + <tqcontains> <class name="BumpMap"/> <class name="NormalList"/> <class name="Pattern"/> @@ -493,31 +493,31 @@ <class name="SlopeMap"/> <class name="Warp"/> <class name="BlendMapModifiers"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="NormalList"/> <not> - <contains> + <tqcontains> <class name="BumpMap"/> <class name="NormalList"/> <class name="Pattern"/> <class name="NormalMap"/> <class name="SlopeMap"/> <class name="Warp"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Pattern"/> <and> <not> - <contains> + <tqcontains> <class name="BumpMap"/> <class name="NormalList"/> <class name="Pattern"/> - </contains> + </tqcontains> </not> <not><after><class name="NormalMap"/></after></not> <not><after><class name="SlopeMap"/></after></not> @@ -534,11 +534,11 @@ <class name="NormalMap"/> <and> <not> - <contains> + <tqcontains> <class name="BumpMap"/> <class name="NormalMap"/> <class name="NormalList"/> - </contains> + </tqcontains> </not> <not><after><class name="SlopeMap"/></after></not> <not><after><class name="BlendMapModifiers"/></after></not> @@ -549,11 +549,11 @@ <class name="SlopeMap"/> <and> <not> - <contains> + <tqcontains> <class name="BumpMap"/> <class name="SlopeMap"/> <class name="NormalList"/> - </contains> + </tqcontains> </not> <not><after><class name="BlendMapModifiers"/></after></not> <not><after><group name="Transformations"/></after></not> @@ -563,14 +563,14 @@ <rule> <class name="BlendMapModifiers"/> <and> - <not><contains><class name="BlendMapModifiers"/></contains></not> + <not><tqcontains><class name="BlendMapModifiers"/></tqcontains></not> <or> <not> - <contains> + <tqcontains> <class name="BumpMap"/> <class name="NormalMap"/> <class name="SlopeMap"/> - </contains> + </tqcontains> </not> <after><class name="NormalMap"/></after> <after><class name="SlopeMap"/></after> @@ -613,17 +613,17 @@ <rule> <group name="Color"/> <group name="ListPattern"/> - <not><contains><group name="Sum"/></contains></not> + <not><tqcontains><group name="Sum"/></tqcontains></not> </rule> <rule> <class name="Pattern"/> <and> <not> - <contains> + <tqcontains> <group name="Color"/> <class name="Pattern"/> <group name="ListPattern"/> - </contains> + </tqcontains> </not> <not><after><group name="Map"/></after></not> <not><after><class name="Warp"/></after></not> @@ -639,11 +639,11 @@ <group name="Map"/> <and> <not> - <contains> + <tqcontains> <group name="Map"/> <group name="ListPattern"/> <group name="Color"/> - </contains> + </tqcontains> </not> <not><before><class name="Pattern"/></before></not> </and> @@ -652,10 +652,10 @@ <class name="BlendMapModifiers"/> <and> <not> - <contains> + <tqcontains> <class name="BlendMapModifiers"/> <group name="Color"/> - </contains> + </tqcontains> </not> <not><before><group name="Map"/></before></not> <not><before><class name="Pattern"/></before></not> @@ -695,18 +695,18 @@ </rule> <rule> <class name="GlobalSettings"/> - <not><contains><class name="GlobalSettings"/></contains></not> + <not><tqcontains><class name="GlobalSettings"/></tqcontains></not> </rule> </targetclass> <targetclass name="GlobalSettings"> <rule> <class name="Radiosity"/> - <not><contains><class name="Radiosity"/></contains></not> + <not><tqcontains><class name="Radiosity"/></tqcontains></not> </rule> <rule> <class name="GlobalPhotons"/> - <not><contains><class name="GlobalPhotons"/></contains></not> + <not><tqcontains><class name="GlobalPhotons"/></tqcontains></not> </rule> </targetclass> @@ -734,56 +734,56 @@ <rule> <class name="MaterialMap"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <group name="SumPigment"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Pigment"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <class name="Pigment"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Normal"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <class name="Normal"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Finish"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <class name="Finish"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Pattern"/> <and> <not> - <contains> + <tqcontains> <class name="Pattern"/> <class name="TextureList"/> <group name="SumPigment"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> <not><after><class name="TextureMap"/></after></not> <not><after><class name="Warp"/></after></not> @@ -795,12 +795,12 @@ <class name="TextureMap"/> <and> <not> - <contains> + <tqcontains> <class name="TextureMap"/> <class name="TextureList"/> <group name="SumPigment"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> <not><before><class name="Pattern"/></before></not> <not><after><class name="BlendMapModifiers"/></after></not> @@ -809,12 +809,12 @@ <rule> <class name="TextureList"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <group name="SumPigment"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> </rule> <rule> @@ -829,10 +829,10 @@ <class name="BlendMapModifiers"/> <and> <not> - <contains> + <tqcontains> <class name="MaterialMap"/> <class name="BlendMapModifiers"/> - </contains> + </tqcontains> </not> <not><before><class name="TextureMap"/></before></not> <not><before><class name="Pattern"/></before></not> @@ -860,56 +860,56 @@ <rule> <class name="MaterialMap"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <group name="SumPigment"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Pigment"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <class name="Pigment"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Normal"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <class name="Normal"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Finish"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <class name="Finish"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> </rule> <rule> <class name="Pattern"/> <and> <not> - <contains> + <tqcontains> <class name="Pattern"/> <class name="TextureList"/> <group name="SumPigment"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> <not><after><class name="TextureMap"/></after></not> <not><after><class name="Warp"/></after></not> @@ -921,12 +921,12 @@ <class name="TextureMap"/> <and> <not> - <contains> + <tqcontains> <class name="TextureMap"/> <class name="TextureList"/> <group name="SumPigment"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> <not><before><class name="Pattern"/></before></not> <not><after><class name="BlendMapModifiers"/></after></not> @@ -935,12 +935,12 @@ <rule> <class name="TextureList"/> <not> - <contains> + <tqcontains> <class name="TextureList"/> <group name="SumMap"/> <group name="SumPigment"/> <class name="MaterialMap"/> - </contains> + </tqcontains> </not> </rule> <rule> @@ -955,10 +955,10 @@ <class name="BlendMapModifiers"/> <and> <not> - <contains> + <tqcontains> <class name="MaterialMap"/> <class name="BlendMapModifiers"/> - </contains> + </tqcontains> </not> <not><before><class name="TextureMap"/></before></not> <not><before><class name="Pattern"/></before></not> diff --git a/kpovmodeler/pm2dcontrolpoint.cpp b/kpovmodeler/pm2dcontrolpoint.cpp index f8450715..244b106f 100644 --- a/kpovmodeler/pm2dcontrolpoint.cpp +++ b/kpovmodeler/pm2dcontrolpoint.cpp @@ -197,7 +197,7 @@ PMVector PM2DControlPoint::to3D( const PMVector& v ) const void PM2DControlPoint::addLinkedPoint( PM2DControlPoint* p ) { - if( !m_linkedPoints.containsRef( p ) ) + if( !m_linkedPoints.tqcontainsRef( p ) ) m_linkedPoints.append( p ); } diff --git a/kpovmodeler/pmactions.cpp b/kpovmodeler/pmactions.cpp index 12bb479b..d13ddf06 100644 --- a/kpovmodeler/pmactions.cpp +++ b/kpovmodeler/pmactions.cpp @@ -29,31 +29,31 @@ #include "pmdebug.h" // Fixed widths are calculated wrong in a toolbar. -// Fixed sizeHint for the combo box to return +// Fixed tqsizeHint for the combo box to return // at least the minimum size -class PMComboBox : public QComboBox +class PMComboBox : public TQComboBox { public: - PMComboBox( TQWidget* parent, const char* name = 0 ) - : TQComboBox( parent, name ) + PMComboBox( TQWidget* tqparent, const char* name = 0 ) + : TQComboBox( tqparent, name ) { } - virtual TQSize minimumSizeHint( ) const + virtual TQSize tqminimumSizeHint( ) const { - TQSize s = TQComboBox::minimumSizeHint( ); - return s.expandedTo( minimumSize( ) ); + TQSize s = TQComboBox::tqminimumSizeHint( ); + return s.expandedTo( tqminimumSize( ) ); } - virtual TQSize sizeHint( ) const + virtual TQSize tqsizeHint( ) const { - TQSize s = TQComboBox::sizeHint( ); - return s.expandedTo( minimumSize( ) ); + TQSize s = TQComboBox::tqsizeHint( ); + return s.expandedTo( tqminimumSize( ) ); } }; PMComboAction::PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, - TQObject* parent, const char* name ) - : KAction( text, accel, parent, name ) + TQObject* tqparent, const char* name ) + : KAction( text, accel, tqparent, name ) { m_receiver = receiver; m_member = member; @@ -117,16 +117,16 @@ void PMComboAction::unplug( TQWidget *w ) // Use a toolbutton instead of a label so it is styled correctly. // copied from konq_actions.cc -class PMToolBarLabel : public QToolButton +class PMToolBarLabel : public TQToolButton { public: - PMToolBarLabel( const TQString& text, TQWidget* parent = 0, const char* name = 0 ) - : TQToolButton( parent, name ) + PMToolBarLabel( const TQString& text, TQWidget* tqparent = 0, const char* name = 0 ) + : TQToolButton( tqparent, name ) { setText( text ); } protected: - TQSize sizeHint( ) const + TQSize tqsizeHint( ) const { int w = fontMetrics( ).width( text( ) ); int h = fontMetrics( ).height( ); @@ -134,21 +134,17 @@ protected: } void drawButton( TQPainter* p ) { -#if ( QT_VERSION >= 300 ) // Draw the background - style( ).drawComplexControl( TQStyle::CC_ToolButton, p, this, rect( ), colorGroup( ), + tqstyle( ).tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, rect( ), tqcolorGroup( ), TQStyle::Style_Enabled, TQStyle::SC_ToolButton ); // Draw the label - style( ).drawControl( TQStyle::CE_ToolButtonLabel, p, this, rect( ), colorGroup( ), + tqstyle( ).tqdrawControl( TQStyle::CE_ToolButtonLabel, p, this, rect( ), tqcolorGroup( ), TQStyle::Style_Enabled ); -#else - p->drawText( rect( ), Qt::AlignVCenter | Qt::AlignLeft, text( ) ); -#endif } }; -PMLabelAction::PMLabelAction( const TQString &text, TQObject *parent, const char *name ) - : KAction( text, 0, parent, name ) +PMLabelAction::PMLabelAction( const TQString &text, TQObject *tqparent, const char *name ) + : KAction( text, 0, tqparent, name ) { m_button = 0; } @@ -197,8 +193,8 @@ void PMLabelAction::unplug( TQWidget *widget ) PMSpinBoxAction::PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, - TQObject* parent, const char* name ) - : KAction( text, accel, parent, name ) + TQObject* tqparent, const char* name ) + : KAction( text, accel, tqparent, name ) { m_receiver = receiver; m_member = member; diff --git a/kpovmodeler/pmactions.h b/kpovmodeler/pmactions.h index 6575caa8..4e058273 100644 --- a/kpovmodeler/pmactions.h +++ b/kpovmodeler/pmactions.h @@ -36,8 +36,9 @@ class TQToolButton; class PMComboAction : public KAction { Q_OBJECT + TQ_OBJECT public: - PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* parent, const char* name ); + PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* tqparent, const char* name ); ~PMComboAction( ); virtual int plug( TQWidget* w, int index = -1 ); @@ -67,8 +68,9 @@ private: class PMLabelAction : public KAction { Q_OBJECT + TQ_OBJECT public: - PMLabelAction( const TQString &text, TQObject *parent = 0, const char *name = 0 ); + PMLabelAction( const TQString &text, TQObject *tqparent = 0, const char *name = 0 ); virtual int plug( TQWidget *widget, int index = -1 ); virtual void unplug( TQWidget *widget ); @@ -84,8 +86,9 @@ private: class PMSpinBoxAction : public KAction { Q_OBJECT + TQ_OBJECT public: - PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* parent, const char* name ); + PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* tqparent, const char* name ); ~PMSpinBoxAction( ); virtual int plug( TQWidget* w, int index = -1 ); diff --git a/kpovmodeler/pmaddcommand.cpp b/kpovmodeler/pmaddcommand.cpp index b8d4ea49..1f34e82c 100644 --- a/kpovmodeler/pmaddcommand.cpp +++ b/kpovmodeler/pmaddcommand.cpp @@ -26,11 +26,11 @@ #include <klocale.h> -PMAddCommand::PMAddCommand( PMObject* obj, PMObject* parent, PMObject* after ) - : PMCommand( i18n( "Add New %1" ).arg( obj->description( ) ) ) +PMAddCommand::PMAddCommand( PMObject* obj, PMObject* tqparent, PMObject* after ) + : PMCommand( i18n( "Add New %1" ).tqarg( obj->description( ) ) ) { m_objects.append( obj ); - m_pParent = parent; + m_pParent = tqparent; m_pAfter = after; m_executed = false; m_firstExecution = true; @@ -38,12 +38,12 @@ PMAddCommand::PMAddCommand( PMObject* obj, PMObject* parent, PMObject* after ) m_pParentChangeMemento = 0; } -PMAddCommand::PMAddCommand( const PMObjectList& list, PMObject* parent, +PMAddCommand::PMAddCommand( const PMObjectList& list, PMObject* tqparent, PMObject* after ) : PMCommand( i18n( "Add Objects" ) ) { m_objects = list; - m_pParent = parent; + m_pParent = tqparent; m_pAfter = after; m_executed = false; m_firstExecution = true; @@ -116,8 +116,8 @@ void PMAddCommand::execute( PMCommandManager* theManager ) for( ; links.current( ); ++links ) { PMObject* l = links.current( ); - if( l->parent( ) ) - l->parent( )->takeChild( l ); + if( l->tqparent( ) ) + l->tqparent( )->takeChild( l ); else m_objects.removeRef( l ); m_insertErrors.append( l ); @@ -186,7 +186,7 @@ void PMAddCommand::undo( PMCommandManager* theManager ) if( decl ) { m_links.append( lit.current( ) ); - if( !m_linkedDeclares.containsRef( decl ) ) + if( !m_linkedDeclares.tqcontainsRef( decl ) ) m_linkedDeclares.append( decl ); } } @@ -204,8 +204,8 @@ void PMAddCommand::undo( PMCommandManager* theManager ) // signal has to be emitted before the item is removed theManager->cmdObjectChanged( obj, PMCRemove ); - if( obj->parent( ) ) - obj->parent( )->takeChild( obj ); + if( obj->tqparent( ) ) + obj->tqparent( )->takeChild( obj ); } if( m_pParentChangeMemento ) diff --git a/kpovmodeler/pmaddcommand.h b/kpovmodeler/pmaddcommand.h index 97793d03..a5759ea8 100644 --- a/kpovmodeler/pmaddcommand.h +++ b/kpovmodeler/pmaddcommand.h @@ -38,22 +38,22 @@ public: /** * Command that adds a new PMObject. * - * The object obj will be inserted as child of parent after + * The object obj will be inserted as child of tqparent after * the object after. * * If after is 0, the object becomes the first child. */ - PMAddCommand( PMObject* obj, PMObject* parent, PMObject* after ); + PMAddCommand( PMObject* obj, PMObject* tqparent, PMObject* after ); /** * Command that adds a list of new PMObjects. * - * The object in the list will be inserted as children of parent after + * The object in the list will be inserted as tqchildren of tqparent after * the object after. * - * If after is 0, the objects will be inserted as first children. + * If after is 0, the objects will be inserted as first tqchildren. */ - PMAddCommand( const PMObjectList& list, PMObject* parent, PMObject* after ); + PMAddCommand( const PMObjectList& list, PMObject* tqparent, PMObject* after ); /** * Deletes the command. The inserted object will be deleted, if the command was not executed (or undo-ed) */ diff --git a/kpovmodeler/pmbicubicpatch.cpp b/kpovmodeler/pmbicubicpatch.cpp index 2c1c99dd..df66ec52 100644 --- a/kpovmodeler/pmbicubicpatch.cpp +++ b/kpovmodeler/pmbicubicpatch.cpp @@ -177,10 +177,10 @@ void PMBicubicPatch::serialize( TQDomElement& e, TQDomDocument& doc ) const e.setAttribute( "uvEnabled", m_uvEnabled ); for( i = 0; i < 16; i++ ) - e.setAttribute( TQString( "cp%1" ).arg( i ), m_point[i].serializeXML( ) ); + e.setAttribute( TQString( "cp%1" ).tqarg( i ), m_point[i].serializeXML( ) ); for( i = 0; i < 4; ++i ) - e.setAttribute( TQString( "uv%1" ).arg( i ), m_uvVectors[i].serializeXML( ) ); + e.setAttribute( TQString( "uv%1" ).tqarg( i ), m_uvVectors[i].serializeXML( ) ); Base::serialize( e, doc ); } @@ -198,7 +198,7 @@ void PMBicubicPatch::readAttributes( const PMXMLHelper& h ) for( v = 0; v < 4; v++ ) for( u = 0; u < 4; u++ ) - m_point[u+v*4] = h.vectorAttribute( TQString( "cp%1" ).arg( u+v*4 ), + m_point[u+v*4] = h.vectorAttribute( TQString( "cp%1" ).tqarg( u+v*4 ), PMVector( o + s * u, 0, o + s * v ) ); m_uvVectors[0] = h.vectorAttribute( "uv0", c_defaultUVVector0 ); @@ -209,11 +209,11 @@ void PMBicubicPatch::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBicubicPatch::metaObject( ) const +PMMetaObject* PMBicubicPatch::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BicubicPatch", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BicubicPatch", Base::tqmetaObject( ), createNewBicubicPatch ); s_pMetaObject->addProperty( new PMBicubicPatchProperty( "patchType", &PMBicubicPatch::setPatchType, @@ -365,9 +365,9 @@ PMVector PMBicubicPatch::uvVector( int i ) const return PMVector( 0.0, 0.0 ); } -PMDialogEditBase* PMBicubicPatch::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBicubicPatch::editWidget( TQWidget* tqparent ) const { - return new PMBicubicPatchEdit( parent ); + return new PMBicubicPatchEdit( tqparent ); } void PMBicubicPatch::restoreMemento( PMMemento* s ) @@ -527,7 +527,7 @@ void PMBicubicPatch::controlPoints( PMControlPointList& list ) for( v = 0; v < 4; v++ ) for( u = 0; u < 4; u++ ) list.append( new PM3DControlPoint( m_point[u+v*4], u+v*4, - i18n( "Point (%1, %2)" ).arg( u ).arg( v ) ) ); + i18n( "Point (%1, %2)" ).tqarg( u ).tqarg( v ) ) ); } void PMBicubicPatch::controlPointsChanged( PMControlPointList& list ) diff --git a/kpovmodeler/pmbicubicpatch.h b/kpovmodeler/pmbicubicpatch.h index d14f7821..2c1a623b 100644 --- a/kpovmodeler/pmbicubicpatch.h +++ b/kpovmodeler/pmbicubicpatch.h @@ -55,7 +55,7 @@ public: /** */ virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMBicubicPatchEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmbicubicpatchedit.cpp b/kpovmodeler/pmbicubicpatchedit.cpp index 8dff49b0..64cb3db8 100644 --- a/kpovmodeler/pmbicubicpatchedit.cpp +++ b/kpovmodeler/pmbicubicpatchedit.cpp @@ -29,8 +29,8 @@ #include <tqcheckbox.h> #include <klocale.h> -PMBicubicPatchEdit::PMBicubicPatchEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBicubicPatchEdit::PMBicubicPatchEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -39,32 +39,32 @@ void PMBicubicPatchEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pType = new TQComboBox( false, this ); m_pType->insertItem( i18n( "Normal (type 0)" ) ); m_pType->insertItem( i18n( "Preprocessed (type 1)" ) ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); - layout->addWidget( m_pType ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); + tqlayout->addWidget( m_pType ); + tqlayout->addStretch( 1 ); m_pUSteps = new PMIntEdit( this ); m_pUSteps->setValidation( true, 0, false, 0 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Steps:" ) + " u", this ) ); - layout->addWidget( m_pUSteps ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Steps:" ) + " u", this ) ); + tqlayout->addWidget( m_pUSteps ); m_pVSteps = new PMIntEdit( this ); m_pVSteps->setValidation( true, 0, false, 0 ); - layout->addWidget( new TQLabel( "v", this ) ); - layout->addWidget( m_pVSteps ); + tqlayout->addWidget( new TQLabel( "v", this ) ); + tqlayout->addWidget( m_pVSteps ); m_pFlatness = new PMFloatEdit( this ); m_pFlatness->setValidation( true, 0.0, false, 0.0 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Flatness:" ), this ) ); - layout->addWidget( m_pFlatness ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Flatness:" ), this ) ); + tqlayout->addWidget( m_pFlatness ); + tqlayout->addStretch( 1 ); topLayout( )->addWidget( new TQLabel( i18n( "Points:" ), this ) ); diff --git a/kpovmodeler/pmbicubicpatchedit.h b/kpovmodeler/pmbicubicpatchedit.h index ac00f00a..cb27810f 100644 --- a/kpovmodeler/pmbicubicpatchedit.h +++ b/kpovmodeler/pmbicubicpatchedit.h @@ -39,12 +39,13 @@ class TQCheckBox; class PMBicubicPatchEdit : public PMGraphicalObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMGraphicalObjectEdit Base; public: /** - * Creates a PMBicubicPatchEdit with parent and name + * Creates a PMBicubicPatchEdit with tqparent and name */ - PMBicubicPatchEdit( TQWidget* parent, const char* name = 0 ); + PMBicubicPatchEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblendmapmodifiers.cpp b/kpovmodeler/pmblendmapmodifiers.cpp index 9d26419e..22511200 100644 --- a/kpovmodeler/pmblendmapmodifiers.cpp +++ b/kpovmodeler/pmblendmapmodifiers.cpp @@ -57,11 +57,11 @@ PMBlendMapModifiers::~PMBlendMapModifiers( ) { } -PMMetaObject* PMBlendMapModifiers::metaObject( ) const +PMMetaObject* PMBlendMapModifiers::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BlendMapModifiers", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BlendMapModifiers", Base::tqmetaObject( ), createBlendMapModifiers ); s_pMetaObject->addProperty( new PMBlendMapModifiersProperty( "frequencyEnabled", &PMBlendMapModifiers::enableFrequency, @@ -236,9 +236,9 @@ void PMBlendMapModifiers::setWaveFormType( PMWaveFormType c ) } } -PMDialogEditBase* PMBlendMapModifiers::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBlendMapModifiers::editWidget( TQWidget* tqparent ) const { - return new PMBlendMapModifiersEdit( parent ); + return new PMBlendMapModifiersEdit( tqparent ); } void PMBlendMapModifiers::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmblendmapmodifiers.h b/kpovmodeler/pmblendmapmodifiers.h index ecf0bfed..fb7d2623 100644 --- a/kpovmodeler/pmblendmapmodifiers.h +++ b/kpovmodeler/pmblendmapmodifiers.h @@ -57,7 +57,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMBlendMapModifiersEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmblendmapmodifiers" ); } diff --git a/kpovmodeler/pmblendmapmodifiersedit.cpp b/kpovmodeler/pmblendmapmodifiersedit.cpp index fd443623..b18f3eed 100644 --- a/kpovmodeler/pmblendmapmodifiersedit.cpp +++ b/kpovmodeler/pmblendmapmodifiersedit.cpp @@ -37,8 +37,8 @@ #include <kdialog.h> #include <kfiledialog.h> -PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmblendmapmodifiersedit.h b/kpovmodeler/pmblendmapmodifiersedit.h index 18f3fa87..db3c764e 100644 --- a/kpovmodeler/pmblendmapmodifiersedit.h +++ b/kpovmodeler/pmblendmapmodifiersedit.h @@ -43,12 +43,13 @@ class TQPushButton; class PMBlendMapModifiersEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMBlendMapModifiersEdit with parent and name + * Creates a PMBlendMapModifiersEdit with tqparent and name */ - PMBlendMapModifiersEdit( TQWidget* parent, const char* name = 0 ); + PMBlendMapModifiersEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblob.cpp b/kpovmodeler/pmblob.cpp index 6621cadf..5dc5bb6c 100644 --- a/kpovmodeler/pmblob.cpp +++ b/kpovmodeler/pmblob.cpp @@ -77,11 +77,11 @@ void PMBlob::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBlob::metaObject( ) const +PMMetaObject* PMBlob::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Blob", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Blob", Base::tqmetaObject( ), createNewBlob ); s_pMetaObject->addProperty( new PMBlobProperty( "threshold", &PMBlob::setThreshold, &PMBlob::threshold ) ); @@ -139,9 +139,9 @@ void PMBlob::setHierarchy( bool h ) } } -PMDialogEditBase* PMBlob::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBlob::editWidget( TQWidget* tqparent ) const { - return new PMBlobEdit( parent ); + return new PMBlobEdit( tqparent ); } void PMBlob::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmblob.h b/kpovmodeler/pmblob.h index 2c764590..801e5338 100644 --- a/kpovmodeler/pmblob.h +++ b/kpovmodeler/pmblob.h @@ -52,7 +52,7 @@ public: /** */ virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -63,7 +63,7 @@ public: /** * Returns a new @ref PMBlobEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmblobcylinder.cpp b/kpovmodeler/pmblobcylinder.cpp index d166a6a3..217a5743 100644 --- a/kpovmodeler/pmblobcylinder.cpp +++ b/kpovmodeler/pmblobcylinder.cpp @@ -93,11 +93,11 @@ void PMBlobCylinder::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBlobCylinder::metaObject( ) const +PMMetaObject* PMBlobCylinder::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BlobCylinder", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BlobCylinder", Base::tqmetaObject( ), createNewBlobCylinder ); s_pMetaObject->addProperty( new PMBlobCylinderProperty( "end1", &PMBlobCylinder::setEnd1, @@ -160,9 +160,9 @@ void PMBlobCylinder::setStrength( double s ) } } -PMDialogEditBase* PMBlobCylinder::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBlobCylinder::editWidget( TQWidget* tqparent ) const { - return new PMBlobCylinderEdit( parent ); + return new PMBlobCylinderEdit( tqparent ); } void PMBlobCylinder::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmblobcylinder.h b/kpovmodeler/pmblobcylinder.h index 1e9a10f1..8959cee9 100644 --- a/kpovmodeler/pmblobcylinder.h +++ b/kpovmodeler/pmblobcylinder.h @@ -57,7 +57,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMBlobCylinderEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmblobcylinderedit.cpp b/kpovmodeler/pmblobcylinderedit.cpp index 34910df0..f3e702d0 100644 --- a/kpovmodeler/pmblobcylinderedit.cpp +++ b/kpovmodeler/pmblobcylinderedit.cpp @@ -26,8 +26,8 @@ #include <klocale.h> #include <tqcheckbox.h> -PMBlobCylinderEdit::PMBlobCylinderEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBlobCylinderEdit::PMBlobCylinderEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -36,7 +36,7 @@ void PMBlobCylinderEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); @@ -50,13 +50,13 @@ void PMBlobCylinderEdit::createTopWidgets( ) gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - gl = new TQGridLayout( layout, 2, 2 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( tqlayout, 2, 2 ); gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); gl->addWidget( new TQLabel( i18n( "Strength:" ), this ), 1, 0 ); gl->addWidget( m_pStrength, 1, 1 ); - layout->addStretch( 1 ); + tqlayout->addStretch( 1 ); connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmblobcylinderedit.h b/kpovmodeler/pmblobcylinderedit.h index b9ab169e..dbe24134 100644 --- a/kpovmodeler/pmblobcylinderedit.h +++ b/kpovmodeler/pmblobcylinderedit.h @@ -33,12 +33,13 @@ class PMBlobCylinder; class PMBlobCylinderEdit : public PMDetailObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMDetailObjectEdit Base; public: /** - * Creates a PMBlobCylinderEdit with parent and name + * Creates a PMBlobCylinderEdit with tqparent and name */ - PMBlobCylinderEdit( TQWidget* parent, const char* name = 0 ); + PMBlobCylinderEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblobedit.cpp b/kpovmodeler/pmblobedit.cpp index a38d9639..b7dc2034 100644 --- a/kpovmodeler/pmblobedit.cpp +++ b/kpovmodeler/pmblobedit.cpp @@ -25,8 +25,8 @@ #include <tqcheckbox.h> #include <klocale.h> -PMBlobEdit::PMBlobEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBlobEdit::PMBlobEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmblobedit.h b/kpovmodeler/pmblobedit.h index 5677fb9b..bada56da 100644 --- a/kpovmodeler/pmblobedit.h +++ b/kpovmodeler/pmblobedit.h @@ -36,12 +36,13 @@ class TQCheckBox; class PMBlobEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMBlobEdit with parent and name + * Creates a PMBlobEdit with tqparent and name */ - PMBlobEdit( TQWidget* parent, const char* name = 0 ); + PMBlobEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblobsphere.cpp b/kpovmodeler/pmblobsphere.cpp index cbcd33a4..fc8af594 100644 --- a/kpovmodeler/pmblobsphere.cpp +++ b/kpovmodeler/pmblobsphere.cpp @@ -72,11 +72,11 @@ TQString PMBlobSphere::description( ) const return i18n( "blob sphere" ); } -PMMetaObject* PMBlobSphere::metaObject( ) const +PMMetaObject* PMBlobSphere::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BlobSphere", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BlobSphere", Base::tqmetaObject( ), createNewBlobSphere ); s_pMetaObject->addProperty( new PMBlobSphereProperty( "center", &PMBlobSphere::setCentre, @@ -107,9 +107,9 @@ void PMBlobSphere::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMBlobSphere::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBlobSphere::editWidget( TQWidget* tqparent ) const { - return new PMBlobSphereEdit( parent ); + return new PMBlobSphereEdit( tqparent ); } void PMBlobSphere::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmblobsphere.h b/kpovmodeler/pmblobsphere.h index 0abe983e..4ae57e5c 100644 --- a/kpovmodeler/pmblobsphere.h +++ b/kpovmodeler/pmblobsphere.h @@ -55,7 +55,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMBlobSphereEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmblobsphereedit.cpp b/kpovmodeler/pmblobsphereedit.cpp index ba4e226b..6b569b93 100644 --- a/kpovmodeler/pmblobsphereedit.cpp +++ b/kpovmodeler/pmblobsphereedit.cpp @@ -24,8 +24,8 @@ #include <tqlabel.h> #include <klocale.h> -PMBlobSphereEdit::PMBlobSphereEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBlobSphereEdit::PMBlobSphereEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -34,23 +34,23 @@ void PMBlobSphereEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pCentre = new PMVectorEdit( "x", "y", "z", this ); m_pRadius = new PMFloatEdit( this ); m_pStrength = new PMFloatEdit( this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Center:" ), this ) ); - layout->addWidget( m_pCentre ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Center:" ), this ) ); + tqlayout->addWidget( m_pCentre ); - layout = new TQHBoxLayout( topLayout( ) ); - TQGridLayout* gl = new TQGridLayout( layout, 2, 2 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + TQGridLayout* gl = new TQGridLayout( tqlayout, 2, 2 ); gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); gl->addWidget( new TQLabel( i18n( "Strength:" ), this ), 1, 0 ); gl->addWidget( m_pStrength, 1, 1 ); - layout->addStretch( 1 ); + tqlayout->addStretch( 1 ); connect( m_pCentre, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmblobsphereedit.h b/kpovmodeler/pmblobsphereedit.h index 53b65ab2..d4f18058 100644 --- a/kpovmodeler/pmblobsphereedit.h +++ b/kpovmodeler/pmblobsphereedit.h @@ -34,12 +34,13 @@ class PMFloatEdit ; class PMBlobSphereEdit : public PMDetailObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMDetailObjectEdit Base; public: /** - * Creates a PMBlobSphereEdit with parent and name + * Creates a PMBlobSphereEdit with tqparent and name */ - PMBlobSphereEdit( TQWidget* parent, const char* name = 0 ); + PMBlobSphereEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmboundedby.cpp b/kpovmodeler/pmboundedby.cpp index 5cc66e55..3e123d29 100644 --- a/kpovmodeler/pmboundedby.cpp +++ b/kpovmodeler/pmboundedby.cpp @@ -40,11 +40,11 @@ PMBoundedBy::~PMBoundedBy( ) { } -PMMetaObject* PMBoundedBy::metaObject( ) const +PMMetaObject* PMBoundedBy::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BoundedBy", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BoundedBy", Base::tqmetaObject( ), createNewBoundedBy ); s_pMetaObject->addProperty( new PMBoundedByProperty( "clippedBy", 0, &PMBoundedBy::clippedBy ) ); @@ -91,9 +91,9 @@ void PMBoundedBy::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMBoundedBy::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBoundedBy::editWidget( TQWidget* tqparent ) const { - return new PMBoundedByEdit( parent ); + return new PMBoundedByEdit( tqparent ); } void PMBoundedBy::childRemoved( PMObject* o ) diff --git a/kpovmodeler/pmboundedby.h b/kpovmodeler/pmboundedby.h index 7c88a6aa..997cef0f 100644 --- a/kpovmodeler/pmboundedby.h +++ b/kpovmodeler/pmboundedby.h @@ -49,7 +49,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMBoundedByEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmboundedbyedit.cpp b/kpovmodeler/pmboundedbyedit.cpp index 8a41fa52..db0b7b01 100644 --- a/kpovmodeler/pmboundedbyedit.cpp +++ b/kpovmodeler/pmboundedbyedit.cpp @@ -23,8 +23,8 @@ #include <tqlabel.h> #include <klocale.h> -PMBoundedByEdit::PMBoundedByEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBoundedByEdit::PMBoundedByEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmboundedbyedit.h b/kpovmodeler/pmboundedbyedit.h index 53da66f2..f575fbb8 100644 --- a/kpovmodeler/pmboundedbyedit.h +++ b/kpovmodeler/pmboundedbyedit.h @@ -35,12 +35,13 @@ class TQLabel; class PMBoundedByEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMBoundedByEdit with parent and name + * Creates a PMBoundedByEdit with tqparent and name */ - PMBoundedByEdit( TQWidget* parent, const char* name = 0 ); + PMBoundedByEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmbox.cpp b/kpovmodeler/pmbox.cpp index 155ebc68..0f2bedb3 100644 --- a/kpovmodeler/pmbox.cpp +++ b/kpovmodeler/pmbox.cpp @@ -76,11 +76,11 @@ void PMBox::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBox::metaObject( ) const +PMMetaObject* PMBox::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Box", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Box", Base::tqmetaObject( ), createNewBox ); s_pMetaObject->addProperty( new PMBoxProperty( "corner1", &PMBox::setCorner1, &PMBox::corner1 ) ); @@ -114,9 +114,9 @@ void PMBox::setCorner2( const PMVector& p ) } } -PMDialogEditBase* PMBox::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBox::editWidget( TQWidget* tqparent ) const { - return new PMBoxEdit( parent ); + return new PMBoxEdit( tqparent ); } void PMBox::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmbox.h b/kpovmodeler/pmbox.h index e6abcf75..bf499042 100644 --- a/kpovmodeler/pmbox.h +++ b/kpovmodeler/pmbox.h @@ -56,7 +56,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMBoxEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmboxedit.cpp b/kpovmodeler/pmboxedit.cpp index 6b6a2f2a..c13da80d 100644 --- a/kpovmodeler/pmboxedit.cpp +++ b/kpovmodeler/pmboxedit.cpp @@ -24,8 +24,8 @@ #include <tqlabel.h> #include <klocale.h> -PMBoxEdit::PMBoxEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBoxEdit::PMBoxEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmboxedit.h b/kpovmodeler/pmboxedit.h index 7fd6fadc..f9f0bf6d 100644 --- a/kpovmodeler/pmboxedit.h +++ b/kpovmodeler/pmboxedit.h @@ -35,12 +35,13 @@ class PMVectorEdit; class PMBoxEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMBoxEdit with parent and name + * Creates a PMBoxEdit with tqparent and name */ - PMBoxEdit( TQWidget* parent, const char* name = 0 ); + PMBoxEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmbumpmap.cpp b/kpovmodeler/pmbumpmap.cpp index 21fb29a3..ebdabab5 100644 --- a/kpovmodeler/pmbumpmap.cpp +++ b/kpovmodeler/pmbumpmap.cpp @@ -200,11 +200,11 @@ void PMBumpMap::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMBumpMap::metaObject( ) const +PMMetaObject* PMBumpMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "BumpMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "BumpMap", Base::tqmetaObject( ), createNewBumpMap ); PMBitmapTypeProperty* bp = new PMBitmapTypeProperty( @@ -336,9 +336,9 @@ void PMBumpMap::setBumpSize( double c ) } } -PMDialogEditBase* PMBumpMap::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMBumpMap::editWidget( TQWidget* tqparent ) const { - return new PMBumpMapEdit( parent ); + return new PMBumpMapEdit( tqparent ); } void PMBumpMap::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmbumpmap.h b/kpovmodeler/pmbumpmap.h index ccdf5b98..64fb632f 100644 --- a/kpovmodeler/pmbumpmap.h +++ b/kpovmodeler/pmbumpmap.h @@ -72,7 +72,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -87,7 +87,7 @@ public: /** * Returns a new @ref PMBumpMapEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Gets the bitmap type diff --git a/kpovmodeler/pmbumpmapedit.cpp b/kpovmodeler/pmbumpmapedit.cpp index f5de7a55..011e9873 100644 --- a/kpovmodeler/pmbumpmapedit.cpp +++ b/kpovmodeler/pmbumpmapedit.cpp @@ -38,8 +38,8 @@ #include <kfiledialog.h> #include <kiconloader.h> -PMBumpMapEdit::PMBumpMapEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMBumpMapEdit::PMBumpMapEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -307,7 +307,7 @@ void PMBumpMapEdit::slotImageFileNameChanged( const TQString& /*a*/ ) void PMBumpMapEdit::slotImageFileBrowseClicked( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmbumpmapedit.h b/kpovmodeler/pmbumpmapedit.h index 109128d6..8404229b 100644 --- a/kpovmodeler/pmbumpmapedit.h +++ b/kpovmodeler/pmbumpmapedit.h @@ -45,12 +45,13 @@ class TQPushButton; class PMBumpMapEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMBumpMapEdit with parent and name + * Creates a PMBumpMapEdit with tqparent and name */ - PMBumpMapEdit( TQWidget* parent, const char* name = 0 ); + PMBumpMapEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); /** */ diff --git a/kpovmodeler/pmcamera.cpp b/kpovmodeler/pmcamera.cpp index ca37f751..697628a4 100644 --- a/kpovmodeler/pmcamera.cpp +++ b/kpovmodeler/pmcamera.cpp @@ -165,11 +165,11 @@ void PMCamera::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMCamera::metaObject( ) const +PMMetaObject* PMCamera::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Camera", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Camera", Base::tqmetaObject( ), createNewCamera ); s_pMetaObject->addProperty( new PMCameraProperty( "location", &PMCamera::setLocation, @@ -443,9 +443,9 @@ void PMCamera::setExportPovray( bool ex ) } } -PMDialogEditBase* PMCamera::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMCamera::editWidget( TQWidget* tqparent ) const { - return new PMCameraEdit( parent ); + return new PMCameraEdit( tqparent ); } void PMCamera::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmcamera.h b/kpovmodeler/pmcamera.h index 7d385909..1c93c718 100644 --- a/kpovmodeler/pmcamera.h +++ b/kpovmodeler/pmcamera.h @@ -60,7 +60,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -70,7 +70,7 @@ public: /** * Returns a new @ref PMCameraEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmcamera" ); } diff --git a/kpovmodeler/pmcameraedit.cpp b/kpovmodeler/pmcameraedit.cpp index 471fa19a..1376efb9 100644 --- a/kpovmodeler/pmcameraedit.cpp +++ b/kpovmodeler/pmcameraedit.cpp @@ -30,8 +30,8 @@ #include <kmessagebox.h> -PMCameraEdit::PMCameraEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMCameraEdit::PMCameraEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -40,7 +40,7 @@ void PMCameraEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQGridLayout* layout; + TQGridLayout* tqlayout; TQLabel* label; m_pCameraType = new TQComboBox( false, this ); @@ -53,10 +53,10 @@ void PMCameraEdit::createTopWidgets( ) m_pCameraType->insertItem( i18n( "Cylinder" ) ); m_pCylinderType = new TQComboBox( false, this ); - m_pCylinderType->insertItem( i18n( "1: Vertical, Fixed Viewpoint" ) ); - m_pCylinderType->insertItem( i18n( "2: Horizontal, Fixed Viewpoint" ) ); - m_pCylinderType->insertItem( i18n( "3: Vertical, Variable Viewpoint" ) ); - m_pCylinderType->insertItem( i18n( "4: Horizontal, Variable Viewpoint" ) ); + m_pCylinderType->insertItem( i18n( "1:Qt::Vertical, Fixed Viewpoint" ) ); + m_pCylinderType->insertItem( i18n( "2:Qt::Horizontal, Fixed Viewpoint" ) ); + m_pCylinderType->insertItem( i18n( "3:Qt::Vertical, Variable Viewpoint" ) ); + m_pCylinderType->insertItem( i18n( "4:Qt::Horizontal, Variable Viewpoint" ) ); m_pLocation = new PMVectorEdit( "x", "y", "z", this ); m_pSky = new PMVectorEdit( "x", "y", "z", this ); @@ -75,28 +75,28 @@ void PMCameraEdit::createTopWidgets( ) hl->addWidget( m_pCylinderTypeLabel ); hl->addWidget( m_pCylinderType ); - layout = new TQGridLayout( topLayout( ), 7, 2 ); - layout->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 ); - layout->addWidget( m_pLocation, 0, 1 ); + tqlayout = new TQGridLayout( topLayout( ), 7, 2 ); + tqlayout->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 ); + tqlayout->addWidget( m_pLocation, 0, 1 ); - layout->addWidget( new TQLabel( i18n( "Sky:" ), this ), 1, 0 ); - layout->addWidget( m_pSky, 1, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Sky:" ), this ), 1, 0 ); + tqlayout->addWidget( m_pSky, 1, 1 ); - layout->addWidget( new TQLabel( i18n( "Direction:" ), this ), 2, 0 ); - layout->addWidget( m_pDirection, 2, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Direction:" ), this ), 2, 0 ); + tqlayout->addWidget( m_pDirection, 2, 1 ); - layout->addWidget( new TQLabel( i18n( "Right:" ), this ), 3, 0 ); - layout->addWidget( m_pRight, 3, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Right:" ), this ), 3, 0 ); + tqlayout->addWidget( m_pRight, 3, 1 ); - layout->addWidget( new TQLabel( i18n( "Up:" ), this ), 4, 0 ); - layout->addWidget( m_pUp, 4, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Up:" ), this ), 4, 0 ); + tqlayout->addWidget( m_pUp, 4, 1 ); - layout->addWidget( new TQLabel( i18n( "Look at:" ), this ), 5, 0 ); - layout->addWidget( m_pLookAt, 5, 1 ); + tqlayout->addWidget( new TQLabel( i18n( "Look at:" ), this ), 5, 0 ); + tqlayout->addWidget( m_pLookAt, 5, 1 ); m_pEnableAngle = new TQCheckBox( i18n( "Angle:" ), this ); - layout->addWidget( m_pEnableAngle, 6, 0 ); - layout->addWidget( m_pAngle, 6, 1, AlignLeft ); + tqlayout->addWidget( m_pEnableAngle, 6, 0 ); + tqlayout->addWidget( m_pAngle, 6, 1, AlignLeft ); m_pFocalBlur = new TQCheckBox( i18n( "Focal blur" ), this ); topLayout( )->addWidget( m_pFocalBlur ); @@ -116,27 +116,27 @@ void PMCameraEdit::createTopWidgets( ) m_pVariance->setValidation( true, 0, false, 0 ); m_focalWidgets.append( m_pVariance ); - layout = new TQGridLayout( topLayout( ), 5, 2 ); + tqlayout = new TQGridLayout( topLayout( ), 5, 2 ); label = new TQLabel( i18n( "Aperture:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 0, 0 ); - layout->addWidget( m_pAperture, 0, 1 ); + tqlayout->addWidget( label, 0, 0 ); + tqlayout->addWidget( m_pAperture, 0, 1 ); label = new TQLabel( i18n( "Blur samples:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 1, 0 ); - layout->addWidget( m_pBlurSamples, 1, 1 ); + tqlayout->addWidget( label, 1, 0 ); + tqlayout->addWidget( m_pBlurSamples, 1, 1 ); label = new TQLabel( i18n( "Focal point:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 2, 0 ); - layout->addWidget( m_pFocalPoint, 2, 1 ); + tqlayout->addWidget( label, 2, 0 ); + tqlayout->addWidget( m_pFocalPoint, 2, 1 ); label = new TQLabel( i18n( "Confidence:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 3, 0 ); - layout->addWidget( m_pConfidence, 3, 1 ); + tqlayout->addWidget( label, 3, 0 ); + tqlayout->addWidget( m_pConfidence, 3, 1 ); label = new TQLabel( i18n( "Variance:" ), this ); m_focalWidgets.append( label ); - layout->addWidget( label, 4, 0 ); - layout->addWidget( m_pVariance, 4, 1 ); + tqlayout->addWidget( label, 4, 0 ); + tqlayout->addWidget( m_pVariance, 4, 1 ); m_pExport = new TQCheckBox( i18n( "Export to renderer" ), this ); topLayout( )->addWidget( m_pExport ); diff --git a/kpovmodeler/pmcameraedit.h b/kpovmodeler/pmcameraedit.h index a9ed5ee9..33b9c39b 100644 --- a/kpovmodeler/pmcameraedit.h +++ b/kpovmodeler/pmcameraedit.h @@ -41,12 +41,13 @@ class TQCheckBox; class PMCameraEdit : public PMNamedObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMNamedObjectEdit Base; public: /** - * Creates a PMCameraEdit with parent and name + * Creates a PMCameraEdit with tqparent and name */ - PMCameraEdit( TQWidget* parent, const char* name = 0 ); + PMCameraEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmclippedby.cpp b/kpovmodeler/pmclippedby.cpp index 24ea4e46..529e0962 100644 --- a/kpovmodeler/pmclippedby.cpp +++ b/kpovmodeler/pmclippedby.cpp @@ -40,11 +40,11 @@ PMClippedBy::~PMClippedBy( ) { } -PMMetaObject* PMClippedBy::metaObject( ) const +PMMetaObject* PMClippedBy::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ClippedBy", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "ClippedBy", Base::tqmetaObject( ), createNewClippedBy ); s_pMetaObject->addProperty( new PMClippedByProperty( "boundedBy", 0, &PMClippedBy::boundedBy ) ); @@ -91,9 +91,9 @@ void PMClippedBy::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMClippedBy::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMClippedBy::editWidget( TQWidget* tqparent ) const { - return new PMClippedByEdit( parent ); + return new PMClippedByEdit( tqparent ); } void PMClippedBy::childRemoved( PMObject* o ) diff --git a/kpovmodeler/pmclippedby.h b/kpovmodeler/pmclippedby.h index 0e76e2cf..6c9d21a1 100644 --- a/kpovmodeler/pmclippedby.h +++ b/kpovmodeler/pmclippedby.h @@ -48,7 +48,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -63,7 +63,7 @@ public: /** * Returns a new @ref PMClippedByEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmclippedbyedit.cpp b/kpovmodeler/pmclippedbyedit.cpp index 8afa0285..486b58f2 100644 --- a/kpovmodeler/pmclippedbyedit.cpp +++ b/kpovmodeler/pmclippedbyedit.cpp @@ -23,8 +23,8 @@ #include <tqlabel.h> #include <klocale.h> -PMClippedByEdit::PMClippedByEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMClippedByEdit::PMClippedByEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmclippedbyedit.h b/kpovmodeler/pmclippedbyedit.h index 5b22f564..9050f406 100644 --- a/kpovmodeler/pmclippedbyedit.h +++ b/kpovmodeler/pmclippedbyedit.h @@ -35,12 +35,13 @@ class TQLabel; class PMClippedByEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMClippedByEdit with parent and name + * Creates a PMClippedByEdit with tqparent and name */ - PMClippedByEdit( TQWidget* parent, const char* name = 0 ); + PMClippedByEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmcolor.cpp b/kpovmodeler/pmcolor.cpp index cac668e7..1f895861 100644 --- a/kpovmodeler/pmcolor.cpp +++ b/kpovmodeler/pmcolor.cpp @@ -76,7 +76,7 @@ PMColor::PMColor( const TQColor& c ) m_colorValue[4] = 0.0; } -TQColor PMColor::toQColor( ) const +TQColor PMColor::toTQColor( ) const { double r, g, b, max = 0; r = red( ); diff --git a/kpovmodeler/pmcolor.h b/kpovmodeler/pmcolor.h index 5c3c4ec8..61fd4c63 100644 --- a/kpovmodeler/pmcolor.h +++ b/kpovmodeler/pmcolor.h @@ -95,9 +95,9 @@ public: double transmit( ) const { return m_colorValue[4]; } /** - * Returns the rgb value as QColor + * Returns the rgb value as TQColor */ - TQColor toQColor( ) const; + TQColor toTQColor( ) const; /** * Returns a string for serialization diff --git a/kpovmodeler/pmcoloredit.cpp b/kpovmodeler/pmcoloredit.cpp index 9695f9eb..1c282f78 100644 --- a/kpovmodeler/pmcoloredit.cpp +++ b/kpovmodeler/pmcoloredit.cpp @@ -24,8 +24,8 @@ #include <tqcolor.h> #include <kdialog.h> -PMColorEdit::PMColorEdit( bool filterAndTransmit, TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMColorEdit::PMColorEdit( bool filterAndTransmit, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_bFilterAndTransmit = filterAndTransmit; @@ -106,7 +106,7 @@ void PMColorEdit::updateButton( ) { bool b = m_pButton->signalsBlocked( ); m_pButton->blockSignals( true ); - m_pButton->setColor( m_color.toQColor( ) ); + m_pButton->setColor( m_color.toTQColor( ) ); m_pButton->blockSignals( b ); } diff --git a/kpovmodeler/pmcoloredit.h b/kpovmodeler/pmcoloredit.h index a4be0083..4ef27e00 100644 --- a/kpovmodeler/pmcoloredit.h +++ b/kpovmodeler/pmcoloredit.h @@ -34,14 +34,15 @@ class TQColor; /** * Edit widget for @ref PMColor */ -class PMColorEdit : public QWidget +class PMColorEdit : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Creates an edit widget for rgbft colors. */ - PMColorEdit( bool filterAndTransmit, TQWidget* parent, const char* name = 0 ); + PMColorEdit( bool filterAndTransmit, TQWidget* tqparent, const char* name = 0 ); /** * Sets the displayed color diff --git a/kpovmodeler/pmcolorsettings.cpp b/kpovmodeler/pmcolorsettings.cpp index c0dafa37..2b444407 100644 --- a/kpovmodeler/pmcolorsettings.cpp +++ b/kpovmodeler/pmcolorsettings.cpp @@ -25,63 +25,63 @@ #include <kcolorbutton.h> #include <klocale.h> -PMColorSettings::PMColorSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMColorSettings::PMColorSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQGridLayout* grid; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - grid = new TQGridLayout( vlayout, 6, 3 ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + grid = new TQGridLayout( vtqlayout, 6, 3 ); grid->addWidget( new TQLabel( i18n( "Background:" ), this ), 0, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 0, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 0, 2 ); m_pBackgroundColor = new KColorButton( this ); - hlayout->addWidget( m_pBackgroundColor ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pBackgroundColor ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Wire frame:" ), this ), 1, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 1, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 1, 2 ); m_pGraphicalObjectsColor[0] = new KColorButton( this ); - hlayout->addWidget( m_pGraphicalObjectsColor[0] ); - hlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); + htqlayout->addWidget( m_pGraphicalObjectsColor[0] ); + htqlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); m_pGraphicalObjectsColor[1] = new KColorButton( this ); - hlayout->addWidget( m_pGraphicalObjectsColor[1] ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pGraphicalObjectsColor[1] ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Control points:" ), this ), 2, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 2, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 2, 2 ); m_pControlPointsColor[0] = new KColorButton( this ); - hlayout->addWidget( m_pControlPointsColor[0] ); - hlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); + htqlayout->addWidget( m_pControlPointsColor[0] ); + htqlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); m_pControlPointsColor[1] = new KColorButton( this ); - hlayout->addWidget( m_pControlPointsColor[1] ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pControlPointsColor[1] ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Axes:" ), this ), 3, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 3, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 3, 2 ); grid->addWidget( new TQLabel( "x", this ), 3, 1 ); m_pAxesColor[0] = new KColorButton( this ); - hlayout->addWidget( m_pAxesColor[0] ); - hlayout->addWidget( new TQLabel( "y", this ) ); + htqlayout->addWidget( m_pAxesColor[0] ); + htqlayout->addWidget( new TQLabel( "y", this ) ); m_pAxesColor[1] = new KColorButton( this ); - hlayout->addWidget( m_pAxesColor[1] ); - hlayout->addWidget( new TQLabel( "z", this ) ); + htqlayout->addWidget( m_pAxesColor[1] ); + htqlayout->addWidget( new TQLabel( "z", this ) ); m_pAxesColor[2] = new KColorButton( this ); - hlayout->addWidget( m_pAxesColor[2] ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pAxesColor[2] ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Field of view:" ), this ), 4, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 4, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 4, 2 ); m_pFieldOfViewColor = new KColorButton( this ); - hlayout->addWidget( m_pFieldOfViewColor ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pFieldOfViewColor ); + htqlayout->addStretch( 1 ); } void PMColorSettings::displaySettings( ) @@ -118,21 +118,21 @@ bool PMColorSettings::validateData( ) void PMColorSettings::applySettings( ) { - bool repaint = false; + bool tqrepaint = false; int i; PMRenderManager* rm = PMRenderManager::theManager( ); if( rm->backgroundColor( ) != m_pBackgroundColor->color( ) ) { rm->setBackgroundColor( m_pBackgroundColor->color( ) ); - repaint = true; + tqrepaint = true; } for( i = 0; i < 2; i++ ) { if( rm->graphicalObjectColor( i ) != m_pGraphicalObjectsColor[i]->color( ) ) { rm->setGraphicalObjectColor( i, m_pGraphicalObjectsColor[i]->color( ) ); - repaint = true; + tqrepaint = true; } } for( i = 0; i < 2; i++ ) @@ -140,7 +140,7 @@ void PMColorSettings::applySettings( ) if( rm->controlPointColor( i ) != m_pControlPointsColor[i]->color( ) ) { rm->setControlPointColor( i, m_pControlPointsColor[i]->color( ) ); - repaint = true; + tqrepaint = true; } } for( i = 0; i < 3; i++ ) @@ -148,16 +148,16 @@ void PMColorSettings::applySettings( ) if( rm->axesColor( i ) != m_pAxesColor[i]->color( ) ) { rm->setAxesColor( i, m_pAxesColor[i]->color( ) ); - repaint = true; + tqrepaint = true; } } if( rm->fieldOfViewColor( ) != m_pFieldOfViewColor->color( ) ) { rm->setFieldOfViewColor( m_pFieldOfViewColor->color( ) ); - repaint = true; + tqrepaint = true; } - if( repaint ) - emit repaintViews( ); + if( tqrepaint ) + emit tqrepaintViews( ); } #include "pmcolorsettings.moc" diff --git a/kpovmodeler/pmcolorsettings.h b/kpovmodeler/pmcolorsettings.h index 8b903d47..703bf6cf 100644 --- a/kpovmodeler/pmcolorsettings.h +++ b/kpovmodeler/pmcolorsettings.h @@ -32,11 +32,12 @@ class KColorButton; class PMColorSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMColorSettings( TQWidget* parent, const char* name = 0 ); + PMColorSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmcommand.h b/kpovmodeler/pmcommand.h index 5d32b9d4..d1e53c99 100644 --- a/kpovmodeler/pmcommand.h +++ b/kpovmodeler/pmcommand.h @@ -42,8 +42,8 @@ class PMPart; * PMCRemove: An object was removed. A signal with this constant has * to be emitted _before_ the object is removed. * - * PMCChildren: Some children are added or removed. Do not use. Use PMCAdd and - * PMCRemove for all childrens. + * PMCChildren: Some tqchildren are added or removed. Do not use. Use PMCAdd and + * PMCRemove for all tqchildrens. * * PMCData: Data (for dialog views) is changed * diff --git a/kpovmodeler/pmcommandmanager.cpp b/kpovmodeler/pmcommandmanager.cpp index f122a7a4..8e02f988 100644 --- a/kpovmodeler/pmcommandmanager.cpp +++ b/kpovmodeler/pmcommandmanager.cpp @@ -45,7 +45,7 @@ void PMCommandManager::execute( PMCommand* cmd ) m_commands.removeFirst( ); m_redoCommands.clear( ); - emit updateUndoRedo( cmd->text( ), TQString::null ); + emit updateUndoRedo( cmd->text( ), TQString() ); } void PMCommandManager::undo( ) @@ -58,7 +58,7 @@ void PMCommandManager::undo( ) m_redoCommands.append( m_commands.take( ) ); if( m_commands.isEmpty( ) ) - emit updateUndoRedo( TQString::null, last->text( ) ); + emit updateUndoRedo( TQString(), last->text( ) ); else emit updateUndoRedo( m_commands.last( )->text( ), last->text( ) ); } @@ -74,7 +74,7 @@ void PMCommandManager::redo( ) m_commands.append( m_redoCommands.take( ) ); if( m_redoCommands.isEmpty( ) ) - emit updateUndoRedo( last->text( ), TQString::null ); + emit updateUndoRedo( last->text( ), TQString() ); else emit updateUndoRedo( last->text( ), m_redoCommands.last( )->text( ) ); } @@ -84,7 +84,7 @@ void PMCommandManager::clear( ) { m_redoCommands.clear( ); m_commands.clear( ); - emit updateUndoRedo( TQString::null, TQString::null ); + emit updateUndoRedo( TQString(), TQString() ); } void PMCommandManager::cmdObjectChanged( PMObject* obj, const int mode ) diff --git a/kpovmodeler/pmcommandmanager.h b/kpovmodeler/pmcommandmanager.h index 5fc960d1..4a86e2d9 100644 --- a/kpovmodeler/pmcommandmanager.h +++ b/kpovmodeler/pmcommandmanager.h @@ -36,9 +36,10 @@ class PMPart; * The class PMCommandManager stores stacks of commands for undo/redo * operations. */ -class PMCommandManager : public QObject +class PMCommandManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Creates a new PMCommandManager diff --git a/kpovmodeler/pmcomment.cpp b/kpovmodeler/pmcomment.cpp index 90c817fd..7d12dfbc 100644 --- a/kpovmodeler/pmcomment.cpp +++ b/kpovmodeler/pmcomment.cpp @@ -108,11 +108,11 @@ void PMComment::setText( const TQString& text ) } } -PMMetaObject* PMComment::metaObject( ) const +PMMetaObject* PMComment::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Comment", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Comment", Base::tqmetaObject( ), createNewComment ); s_pMetaObject->addProperty( new PMCommentProperty( "text", &PMComment::setText, &PMComment::text ) ); @@ -143,9 +143,9 @@ void PMComment::readAttributes( const PMXMLHelper& h ) m_text = e.toText( ).data( ); } -PMDialogEditBase* PMComment::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMComment::editWidget( TQWidget* tqparent ) const { - return new PMCommentEdit( parent ); + return new PMCommentEdit( tqparent ); } void PMComment::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmcomment.h b/kpovmodeler/pmcomment.h index d435423d..64514452 100644 --- a/kpovmodeler/pmcomment.h +++ b/kpovmodeler/pmcomment.h @@ -62,7 +62,7 @@ public: virtual PMObject* copy( ) const { return new PMComment( *this ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -75,7 +75,7 @@ public: virtual void readAttributes( const PMXMLHelper& h ); /** */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmcomment" ); } /** */ diff --git a/kpovmodeler/pmcommentedit.cpp b/kpovmodeler/pmcommentedit.cpp index 28e98ed3..b9f5daac 100644 --- a/kpovmodeler/pmcommentedit.cpp +++ b/kpovmodeler/pmcommentedit.cpp @@ -23,8 +23,8 @@ #include <tqmultilineedit.h> #include <kglobalsettings.h> -PMCommentEdit::PMCommentEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMCommentEdit::PMCommentEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -34,10 +34,8 @@ void PMCommentEdit::createTopWidgets( ) Base::createTopWidgets( ); m_pEdit = new TQMultiLineEdit( this ); -#if ( QT_VERSION >= 300 ) - m_pEdit->setTextFormat( Qt::PlainText ); + m_pEdit->setTextFormat( TQt::PlainText ); m_pEdit->setWordWrap( TQTextEdit::NoWrap ); -#endif m_pEdit->setFont( KGlobalSettings::fixedFont( ) ); topLayout( )->addWidget( m_pEdit, 2 ); diff --git a/kpovmodeler/pmcommentedit.h b/kpovmodeler/pmcommentedit.h index 3d3fb0c1..da44246b 100644 --- a/kpovmodeler/pmcommentedit.h +++ b/kpovmodeler/pmcommentedit.h @@ -35,12 +35,13 @@ class TQMultiLineEdit; class PMCommentEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMCommentEdit with parent and name + * Creates a PMCommentEdit with tqparent and name */ - PMCommentEdit( TQWidget* parent, const char* name = 0 ); + PMCommentEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmcompositeobject.cpp b/kpovmodeler/pmcompositeobject.cpp index d8b61e8c..e9369ea4 100644 --- a/kpovmodeler/pmcompositeobject.cpp +++ b/kpovmodeler/pmcompositeobject.cpp @@ -67,10 +67,10 @@ PMCompositeObject::~PMCompositeObject( ) delete m_pViewStructure; } -PMMetaObject* PMCompositeObject::metaObject( ) const +PMMetaObject* PMCompositeObject::tqmetaObject( ) const { if( !s_pMetaObject ) - s_pMetaObject = new PMMetaObject( "CompositeObject", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "CompositeObject", Base::tqmetaObject( ) ); return s_pMetaObject; } @@ -84,7 +84,7 @@ void PMCompositeObject::cleanUp( ) const Base::cleanUp( ); } -PMObject* PMCompositeObject::childAt( uint index ) const +PMObject* PMCompositeObject::tqchildAt( uint index ) const { PMObject* tmp; uint i = 0; @@ -96,7 +96,7 @@ PMObject* PMCompositeObject::childAt( uint index ) const int PMCompositeObject::findChild( PMObject* o ) { - if( o->parent( ) != this ) + if( o->tqparent( ) != this ) return -1; PMObject* tmp; @@ -136,7 +136,7 @@ bool PMCompositeObject::insertChild( PMObject* o, int i ) } else { - PMObject* tmp = childAt( ( uint ) ( i - 1 ) ); + PMObject* tmp = tqchildAt( ( uint ) ( i - 1 ) ); if( !tmp ) { kdError( PMArea ) << "Index too big" << "\n"; @@ -272,7 +272,7 @@ bool PMCompositeObject::takeChild( PMObject* o ) bool PMCompositeObject::takeChild( uint i ) { - PMObject* tmp = childAt( i ); + PMObject* tmp = tqchildAt( i ); if( tmp ) return takeChild( tmp ); kdError( PMArea ) << "Index too big"; diff --git a/kpovmodeler/pmcompositeobject.h b/kpovmodeler/pmcompositeobject.h index 350180db..0d7ae6df 100644 --- a/kpovmodeler/pmcompositeobject.h +++ b/kpovmodeler/pmcompositeobject.h @@ -44,12 +44,12 @@ public: */ PMCompositeObject( const PMCompositeObject& o ); /** - * Deletes the object and all children. + * Deletes the object and all tqchildren. */ virtual ~PMCompositeObject( ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,13 +65,13 @@ public: * Returns a pointer to the child object at position index, * or null if the index is out of range. */ - virtual PMObject* childAt( uint index ) const; + virtual PMObject* tqchildAt( uint index ) const; /** * Returns true if the object contains the child object o */ virtual bool containsChild( PMObject* o ) const - { return ( ( PMObject* )this == o->parent( ) ); } + { return ( ( PMObject* )this == o->tqparent( ) ); } /** * Returns the index of the object or -1 if not found */ @@ -96,7 +96,7 @@ public: */ virtual bool appendChild( PMObject* ); /** - * Returns the number of children. + * Returns the number of tqchildren. */ virtual int countChildren( ) const; /** @@ -135,7 +135,7 @@ public: protected: /** * Adds num to the number of selected objects in this object and all - * parent objects. num can be negative. + * tqparent objects. num can be negative. */ virtual void adjustSelectedChildren( int num ); diff --git a/kpovmodeler/pmcone.cpp b/kpovmodeler/pmcone.cpp index c6fd719e..3a90d131 100644 --- a/kpovmodeler/pmcone.cpp +++ b/kpovmodeler/pmcone.cpp @@ -100,11 +100,11 @@ void PMCone::readAttributes( const PMXMLHelper & h ) Base::readAttributes( h ); } -PMMetaObject* PMCone::metaObject( ) const +PMMetaObject* PMCone::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Cone", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Cone", Base::tqmetaObject( ), createNewCone ); s_pMetaObject->addProperty( new PMConeProperty( "end1", &PMCone::setEnd1, &PMCone::end1 ) ); @@ -176,9 +176,9 @@ void PMCone::setOpen( bool op ) } } -PMDialogEditBase* PMCone::editWidget( TQWidget * parent ) const +PMDialogEditBase* PMCone::editWidget( TQWidget * tqparent ) const { - return new PMConeEdit( parent ); + return new PMConeEdit( tqparent ); } void PMCone::restoreMemento( PMMemento * s ) diff --git a/kpovmodeler/pmcone.h b/kpovmodeler/pmcone.h index c41f9325..aa452b64 100644 --- a/kpovmodeler/pmcone.h +++ b/kpovmodeler/pmcone.h @@ -62,7 +62,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -71,7 +71,7 @@ public: /** * Returns a new @ref PMConeEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmconeedit.cpp b/kpovmodeler/pmconeedit.cpp index 9969e4d7..006add43 100644 --- a/kpovmodeler/pmconeedit.cpp +++ b/kpovmodeler/pmconeedit.cpp @@ -26,8 +26,8 @@ #include <klocale.h> #include <tqcheckbox.h> -PMConeEdit::PMConeEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMConeEdit::PMConeEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -36,7 +36,7 @@ void PMConeEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); @@ -51,13 +51,13 @@ void PMConeEdit::createTopWidgets( ) gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - gl = new TQGridLayout( layout, 2, 2 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( tqlayout, 2, 2 ); gl->addWidget( new TQLabel( i18n( "Radius 1:" ), this ), 0, 0 ); gl->addWidget( m_pRadius1, 0, 1 ); gl->addWidget( new TQLabel( i18n( "Radius 2:" ), this ), 1, 0 ); gl->addWidget( m_pRadius2, 1, 1 ); - layout->addStretch( 1 ); + tqlayout->addStretch( 1 ); topLayout( )->addWidget( m_pOpen ); diff --git a/kpovmodeler/pmconeedit.h b/kpovmodeler/pmconeedit.h index f4e689fc..d5210124 100644 --- a/kpovmodeler/pmconeedit.h +++ b/kpovmodeler/pmconeedit.h @@ -35,12 +35,13 @@ class PMCone; class PMConeEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMConeEdit with parent and name + * Creates a PMConeEdit with tqparent and name */ - PMConeEdit( TQWidget* parent, const char* name = 0 ); + PMConeEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmcsg.cpp b/kpovmodeler/pmcsg.cpp index 0ac7e58a..c8316a53 100644 --- a/kpovmodeler/pmcsg.cpp +++ b/kpovmodeler/pmcsg.cpp @@ -130,11 +130,11 @@ void PMCSG::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMCSG::metaObject( ) const +PMMetaObject* PMCSG::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "CSG", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "CSG", Base::tqmetaObject( ), createNewCSG ); PMCSGTypeProperty* p = new PMCSGTypeProperty( "csgType", &PMCSG::setCSGType, &PMCSG::csgType ); p->addEnumValue( "union", CSGUnion ); @@ -169,9 +169,9 @@ void PMCSG::setCSGType( const PMCSGType t ) } } -PMDialogEditBase* PMCSG::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMCSG::editWidget( TQWidget* tqparent ) const { - return new PMCSGEdit( parent ); + return new PMCSGEdit( tqparent ); } void PMCSG::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmcsg.h b/kpovmodeler/pmcsg.h index 380bf0ef..3424a6c7 100644 --- a/kpovmodeler/pmcsg.h +++ b/kpovmodeler/pmcsg.h @@ -62,7 +62,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -74,7 +74,7 @@ public: /** * Returns a new @ref PMCSGEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmcsgedit.cpp b/kpovmodeler/pmcsgedit.cpp index 114e22f6..bdbbe3da 100644 --- a/kpovmodeler/pmcsgedit.cpp +++ b/kpovmodeler/pmcsgedit.cpp @@ -24,8 +24,8 @@ #include <tqcombobox.h> #include <klocale.h> -PMCSGEdit::PMCSGEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMCSGEdit::PMCSGEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -34,17 +34,17 @@ void PMCSGEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pTypeCombo = new TQComboBox( false, this ); m_pTypeCombo->insertItem( i18n( "Union" ) ); m_pTypeCombo->insertItem( i18n( "Intersection" ) ); m_pTypeCombo->insertItem( i18n( "Difference" ) ); m_pTypeCombo->insertItem( i18n( "Merge" ) ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); - layout->addWidget( m_pTypeCombo ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); + tqlayout->addWidget( m_pTypeCombo ); + tqlayout->addStretch( 1 ); connect( m_pTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotTypeSelected( int ) ) ); } diff --git a/kpovmodeler/pmcsgedit.h b/kpovmodeler/pmcsgedit.h index d7efc75d..1ec5d205 100644 --- a/kpovmodeler/pmcsgedit.h +++ b/kpovmodeler/pmcsgedit.h @@ -35,12 +35,13 @@ class TQComboBox; class PMCSGEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMCSGEdit with parent and name + * Creates a PMCSGEdit with tqparent and name */ - PMCSGEdit( TQWidget* parent, const char* name = 0 ); + PMCSGEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmcylinder.cpp b/kpovmodeler/pmcylinder.cpp index 358cb542..b595d6e1 100644 --- a/kpovmodeler/pmcylinder.cpp +++ b/kpovmodeler/pmcylinder.cpp @@ -97,11 +97,11 @@ void PMCylinder::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMCylinder::metaObject( ) const +PMMetaObject* PMCylinder::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Cylinder", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Cylinder", Base::tqmetaObject( ), createNewCylinder ); s_pMetaObject->addProperty( new PMCylinderProperty( "end1", &PMCylinder::setEnd1, &PMCylinder::end1 ) ); @@ -160,9 +160,9 @@ void PMCylinder::setOpen( bool op ) } } -PMDialogEditBase* PMCylinder::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMCylinder::editWidget( TQWidget* tqparent ) const { - return new PMCylinderEdit( parent ); + return new PMCylinderEdit( tqparent ); } void PMCylinder::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmcylinder.h b/kpovmodeler/pmcylinder.h index 1bd10901..66174d59 100644 --- a/kpovmodeler/pmcylinder.h +++ b/kpovmodeler/pmcylinder.h @@ -58,7 +58,7 @@ public: /** */ virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMCylinderEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmcylinderedit.cpp b/kpovmodeler/pmcylinderedit.cpp index b15a0d16..b471cb29 100644 --- a/kpovmodeler/pmcylinderedit.cpp +++ b/kpovmodeler/pmcylinderedit.cpp @@ -26,8 +26,8 @@ #include <klocale.h> #include <tqcheckbox.h> -PMCylinderEdit::PMCylinderEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMCylinderEdit::PMCylinderEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -36,7 +36,7 @@ void PMCylinderEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); @@ -50,13 +50,13 @@ void PMCylinderEdit::createTopWidgets( ) gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Radius:" ), this ) ); - layout->addWidget( m_pRadius ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Radius:" ), this ) ); + tqlayout->addWidget( m_pRadius ); + tqlayout->addStretch( 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( m_pOpen ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( m_pOpen ); connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmcylinderedit.h b/kpovmodeler/pmcylinderedit.h index 9f2c0993..9b25ec2a 100644 --- a/kpovmodeler/pmcylinderedit.h +++ b/kpovmodeler/pmcylinderedit.h @@ -34,12 +34,13 @@ class TQCheckBox; class PMCylinderEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMCylinderEdit with parent and name + * Creates a PMCylinderEdit with tqparent and name */ - PMCylinderEdit( TQWidget* parent, const char* name = 0 ); + PMCylinderEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdatachangecommand.cpp b/kpovmodeler/pmdatachangecommand.cpp index 99ac75d3..4188d253 100644 --- a/kpovmodeler/pmdatachangecommand.cpp +++ b/kpovmodeler/pmdatachangecommand.cpp @@ -28,7 +28,7 @@ PMDataChangeCommand::PMDataChangeCommand( PMMemento* memento ) TQString text = memento->originator( )->name( ); if( text.isEmpty( ) ) text = memento->originator( )->description( ); - setText( i18n( "Change %1" ).arg( text ) ); + setText( i18n( "Change %1" ).tqarg( text ) ); // the data is already changed when the command is created m_executed = true; diff --git a/kpovmodeler/pmdeclare.cpp b/kpovmodeler/pmdeclare.cpp index 3f290e2f..0fd7d115 100644 --- a/kpovmodeler/pmdeclare.cpp +++ b/kpovmodeler/pmdeclare.cpp @@ -44,14 +44,14 @@ PMDeclare::PMDeclare( const PMDeclare& d ) { m_id = d.m_id; // CAUTION! Duplication of the id which has to be unique m_pDeclareType = 0; // will be set automatically in the - // base constuctor when the children are copied + // base constuctor when the tqchildren are copied } -PMMetaObject* PMDeclare::metaObject( ) const +PMMetaObject* PMDeclare::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Declare", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Declare", Base::tqmetaObject( ), createNewDeclare ); s_pMetaObject->addProperty( new PMDeclareProperty( "id", &PMDeclare::setID, &PMDeclare::id ) ); @@ -131,9 +131,9 @@ void PMDeclare::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMDeclare::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMDeclare::editWidget( TQWidget* tqparent ) const { - return new PMDeclareEdit( parent ); + return new PMDeclareEdit( tqparent ); } void PMDeclare::setID( const TQString& newID ) @@ -180,9 +180,9 @@ void PMDeclare::updateDeclareType( ) if( o ) { if( o->isA( "GraphicalObject" ) ) - type = m->metaObject( "GraphicalObject" ); + type = m->tqmetaObject( "GraphicalObject" ); else - type = o->metaObject( ); + type = o->tqmetaObject( ); } setDeclareType( type ); } diff --git a/kpovmodeler/pmdeclare.h b/kpovmodeler/pmdeclare.h index 89468bf4..05782866 100644 --- a/kpovmodeler/pmdeclare.h +++ b/kpovmodeler/pmdeclare.h @@ -55,7 +55,7 @@ public: virtual TQString pixmap( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMDeclareEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the id of the declare */ diff --git a/kpovmodeler/pmdeclareedit.cpp b/kpovmodeler/pmdeclareedit.cpp index a461d710..49ee6366 100644 --- a/kpovmodeler/pmdeclareedit.cpp +++ b/kpovmodeler/pmdeclareedit.cpp @@ -33,8 +33,8 @@ #include <klocale.h> #include <kmessagebox.h> -PMDeclareEdit::PMDeclareEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMDeclareEdit::PMDeclareEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; m_pSelectedObject = 0; @@ -44,13 +44,13 @@ void PMDeclareEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pNameEdit = new TQLineEdit( this ); m_pNameEdit->setMaxLength( 40 ); TQLabel* label = new TQLabel( i18n( "Identifier:" ), this ); - layout->addWidget( label ); - layout->addWidget( m_pNameEdit ); + tqlayout->addWidget( label ); + tqlayout->addWidget( m_pNameEdit ); connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotNameChanged( const TQString& ) ) ); @@ -67,13 +67,13 @@ void PMDeclareEdit::createBottomWidgets( ) TQT_SLOT( slotItemSelected( TQListBoxItem* ) ) ); topLayout( )->addWidget( m_pLinkedObjects, 1 ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pSelectButton = new TQPushButton( i18n( "Select..." ), this ); m_pSelectButton->setEnabled( false ); connect( m_pSelectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSelect( ) ) ); - layout->addStretch( ); - layout->addWidget( m_pSelectButton ); + tqlayout->addStretch( ); + tqlayout->addWidget( m_pSelectButton ); Base::createBottomWidgets( ); } @@ -162,14 +162,14 @@ bool PMDeclareEdit::isDataValid( ) // valid identifer! PMReservedWordDict* dict = PMScanner::reservedWords( ); - if( dict->find( text.latin1( ) ) != -1 ) + if( dict->tqfind( text.latin1( ) ) != -1 ) { KMessageBox::error( this, i18n( "You can't use a povray reserved word" " as an identifier!" ), i18n( "Error" ) ); return false; } dict = PMScanner::directives( ); - if( dict->find( text.latin1( ) ) != -1 ) + if( dict->tqfind( text.latin1( ) ) != -1 ) { KMessageBox::error( this, i18n( "You can't use a povray directive" " as an identifier!" ), i18n( "Error" ) ); @@ -178,7 +178,7 @@ bool PMDeclareEdit::isDataValid( ) // no reserved word PMSymbolTable* st = part( )->symbolTable( ); - if( st->find( text ) ) + if( st->tqfind( text ) ) { KMessageBox::error( this, i18n( "Please enter a unique identifier!" ), i18n( "Error" ) ); @@ -201,6 +201,6 @@ void PMDeclareEdit::slotItemSelected( TQListBoxItem* item ) void PMDeclareEdit::slotSelect( ) { if( m_pSelectedObject ) - part( )->slotObjectChanged( m_pSelectedObject, PMCNewSelection, this ); + part( )->slotObjectChanged( m_pSelectedObject, PMCNewSelection, TQT_TQOBJECT(this) ); } #include "pmdeclareedit.moc" diff --git a/kpovmodeler/pmdeclareedit.h b/kpovmodeler/pmdeclareedit.h index 2a40b869..0b40eb2a 100644 --- a/kpovmodeler/pmdeclareedit.h +++ b/kpovmodeler/pmdeclareedit.h @@ -38,12 +38,13 @@ class TQListBoxItem; class PMDeclareEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMDeclareEdit with parent and name + * Creates a PMDeclareEdit with tqparent and name */ - PMDeclareEdit( TQWidget* parent, const char* name = 0 ); + PMDeclareEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdeletecommand.cpp b/kpovmodeler/pmdeletecommand.cpp index a4629728..663dae09 100644 --- a/kpovmodeler/pmdeletecommand.cpp +++ b/kpovmodeler/pmdeletecommand.cpp @@ -27,14 +27,14 @@ #include <tqptrdict.h> PMDeleteCommand::PMDeleteCommand( PMObject* obj ) - : PMCommand( i18n( "Delete %1" ).arg( obj->name( ) ) ) + : PMCommand( i18n( "Delete %1" ).tqarg( obj->name( ) ) ) { // the scene can not be deleted! - if( obj->parent( ) ) + if( obj->tqparent( ) ) m_infoList.append( new PMDeleteInfo( obj ) ); else { - // object has no parent! + // object has no tqparent! // top level objects can't be moved, move all child items PMObject* tmp; for( tmp = obj->firstChild( ); tmp; tmp = tmp->nextSibling( ) ) @@ -55,11 +55,11 @@ PMDeleteCommand::PMDeleteCommand( const PMObjectList& list ) { obj = it.current( ); - if( obj->parent( ) ) + if( obj->tqparent( ) ) m_infoList.append( new PMDeleteInfo( obj ) ); else { - // object has no parent! + // object has no tqparent! // top level objects can't be moved, move all child items PMObject* tmp; for( tmp = obj->firstChild( ); tmp; tmp = tmp->nextSibling( ) ) @@ -91,7 +91,7 @@ void PMDeleteCommand::execute( PMCommandManager* theManager ) { PMDeleteInfoListIterator it( m_infoList ); PMDeleteInfo* info = 0; - PMObject* parent; + PMObject* tqparent; if( !m_linksCreated ) { @@ -105,8 +105,8 @@ void PMDeleteCommand::execute( PMCommandManager* theManager ) if( decl ) { m_links.append( oit.current( ) ); - if( !m_linkedDeclares.containsRef( decl ) ) - m_linkedDeclares.append( decl ); + if( !m_linkedDeclares.tqcontainsRef( decl ) ) + m_linkedDeclares.append( decl ); } } } @@ -120,23 +120,23 @@ void PMDeleteCommand::execute( PMCommandManager* theManager ) for( it.toLast( ); it.current( ); --it ) { info = it.current( ); - parent = info->parent( ); + tqparent = info->tqparent( ); // signal has to be emitted before the item is removed theManager->cmdObjectChanged( info->deletedObject( ), PMCRemove ); if( m_firstExecution ) - if( parent->dataChangeOnInsertRemove( ) - && !parent->mementoCreated( ) ) - parent->createMemento( ); - parent->takeChild( info->deletedObject( ) ); + if( tqparent->dataChangeOnInsertRemove( ) + && !tqparent->mementoCreated( ) ) + tqparent->createMemento( ); + tqparent->takeChild( info->deletedObject( ) ); } if( m_firstExecution ) { for( it.toLast( ); it.current( ); --it ) { - parent = it.current( )->parent( ); - if( parent->mementoCreated( ) ) - m_dataChanges.append( parent->takeMemento( ) ); + tqparent = it.current( )->tqparent( ); + if( tqparent->mementoCreated( ) ) + m_dataChanges.append( tqparent->takeMemento( ) ); } } @@ -166,11 +166,11 @@ void PMDeleteCommand::undo( PMCommandManager* theManager ) for( ; it.current( ); ++it ) { if( it.current( )->prevSibling( ) ) - it.current( )->parent( ) + it.current( )->tqparent( ) ->insertChildAfter( it.current( )->deletedObject( ), it.current( )->prevSibling( ) ); else - it.current( )->parent( ) + it.current( )->tqparent( ) ->insertChild( it.current( )->deletedObject( ), 0 ); theManager->cmdObjectChanged( it.current( )->deletedObject( ), PMCAdd ); } @@ -230,18 +230,18 @@ int PMDeleteCommand::errorFlags( PMPart* ) { insideSelection = false; for( obj = links.current( ); obj && !insideSelection; - obj = obj->parent( ) ) + obj = obj->tqparent( ) ) { - if( m_deletedObjects.find( obj ) ) + if( m_deletedObjects.tqfind( obj ) ) insideSelection = true; } if( insideSelection ) { bool stop = false; - for( obj = links.current( ); obj && !stop; obj = obj->parent( ) ) + for( obj = links.current( ); obj && !stop; obj = obj->tqparent( ) ) { - if( m_deletedObjects.find( obj ) ) + if( m_deletedObjects.tqfind( obj ) ) stop = true; else m_deletedObjects.insert( obj, new bool( true ) ); @@ -256,7 +256,7 @@ int PMDeleteCommand::errorFlags( PMPart* ) { m_errors.prepend( i18n( "The declare \"%1\" can't be removed " "because of some remaining links." ) - .arg( decl->id( ) ) ); + .tqarg( decl->id( ) ) ); PMDeleteInfo* tmp = info; info = m_infoList.prev( ); diff --git a/kpovmodeler/pmdeletecommand.h b/kpovmodeler/pmdeletecommand.h index d11cf348..4c384e1f 100644 --- a/kpovmodeler/pmdeletecommand.h +++ b/kpovmodeler/pmdeletecommand.h @@ -39,12 +39,12 @@ class PMDeleteInfo public: /** * Creates undo information for the object deletedObject. - * The object has to have a parent! + * The object has to have a tqparent! */ PMDeleteInfo( PMObject* deletedObject ) { m_pDeletedObject = deletedObject; - m_pParent = deletedObject->parent( ); + m_pParent = deletedObject->tqparent( ); m_pPrevSibling = deletedObject->prevSibling( ); m_insertError = false; } @@ -57,9 +57,9 @@ public: */ PMObject* deletedObject( ) const { return m_pDeletedObject; } /** - * Returns a pointer to the parent of the deleted object + * Returns a pointer to the tqparent of the deleted object */ - PMObject* parent( ) const { return m_pParent; } + PMObject* tqparent( ) const { return m_pParent; } /** * Returns the previous sibling of the deleted object */ diff --git a/kpovmodeler/pmdensity.cpp b/kpovmodeler/pmdensity.cpp index 3935b6be..5743a5b4 100644 --- a/kpovmodeler/pmdensity.cpp +++ b/kpovmodeler/pmdensity.cpp @@ -43,11 +43,11 @@ PMDensity::~PMDensity( ) { } -PMMetaObject* PMDensity::metaObject( ) const +PMMetaObject* PMDensity::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Density", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Density", Base::tqmetaObject( ), createNewDensity ); } return s_pMetaObject; @@ -69,8 +69,8 @@ TQString PMDensity::description( ) const } -PMDialogEditBase* PMDensity::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMDensity::editWidget( TQWidget* tqparent ) const { - return new PMDensityEdit( parent ); + return new PMDensityEdit( tqparent ); } diff --git a/kpovmodeler/pmdensity.h b/kpovmodeler/pmdensity.h index b1502fe2..ca32ac99 100644 --- a/kpovmodeler/pmdensity.h +++ b/kpovmodeler/pmdensity.h @@ -52,14 +52,14 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; /** * Returns a new @ref PMDensityEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmdensity" ); } diff --git a/kpovmodeler/pmdensityedit.cpp b/kpovmodeler/pmdensityedit.cpp index 407a4f80..8213d27c 100644 --- a/kpovmodeler/pmdensityedit.cpp +++ b/kpovmodeler/pmdensityedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMDensityEdit::PMDensityEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMDensityEdit::PMDensityEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmdensityedit.h b/kpovmodeler/pmdensityedit.h index a3963ca9..a8241117 100644 --- a/kpovmodeler/pmdensityedit.h +++ b/kpovmodeler/pmdensityedit.h @@ -34,12 +34,13 @@ class PMDensity; class PMDensityEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMDensityEdit with parent and name + * Creates a PMDensityEdit with tqparent and name */ - PMDensityEdit( TQWidget* parent, const char* name = 0 ); + PMDensityEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdetailobject.cpp b/kpovmodeler/pmdetailobject.cpp index 5abc7e22..050729a4 100644 --- a/kpovmodeler/pmdetailobject.cpp +++ b/kpovmodeler/pmdetailobject.cpp @@ -47,11 +47,11 @@ PMDetailObject::~PMDetailObject() { } -PMMetaObject* PMDetailObject::metaObject( ) const +PMMetaObject* PMDetailObject::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "DetailObject", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "DetailObject", Base::tqmetaObject( ) ); s_pMetaObject->addProperty( new PMDetailObjectProperty( "globalDetail", &PMDetailObject::setGlobalDetail, &PMDetailObject::globalDetail ) ); s_pMetaObject->addProperty( diff --git a/kpovmodeler/pmdetailobject.h b/kpovmodeler/pmdetailobject.h index 846ef8c0..10efae07 100644 --- a/kpovmodeler/pmdetailobject.h +++ b/kpovmodeler/pmdetailobject.h @@ -43,7 +43,7 @@ public: virtual ~PMDetailObject(); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; diff --git a/kpovmodeler/pmdetailobjectedit.cpp b/kpovmodeler/pmdetailobjectedit.cpp index 661cd892..0fbd3a8a 100644 --- a/kpovmodeler/pmdetailobjectedit.cpp +++ b/kpovmodeler/pmdetailobjectedit.cpp @@ -23,8 +23,8 @@ #include <tqcombobox.h> #include <klocale.h> -PMDetailObjectEdit::PMDetailObjectEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMDetailObjectEdit::PMDetailObjectEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -33,7 +33,7 @@ void PMDetailObjectEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pGlobalDetail = new TQCheckBox( i18n( "Global detail" ), this ); m_pLocalDetailLevelLabel = new TQLabel( i18n( "Detail level:" ), this ); m_pLocalDetailLevel = new TQComboBox( this ); @@ -43,10 +43,10 @@ void PMDetailObjectEdit::createTopWidgets( ) m_pLocalDetailLevel->insertItem( i18n( "High" ) ); m_pLocalDetailLevel->insertItem( i18n( "Very High" ) ); - layout->addWidget( m_pGlobalDetail ); - layout->addWidget( m_pLocalDetailLevelLabel ); - layout->addWidget( m_pLocalDetailLevel ); - layout->addStretch( ); + tqlayout->addWidget( m_pGlobalDetail ); + tqlayout->addWidget( m_pLocalDetailLevelLabel ); + tqlayout->addWidget( m_pLocalDetailLevel ); + tqlayout->addStretch( ); connect( m_pGlobalDetail, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotGlobalDetailClicked( ) ) ); connect( m_pLocalDetailLevel, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmdetailobjectedit.h b/kpovmodeler/pmdetailobjectedit.h index 74aa3a29..e6224d59 100644 --- a/kpovmodeler/pmdetailobjectedit.h +++ b/kpovmodeler/pmdetailobjectedit.h @@ -35,12 +35,13 @@ class TQComboBox; class PMDetailObjectEdit : public PMNamedObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMNamedObjectEdit Base; public: /** - * Creates a PMNamedObjectEdit with parent and name + * Creates a PMNamedObjectEdit with tqparent and name */ - PMDetailObjectEdit( TQWidget* parent, const char* name = 0 ); + PMDetailObjectEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdialogeditbase.cpp b/kpovmodeler/pmdialogeditbase.cpp index ea601be3..21430704 100644 --- a/kpovmodeler/pmdialogeditbase.cpp +++ b/kpovmodeler/pmdialogeditbase.cpp @@ -95,8 +95,8 @@ const TQString c_boxCode = TQString( const TQString c_globalSettingsCode = TQString( "global_settings { assumed_gamma %1 }\n" ); -PMDialogEditBase::PMDialogEditBase( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMDialogEditBase::PMDialogEditBase( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_pDisplayedObject = 0; m_pPart = 0; @@ -318,7 +318,7 @@ void PMDialogEditBase::findTextures( PMObject*& global, PMObject*& local ) const global = 0; local = 0; - for( o = m_pDisplayedObject; o; o = o->parent( ) ) + for( o = m_pDisplayedObject; o; o = o->tqparent( ) ) { if( o->type( ) == "Material" || o->type( ) == "Interior" || o->type( ) == "Texture" || o->type( ) == "Pigment" || @@ -390,7 +390,7 @@ void PMDialogEditBase::slotTexturePreview( ) buffer.open( IO_WriteOnly ); TQTextStream str( &buffer ); PMPovray31Format format; - PMSerializer* dev = format.newSerializer( &buffer ); + PMSerializer* dev = format.newSerializer( TQT_TQIODEVICE(&buffer) ); PMRenderMode mode; PMObjectList neededDeclares, objectsToCheck; TQPtrDict<PMObject> objectsToSerialize( 101 ); @@ -408,8 +408,8 @@ void PMDialogEditBase::slotTexturePreview( ) { link = rit.current( )->linkedObject( ); if( link ) - if( !neededDeclares.containsRef( link ) ) - if( !objectsToSerialize.find( link ) ) + if( !neededDeclares.tqcontainsRef( link ) ) + if( !objectsToSerialize.tqfind( link ) ) neededDeclares.append( link ); } objectsToSerialize.insert( it.current( ), it.current( ) ); @@ -427,14 +427,14 @@ void PMDialogEditBase::slotTexturePreview( ) PMObject* otr = o; // find the scene - while( otr->parent( ) ) otr = otr->parent( ); + while( otr->tqparent( ) ) otr = otr->tqparent( ); for( otr = otr->firstChild( ); otr && ( numDeclares > 0 ); otr = otr->nextSibling( ) ) { if( otr->type( ) == "Declare" ) { - if( objectsToSerialize.find( otr ) ) + if( objectsToSerialize.tqfind( otr ) ) { dev->serialize( otr ); numDeclares--; @@ -451,17 +451,17 @@ void PMDialogEditBase::slotTexturePreview( ) str << "union {\n"; if( s_showBox ) { - str << c_boxCode.arg( numObjects ); + str << c_boxCode.tqarg( numObjects ); numObjects++; } if( s_showCylinder ) { - str << c_cylinderCode.arg( numObjects ); + str << c_cylinderCode.tqarg( numObjects ); numObjects++; } if( s_showSphere ) { - str << c_sphereCode.arg( numObjects ); + str << c_sphereCode.tqarg( numObjects ); numObjects++; } @@ -495,18 +495,18 @@ void PMDialogEditBase::slotTexturePreview( ) { c1 = PMColor( s_wallColor1 ); c2 = PMColor( s_wallColor2 ); - str << c_wallCode.arg( c1.serialize( true ) ).arg( c2.serialize( true ) ); + str << c_wallCode.tqarg( c1.serialize( true ) ).tqarg( c2.serialize( true ) ); } if( s_showFloor ) { c1 = PMColor( s_floorColor1 ); c2 = PMColor( s_floorColor2 ); - str << c_floorCode.arg( c1.serialize( true ) ).arg( c2.serialize( true ) ); + str << c_floorCode.tqarg( c1.serialize( true ) ).tqarg( c2.serialize( true ) ); } str << c_lightCode; str << c_cameraCode[numObjects-1]; - str << c_globalSettingsCode.arg( s_previewGamma ); + str << c_globalSettingsCode.tqarg( s_previewGamma ); // Set the render mode mode.setHeight( s_previewSize ); @@ -519,7 +519,7 @@ void PMDialogEditBase::slotTexturePreview( ) m_pRenderFrame->setFixedSize( s_previewSize + m_pRenderFrame->frameWidth( ) * 2, s_previewSize + m_pRenderFrame->frameWidth( ) * 2 ); m_pRenderFrame->updateGeometry( ); - m_pTexturePreviewWidget->layout( )->activate( ); + m_pTexturePreviewWidget->tqlayout( )->activate( ); emit sizeChanged( ); m_pOutputWidget->slotClear( ); m_pRenderWidget->render( scene, mode, m_pPart->url( ) ); @@ -540,9 +540,9 @@ void PMDialogEditBase::slotPreviewFinished( int exitStatus ) KMessageBox::error( this, i18n( "Povray exited abnormally with " "exit code %1.\n" "See the povray output for details." ) - .arg( exitStatus ) ); + .tqarg( exitStatus ) ); } - else if( m_pRenderWidget->povrayOutput( ).contains( "ERROR" ) ) + else if( m_pRenderWidget->povrayOutput( ).tqcontains( "ERROR" ) ) { KMessageBox::error( this, i18n( "There were errors while rendering.\n" "See the povray output for details." ) ); diff --git a/kpovmodeler/pmdialogeditbase.h b/kpovmodeler/pmdialogeditbase.h index 6057648e..04a3dad7 100644 --- a/kpovmodeler/pmdialogeditbase.h +++ b/kpovmodeler/pmdialogeditbase.h @@ -42,7 +42,7 @@ class PMPovrayOutputWidget; /** * Base class for all widgets for editing object attributes. * - * Ensures a consistent layout for all widgets. Widgets should not + * Ensures a consistent tqlayout for all widgets. Widgets should not * created within the constructor, but with the functions @ref createTopWidgets * and @ref createBottomWidgets. * @@ -51,9 +51,10 @@ class PMPovrayOutputWidget; * of solid objects. Subclasses like the widget for the box object add their * object specific controls. */ -class PMDialogEditBase : public QWidget +class PMDialogEditBase : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Creates a new PMDialogEditBase widget objectType is @@ -62,7 +63,7 @@ public: * No widgets are created within the constructor! You have to call * @ref createWidgets after creating a new edit widget. */ - PMDialogEditBase( TQWidget* parent, const char* name = 0 ); + PMDialogEditBase( TQWidget* tqparent, const char* name = 0 ); /** * Destructor */ @@ -275,7 +276,7 @@ protected: * of the sub class. * * First call the function of the base class, then create and append - * the widgets to the top layout. + * the widgets to the top tqlayout. */ virtual void createTopWidgets( ) { }; @@ -283,7 +284,7 @@ protected: * Create widgets here, that should be placed under the widgets * of the sub class. * - * First create and append the widgets to the top layout, then + * First create and append the widgets to the top tqlayout, then * call the function of the base class */ virtual void createBottomWidgets( ); @@ -295,7 +296,7 @@ protected: virtual void saveContents( ); /** - * Returns a pointer to the top layout + * Returns a pointer to the top tqlayout */ TQBoxLayout* topLayout( ) const { return m_pTopLayout; } diff --git a/kpovmodeler/pmdialogview.cpp b/kpovmodeler/pmdialogview.cpp index 243427b5..1df22c26 100644 --- a/kpovmodeler/pmdialogview.cpp +++ b/kpovmodeler/pmdialogview.cpp @@ -39,8 +39,8 @@ #include <tqscrollview.h> #include <tqlabel.h> -PMDialogEditContent::PMDialogEditContent( TQWidget* parent, const char* name ) - : TQScrollView( parent, name ) +PMDialogEditContent::PMDialogEditContent( TQWidget* tqparent, const char* name ) + : TQScrollView( tqparent, name ) { m_pContents = 0; setVScrollBarMode( AlwaysOff ); @@ -69,7 +69,7 @@ void PMDialogEditContent::calculateSize( ) int fw = lineWidth( ) * 2; if( m_pContents ) { - TQSize newSize = m_pContents->minimumSizeHint( ); + TQSize newSize = m_pContents->tqminimumSizeHint( ); setVScrollBarMode( AlwaysOff ); setHScrollBarMode( AlwaysOff ); @@ -111,8 +111,8 @@ void PMDialogEditContent::resizeEvent( TQResizeEvent* /* ev */ ) calculateSize( ); } -PMDialogView::PMDialogView( PMPart* part, TQWidget* parent, const char* name ) - : PMViewBase( parent, name ) +PMDialogView::PMDialogView( PMPart* part, TQWidget* tqparent, const char* name ) + : PMViewBase( tqparent, name ) { m_pDisplayedWidget = 0; m_unsavedData = false; @@ -174,7 +174,7 @@ PMDialogView::~PMDialogView( ) void PMDialogView::slotObjectChanged( PMObject* obj, const int mode, TQObject* sender ) { - if( sender == this ) + if( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(this) ) return; if( mode & PMCNewSelection ) { @@ -314,10 +314,10 @@ void PMDialogView::slotDataChanged( ) void PMDialogView::slotSizeChanged( ) { - // force recalculating of the layout + // force recalculating of the tqlayout if( m_pDisplayedWidget ) - if( m_pDisplayedWidget->layout( ) ) - m_pDisplayedWidget->layout( )->activate( ); + if( m_pDisplayedWidget->tqlayout( ) ) + m_pDisplayedWidget->tqlayout( )->activate( ); m_pHelper->calculateSize( ); } @@ -325,7 +325,7 @@ void PMDialogView::slotControlPointSelectionChanged( ) { if( m_pDisplayedWidget && m_pDisplayedWidget->displayedObject( ) ) emit objectChanged( m_pDisplayedWidget->displayedObject( ), - PMCControlPointSelection, this ); + PMCControlPointSelection, TQT_TQOBJECT(this) ); } void PMDialogView::displayObject( PMObject* obj, bool updateDescription ) diff --git a/kpovmodeler/pmdialogview.h b/kpovmodeler/pmdialogview.h index 680cbbc9..0b6209c3 100644 --- a/kpovmodeler/pmdialogview.h +++ b/kpovmodeler/pmdialogview.h @@ -40,11 +40,12 @@ class TQLabel; /** * Helper class for @ref PMDialogView */ -class PMDialogEditContent : public QScrollView +class PMDialogEditContent : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - PMDialogEditContent( TQWidget* parent, const char* name = 0 ); + PMDialogEditContent( TQWidget* tqparent, const char* name = 0 ); void setContents( TQWidget* wid ); void calculateSize( ); protected: @@ -63,11 +64,12 @@ private: class PMDialogView : public PMViewBase { Q_OBJECT + TQ_OBJECT public: /** * Creates a new PMDialogView widget */ - PMDialogView( PMPart* part, TQWidget* parent, const char* name = 0 ); + PMDialogView( PMPart* part, TQWidget* tqparent, const char* name = 0 ); /** * Deletes the widget */ @@ -154,9 +156,9 @@ public: virtual TQString viewType( ) const { return TQString( "dialogview" ); } virtual TQString description( ) const; virtual TQString iconName( ) const { return TQString( "pmdialogview" ); } - virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const + virtual PMViewBase* newInstance( TQWidget* tqparent, PMPart* part ) const { - return new PMDialogView( part, parent ); + return new PMDialogView( part, tqparent ); } }; diff --git a/kpovmodeler/pmdisc.cpp b/kpovmodeler/pmdisc.cpp index bda89579..4a526288 100644 --- a/kpovmodeler/pmdisc.cpp +++ b/kpovmodeler/pmdisc.cpp @@ -96,11 +96,11 @@ void PMDisc::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMDisc::metaObject( ) const +PMMetaObject* PMDisc::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Disc", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Disc", Base::tqmetaObject( ), createNewDisc ); s_pMetaObject->addProperty( new PMDiscProperty( "center", &PMDisc::setCenter, &PMDisc::center ) ); @@ -176,9 +176,9 @@ void PMDisc::setHoleRadius( double hradius ) } } -PMDialogEditBase* PMDisc::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMDisc::editWidget( TQWidget* tqparent ) const { - return new PMDiscEdit( parent ); + return new PMDiscEdit( tqparent ); } void PMDisc::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmdisc.h b/kpovmodeler/pmdisc.h index 62201bcf..482e5e1d 100644 --- a/kpovmodeler/pmdisc.h +++ b/kpovmodeler/pmdisc.h @@ -58,7 +58,7 @@ public: /** */ virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMDiscEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmdiscedit.cpp b/kpovmodeler/pmdiscedit.cpp index 0197a806..6b06207d 100644 --- a/kpovmodeler/pmdiscedit.cpp +++ b/kpovmodeler/pmdiscedit.cpp @@ -27,8 +27,8 @@ #include <klocale.h> #include <kmessagebox.h> -PMDiscEdit::PMDiscEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMDiscEdit::PMDiscEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -37,7 +37,7 @@ void PMDiscEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQGridLayout* gl; m_pCenter = new PMVectorEdit( "x", "y", "z", this ); @@ -53,18 +53,18 @@ void PMDiscEdit::createTopWidgets( ) gl->addWidget( new TQLabel( i18n( "Normal:" ), this ), 1, 0 ); gl->addWidget( m_pNormal, 1, 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - gl = new TQGridLayout( layout, 2, 2 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( tqlayout, 2, 2 ); gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); gl->addWidget( new TQLabel( i18n( "Hole radius:" ), this ), 1, 0 ); gl->addWidget( m_pHRadius, 1, 1 ); - layout->addStretch( 1 ); + tqlayout->addStretch( 1 ); TQPushButton* nb = new TQPushButton( i18n( "Normalize" ), this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( nb ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( nb ); + tqlayout->addStretch( 1 ); connect( m_pCenter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmdiscedit.h b/kpovmodeler/pmdiscedit.h index 5ce4d111..73466f32 100644 --- a/kpovmodeler/pmdiscedit.h +++ b/kpovmodeler/pmdiscedit.h @@ -33,12 +33,13 @@ class PMDisc; class PMDiscEdit : public PMGraphicalObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMGraphicalObjectEdit Base; public: /** - * Creates a PMPlaneEdit with parent and name + * Creates a PMPlaneEdit with tqparent and name */ - PMDiscEdit( TQWidget* parent, const char* name = 0 ); + PMDiscEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdockwidget.cpp b/kpovmodeler/pmdockwidget.cpp index 67fbc1c7..1d13712f 100644 --- a/kpovmodeler/pmdockwidget.cpp +++ b/kpovmodeler/pmdockwidget.cpp @@ -36,7 +36,7 @@ #include <kpopupmenu.h> #include <kwin.h> #include <kdebug.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/X.h> #include <X11/Xlib.h> #endif @@ -134,15 +134,15 @@ public: * * @author Max Judin. */ -PMDockMainWindow::PMDockMainWindow( TQWidget* parent, const char *name, WFlags f) -:KMainWindow( parent, name, f ) +PMDockMainWindow::PMDockMainWindow( TQWidget* tqparent, const char *name, WFlags f) +:KMainWindow( tqparent, name, f ) { TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new PMDockManager( this, new_name.latin1() ); mainDockWidget = 0L; d = new PMDockMainWindowPrivate( ); - PartBase::setPartObject( this ); + PartBase::setPartObject( TQT_TQOBJECT(this) ); } PMDockMainWindow::~PMDockMainWindow() @@ -154,7 +154,7 @@ PMDockMainWindow::~PMDockMainWindow() // kparts/dockmainwindow stuff void PMDockMainWindow::createGUI( Part * part ) { - kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl; + kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").tqarg(part?part->name():"0L") << endl; KXMLGUIFactory *factory = guiFactory(); @@ -164,7 +164,7 @@ void PMDockMainWindow::createGUI( Part * part ) if ( d->m_activePart ) { - kdDebug(1000) << TQString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl; + kdDebug(1000) << TQString("deactivating GUI for %1").tqarg(d->m_activePart->name()) << endl; GUIActivateEvent ev( false ); TQApplication::sendEvent( d->m_activePart, &ev ); @@ -179,7 +179,7 @@ void PMDockMainWindow::createGUI( Part * part ) if( !d->m_bShellGUIActivated ) { - loadPlugins( this, this, KGlobal::instance() ); + loadPlugins( TQT_TQOBJECT(this), this, KGlobal::instance() ); createShellGUI(); d->m_bShellGUIActivated = true; } @@ -256,7 +256,7 @@ void PMDockMainWindow::setMainDockWidget( PMDockWidget* mdw ) void PMDockMainWindow::setView( TQWidget *view ) { if ( view->isA("PMDockWidget") ){ - if ( view->parent() != this ) ((PMDockWidget*)view)->applyToWidget( this ); + if ( TQT_BASE_OBJECT(view->tqparent()) != TQT_BASE_OBJECT(this) ) ((PMDockWidget*)view)->applyToWidget( this ); } #ifndef NO_KDE2 @@ -266,9 +266,9 @@ void PMDockMainWindow::setView( TQWidget *view ) #endif } -PMDockWidget* PMDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel) +PMDockWidget* PMDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel) { - return new PMDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel ); + return new PMDockWidget( dockManager, name.latin1(), pixmap, tqparent, strCaption, strTabPageLabel ); } void PMDockMainWindow::makeDockVisible( PMDockWidget* dock ) @@ -319,15 +319,15 @@ void PMDockMainWindow::slotDockWidgetUndocked() } /*************************************************************************/ -PMDockWidgetAbstractHeaderDrag::PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* parent, PMDockWidget* dock, const char* name ) -:TQFrame( parent, name ) +PMDockWidgetAbstractHeaderDrag::PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* tqparent, PMDockWidget* dock, const char* name ) +:TQFrame( tqparent, name ) { dw = dock; installEventFilter( dock->dockManager() ); } /*************************************************************************/ -PMDockWidgetHeaderDrag::PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* parent, PMDockWidget* dock, const char* name ) -:PMDockWidgetAbstractHeaderDrag( parent, dock, name ) +PMDockWidgetHeaderDrag::PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* tqparent, PMDockWidget* dock, const char* name ) +:PMDockWidgetAbstractHeaderDrag( tqparent, dock, name ) { } @@ -337,33 +337,33 @@ void PMDockWidgetHeaderDrag::paintEvent( TQPaintEvent* ) paint.begin( this ); - style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); + tqstyle().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), tqcolorGroup()); paint.end(); } /*************************************************************************/ -PMDockWidgetAbstractHeader::PMDockWidgetAbstractHeader( PMDockWidget* parent, const char* name ) -:TQFrame( parent, name ) +PMDockWidgetAbstractHeader::PMDockWidgetAbstractHeader( PMDockWidget* tqparent, const char* name ) +:TQFrame( tqparent, name ) { } /*************************************************************************/ -PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) -:PMDockWidgetAbstractHeader( parent, name ) +PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* tqparent, const char* name ) +:PMDockWidgetAbstractHeader( tqparent, name ) { - layout = new TQHBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQHBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); - drag = new PMDockWidgetHeaderDrag( this, parent ); + drag = new PMDockWidgetHeaderDrag( this, tqparent ); closeButton = new PMDockButton_Private( this, "DockCloseButton" ); closeButton->setPixmap( const_cast< const char** >(close_xpm) ); int buttonWidth = 9, buttonHeight = 9; closeButton->setFixedSize(buttonWidth,buttonHeight); - connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked())); + connect( closeButton, TQT_SIGNAL(clicked()), tqparent, TQT_SIGNAL(headerCloseButtonClicked())); // MODIFICATION (zehender) // The shell will delete the widget // undock is unnecessary - // connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock())); + // connect( closeButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(undock())); stayButton = new PMDockButton_Private( this, "DockStayButton" ); stayButton->setToggleButton( true ); @@ -375,8 +375,8 @@ PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) dockbackButton = new PMDockButton_Private( this, "DockbackButton" ); dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm)); dockbackButton->setFixedSize(buttonWidth,buttonHeight); - connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked())); - connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack())); + connect( dockbackButton, TQT_SIGNAL(clicked()), tqparent, TQT_SIGNAL(headerDockbackButtonClicked())); + connect( dockbackButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(dockBack())); // MODIFICATION (zehender) // Add a button to undock the widget and dock it as top level @@ -384,21 +384,21 @@ PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) toDesktopButton = new PMDockButton_Private( this, "ToDesktopButton" ); toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm)); toDesktopButton->setFixedSize(buttonWidth,buttonHeight); - connect( toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop())); + connect( toDesktopButton, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(toDesktop())); - layout->addWidget( drag ); - layout->addWidget( dockbackButton ); - layout->addWidget( toDesktopButton ); - layout->addWidget( stayButton ); - layout->addWidget( closeButton ); - layout->activate(); - drag->setFixedHeight( layout->minimumSize().height() ); + tqlayout->addWidget( drag ); + tqlayout->addWidget( dockbackButton ); + tqlayout->addWidget( toDesktopButton ); + tqlayout->addWidget( stayButton ); + tqlayout->addWidget( closeButton ); + tqlayout->activate(); + drag->setFixedHeight( tqlayout->tqminimumSize().height() ); } void PMDockWidgetHeader::setTopLevel( bool isTopLevel ) { if ( isTopLevel ){ - PMDockWidget* par = (PMDockWidget*)parent(); + PMDockWidget* par = (PMDockWidget*)tqparent(); if( par) { if( par->isDockBackPossible()) dockbackButton->show(); @@ -415,7 +415,7 @@ void PMDockWidgetHeader::setTopLevel( bool isTopLevel ) closeButton->show(); toDesktopButton->show(); } - layout->activate(); + tqlayout->activate(); updateGeometry(); } @@ -423,20 +423,20 @@ void PMDockWidgetHeader::setDragPanel( PMDockWidgetHeaderDrag* nd ) { if ( !nd ) return; - delete layout; - layout = new TQHBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + delete tqlayout; + tqlayout = new TQHBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); delete drag; drag = nd; - layout->addWidget( drag ); - layout->addWidget( dockbackButton ); - layout->addWidget( toDesktopButton ); - layout->addWidget( stayButton ); - layout->addWidget( closeButton ); - layout->activate(); - drag->setFixedHeight( layout->minimumSize().height() ); + tqlayout->addWidget( drag ); + tqlayout->addWidget( dockbackButton ); + tqlayout->addWidget( toDesktopButton ); + tqlayout->addWidget( stayButton ); + tqlayout->addWidget( closeButton ); + tqlayout->activate(); + drag->setFixedHeight( tqlayout->tqminimumSize().height() ); } void PMDockWidgetHeader::slotStayClicked() @@ -459,18 +459,18 @@ void PMDockWidgetHeader::setDragEnabled(bool b) #ifndef NO_KDE2 void PMDockWidgetHeader::saveConfig( KConfig* c ) { - c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() ); + c->writeEntry( TQString("%1%2").tqarg(tqparent()->name()).tqarg(":stayButton"), stayButton->isOn() ); } void PMDockWidgetHeader::loadConfig( KConfig* c ) { - setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) ); + setDragEnabled( !c->readBoolEntry( TQString("%1%2").tqarg(tqparent()->name()).tqarg(":stayButton"), false ) ); } #endif /*************************************************************************/ -PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f) -: TQWidget( parent, name, f ) +PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f) +: TQWidget( tqparent, name, f ) ,formerBrotherDockWidget(0L) ,currentDockPos(DockNone) ,formerDockPos(DockNone) @@ -479,13 +479,13 @@ PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const { d = new PMDockWidgetPrivate(); // create private data - d->_parent = parent; + d->_parent = tqparent; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); manager = dockManager; - manager->childDock->append( this ); + manager->childDock->append( TQT_TQOBJECT(this) ); installEventFilter( manager ); header = 0L; @@ -510,7 +510,7 @@ PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const widget = 0L; TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) ); - applyToWidget( parent, TQPoint(0,0) ); + applyToWidget( tqparent, TQPoint(0,0) ); } void PMDockWidget::slotSetCaption( const TQString& str ) @@ -527,7 +527,7 @@ PMDockWidget::~PMDockWidget() d->blockHasUndockedSignal = false; } emit iMBeingClosed(); - manager->childDock->remove( this ); + manager->childDock->remove( TQT_TQOBJECT(this) ); delete pix; delete d; // destroy private data } @@ -538,15 +538,15 @@ void PMDockWidget::setHeader( PMDockWidgetAbstractHeader* h ) if ( header ){ delete header; - delete layout; + delete tqlayout; header = h; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); - layout->addWidget( header ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); + tqlayout->addWidget( header ); setWidget( widget ); } else { header = h; - layout->addWidget( header ); + tqlayout->addWidget( header ); } } @@ -558,8 +558,8 @@ void PMDockWidget::setEnableDocking( int pos ) void PMDockWidget::updateHeader() { - if ( parent() ){ - if ( (parent() == manager->main) || isGroup || (eDocking == PMDockWidget::DockNone) ){ + if ( tqparent() ){ + if ( (TQT_BASE_OBJECT(tqparent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == PMDockWidget::DockNone) ){ header->hide(); } else { header->setTopLevel( false ); @@ -573,7 +573,7 @@ void PMDockWidget::updateHeader() void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) { - if ( parent() != s ) + if ( TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(s) ) { hide(); reparent(s, 0, TQPoint(0,0), false); @@ -584,7 +584,7 @@ void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) } if ( s == manager->main ){ - setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) ); + setGeometry( TQRect(TQPoint(0,0), manager->main->tqgeometry().size()) ); } if ( !s ) @@ -592,7 +592,7 @@ void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) move(p); #ifndef NO_KDE2 -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if (d->transient && d->_parent) XSetTransientForHint( qt_xdisplay(), winId(), d->_parent->winId() ); @@ -608,11 +608,11 @@ void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) void PMDockWidget::show() { - if ( parent() || manager->main->isVisible() ) - if ( !parent() ){ + if ( tqparent() || manager->main->isVisible() ) + if ( !tqparent() ){ emit manager->setDockDefaultPos( this ); emit setDockDefaultPos(); - if ( parent() ){ + if ( tqparent() ){ makeDockVisible(); } else { TQWidget::show(); @@ -627,16 +627,16 @@ void PMDockWidget::show() void PMDockWidget::setDockWindowType (NET::WindowType windowType) { d->windowType = windowType; - applyToWidget( parentWidget(), TQPoint(0,0) ); + applyToWidget( tqparentWidget(), TQPoint(0,0) ); } #endif -void PMDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled) +void PMDockWidget::setDockWindowTransient (TQWidget *tqparent, bool transientEnabled) { - d->_parent = parent; + d->_parent = tqparent; d->transient = transientEnabled; - applyToWidget( parentWidget(), TQPoint(0,0) ); + applyToWidget( tqparentWidget(), TQPoint(0,0) ); } bool PMDockWidget::event( TQEvent* pevent ) @@ -663,13 +663,13 @@ bool PMDockWidget::event( TQEvent* pevent ) emit manager->change(); break; case TQEvent::CaptionChange: - if ( parentWidget() ){ - if ( parent()->inherits("PMDockSplitter") ){ - ((PMDockSplitter*)(parent()))->updateName(); + if ( tqparentWidget() ){ + if ( tqparent()->inherits("PMDockSplitter") ){ + ((PMDockSplitter*)(tqparent()))->updateName(); } - if ( parentDockTabGroup() ){ - setDockTabName( parentDockTabGroup() ); - parentDockTabGroup()->setTabLabel( this, tabPageLabel() ); + if ( tqparentDockTabGroup() ){ + setDockTabName( tqparentDockTabGroup() ); + tqparentDockTabGroup()->setTabLabel( this, tabPageLabel() ); } } break; @@ -686,10 +686,10 @@ bool PMDockWidget::event( TQEvent* pevent ) } #undef KeyPress bool processed = TQWidget::event( pevent ); - if( pevent->type( ) == TQEvent::AccelOverride && !processed && !parent( ) ){ + if( pevent->type( ) == TQEvent::AccelOverride && !processed && !tqparent( ) ){ // MODIFICATION (zehender) // floating widget, post event to main window - processed = qApp->sendEvent( manager->dockMainWidget( ), pevent ); + processed = tqApp->sendEvent( manager->dockMainWidget( ), pevent ); } return processed; } @@ -702,7 +702,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP bool succes = true; // tested flag // do not dock into a floating widget - if( target && !target->parent( ) ) + if( target && !target->tqparent( ) ) target = 0; // check allowed this dock submit this operations @@ -715,18 +715,18 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP succes = false; } - if ( parent() && !parent()->inherits("PMDockSplitter") && !parentDockTabGroup() ){ + if ( tqparent() && !tqparent()->inherits("PMDockSplitter") && !tqparentDockTabGroup() ){ succes = false; } // if docking to a tab group, and position is not center - // dock to the parent of the tab group + // dock to the tqparent of the tab group if( target && ( dockPos != PMDockWidget::DockCenter ) && ( dockPos != PMDockWidget::DockNone ) ) { - TQWidget* pdt = target->parentDockTabGroup( ); + TQWidget* pdt = target->tqparentDockTabGroup( ); if( pdt ) - return manualDock( ( PMDockWidget* ) ( pdt->parent( ) ), + return manualDock( ( PMDockWidget* ) ( pdt->tqparent( ) ), dockPos, spliPos, pos, check, tabIndex ); } @@ -759,25 +759,25 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP return this; } - PMDockTabGroup* parentTab = target->parentDockTabGroup(); - if ( parentTab ){ + PMDockTabGroup* tqparentTab = target->tqparentDockTabGroup(); + if ( tqparentTab ){ // add to existing TabGroup - applyToWidget( parentTab ); - parentTab->insertTab( this, icon() ? *icon() : TQPixmap(), + applyToWidget( tqparentTab ); + tqparentTab->insertTab( this, icon() ? *icon() : TQPixmap(), tabPageLabel(), tabIndex ); - setDockTabName( parentTab ); + setDockTabName( tqparentTab ); if( !toolTipStr.isEmpty()) - parentTab->setTabToolTip( this, toolTipStr); + tqparentTab->setTabToolTip( this, toolTipStr); currentDockPos = PMDockWidget::DockCenter; emit manager->change(); - return (PMDockWidget*)parentTab->parent(); + return (PMDockWidget*)tqparentTab->tqparent(); } // MODIFICATION (Zehender): // If DockPosition is DockLeft or DockRight, add the widget // left or right of the target, so that a new vertical splitter - // (a splitter with horizontal widget layout :-) is created + // (a splitter with horizontal widget tqlayout :-) is created // that spawns the full height of the main view if( ( dockPos == PMDockWidget::DockLeft ) || @@ -792,18 +792,18 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP { PMDockWidget* dw = ( PMDockWidget* ) wtarget; newTarget = dw; - TQWidget* pw = wtarget->parentWidget( ); + TQWidget* pw = wtarget->tqparentWidget( ); if( pw ) { if( pw->inherits( "PMDockSplitter" ) ) { PMDockSplitter* ds = ( PMDockSplitter* ) pw; - if( ds->splitterOrientation( ) == Vertical ) + if( ds->splitterOrientation( ) ==Qt::Vertical ) found = true; } } } - wtarget = wtarget->parentWidget( ); + wtarget = wtarget->tqparentWidget( ); } if( newTarget != target ) @@ -813,8 +813,8 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP // END MODIFICATION // create a new dockwidget that will contain the target and this - TQWidget* parentDock = target->parentWidget(); - PMDockWidget* newDock = new PMDockWidget( manager, "tempName", TQPixmap(""), parentDock ); + TQWidget* tqparentDock = target->tqparentWidget(); + PMDockWidget* newDock = new PMDockWidget( manager, "tempName", TQPixmap(TQString("")), tqparentDock ); newDock->currentDockPos = target->currentDockPos; if ( dockPos == PMDockWidget::DockCenter ){ @@ -824,12 +824,12 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP } newDock->eDocking = (target->eDocking & eDocking) & (~(int)PMDockWidget::DockCenter); - newDock->applyToWidget( parentDock ); + newDock->applyToWidget( tqparentDock ); - if ( !parentDock ){ + if ( !tqparentDock ){ // dock to a toplevel dockwidget means newDock is toplevel now newDock->move( target->frameGeometry().topLeft() ); - newDock->resize( target->geometry().size() ); + newDock->resize( target->tqgeometry().size() ); if ( target->isVisibleToTLW() ) newDock->show(); } @@ -874,13 +874,13 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP // if to dock not to the center of the target dockwidget, // dock to newDock PMDockSplitter* panner = 0L; - if ( dockPos == PMDockWidget::DockTop || dockPos == PMDockWidget::DockBottom ) panner = new PMDockSplitter( newDock, "_dock_split_", Horizontal, spliPos, manager->splitterHighResolution() ); - if ( dockPos == PMDockWidget::DockLeft || dockPos == PMDockWidget::DockRight ) panner = new PMDockSplitter( newDock, "_dock_split_", Vertical , spliPos, manager->splitterHighResolution() ); + if ( dockPos == PMDockWidget::DockTop || dockPos == PMDockWidget::DockBottom ) panner = new PMDockSplitter( newDock, "_dock_split_",Qt::Horizontal, spliPos, manager->splitterHighResolution() ); + if ( dockPos == PMDockWidget::DockLeft || dockPos == PMDockWidget::DockRight ) panner = new PMDockSplitter( newDock, "_dock_split_",Qt::Vertical , spliPos, manager->splitterHighResolution() ); newDock->setWidget( panner ); panner->setOpaqueResize(manager->splitterOpaqueResize()); panner->setKeepSize(manager->splitterKeepSize()); - panner->setFocusPolicy( NoFocus ); + panner->setFocusPolicy( TQ_NoFocus ); target->applyToWidget( panner ); applyToWidget( panner ); target->formerDockPos = target->currentDockPos; @@ -909,9 +909,9 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP panner->show(); } - if ( parentDock ){ - if ( parentDock->inherits("PMDockSplitter") ){ - PMDockSplitter* sp = (PMDockSplitter*)parentDock; + if ( tqparentDock ){ + if ( tqparentDock->inherits("PMDockSplitter") ){ + PMDockSplitter* sp = (PMDockSplitter*)tqparentDock; sp->deactivate(); if ( sp->getFirst() == target ) sp->activate( newDock, 0L ); @@ -928,10 +928,10 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP return newDock; } -PMDockTabGroup* PMDockWidget::parentDockTabGroup() const +PMDockTabGroup* PMDockWidget::tqparentDockTabGroup() const { - if ( !parent() ) return 0L; - TQWidget* candidate = parentWidget()->parentWidget(); + if ( !tqparent() ) return 0L; + TQWidget* candidate = tqparentWidget()->tqparentWidget(); if ( candidate && candidate->inherits("PMDockTabGroup") ) return (PMDockTabGroup*)candidate; return 0L; } @@ -948,8 +948,8 @@ void PMDockWidget::toDesktop() void PMDockWidget::undock() { - TQWidget* parentW = parentWidget(); - if ( !parentW ){ + TQWidget* tqparentW = tqparentWidget(); + if ( !tqparentW ){ hide(); if (!d->blockHasUndockedSignal) emit hasUndocked(); @@ -962,73 +962,73 @@ void PMDockWidget::undock() manager->blockSignals(true); manager->undockProcess = true; - bool isV = parentW->isVisibleToTLW(); + bool isV = tqparentW->isVisibleToTLW(); - PMDockTabGroup* parentTab = parentDockTabGroup(); - if ( parentTab ){ - d->index = parentTab->indexOf( this); // memorize the page position in the tab widget - parentTab->removePage( this ); - formerBrotherDockWidget = (PMDockWidget*)parentTab->page(0); + PMDockTabGroup* tqparentTab = tqparentDockTabGroup(); + if ( tqparentTab ){ + d->index = tqparentTab->indexOf( this); // memorize the page position in the tab widget + tqparentTab->removePage( this ); + formerBrotherDockWidget = (PMDockWidget*)tqparentTab->page(0); TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), this, TQT_SLOT(loseFormerBrotherDockWidget()) ); applyToWidget( 0L ); - if ( parentTab->count() == 1 ){ + if ( tqparentTab->count() == 1 ){ // last subdock widget in the tab control - PMDockWidget* lastTab = (PMDockWidget*)parentTab->page(0); - parentTab->removePage( lastTab ); + PMDockWidget* lastTab = (PMDockWidget*)tqparentTab->page(0); + tqparentTab->removePage( lastTab ); lastTab->applyToWidget( 0L ); - lastTab->move( parentTab->mapToGlobal(parentTab->frameGeometry().topLeft()) ); + lastTab->move( tqparentTab->mapToGlobal(tqparentTab->frameGeometry().topLeft()) ); - // PMDockTabGroup always have a parent that is a PMDockWidget - PMDockWidget* parentOfTab = (PMDockWidget*)parentTab->parent(); - delete parentTab; // PMDockTabGroup + // PMDockTabGroup always have a tqparent that is a PMDockWidget + PMDockWidget* tqparentOfTab = (PMDockWidget*)tqparentTab->tqparent(); + delete tqparentTab; // PMDockTabGroup - TQWidget* parentOfDockWidget = parentOfTab->parentWidget(); - if ( parentOfDockWidget == 0L ){ + TQWidget* tqparentOfDockWidget = tqparentOfTab->tqparentWidget(); + if ( tqparentOfDockWidget == 0L ){ if ( isV ) lastTab->show(); } else { - if ( parentOfDockWidget->inherits("PMDockSplitter") ){ - PMDockSplitter* split = (PMDockSplitter*)parentOfDockWidget; + if ( tqparentOfDockWidget->inherits("PMDockSplitter") ){ + PMDockSplitter* split = (PMDockSplitter*)tqparentOfDockWidget; lastTab->applyToWidget( split ); split->deactivate(); - if ( split->getFirst() == parentOfTab ){ + if ( split->getFirst() == tqparentOfTab ){ split->activate( lastTab ); - if ( ((PMDockWidget*)split->parent())->splitterOrientation == Vertical ) - emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockLeft ); + if ( ((PMDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical ) + emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockLeft ); else - emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockTop ); + emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockTop ); } else { split->activate( 0L, lastTab ); - if ( ((PMDockWidget*)split->parent())->splitterOrientation == Vertical ) - emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockRight ); + if ( ((PMDockWidget*)split->tqparent())->splitterOrientation ==Qt::Vertical ) + emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockRight ); else - emit ((PMDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, PMDockWidget::DockBottom ); + emit ((PMDockWidget*)split->getAnother(tqparentOfTab))->docking( tqparentOfTab, PMDockWidget::DockBottom ); } split->show(); } else { - lastTab->applyToWidget( parentOfDockWidget ); + lastTab->applyToWidget( tqparentOfDockWidget ); } lastTab->show(); } manager->blockSignals(false); - emit manager->replaceDock( parentOfTab, lastTab ); - lastTab->currentDockPos = parentOfTab->currentDockPos; - emit parentOfTab->iMBeingClosed(); + emit manager->replaceDock( tqparentOfTab, lastTab ); + lastTab->currentDockPos = tqparentOfTab->currentDockPos; + emit tqparentOfTab->iMBeingClosed(); manager->blockSignals(true); - delete parentOfTab; + delete tqparentOfTab; } else { - setDockTabName( parentTab ); + setDockTabName( tqparentTab ); } } else { /*********************************************************************************************/ - if ( parentW->inherits("PMDockSplitter") ){ - PMDockSplitter* parentSplitterOfDockWidget = (PMDockSplitter*)parentW; - d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos(); + if ( tqparentW->inherits("PMDockSplitter") ){ + PMDockSplitter* tqparentSplitterOfDockWidget = (PMDockSplitter*)tqparentW; + d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos(); - PMDockWidget* secondWidget = (PMDockWidget*)parentSplitterOfDockWidget->getAnother( this ); - PMDockWidget* group = (PMDockWidget*)parentSplitterOfDockWidget->parentWidget(); + PMDockWidget* secondWidget = (PMDockWidget*)tqparentSplitterOfDockWidget->getAnother( this ); + PMDockWidget* group = (PMDockWidget*)tqparentSplitterOfDockWidget->tqparentWidget(); formerBrotherDockWidget = secondWidget; applyToWidget( 0L ); group->hide(); @@ -1037,25 +1037,25 @@ void PMDockWidget::undock() TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), this, TQT_SLOT(loseFormerBrotherDockWidget()) ); - if ( !group->parentWidget() ){ + if ( !group->tqparentWidget() ){ secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() ); secondWidget->resize( group->width(), group->height() ); } else { - TQWidget* obj = group->parentWidget(); + TQWidget* obj = group->tqparentWidget(); secondWidget->applyToWidget( obj ); if ( obj->inherits("PMDockSplitter") ){ - PMDockSplitter* parentOfGroup = (PMDockSplitter*)obj; - parentOfGroup->deactivate(); + PMDockSplitter* tqparentOfGroup = (PMDockSplitter*)obj; + tqparentOfGroup->deactivate(); - if ( parentOfGroup->getFirst() == group ) - parentOfGroup->activate( secondWidget ); + if ( tqparentOfGroup->getFirst() == group ) + tqparentOfGroup->activate( secondWidget ); else - parentOfGroup->activate( 0L, secondWidget ); + tqparentOfGroup->activate( 0L, secondWidget ); } } secondWidget->currentDockPos = group->currentDockPos; secondWidget->formerDockPos = group->formerDockPos; - delete parentSplitterOfDockWidget; + delete tqparentSplitterOfDockWidget; manager->blockSignals(false); emit manager->replaceDock( group, secondWidget ); emit group->iMBeingClosed(); @@ -1081,18 +1081,18 @@ void PMDockWidget::setWidget( TQWidget* mw ) { if ( !mw ) return; - if ( mw->parent() != this ){ + if ( TQT_BASE_OBJECT(mw->tqparent()) != TQT_BASE_OBJECT(this) ){ mw->reparent(this, 0, TQPoint(0,0), false); } widget = mw; - delete layout; + delete tqlayout; - layout = new TQVBoxLayout( this ); - layout->setResizeMode( TQLayout::Minimum ); + tqlayout = new TQVBoxLayout( this ); + tqlayout->setResizeMode( TQLayout::Minimum ); - layout->addWidget( header ); - layout->addWidget( widget,1 ); + tqlayout->addWidget( header ); + tqlayout->addWidget( widget,1 ); } void PMDockWidget::setDockTabName( PMDockTabGroup* tab ) @@ -1107,24 +1107,24 @@ void PMDockWidget::setDockTabName( PMDockTabGroup* tab ) listOfCaption.remove( listOfCaption.length()-1, 1 ); listOfName.remove( listOfName.length()-1, 1 ); - tab->parentWidget()->setName( listOfName.utf8() ); - tab->parentWidget()->setCaption( listOfCaption ); + tab->tqparentWidget()->setName( listOfName.utf8() ); + tab->tqparentWidget()->setCaption( listOfCaption ); - tab->parentWidget()->repaint( false ); // PMDockWidget->repaint - if ( tab->parentWidget()->parent() ) - if ( tab->parentWidget()->parent()->inherits("PMDockSplitter") ) - ((PMDockSplitter*)(tab->parentWidget()->parent()))->updateName(); + tab->tqparentWidget()->tqrepaint( false ); // PMDockWidget->tqrepaint + if ( tab->tqparentWidget()->tqparent() ) + if ( tab->tqparentWidget()->tqparent()->inherits("PMDockSplitter") ) + ((PMDockSplitter*)(tab->tqparentWidget()->tqparent()))->updateName(); } bool PMDockWidget::mayBeHide() const { - bool f = (parent() != manager->main); + bool f = (TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(manager->main)); return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)PMDockWidget::DockNone ) ); } bool PMDockWidget::mayBeShow() const { - bool f = (parent() != manager->main); + bool f = (TQT_BASE_OBJECT(tqparent()) != TQT_BASE_OBJECT(manager->main)); return ( !isGroup && !isTabGroup && f && !isVisible() ); } @@ -1146,18 +1146,18 @@ void PMDockWidget::changeHideShowState() void PMDockWidget::makeDockVisible() { - if ( parentDockTabGroup() ){ - parentDockTabGroup()->showPage( this ); + if ( tqparentDockTabGroup() ){ + tqparentDockTabGroup()->showPage( this ); } if ( isVisible() ) return; - TQWidget* p = parentWidget(); + TQWidget* p = tqparentWidget(); while ( p ){ if ( !p->isVisible() ) p->show(); - p = p->parentWidget(); + p = p->tqparentWidget(); } - if( parent() == 0L) // is undocked + if( tqparent() == 0L) // is undocked dockBack(); show(); } @@ -1168,13 +1168,13 @@ void PMDockWidget::loseFormerBrotherDockWidget() TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), this, TQT_SLOT(loseFormerBrotherDockWidget()) ); formerBrotherDockWidget = 0L; - repaint(); + tqrepaint(); } void PMDockWidget::dockBack() { if( formerBrotherDockWidget) { - // search all children if it tries to dock back to a child + // search all tqchildren if it tries to dock back to a child bool found = false; TQObjectList* cl = queryList("PMDockWidget"); TQObjectListIt it( *cl ); @@ -1199,7 +1199,7 @@ void PMDockWidget::dockBack() // else dockback to the dockmainwindow (default behaviour) manualDock( ((PMDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index); formerBrotherDockWidget = 0L; - if (parent()) + if (tqparent()) makeDockVisible(); } @@ -1306,7 +1306,7 @@ void PMDockManager::activate() while ( (obj=(PMDockWidget*)it.current()) ) { ++it; if ( obj->widget ) obj->widget->show(); - if ( !obj->parentDockTabGroup() ){ + if ( !obj->tqparentDockTabGroup() ){ obj->show(); } } @@ -1316,21 +1316,21 @@ void PMDockManager::activate() bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) { /* This doesn't seem to fullfill any sense, other than breaking - QMainWindow's layout all over the place + TQMainWindow's tqlayout all over the place The first child of the mainwindow is not necessarily a meaningful - content widget but in Qt3's TQMainWindow it can easily be a TQToolBar. - In short: TQMainWindow knows how to layout its children, no need to + content widget but in TQt3's TQMainWindow it can easily be a TQToolBar. + In short: TQMainWindow knows how to tqlayout its tqchildren, no need to mess that up. >>>>>I need this in the PMDockArea at the moment (JoWenn) - if ( obj == main && event->type() == TQEvent::Resize && dynamic_cast<PMDockArea*>(main) && main->children() ){ + if ( obj == main && event->type() == TQEvent::Resize && dynamic_cast<PMDockArea*>(main) && main->tqchildren() ){ #ifndef NO_KDE2 - kdDebug()<<"PMDockManager::eventFilter(): main is a PMDockArea and there are children"<<endl; + kdDebug()<<"PMDockManager::eventFilter(): main is a PMDockArea and there are tqchildren"<<endl; #endif - TQWidget* fc = (TQWidget*)main->children()->getFirst(); + TQWidget* fc = (TQWidget*)main->tqchildren()->getFirst(); if ( fc ) - fc->setGeometry( TQRect(TQPoint(0,0), main->geometry().size()) ); + fc->setGeometry( TQRect(TQPoint(0,0), main->tqgeometry().size()) ); } */ @@ -1343,11 +1343,11 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) else curdw->toDesktop( ); break; case TQEvent::MouseButtonPress: - if ( ((TQMouseEvent*)event)->button() == LeftButton ){ + if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){ if ( curdw->eDocking != (int)PMDockWidget::DockNone ){ dropCancel = true; curdw->setFocus(); - qApp->processOneEvent(); + tqApp->processOneEvent(); currentDragWidget = curdw; currentMoveWidget = 0L; @@ -1356,7 +1356,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) findChildDockWidget( curdw, *childDockWidgetList ); d->oldDragRect = TQRect(); - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); @@ -1367,7 +1367,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) } break; case TQEvent::MouseButtonRelease: - if ( ((TQMouseEvent*)event)->button() == LeftButton ){ + if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){ if ( draging ){ if ( !dropCancel ) drop(); @@ -1377,7 +1377,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) if (d->readyToDrag) { d->readyToDrag = false; d->oldDragRect = TQRect(); - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); @@ -1398,7 +1398,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) break; } else { if (dropCancel && curdw) { - d->dragRect = TQRect(curdw->geometry()); + d->dragRect = TQRect(curdw->tqgeometry()); TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); }else @@ -1426,7 +1426,7 @@ bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) if (d->readyToDrag) { d->readyToDrag = false; } - if ( (((TQMouseEvent*)event)->state() == LeftButton) && + if ( (((TQMouseEvent*)event)->state() == Qt::LeftButton) && (curdw->eDocking != (int)PMDockWidget::DockNone) ) { startDrag( curdw); } @@ -1454,7 +1454,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos ) return 0L; } #if defined(_OS_WIN32_) || defined(Q_OS_WIN32) - p = p->topLevelWidget(); + p = p->tqtopLevelWidget(); #endif TQWidget* w = 0L; findChildDockWidget( w, p, p->mapFromGlobal(pos) ); @@ -1464,11 +1464,11 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos ) } w = p; } - if ( qt_find_obj_child( w, "PMDockSplitter", "_dock_split_" ) ) return 0L; - if ( qt_find_obj_child( w, "PMDockTabGroup", "_dock_tab" ) ) return 0L; + if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "PMDockSplitter", "_dock_split_" ) ) return 0L; + if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "PMDockTabGroup", "_dock_tab" ) ) return 0L; if (!childDockWidgetList) return 0L; - if ( childDockWidgetList->find(w) != -1 ) return 0L; - if ( currentDragWidget->isGroup && ((PMDockWidget*)w)->parentDockTabGroup() ) return 0L; + if ( childDockWidgetList->tqfind(w) != -1 ) return 0L; + if ( currentDragWidget->isGroup && ((PMDockWidget*)w)->tqparentDockTabGroup() ) return 0L; PMDockWidget* www = (PMDockWidget*)w; if ( www->dockSite( ) == (int)PMDockWidget::DockNone ) return 0L; @@ -1503,14 +1503,15 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos ) void PMDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos ) { - if ( p->children() ) { + TQObjectList clo = p->childrenListObject(); + if ( !clo.isEmpty() ) { TQWidget *w; - TQObjectListIt it( *p->children() ); + TQObjectListIt it( clo ); it.toLast(); while ( it.current() ) { if ( it.current()->isWidgetType() ) { w = (TQWidget*)it.current(); - if ( w->isVisible() && w->geometry().contains(pos) ) { + if ( w->isVisible() && w->tqgeometry().tqcontains(pos) ) { if ( w->inherits("PMDockWidget") ) ww = w; findChildDockWidget( ww, w, w->mapFromParent(pos) ); return; @@ -1524,9 +1525,10 @@ void PMDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const void PMDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList& list ) { - if ( p->children() ) { + TQObjectList clo = p->childrenListObject(); + if ( !clo.isEmpty() ) { TQWidget *w; - TQObjectListIt it( *p->children() ); + TQObjectListIt it( clo ); it.toLast(); while ( it.current() ) { if ( it.current()->isWidgetType() ) { @@ -1547,7 +1549,7 @@ void PMDockManager::findFloatingWidgets( TQPtrList<PMDockWidget>& l ) TQObjectListIt it( *childDock ); for( ; it.current( ); ++it ) if( it.current( )->inherits( "PMDockWidget" ) && - !it.current( )->parent( ) ) + !it.current( )->tqparent( ) ) l.append( ( PMDockWidget* ) it.current( ) ); } @@ -1557,9 +1559,9 @@ void PMDockManager::startDrag( PMDockWidget* w ) || ( w->currentDockPos == PMDockWidget::DockTop) || ( w->currentDockPos == PMDockWidget::DockBottom)) { w->prevSideDockPosBeforeDrag = w->currentDockPos; - if ( w->parentWidget()->inherits("PMDockSplitter") ){ - PMDockSplitter* parentSplitterOfDockWidget = (PMDockSplitter*)(w->parentWidget()); - w->d->splitPosInPercent = parentSplitterOfDockWidget->separatorPos(); + if ( w->tqparentWidget()->inherits("PMDockSplitter") ){ + PMDockSplitter* tqparentSplitterOfDockWidget = (PMDockSplitter*)(w->tqparentWidget()); + w->d->splitPosInPercent = tqparentSplitterOfDockWidget->separatorPos(); } } @@ -1575,7 +1577,7 @@ void PMDockManager::dragMove( PMDockWidget* dw, TQPoint pos ) PMDockWidget::DockPosition oldPos = curPos; TQSize r = dw->widget->size(); - if ( dw->parentDockTabGroup() ){ + if ( dw->tqparentDockTabGroup() ){ curPos = PMDockWidget::DockCenter; if ( oldPos != curPos ) { d->dragRect.setRect( p.x()+2, p.y()+2, r.width()-4, r.height()-4 ); @@ -1586,7 +1588,7 @@ void PMDockManager::dragMove( PMDockWidget* dw, TQPoint pos ) int w = r.width() / 3; int h = r.height() / 3; - PMDockMainWindow* mw = ( PMDockMainWindow* ) parent( ); + PMDockMainWindow* mw = ( PMDockMainWindow* ) tqparent( ); TQWidget* cw = mw->centralWidget( ); TQPoint cwp = cw->mapToGlobal( TQPoint( 0, 0 ) ); int cwh = cw->height( ); @@ -1658,7 +1660,7 @@ void PMDockManager::drop() drawDragRectangle(); // only the old rect will be deleted return; } - if ( !currentMoveWidget && !currentDragWidget->parent() ) { + if ( !currentMoveWidget && !currentDragWidget->tqparent() ) { currentDragWidget->move( TQCursor::pos() - d->dragOffset ); } else { @@ -1690,7 +1692,7 @@ static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagNam static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b) { - return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false")); + return createStringEntry(doc, tagName, TQString::tqfromLatin1(b? "true" : "false")); } @@ -1729,7 +1731,7 @@ static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName, TQStrListIterator it(list); for (; it.current(); ++it) { TQDomElement subel = doc.createElement(subTagName); - subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current()))); + subel.appendChild(doc.createTextNode(TQString::tqfromLatin1(it.current()))); el.appendChild(subel); } @@ -1798,8 +1800,8 @@ void PMDockManager::writeConfig(TQDomElement &base) TQObjectListIt it(*childDock); PMDockWidget *obj1; while ( (obj1=(PMDockWidget*)it.current()) ) { - if ( obj1->parent() == main ) - mainWidgetStr = TQString::fromLatin1(obj1->name()); + if ( TQT_BASE_OBJECT(obj1->tqparent()) == TQT_BASE_OBJECT(main) ) + mainWidgetStr = TQString::tqfromLatin1(obj1->name()); nList.append(obj1->name()); ++it; } @@ -1807,9 +1809,9 @@ void PMDockManager::writeConfig(TQDomElement &base) nList.first(); while ( nList.current() ) { PMDockWidget *obj = getDockWidgetFromName( nList.current() ); - if (obj->isGroup && (nameList.find( obj->firstName.latin1() ) == -1 - || nameList.find(obj->lastName.latin1()) == -1)) { - // Skip until children are saved (why?) + if (obj->isGroup && (nameList.tqfind( obj->firstName.latin1() ) == -1 + || nameList.tqfind(obj->lastName.latin1()) == -1)) { + // Skip until tqchildren are saved (why?) nList.next(); if ( !nList.current() ) nList.first(); continue; @@ -1839,9 +1841,9 @@ void PMDockManager::writeConfig(TQDomElement &base) groupEl = doc.createElement("dock"); } - groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name()))); - groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent())); - if ( !obj->parent() ) { + groupEl.appendChild(createStringEntry(doc, "name", TQString::tqfromLatin1(obj->name()))); + groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->tqparent())); + if ( !obj->tqparent() ) { groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible())); } @@ -1889,7 +1891,7 @@ void PMDockManager::readConfig(TQDomElement &base) PMDockWidget *obj1; while ( (obj1=(PMDockWidget*)it.current()) ) { if ( !obj1->isGroup && !obj1->isTabGroup ) { - if ( obj1->parent() ) + if ( obj1->tqparent() ) obj1->undock(); else obj1->hide(); @@ -1913,7 +1915,7 @@ void PMDockManager::readConfig(TQDomElement &base) PMDockWidget *second = getDockWidgetFromName(secondName); if (first && second) { obj = first->manualDock(second, - (orientation == (int)Vertical)? PMDockWidget::DockLeft : PMDockWidget::DockTop, + (orientation == (int)Qt::Vertical)? PMDockWidget::DockLeft : PMDockWidget::DockTop, separatorPos); if (obj) obj->setName(name.latin1()); @@ -2018,7 +2020,7 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) ++it; //debug(" +Add subdock %s", obj->name()); nList.append( obj->name() ); - if ( obj->parent() == main ) + if ( TQT_BASE_OBJECT(obj->tqparent()) == TQT_BASE_OBJECT(main) ) c->writeEntry( "Main:view", obj->name() ); } @@ -2032,15 +2034,15 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) } /*************************************************************************************************/ if ( obj->isGroup ){ - if ( findList.find( obj->firstName.latin1() ) != -1 && findList.find( obj->lastName.latin1() ) != -1 ){ + if ( findList.tqfind( obj->firstName.latin1() ) != -1 && findList.tqfind( obj->lastName.latin1() ) != -1 ){ c->writeEntry( cname+":type", "GROUP"); - if ( !obj->parent() ){ - c->writeEntry( cname+":parent", "___null___"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + if ( !obj->tqparent() ){ + c->writeEntry( cname+":tqparent", "___null___"); + c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { - c->writeEntry( cname+":parent", "yes"); + c->writeEntry( cname+":tqparent", "yes"); } c->writeEntry( cname+":first_name", obj->firstName ); c->writeEntry( cname+":last_name", obj->lastName ); @@ -2055,9 +2057,9 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) } else { /*************************************************************************************************/ //debug(" Skip %s", nList.current()); - //if ( findList.find( obj->firstName ) == -1 ) + //if ( findList.tqfind( obj->firstName ) == -1 ) // debug(" ? Not found %s", obj->firstName); - //if ( findList.find( obj->lastName ) == -1 ) + //if ( findList.tqfind( obj->lastName ) == -1 ) // debug(" ? Not found %s", obj->lastName); nList.next(); if ( !nList.current() ) nList.first(); @@ -2066,12 +2068,12 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) /*************************************************************************************************/ if ( obj->isTabGroup){ c->writeEntry( cname+":type", "TAB_GROUP"); - if ( !obj->parent() ){ - c->writeEntry( cname+":parent", "___null___"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + if ( !obj->tqparent() ){ + c->writeEntry( cname+":tqparent", "___null___"); + c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { - c->writeEntry( cname+":parent", "yes"); + c->writeEntry( cname+":tqparent", "yes"); } TQStrList list; for ( int i = 0; i < ((PMDockTabGroup*)obj->widget)->count(); ++i ) @@ -2086,9 +2088,9 @@ void PMDockManager::writeConfig( KConfig* c, TQString group ) nList.first(); } else { /*************************************************************************************************/ - if ( !obj->parent() ){ + if ( !obj->tqparent() ){ c->writeEntry( cname+":type", "NULL_DOCK"); - c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); + c->writeEntry( cname+":tqgeometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { c->writeEntry( cname+":type", "DOCK"); @@ -2147,7 +2149,7 @@ void PMDockManager::readConfig( KConfig* c, TQString group ) ++it; if ( !obj->isGroup && !obj->isTabGroup ) { - if ( obj->parent() ) obj->undock(); else obj->hide(); + if ( obj->tqparent() ) obj->undock(); else obj->hide(); } } @@ -2163,9 +2165,9 @@ void PMDockManager::readConfig( KConfig* c, TQString group ) PMDockWidget* last = getDockWidgetFromName( c->readEntry( oname + ":last_name" ) ); int sepPos = c->readNumEntry( oname + ":sepPos" ); - Orientation p = (Orientation)c->readNumEntry( oname + ":orientation" ); + Qt::Orientation p = (Qt::Orientation)c->readNumEntry( oname + ":orientation" ); if ( first && last ){ - obj = first->manualDock( last, ( p == Vertical ) ? PMDockWidget::DockLeft : PMDockWidget::DockTop, sepPos ); + obj = first->manualDock( last, ( p ==Qt::Vertical ) ? PMDockWidget::DockLeft : PMDockWidget::DockTop, sepPos ); if (obj){ obj->setName( oname.latin1() ); } @@ -2197,8 +2199,8 @@ void PMDockManager::readConfig( KConfig* c, TQString group ) obj = tabDockGroup; } - if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){ - TQRect r = c->readRectEntry( oname + ":geometry" ); + if ( type == "NULL_DOCK" || c->readEntry( oname + ":tqparent") == "___null___" ){ + TQRect r = c->readRectEntry( oname + ":tqgeometry" ); obj = getDockWidgetFromName( oname ); obj->applyToWidget( 0L ); obj->setGeometry(r); @@ -2268,8 +2270,8 @@ PMDockWidget* PMDockManager::getDockWidgetFromName( const TQString& dockName ) PMDockWidget* autoCreate = 0L; if ( autoCreateDock ){ - autoCreate = new PMDockWidget( this, dockName.latin1(), TQPixmap("") ); - autoCreateDock->append( autoCreate ); + autoCreate = new PMDockWidget( this, dockName.latin1(), TQPixmap(TQString("")) ); + autoCreateDock->append( TQT_TQOBJECT(autoCreate) ); } return autoCreate; } @@ -2370,14 +2372,14 @@ void PMDockManager::drawDragRectangle() PMDockMainWindow* pMain = 0L; PMDockWidget* pTLDockWdg = 0L; TQWidget* topWdg; - if (pDockWdgAtRect->topLevelWidget() == main) { + if (pDockWdgAtRect->tqtopLevelWidget() == main) { isOverMainWdg = true; topWdg = pMain = (PMDockMainWindow*) main; unclipped = pMain->testWFlags( WPaintUnclipped ); pMain->setWFlags( WPaintUnclipped ); } else { - topWdg = pTLDockWdg = (PMDockWidget*) pDockWdgAtRect->topLevelWidget(); + topWdg = pTLDockWdg = (PMDockWidget*) pDockWdgAtRect->tqtopLevelWidget(); unclipped = pTLDockWdg->testWFlags( WPaintUnclipped ); pTLDockWdg->setWFlags( WPaintUnclipped ); } @@ -2392,7 +2394,7 @@ void PMDockManager::drawDragRectangle() pTLDockWdg->clearWFlags(WPaintUnclipped); } // draw the rectangle - p.setRasterOp(Qt::NotXorROP); + p.setRasterOp(TQt::NotXorROP); TQRect r = oldAndNewDragRect[i]; r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) ); p.drawRect(r.x(), r.y(), r.width(), r.height()); @@ -2406,8 +2408,8 @@ void PMDockManager::drawDragRectangle() #ifdef _JOWENN_EXPERIMENTAL_ -PMDockArea::PMDockArea( TQWidget* parent, const char *name) -:TQWidget( parent, name) +PMDockArea::PMDockArea( TQWidget* tqparent, const char *name) +:TQWidget( tqparent, name) { TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new PMDockManager( this, new_name.latin1() ); @@ -2419,9 +2421,9 @@ PMDockArea::~PMDockArea() delete dockManager; } -PMDockWidget* PMDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel) +PMDockWidget* PMDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent, const TQString& strCaption, const TQString& strTabPageLabel) { - return new PMDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel ); + return new PMDockWidget( dockManager, name.latin1(), pixmap, tqparent, strCaption, strTabPageLabel ); } void PMDockArea::makeDockVisible( PMDockWidget* dock ) @@ -2462,7 +2464,7 @@ void PMDockArea::slotDockWidgetUndocked() void PMDockArea::resizeEvent(TQResizeEvent *rsize) { TQWidget::resizeEvent(rsize); - if (children()){ + if (!childrenListObject().isEmpty()){ #ifndef NO_KDE2 kdDebug()<<"PMDockArea::resize"<<endl; #endif @@ -2479,11 +2481,11 @@ void PMDockArea::resizeEvent(TQResizeEvent *rsize) delete list; #if 0 PMDockSplitter *split; -// for (unsigned int i=0;i<children()->count();i++) +// for (unsigned int i=0;i<tqchildren()->count();i++) { -// TQPtrList<TQObject> list(children()); -// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i); - TQObject *obj=children()->getFirst(); +// TQPtrList<TQObject> list(tqchildren()); +// TQObject *obj=((TQPtrList<TQObject*>)tqchildren())->at(i); + TQObject *obj=tqchildren()->getFirst(); if (split=dynamic_cast<PMDockSplitter*>(obj)) { split->setGeometry( TQRect(TQPoint(0,0), size() )); @@ -2544,6 +2546,6 @@ void PMDockArea::virtual_hook( int, void* ) { /*KMainWindow::virtual_hook( id, data );*/ } -#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name +#ifndef NO_INCLUDE_TQMOCFILES // for TQt-only projects, because tmake doesn't take this name #include "pmdockwidget.moc" #endif diff --git a/kpovmodeler/pmdockwidget.h b/kpovmodeler/pmdockwidget.h index d6c083f2..28e85963 100644 --- a/kpovmodeler/pmdockwidget.h +++ b/kpovmodeler/pmdockwidget.h @@ -39,9 +39,9 @@ - PMDockWidget - IMPORTANT CLASS: the one and only dockwidget class - PMDockManager - helper class - PMDockMainWindow - IMPORTANT CLASS: a special KMainWindow that can have dockwidgets - - PMDockArea - like PMDockMainWindow but inherits just QWidget + - PMDockArea - like PMDockMainWindow but inherits just TQWidget - IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition! + IMPORTANT Note: This file compiles also in TQt-only mode by using the NO_KDE2 precompiler definition! */ /* @@ -106,18 +106,19 @@ class TQToolBar; * * @author Max Judin (documentation: Falk Brettschneider). */ -class PMDockWidgetAbstractHeader : public QFrame +class PMDockWidgetAbstractHeader : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. * - * @param parent the parent widget (usually a dockwidget) + * @param tqparent the tqparent widget (usually a dockwidget) * @param name the object instance name */ - PMDockWidgetAbstractHeader( PMDockWidget* parent, const char* name = 0L ); + PMDockWidgetAbstractHeader( PMDockWidget* tqparent, const char* name = 0L ); /** * Destructs this. @@ -155,19 +156,20 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class PMDockWidgetAbstractHeaderDrag : public QFrame +class PMDockWidgetAbstractHeaderDrag : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. * - * @param parent the parent widget (usually a dockwidget header) + * @param tqparent the tqparent widget (usually a dockwidget header) * @param dock the dockwidget where it belongs to * @param name the object instance name */ - PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* parent, + PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* tqparent, PMDockWidget* dock, const char* name = 0L ); /** @@ -203,16 +205,17 @@ private: class PMDockWidgetHeaderDrag : public PMDockWidgetAbstractHeaderDrag { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. * - * @param parent the parent widget (usually a dockwidget header) + * @param tqparent the tqparent widget (usually a dockwidget header) * @param dock the dockwidget where it belongs to * @param name the object instance name */ - PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* parent, PMDockWidget* dock, + PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* tqparent, PMDockWidget* dock, const char* name = 0L ); /** @@ -244,15 +247,16 @@ private: class PMDockWidgetHeader : public PMDockWidgetAbstractHeader { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. * - * @param parent the parent widget (usually a dockwidget) + * @param tqparent the tqparent widget (usually a dockwidget) * @param name the object instance name */ - PMDockWidgetHeader( PMDockWidget* parent, const char* name = 0L ); + PMDockWidgetHeader( PMDockWidget* tqparent, const char* name = 0L ); /** * Destructs this. @@ -301,9 +305,9 @@ protected slots: protected: /** - * A layout manager for placing the embedded buttons (close and stay) + * A tqlayout manager for placing the embedded buttons (close and stay) */ - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; /** * a little button for closing (undocking and hiding) the dockwidget @@ -346,15 +350,16 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class EXPORT_DOCKCLASS PMDockTabGroup : public QTabWidget +class EXPORT_DOCKCLASS PMDockTabGroup : public TQTabWidget { Q_OBJECT + TQ_OBJECT public: /** * Constructs this. It just calls the method of the base class. */ - PMDockTabGroup( TQWidget *parent = 0, const char *name = 0 ) - :TQTabWidget( parent, name ){}; + PMDockTabGroup( TQWidget *tqparent = 0, const char *name = 0 ) + :TQTabWidget( tqparent, name ){}; /** * Destructs a PMDockTabGroup. @@ -373,7 +378,7 @@ private: * encapsulate the actual widgets (and member of the dockwidget class * set). * - * You just grip the double-lined panel, tear it off its parent + * You just grip the double-lined panel, tear it off its tqparent * widget, drag it somewhere and let it loose. Depending on the * position where you leave it, the dockwidget becomes a toplevel * window on the desktop (floating mode) or docks to a new widget @@ -392,7 +397,7 @@ private: * PMDockMainWindow* mainWidget; * ... * PMDockWidget* dock = 0L; - * dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent + * dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no tqparent * TQWidget* actualWidget = new TQWidget( dock); * dock->setWidget( actualWidget); // embed it * dock->setToolTipString(i18n("That's me")); // available when appearing as tab page @@ -404,9 +409,10 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class EXPORT_DOCKCLASS PMDockWidget: public QWidget +class EXPORT_DOCKCLASS PMDockWidget: public TQWidget { Q_OBJECT + TQ_OBJECT friend class PMDockManager; friend class PMDockSplitter; friend class PMDockMainWindow; @@ -423,12 +429,12 @@ public: * @param dockManager The responsible manager (dock helper) * @param name Object instance name * @param pixmap An icon (for instance shown when docked centered) - * @param parent Parent widget + * @param tqparent Parent widget * @param strCaption Title of the dockwidget window (shown when toplevel) * @param strTabPageLabel The title of the tab page (shown when in tab page mode), if it is "", only the icon will be shown, if it is 0L, the label is set to strCaption */ PMDockWidget( PMDockManager* dockManager, const char* name, - const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, + const TQPixmap &pixmap, TQWidget* tqparent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " ", WFlags f = 0); /** @@ -462,8 +468,8 @@ public: * * If the target is null, it will become a toplevel dockwidget at position pos; * Note: Docking to another dockwidget means exactly: - * A new parent dockwidget will be created, that replaces the target dockwidget and contains another single helper widget (tab widget or panner) - * which contains both dockwidgets, this and the target dockwidget. So consider parent<->child relationships change completely during such actions. + * A new tqparent dockwidget will be created, that replaces the target dockwidget and contains another single helper widget (tab widget or panner) + * which contains both dockwidgets, this and the target dockwidget. So consider tqparent<->child relationships change completely during such actions. * * @param target The dockwidget to dock to * @param dockPos One of the DockPositions this is going to dock to @@ -471,7 +477,7 @@ public: * @param pos The dock position, mainly of interest for docking to the desktop (as toplevel dockwidget) * @param check Only for internal use; * @param tabIndex The position index of the tab widget (when in tab page mode), -1 (default) means append - * @return result The group dockwidget that replaces the target dockwidget and will be grandparent of target and @p this. + * @return result The group dockwidget that replaces the target dockwidget and will be grandtqparent of target and @p this. */ PMDockWidget* manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos = 50, TQPoint pos = TQPoint(0,0), bool check = false, int tabIndex = -1); @@ -500,7 +506,7 @@ public: int dockSite() const { // no docking if a floating dock widget - if( !parent( ) ) + if( !tqparent( ) ) return 0; return sDocking; } @@ -544,7 +550,7 @@ public: * There are reasons that it's impossible: * @li It is a (tab) group. * @li It is already invisible ;-) - * @li The parent of this is the @ref PMDockMainWindow. + * @li The tqparent of this is the @ref PMDockMainWindow. * @li It isn't able to dock to another widget. */ bool mayBeHide() const; @@ -554,7 +560,7 @@ public: * There are reasons that it's impossible: * @li It is a (tab) group. * @li It is already visible ;-) - * @li The parent of this is the @p PMDockMainWindow. + * @li The tqparent of this is the @p PMDockMainWindow. */ bool mayBeShow() const; @@ -606,9 +612,9 @@ public: */ virtual void show(); /** - * @return the parent widget of this if it inherits class PMDockTabGroup + * @return the tqparent widget of this if it inherits class PMDockTabGroup */ - PMDockTabGroup* parentDockTabGroup() const; + PMDockTabGroup* tqparentDockTabGroup() const; #ifndef NO_KDE2 @@ -626,7 +632,7 @@ public: * * @param windowType is type of dock window */ - void setDockWindowTransient (TQWidget *parent, bool transientEnabled); + void setDockWindowTransient (TQWidget *tqparent, bool transientEnabled); // MODIFICATION (lpassos) /** @@ -669,7 +675,7 @@ protected: /** * Checks some conditions and shows or hides the dockwidget header (drag panel). * The header is hidden if: - * @li the parent widget is the PMDockMainWindow + * @li the tqparent widget is the PMDockMainWindow * @li this is a (tab) group dockwidget * @li it is not able to dock to another dockwidget */ @@ -748,7 +754,7 @@ private: void setDockTabName( PMDockTabGroup* g); /** - * Reparent to s or set this to the PMDockMainWindow's view if s is that dockmainwindow. + * Retqparent to s or set this to the PMDockMainWindow's view if s is that dockmainwindow. * If s is O, simply move the widget. * * @param s the target widget to reparent to @@ -767,9 +773,9 @@ private: TQWidget* widget; /** - * the layout manager that takes care about proper resizing and moving the embedded widget and the header + * the tqlayout manager that takes care about proper resizing and moving the embedded widget and the header */ - TQVBoxLayout* layout; + TQVBoxLayout* tqlayout; /** * the responsible dockmanager @@ -799,7 +805,7 @@ private: // GROUP data TQString firstName; TQString lastName; - Orientation splitterOrientation; + Qt::Orientation splitterOrientation; bool isGroup; bool isTabGroup; @@ -821,9 +827,10 @@ private: * * @author Max Judin (documentation: Falk Brettschneider). */ -class EXPORT_DOCKCLASS PMDockManager: public QObject +class EXPORT_DOCKCLASS PMDockManager: public TQObject { Q_OBJECT + TQ_OBJECT friend class PMDockWidget; friend class PMDockMainWindow; @@ -836,7 +843,7 @@ public: * @li Some state variables are set * * @param mainWindow the main window controlled by this - * @param name the internal QOject name + * @param name the internal TQOject name */ PMDockManager( TQWidget* mainWindow, const char* name = 0L ); @@ -848,14 +855,14 @@ public: #ifndef NO_KDE2 /** * Saves the current state of the dockmanager and of all controlled widgets. - * State means here to save the geometry, visibility, parents, internal object names, orientation, + * State means here to save the tqgeometry, visibility, tqparents, internal object names, orientation, * separator positions, dockwidget-group information, tab widget states (if it is a tab group) and * last but not least some necessary things for recovering the dockmainwindow state. * * @param c the KDE configuration saver * @param group the name of the section in KConfig */ - void writeConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeConfig( KConfig* c = 0L, TQString group = TQString() ); /** * Like writeConfig but reads the whole stuff in. @@ -865,7 +872,7 @@ public: * (TQObject::name) in the childDock variable of * PMDockManager. This list in turn contains all * PMDockWidgets (according to the PMDockWidget constructor). - * So in principle, in order to restore a window layout, + * So in principle, in order to restore a window tqlayout, * one must first construct all widgets, put each of them in a * PMDockWidget and then call readConfig(). And for all that * to work, each widget must have a unique name. @@ -873,21 +880,21 @@ public: * @param c the KDE configuration saver * @param group the name of the section in KConfig */ - void readConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readConfig ( KConfig* c = 0L, TQString group = TQString() ); #endif /** - * Saves the current dock window layout into a DOM tree below the given element. + * Saves the current dock window tqlayout into a DOM tree below the given element. */ void writeConfig(TQDomElement &base); /** - * Reads the current dock window layout from a DOM tree below the given element. + * Reads the current dock window tqlayout from a DOM tree below the given element. */ void readConfig(TQDomElement &base); /** * Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are - * parent of a dockwidget tab group. + * tqparent of a dockwidget tab group. */ void activate(); @@ -982,7 +989,7 @@ signals: void replaceDock( PMDockWidget* oldDock, PMDockWidget* newDock ); /** - * Signals a dockwidget without parent (toplevel) is shown. + * Signals a dockwidget without tqparent (toplevel) is shown. */ void setDockDefaultPos( PMDockWidget* ); @@ -1036,7 +1043,7 @@ private: * Finds the TQWidget recursively at the position given as parameter * * @param w a variable where the method puts the TQWidget at that position (instead of a return value) - * @param p the parent widget where the recursive search should start from + * @param p the tqparent widget where the recursive search should start from * @param pos global (desktop) position of the wanted dockwidget */ void findChildDockWidget( TQWidget*& w, const TQWidget* p, const TQPoint& pos ); @@ -1046,7 +1053,7 @@ public: /** * Finds all dockwidgets which are child, grandchild and so on of p. * - * @param p the parent widget where the recursive search starts from + * @param p the tqparent widget where the recursive search starts from * @param l the widget list that contains the search result after the return of this method */ void findChildDockWidget( const TQWidget* p, TQWidgetList& l); @@ -1108,7 +1115,7 @@ private: PMDockWidget::DockPosition curPos; /** - * A QList of all objects that are important for docking. + * A TQList of all objects that are important for docking. * Some serve as group widgets of dockwidgets, others encapsulate normal widgets. */ TQObjectList* childDock; @@ -1208,6 +1215,7 @@ private: class EXPORT_DOCKCLASS PMDockMainWindow : public KMainWindow, virtual public PartBase { Q_OBJECT + TQ_OBJECT friend class PMDockManager; @@ -1216,14 +1224,14 @@ public: /** * Constructs a dockmainwindow. It calls its base class constructor and does additional things concerning * to the dock stuff: - * @li information about the dock state of this' children gets initialized + * @li information about the dock state of this' tqchildren gets initialized * @li a dockmanager is created... * @li ...and gets initialized * @li the main dockwidget is set to 0 * * @param name object name */ - PMDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); + PMDockMainWindow( TQWidget* tqparent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); /** * Destructs a dockmainwindow. @@ -1258,19 +1266,19 @@ public: * * @param name TQObject name (default dockwidget caption) * @param pixmap window icon (for instance shown when docked as tabwidget entry) - * @param parent parent widget for the new dockwidget + * @param tqparent tqparent widget for the new dockwidget * @param strCaption window title (shown when toplevel) * @param strTabPageLabel title of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is 0L, the label is set to strCaption * @return a pointer to the new created dockwidget */ - PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); + PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); /** - * Saves the current dock window layout into a DOM tree below the given element. + * Saves the current dock window tqlayout into a DOM tree below the given element. */ void writeDockConfig(TQDomElement &base); /** - * Reads the current dock window layout from a DOM tree below the given element. + * Reads the current dock window tqlayout from a DOM tree below the given element. */ void readDockConfig(TQDomElement &base); @@ -1281,7 +1289,7 @@ public: * @param c KDE class for saving configurations * @param group name of section to write to */ - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( KConfig* c = 0L, TQString group = TQString() ); /** * It reads the current dock state from the given section of KConfig. @@ -1289,7 +1297,7 @@ public: * @param c KDE class for saving configurations * @param group name of section to read from */ - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( KConfig* c = 0L, TQString group = TQString() ); #endif /** @@ -1409,16 +1417,17 @@ private: /* Joseph Wenninger jowenn@kde.org Experimental (Just all KMainWindow references changed to TQWidget, otherwise nearly exactly the same as PMDockMainWindow*/ -class EXPORT_DOCKCLASS PMDockArea : public QWidget +class EXPORT_DOCKCLASS PMDockArea : public TQWidget { Q_OBJECT + TQ_OBJECT friend class PMDockManager; public: - PMDockArea( TQWidget* parent = 0L, const char *name = 0L); + PMDockArea( TQWidget* tqparent = 0L, const char *name = 0L); virtual ~PMDockArea(); @@ -1428,14 +1437,14 @@ public: void setMainDockWidget( PMDockWidget* ); PMDockWidget* getMainDockWidget(){ return mainDockWidget; } - PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); + PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* tqparent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); void writeDockConfig(TQDomElement &base); void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( KConfig* c = 0L, TQString group = TQString() ); + void readDockConfig ( KConfig* c = 0L, TQString group = TQString() ); #endif diff --git a/kpovmodeler/pmdockwidget_private.cpp b/kpovmodeler/pmdockwidget_private.cpp index 7fd72420..5a86e25a 100644 --- a/kpovmodeler/pmdockwidget_private.cpp +++ b/kpovmodeler/pmdockwidget_private.cpp @@ -22,8 +22,8 @@ #include <tqpainter.h> #include <tqcursor.h> -PMDockSplitter::PMDockSplitter(TQWidget *parent, const char *name, Orientation orient, int pos, bool highResolution) -: TQWidget(parent, name) +PMDockSplitter::PMDockSplitter(TQWidget *tqparent, const char *name, Qt::Orientation orient, int pos, bool highResolution) +: TQWidget(tqparent, name) { divider = 0L; child0 = 0L; @@ -49,7 +49,7 @@ void PMDockSplitter::activate(TQWidget *c0, TQWidget *c1) divider->setLineWidth(1); divider->raise(); - if (orientation == Horizontal) + if (orientation ==Qt::Horizontal) divider->setCursor(TQCursor(sizeVerCursor)); else divider->setCursor(TQCursor(sizeHorCursor)); @@ -68,21 +68,21 @@ void PMDockSplitter::setupMinMaxSize() { // Set the minimum and maximum sizes int minx, maxx, miny, maxy; - if (orientation == Horizontal) { - miny = child0->minimumSize().height() + child1->minimumSize().height()+4; - maxy = child0->maximumSize().height() + child1->maximumSize().height()+4; - minx = (child0->minimumSize().width() > child1->minimumSize().width()) ? child0->minimumSize().width() : child1->minimumSize().width(); - maxx = (child0->maximumSize().width() > child1->maximumSize().width()) ? child0->maximumSize().width() : child1->maximumSize().width(); + if (orientation ==Qt::Horizontal) { + miny = child0->tqminimumSize().height() + child1->tqminimumSize().height()+4; + maxy = child0->tqmaximumSize().height() + child1->tqmaximumSize().height()+4; + minx = (child0->tqminimumSize().width() > child1->tqminimumSize().width()) ? child0->tqminimumSize().width() : child1->tqminimumSize().width(); + maxx = (child0->tqmaximumSize().width() > child1->tqmaximumSize().width()) ? child0->tqmaximumSize().width() : child1->tqmaximumSize().width(); miny = (miny > 4) ? miny : 4; maxy = (maxy < 32000) ? maxy : 32000; minx = (minx > 2) ? minx : 2; maxx = (maxx < 32000) ? maxx : 32000; } else { - minx = child0->minimumSize().width() + child1->minimumSize().width()+4; - maxx = child0->maximumSize().width() + child1->maximumSize().width()+4; - miny = (child0->minimumSize().height() > child1->minimumSize().height()) ? child0->minimumSize().height() : child1->minimumSize().height(); - maxy = (child0->maximumSize().height() > child1->maximumSize().height()) ? child0->maximumSize().height() : child1->maximumSize().height(); + minx = child0->tqminimumSize().width() + child1->tqminimumSize().width()+4; + maxx = child0->tqmaximumSize().width() + child1->tqmaximumSize().width()+4; + miny = (child0->tqminimumSize().height() > child1->tqminimumSize().height()) ? child0->tqminimumSize().height() : child1->tqminimumSize().height(); + maxy = (child0->tqmaximumSize().height() > child1->tqmaximumSize().height()) ? child0->tqmaximumSize().height() : child1->tqmaximumSize().height(); minx = (minx > 4) ? minx : 4; maxx = (maxx < 32000) ? maxx : 32000; @@ -118,7 +118,7 @@ void PMDockSplitter::resizeEvent(TQResizeEvent *ev) int factor = (mHighResolution)? 10000:100; // real resize event, recalculate xpos if (ev && mKeepSize && isVisible()) { - if (orientation == Horizontal) { + if (orientation ==Qt::Horizontal) { if (ev->oldSize().height() != ev->size().height()) xpos = factor * checkValue( child0->height()+1 ) / height(); } else { @@ -126,8 +126,8 @@ void PMDockSplitter::resizeEvent(TQResizeEvent *ev) xpos = factor * checkValue( child0->width()+1 ) / width(); } } - int position = checkValue( (orientation == Vertical ? width() : height()) * xpos/factor ); - if (orientation == Horizontal){ + int position = checkValue( (orientation ==Qt::Vertical ? width() : height()) * xpos/factor ); + if (orientation ==Qt::Horizontal){ child0->setGeometry(0, 0, width(), position); child1->setGeometry(0, position+4, width(), height()-position-4); divider->setGeometry(0, position, width(), 4); @@ -142,24 +142,24 @@ void PMDockSplitter::resizeEvent(TQResizeEvent *ev) int PMDockSplitter::checkValue( int position ) const { if (initialised){ - if (orientation == Vertical){ - if (position < (child0->minimumSize().width())) - position = child0->minimumSize().width(); - if ((width()-4-position) < (child1->minimumSize().width())) - position = width() - (child1->minimumSize().width()) -4; + if (orientation ==Qt::Vertical){ + if (position < (child0->tqminimumSize().width())) + position = child0->tqminimumSize().width(); + if ((width()-4-position) < (child1->tqminimumSize().width())) + position = width() - (child1->tqminimumSize().width()) -4; } else { - if (position < (child0->minimumSize().height())) - position = (child0->minimumSize().height()); - if ((height()-4-position) < (child1->minimumSize().height())) - position = height() - (child1->minimumSize().height()) -4; + if (position < (child0->tqminimumSize().height())) + position = (child0->tqminimumSize().height()); + if ((height()-4-position) < (child1->tqminimumSize().height())) + position = height() - (child1->tqminimumSize().height()) -4; } } if (position < 0) position = 0; - if ((orientation == Vertical) && (position > width())) + if ((orientation ==Qt::Vertical) && (position > width())) position = width(); - if ((orientation == Horizontal) && (position > height())) + if ((orientation ==Qt::Horizontal) && (position > height())) position = height(); return position; @@ -176,14 +176,14 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) mev= (TQMouseEvent*)e; child0->setUpdatesEnabled(mOpaqueResize); child1->setUpdatesEnabled(mOpaqueResize); - if (orientation == Horizontal) { + if (orientation ==Qt::Horizontal) { if (!mOpaqueResize) { int position = checkValue( mapFromGlobal(mev->globalPos()).y() ); divider->move( 0, position ); } else { xpos = factor * checkValue( mapFromGlobal(mev->globalPos()).y() ) / height(); resizeEvent(0); - divider->repaint(true); + divider->tqrepaint(true); } } else { if (!mOpaqueResize) { @@ -192,7 +192,7 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) } else { xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width(); resizeEvent(0); - divider->repaint(true); + divider->tqrepaint(true); } } handled= true; @@ -201,14 +201,14 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) child0->setUpdatesEnabled(true); child1->setUpdatesEnabled(true); mev= (TQMouseEvent*)e; - if (orientation == Horizontal){ + if (orientation ==Qt::Horizontal){ xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).y() ) / height(); resizeEvent(0); - divider->repaint(true); + divider->tqrepaint(true); } else { xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).x() ) / width(); resizeEvent(0); - divider->repaint(true); + divider->tqrepaint(true); } handled= true; break; @@ -221,7 +221,7 @@ bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) bool PMDockSplitter::event( TQEvent* e ) { if ( e->type() == TQEvent::LayoutHint ){ - // change children min/max size + // change tqchildren min/max size setupMinMaxSize(); setSeparatorPos(xpos); } @@ -238,15 +238,15 @@ void PMDockSplitter::updateName() if ( !initialised ) return; TQString new_name = TQString( child0->name() ) + "," + child1->name(); - parentWidget()->setName( new_name.latin1() ); - parentWidget()->setCaption( child0->caption() + "," + child1->caption() ); - parentWidget()->repaint( false ); + tqparentWidget()->setName( new_name.latin1() ); + tqparentWidget()->setCaption( child0->caption() + "," + child1->caption() ); + tqparentWidget()->tqrepaint( false ); - ((PMDockWidget*)parentWidget())->firstName = child0->name(); - ((PMDockWidget*)parentWidget())->lastName = child1->name(); - ((PMDockWidget*)parentWidget())->splitterOrientation = orientation; + ((PMDockWidget*)tqparentWidget())->firstName = child0->name(); + ((PMDockWidget*)tqparentWidget())->lastName = child1->name(); + ((PMDockWidget*)tqparentWidget())->splitterOrientation = orientation; - TQWidget* p = parentWidget()->parentWidget(); + TQWidget* p = tqparentWidget()->tqparentWidget(); if ( p != 0L && p->inherits("PMDockSplitter" ) ) ((PMDockSplitter*)p)->updateName(); } @@ -288,11 +288,11 @@ bool PMDockSplitter::highResolution() const /*************************************************************************/ -PMDockButton_Private::PMDockButton_Private( TQWidget *parent, const char * name ) -:TQPushButton( parent, name ) +PMDockButton_Private::PMDockButton_Private( TQWidget *tqparent, const char * name ) +:TQPushButton( tqparent, name ) { moveMouse = false; - setFocusPolicy( NoFocus ); + setFocusPolicy( TQ_NoFocus ); } PMDockButton_Private::~PMDockButton_Private() @@ -301,7 +301,7 @@ PMDockButton_Private::~PMDockButton_Private() void PMDockButton_Private::drawButton( TQPainter* p ) { - p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) ); + p->fillRect( 0,0, width(), height(), TQBrush(tqcolorGroup().brush(TQColorGroup::Background)) ); p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() ); if ( moveMouse && !isDown() ){ p->setPen( white ); @@ -309,12 +309,12 @@ void PMDockButton_Private::drawButton( TQPainter* p ) p->lineTo( 0, 0 ); p->lineTo( width() - 1, 0 ); - p->setPen( colorGroup().dark() ); + p->setPen( tqcolorGroup().dark() ); p->lineTo( width() - 1, height() - 1 ); p->lineTo( 0, height() - 1 ); } if ( isOn() || isDown() ){ - p->setPen( colorGroup().dark() ); + p->setPen( tqcolorGroup().dark() ); p->moveTo( 0, height() - 1 ); p->lineTo( 0, 0 ); p->lineTo( width() - 1, 0 ); @@ -328,13 +328,13 @@ void PMDockButton_Private::drawButton( TQPainter* p ) void PMDockButton_Private::enterEvent( TQEvent * ) { moveMouse = true; - repaint(); + tqrepaint(); } void PMDockButton_Private::leaveEvent( TQEvent * ) { moveMouse = false; - repaint(); + tqrepaint(); } /*************************************************************************/ @@ -361,12 +361,12 @@ void PMDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w) { if (w) { TQWidget* embeddedWdg = ((PMDockWidget*)w)->getWidget(); - if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) { + if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQ_ClickFocus) || (embeddedWdg->focusPolicy() == TQ_StrongFocus))) { embeddedWdg->setFocus(); } } } -#ifndef NO_INCLUDE_MOCFILES // for Qt-only projects, because tmake doesn't take this name +#ifndef NO_INCLUDE_TQMOCFILES // for TQt-only projects, because tmake doesn't take this name #include "pmdockwidget_private.moc" #endif diff --git a/kpovmodeler/pmdockwidget_private.h b/kpovmodeler/pmdockwidget_private.h index efd8cd14..a2111a90 100644 --- a/kpovmodeler/pmdockwidget_private.h +++ b/kpovmodeler/pmdockwidget_private.h @@ -18,7 +18,7 @@ */ /* - IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition + IMPORTANT Note: This file compiles also in TQt-only mode by using the NO_KDE2 precompiler definition */ #ifndef KDOCKWIDGET_PRIVATE_H @@ -39,11 +39,12 @@ class TQFrame; * * @author Max Judin. */ -class PMDockSplitter : public QWidget +class PMDockSplitter : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PMDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false); + PMDockSplitter(TQWidget *tqparent= 0, const char *name= 0, Qt::Orientation orient=Qt::Vertical, int pos= 50, bool highResolution=false); virtual ~PMDockSplitter(){}; void activate(TQWidget *c0, TQWidget *c1 = 0L); @@ -70,7 +71,7 @@ public: bool highResolution() const; // MODIFICATION (Zehender) - Orientation splitterOrientation( ) const { return orientation; } + Qt::Orientation splitterOrientation( ) const { return orientation; } protected: int checkValue( int ) const; @@ -80,7 +81,7 @@ private: void setupMinMaxSize(); TQWidget *child0, *child1; - Orientation orientation; + Qt::Orientation orientation; bool initialised; TQFrame* divider; int xpos; @@ -93,11 +94,12 @@ private: * * @author Max Judin. */ -class PMDockButton_Private : public QPushButton +class PMDockButton_Private : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - PMDockButton_Private( TQWidget *parent=0, const char *name=0 ); + PMDockButton_Private( TQWidget *tqparent=0, const char *name=0 ); ~PMDockButton_Private(); protected: @@ -112,9 +114,10 @@ private: /** * additional PMDockWidget stuff (private) */ -class PMDockWidgetPrivate : public QObject +class PMDockWidgetPrivate : public TQObject { Q_OBJECT + TQ_OBJECT public: PMDockWidgetPrivate(); ~PMDockWidgetPrivate(); diff --git a/kpovmodeler/pmdocumentationmap.cpp b/kpovmodeler/pmdocumentationmap.cpp index df2bf620..8fe29ce6 100644 --- a/kpovmodeler/pmdocumentationmap.cpp +++ b/kpovmodeler/pmdocumentationmap.cpp @@ -30,7 +30,7 @@ KStaticDeleter<PMDocumentationMap> PMDocumentationMap::s_staticDeleter; TQString PMDocumentationVersion::documentation( const TQString& className ) const { - if( m_map.contains( className ) ) + if( m_map.tqcontains( className ) ) return m_map[className]; return m_index; } diff --git a/kpovmodeler/pmdragwidget.cpp b/kpovmodeler/pmdragwidget.cpp index bc097c46..7e800f72 100644 --- a/kpovmodeler/pmdragwidget.cpp +++ b/kpovmodeler/pmdragwidget.cpp @@ -17,8 +17,8 @@ #include "pmdragwidget.h" -PMDragWidget::PMDragWidget( TQWidget* parent, const char* name, WFlags f ) - : TQWidget( parent, name, f ) +PMDragWidget::PMDragWidget( TQWidget* tqparent, const char* name, WFlags f ) + : TQWidget( tqparent, name, f ) { dragging = false; } diff --git a/kpovmodeler/pmdragwidget.h b/kpovmodeler/pmdragwidget.h index 10c30e16..79efb3f6 100644 --- a/kpovmodeler/pmdragwidget.h +++ b/kpovmodeler/pmdragwidget.h @@ -31,11 +31,12 @@ * * It will emit startDrag when it's time to start a drag. */ -class PMDragWidget : public QWidget +class PMDragWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PMDragWidget( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + PMDragWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0 ); virtual void startDrag( ); diff --git a/kpovmodeler/pmenumproperty.cpp b/kpovmodeler/pmenumproperty.cpp index f82579ad..73a3446f 100644 --- a/kpovmodeler/pmenumproperty.cpp +++ b/kpovmodeler/pmenumproperty.cpp @@ -40,7 +40,7 @@ TQStringList PMEnumProperty::enumValues( ) const bool PMEnumProperty::setProtected( PMObject* obj, const PMVariant& v ) { - PMEnumStringValueMap::iterator it = m_stringMap.find( v.stringData( ) ); + PMEnumStringValueMap::iterator it = m_stringMap.tqfind( v.stringData( ) ); if( it == m_stringMap.end( ) ) return false; setEnum( obj, it.data( ) ); @@ -50,8 +50,8 @@ bool PMEnumProperty::setProtected( PMObject* obj, const PMVariant& v ) PMVariant PMEnumProperty::getProtected( const PMObject* obj ) { int v = getEnum( obj ); - PMEnumValueStringMap::const_iterator it = m_valueMap.find( v ); + PMEnumValueStringMap::const_iterator it = m_valueMap.tqfind( v ); if( it == m_valueMap.end( ) ) - return PMVariant( TQString::null ); + return PMVariant( TQString() ); return it.data( ); } diff --git a/kpovmodeler/pmerrordialog.cpp b/kpovmodeler/pmerrordialog.cpp index eb920fb0..b8a11630 100644 --- a/kpovmodeler/pmerrordialog.cpp +++ b/kpovmodeler/pmerrordialog.cpp @@ -29,8 +29,8 @@ TQSize PMErrorDialog::s_size = TQSize( 150, 200 ); PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, - TQWidget* parent, const char* name ) - : KDialogBase( parent, name, true, i18n( "Messages" ), + TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n( "Messages" ), Ok | Cancel, Cancel ) { TQVBox* page = makeVBoxMainWidget( ); @@ -51,16 +51,16 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, for( ; pit.current( ); ++pit ) { PMObject* obj = pit.current( )->linkedObject( ); - for( ; obj; obj = obj->parent( ) ) + for( ; obj; obj = obj->tqparent( ) ) { - TQPtrList<PMMessage>* pList = m_messageDict.find( obj ); + TQPtrList<PMMessage>* pList = m_messageDict.tqfind( obj ); if( !pList ) { pList = new TQPtrList<PMMessage>; m_messageDict.insert( obj, pList ); } pList->append( pit.current( ) ); - if( !obj->parent( ) ) + if( !obj->tqparent( ) ) { if( obj->type( ) != "scene" ) { diff --git a/kpovmodeler/pmerrordialog.h b/kpovmodeler/pmerrordialog.h index 93981eab..8310b3ad 100644 --- a/kpovmodeler/pmerrordialog.h +++ b/kpovmodeler/pmerrordialog.h @@ -42,9 +42,10 @@ class PMObject; class PMErrorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** - * Creates a modal PMErrorDialog with parent and name. + * Creates a modal PMErrorDialog with tqparent and name. * * messages is the message list. If the list contains a message of type * FatalError, the 'Proceed" button will not be shown. @@ -53,7 +54,7 @@ public: * should be continued. */ PMErrorDialog( const PMMessageList& messages, int errorFlags, - TQWidget* parent = 0, const char* name = 0 ); + TQWidget* tqparent = 0, const char* name = 0 ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); diff --git a/kpovmodeler/pmfactory.cpp b/kpovmodeler/pmfactory.cpp index 488db1ce..a9bdaee8 100644 --- a/kpovmodeler/pmfactory.cpp +++ b/kpovmodeler/pmfactory.cpp @@ -54,9 +54,9 @@ PMFactory::~PMFactory( ) s_aboutData = 0L; } -KParts::Part* PMFactory::createPartObject( TQWidget* parentWidget, +KParts::Part* PMFactory::createPartObject( TQWidget* tqparentWidget, const char* widgetName, - TQObject* parent, const char* name, + TQObject* tqparent, const char* name, const char* classname, const TQStringList& /*args*/ ) { @@ -65,8 +65,8 @@ KParts::Part* PMFactory::createPartObject( TQWidget* parentWidget, bool readwrite = !( ( strcmp( classname, "Browser/View" ) == 0 ) || ( strcmp( classname, "KParts::ReadOnlyPart" ) == 0 ) ); - KParts::ReadWritePart *part = new PMPart( parentWidget, widgetName, - parent, name, readwrite ); + KParts::ReadWritePart *part = new PMPart( tqparentWidget, widgetName, + tqparent, name, readwrite ); return part; } diff --git a/kpovmodeler/pmfactory.h b/kpovmodeler/pmfactory.h index 56797935..ee649d84 100644 --- a/kpovmodeler/pmfactory.h +++ b/kpovmodeler/pmfactory.h @@ -28,13 +28,14 @@ class KInstance; class PMFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: PMFactory( ); virtual ~PMFactory( ); - virtual KParts::Part* createPartObject( TQWidget* parentWidget, + virtual KParts::Part* createPartObject( TQWidget* tqparentWidget, const char* widgetName, - TQObject* parent, const char* name, + TQObject* tqparent, const char* name, const char* classname, const TQStringList& args ); diff --git a/kpovmodeler/pmfiledialog.cpp b/kpovmodeler/pmfiledialog.cpp index d8da0f4d..65ad11c8 100644 --- a/kpovmodeler/pmfiledialog.cpp +++ b/kpovmodeler/pmfiledialog.cpp @@ -22,13 +22,13 @@ #include <kfilefiltercombo.h> -PMFileDialog::PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* parent, const char* name, bool modal ) - : KFileDialog( startDir, filter, parent, name, modal ) +PMFileDialog::PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* tqparent, const char* name, bool modal ) + : KFileDialog( startDir, filter, tqparent, name, modal ) { } -TQString PMFileDialog::getImportFileName( TQWidget* parent, PMPart* part, +TQString PMFileDialog::getImportFileName( TQWidget* tqparent, PMPart* part, PMIOFormat*& format ) { PMIOManager* manager = part->ioManager( ); @@ -52,7 +52,7 @@ TQString PMFileDialog::getImportFileName( TQWidget* parent, PMPart* part, } } - PMFileDialog dlg( TQString::null, filter, parent, "import file dialog", true ); + PMFileDialog dlg( TQString(), filter, tqparent, "import file dialog", true ); dlg.setOperationMode( Opening ); dlg.setMode( KFile::File | KFile::LocalOnly ); dlg.setCaption( i18n( "Import" ) ); @@ -64,7 +64,7 @@ TQString PMFileDialog::getImportFileName( TQWidget* parent, PMPart* part, return dlg.selectedFile( ); } -TQString PMFileDialog::getExportFileName( TQWidget* parent, PMPart* part, +TQString PMFileDialog::getExportFileName( TQWidget* tqparent, PMPart* part, PMIOFormat*& format, TQString& selectedFilter ) { PMIOManager* manager = part->ioManager( ); @@ -88,7 +88,7 @@ TQString PMFileDialog::getExportFileName( TQWidget* parent, PMPart* part, } } - PMFileDialog dlg( TQString::null, filter, parent, "export file dialog", true ); + PMFileDialog dlg( TQString(), filter, tqparent, "export file dialog", true ); dlg.setOperationMode( Saving ); dlg.setMode( KFile::File | KFile::LocalOnly ); dlg.setCaption( i18n( "Export" ) ); diff --git a/kpovmodeler/pmfiledialog.h b/kpovmodeler/pmfiledialog.h index 7843b73d..7aa69b70 100644 --- a/kpovmodeler/pmfiledialog.h +++ b/kpovmodeler/pmfiledialog.h @@ -38,22 +38,23 @@ class PMPart; class PMFileDialog : public KFileDialog { Q_OBJECT + TQ_OBJECT public: /** * Default constructor, use the static methods * @ref getImportFileName or @ref getExportFileName instead */ - PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* parent, const char* name, bool modal ); + PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* tqparent, const char* name, bool modal ); /** * Opens a modal file dialog and returns a selected file and the chosen * file format. */ - static TQString getImportFileName( TQWidget* parent, PMPart* part, PMIOFormat*& format ); + static TQString getImportFileName( TQWidget* tqparent, PMPart* part, PMIOFormat*& format ); /** * Opens a modal file dialog and returns a selected file and the chosen * file format and filter. */ - static TQString getExportFileName( TQWidget* parent, PMPart* part, + static TQString getExportFileName( TQWidget* tqparent, PMPart* part, PMIOFormat*& format, TQString& filter ); }; diff --git a/kpovmodeler/pmfinish.cpp b/kpovmodeler/pmfinish.cpp index 52bd92c8..190925fb 100644 --- a/kpovmodeler/pmfinish.cpp +++ b/kpovmodeler/pmfinish.cpp @@ -130,11 +130,11 @@ PMFinish::~PMFinish( ) { } -PMMetaObject* PMFinish::metaObject( ) const +PMMetaObject* PMFinish::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Finish", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Finish", Base::tqmetaObject( ), createNewFinish ); s_pMetaObject->addProperty( new PMFinishProperty( "ambientColor", &PMFinish::setAmbientColor, &PMFinish::ambientColor ) ); @@ -637,9 +637,9 @@ void PMFinish::setIridTurbulence( double c ) } } -PMDialogEditBase* PMFinish::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMFinish::editWidget( TQWidget* tqparent ) const { - return new PMFinishEdit( parent ); + return new PMFinishEdit( tqparent ); } void PMFinish::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmfinish.h b/kpovmodeler/pmfinish.h index c12f31b1..a33f9d40 100644 --- a/kpovmodeler/pmfinish.h +++ b/kpovmodeler/pmfinish.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMFinishEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmfinish" ); } diff --git a/kpovmodeler/pmfinishedit.cpp b/kpovmodeler/pmfinishedit.cpp index 38766f94..997fe901 100644 --- a/kpovmodeler/pmfinishedit.cpp +++ b/kpovmodeler/pmfinishedit.cpp @@ -29,8 +29,8 @@ #include <kdialog.h> -PMFinishEdit::PMFinishEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMFinishEdit::PMFinishEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -42,80 +42,80 @@ void PMFinishEdit::createTopWidgets( ) Base::createTopWidgets( ); hl = new TQHBoxLayout( topLayout( ) ); - TQGridLayout* layout = new TQGridLayout( hl, 2, 2 ); + TQGridLayout* tqlayout = new TQGridLayout( hl, 2, 2 ); m_pEnableAmbientEdit = new TQCheckBox( i18n( "Ambient color" ), this ); m_pAmbientColorLabel = new TQLabel( i18n( "Color:" ), this ); m_pAmbientColorEdit = new PMColorEdit( true, this ); - layout->addMultiCellWidget( m_pEnableAmbientEdit, 0, 0, 0, 1 ); - layout->addWidget( m_pAmbientColorLabel, 1, 0, AlignTop ); - layout->addWidget( m_pAmbientColorEdit, 1, 1 ); + tqlayout->addMultiCellWidget( m_pEnableAmbientEdit, 0, 0, 0, 1 ); + tqlayout->addWidget( m_pAmbientColorLabel, 1, 0, AlignTop ); + tqlayout->addWidget( m_pAmbientColorEdit, 1, 1 ); hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - layout = new TQGridLayout( hl, 4, 2 ); + tqlayout = new TQGridLayout( hl, 4, 2 ); m_pEnableDiffuseEdit = new TQCheckBox( i18n( "Diffuse:" ), this ); m_pDiffuseEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableDiffuseEdit, 0, 0 ); - layout->addWidget( m_pDiffuseEdit, 0, 1 ); + tqlayout->addWidget( m_pEnableDiffuseEdit, 0, 0 ); + tqlayout->addWidget( m_pDiffuseEdit, 0, 1 ); m_pEnableBrillianceEdit = new TQCheckBox( i18n( "Brilliance:" ), this ); m_pBrillianceEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableBrillianceEdit, 1, 0 ); - layout->addWidget( m_pBrillianceEdit, 1, 1 ); + tqlayout->addWidget( m_pEnableBrillianceEdit, 1, 0 ); + tqlayout->addWidget( m_pBrillianceEdit, 1, 1 ); m_pEnableCrandEdit = new TQCheckBox( i18n( "Crand:" ), this ); m_pCrandEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableCrandEdit, 2, 0 ); - layout->addWidget( m_pCrandEdit, 2, 1 ); + tqlayout->addWidget( m_pEnableCrandEdit, 2, 0 ); + tqlayout->addWidget( m_pCrandEdit, 2, 1 ); m_pConserveEnergyEdit = new TQCheckBox( i18n( "Conserve energy for reflection" ), this ); - layout->addMultiCellWidget( m_pConserveEnergyEdit, 3, 3, 0, 1 ); + tqlayout->addMultiCellWidget( m_pConserveEnergyEdit, 3, 3, 0, 1 ); hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - layout = new TQGridLayout( hl, 2, 2 ); + tqlayout = new TQGridLayout( hl, 2, 2 ); m_pEnablePhongEdit = new TQCheckBox( i18n( "Phong:" ), this ); m_pPhongEdit = new PMFloatEdit( this ); m_pEnablePhongSizeEdit = new TQCheckBox( i18n( "Phong size:" ), this ); m_pPhongSizeEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnablePhongEdit, 0, 0 ); - layout->addWidget( m_pPhongEdit, 0, 1 ); - layout->addWidget( m_pEnablePhongSizeEdit, 1, 0 ); - layout->addWidget( m_pPhongSizeEdit, 1, 1 ); + tqlayout->addWidget( m_pEnablePhongEdit, 0, 0 ); + tqlayout->addWidget( m_pPhongEdit, 0, 1 ); + tqlayout->addWidget( m_pEnablePhongSizeEdit, 1, 0 ); + tqlayout->addWidget( m_pPhongSizeEdit, 1, 1 ); hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - layout = new TQGridLayout( hl, 3, 2 ); + tqlayout = new TQGridLayout( hl, 3, 2 ); m_pEnableSpecularEdit = new TQCheckBox( i18n( "Specular:" ), this ); m_pSpecularEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableSpecularEdit, 0, 0 ); - layout->addWidget( m_pSpecularEdit, 0, 1 ); + tqlayout->addWidget( m_pEnableSpecularEdit, 0, 0 ); + tqlayout->addWidget( m_pSpecularEdit, 0, 1 ); m_pEnableRoughnessEdit = new TQCheckBox( i18n( "Roughness:" ), this ); m_pRoughnessEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableRoughnessEdit, 1, 0 ); - layout->addWidget( m_pRoughnessEdit, 1, 1 ); + tqlayout->addWidget( m_pEnableRoughnessEdit, 1, 0 ); + tqlayout->addWidget( m_pRoughnessEdit, 1, 1 ); m_pEnableMetallicEdit = new TQCheckBox( i18n( "Metallic:" ), this ); m_pMetallicEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableMetallicEdit, 2, 0 ); - layout->addWidget( m_pMetallicEdit, 2, 1 ); + tqlayout->addWidget( m_pEnableMetallicEdit, 2, 0 ); + tqlayout->addWidget( m_pMetallicEdit, 2, 1 ); hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - layout = new TQGridLayout( hl, 6, 2 ); + tqlayout = new TQGridLayout( hl, 6, 2 ); m_pIridEdit = new TQCheckBox( i18n( "Iridiscence" ), this ); - layout->addMultiCellWidget( m_pIridEdit, 0, 0, 0, 1 ); + tqlayout->addMultiCellWidget( m_pIridEdit, 0, 0, 0, 1 ); m_pIridAmountLabel = new TQLabel( i18n( "Amount:" ), this ); m_pIridAmountEdit = new PMFloatEdit( this ); - layout->addWidget( m_pIridAmountLabel, 1, 0 ); - layout->addWidget( m_pIridAmountEdit, 1, 1 ); + tqlayout->addWidget( m_pIridAmountLabel, 1, 0 ); + tqlayout->addWidget( m_pIridAmountEdit, 1, 1 ); m_pIridThicknessLabel = new TQLabel( i18n( "Thickness:" ), this ); m_pIridThicknessEdit = new PMFloatEdit( this ); - layout->addWidget( m_pIridThicknessLabel, 2, 0 ); - layout->addWidget( m_pIridThicknessEdit, 2, 1 ); + tqlayout->addWidget( m_pIridThicknessLabel, 2, 0 ); + tqlayout->addWidget( m_pIridThicknessEdit, 2, 1 ); m_pIridTurbulenceEdit = new PMFloatEdit( this ); m_pIridTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), this ); - layout->addWidget( m_pIridTurbulenceLabel, 3, 0 ); - layout->addWidget( m_pIridTurbulenceEdit, 3, 1 ); + tqlayout->addWidget( m_pIridTurbulenceLabel, 3, 0 ); + tqlayout->addWidget( m_pIridTurbulenceEdit, 3, 1 ); m_pEnableReflectionEdit = new TQCheckBox( i18n( "Reflection" ), this ); - layout->addMultiCellWidget( m_pEnableReflectionEdit, 4, 4, 0, 1 ); + tqlayout->addMultiCellWidget( m_pEnableReflectionEdit, 4, 4, 0, 1 ); hl->addStretch( 1 ); m_pReflectionWidget = new TQWidget( this ); @@ -151,7 +151,7 @@ void PMFinishEdit::createTopWidgets( ) gl->addWidget( m_pEnableRefMetallicEdit, 3, 0 ); gl->addWidget( m_pReflectionMetallicEdit, 3, 1 ); vl->addStretch( 1 ); - layout->addMultiCellWidget( m_pReflectionWidget, 5, 5, 0, 1 ); + tqlayout->addMultiCellWidget( m_pReflectionWidget, 5, 5, 0, 1 ); connect( m_pAmbientColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmfinishedit.h b/kpovmodeler/pmfinishedit.h index e72aef73..9d37ce14 100644 --- a/kpovmodeler/pmfinishedit.h +++ b/kpovmodeler/pmfinishedit.h @@ -39,12 +39,13 @@ class TQWidget; class PMFinishEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMFinishEdit with parent and name + * Creates a PMFinishEdit with tqparent and name */ - PMFinishEdit( TQWidget* parent, const char* name = 0 ); + PMFinishEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmfog.cpp b/kpovmodeler/pmfog.cpp index 6af4a2cb..1ece2757 100644 --- a/kpovmodeler/pmfog.cpp +++ b/kpovmodeler/pmfog.cpp @@ -81,11 +81,11 @@ PMFog::~PMFog( ) { } -PMMetaObject* PMFog::metaObject( ) const +PMMetaObject* PMFog::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Fog", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Fog", Base::tqmetaObject( ), createNewFog ); s_pMetaObject->addProperty( new PMFogProperty( "fogType", &PMFog::setFogType, &PMFog::fogType ) ); @@ -284,9 +284,9 @@ void PMFog::setUp( const PMVector& c ) } } -PMDialogEditBase* PMFog::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMFog::editWidget( TQWidget* tqparent ) const { - return new PMFogEdit( parent ); + return new PMFogEdit( tqparent ); } void PMFog::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmfog.h b/kpovmodeler/pmfog.h index fc6d7095..2eac23a8 100644 --- a/kpovmodeler/pmfog.h +++ b/kpovmodeler/pmfog.h @@ -54,7 +54,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMFogEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmfog" ); } diff --git a/kpovmodeler/pmfogedit.cpp b/kpovmodeler/pmfogedit.cpp index ec9880c1..d993ad3f 100644 --- a/kpovmodeler/pmfogedit.cpp +++ b/kpovmodeler/pmfogedit.cpp @@ -30,8 +30,8 @@ #include <kmessagebox.h> #include <kdialog.h> -PMFogEdit::PMFogEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMFogEdit::PMFogEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmfogedit.h b/kpovmodeler/pmfogedit.h index 5a33cf95..3331f167 100644 --- a/kpovmodeler/pmfogedit.h +++ b/kpovmodeler/pmfogedit.h @@ -42,12 +42,13 @@ class TQLabel; class PMFogEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMFogEdit with parent and name + * Creates a PMFogEdit with tqparent and name */ - PMFogEdit( TQWidget* parent, const char* name = 0 ); + PMFogEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmformulalabel.cpp b/kpovmodeler/pmformulalabel.cpp index 71ba62b6..1f1ffbf9 100644 --- a/kpovmodeler/pmformulalabel.cpp +++ b/kpovmodeler/pmformulalabel.cpp @@ -46,8 +46,8 @@ TQString PMFormulaLabel::s_digit[10] = TQString PMFormulaLabel::s_nullString = TQString( "= 0" ); -PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_exponents[0] = exp.exponent( 0 ); m_exponents[1] = exp.exponent( 1 ); @@ -56,8 +56,8 @@ PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, calculateSizeHint( ); } -PMFormulaLabel::PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMFormulaLabel::PMFormulaLabel( int x, int y, int z, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_exponents[0] = x; m_exponents[1] = y; @@ -78,13 +78,13 @@ void PMFormulaLabel::drawContents( TQPainter* p ) int sum = m_exponents[0] + m_exponents[1] + m_exponents[2]; if( sum == 0 ) - p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft, s_nullString ); + p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft, s_nullString ); else { // draw dot int center = ( cr.top( ) + cr.bottom( ) ) / 2; int rad = c_dotSize / 2; - p->setBrush( TQBrush( colorGroup( ).text( ) ) ); + p->setBrush( TQBrush( tqcolorGroup( ).text( ) ) ); p->drawEllipse( cr.left( ), center - rad, c_dotSize, c_dotSize ); cr.setLeft( cr.left( ) + c_dotSize + c_indent ); @@ -98,13 +98,13 @@ void PMFormulaLabel::drawContents( TQPainter* p ) if( m_exponents[i] > 0 ) { - p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft, s_xyz[i] ); + p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft, s_xyz[i] ); cr.setLeft( cr.left( ) + m1.width( s_xyz[i] ) ); if( m_exponents[i] > 1 ) { cr.setBottom( cr.bottom( ) - up ); p->setFont( f2 ); - p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft, + p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft, s_digit[m_exponents[i]] ); cr.setLeft( cr.left( ) + m2.width( s_digit[m_exponents[i]] ) + 1 ); cr.setBottom( cr.bottom( ) + up ); @@ -131,7 +131,7 @@ void PMFormulaLabel::calculateSizeHint( ) TQFontMetrics m1( font( ) ); if( sum == 0 ) - m_sizeHint.setWidth( m1.width( s_nullString ) ); + m_tqsizeHint.setWidth( m1.width( s_nullString ) ); else { TQFontMetrics m2( exponentFont( ) ); @@ -146,19 +146,19 @@ void PMFormulaLabel::calculateSizeHint( ) width += m2.width( s_digit[m_exponents[i]] ) + 1; } } - m_sizeHint.setWidth( width ); + m_tqsizeHint.setWidth( width ); } - m_sizeHint.setHeight( m1.height( ) + 7 ); + m_tqsizeHint.setHeight( m1.height( ) + 7 ); } -TQSize PMFormulaLabel::sizeHint( ) const +TQSize PMFormulaLabel::tqsizeHint( ) const { - return minimumSizeHint( ); + return tqminimumSizeHint( ); } -TQSize PMFormulaLabel::minimumSizeHint( ) const +TQSize PMFormulaLabel::tqminimumSizeHint( ) const { - return m_sizeHint; + return m_tqsizeHint; } void PMFormulaLabel::fontChange( const TQFont& ) diff --git a/kpovmodeler/pmformulalabel.h b/kpovmodeler/pmformulalabel.h index ee2cace5..bac843d2 100644 --- a/kpovmodeler/pmformulalabel.h +++ b/kpovmodeler/pmformulalabel.h @@ -31,23 +31,23 @@ class PMPolynomExponents; * TQLabel with a rich text to display a polynom for the quadric, * cubic, quartic and polynom objects. */ -class PMFormulaLabel : public QWidget +class PMFormulaLabel : public TQWidget { public: /** * Displays the exponents of the @ref PMPolynomExponents */ - PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name = 0 ); + PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* tqparent, const char* name = 0 ); /** * Displays the given exponents */ - PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name = 0 ); + PMFormulaLabel( int x, int y, int z, TQWidget* tqparent, const char* name = 0 ); /** * Destructor */ ~PMFormulaLabel( ); - virtual TQSize sizeHint( ) const; - virtual TQSize minimumSizeHint( ) const; + virtual TQSize tqsizeHint( ) const; + virtual TQSize tqminimumSizeHint( ) const; protected: virtual void drawContents( TQPainter* p ); @@ -58,7 +58,7 @@ private: TQFont exponentFont( ) const; void calculateSizeHint( ); - TQSize m_sizeHint; + TQSize m_tqsizeHint; int m_exponents[3]; static TQString s_xyz[3]; diff --git a/kpovmodeler/pmglobalphotons.cpp b/kpovmodeler/pmglobalphotons.cpp index ddf32258..78834bf0 100644 --- a/kpovmodeler/pmglobalphotons.cpp +++ b/kpovmodeler/pmglobalphotons.cpp @@ -101,11 +101,11 @@ PMGlobalPhotons::~PMGlobalPhotons( ) { } -PMMetaObject* PMGlobalPhotons::metaObject( ) const +PMMetaObject* PMGlobalPhotons::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "GlobalPhotons", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "GlobalPhotons", Base::tqmetaObject( ), createNewGlobalPhotons ); PMNumberProperty* p1 = new PMNumberProperty( "numberType", @@ -437,9 +437,9 @@ void PMGlobalPhotons::setRadiusMediaMulti( double rmm ) } } -PMDialogEditBase* PMGlobalPhotons::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMGlobalPhotons::editWidget( TQWidget* tqparent ) const { - return new PMGlobalPhotonsEdit( parent ); + return new PMGlobalPhotonsEdit( tqparent ); } void PMGlobalPhotons::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmglobalphotons.h b/kpovmodeler/pmglobalphotons.h index 549e6efc..ad50b5a9 100644 --- a/kpovmodeler/pmglobalphotons.h +++ b/kpovmodeler/pmglobalphotons.h @@ -55,7 +55,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMGlobalPhotonsEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmglobalphotonsedit.cpp b/kpovmodeler/pmglobalphotonsedit.cpp index 5a4a5572..01c6479e 100644 --- a/kpovmodeler/pmglobalphotonsedit.cpp +++ b/kpovmodeler/pmglobalphotonsedit.cpp @@ -29,8 +29,8 @@ #include <kmessagebox.h> -PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmglobalphotonsedit.h b/kpovmodeler/pmglobalphotonsedit.h index e2ae8f7b..61db154f 100644 --- a/kpovmodeler/pmglobalphotonsedit.h +++ b/kpovmodeler/pmglobalphotonsedit.h @@ -38,12 +38,13 @@ class TQCheckBox; class PMGlobalPhotonsEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMGlobalPhotonsEdit with parent and name + * Creates a PMGlobalPhotonsEdit with tqparent and name */ - PMGlobalPhotonsEdit( TQWidget* parent, const char* name = 0 ); + PMGlobalPhotonsEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmglobalsettings.cpp b/kpovmodeler/pmglobalsettings.cpp index efa7db36..739c45ff 100644 --- a/kpovmodeler/pmglobalsettings.cpp +++ b/kpovmodeler/pmglobalsettings.cpp @@ -104,11 +104,11 @@ PMGlobalSettings::~PMGlobalSettings( ) { } -PMMetaObject* PMGlobalSettings::metaObject( ) const +PMMetaObject* PMGlobalSettings::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "GlobalSettings", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "GlobalSettings", Base::tqmetaObject( ), createNewGlobalSettings ); s_pMetaObject->addProperty( new PMGlobalSettingsProperty( "adcBailout", &PMGlobalSettings::setAdcBailout, &PMGlobalSettings::adcBailout ) ); @@ -432,9 +432,9 @@ void PMGlobalSettings::setRecursionLimit( int c ) } } -PMDialogEditBase* PMGlobalSettings::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMGlobalSettings::editWidget( TQWidget* tqparent ) const { - return new PMGlobalSettingsEdit( parent ); + return new PMGlobalSettingsEdit( tqparent ); } void PMGlobalSettings::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmglobalsettings.h b/kpovmodeler/pmglobalsettings.h index a95f86d7..b254afe0 100644 --- a/kpovmodeler/pmglobalsettings.h +++ b/kpovmodeler/pmglobalsettings.h @@ -56,7 +56,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -68,7 +68,7 @@ public: /** * Returns a new @ref PMGlobalSettingsEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmglobalsettingsedit.cpp b/kpovmodeler/pmglobalsettingsedit.cpp index 7c8eddad..8e47e845 100644 --- a/kpovmodeler/pmglobalsettingsedit.cpp +++ b/kpovmodeler/pmglobalsettingsedit.cpp @@ -29,8 +29,8 @@ #include <kdialog.h> #include <kmessagebox.h> -PMGlobalSettingsEdit::PMGlobalSettingsEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMGlobalSettingsEdit::PMGlobalSettingsEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -74,26 +74,26 @@ void PMGlobalSettingsEdit::createTopWidgets( ) hl->addStretch( 1 ); hl = new TQHBoxLayout( topLayout( ) ); - TQGridLayout* layout = new TQGridLayout( hl, 4, 2 ); + TQGridLayout* tqlayout = new TQGridLayout( hl, 4, 2 ); lbl = new TQLabel( i18n( "Maximum intersections:" ), this ); m_pMaxIntersectionsEdit = new PMIntEdit( this ); - layout->addWidget( lbl, 0, 0 ); - layout->addWidget( m_pMaxIntersectionsEdit, 0, 1 ); + tqlayout->addWidget( lbl, 0, 0 ); + tqlayout->addWidget( m_pMaxIntersectionsEdit, 0, 1 ); lbl = new TQLabel( i18n( "Maximum trace level:" ), this ); m_pMaxTraceLevelEdit = new PMIntEdit( this ); - layout->addWidget( lbl, 1, 0 ); - layout->addWidget( m_pMaxTraceLevelEdit, 1, 1 ); + tqlayout->addWidget( lbl, 1, 0 ); + tqlayout->addWidget( m_pMaxTraceLevelEdit, 1, 1 ); lbl = new TQLabel( i18n( "Number of waves:" ), this ); m_pNumberWavesEdit = new PMIntEdit( this ); - layout->addWidget( lbl, 2, 0 ); - layout->addWidget( m_pNumberWavesEdit, 2, 1 ); + tqlayout->addWidget( lbl, 2, 0 ); + tqlayout->addWidget( m_pNumberWavesEdit, 2, 1 ); lbl = new TQLabel( i18n( "Noise generator:" ), this ); m_pNoiseGeneratorEdit = new TQComboBox( false, this ); m_pNoiseGeneratorEdit->insertItem( i18n( "Original" ) ); m_pNoiseGeneratorEdit->insertItem( i18n( "Range Corrected" ) ); m_pNoiseGeneratorEdit->insertItem( i18n( "Perlin" ) ); - layout->addWidget( lbl, 3, 0 ); - layout->addWidget( m_pNoiseGeneratorEdit, 3, 1 ); + tqlayout->addWidget( lbl, 3, 0 ); + tqlayout->addWidget( m_pNoiseGeneratorEdit, 3, 1 ); hl->addStretch( 1 ); m_pRadiosityEdit = new TQCheckBox( i18n( "Radiosity (Povray 3.1)" ), this ); @@ -101,43 +101,43 @@ void PMGlobalSettingsEdit::createTopWidgets( ) m_pRadiosityWidget = new TQWidget( this ); hl = new TQHBoxLayout( m_pRadiosityWidget, 0, KDialog::spacingHint( ) ); - layout = new TQGridLayout( hl, 7, 2 ); + tqlayout = new TQGridLayout( hl, 7, 2 ); lbl = new TQLabel( i18n( "Brightness:" ), m_pRadiosityWidget ); m_pBrightnessEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 0, 0 ); - layout->addWidget( m_pBrightnessEdit, 0, 1 ); + tqlayout->addWidget( lbl, 0, 0 ); + tqlayout->addWidget( m_pBrightnessEdit, 0, 1 ); lbl = new TQLabel( i18n( "Count:" ), m_pRadiosityWidget ); m_pCountEdit = new PMIntEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 1, 0 ); - layout->addWidget( m_pCountEdit, 1, 1 ); + tqlayout->addWidget( lbl, 1, 0 ); + tqlayout->addWidget( m_pCountEdit, 1, 1 ); lbl = new TQLabel( i18n( "Maximum distance:" ), m_pRadiosityWidget ); m_pDistanceMaximumEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 2, 0 ); - layout->addWidget( m_pDistanceMaximumEdit, 2, 1 ); + tqlayout->addWidget( lbl, 2, 0 ); + tqlayout->addWidget( m_pDistanceMaximumEdit, 2, 1 ); lbl = new TQLabel( i18n( "Error boundary:" ), m_pRadiosityWidget ); m_pErrorBoundEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 3, 0 ); - layout->addWidget( m_pErrorBoundEdit, 3, 1 ); + tqlayout->addWidget( lbl, 3, 0 ); + tqlayout->addWidget( m_pErrorBoundEdit, 3, 1 ); lbl = new TQLabel( i18n( "Gray threshold:" ), m_pRadiosityWidget ); m_pGrayThresholdEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 4, 0 ); - layout->addWidget( m_pGrayThresholdEdit, 4, 1 ); + tqlayout->addWidget( lbl, 4, 0 ); + tqlayout->addWidget( m_pGrayThresholdEdit, 4, 1 ); lbl = new TQLabel( i18n( "Low error factor:" ), m_pRadiosityWidget ); m_pLowErrorFactorEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 5, 0 ); - layout->addWidget( m_pLowErrorFactorEdit, 5, 1 ); + tqlayout->addWidget( lbl, 5, 0 ); + tqlayout->addWidget( m_pLowErrorFactorEdit, 5, 1 ); lbl = new TQLabel( i18n( "Minimum reuse:" ), m_pRadiosityWidget ); m_pMinimumReuseEdit = new PMFloatEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 6, 0 ); - layout->addWidget( m_pMinimumReuseEdit, 6, 1 ); + tqlayout->addWidget( lbl, 6, 0 ); + tqlayout->addWidget( m_pMinimumReuseEdit, 6, 1 ); lbl = new TQLabel( i18n( "Nearest count:" ), m_pRadiosityWidget ); m_pNearestCountEdit = new PMIntEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 7, 0 ); - layout->addWidget( m_pNearestCountEdit, 7, 1 ); + tqlayout->addWidget( lbl, 7, 0 ); + tqlayout->addWidget( m_pNearestCountEdit, 7, 1 ); lbl = new TQLabel( i18n( "Recursion limit:" ), m_pRadiosityWidget ); m_pRecursionLimitEdit = new PMIntEdit( m_pRadiosityWidget ); - layout->addWidget( lbl, 8, 0 ); - layout->addWidget( m_pRecursionLimitEdit, 8, 1 ); + tqlayout->addWidget( lbl, 8, 0 ); + tqlayout->addWidget( m_pRecursionLimitEdit, 8, 1 ); hl->addStretch( 1 ); topLayout( )->addWidget( m_pRadiosityWidget ); diff --git a/kpovmodeler/pmglobalsettingsedit.h b/kpovmodeler/pmglobalsettingsedit.h index df0f99b0..fbe8623d 100644 --- a/kpovmodeler/pmglobalsettingsedit.h +++ b/kpovmodeler/pmglobalsettingsedit.h @@ -39,12 +39,13 @@ class TQComboBox; class PMGlobalSettingsEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMGlobalSettingsEdit with parent and name + * Creates a PMGlobalSettingsEdit with tqparent and name */ - PMGlobalSettingsEdit( TQWidget* parent, const char* name = 0 ); + PMGlobalSettingsEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmglview.cpp b/kpovmodeler/pmglview.cpp index e4a53088..823e3c19 100644 --- a/kpovmodeler/pmglview.cpp +++ b/kpovmodeler/pmglview.cpp @@ -106,8 +106,8 @@ bool PMGLView::s_bDirect = true; PMGLView::PMGLView( PMPart* part, PMViewType t, - TQWidget* parent, const char* name, WFlags f ) - : PMViewBase( parent, name, f | Qt::WWinOwnDC | Qt::WRepaintNoErase ) + TQWidget* tqparent, const char* name, WFlags f ) + : PMViewBase( tqparent, name, f | TQt::WWinOwnDC | TQt::WRepaintNoErase ) { m_pPart = part; m_type = t; @@ -143,7 +143,7 @@ PMGLView::PMGLView( PMPart* part, PMViewType t, initializeGL( ); setMouseTracking( true ); - setFocusPolicy( WheelFocus ); + setFocusPolicy( TQ_WheelFocus ); PMRenderManager* rm = PMRenderManager::theManager( ); rm->viewCreated( ); @@ -312,7 +312,7 @@ void PMGLView::initializeGL( ) Window p; p = RootWindow( display, vi->screen ); - TQWidget* pw = parentWidget( ); + TQWidget* pw = tqparentWidget( ); if( pw ) p = pw->winId( ); @@ -326,7 +326,7 @@ void PMGLView::initializeGL( ) Window* colorMapWindows = 0; Window* newWindows = 0; int num; - if( XGetWMColormapWindows( display, topLevelWidget( )->winId( ), + if( XGetWMColormapWindows( display, tqtopLevelWidget( )->winId( ), &colorMapWindows, &num ) ) { // create a new list and append the new window @@ -354,10 +354,10 @@ void PMGLView::initializeGL( ) newWindows = new Window[1]; newWindows[0] = w; } - // tell Qt to use this window + // tell TQt to use this window create( w ); - XSetWMColormapWindows( display, topLevelWidget( )->winId( ), + XSetWMColormapWindows( display, tqtopLevelWidget( )->winId( ), newWindows, num ); delete[] newWindows; @@ -367,7 +367,7 @@ void PMGLView::initializeGL( ) { TQVBoxLayout* topLayout = new TQVBoxLayout( this ); TQLabel* label = new TQLabel( i18n( "No OpenGL support" ), this ); - label->setAlignment( Qt::AlignCenter ); + label->tqsetAlignment( TQt::AlignCenter ); topLayout->addWidget( label ); } @@ -406,7 +406,7 @@ void PMGLView::setScale( double scale ) if( m_dScale > 0 ) { m_dScale = scale; - invalidateProjection( ); + tqinvalidateProjection( ); } else kdError( PMArea ) << "Scale <= 0 in PMGLView::setScale\n"; @@ -415,26 +415,26 @@ void PMGLView::setScale( double scale ) void PMGLView::setTranslationX( double d ) { m_dTransX = d; - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::setTranslationY( double d ) { m_dTransY = d; - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::resizeEvent( TQResizeEvent* ) { - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::paintEvent( TQPaintEvent* ) { - repaint( ); + tqrepaint( ); } -void PMGLView::invalidateProjection( bool graphicalChange /*= true*/ ) +void PMGLView::tqinvalidateProjection( bool graphicalChange /*= true*/ ) { m_viewTransformation = PMMatrix::identity( ); @@ -480,7 +480,7 @@ void PMGLView::invalidateProjection( bool graphicalChange /*= true*/ ) recalculateControlPointPosition( ); } m_projectionUpToDate = false; - repaint( graphicalChange ); + tqrepaint( graphicalChange ); } void PMGLView::enableTranslateMode( bool yes ) @@ -507,7 +507,7 @@ void PMGLView::mousePressEvent( TQMouseEvent* e ) { if( m_bScaleMode || m_bTranslateMode ) { - if( ( e->button( ) & LeftButton ) && ( e->state( ) == 0 ) ) + if( ( e->button( ) & Qt::LeftButton ) && ( e->state( ) == 0 ) ) { m_bMousePressed = true; m_mousePos = e->pos( ); @@ -517,7 +517,7 @@ void PMGLView::mousePressEvent( TQMouseEvent* e ) } else if( m_type != PMViewCamera ) { - if( ( e->button( ) & LeftButton ) && m_bInverseValid + if( ( e->button( ) & Qt::LeftButton ) && m_bInverseValid && m_pActiveObject ) { if( m_pUnderMouse ) @@ -578,7 +578,7 @@ void PMGLView::mousePressEvent( TQMouseEvent* e ) if( !( m_bGraphicalChangeMode || m_bMousePressed ) ) { - if( ( e->button( ) == RightButton ) && ( e->state( ) == 0 ) ) + if( ( e->button( ) == Qt::RightButton ) && ( e->state( ) == 0 ) ) { m_contextClickPosition = PMVector( screenToInternalX( e->x( ) ), screenToInternalY( e->y( ) ) ); @@ -599,7 +599,7 @@ void PMGLView::mousePressEvent( TQMouseEvent* e ) } } - if( e->button( ) == MidButton ) + if( e->button( ) == Qt::MidButton ) { m_bMidMousePressed = true; m_mousePos = e->pos( ); @@ -677,7 +677,7 @@ void PMGLView::mouseReleaseEvent( TQMouseEvent* e ) m_autoScrollTimer.stop( ); } - if( e->button( ) & TQEvent::MidButton ) + if( e->button( ) & Qt::MidButton ) m_bMidMousePressed = false; m_bSelectUnderMouse = false; @@ -698,14 +698,14 @@ void PMGLView::mouseMoveEvent( TQMouseEvent* e ) m_dTransX += m_scaleIntX * c; m_dTransY += m_scaleIntY * c; m_dScale *= s; - invalidateProjection( ); + tqinvalidateProjection( ); } } else if( m_bTranslateMode ) { m_dTransX += ( e->x( ) - m_mousePos.x( ) ) / m_dScale; m_dTransY -= ( e->y( ) - m_mousePos.y( ) ) / m_dScale; - invalidateProjection( ); + tqinvalidateProjection( ); } m_mousePos = e->pos( ); } @@ -713,7 +713,7 @@ void PMGLView::mouseMoveEvent( TQMouseEvent* e ) { m_dTransX += ( e->x( ) - m_mousePos.x( ) ) / m_dScale; m_dTransY -= ( e->y( ) - m_mousePos.y( ) ) / m_dScale; - invalidateProjection( ); + tqinvalidateProjection( ); m_mousePos = e->pos( ); } @@ -799,7 +799,7 @@ void PMGLView::wheelEvent( TQWheelEvent* e ) m_dTransX += deltaX * c; m_dTransY += deltaY * c; m_dScale *= s; - invalidateProjection( ); + tqinvalidateProjection( ); } } @@ -858,7 +858,7 @@ void PMGLView::keyPressEvent( TQKeyEvent* e ) accept = false; if( accept ) - invalidateProjection( ); + tqinvalidateProjection( ); else e->ignore( ); } @@ -885,7 +885,7 @@ void PMGLView::slotAutoScroll( ) m_dTransX += pixels * m_autoScrollDirectionX / m_dScale; m_dTransY -= pixels * m_autoScrollDirectionY / m_dScale; - invalidateProjection( ); + tqinvalidateProjection( ); if( m_bGraphicalChangeMode ) if( m_bMultipleSelectionMode ) @@ -900,7 +900,7 @@ void PMGLView::slotAutoScroll( ) if( m_bGraphicalChangeMode ) graphicalChange( mapFromGlobal( TQCursor::pos( ) ) ); else - repaint( ); + tqrepaint( ); m_lastAutoScrollUpdate = now; } @@ -955,12 +955,12 @@ void PMGLView::graphicalChange( const TQPoint& mousePos ) m_pActiveObject->controlPointsChangedList( m_controlPoints, changedObjects ); if( changedObjects.isEmpty( ) ) - emit objectChanged( m_pActiveObject, PMCGraphicalChange, this ); + emit objectChanged( m_pActiveObject, PMCGraphicalChange, TQT_TQOBJECT(this) ); else { PMObjectListIterator it( changedObjects ); for( ; it.current( ); ++it ) - emit objectChanged( it.current( ), PMCGraphicalChange, this ); + emit objectChanged( it.current( ), PMCGraphicalChange, TQT_TQOBJECT(this) ); } } @@ -1064,7 +1064,7 @@ PMVector PMGLView::mousePosition( PMControlPoint* cp, int x, int y ) result[1] = screenToInternalY( y ); if( cp ) { - index = m_controlPoints.findRef( cp ); + index = m_controlPoints.tqfindRef( cp ); if( index >= 0 ) { p = m_controlPointsPosition.at( ( uint ) index ); @@ -1101,7 +1101,7 @@ void PMGLView::setType( PMViewType t ) if( m_type != t ) m_viewTransformation = PMMatrix::identity( ); m_type = t; - invalidateProjection( ); + tqinvalidateProjection( ); emit viewTypeChanged( viewTypeAsString( t ) ); } @@ -1109,7 +1109,7 @@ void PMGLView::setType( PMViewType t ) void PMGLView::setCamera( PMCamera* c ) { m_pCamera = c; - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::slotRefresh( ) @@ -1118,7 +1118,7 @@ void PMGLView::slotRefresh( ) if( !m_pCamera ) setCamera( m_pPart->firstCamera( ) ); - repaint( ); + tqrepaint( ); } void PMGLView::slotClear( ) @@ -1135,7 +1135,7 @@ void PMGLView::slotClear( ) void PMGLView::slotActiveRenderModeChanged( ) { if( ( m_type == PMViewCamera ) && m_pCamera ) - invalidateProjection( ); + tqinvalidateProjection( ); } void PMGLView::slotStopRendering( ) @@ -1176,13 +1176,13 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode, { if( obj->type( ) == "Camera" ) if( m_pCamera == ( PMCamera* ) obj ) - invalidateProjection( ); + tqinvalidateProjection( ); - if( obj->parent( ) ) - if( obj->parent( )->type( ) == "Camera" ) - if( m_pCamera == ( PMCamera* ) obj->parent( ) ) + if( obj->tqparent( ) ) + if( obj->tqparent( )->type( ) == "Camera" ) + if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( obj->hasTransformationMatrix( ) ) - invalidateProjection( ); + tqinvalidateProjection( ); } redraw = true; @@ -1209,11 +1209,11 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode, if( obj->type( ) == "Camera" ) if( !m_pCamera ) setCamera( ( PMCamera* ) obj ); - if( obj->parent( ) ) - if( obj->parent( )->type( ) == "Camera" ) - if( m_pCamera == ( PMCamera* ) obj->parent( ) ) + if( obj->tqparent( ) ) + if( obj->tqparent( )->type( ) == "Camera" ) + if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( obj->hasTransformationMatrix( ) ) - invalidateProjection( ); + tqinvalidateProjection( ); } redraw = true; } @@ -1225,11 +1225,11 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode, setCamera( 0 ); if( m_type == PMGLView::PMViewCamera ) - if( obj->parent( ) ) - if( obj->parent( )->type( ) == "Camera" ) - if( m_pCamera == ( PMCamera* ) obj->parent( ) ) + if( obj->tqparent( ) ) + if( obj->tqparent( )->type( ) == "Camera" ) + if( m_pCamera == ( PMCamera* ) obj->tqparent( ) ) if( obj->hasTransformationMatrix( ) ) - invalidateProjection( ); + tqinvalidateProjection( ); redraw = true; } @@ -1238,10 +1238,10 @@ void PMGLView::slotObjectChanged( PMObject* obj, const int mode, redraw = true; if( redraw ) - repaint( sender == this ); + tqrepaint( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(this) ); } -void PMGLView::repaint( bool graphicalChange ) +void PMGLView::tqrepaint( bool graphicalChange ) { if( isValid( ) ) { @@ -1296,7 +1296,7 @@ PMObject* PMGLView::topLevelRenderingObject( PMObject* o ) const else if( obj->isA( "Scene" ) || obj->isA( "Declare" ) ) stop = true; else - obj = obj->parent( ); + obj = obj->tqparent( ); } while( !stop ); } @@ -1353,7 +1353,7 @@ void PMGLView::selectControlPoint( PMControlPoint* cp, bool select, bool deselec } if( selectionChanged ) - emit objectChanged( m_pActiveObject, PMCControlPointSelection, this ); + emit objectChanged( m_pActiveObject, PMCControlPointSelection, TQT_TQOBJECT(this) ); } void PMGLView::startSelection( ) @@ -1652,7 +1652,7 @@ void PMGLView::slotControlPoint( int id ) PMControlPointListIterator cit( m_controlPoints ); for( ; cit.current( ); ++cit ) cit.current( )->setSelected( p == cit.current( ) ); - emit objectChanged( m_pActiveObject, PMCControlPointSelection, this ); + emit objectChanged( m_pActiveObject, PMCControlPointSelection, TQT_TQOBJECT(this) ); } } @@ -1754,16 +1754,16 @@ TQString PMGLViewFactory::description( PMViewOptions* vo ) const if( vo && vo->viewType( ) == "glview" ) { PMGLViewOptions* o = ( PMGLViewOptions* ) vo; - return i18n( "3D View (%1)" ).arg( + return i18n( "3D View (%1)" ).tqarg( PMGLView::viewTypeAsString( o->glViewType( ) ) ); } return description( ); } -PMViewOptionsWidget* PMGLViewFactory::newOptionsWidget( TQWidget* parent, +PMViewOptionsWidget* PMGLViewFactory::newOptionsWidget( TQWidget* tqparent, PMViewOptions* o ) { - return new PMGLViewOptionsWidget( parent, o ); + return new PMGLViewOptionsWidget( tqparent, o ); } PMViewOptions* PMGLViewFactory::newOptionsInstance( ) const @@ -1772,9 +1772,9 @@ PMViewOptions* PMGLViewFactory::newOptionsInstance( ) const return o; } -PMGLViewOptionsWidget::PMGLViewOptionsWidget( TQWidget* parent, +PMGLViewOptionsWidget::PMGLViewOptionsWidget( TQWidget* tqparent, PMViewOptions* o ) - : PMViewOptionsWidget( parent ) + : PMViewOptionsWidget( tqparent ) { m_pOptions = ( PMGLViewOptions* ) o; diff --git a/kpovmodeler/pmglview.h b/kpovmodeler/pmglview.h index 521d6911..48537b20 100644 --- a/kpovmodeler/pmglview.h +++ b/kpovmodeler/pmglview.h @@ -51,6 +51,7 @@ class TQComboBox; class PMGLView : public PMViewBase { Q_OBJECT + TQ_OBJECT public: /** * Type of the view @@ -61,7 +62,7 @@ public: * Constructor */ PMGLView( PMPart* part, PMViewType t, - TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0 ); /** * Destructor */ @@ -335,7 +336,7 @@ private: /** * Repaints the view */ - void repaint( bool graphicalChange = false ); + void tqrepaint( bool graphicalChange = false ); /** * Starts a graphical change */ @@ -350,9 +351,9 @@ private: */ void selectControlPoint( PMControlPoint* cp, bool select, bool deselectOthers = true ); /** - * Invalidates the projection and repaints the view + * Invalidates the projection and tqrepaints the view */ - void invalidateProjection( bool graphicaChange = false ); + void tqinvalidateProjection( bool graphicaChange = false ); /** * Starts multiple selection mode @@ -558,25 +559,26 @@ public: virtual TQString description( ) const; virtual TQString description( PMViewOptions* ) const; virtual TQString iconName( ) const { return TQString( "pmglview" ); } - virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const + virtual PMViewBase* newInstance( TQWidget* tqparent, PMPart* part ) const { - return new PMGLView( part, PMGLView::PMViewPosX, parent ); + return new PMGLView( part, PMGLView::PMViewPosX, tqparent ); } virtual PMViewOptions* newOptionsInstance( ) const; virtual PMViewOptionsWidget* newOptionsWidget( TQWidget*, PMViewOptions* ); }; /** - * Configuration widget for the view layout settings dialog + * Configuration widget for the view tqlayout settings dialog */ class PMGLViewOptionsWidget : public PMViewOptionsWidget { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMGLViewOptionsWidget( TQWidget* parent, PMViewOptions* o ); + PMGLViewOptionsWidget( TQWidget* tqparent, PMViewOptions* o ); protected slots: void slotGLViewTypeChanged( int ); diff --git a/kpovmodeler/pmgraphicalobject.cpp b/kpovmodeler/pmgraphicalobject.cpp index c60c40cb..59ace7cf 100644 --- a/kpovmodeler/pmgraphicalobject.cpp +++ b/kpovmodeler/pmgraphicalobject.cpp @@ -60,11 +60,11 @@ PMGraphicalObject::~PMGraphicalObject( ) { } -PMMetaObject* PMGraphicalObject::metaObject( ) const +PMMetaObject* PMGraphicalObject::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "GraphicalObject", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "GraphicalObject", Base::tqmetaObject( ) ); s_pMetaObject->addProperty( new PMGraphicalObjectProperty( "noShadow", &PMGraphicalObject::setNoShadow, &PMGraphicalObject::noShadow ) ); diff --git a/kpovmodeler/pmgraphicalobject.h b/kpovmodeler/pmgraphicalobject.h index 399e351d..662f7682 100644 --- a/kpovmodeler/pmgraphicalobject.h +++ b/kpovmodeler/pmgraphicalobject.h @@ -46,12 +46,12 @@ public: */ PMGraphicalObject( const PMGraphicalObject& o ); /** - * Deletes the object and all children + * Deletes the object and all tqchildren */ virtual ~PMGraphicalObject( ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -101,7 +101,7 @@ public: */ void setVisibilityLevel( int level ); /** - * Returns true if the visibility level is relative to the objects parent + * Returns true if the visibility level is relative to the objects tqparent */ bool isVisibilityLevelRelative( ) const { return m_relativeVisibility; } /** diff --git a/kpovmodeler/pmgraphicalobjectedit.cpp b/kpovmodeler/pmgraphicalobjectedit.cpp index c623c51f..106fbc2a 100644 --- a/kpovmodeler/pmgraphicalobjectedit.cpp +++ b/kpovmodeler/pmgraphicalobjectedit.cpp @@ -28,8 +28,8 @@ const int c_minValue = -1000; const int c_maxValue = 1000; -PMGraphicalObjectEdit::PMGraphicalObjectEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMGraphicalObjectEdit::PMGraphicalObjectEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -143,7 +143,7 @@ void PMGraphicalObjectEdit::slotLevelChanged( int ) void PMGraphicalObjectEdit::recalculateResultingVisibility( ) { - PMObject* o = m_pDisplayedObject->parent( ); + PMObject* o = m_pDisplayedObject->tqparent( ); PMGraphicalObject* go = 0; int level = 0; bool absoluteFound = false; @@ -152,7 +152,7 @@ void PMGraphicalObjectEdit::recalculateResultingVisibility( ) if( !m_pRelativeVisibility->isChecked( ) ) absoluteFound = true; - for( ; o && !absoluteFound; o = o->parent( ) ) + for( ; o && !absoluteFound; o = o->tqparent( ) ) { if( o->isA( "GraphicalObject" ) ) { @@ -162,7 +162,7 @@ void PMGraphicalObjectEdit::recalculateResultingVisibility( ) absoluteFound = true; } } - m_pResultingVisibility->setText( TQString( "(%1)" ).arg( level ) ); + m_pResultingVisibility->setText( TQString( "(%1)" ).tqarg( level ) ); } #include "pmgraphicalobjectedit.moc" diff --git a/kpovmodeler/pmgraphicalobjectedit.h b/kpovmodeler/pmgraphicalobjectedit.h index 29f53a0f..36758f63 100644 --- a/kpovmodeler/pmgraphicalobjectedit.h +++ b/kpovmodeler/pmgraphicalobjectedit.h @@ -37,12 +37,13 @@ class TQLabel; class PMGraphicalObjectEdit : public PMDetailObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMDetailObjectEdit Base; public: /** - * Creates a PMGraphicalObjectEdit with parent and name + * Creates a PMGraphicalObjectEdit with tqparent and name */ - PMGraphicalObjectEdit( TQWidget* parent, const char* name = 0 ); + PMGraphicalObjectEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmgridsettings.cpp b/kpovmodeler/pmgridsettings.cpp index 04bdbdd3..60803cd9 100644 --- a/kpovmodeler/pmgridsettings.cpp +++ b/kpovmodeler/pmgridsettings.cpp @@ -28,41 +28,41 @@ #include <kcolorbutton.h> #include <klocale.h> -PMGridSettings::PMGridSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMGridSettings::PMGridSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQVBoxLayout* gvl; TQGridLayout* grid; TQGroupBox* gb; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); gb = new TQGroupBox( i18n( "Displayed Grid" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Color:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Color:" ), gb ) ); m_pGridColor = new KColorButton( gb ); - hlayout->addWidget( m_pGridColor ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pGridColor ); + htqlayout->addStretch( 1 ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Distance:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Distance:" ), gb ) ); m_pGridDistance = new PMIntEdit( gb ); m_pGridDistance->setValidation( true, 20, false, 0 ); - hlayout->addWidget( m_pGridDistance ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pGridDistance ); + htqlayout->addStretch( 1 ); gb = new TQGroupBox( i18n( "Control Point Grid" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); - grid = new TQGridLayout( hlayout, 3, 2 ); + htqlayout = new TQHBoxLayout( gvl ); + grid = new TQGridLayout( htqlayout, 3, 2 ); grid->addWidget( new TQLabel( i18n( "2D/3D movement:" ), gb ), 0, 0 ); m_pMoveGrid = new PMFloatEdit( gb ); m_pMoveGrid->setValidation( true, 0.001, true, 100 ); @@ -78,9 +78,9 @@ PMGridSettings::PMGridSettings( TQWidget* parent, const char* name ) m_pRotateGrid->setValidation( true, 0.001, true, 180 ); grid->addWidget( m_pRotateGrid, 2, 1 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMGridSettings::displaySettings( ) @@ -133,23 +133,23 @@ bool PMGridSettings::validateData( ) void PMGridSettings::applySettings( ) { - bool repaint = false; + bool tqrepaint = false; PMRenderManager* rm = PMRenderManager::theManager( ); if( rm->gridColor( ) != m_pGridColor->color( ) ) { rm->setGridColor( m_pGridColor->color( ) ); - repaint = true; + tqrepaint = true; } if( rm->gridDistance( ) != m_pGridDistance->value( ) ) { rm->setGridDistance( m_pGridDistance->value( ) ); - repaint = true; + tqrepaint = true; } PMControlPoint::setMoveGrid( m_pMoveGrid->value( ) ); PMControlPoint::setScaleGrid( m_pScaleGrid->value( ) ); PMControlPoint::setRotateGrid( m_pRotateGrid->value( ) ); - if( repaint ) - emit repaintViews( ); + if( tqrepaint ) + emit tqrepaintViews( ); } #include "pmgridsettings.moc" diff --git a/kpovmodeler/pmgridsettings.h b/kpovmodeler/pmgridsettings.h index 214f3af3..20b4f01e 100644 --- a/kpovmodeler/pmgridsettings.h +++ b/kpovmodeler/pmgridsettings.h @@ -34,11 +34,12 @@ class PMFloatEdit; class PMGridSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMGridSettings( TQWidget* parent, const char* name = 0 ); + PMGridSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmheightfield.cpp b/kpovmodeler/pmheightfield.cpp index 6806437a..654cd43c 100644 --- a/kpovmodeler/pmheightfield.cpp +++ b/kpovmodeler/pmheightfield.cpp @@ -107,11 +107,11 @@ void PMHeightField::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMHeightField::metaObject( ) const +PMMetaObject* PMHeightField::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "HeightField", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "HeightField", Base::tqmetaObject( ), createNewHeightField ); s_pMetaObject->addProperty( new PMHeightFieldProperty( "fileName", &PMHeightField::setFileName, &PMHeightField::fileName ) ); @@ -200,9 +200,9 @@ void PMHeightField::setWaterLevel( double wl ) } } -PMDialogEditBase* PMHeightField::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMHeightField::editWidget( TQWidget* tqparent ) const { - return new PMHeightFieldEdit( parent ); + return new PMHeightFieldEdit( tqparent ); } void PMHeightField::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmheightfield.h b/kpovmodeler/pmheightfield.h index 443226ba..62afe95b 100644 --- a/kpovmodeler/pmheightfield.h +++ b/kpovmodeler/pmheightfield.h @@ -60,7 +60,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMHeightFieldEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmheightfieldedit.cpp b/kpovmodeler/pmheightfieldedit.cpp index 5f9346f0..b3de59fa 100644 --- a/kpovmodeler/pmheightfieldedit.cpp +++ b/kpovmodeler/pmheightfieldedit.cpp @@ -31,8 +31,8 @@ #include <kiconloader.h> #include <kfiledialog.h> -PMHeightFieldEdit::PMHeightFieldEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMHeightFieldEdit::PMHeightFieldEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -189,7 +189,7 @@ void PMHeightFieldEdit::slotFileNameChanged( const TQString& ) void PMHeightFieldEdit::slotFileNameClicked( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmheightfieldedit.h b/kpovmodeler/pmheightfieldedit.h index 8a32aa00..2b97b03a 100644 --- a/kpovmodeler/pmheightfieldedit.h +++ b/kpovmodeler/pmheightfieldedit.h @@ -39,12 +39,13 @@ class TQPushButton; class PMHeightFieldEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMHeightFieldEdit with parent and name + * Creates a PMHeightFieldEdit with tqparent and name */ - PMHeightFieldEdit( TQWidget* parent, const char* name = 0 ); + PMHeightFieldEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmheightfieldroam.cpp b/kpovmodeler/pmheightfieldroam.cpp index d4809aac..87856155 100644 --- a/kpovmodeler/pmheightfieldroam.cpp +++ b/kpovmodeler/pmheightfieldroam.cpp @@ -180,7 +180,7 @@ bool PMHeightFieldROAM::imageToData(const TQString &fileName) colourIndex = false; else { - scaledMap = scaledMap.convertDepthWithPalette( 8, mapFile.colorTable( ), 256 ); + scaledMap = scaledMap.convertDepthWithPalette( 8, mapFile.tqcolorTable( ), 256 ); colourIndex = true; } @@ -191,8 +191,8 @@ bool PMHeightFieldROAM::imageToData(const TQString &fileName) if ( colourIndex ) setHeight( x, y2, scaledMap.pixelIndex( x, y ) * 256 ); else - setHeight( x, y2, ( 256 * qRed( scaledMap.pixel( x, y ) ) ) + - qGreen( scaledMap.pixel( x, y ) ) ); + setHeight( x, y2, ( 256 * tqRed( scaledMap.pixel( x, y ) ) ) + + tqGreen( scaledMap.pixel( x, y ) ) ); } } diff --git a/kpovmodeler/pmimagemap.cpp b/kpovmodeler/pmimagemap.cpp index 5f28c49a..2040de46 100644 --- a/kpovmodeler/pmimagemap.cpp +++ b/kpovmodeler/pmimagemap.cpp @@ -275,11 +275,11 @@ void PMImageMap::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMImageMap::metaObject( ) const +PMMetaObject* PMImageMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ImageMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "ImageMap", Base::tqmetaObject( ), createNewImageMap ); PMBitmapTypeProperty* bp = new PMBitmapTypeProperty( @@ -459,9 +459,9 @@ void PMImageMap::setTransmits( const TQValueList<PMPaletteValue>& c ) } } -PMDialogEditBase* PMImageMap::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMImageMap::editWidget( TQWidget* tqparent ) const { - return new PMImageMapEdit( parent ); + return new PMImageMapEdit( tqparent ); } void PMImageMap::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmimagemap.h b/kpovmodeler/pmimagemap.h index 3a43d949..859fb5f3 100644 --- a/kpovmodeler/pmimagemap.h +++ b/kpovmodeler/pmimagemap.h @@ -71,7 +71,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -86,7 +86,7 @@ public: /** * Returns a new @ref PMImageMapEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Gets the bitmap type diff --git a/kpovmodeler/pmimagemapedit.cpp b/kpovmodeler/pmimagemapedit.cpp index 09d5eb0a..5e322d95 100644 --- a/kpovmodeler/pmimagemapedit.cpp +++ b/kpovmodeler/pmimagemapedit.cpp @@ -38,8 +38,8 @@ #include <kfiledialog.h> #include <kiconloader.h> -PMImageMapEdit::PMImageMapEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMImageMapEdit::PMImageMapEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -247,8 +247,8 @@ void PMImageMapEdit::displayPaletteEntries( const TQValueList<PMPaletteValue>& f TQPixmap removeButtonPixmap = SmallIcon( "pmremovepoint" ); // First let's deal with the filter entries... - if( m_pFiltersWidget->layout( ) ) - delete m_pFiltersWidget->layout( ); + if( m_pFiltersWidget->tqlayout( ) ) + delete m_pFiltersWidget->tqlayout( ); m_filterEntries.setAutoDelete( true ); m_filterAddButtons.setAutoDelete( true ); @@ -313,8 +313,8 @@ void PMImageMapEdit::displayPaletteEntries( const TQValueList<PMPaletteValue>& f m_transmitRemoveButtons.setAutoDelete( false ); // recreate the entry edits - if( m_pTransmitsWidget->layout( ) ) - delete m_pTransmitsWidget->layout( ); + if( m_pTransmitsWidget->tqlayout( ) ) + delete m_pTransmitsWidget->tqlayout( ); gl = new TQGridLayout( m_pTransmitsWidget, ntransmits + 1, 3, 0, KDialog::spacingHint( ) ); @@ -475,7 +475,7 @@ void PMImageMapEdit::slotImageFileNameChanged( const TQString& /*a*/ ) void PMImageMapEdit::slotImageFileBrowseClicked( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { @@ -535,7 +535,7 @@ void PMImageMapEdit::slotAddFilterEntry( ) if( button ) { - int index = m_filterAddButtons.findRef( button ); + int index = m_filterAddButtons.tqfindRef( button ); if( index >= 0 ) { entriesFilters = filters( ); @@ -561,7 +561,7 @@ void PMImageMapEdit::slotRemoveFilterEntry( ) if( button ) { - int index = m_filterRemoveButtons.findRef( button ); + int index = m_filterRemoveButtons.tqfindRef( button ); if( index >= 0 ) { entriesFilters = filters( ); @@ -583,7 +583,7 @@ void PMImageMapEdit::slotAddTransmitEntry( ) if( button ) { - int index = m_transmitAddButtons.findRef( button ); + int index = m_transmitAddButtons.tqfindRef( button ); if( index >= 0 ) { entriesTransmits = transmits( ); @@ -609,7 +609,7 @@ void PMImageMapEdit::slotRemoveTransmitEntry( ) if( button ) { - int index = m_transmitRemoveButtons.findRef( button ); + int index = m_transmitRemoveButtons.tqfindRef( button ); if( index >= 0 ) { entriesTransmits = transmits( ); diff --git a/kpovmodeler/pmimagemapedit.h b/kpovmodeler/pmimagemapedit.h index 49ce3d8c..4b5d4b2e 100644 --- a/kpovmodeler/pmimagemapedit.h +++ b/kpovmodeler/pmimagemapedit.h @@ -45,12 +45,13 @@ class TQPushButton; class PMImageMapEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMImageMapEdit with parent and name + * Creates a PMImageMapEdit with tqparent and name */ - PMImageMapEdit( TQWidget* parent, const char* name = 0 ); + PMImageMapEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pminserterrordialog.cpp b/kpovmodeler/pminserterrordialog.cpp index 9dd7867a..65d1c66d 100644 --- a/kpovmodeler/pminserterrordialog.cpp +++ b/kpovmodeler/pminserterrordialog.cpp @@ -25,13 +25,13 @@ PMInsertErrorDialog::PMInsertErrorDialog( int numObj, int numErrors, const TQStringList& details, - TQWidget* parent /*= 0*/, const char* name /*= 0*/ ) - : KDialogBase( parent, name, true, i18n( "Insert Errors" ), + TQWidget* tqparent /*= 0*/, const char* name /*= 0*/ ) + : KDialogBase( tqparent, name, true, i18n( "Insert Errors" ), Help | Ok | User1, Ok, false, i18n( "Details" ) ) { TQVBox* page = makeVBoxMainWidget( ); new TQLabel( i18n( "%1 of %2 objects couldn't be inserted." ) - .arg( numErrors ).arg( numObj ), page ); + .tqarg( numErrors ).tqarg( numObj ), page ); m_pDetailsLabel = new TQLabel( i18n( "Objects not inserted:" ), page ); m_pDetailsLabel->hide( ); diff --git a/kpovmodeler/pminserterrordialog.h b/kpovmodeler/pminserterrordialog.h index 9a2c1d2e..09eb32dd 100644 --- a/kpovmodeler/pminserterrordialog.h +++ b/kpovmodeler/pminserterrordialog.h @@ -36,13 +36,14 @@ class TQLabel; class PMInsertErrorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** - * Creates a modal PMInsertErrorDialog with parent and name. + * Creates a modal PMInsertErrorDialog with tqparent and name. */ PMInsertErrorDialog( int NumberOfObjects, int NumberOfInsertErrors, const TQStringList& details, - TQWidget* parent = 0, const char* name = 0 ); + TQWidget* tqparent = 0, const char* name = 0 ); protected slots: void slotUser1( ); diff --git a/kpovmodeler/pminsertpopup.cpp b/kpovmodeler/pminsertpopup.cpp index 0f8ffb23..addab3cf 100644 --- a/kpovmodeler/pminsertpopup.cpp +++ b/kpovmodeler/pminsertpopup.cpp @@ -21,11 +21,11 @@ #include <kiconloader.h> #include <tqcursor.h> -PMInsertPopup::PMInsertPopup( TQWidget* parent, bool multipleObjects, +PMInsertPopup::PMInsertPopup( TQWidget* tqparent, bool multipleObjects, int items, bool canInsertAllAsFirstChildren, bool canInsertAllAsLastChildren, bool canInsertAllAsSiblings, const char* name ) - : KPopupMenu( parent, name ) + : KPopupMenu( tqparent, name ) { TQString itemText; if( multipleObjects ) @@ -71,13 +71,13 @@ PMInsertPopup::PMInsertPopup( TQWidget* parent, bool multipleObjects, } } -int PMInsertPopup::choosePlace( TQWidget* parent, bool multipleObjects, +int PMInsertPopup::choosePlace( TQWidget* tqparent, bool multipleObjects, int items, bool canInsertAllAsFirstChildren, bool canInsertAllAsLastChildren, bool canInsertAllAsSiblings ) { int result; - PMInsertPopup* popup = new PMInsertPopup( parent, multipleObjects, items, + PMInsertPopup* popup = new PMInsertPopup( tqparent, multipleObjects, items, canInsertAllAsFirstChildren, canInsertAllAsLastChildren, canInsertAllAsSiblings ); diff --git a/kpovmodeler/pminsertpopup.h b/kpovmodeler/pminsertpopup.h index 09aa796a..3ec3ecd3 100644 --- a/kpovmodeler/pminsertpopup.h +++ b/kpovmodeler/pminsertpopup.h @@ -39,13 +39,13 @@ public: /** * Creates a popup menu * - * @param parent The parent widget + * @param tqparent The tqparent widget * @param multipleObjects True if more than one object will be inserted * @param items Which items to display. Can be a bitwise combination * of PMIFirstChild, PMILastChild, PMISibling. * @param name Internal name of the popup menu */ - PMInsertPopup( TQWidget* parent, bool multipleObjects, + PMInsertPopup( TQWidget* tqparent, bool multipleObjects, int items = PMIFirstChild | PMILastChild | PMISibling, bool canInsertAllAsFirstChildren = true, bool canInsertAllAsLastChildren = true, @@ -59,7 +59,7 @@ public: /** * Popups a PMInsertPopup menu * - * @param parent The parent widget + * @param tqparent The tqparent widget * @param multipleObjects True if more than one object will be inserted * @param items Which items to display. Can be a bitwise combination * of PMIFirstChild, PMILastChild, PMISibling. @@ -70,7 +70,7 @@ public: * * Returns the selected item or 0 if no item was selected. */ - static int choosePlace( TQWidget* parent, bool multipleObjects, + static int choosePlace( TQWidget* tqparent, bool multipleObjects, int items = PMIFirstChild | PMILastChild | PMISibling, bool canInsertAllAsFirstChildren = true, diff --git a/kpovmodeler/pminsertrules.dtd b/kpovmodeler/pminsertrules.dtd index a3c2128c..4b9a46d7 100644 --- a/kpovmodeler/pminsertrules.dtd +++ b/kpovmodeler/pminsertrules.dtd @@ -39,23 +39,23 @@ Insert a list of groups and classes (the object classes that can be inserted) and one condition. If the condition is omitted, the classes can allways be inserted. --> -<!ELEMENT rule ((group | class)+, (and | or | not | before | after | contains +<!ELEMENT rule ((group | class)+, (and | or | not | before | after | tqcontains | greater | less | equal)?)> <!-- Simple negation. Insert one condition --> -<!ELEMENT not (and | or | before | after | contains | greater | less | equal)> +<!ELEMENT not (and | or | before | after | tqcontains | greater | less | equal)> <!-- Logical and. Insert any number of conditions --> -<!ELEMENT and (and | or | not | before | after | contains | greater | less | equal)+> +<!ELEMENT and (and | or | not | before | after | tqcontains | greater | less | equal)+> <!-- Logical or. Insert any number of conditions --> -<!ELEMENT or (and | or | not | before | after | contains | greater | less | equal)+> +<!ELEMENT or (and | or | not | before | after | tqcontains | greater | less | equal)+> -<!-- Condition. Value is true if the object already contains +<!-- Condition. Value is true if the object already tqcontains objects of the given class or group before the insert point. --> <!ELEMENT before (class | group)> -<!-- Condition. Value is true if the object already contains +<!-- Condition. Value is true if the object already tqcontains objects of the given class or group after the insert point. --> <!ELEMENT after (class | group)> @@ -71,9 +71,9 @@ is less than the second. --> <!ELEMENT less ((property | count | const), (property | count | const))> -<!-- Condition. Value is true if the object contains +<!-- Condition. Value is true if the object tqcontains objects of the given classes and groups. --> -<!ELEMENT contains (group | class)+> +<!ELEMENT tqcontains (group | class)+> <!-- Value. Value is the class property of the object, where the diff --git a/kpovmodeler/pminsertrulesystem.cpp b/kpovmodeler/pminsertrulesystem.cpp index 3c601df7..4e2b79c3 100644 --- a/kpovmodeler/pminsertrulesystem.cpp +++ b/kpovmodeler/pminsertrulesystem.cpp @@ -136,7 +136,7 @@ bool isCondition( TQDomElement& e ) { return( e.tagName( ) == "not" || e.tagName( ) == "and" || e.tagName( ) == "or" || e.tagName( ) == "before" || - e.tagName( ) == "after" || e.tagName( ) == "contains" || + e.tagName( ) == "after" || e.tagName( ) == "tqcontains" || e.tagName( ) == "greater" || e.tagName( ) == "less" || e.tagName( ) == "equal" ); } @@ -168,7 +168,7 @@ PMRuleCondition* newCondition( TQDomElement& e, return new PMRuleBefore( e, globalGroups, localGroups ); if( e.tagName( ) == "after" ) return new PMRuleAfter( e, globalGroups, localGroups ); - if( e.tagName( ) == "contains" ) + if( e.tagName( ) == "tqcontains" ) return new PMRuleContains( e, globalGroups, localGroups ); if( e.tagName( ) == "greater" ) return new PMRuleGreater( e, globalGroups, localGroups ); @@ -181,15 +181,15 @@ PMRuleCondition* newCondition( TQDomElement& e, PMRuleBase::~PMRuleBase( ) { - m_children.setAutoDelete( true ); - m_children.clear( ); + m_tqchildren.setAutoDelete( true ); + m_tqchildren.clear( ); } void PMRuleBase::countChild( const TQString& className, bool afterInsertPoint ) { countChildProtected( className, afterInsertPoint ); - TQPtrListIterator<PMRuleBase> it( m_children ); + TQPtrListIterator<PMRuleBase> it( m_tqchildren ); for( ; it.current( ); ++it ) it.current( )->countChild( className, afterInsertPoint ); } @@ -198,7 +198,7 @@ void PMRuleBase::reset( ) { resetProtected( ); - TQPtrListIterator<PMRuleBase> it( m_children ); + TQPtrListIterator<PMRuleBase> it( m_tqchildren ); for( ; it.current( ); ++it ) it.current( )->reset( ); } @@ -302,7 +302,7 @@ PMRuleNot::PMRuleNot( TQDomElement& e, if( isCondition( me ) ) { m_pChild = newCondition( me, globalGroups, localGroups ); - m_children.append( m_pChild ); + m_tqchildren.append( m_pChild ); } } m = m.nextSibling( ); @@ -330,7 +330,7 @@ PMRuleAnd::PMRuleAnd( TQDomElement& e, if( isCondition( me ) ) { PMRuleCondition* c = newCondition( me, globalGroups, localGroups ); - m_children.append( c ); + m_tqchildren.append( c ); m_conditions.append( c ); } } @@ -361,7 +361,7 @@ PMRuleOr::PMRuleOr( TQDomElement& e, if( isCondition( me ) ) { PMRuleCondition* c = newCondition( me, globalGroups, localGroups ); - m_children.append( c ); + m_tqchildren.append( c ); m_conditions.append( c ); } } @@ -383,7 +383,7 @@ PMRuleBefore::PMRuleBefore( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { - m_contains = false; + m_tqcontains = false; TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { @@ -405,23 +405,23 @@ PMRuleBefore::~PMRuleBefore( ) bool PMRuleBefore::evaluate( const PMObject* ) { - return m_contains; + return m_tqcontains; } void PMRuleBefore::countChildProtected( const TQString& className, bool afterInsertPoint ) { - if( afterInsertPoint && !m_contains ) + if( afterInsertPoint && !m_tqcontains ) { TQPtrListIterator<PMRuleCategory> it( m_categories ); - for( ; it.current( ) && !m_contains; ++it ) - m_contains = it.current( )->matches( className ); + for( ; it.current( ) && !m_tqcontains; ++it ) + m_tqcontains = it.current( )->matches( className ); } } void PMRuleBefore::resetProtected( ) { - m_contains = false; + m_tqcontains = false; } PMRuleAfter::PMRuleAfter( TQDomElement& e, @@ -429,7 +429,7 @@ PMRuleAfter::PMRuleAfter( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { - m_contains = false; + m_tqcontains = false; TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { @@ -451,23 +451,23 @@ PMRuleAfter::~PMRuleAfter( ) bool PMRuleAfter::evaluate( const PMObject* ) { - return m_contains; + return m_tqcontains; } void PMRuleAfter::countChildProtected( const TQString& className, bool afterInsertPoint ) { - if( !afterInsertPoint && !m_contains ) + if( !afterInsertPoint && !m_tqcontains ) { TQPtrListIterator<PMRuleCategory> it( m_categories ); - for( ; it.current( ) && !m_contains; ++it ) - m_contains = it.current( )->matches( className ); + for( ; it.current( ) && !m_tqcontains; ++it ) + m_tqcontains = it.current( )->matches( className ); } } void PMRuleAfter::resetProtected( ) { - m_contains = false; + m_tqcontains = false; } PMRuleContains::PMRuleContains( TQDomElement& e, @@ -475,7 +475,7 @@ PMRuleContains::PMRuleContains( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { - m_contains = false; + m_tqcontains = false; TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { @@ -497,22 +497,22 @@ PMRuleContains::~PMRuleContains( ) bool PMRuleContains::evaluate( const PMObject* ) { - return m_contains; + return m_tqcontains; } void PMRuleContains::countChildProtected( const TQString& className, bool ) { - if( !m_contains ) + if( !m_tqcontains ) { TQPtrListIterator<PMRuleCategory> it( m_categories ); - for( ; it.current( ) && !m_contains; ++it ) - m_contains = it.current( )->matches( className ); + for( ; it.current( ) && !m_tqcontains; ++it ) + m_tqcontains = it.current( )->matches( className ); } } void PMRuleContains::resetProtected( ) { - m_contains = false; + m_tqcontains = false; } PMRuleCompare::PMRuleCompare( TQDomElement& e, @@ -533,7 +533,7 @@ PMRuleCompare::PMRuleCompare( TQDomElement& e, if( isValue( me ) ) { m_pValue[i] = newValue( me, globalGroups, localGroups ); - m_children.append( m_pValue[i] ); + m_tqchildren.append( m_pValue[i] ); i++; } } @@ -745,7 +745,7 @@ PMRule::PMRule( TQDomElement& e, else if( isCondition( me ) ) { m_pCondition = newCondition( me, globalGroups, localGroups ); - m_children.append( m_pCondition ); + m_tqchildren.append( m_pCondition ); } } m = m.nextSibling( ); @@ -767,12 +767,12 @@ bool PMRule::matches( const TQString& className ) return m; } -bool PMRule::evaluate( const PMObject* parent ) +bool PMRule::evaluate( const PMObject* tqparent ) { if( !m_pCondition ) return true; else - return m_pCondition->evaluate( parent ); + return m_pCondition->evaluate( tqparent ); } PMRuleTargetClass::PMRuleTargetClass( TQDomElement& e, @@ -829,7 +829,7 @@ PMInsertRuleSystem::~PMInsertRuleSystem( ) void PMInsertRuleSystem::loadRules( const TQString& fileName ) { PMRuleClass::s_pPrototypeManager = m_pPart->prototypeManager( ); - if( m_loadedFiles.find( fileName ) != m_loadedFiles.end( ) ) + if( m_loadedFiles.tqfind( fileName ) != m_loadedFiles.end( ) ) return; m_loadedFiles.push_back( fileName ); @@ -877,7 +877,7 @@ void PMInsertRuleSystem::loadRules( const TQString& fileName ) PMRuleTargetClass* target = 0; if( !m_rulesDict.isEmpty( ) ) - target = m_rulesDict.find( className ); + target = m_rulesDict.tqfind( className ); if( target ) target->appendRules( ce, m_groups ); @@ -897,7 +897,7 @@ void PMInsertRuleSystem::loadRules( const TQString& fileName ) PMRuleClass::s_pPrototypeManager = 0; } -bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, +bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject, const TQString& className, const PMObject* after, const PMObjectList* objectsBetween ) @@ -905,10 +905,10 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, bool possible = false; // find rules for target class - PMMetaObject* meta = parentObject->metaObject( ); + PMMetaObject* meta = tqparentObject->tqmetaObject( ); for( ; meta && !possible; meta = meta->superClass( ) ) { - PMRuleTargetClass* tc = m_rulesDict.find( meta->className( ) ); + PMRuleTargetClass* tc = m_rulesDict.tqfind( meta->className( ) ); if( tc ) { // check the exception list @@ -917,7 +917,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, TQStringList::ConstIterator it; for( it = exceptions.begin( ); it != exceptions.end( ) && !exceptionFound; ++it ) - if( parentObject->isA( *it ) ) + if( tqparentObject->isA( *it ) ) exceptionFound = true; if( !exceptionFound ) @@ -935,7 +935,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, // count already inserted child objects bool afterInsertPoint = false; - PMObject* o = parentObject->firstChild( ); + PMObject* o = tqparentObject->firstChild( ); if( !after ) afterInsertPoint = true; for( ; o; o = o->nextSibling( ) ) @@ -952,7 +952,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, } // evaluate condition value - possible = rule->evaluate( parentObject ); + possible = rule->evaluate( tqparentObject ); } } } @@ -962,15 +962,15 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, return possible; } -bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, +bool PMInsertRuleSystem::canInsert( const PMObject* tqparentObject, const PMObject* object, const PMObject* after, const PMObjectList* objectsBetween ) { - return canInsert( parentObject, object->type( ), after, objectsBetween ); + return canInsert( tqparentObject, object->type( ), after, objectsBetween ); } -int PMInsertRuleSystem::canInsert( const PMObject* parentObject, +int PMInsertRuleSystem::canInsert( const PMObject* tqparentObject, const PMObjectList& list, const PMObject* after ) { @@ -978,17 +978,17 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, TQStringList classes; for( ; it.current( ); ++it ) classes.append( it.current( )->type( ) ); - return canInsert( parentObject, classes, after ); + return canInsert( tqparentObject, classes, after ); } -int PMInsertRuleSystem::canInsert( const PMObject* parentObject, +int PMInsertRuleSystem::canInsert( const PMObject* tqparentObject, const TQStringList& list, const PMObject* after ) { if( list.size( ) == 1 ) { // more efficient - if( canInsert( parentObject, list.first( ), after ) ) + if( canInsert( tqparentObject, list.first( ), after ) ) return 1; else return 0; @@ -996,17 +996,17 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, // find rules for target class TQPtrList<PMRuleTargetClass> targetClassList; - PMMetaObject* meta = parentObject->metaObject( ); + PMMetaObject* meta = tqparentObject->tqmetaObject( ); for( ; meta; meta = meta->superClass( ) ) { - PMRuleTargetClass* tc = m_rulesDict.find( meta->className( ) ); + PMRuleTargetClass* tc = m_rulesDict.tqfind( meta->className( ) ); if( tc ) targetClassList.append( tc ); } if( targetClassList.isEmpty( ) ) return 0; // not rules found - // count already inserted children + // count already inserted tqchildren TQPtrListIterator<PMRuleTargetClass> tit( targetClassList ); for( ; tit.current( ); ++tit ) // ... for all target classes { @@ -1015,7 +1015,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, { rit.current( )->reset( ); bool afterInsertPoint = false; - PMObject* o = parentObject->firstChild( ); + PMObject* o = tqparentObject->firstChild( ); if( !after ) afterInsertPoint = true; for( ; o; o = o->nextSibling( ) ) @@ -1041,7 +1041,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, { PMRule* rule = rit.current( ); if( rule->matches( *oit ) ) - possible = rule->evaluate( parentObject ); + possible = rule->evaluate( tqparentObject ); } } if( possible ) diff --git a/kpovmodeler/pminsertrulesystem.h b/kpovmodeler/pminsertrulesystem.h index 69f78deb..c280bcc2 100644 --- a/kpovmodeler/pminsertrulesystem.h +++ b/kpovmodeler/pminsertrulesystem.h @@ -154,7 +154,7 @@ public: */ TQPtrListIterator<PMRuleBase> childIterator( ) const { - return TQPtrListIterator<PMRuleBase>( m_children ); + return TQPtrListIterator<PMRuleBase>( m_tqchildren ); } protected: /** @@ -170,7 +170,7 @@ protected: /** * Add all child nodes to this list. */ - TQPtrList<PMRuleBase> m_children; + TQPtrList<PMRuleBase> m_tqchildren; }; /** @@ -344,7 +344,7 @@ private: }; /** - * Condition. Value is true if the object already contains + * Condition. Value is true if the object already tqcontains * objects of certaint classes before the insert point. */ class PMRuleBefore : public PMRuleCondition @@ -371,11 +371,11 @@ protected: virtual void resetProtected( ); private: TQPtrList<PMRuleCategory> m_categories; - bool m_contains; + bool m_tqcontains; }; /** - * Condition. Value is true if the object already contains + * Condition. Value is true if the object already tqcontains * objects of certaint classes after the insert point. */ class PMRuleAfter : public PMRuleCondition @@ -402,11 +402,11 @@ protected: virtual void resetProtected( ); private: TQPtrList<PMRuleCategory> m_categories; - bool m_contains; + bool m_tqcontains; }; /** - * Condition. Value is true if the object already contains + * Condition. Value is true if the object already tqcontains * objects of certaint classes. */ class PMRuleContains : public PMRuleCondition @@ -433,7 +433,7 @@ protected: virtual void resetProtected( ); private: TQPtrList<PMRuleCategory> m_categories; - bool m_contains; + bool m_tqcontains; }; /** @@ -535,7 +535,7 @@ public: /** * Returns the conditions value. */ - bool evaluate( const PMObject* parent ); + bool evaluate( const PMObject* tqparent ); private: TQPtrList<PMRuleCategory> m_categories; @@ -561,7 +561,7 @@ public: ~PMRuleTargetClass( ); /** - * Reads rules and groups from the QDomELement and appends + * Reads rules and groups from the TQDomELement and appends * them to the local ones. */ void appendRules( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups ); @@ -624,7 +624,7 @@ public: * The parser uses the third parameter for top level objects. These objects * have to be treated as if they are inserted after the object after. */ - bool canInsert( const PMObject* parentObject, const TQString& className, + bool canInsert( const PMObject* tqparentObject, const TQString& className, const PMObject* after, const PMObjectList* objectsBetween = 0 ); /** @@ -634,20 +634,20 @@ public: * The parser uses the third parameter for top level objects. These objects * have to be treated as if they are inserted after the object after. * - * Same as canInsert( parentObject, object->class( ), after, objectsBetween ) + * Same as canInsert( tqparentObject, object->class( ), after, objectsBetween ) */ - bool canInsert( const PMObject* parentObject, const PMObject* object, + bool canInsert( const PMObject* tqparentObject, const PMObject* object, const PMObject* after, const PMObjectList* objectsBetween = 0 ); /** * Returns the number of objects that can be inserted at that position */ - int canInsert( const PMObject* parentObject, const PMObjectList& list, + int canInsert( const PMObject* tqparentObject, const PMObjectList& list, const PMObject* after ); /** * Returns the number of objects that can be inserted at that position */ - int canInsert( const PMObject* parentObject, const TQStringList& listOfClasses, + int canInsert( const PMObject* tqparentObject, const TQStringList& listOfClasses, const PMObject* after ); /** * Returns a pointer to the part diff --git a/kpovmodeler/pminterior.cpp b/kpovmodeler/pminterior.cpp index 53a69f79..b435ff29 100644 --- a/kpovmodeler/pminterior.cpp +++ b/kpovmodeler/pminterior.cpp @@ -76,11 +76,11 @@ PMInterior::~PMInterior( ) { } -PMMetaObject* PMInterior::metaObject( ) const +PMMetaObject* PMInterior::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Interior", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Interior", Base::tqmetaObject( ), createNewInterior ); s_pMetaObject->addProperty( new PMInteriorProperty( "ior", &PMInterior::setIor, &PMInterior::ior ) ); @@ -281,9 +281,9 @@ void PMInterior::enableFadePower( bool c ) } } -PMDialogEditBase* PMInterior::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMInterior::editWidget( TQWidget* tqparent ) const { - return new PMInteriorEdit( parent ); + return new PMInteriorEdit( tqparent ); } void PMInterior::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pminterior.h b/kpovmodeler/pminterior.h index 8e3c9172..234ad932 100644 --- a/kpovmodeler/pminterior.h +++ b/kpovmodeler/pminterior.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMInteriorEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pminterior" ); } diff --git a/kpovmodeler/pminterioredit.cpp b/kpovmodeler/pminterioredit.cpp index 4b8b2381..0149b01a 100644 --- a/kpovmodeler/pminterioredit.cpp +++ b/kpovmodeler/pminterioredit.cpp @@ -27,8 +27,8 @@ #include <klocale.h> -PMInteriorEdit::PMInteriorEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMInteriorEdit::PMInteriorEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -38,33 +38,33 @@ void PMInteriorEdit::createTopWidgets( ) Base::createTopWidgets( ); TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); - TQGridLayout* layout = new TQGridLayout( hl ,17 ,6); + TQGridLayout* tqlayout = new TQGridLayout( hl ,17 ,6); m_pEnableIorEdit = new TQCheckBox( i18n( "Refraction:" ), this ); m_pIorEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableIorEdit, 0, 0 ); - layout->addWidget( m_pIorEdit, 0, 1 ); + tqlayout->addWidget( m_pEnableIorEdit, 0, 0 ); + tqlayout->addWidget( m_pIorEdit, 0, 1 ); m_pEnableCausticsEdit = new TQCheckBox( i18n( "Caustics:" ), this ); m_pCausticsEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableCausticsEdit, 1, 0 ); - layout->addWidget( m_pCausticsEdit, 1, 1 ); + tqlayout->addWidget( m_pEnableCausticsEdit, 1, 0 ); + tqlayout->addWidget( m_pCausticsEdit, 1, 1 ); m_pEnableDispersionEdit = new TQCheckBox( i18n( "Dispersion:" ), this ); m_pDispersionEdit = new PMFloatEdit( this ); m_pDispersionEdit->setValidation( true, 0, false, 0 ); - layout->addWidget( m_pEnableDispersionEdit, 2, 0 ); - layout->addWidget( m_pDispersionEdit, 2, 1 ); + tqlayout->addWidget( m_pEnableDispersionEdit, 2, 0 ); + tqlayout->addWidget( m_pDispersionEdit, 2, 1 ); m_pEnableDispSamplesEdit = new TQCheckBox( i18n( "Dispersion samples:" ), this ); m_pDispSamplesEdit = new PMIntEdit( this ); m_pDispSamplesEdit->setValidation( true, 2, false, 0 ); - layout->addWidget( m_pEnableDispSamplesEdit, 3, 0 ); - layout->addWidget( m_pDispSamplesEdit, 3, 1 ); + tqlayout->addWidget( m_pEnableDispSamplesEdit, 3, 0 ); + tqlayout->addWidget( m_pDispSamplesEdit, 3, 1 ); m_pEnableFadeDistanceEdit = new TQCheckBox( i18n( "Fade distance:" ), this ); m_pFadeDistanceEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableFadeDistanceEdit, 4, 0 ); - layout->addWidget( m_pFadeDistanceEdit, 4, 1 ); + tqlayout->addWidget( m_pEnableFadeDistanceEdit, 4, 0 ); + tqlayout->addWidget( m_pFadeDistanceEdit, 4, 1 ); m_pEnableFadePowerEdit = new TQCheckBox( i18n( "Fade power:" ), this ); m_pFadePowerEdit = new PMFloatEdit( this ); - layout->addWidget( m_pEnableFadePowerEdit, 5, 0 ); - layout->addWidget( m_pFadePowerEdit, 5, 1 ); + tqlayout->addWidget( m_pEnableFadePowerEdit, 5, 0 ); + tqlayout->addWidget( m_pFadePowerEdit, 5, 1 ); hl->addStretch( 1 ); connect( m_pIorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pminterioredit.h b/kpovmodeler/pminterioredit.h index d8512d5e..9c4c438a 100644 --- a/kpovmodeler/pminterioredit.h +++ b/kpovmodeler/pminterioredit.h @@ -39,12 +39,13 @@ class TQLabel; class PMInteriorEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMInteriorEdit with parent and name + * Creates a PMInteriorEdit with tqparent and name */ - PMInteriorEdit( TQWidget* parent, const char* name = 0 ); + PMInteriorEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pminteriortexture.cpp b/kpovmodeler/pminteriortexture.cpp index 92950050..3633b2a8 100644 --- a/kpovmodeler/pminteriortexture.cpp +++ b/kpovmodeler/pminteriortexture.cpp @@ -43,11 +43,11 @@ PMInteriorTexture::~PMInteriorTexture( ) { } -PMMetaObject* PMInteriorTexture::metaObject( ) const +PMMetaObject* PMInteriorTexture::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "InteriorTexture", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "InteriorTexture", Base::tqmetaObject( ), createNewInteriorTexture ); } return s_pMetaObject; @@ -68,8 +68,8 @@ TQString PMInteriorTexture::description( ) const return i18n( "interior texture" ); } -PMDialogEditBase* PMInteriorTexture::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMInteriorTexture::editWidget( TQWidget* tqparent ) const { - return new PMInteriorTextureEdit( parent ); + return new PMInteriorTextureEdit( tqparent ); } diff --git a/kpovmodeler/pminteriortexture.h b/kpovmodeler/pminteriortexture.h index 0711b5c9..1f84b512 100644 --- a/kpovmodeler/pminteriortexture.h +++ b/kpovmodeler/pminteriortexture.h @@ -52,14 +52,14 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; /** * Returns a new @ref PMTextureEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pminteriortexture" ); } diff --git a/kpovmodeler/pminteriortextureedit.cpp b/kpovmodeler/pminteriortextureedit.cpp index 73f1e7e9..b13d3f7d 100644 --- a/kpovmodeler/pminteriortextureedit.cpp +++ b/kpovmodeler/pminteriortextureedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMInteriorTextureEdit::PMInteriorTextureEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMInteriorTextureEdit::PMInteriorTextureEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pminteriortextureedit.h b/kpovmodeler/pminteriortextureedit.h index ab46142d..a576c926 100644 --- a/kpovmodeler/pminteriortextureedit.h +++ b/kpovmodeler/pminteriortextureedit.h @@ -34,12 +34,13 @@ class PMInteriorTexture; class PMInteriorTextureEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMTextureEdit with parent and name + * Creates a PMTextureEdit with tqparent and name */ - PMInteriorTextureEdit( TQWidget* parent, const char* name = 0 ); + PMInteriorTextureEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmiomanager.cpp b/kpovmodeler/pmiomanager.cpp index 946f2bc5..14aab5f5 100644 --- a/kpovmodeler/pmiomanager.cpp +++ b/kpovmodeler/pmiomanager.cpp @@ -47,9 +47,9 @@ void PMIOManager::addFormat( PMIOFormat* format ) { if( !format ) return; - if( !m_formats.containsRef( format ) ) + if( !m_formats.tqcontainsRef( format ) ) { - if( !m_dict.find( format->name( ) ) ) + if( !m_dict.tqfind( format->name( ) ) ) { m_formats.append( format ); m_dict.insert( format->name( ), format ); @@ -73,7 +73,7 @@ void PMIOManager::removeFormat( const TQString& name ) PMIOFormat* PMIOManager::format( const TQString& name ) const { - return m_dict.find( name ); + return m_dict.tqfind( name ); } PMIOFormat* PMIOManager::formatForMimeType( const TQString& mime ) const diff --git a/kpovmodeler/pmiomanager.h b/kpovmodeler/pmiomanager.h index f167068f..b4df4fad 100644 --- a/kpovmodeler/pmiomanager.h +++ b/kpovmodeler/pmiomanager.h @@ -118,7 +118,7 @@ public: */ virtual TQString mimeType( ) const { - return TQString::null; + return TQString(); } /** * Returns a list of patterns for the import file dialog diff --git a/kpovmodeler/pmisosurface.cpp b/kpovmodeler/pmisosurface.cpp index c32c0683..94c28886 100644 --- a/kpovmodeler/pmisosurface.cpp +++ b/kpovmodeler/pmisosurface.cpp @@ -157,11 +157,11 @@ void PMIsoSurface::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMIsoSurface::metaObject( ) const +PMMetaObject* PMIsoSurface::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "IsoSurface", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "IsoSurface", Base::tqmetaObject( ), createNewIsoSurface ); // TODO /* @@ -333,9 +333,9 @@ void PMIsoSurface::setAllIntersections( bool yes ) } } -PMDialogEditBase* PMIsoSurface::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMIsoSurface::editWidget( TQWidget* tqparent ) const { - return new PMIsoSurfaceEdit( parent ); + return new PMIsoSurfaceEdit( tqparent ); } void PMIsoSurface::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmisosurface.h b/kpovmodeler/pmisosurface.h index 2a2fb358..298f7b26 100644 --- a/kpovmodeler/pmisosurface.h +++ b/kpovmodeler/pmisosurface.h @@ -60,7 +60,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMIsoSurfaceEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmisosurfaceedit.cpp b/kpovmodeler/pmisosurfaceedit.cpp index 752331b6..69338bcb 100644 --- a/kpovmodeler/pmisosurfaceedit.cpp +++ b/kpovmodeler/pmisosurfaceedit.cpp @@ -28,8 +28,8 @@ #include <tqcheckbox.h> #include <klocale.h> -PMIsoSurfaceEdit::PMIsoSurfaceEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMIsoSurfaceEdit::PMIsoSurfaceEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -96,7 +96,7 @@ void PMIsoSurfaceEdit::createTopWidgets( ) hl->addWidget( new TQLabel( i18n( "Values:" ), this ) ); for( i = 0; i < 3; i++ ) { - hl->addWidget( new TQLabel( TQString( "P%1" ).arg( i ), this ) ); + hl->addWidget( new TQLabel( TQString( "P%1" ).tqarg( i ), this ) ); hl->addWidget( m_pEvaluateValue[i] ); } diff --git a/kpovmodeler/pmisosurfaceedit.h b/kpovmodeler/pmisosurfaceedit.h index 09798c0d..c0a1dda4 100644 --- a/kpovmodeler/pmisosurfaceedit.h +++ b/kpovmodeler/pmisosurfaceedit.h @@ -41,12 +41,13 @@ class TQLineEdit; class PMIsoSurfaceEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMIsoSurfaceEdit with parent and name + * Creates a PMIsoSurfaceEdit with tqparent and name */ - PMIsoSurfaceEdit( TQWidget* parent, const char* name = 0 ); + PMIsoSurfaceEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmjuliafractal.cpp b/kpovmodeler/pmjuliafractal.cpp index 5929a058..5a665606 100644 --- a/kpovmodeler/pmjuliafractal.cpp +++ b/kpovmodeler/pmjuliafractal.cpp @@ -112,11 +112,11 @@ void PMJuliaFractal::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMJuliaFractal::metaObject( ) const +PMMetaObject* PMJuliaFractal::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "JuliaFractal", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "JuliaFractal", Base::tqmetaObject( ), createNewJuliaFractal ); s_pMetaObject->addProperty( new PMJuliaFractalProperty( "juliaParameter", &PMJuliaFractal::setJuliaParameter, @@ -272,9 +272,9 @@ void PMJuliaFractal::setExponent( const PMVector& e ) } } -PMDialogEditBase* PMJuliaFractal::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMJuliaFractal::editWidget( TQWidget* tqparent ) const { - return new PMJuliaFractalEdit( parent ); + return new PMJuliaFractalEdit( tqparent ); } void PMJuliaFractal::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmjuliafractal.h b/kpovmodeler/pmjuliafractal.h index 1a113aa4..c57df549 100644 --- a/kpovmodeler/pmjuliafractal.h +++ b/kpovmodeler/pmjuliafractal.h @@ -61,7 +61,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -72,7 +72,7 @@ public: /** * Returns a new @ref PMJuliaFractalEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmjuliafractaledit.cpp b/kpovmodeler/pmjuliafractaledit.cpp index 4f595b0e..d0b79e59 100644 --- a/kpovmodeler/pmjuliafractaledit.cpp +++ b/kpovmodeler/pmjuliafractaledit.cpp @@ -27,8 +27,8 @@ #include <klocale.h> #include <kmessagebox.h> -PMJuliaFractalEdit::PMJuliaFractalEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMJuliaFractalEdit::PMJuliaFractalEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmjuliafractaledit.h b/kpovmodeler/pmjuliafractaledit.h index f2acb8f3..21be7989 100644 --- a/kpovmodeler/pmjuliafractaledit.h +++ b/kpovmodeler/pmjuliafractaledit.h @@ -39,12 +39,13 @@ class TQLabel; class PMJuliaFractalEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMJuliaFractalEdit with parent and name + * Creates a PMJuliaFractalEdit with tqparent and name */ - PMJuliaFractalEdit( TQWidget* parent, const char* name = 0 ); + PMJuliaFractalEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmlathe.cpp b/kpovmodeler/pmlathe.cpp index 9f6a00ff..4418559a 100644 --- a/kpovmodeler/pmlathe.cpp +++ b/kpovmodeler/pmlathe.cpp @@ -198,11 +198,11 @@ void PMLathe::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMLathe::metaObject( ) const +PMMetaObject* PMLathe::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Lathe", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Lathe", Base::tqmetaObject( ), createNewLathe ); s_pMetaObject->addProperty( new PMLatheProperty( "sturm", &PMLathe::setSturm, &PMLathe::sturm ) ); @@ -261,9 +261,9 @@ void PMLathe::setPoints( const TQValueList<PMVector>& points ) } } -PMDialogEditBase* PMLathe::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMLathe::editWidget( TQWidget* tqparent ) const { - return new PMLatheEdit( parent ); + return new PMLatheEdit( tqparent ); } void PMLathe::createMemento( ) @@ -549,10 +549,10 @@ void PMLathe::controlPoints( PMControlPointList& list ) lastPoint = cp; if( d == 0 ) cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DXY, i, - i18n( "Point %1 (xy)" ).arg( i + 1 ) ); + i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); else cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DZY, i, - i18n( "Point %1 (xy)" ).arg( i + 1 ) ); + i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); if( i == 0 ) firstPoint = cp; @@ -573,10 +573,10 @@ void PMLathe::controlPoints( PMControlPointList& list ) int imod4 = i % 4; if( d == 0 ) cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DXY, i, - i18n( "Point %1 (xy)" ).arg( i + 1 ) ); + i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); else cp = new PM2DControlPoint( *it, PM2DControlPoint::PM2DZY, i, - i18n( "Point %1 (xy)" ).arg( i + 1 ) ); + i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); switch( imod4 ) { case 0: diff --git a/kpovmodeler/pmlathe.h b/kpovmodeler/pmlathe.h index 20fa55b3..d2e0648f 100644 --- a/kpovmodeler/pmlathe.h +++ b/kpovmodeler/pmlathe.h @@ -63,7 +63,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -74,7 +74,7 @@ public: /** * Returns a new @ref PMLatheEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmlatheedit.cpp b/kpovmodeler/pmlatheedit.cpp index e90a4397..c048d095 100644 --- a/kpovmodeler/pmlatheedit.cpp +++ b/kpovmodeler/pmlatheedit.cpp @@ -33,8 +33,8 @@ #include <kiconloader.h> #include <kmessagebox.h> -PMLatheEdit::PMLatheEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMLatheEdit::PMLatheEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmlatheedit.h b/kpovmodeler/pmlatheedit.h index 92e92950..c33a9711 100644 --- a/kpovmodeler/pmlatheedit.h +++ b/kpovmodeler/pmlatheedit.h @@ -43,12 +43,13 @@ class TQLabel; class PMLatheEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMLatheEdit with parent and name + * Creates a PMLatheEdit with tqparent and name */ - PMLatheEdit( TQWidget* parent, const char* name = 0 ); + PMLatheEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmlayoutsettings.cpp b/kpovmodeler/pmlayoutsettings.cpp index 1e20e326..acafe593 100644 --- a/kpovmodeler/pmlayoutsettings.cpp +++ b/kpovmodeler/pmlayoutsettings.cpp @@ -31,11 +31,11 @@ #include <klocale.h> #include <kmessagebox.h> -PMLayoutSettings::PMLayoutSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMLayoutSettings::PMLayoutSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQVBoxLayout* gvl; TQGridLayout* grid; TQGroupBox* gb; @@ -43,16 +43,16 @@ PMLayoutSettings::PMLayoutSettings( TQWidget* parent, const char* name ) TQHBoxLayout* ghe; TQVBoxLayout* gvle; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - hlayout = new TQHBoxLayout( vlayout ); - hlayout->addWidget( new TQLabel( i18n( "Default view layout:" ), this ) ); + htqlayout = new TQHBoxLayout( vtqlayout ); + htqlayout->addWidget( new TQLabel( i18n( "Default view tqlayout:" ), this ) ); m_pDefaultLayout = new TQComboBox( this ); - hlayout->addWidget( m_pDefaultLayout, 1 ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pDefaultLayout, 1 ); + htqlayout->addStretch( 1 ); gb = new TQGroupBox( i18n( "Available View Layouts" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); @@ -180,13 +180,13 @@ PMLayoutSettings::PMLayoutSettings( TQWidget* parent, const char* name ) ghl->addStretch( 1 ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMLayoutSettings::displaySettings( ) { PMViewLayoutManager* m = PMViewLayoutManager::theManager( ); - m_viewLayouts = m->layouts( ); + m_viewLayouts = m->tqlayouts( ); m_currentViewLayout = m_viewLayouts.begin( ); m_defaultViewLayout = m_viewLayouts.begin( ); for( ; ( m_defaultViewLayout != m_viewLayouts.end( ) ) && @@ -210,7 +210,7 @@ bool PMLayoutSettings::validateData( ) if( ( *lit ).name( ).isEmpty( ) ) { emit showMe( ); - KMessageBox::error( this, i18n( "View layouts may not have empty names." ), + KMessageBox::error( this, i18n( "View tqlayouts may not have empty names." ), i18n( "Error" ) ); return false; } @@ -220,7 +220,7 @@ bool PMLayoutSettings::validateData( ) if( ( *eit ).dockPosition( ) != PMDockWidget::DockRight ) { emit showMe( ); - KMessageBox::error( this, i18n( "The docking position of the first view layout entry has to be 'New Column'." ), + KMessageBox::error( this, i18n( "The docking position of the first view tqlayout entry has to be 'New Column'." ), i18n( "Error" ) ); return false; } @@ -262,7 +262,7 @@ void PMLayoutSettings::slotAddLayout( ) new_name = i18n( "Unnamed" ); str.setNum( i ); - while( m_pViewLayouts->findItem( new_name, Qt::ExactMatch ) ) + while( m_pViewLayouts->tqfindItem( new_name, TQt::ExactMatch ) ) { new_name = i18n( "Unnamed" ) + str; i++; @@ -275,7 +275,7 @@ void PMLayoutSettings::slotAddLayout( ) m_currentViewLayout++; m_viewLayouts.insert( m_currentViewLayout, l ); displayLayoutList( ); - m_pViewLayouts->setCurrentItem( m_pViewLayouts->findItem( new_name, Qt::ExactMatch ) ); + m_pViewLayouts->setCurrentItem( m_pViewLayouts->tqfindItem( new_name, TQt::ExactMatch ) ); m_pRemoveLayout->setEnabled( true ); } @@ -720,8 +720,8 @@ void PMLayoutSettings::slotMoveDownViewEntryClicked( ) void PMLayoutSettings::displayCustomOptions( ) { // delete an old widget - if( m_pCustomOptionsHolder->layout( ) ) - delete m_pCustomOptionsHolder->layout( ); + if( m_pCustomOptionsHolder->tqlayout( ) ) + delete m_pCustomOptionsHolder->tqlayout( ); if( m_pCustomOptionsWidget ) { delete m_pCustomOptionsWidget; diff --git a/kpovmodeler/pmlayoutsettings.h b/kpovmodeler/pmlayoutsettings.h index 9671d38a..a7c8401c 100644 --- a/kpovmodeler/pmlayoutsettings.h +++ b/kpovmodeler/pmlayoutsettings.h @@ -35,16 +35,17 @@ class TQPushButton; class TQLabel; /** - * View layout configuration dialog page + * View tqlayout configuration dialog page */ class PMLayoutSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMLayoutSettings( TQWidget* parent, const char* name = 0 ); + PMLayoutSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ @@ -56,19 +57,19 @@ public: protected slots: /** - * Called when the browse add layout button is clicked + * Called when the browse add tqlayout button is clicked */ void slotAddLayout( ); /** - * Called when the remove layout button is clicked + * Called when the remove tqlayout button is clicked */ void slotRemoveLayout( ); /** - * Called when the selected layout changes + * Called when the selected tqlayout changes */ void slotLayoutSelected( int i ); /** - * Called when the layout name changes + * Called when the tqlayout name changes */ void slotLayoutNameChanged( const TQString& text ); /** diff --git a/kpovmodeler/pmlibrarybrowser.cpp b/kpovmodeler/pmlibrarybrowser.cpp index bc7e1af7..6ccfb077 100644 --- a/kpovmodeler/pmlibrarybrowser.cpp +++ b/kpovmodeler/pmlibrarybrowser.cpp @@ -47,9 +47,9 @@ // ************** PMLibraryBrowser ************************** -PMLibraryBrowserView::PMLibraryBrowserView( PMPart* /*part*/, TQWidget* parent /*= 0*/, +PMLibraryBrowserView::PMLibraryBrowserView( PMPart* /*part*/, TQWidget* tqparent /*= 0*/, const char* name /*=0*/ ) - : PMViewBase( parent, name ) + : PMViewBase( tqparent, name ) { TQHBoxLayout* hl = new TQHBoxLayout( this ); PMLibraryBrowserViewWidget* tv = new PMLibraryBrowserViewWidget( this ); @@ -61,8 +61,8 @@ TQString PMLibraryBrowserView::description( ) const return i18n( "Library View" ); } -PMLibraryBrowserViewWidget::PMLibraryBrowserViewWidget( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMLibraryBrowserViewWidget::PMLibraryBrowserViewWidget( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { setCaption( i18n( "Library Objects" ) ); diff --git a/kpovmodeler/pmlibrarybrowser.h b/kpovmodeler/pmlibrarybrowser.h index b7a2d881..7c8a1899 100644 --- a/kpovmodeler/pmlibrarybrowser.h +++ b/kpovmodeler/pmlibrarybrowser.h @@ -40,7 +40,7 @@ class PMLibraryHandle; class PMPart; namespace KIO{ class Job; } -typedef TQDict<TQString> QStringDict; +typedef TQDict<TQString> TQStringDict; /** * Wrapper class for the treeview/dock widget @@ -48,11 +48,12 @@ typedef TQDict<TQString> QStringDict; class PMLibraryBrowserView : public PMViewBase { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMLibraryBrowserView( PMPart* part, TQWidget* parent, const char* name = 0 ); + PMLibraryBrowserView( PMPart* part, TQWidget* tqparent, const char* name = 0 ); /** */ virtual TQString viewType( ) const { return TQString( "librarybrowserview" ); } @@ -63,11 +64,12 @@ public: /** * This class provides a non-modal dialog to browse the available libraries. */ -class PMLibraryBrowserViewWidget: public QWidget +class PMLibraryBrowserViewWidget: public TQWidget { Q_OBJECT + TQ_OBJECT public: - PMLibraryBrowserViewWidget( TQWidget *parent, const char* name = NULL ); + PMLibraryBrowserViewWidget( TQWidget *tqparent, const char* name = NULL ); private slots: void resizeEvent( TQResizeEvent* ev ); @@ -110,9 +112,9 @@ public: virtual TQString viewType( ) const { return TQString( "librarybrowserview" ); } virtual TQString description( ) const; virtual TQString iconName( ) const { return TQString( "pmlibrarybrowserview" ); } - virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const + virtual PMViewBase* newInstance( TQWidget* tqparent, PMPart* part ) const { - return new PMLibraryBrowserView( part, parent ); + return new PMLibraryBrowserView( part, tqparent ); } }; diff --git a/kpovmodeler/pmlibraryentrypreview.cpp b/kpovmodeler/pmlibraryentrypreview.cpp index 4fbde752..c2d90cdd 100644 --- a/kpovmodeler/pmlibraryentrypreview.cpp +++ b/kpovmodeler/pmlibraryentrypreview.cpp @@ -39,8 +39,8 @@ #include <kmessagebox.h> #include <kfiledialog.h> -PMLibraryEntryPreview::PMLibraryEntryPreview( TQWidget* parent ) : - TQWidget( parent ) +PMLibraryEntryPreview::PMLibraryEntryPreview( TQWidget* tqparent ) : + TQWidget( tqparent ) { setAcceptDrops( true ); m_pPart = new PMPart( this, "treeview", NULL, "part", false, true ); @@ -59,25 +59,25 @@ PMLibraryEntryPreview::PMLibraryEntryPreview( TQWidget* parent ) : gl->setColStretch( 1, 1 ); TQLabel* lbl = new TQLabel( i18n( "Name: " ), this ); m_pName = new TQLineEdit( this ); - m_pName->setAlignment( Qt::AlignLeft ); + m_pName->tqsetAlignment( TQt::AlignLeft ); m_pName->setReadOnly( true ); gl->addWidget( lbl, 0, 0 ); gl->addWidget( m_pName, 0, 1 ); lbl = new TQLabel( i18n( "Description:" ), this ); - lbl->setAlignment( Qt::AlignTop ); + lbl->tqsetAlignment( TQt::AlignTop ); m_pDescription = new TQMultiLineEdit( this ); - m_pDescription->setAlignment( Qt::AlignTop | Qt::AlignLeft | - Qt::WordBreak | Qt::DontClip ); + m_pDescription->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | + TQt::WordBreak | TQt::DontClip ); m_pDescription->setReadOnly( true ); gl->addWidget( lbl, 1, 0 ); gl->addWidget( m_pDescription, 1, 1 ); m_pKeywordsLabel = new TQLabel( i18n( "Keywords:" ), this ); - m_pKeywordsLabel->setAlignment( Qt::AlignTop ); + m_pKeywordsLabel->tqsetAlignment( TQt::AlignTop ); m_pKeywords = new TQMultiLineEdit( this ); - m_pKeywords->setAlignment( Qt::AlignTop | Qt::AlignLeft | - Qt::WordBreak | Qt::DontClip ); + m_pKeywords->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | + TQt::WordBreak | TQt::DontClip ); m_pKeywords->setReadOnly( true ); gl->addWidget( m_pKeywordsLabel, 2, 0 ); gl->addWidget( m_pKeywords, 2, 1 ); @@ -243,7 +243,7 @@ void PMLibraryEntryPreview::slotTextChanged( const TQString& /* s */) void PMLibraryEntryPreview::slotPreviewClicked( ) { - KFileDialog dlg( TQString::null, "", NULL, "", false ); + KFileDialog dlg( TQString(), "", NULL, "", false ); dlg.setFilter( "image/jpeg image/gif image/tiff image/png image/x-bmp" ); if( dlg.exec( ) == TQDialog::Accepted ) @@ -302,7 +302,7 @@ bool PMLibraryEntryPreview::saveIfNeeded( bool forceSave ) // Add them to the object to save. PMObjectDrag drag( m_pPart, sortedList ); - objToSave.setObjects( drag.encodedData( "application/x-kpovmodeler" ) ); + objToSave.setObjects( drag.tqencodedData( "application/x-kpovmodeler" ) ); // Add the preview image objToSave.setPreview( m_image.copy( ) ); diff --git a/kpovmodeler/pmlibraryentrypreview.h b/kpovmodeler/pmlibraryentrypreview.h index 18736458..35ef5d52 100644 --- a/kpovmodeler/pmlibraryentrypreview.h +++ b/kpovmodeler/pmlibraryentrypreview.h @@ -39,12 +39,13 @@ class PMTreeView; /** * Preview widget for Library Objects and sub Libs. */ -class PMLibraryEntryPreview: public QWidget +class PMLibraryEntryPreview: public TQWidget { Q_OBJECT + TQ_OBJECT public: /** Constructor */ - PMLibraryEntryPreview( TQWidget *parent ); + PMLibraryEntryPreview( TQWidget *tqparent ); /** Destructor */ ~PMLibraryEntryPreview( ); diff --git a/kpovmodeler/pmlibraryhandle.cpp b/kpovmodeler/pmlibraryhandle.cpp index 8ba0f387..e22a37f2 100644 --- a/kpovmodeler/pmlibraryhandle.cpp +++ b/kpovmodeler/pmlibraryhandle.cpp @@ -302,7 +302,7 @@ PMLibraryHandle::PMResult PMLibraryHandle::createNewSubLibrary( const TQString / if( m_readOnly ) return PMLibraryHandle::ReadOnlyLib; - if( m_libraries.find( subLibName ) ) + if( m_libraries.tqfind( subLibName ) ) return PMLibraryHandle::ExistingDir; s = s+ "/libXXXXXX"; @@ -353,25 +353,25 @@ PMLibraryHandle::PMResult PMLibraryHandle::deleteSubLibrary( const TQString& sub return PMLibraryHandle::NotInLib; } -PMLibraryHandle::PMResult PMLibraryHandle::changeParentLibrary( const TQString& parentPath ) +PMLibraryHandle::PMResult PMLibraryHandle::changeParentLibrary( const TQString& tqparentPath ) { if( m_readOnly ) return PMLibraryHandle::ReadOnlyLib; - TQString newPath = parentPath + "/" + m_path.section( '/', -1 ); + TQString newPath = tqparentPath + "/" + m_path.section( '/', -1 ); PMLibraryHandle::EntryIterator itr( m_libraries ); for( ; itr.current( ); ++itr ) { PMLibraryHandle lib = PMLibraryHandle( *itr.current( ) ); lib.changeParentLibrary( newPath ); - m_libraries.replace( itr.currentKey( ), new TQString( newPath + "/" + lib.path( ) ) ); + m_libraries.tqreplace( itr.currentKey( ), new TQString( newPath + "/" + lib.path( ) ) ); } PMLibraryHandle::EntryIterator objItr( m_objects ); for( ; objItr.current( ); ++objItr ) { TQString test = newPath + "/" + objItr.current( )->section( '/', -1 ); - m_objects.replace( objItr.currentKey( ), new TQString( newPath + "/" + objItr.current( )->section( '/', -1 ) ) ); + m_objects.tqreplace( objItr.currentKey( ), new TQString( newPath + "/" + objItr.current( )->section( '/', -1 ) ) ); } saveLibraryInfo( ); diff --git a/kpovmodeler/pmlibraryhandle.h b/kpovmodeler/pmlibraryhandle.h index 353b7b53..2263407e 100644 --- a/kpovmodeler/pmlibraryhandle.h +++ b/kpovmodeler/pmlibraryhandle.h @@ -180,11 +180,11 @@ public: bool isSubLibrary( ) const { return m_subLibrary; } /** - * Changes the parent library if this is a sub library - * @param parentPath The new parent path for this library + * Changes the tqparent library if this is a sub library + * @param tqparentPath The new tqparent path for this library * @return PMLibraryHandle::Ok if successful or the reason for failure */ - PMLibraryHandle::PMResult changeParentLibrary( const TQString& parentPath ); + PMLibraryHandle::PMResult changeParentLibrary( const TQString& tqparentPath ); private: diff --git a/kpovmodeler/pmlibraryhandleedit.cpp b/kpovmodeler/pmlibraryhandleedit.cpp index e991af6e..d29c1c1f 100644 --- a/kpovmodeler/pmlibraryhandleedit.cpp +++ b/kpovmodeler/pmlibraryhandleedit.cpp @@ -36,8 +36,8 @@ TQSize PMLibraryHandleEdit::s_size = TQSize( 600, 400 ); -PMLibraryHandleEdit::PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget* parent, const char* name ) - : KDialogBase( parent, name, true, i18n( "Create Library" ), +PMLibraryHandleEdit::PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n( "Create Library" ), Ok | Cancel, Ok ) { m_pLibrary = lib; diff --git a/kpovmodeler/pmlibraryhandleedit.h b/kpovmodeler/pmlibraryhandleedit.h index d57b8e5e..77e3f0bd 100644 --- a/kpovmodeler/pmlibraryhandleedit.h +++ b/kpovmodeler/pmlibraryhandleedit.h @@ -37,12 +37,13 @@ class PMLibraryHandle; class PMLibraryHandleEdit: public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Construct a dialog to edit the properties of lib. The library will be * modified only if Ok is pressed. */ - PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget *parent = NULL, const char* name = NULL ); + PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget *tqparent = NULL, const char* name = NULL ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); diff --git a/kpovmodeler/pmlibraryiconview.cpp b/kpovmodeler/pmlibraryiconview.cpp index d2588dca..03fd15c5 100644 --- a/kpovmodeler/pmlibraryiconview.cpp +++ b/kpovmodeler/pmlibraryiconview.cpp @@ -50,11 +50,11 @@ const char* PMLibraryIconDrag::format( int i ) const } } -TQByteArray PMLibraryIconDrag::encodedData( const char* mime ) const +TQByteArray PMLibraryIconDrag::tqencodedData( const char* mime ) const { TQByteArray a; if ( TQString( mime ) == "application/x-qiconlist" ) - a = TQIconDrag::encodedData( mime ); + a = TQIconDrag::tqencodedData( mime ); else if ( TQString( mime ) == "text/sublib-list" ) { TQString s , l; @@ -80,7 +80,7 @@ bool PMLibraryIconDrag::canDecode( TQMimeSource* e ) bool PMLibraryIconDrag::decode( TQMimeSource* e, TQStringList& strList, TQValueList<bool>& subLibList ) { - TQByteArray a = e->encodedData( "text/sublib-list" ); + TQByteArray a = e->tqencodedData( "text/sublib-list" ); if( a.isEmpty( ) ) return false; @@ -104,8 +104,8 @@ void PMLibraryIconDrag::append( const TQIconDragItem &item, const TQRect &pr, m_subLibs.append( isSubLibrary ); } -PMLibraryIconView::PMLibraryIconView( TQWidget* parent, const char* name ) - : KIconView( parent, name ) +PMLibraryIconView::PMLibraryIconView( TQWidget* tqparent, const char* name ) + : KIconView( tqparent, name ) { m_pLibrary = NULL; m_pCurrentLibrary = NULL; @@ -192,15 +192,15 @@ TQDragObject* PMLibraryIconView::dragObject( ) return drag; } -PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQString& path, bool isSubLibrary ) - : KIconViewItem( parent, text ) +PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *tqparent, const TQString &text, const TQString& path, bool isSubLibrary ) + : KIconViewItem( tqparent, text ) { m_path = path; m_isSubLibrary = isSubLibrary; } -PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQImage& image, const TQString& path, bool isSubLibrary ) - : KIconViewItem( parent, text, image ) +PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *tqparent, const TQString &text, const TQImage& image, const TQString& path, bool isSubLibrary ) + : KIconViewItem( tqparent, text, image ) { m_path = path; m_isSubLibrary = isSubLibrary; @@ -220,10 +220,10 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra TQValueList<bool> subLibList; if( m_isSubLibrary && PMLibraryIconDrag::decode( e, pathList, subLibList ) ) { - PMLibraryIconView* source = static_cast<PMLibraryIconView*>( e->source( )->parentWidget( ) ); - PMLibraryHandle* parentLib = source->library( ); + PMLibraryIconView* source = static_cast<PMLibraryIconView*>( e->source( )->tqparentWidget( ) ); + PMLibraryHandle* tqparentLib = source->library( ); PMLibraryHandle newParentLib = PMLibraryHandle( m_path ); - if ( parentLib->isReadOnly() || newParentLib.isReadOnly() ) + if ( tqparentLib->isReadOnly() || newParentLib.isReadOnly() ) { e->ignore(); return; @@ -238,7 +238,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra if( subLibList[i] ) { TQString newpath = newPath( path, true ); - if( parentLib->deleteSubLibrary( path ) == PMLibraryHandle::Ok ) + if( tqparentLib->deleteSubLibrary( path ) == PMLibraryHandle::Ok ) { PMLibraryHandle lib = PMLibraryHandle( path ); if( newParentLib.addSubLibrary( newpath, lib.name() ) == PMLibraryHandle::Ok ) @@ -249,7 +249,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra else { success = false; - parentLib->addSubLibrary( path, lib.name( ) ); + tqparentLib->addSubLibrary( path, lib.name( ) ); } } else @@ -258,7 +258,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra else { TQString newpath = newPath( path, false ); - if( parentLib->deleteObject( path ) == PMLibraryHandle::Ok ) + if( tqparentLib->deleteObject( path ) == PMLibraryHandle::Ok ) { PMLibraryObject obj = PMLibraryObject( path ); if( newParentLib.addObject( newpath, obj.name() ) == PMLibraryHandle::Ok ) @@ -268,7 +268,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra else { success = false; - parentLib->addObject( path, obj.name( ) ); + tqparentLib->addObject( path, obj.name( ) ); } } else @@ -277,7 +277,7 @@ void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDra if( !success ) { - KMessageBox::error( 0, i18n( "Error moving \"%1\" to \"%2\"" ).arg( path ).arg( m_path ) ); + KMessageBox::error( 0, i18n( "Error moving \"%1\" to \"%2\"" ).tqarg( path ).tqarg( m_path ) ); e->ignore( ); return; } diff --git a/kpovmodeler/pmlibraryiconview.h b/kpovmodeler/pmlibraryiconview.h index 87b90ffb..84d4f5b0 100644 --- a/kpovmodeler/pmlibraryiconview.h +++ b/kpovmodeler/pmlibraryiconview.h @@ -30,9 +30,10 @@ class PMLibraryHandle; /** * This class is the drag and drop object for the icon view */ -class PMLibraryIconDrag : public QIconDrag +class PMLibraryIconDrag : public TQIconDrag { Q_OBJECT + TQ_OBJECT public: /** Constructor */ PMLibraryIconDrag( TQWidget * dragSource, const char* name = 0 ) : TQIconDrag( dragSource, name ) {} @@ -40,7 +41,7 @@ public: /** @return The ith format, or NULL. */ const char* format( int i ) const; /** @return The encoded payload of this object, in the specified MIME format. */ - TQByteArray encodedData( const char* mime ) const; + TQByteArray tqencodedData( const char* mime ) const; /** @return True if the information in e can be decoded */ static bool canDecode( TQMimeSource* e ); /** @@ -62,8 +63,9 @@ private: class PMLibraryIconView: public KIconView { Q_OBJECT + TQ_OBJECT public: - PMLibraryIconView( TQWidget *parent, const char* name = NULL ); + PMLibraryIconView( TQWidget *tqparent, const char* name = NULL ); /** * Set the library base path @@ -99,8 +101,8 @@ private: class PMLibraryIconViewItem: public KIconViewItem { public: - PMLibraryIconViewItem( TQIconView *parent, const TQString& text, const TQString& path, bool isSubLibrary ); - PMLibraryIconViewItem( TQIconView *parent, const TQString& text, const TQImage& image, const TQString& path, bool isSubLibrary ); + PMLibraryIconViewItem( TQIconView *tqparent, const TQString& text, const TQString& path, bool isSubLibrary ); + PMLibraryIconViewItem( TQIconView *tqparent, const TQString& text, const TQImage& image, const TQString& path, bool isSubLibrary ); /** Get the path of the entry */ TQString path( ) const { return m_path; } diff --git a/kpovmodeler/pmlibrarymanager.cpp b/kpovmodeler/pmlibrarymanager.cpp index 9683064a..0e4b17dd 100644 --- a/kpovmodeler/pmlibrarymanager.cpp +++ b/kpovmodeler/pmlibrarymanager.cpp @@ -88,7 +88,7 @@ void PMLibraryManager::scanLibraries( ) { TQDir curDir( *i ); curDir.setFilter( TQDir::Dirs ); - QFileInfoListIterator it( *( curDir.entryInfoList( ) ) ); + TQFileInfoListIterator it( *( curDir.entryInfoList( ) ) ); // For each sub directory TQFileInfo* fi; diff --git a/kpovmodeler/pmlibrarymanager.h b/kpovmodeler/pmlibrarymanager.h index 1ced4d0b..698f3f49 100644 --- a/kpovmodeler/pmlibrarymanager.h +++ b/kpovmodeler/pmlibrarymanager.h @@ -72,7 +72,7 @@ public: /** * Refreshes the list of libraries. - * WARNING: This function invalidates all previously given PMLibraryHandle pointers + * WARNING: This function tqinvalidates all previously given PMLibraryHandle pointers */ void refresh( ); diff --git a/kpovmodeler/pmlibraryobject.cpp b/kpovmodeler/pmlibraryobject.cpp index d89edbec..95a7c29d 100644 --- a/kpovmodeler/pmlibraryobject.cpp +++ b/kpovmodeler/pmlibraryobject.cpp @@ -40,9 +40,9 @@ PMLibraryObject::PMLibraryObject( ) m_preview = NULL; m_objects = NULL; m_data = NULL; - m_name = TQString::null; - m_description = TQString::null; - m_keywords = TQString::null; + m_name = TQString(); + m_description = TQString(); + m_keywords = TQString(); } PMLibraryObject::PMLibraryObject( KURL u ) diff --git a/kpovmodeler/pmlibraryobjectsearch.cpp b/kpovmodeler/pmlibraryobjectsearch.cpp index 30e5be5c..9df12dac 100644 --- a/kpovmodeler/pmlibraryobjectsearch.cpp +++ b/kpovmodeler/pmlibraryobjectsearch.cpp @@ -34,8 +34,8 @@ #include <kdialog.h> #include <klistview.h> -PMLibraryObjectSearch::PMLibraryObjectSearch( TQWidget* parent ) : - TQWidget( parent, "" ) +PMLibraryObjectSearch::PMLibraryObjectSearch( TQWidget* tqparent ) : + TQWidget( tqparent, "" ) { setMinimumSize( 780, 300 ); setMaximumSize( 800, 400 ); diff --git a/kpovmodeler/pmlibraryobjectsearch.h b/kpovmodeler/pmlibraryobjectsearch.h index 55d44233..318735e4 100644 --- a/kpovmodeler/pmlibraryobjectsearch.h +++ b/kpovmodeler/pmlibraryobjectsearch.h @@ -36,11 +36,12 @@ class KListView; * It also provides drag. If the user doesn't have a clear idea * where the objects he wants are, this is the dialog to use. */ -class PMLibraryObjectSearch: public QWidget +class PMLibraryObjectSearch: public TQWidget { Q_OBJECT + TQ_OBJECT public: - PMLibraryObjectSearch( TQWidget *parent ); + PMLibraryObjectSearch( TQWidget *tqparent ); private slots: void slotSearchButtonPressed( ); diff --git a/kpovmodeler/pmlight.cpp b/kpovmodeler/pmlight.cpp index 554a09c2..0bf2f005 100644 --- a/kpovmodeler/pmlight.cpp +++ b/kpovmodeler/pmlight.cpp @@ -268,11 +268,11 @@ void PMLight::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMLight::metaObject( ) const +PMMetaObject* PMLight::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Light", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Light", Base::tqmetaObject( ), createNewLight ); PMTypeProperty* p = new PMTypeProperty( "lightType", &PMLight::setLightType, &PMLight::lightType ); @@ -564,9 +564,9 @@ void PMLight::setMediaAttenuation( bool y ) } } -PMDialogEditBase* PMLight::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMLight::editWidget( TQWidget* tqparent ) const { - return new PMLightEdit( parent ); + return new PMLightEdit( tqparent ); } void PMLight::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmlight.h b/kpovmodeler/pmlight.h index 4fafb2b0..4ceb0268 100644 --- a/kpovmodeler/pmlight.h +++ b/kpovmodeler/pmlight.h @@ -59,7 +59,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMLightEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmlightedit.cpp b/kpovmodeler/pmlightedit.cpp index e652d0a2..70625c00 100644 --- a/kpovmodeler/pmlightedit.cpp +++ b/kpovmodeler/pmlightedit.cpp @@ -29,8 +29,8 @@ #include <klocale.h> -PMLightEdit::PMLightEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMLightEdit::PMLightEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmlightedit.h b/kpovmodeler/pmlightedit.h index 62451ed3..75b56530 100644 --- a/kpovmodeler/pmlightedit.h +++ b/kpovmodeler/pmlightedit.h @@ -41,12 +41,13 @@ class TQCheckBox; class PMLightEdit : public PMNamedObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMNamedObjectEdit Base; public: /** - * Creates a PMLightEdit with parent and name + * Creates a PMLightEdit with tqparent and name */ - PMLightEdit( TQWidget* parent, const char* name = 0 ); + PMLightEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmlightgroup.cpp b/kpovmodeler/pmlightgroup.cpp index acf655e4..af46e823 100644 --- a/kpovmodeler/pmlightgroup.cpp +++ b/kpovmodeler/pmlightgroup.cpp @@ -69,11 +69,11 @@ void PMLightGroup::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMLightGroup::metaObject( ) const +PMMetaObject* PMLightGroup::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "LightGroup", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "LightGroup", Base::tqmetaObject( ), createNewLightGroup ); s_pMetaObject->addProperty( new PMLightGroupProperty( "globalLights", @@ -103,9 +103,9 @@ void PMLightGroup::setGlobalLights( bool gl ) } } -PMDialogEditBase* PMLightGroup::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMLightGroup::editWidget( TQWidget* tqparent ) const { - return new PMLightGroupEdit( parent ); + return new PMLightGroupEdit( tqparent ); } void PMLightGroup::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmlightgroup.h b/kpovmodeler/pmlightgroup.h index 9fdf8d6b..9c9de8b3 100644 --- a/kpovmodeler/pmlightgroup.h +++ b/kpovmodeler/pmlightgroup.h @@ -54,7 +54,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMLightGroupEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmlightgroupedit.cpp b/kpovmodeler/pmlightgroupedit.cpp index c1e21024..87f35ff0 100644 --- a/kpovmodeler/pmlightgroupedit.cpp +++ b/kpovmodeler/pmlightgroupedit.cpp @@ -24,8 +24,8 @@ #include <tqcheckbox.h> #include <klocale.h> -PMLightGroupEdit::PMLightGroupEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMLightGroupEdit::PMLightGroupEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -34,12 +34,12 @@ void PMLightGroupEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pGlobalLights = new TQCheckBox( i18n( "Global lights" ), this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( m_pGlobalLights ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( m_pGlobalLights ); + tqlayout->addStretch( 1 ); connect( m_pGlobalLights, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } diff --git a/kpovmodeler/pmlightgroupedit.h b/kpovmodeler/pmlightgroupedit.h index fa090f97..8b1216fd 100644 --- a/kpovmodeler/pmlightgroupedit.h +++ b/kpovmodeler/pmlightgroupedit.h @@ -35,12 +35,13 @@ class TQCheckBox; class PMLightGroupEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMLightGroupEdit with parent and name + * Creates a PMLightGroupEdit with tqparent and name */ - PMLightGroupEdit( TQWidget* parent, const char* name = 0 ); + PMLightGroupEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmlineedits.cpp b/kpovmodeler/pmlineedits.cpp index 19391338..e6e350b6 100644 --- a/kpovmodeler/pmlineedits.cpp +++ b/kpovmodeler/pmlineedits.cpp @@ -19,8 +19,8 @@ #include <kmessagebox.h> #include <klocale.h> -PMFloatEdit::PMFloatEdit( TQWidget* parent, const char* name /*= 0*/ ) - : TQLineEdit( parent, name ) +PMFloatEdit::PMFloatEdit( TQWidget* tqparent, const char* name /*= 0*/ ) + : TQLineEdit( tqparent, name ) { m_bCheckLower = false; m_bCheckUpper = false; @@ -67,28 +67,28 @@ bool PMFloatEdit::isDataValid( ) if( m_bCheckLower && m_bCheckUpper ) KMessageBox::error( this, i18n( "Please enter a float value " "between %1 and %2" ) - .arg( m_lowerValue ).arg( m_upperValue ), + .tqarg( m_lowerValue ).tqarg( m_upperValue ), i18n( "Error" ) ); else if( m_bCheckLower ) { if( m_lowerOp == OpGreaterEqual ) KMessageBox::error( this, i18n( "Please enter a float value " - ">= %1" ).arg( m_lowerValue ), + ">= %1" ).tqarg( m_lowerValue ), i18n( "Error" ) ); else KMessageBox::error( this, i18n( "Please enter a float value " - "> %1" ).arg( m_lowerValue ), + "> %1" ).tqarg( m_lowerValue ), i18n( "Error" ) ); } else { if( m_upperOp == OpLessEqual ) KMessageBox::error( this, i18n( "Please enter a float value " - "<= %1" ).arg( m_upperValue ), + "<= %1" ).tqarg( m_upperValue ), i18n( "Error" ) ); else KMessageBox::error( this, i18n( "Please enter a float value " - "< %1" ).arg( m_upperValue ), + "< %1" ).tqarg( m_upperValue ), i18n( "Error" ) ); } } @@ -129,8 +129,8 @@ void PMFloatEdit::slotEditTextChanged( const TQString& /*t*/ ) -PMIntEdit::PMIntEdit( TQWidget* parent, const char* name /*= 0*/ ) - : TQLineEdit( parent, name ) +PMIntEdit::PMIntEdit( TQWidget* tqparent, const char* name /*= 0*/ ) + : TQLineEdit( tqparent, name ) { m_bCheckLower = false; m_bCheckUpper = false; @@ -183,15 +183,15 @@ bool PMIntEdit::isDataValid( ) if( m_bCheckLower && m_bCheckUpper ) KMessageBox::error( this, i18n( "Please enter an integer value " "between %1 and %2" ) - .arg( m_lowerValue ).arg( m_upperValue ), + .tqarg( m_lowerValue ).tqarg( m_upperValue ), i18n( "Error" ) ); else if( m_bCheckLower ) KMessageBox::error( this, i18n( "Please enter an integer value " - ">= %1" ).arg( m_lowerValue ), + ">= %1" ).tqarg( m_lowerValue ), i18n( "Error" ) ); else KMessageBox::error( this, i18n( "Please enter an integer value " - "<= %1" ).arg( m_upperValue ), + "<= %1" ).tqarg( m_upperValue ), i18n( "Error" ) ); } } diff --git a/kpovmodeler/pmlineedits.h b/kpovmodeler/pmlineedits.h index 43256818..0db5619e 100644 --- a/kpovmodeler/pmlineedits.h +++ b/kpovmodeler/pmlineedits.h @@ -29,16 +29,17 @@ * Lineedit for float input */ -class PMFloatEdit : public QLineEdit +class PMFloatEdit : public TQLineEdit { Q_OBJECT + TQ_OBJECT public: enum ValidationOp { OpGreater, OpGreaterEqual, OpLess, OpLessEqual }; /** * Simple constructor */ - PMFloatEdit( TQWidget* parent, const char* name = 0 ); + PMFloatEdit( TQWidget* tqparent, const char* name = 0 ); /** * Sets the validation for the lineedit. * @@ -87,14 +88,15 @@ private: * Lineedit for int input */ -class PMIntEdit : public QLineEdit +class PMIntEdit : public TQLineEdit { Q_OBJECT + TQ_OBJECT public: /** * Simple constructor */ - PMIntEdit( TQWidget* parent, const char* name = 0 ); + PMIntEdit( TQWidget* tqparent, const char* name = 0 ); /** * Sets the validation for the lineedit. * diff --git a/kpovmodeler/pmlinkedit.cpp b/kpovmodeler/pmlinkedit.cpp index 8ebca5c6..2114c5fa 100644 --- a/kpovmodeler/pmlinkedit.cpp +++ b/kpovmodeler/pmlinkedit.cpp @@ -28,23 +28,23 @@ #include "pmobjectselect.h" PMLinkEdit::PMLinkEdit( const TQString& declareType, - TQWidget* parent, const char* name ) - : TQWidget( parent, name ) + TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_declareTypes.append( declareType ); init( ); } PMLinkEdit::PMLinkEdit( const TQStringList& declareTypes, - TQWidget* parent, const char* name ) - : TQWidget( parent, name ) + TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { m_declareTypes = declareTypes; init( ); } -PMLinkEdit::PMLinkEdit( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMLinkEdit::PMLinkEdit( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { init( ); } @@ -64,12 +64,12 @@ void PMLinkEdit::init( ) m_pIDEdit->setReadOnly( true ); grid->addWidget( m_pIDEdit, 0, 1 ); - TQHBoxLayout* layout = new TQHBoxLayout( ); - grid->addLayout( layout, 1, 1 ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( ); + grid->addLayout( tqlayout, 1, 1 ); m_pSelectButton = new TQPushButton( i18n( "Select..." ), this ); - layout->addWidget( m_pSelectButton ); + tqlayout->addWidget( m_pSelectButton ); m_pClearButton = new KPushButton( KStdGuiItem::clear(), this ); - layout->addWidget( m_pClearButton ); + tqlayout->addWidget( m_pClearButton ); connect( m_pSelectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSelectClicked( ) ) ); connect( m_pClearButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotClearClicked( ) ) ); diff --git a/kpovmodeler/pmlinkedit.h b/kpovmodeler/pmlinkedit.h index 4462393c..935d8940 100644 --- a/kpovmodeler/pmlinkedit.h +++ b/kpovmodeler/pmlinkedit.h @@ -31,26 +31,27 @@ class TQPushButton; /** * Edit widget for links with a TQLineEdit, a select and a clear button. */ -class PMLinkEdit : public QWidget +class PMLinkEdit : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** - * Creates a link edit widget with parent and name. + * Creates a link edit widget with tqparent and name. * * Allows the selection of declares of type declareType. */ - PMLinkEdit( const TQString& declareType, TQWidget* parent, const char* name = 0 ); + PMLinkEdit( const TQString& declareType, TQWidget* tqparent, const char* name = 0 ); /** - * Creates a link edit widget with parent and name. + * Creates a link edit widget with tqparent and name. * * Allows the selection of declares of type declares. */ - PMLinkEdit( const TQStringList& declares, TQWidget* parent, const char* name = 0 ); + PMLinkEdit( const TQStringList& declares, TQWidget* tqparent, const char* name = 0 ); /** - * Creates a link edit widget with parent and name. + * Creates a link edit widget with tqparent and name. */ - PMLinkEdit( TQWidget* parent, const char* name = 0 ); + PMLinkEdit( TQWidget* tqparent, const char* name = 0 ); /** * Sets the displayed object and displays the link diff --git a/kpovmodeler/pmlistpattern.cpp b/kpovmodeler/pmlistpattern.cpp index 721369d2..5a7a3f1f 100644 --- a/kpovmodeler/pmlistpattern.cpp +++ b/kpovmodeler/pmlistpattern.cpp @@ -114,11 +114,11 @@ void PMListPattern::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMListPattern::metaObject( ) const +PMMetaObject* PMListPattern::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ListPattern", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "ListPattern", Base::tqmetaObject( ) ); PMListTypeProperty* p = new PMListTypeProperty( "listType", &PMListPattern::setListType, @@ -178,9 +178,9 @@ void PMListPattern::setMortar( double n ) } } -PMDialogEditBase* PMListPattern::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMListPattern::editWidget( TQWidget* tqparent ) const { - return new PMListPatternEdit( parent ); + return new PMListPatternEdit( tqparent ); } void PMListPattern::restoreMemento( PMMemento* s ) @@ -228,11 +228,11 @@ PMTextureList::~PMTextureList( ) { } -PMMetaObject* PMTextureList::metaObject( ) const +PMMetaObject* PMTextureList::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "TextureList", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "TextureList", Base::tqmetaObject( ), createNewTextureList ); } return s_pMetaObject; @@ -267,11 +267,11 @@ PMPigmentList::~PMPigmentList( ) { } -PMMetaObject* PMPigmentList::metaObject( ) const +PMMetaObject* PMPigmentList::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "PigmentList", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "PigmentList", Base::tqmetaObject( ), createNewPigmentList ); } return s_pMetaObject; @@ -306,11 +306,11 @@ PMColorList::~PMColorList( ) { } -PMMetaObject* PMColorList::metaObject( ) const +PMMetaObject* PMColorList::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ColorList", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "ColorList", Base::tqmetaObject( ), createNewColorList ); } return s_pMetaObject; @@ -345,11 +345,11 @@ PMDensityList::~PMDensityList( ) { } -PMMetaObject* PMDensityList::metaObject( ) const +PMMetaObject* PMDensityList::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "DensityList", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "DensityList", Base::tqmetaObject( ), createNewDensityList ); } return s_pMetaObject; @@ -388,11 +388,11 @@ PMNormalList::~PMNormalList( ) { } -PMMetaObject* PMNormalList::metaObject( ) const +PMMetaObject* PMNormalList::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "NormalList", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "NormalList", Base::tqmetaObject( ), createNewNormalList ); s_pMetaObject->addProperty( new PMNormalListProperty( "depth", &PMNormalList::setDepth, @@ -462,8 +462,8 @@ void PMNormalList::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMNormalList::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMNormalList::editWidget( TQWidget* tqparent ) const { - return new PMListPatternEdit( parent ); + return new PMListPatternEdit( tqparent ); } diff --git a/kpovmodeler/pmlistpattern.h b/kpovmodeler/pmlistpattern.h index 6716dadb..6c8a26a1 100644 --- a/kpovmodeler/pmlistpattern.h +++ b/kpovmodeler/pmlistpattern.h @@ -57,7 +57,7 @@ public: */ virtual TQString listObjectType( ) const = 0; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMListPatternEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the color list type @@ -150,7 +150,7 @@ public: virtual TQString listObjectType( ) const { return TQString( "Texture" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -189,7 +189,7 @@ public: virtual TQString listObjectType( ) const { return TQString( "Pigment" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -228,7 +228,7 @@ public: virtual TQString listObjectType( ) const { return TQString( "SolidColor" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -267,7 +267,7 @@ public: virtual TQString listObjectType( ) const { return TQString( "Density" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -306,14 +306,14 @@ public: virtual TQString listObjectType( ) const { return TQString( "Normal" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; /** * Returns a new @ref PMListPatternEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmnormallist" ); } diff --git a/kpovmodeler/pmlistpatternedit.cpp b/kpovmodeler/pmlistpatternedit.cpp index dec87cb7..240d87d2 100644 --- a/kpovmodeler/pmlistpatternedit.cpp +++ b/kpovmodeler/pmlistpatternedit.cpp @@ -31,8 +31,8 @@ #include <kmessagebox.h> -PMListPatternEdit::PMListPatternEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMListPatternEdit::PMListPatternEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -41,39 +41,39 @@ void PMListPatternEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQVBoxLayout* vlayout = new TQVBoxLayout( topLayout( ) ); + TQVBoxLayout* vtqlayout = new TQVBoxLayout( topLayout( ) ); /* Field for Pattern List type */ - TQHBoxLayout* layout = new TQHBoxLayout( vlayout ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( vtqlayout ); TQLabel* label = new TQLabel( i18n( "Type:" ), this ); m_pTypeCombo = new TQComboBox( false, this ); m_pTypeCombo->insertItem( i18n( "Checkers" ) ); m_pTypeCombo->insertItem( i18n( "Brick" ) ); m_pTypeCombo->insertItem( i18n( "Hexagon" ) ); - layout->addWidget( label, 0, AlignTop ); - layout->addWidget( m_pTypeCombo ); - layout->addStretch( 1 ); + tqlayout->addWidget( label, 0, AlignTop ); + tqlayout->addWidget( m_pTypeCombo ); + tqlayout->addStretch( 1 ); /* The depth field */ - layout = new TQHBoxLayout( vlayout ); + tqlayout = new TQHBoxLayout( vtqlayout ); m_pDepthLabel = new TQLabel( i18n( "Depth:" ), this ); m_pDepth = new PMFloatEdit( this ); - layout->addWidget( m_pDepthLabel ); - layout->addWidget( m_pDepth ); - layout->addStretch( 1 ); + tqlayout->addWidget( m_pDepthLabel ); + tqlayout->addWidget( m_pDepth ); + tqlayout->addStretch( 1 ); /* The brick information */ - TQHBoxLayout* bricklayout = new TQHBoxLayout( vlayout ); + TQHBoxLayout* bricklayout = new TQHBoxLayout( vtqlayout ); m_pBrickSizeLabel = new TQLabel( i18n( "Brick size:" ), this ); m_pBrickSize = new PMVectorEdit( "x", "y", "z", this ); bricklayout->addWidget( m_pBrickSizeLabel ); bricklayout->addWidget( m_pBrickSize ); - layout = new TQHBoxLayout( vlayout ); + tqlayout = new TQHBoxLayout( vtqlayout ); m_pMortarLabel = new TQLabel( i18n( "Mortar:" ), this ); m_pMortar = new PMFloatEdit( this ); - layout->addWidget( m_pMortarLabel ); - layout->addWidget( m_pMortar ); - layout->addStretch( 1 ); + tqlayout->addWidget( m_pMortarLabel ); + tqlayout->addWidget( m_pMortar ); + tqlayout->addStretch( 1 ); /* connect all signals to slots/signals */ connect( m_pBrickSize, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); @@ -161,7 +161,7 @@ void PMListPatternEdit::saveContents( ) bool PMListPatternEdit::isDataValid( ) { - int children = 0; + int tqchildren = 0; PMObject* o; if( !m_pBrickSize->isDataValid( ) ) @@ -172,13 +172,13 @@ bool PMListPatternEdit::isDataValid( ) // count child objects for( o = m_pDisplayedObject->firstChild( ); o; o = o->nextSibling( ) ) if( o->type( ) == m_pDisplayedObject->listObjectType( ) ) - children++; + tqchildren++; switch( m_pTypeCombo->currentItem( ) ) { case 0: case 1: - if( children > 2 ) + if( tqchildren > 2 ) { KMessageBox::error( this, i18n( "You can have at most two child" " items for that list type!" ), diff --git a/kpovmodeler/pmlistpatternedit.h b/kpovmodeler/pmlistpatternedit.h index 703a5944..4e80e4d8 100644 --- a/kpovmodeler/pmlistpatternedit.h +++ b/kpovmodeler/pmlistpatternedit.h @@ -38,12 +38,13 @@ class TQLabel; class PMListPatternEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMListPatternEdit with parent and name + * Creates a PMListPatternEdit with tqparent and name */ - PMListPatternEdit( TQWidget* parent, const char* name = 0 ); + PMListPatternEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmlookslike.cpp b/kpovmodeler/pmlookslike.cpp index 270292e2..2717c531 100644 --- a/kpovmodeler/pmlookslike.cpp +++ b/kpovmodeler/pmlookslike.cpp @@ -49,11 +49,11 @@ TQString PMLooksLike::description( ) const return i18n( "looks like" ); } -PMMetaObject* PMLooksLike::metaObject( ) const +PMMetaObject* PMLooksLike::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "LooksLike", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "LooksLike", Base::tqmetaObject( ), createNewLooksLike ); // no properties } @@ -80,9 +80,9 @@ void PMLooksLike::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMLooksLike::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMLooksLike::editWidget( TQWidget* tqparent ) const { - return new PMNamedObjectEdit( parent ); + return new PMNamedObjectEdit( tqparent ); } void PMLooksLike::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmlookslike.h b/kpovmodeler/pmlookslike.h index 4a191422..30127a6a 100644 --- a/kpovmodeler/pmlookslike.h +++ b/kpovmodeler/pmlookslike.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMLooksLikeEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmmaterial.cpp b/kpovmodeler/pmmaterial.cpp index 66f11f94..8eb8866f 100644 --- a/kpovmodeler/pmmaterial.cpp +++ b/kpovmodeler/pmmaterial.cpp @@ -43,11 +43,11 @@ PMMaterial::~PMMaterial( ) { } -PMMetaObject* PMMaterial::metaObject( ) const +PMMetaObject* PMMaterial::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Material", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Material", Base::tqmetaObject( ), createNewMaterial ); } return s_pMetaObject; @@ -68,8 +68,8 @@ TQString PMMaterial::description( ) const return i18n( "material" ); } -PMDialogEditBase* PMMaterial::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMMaterial::editWidget( TQWidget* tqparent ) const { - return new PMMaterialEdit( parent ); + return new PMMaterialEdit( tqparent ); } diff --git a/kpovmodeler/pmmaterial.h b/kpovmodeler/pmmaterial.h index 7e790be4..6e092aed 100644 --- a/kpovmodeler/pmmaterial.h +++ b/kpovmodeler/pmmaterial.h @@ -52,14 +52,14 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; /** * Returns a new @ref PMMaterialEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmmaterial" ); } diff --git a/kpovmodeler/pmmaterialedit.cpp b/kpovmodeler/pmmaterialedit.cpp index f03fcd43..4500e947 100644 --- a/kpovmodeler/pmmaterialedit.cpp +++ b/kpovmodeler/pmmaterialedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMMaterialEdit::PMMaterialEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMMaterialEdit::PMMaterialEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmmaterialedit.h b/kpovmodeler/pmmaterialedit.h index d9d6cf8f..0671d3a7 100644 --- a/kpovmodeler/pmmaterialedit.h +++ b/kpovmodeler/pmmaterialedit.h @@ -34,12 +34,13 @@ class PMMaterial; class PMMaterialEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMMaterialEdit with parent and name + * Creates a PMMaterialEdit with tqparent and name */ - PMMaterialEdit( TQWidget* parent, const char* name = 0 ); + PMMaterialEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmmaterialmap.cpp b/kpovmodeler/pmmaterialmap.cpp index 28b2c849..faffd857 100644 --- a/kpovmodeler/pmmaterialmap.cpp +++ b/kpovmodeler/pmmaterialmap.cpp @@ -186,11 +186,11 @@ void PMMaterialMap::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMMaterialMap::metaObject( ) const +PMMetaObject* PMMaterialMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "MaterialMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "MaterialMap", Base::tqmetaObject( ), createNewMaterialMap ); PMBitmapTypeProperty* bp = new PMBitmapTypeProperty( @@ -296,9 +296,9 @@ void PMMaterialMap::enableOnce( bool c ) } } -PMDialogEditBase* PMMaterialMap::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMMaterialMap::editWidget( TQWidget* tqparent ) const { - return new PMMaterialMapEdit( parent ); + return new PMMaterialMapEdit( tqparent ); } void PMMaterialMap::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmmaterialmap.h b/kpovmodeler/pmmaterialmap.h index 6377c7bd..6f810274 100644 --- a/kpovmodeler/pmmaterialmap.h +++ b/kpovmodeler/pmmaterialmap.h @@ -72,7 +72,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -87,7 +87,7 @@ public: /** * Returns a new @ref PMMaterialMapEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Gets the bitmap type diff --git a/kpovmodeler/pmmaterialmapedit.cpp b/kpovmodeler/pmmaterialmapedit.cpp index 03d28146..93c61405 100644 --- a/kpovmodeler/pmmaterialmapedit.cpp +++ b/kpovmodeler/pmmaterialmapedit.cpp @@ -38,8 +38,8 @@ #include <kfiledialog.h> #include <kiconloader.h> -PMMaterialMapEdit::PMMaterialMapEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMMaterialMapEdit::PMMaterialMapEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -287,7 +287,7 @@ void PMMaterialMapEdit::slotImageFileNameChanged( const TQString& /*a*/ ) void PMMaterialMapEdit::slotImageFileBrowseClicked( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmmaterialmapedit.h b/kpovmodeler/pmmaterialmapedit.h index e10f3dfb..e1d4e9f3 100644 --- a/kpovmodeler/pmmaterialmapedit.h +++ b/kpovmodeler/pmmaterialmapedit.h @@ -42,12 +42,13 @@ class TQPushButton; class PMMaterialMapEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMMaterialMapEdit with parent and name + * Creates a PMMaterialMapEdit with tqparent and name */ - PMMaterialMapEdit( TQWidget* parent, const char* name = 0 ); + PMMaterialMapEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); /** */ diff --git a/kpovmodeler/pmmedia.cpp b/kpovmodeler/pmmedia.cpp index c5e32d6e..b149b84d 100644 --- a/kpovmodeler/pmmedia.cpp +++ b/kpovmodeler/pmmedia.cpp @@ -97,11 +97,11 @@ PMMedia::~PMMedia( ) { } -PMMetaObject* PMMedia::metaObject( ) const +PMMetaObject* PMMedia::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Media", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Media", Base::tqmetaObject( ), createNewMedia ); s_pMetaObject->addProperty( new PMMediaProperty( "method", &PMMedia::setMethod, &PMMedia::method ) ); @@ -399,9 +399,9 @@ void PMMedia::enableScattering( bool c ) } } -PMDialogEditBase* PMMedia::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMMedia::editWidget( TQWidget* tqparent ) const { - return new PMMediaEdit( parent ); + return new PMMediaEdit( tqparent ); } void PMMedia::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmmedia.h b/kpovmodeler/pmmedia.h index 4836bf37..e984bebd 100644 --- a/kpovmodeler/pmmedia.h +++ b/kpovmodeler/pmmedia.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMMediaEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmmedia" ); } diff --git a/kpovmodeler/pmmediaedit.cpp b/kpovmodeler/pmmediaedit.cpp index f89f7d10..0f63b009 100644 --- a/kpovmodeler/pmmediaedit.cpp +++ b/kpovmodeler/pmmediaedit.cpp @@ -29,8 +29,8 @@ #include <kmessagebox.h> #include <kdialog.h> -PMMediaEdit::PMMediaEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMMediaEdit::PMMediaEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmmediaedit.h b/kpovmodeler/pmmediaedit.h index 6e481a87..021a5b77 100644 --- a/kpovmodeler/pmmediaedit.h +++ b/kpovmodeler/pmmediaedit.h @@ -40,12 +40,13 @@ class TQComboBox; class PMMediaEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMMediaEdit with parent and name + * Creates a PMMediaEdit with tqparent and name */ - PMMediaEdit( TQWidget* parent, const char* name = 0 ); + PMMediaEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmmemento.cpp b/kpovmodeler/pmmemento.cpp index f417e575..a5c53648 100644 --- a/kpovmodeler/pmmemento.cpp +++ b/kpovmodeler/pmmemento.cpp @@ -187,7 +187,7 @@ TQString PMMemento::oldID( ) const { if( m_pIDData ) return m_pIDData->stringData( ); - return TQString::null; + return TQString(); } void PMMemento::addChangedObject( PMObject* obj, int mode ) diff --git a/kpovmodeler/pmmesh.cpp b/kpovmodeler/pmmesh.cpp index d143edf4..a56ea635 100644 --- a/kpovmodeler/pmmesh.cpp +++ b/kpovmodeler/pmmesh.cpp @@ -133,11 +133,11 @@ void PMMesh::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMMesh::metaObject( ) const +PMMetaObject* PMMesh::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Mesh", Base::metaObject( ), createNewMesh ); + s_pMetaObject = new PMMetaObject( "Mesh", Base::tqmetaObject( ), createNewMesh ); s_pMetaObject->addProperty( new PMMeshProperty( "hierarchy", &PMMesh::setHierarchy, &PMMesh::hierarchy ) ); @@ -189,9 +189,9 @@ void PMMesh::setInsideVector( const PMVector& iv ) } } -PMDialogEditBase* PMMesh::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMMesh::editWidget( TQWidget* tqparent ) const { - return new PMMeshEdit( parent ); + return new PMMeshEdit( tqparent ); } void PMMesh::createMemento( ) @@ -236,7 +236,7 @@ void PMMesh::restoreMemento( PMMemento* s ) TQPtrList<PMMemento> list = m->triangleMementos( ); TQPtrListIterator<PMMemento> Itr( list ); for ( int i = 0; i < numChildren && ( tm = Itr.current( ) ) != 0; ++i, ++Itr ) - childAt( i )->restoreMemento( tm ); + tqchildAt( i )->restoreMemento( tm ); } Base::restoreMemento( s ); @@ -259,10 +259,10 @@ void PMMesh::controlPoints( PMControlPointList& list ) m_pointToPointList.clear( ); for ( unsigned i = 0; i < numChildren; ++i ) { - if ( childAt( i )->isA( "Triangle" ) ) + if ( tqchildAt( i )->isA( "Triangle" ) ) { - obj = ( PMTriangle * ) childAt( i ); + obj = ( PMTriangle * ) tqchildAt( i ); ptp.object = obj; for ( unsigned j = 0; j < 3; ++j ) { @@ -353,9 +353,9 @@ void PMMesh::controlPointsChangedList( PMControlPointList& list, PMObjectList& o for ( int i = 0; i < numChildren && validTriangles; ++i ) { - if ( childAt( i )->isA( "Triangle" ) ) + if ( tqchildAt( i )->isA( "Triangle" ) ) { - obj = ( PMTriangle* )childAt( i ); + obj = ( PMTriangle* )tqchildAt( i ); obj->createMemento( ); objList.append( obj ); validNormal = false; @@ -538,7 +538,7 @@ void PMMesh::controlPointsChangedList( PMControlPointList& list, PMObjectList& o { if ( ( tm = mementoList.getLast( ) ) ) { - childAt( j )->restoreMemento( tm ); + tqchildAt( j )->restoreMemento( tm ); delete tm; mementoList.removeLast( ); } diff --git a/kpovmodeler/pmmesh.h b/kpovmodeler/pmmesh.h index a6fe0089..74155060 100644 --- a/kpovmodeler/pmmesh.h +++ b/kpovmodeler/pmmesh.h @@ -56,7 +56,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -68,7 +68,7 @@ public: /** * Returns a new @ref PMMeshEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmmeshedit.cpp b/kpovmodeler/pmmeshedit.cpp index 6ddf9679..09285268 100644 --- a/kpovmodeler/pmmeshedit.cpp +++ b/kpovmodeler/pmmeshedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMMeshEdit::PMMeshEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMMeshEdit::PMMeshEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -35,17 +35,17 @@ void PMMeshEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pHierarchy = new TQCheckBox( i18n( "Hierarchy" ), this ); m_pEnableInsideVector = new TQCheckBox( i18n( "Inside vector:" ), this ); m_pInsideVector = new PMVectorEdit( "x", "y", "z", this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( m_pHierarchy ); - layout->addStretch( 1 ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( m_pEnableInsideVector ); - layout->addWidget( m_pInsideVector ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( m_pHierarchy ); + tqlayout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( m_pEnableInsideVector ); + tqlayout->addWidget( m_pInsideVector ); + tqlayout->addStretch( 1 ); connect( m_pHierarchy, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pEnableInsideVector, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotInsideVectorClicked( ) ) ); diff --git a/kpovmodeler/pmmeshedit.h b/kpovmodeler/pmmeshedit.h index dc4dc4ae..e9d71054 100644 --- a/kpovmodeler/pmmeshedit.h +++ b/kpovmodeler/pmmeshedit.h @@ -36,12 +36,13 @@ class PMVectorEdit; class PMMeshEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMMeshEdit with parent and name + * Creates a PMMeshEdit with tqparent and name */ - PMMeshEdit( TQWidget* parent, const char* name = 0 ); + PMMeshEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmmetaobject.h b/kpovmodeler/pmmetaobject.h index 95822fc9..a0b3ce90 100644 --- a/kpovmodeler/pmmetaobject.h +++ b/kpovmodeler/pmmetaobject.h @@ -402,7 +402,7 @@ public: */ PMPropertyBase* property( const TQString& name ) const { - return m_propertiesDict.find( name ); + return m_propertiesDict.tqfind( name ); } private: diff --git a/kpovmodeler/pmmovecommand.cpp b/kpovmodeler/pmmovecommand.cpp index bb75b0e4..e45a8bf3 100644 --- a/kpovmodeler/pmmovecommand.cpp +++ b/kpovmodeler/pmmovecommand.cpp @@ -29,19 +29,19 @@ #include <klocale.h> #include <tqptrdict.h> -PMMoveCommand::PMMoveCommand( PMObject* obj, PMObject* parent, PMObject* after ) - : PMCommand( i18n( "Move %1" ).arg( obj->description( ) ) ) +PMMoveCommand::PMMoveCommand( PMObject* obj, PMObject* tqparent, PMObject* after ) + : PMCommand( i18n( "Move %1" ).tqarg( obj->description( ) ) ) { - m_pParent = parent; + m_pParent = tqparent; m_pAfter = after; - if( obj->parent( ) ) + if( obj->tqparent( ) ) { m_infoList.append( new PMDeleteInfo( obj ) ); } else { - // object has no parent! + // object has no tqparent! // top level objects can't be moved, move all child items PMObject* tmp; for( tmp = obj->firstChild( ); tmp; tmp = tmp->nextSibling( ) ) @@ -52,7 +52,7 @@ PMMoveCommand::PMMoveCommand( PMObject* obj, PMObject* parent, PMObject* after ) m_firstExecution = true; } -PMMoveCommand::PMMoveCommand( const PMObjectList& list, PMObject* parent, +PMMoveCommand::PMMoveCommand( const PMObjectList& list, PMObject* tqparent, PMObject* after ) : PMCommand( i18n( "Move Objects" ) ) { @@ -60,11 +60,11 @@ PMMoveCommand::PMMoveCommand( const PMObjectList& list, PMObject* parent, for( ; it.current( ); ++it ) { - if( it.current( )->parent( ) ) + if( it.current( )->tqparent( ) ) m_infoList.append( new PMDeleteInfo( it.current( ) ) ); else { - // object has no parent! + // object has no tqparent! // top level objects can't be moved, move all child items PMObject* tmp; for( tmp = it.current( )->firstChild( ); tmp; tmp = tmp->nextSibling( ) ) @@ -72,7 +72,7 @@ PMMoveCommand::PMMoveCommand( const PMObjectList& list, PMObject* parent, } } - m_pParent = parent; + m_pParent = tqparent; m_pAfter = after; m_executed = false; m_firstExecution = true; @@ -97,19 +97,19 @@ void PMMoveCommand::execute( PMCommandManager* theManager ) PMObject* obj; bool error = false; PMDeleteInfo* info = 0; - PMObject* parent; + PMObject* tqparent; for( it.toLast( ); it.current( ); --it ) { info = it.current( ); - parent = info->parent( ); + tqparent = info->tqparent( ); // signal has to be emitted before the item is removed theManager->cmdObjectChanged( info->deletedObject( ), PMCRemove ); if( m_firstExecution ) - if( parent->dataChangeOnInsertRemove( ) - && !parent->mementoCreated( ) ) - parent->createMemento( ); - parent->takeChild( info->deletedObject( ) ); + if( tqparent->dataChangeOnInsertRemove( ) + && !tqparent->mementoCreated( ) ) + tqparent->createMemento( ); + tqparent->takeChild( info->deletedObject( ) ); } // insert at new position @@ -165,10 +165,10 @@ void PMMoveCommand::execute( PMCommandManager* theManager ) for( it.toLast( ); it.current( ); --it ) { info = it.current( ); - parent = info->parent( ); + tqparent = info->tqparent( ); - if( parent->mementoCreated( ) ) - m_dataChanges.append( parent->takeMemento( ) ); + if( tqparent->mementoCreated( ) ) + m_dataChanges.append( tqparent->takeMemento( ) ); } } @@ -197,18 +197,18 @@ void PMMoveCommand::undo( PMCommandManager* theManager ) // signal has to be emitted before the item is removed obj = it.current( )->deletedObject( ); theManager->cmdObjectChanged( obj, PMCRemove ); - if( obj->parent( ) ) - obj->parent( )->takeChild( obj ); + if( obj->tqparent( ) ) + obj->tqparent( )->takeChild( obj ); } for( it.toFirst( ); it.current( ); ++it ) { obj = it.current( )->deletedObject( ); if( it.current( )->prevSibling( ) ) - it.current( )->parent( ) + it.current( )->tqparent( ) ->insertChildAfter( obj, it.current( )->prevSibling( ) ); else - it.current( )->parent( )->insertChild( obj, 0 ); + it.current( )->tqparent( )->insertChild( obj, 0 ); theManager->cmdObjectChanged( obj, PMCAdd ); } @@ -279,18 +279,18 @@ int PMMoveCommand::errorFlags( PMPart* ) { insideSelection = false; for( obj = links.current( ); obj && !insideSelection; - obj = obj->parent( ) ) + obj = obj->tqparent( ) ) { - if( deletedObjects.find( obj ) ) + if( deletedObjects.tqfind( obj ) ) insideSelection = true; } if( insideSelection ) { bool stop = false; - for( obj = links.current( ); obj && !stop; obj = obj->parent( ) ) + for( obj = links.current( ); obj && !stop; obj = obj->tqparent( ) ) { - if( deletedObjects.find( obj ) ) + if( deletedObjects.tqfind( obj ) ) stop = true; else deletedObjects.insert( obj, new bool( true ) ); @@ -305,17 +305,17 @@ int PMMoveCommand::errorFlags( PMPart* ) if( m_pAfter ) { // insert point is not the first item - // find the top level parent item + // find the top level tqparent item stop = false; obj = links.current( ); do { - if( obj->parent( ) ) + if( obj->tqparent( ) ) { - if( obj->parent( )->type( ) == "Scene" ) + if( obj->tqparent( )->type( ) == "Scene" ) stop = true; else - obj = obj->parent( ); + obj = obj->tqparent( ); } else stop = true; // error @@ -325,9 +325,9 @@ int PMMoveCommand::errorFlags( PMPart* ) PMObject* topParent = obj; // check if insert point is before the top level - // parent object + // tqparent object - if( !objectsAfterInsertPosition.find( obj ) ) + if( !objectsAfterInsertPosition.tqfind( obj ) ) { stop = false; obj = obj->prevSibling( ); @@ -335,7 +335,7 @@ int PMMoveCommand::errorFlags( PMPart* ) { if( obj == m_pAfter ) stop = true; - else if( objectsAfterInsertPosition.find( obj ) ) + else if( objectsAfterInsertPosition.tqfind( obj ) ) stop = true; else obj = obj->prevSibling( ); @@ -356,10 +356,10 @@ int PMMoveCommand::errorFlags( PMPart* ) { if( declareInsertError ) m_errors.prepend( i18n( "Can't insert the declare \"%1\" at that point." ) - .arg( decl->id( ) ) ); + .tqarg( decl->id( ) ) ); else m_errors.prepend( i18n( "The declare \"%1\" can't be moved behind linked objects." ) - .arg( decl->id( ) ) ); + .tqarg( decl->id( ) ) ); PMDeleteInfo* tmp = info; info = m_infoList.prev( ); @@ -383,12 +383,12 @@ int PMMoveCommand::errorFlags( PMPart* ) obj = m_pParent; do { - if( obj->parent( ) ) + if( obj->tqparent( ) ) { - if( obj->parent( )->type( ) == "Scene" ) + if( obj->tqparent( )->type( ) == "Scene" ) stop = true; else - obj = obj->parent( ); + obj = obj->tqparent( ); } else stop = true; // error @@ -419,13 +419,13 @@ int PMMoveCommand::errorFlags( PMPart* ) if( linked ) { - if( !deletedObjects.find( linked ) ) + if( !deletedObjects.tqfind( linked ) ) { // Object is linked to a declare and the declare // will not be moved. // Check, if the insert point is after the declare - if( !declaresBeforeInsertPosition.find( linked ) ) + if( !declaresBeforeInsertPosition.tqfind( linked ) ) ok = false; } } @@ -450,8 +450,8 @@ int PMMoveCommand::errorFlags( PMPart* ) "contains a link to the declare \"%3\" " "and the insert point is not after " "the declare." ) - .arg( obj->description( ) ).arg( name ) - .arg( decl->id( ) ) ); + .tqarg( obj->description( ) ).tqarg( name ) + .tqarg( decl->id( ) ) ); } else kdError( PMArea ) << "linked is 0 in PMMoveCommand::errorFlags\n"; diff --git a/kpovmodeler/pmmovecommand.h b/kpovmodeler/pmmovecommand.h index 5aac246d..188d721c 100644 --- a/kpovmodeler/pmmovecommand.h +++ b/kpovmodeler/pmmovecommand.h @@ -39,23 +39,23 @@ public: /** * Command that moves one PMObject. * - * The object obj will be inserted as child of parent after + * The object obj will be inserted as child of tqparent after * the object after. * * If after is 0, the object becomes the first child. */ - PMMoveCommand( PMObject* obj, PMObject* parent, PMObject* after ); + PMMoveCommand( PMObject* obj, PMObject* tqparent, PMObject* after ); /** * Command that moves a list of new PMObjects. * The objects don't have to be siblings of each other. * - * The object in the list will be inserted as children of parent after + * The object in the list will be inserted as tqchildren of tqparent after * the object after. * - * If after is 0, the objects will be inserted as first children. + * If after is 0, the objects will be inserted as first tqchildren. */ - PMMoveCommand( const PMObjectList& list, PMObject* parent, PMObject* after ); + PMMoveCommand( const PMObjectList& list, PMObject* tqparent, PMObject* after ); /** * Deletes the command. */ diff --git a/kpovmodeler/pmnamedobject.cpp b/kpovmodeler/pmnamedobject.cpp index 72553cd4..70f2bc5a 100644 --- a/kpovmodeler/pmnamedobject.cpp +++ b/kpovmodeler/pmnamedobject.cpp @@ -39,11 +39,11 @@ PMNamedObject::~PMNamedObject( ) { } -PMMetaObject* PMNamedObject::metaObject( ) const +PMMetaObject* PMNamedObject::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "NamedObject", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "NamedObject", Base::tqmetaObject( ) ); s_pMetaObject->addProperty( new PMNamedObjectProperty( "name", &PMNamedObject::setName, &PMNamedObject::name ) ); } diff --git a/kpovmodeler/pmnamedobject.h b/kpovmodeler/pmnamedobject.h index 8b7b0b62..02ee7eb4 100644 --- a/kpovmodeler/pmnamedobject.h +++ b/kpovmodeler/pmnamedobject.h @@ -48,7 +48,7 @@ public: ~PMNamedObject( ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; diff --git a/kpovmodeler/pmnamedobjectedit.cpp b/kpovmodeler/pmnamedobjectedit.cpp index 8f590982..afcbe0d6 100644 --- a/kpovmodeler/pmnamedobjectedit.cpp +++ b/kpovmodeler/pmnamedobjectedit.cpp @@ -24,8 +24,8 @@ #include <tqlabel.h> #include <klocale.h> -PMNamedObjectEdit::PMNamedObjectEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMNamedObjectEdit::PMNamedObjectEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -34,12 +34,12 @@ void PMNamedObjectEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pNameEdit = new TQLineEdit( this ); TQLabel* label = new TQLabel( i18n( "Name:" ), this ); - layout->addWidget( label ); - layout->addWidget( m_pNameEdit ); + tqlayout->addWidget( label ); + tqlayout->addWidget( m_pNameEdit ); connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotNameChanged( const TQString& ) ) ); diff --git a/kpovmodeler/pmnamedobjectedit.h b/kpovmodeler/pmnamedobjectedit.h index dcf8cb07..ce7c8024 100644 --- a/kpovmodeler/pmnamedobjectedit.h +++ b/kpovmodeler/pmnamedobjectedit.h @@ -35,12 +35,13 @@ class TQLineEdit; class PMNamedObjectEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMNamedObjectEdit with parent and name + * Creates a PMNamedObjectEdit with tqparent and name */ - PMNamedObjectEdit( TQWidget* parent, const char* name = 0 ); + PMNamedObjectEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmnormal.cpp b/kpovmodeler/pmnormal.cpp index 722a8fc4..c2afe835 100644 --- a/kpovmodeler/pmnormal.cpp +++ b/kpovmodeler/pmnormal.cpp @@ -58,11 +58,11 @@ PMNormal::~PMNormal( ) { } -PMMetaObject* PMNormal::metaObject( ) const +PMMetaObject* PMNormal::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Normal", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Normal", Base::tqmetaObject( ), createNewNormal ); s_pMetaObject->addProperty( new PMNormProperty( "bumpSize", &PMNormal::setBumpSize, &PMNormal::bumpSize ) ); @@ -109,9 +109,9 @@ void PMNormal::readAttributes( const PMXMLHelper& h ) m_uvMapping = h.boolAttribute( "uv_mapping", false ); } -PMDialogEditBase* PMNormal::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMNormal::editWidget( TQWidget* tqparent ) const { - return new PMNormalEdit( parent ); + return new PMNormalEdit( tqparent ); } void PMNormal::enableBumpSize( bool c ) diff --git a/kpovmodeler/pmnormal.h b/kpovmodeler/pmnormal.h index c798d039..2294b1fc 100644 --- a/kpovmodeler/pmnormal.h +++ b/kpovmodeler/pmnormal.h @@ -52,7 +52,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMNormalEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmnormal" ); } diff --git a/kpovmodeler/pmnormaledit.cpp b/kpovmodeler/pmnormaledit.cpp index 68d6f1f3..5d5c6eee 100644 --- a/kpovmodeler/pmnormaledit.cpp +++ b/kpovmodeler/pmnormaledit.cpp @@ -27,8 +27,8 @@ #include <klocale.h> -PMNormalEdit::PMNormalEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMNormalEdit::PMNormalEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmnormaledit.h b/kpovmodeler/pmnormaledit.h index 72ca9d12..f3fa45b7 100644 --- a/kpovmodeler/pmnormaledit.h +++ b/kpovmodeler/pmnormaledit.h @@ -36,12 +36,13 @@ class PMFloatEdit; class PMNormalEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMNormalEdit with parent and name + * Creates a PMNormalEdit with tqparent and name */ - PMNormalEdit( TQWidget* parent, const char* name = 0 ); + PMNormalEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmobject.cpp b/kpovmodeler/pmobject.cpp index 94907482..71424eaf 100644 --- a/kpovmodeler/pmobject.cpp +++ b/kpovmodeler/pmobject.cpp @@ -57,7 +57,7 @@ PMObject::~PMObject( ) { } -PMMetaObject* PMObject::metaObject( ) const +PMMetaObject* PMObject::tqmetaObject( ) const { if( !s_pMetaObject ) { @@ -72,7 +72,7 @@ PMMetaObject* PMObject::metaObject( ) const PMObject* PMObject::newObject( ) const { - return metaObject( )->newObject( m_pPart ); + return tqmetaObject( )->newObject( m_pPart ); } bool PMObject::insertChildAfter( PMObject*, PMObject* ) @@ -142,9 +142,9 @@ bool PMObject::takeChild( uint ) return false; } -PMDialogEditBase* PMObject::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMObject::editWidget( TQWidget* tqparent ) const { - return new PMDialogEditBase( parent ); + return new PMDialogEditBase( tqparent ); // return 0; } @@ -177,7 +177,7 @@ PMMatrix PMObject::transformedWith( ) const else if( o->nextSibling( ) ) o = o->nextSibling( ); else - o = o->parent( ); + o = o->tqparent( ); while( o ) { @@ -187,7 +187,7 @@ PMMatrix PMObject::transformedWith( ) const if( o->nextSibling( ) ) o = o->nextSibling( ); else - o = o->parent( ); + o = o->tqparent( ); } return result; @@ -215,7 +215,7 @@ void PMObject::cleanUp( ) const bool PMObject::setProperty( const TQString& name, const PMVariant& v ) { - PMPropertyBase* p = metaObject( )->property( name ); + PMPropertyBase* p = tqmetaObject( )->property( name ); if( !p ) return false; return p->setProperty( this, v ); @@ -224,7 +224,7 @@ bool PMObject::setProperty( const TQString& name, const PMVariant& v ) TQStringList PMObject::properties( ) const { TQStringList lst; - PMPropertyIterator it = metaObject( )->properties( ); + PMPropertyIterator it = tqmetaObject( )->properties( ); for( ; it.current( ); ++it ) lst.append( it.current( )->name( ) ); @@ -234,7 +234,7 @@ TQStringList PMObject::properties( ) const PMVariant PMObject::property( const TQString& name ) const { - PMPropertyBase* p = metaObject( )->property( name ); + PMPropertyBase* p = tqmetaObject( )->property( name ); if( !p ) return PMVariant( ); return p->getProperty( this ); @@ -244,12 +244,12 @@ bool PMObject::isA( const TQString& className ) const { if( !m_pPart ) return false; - return m_pPart->prototypeManager( )->isA( metaObject( ), className ); + return m_pPart->prototypeManager( )->isA( tqmetaObject( ), className ); } TQString PMObject::type( ) const { - return metaObject( )->className( ); + return tqmetaObject( )->className( ); } bool PMObject::canInsert( const TQString& className, const PMObject* after, diff --git a/kpovmodeler/pmobject.h b/kpovmodeler/pmobject.h index fcf67466..1275f3d9 100644 --- a/kpovmodeler/pmobject.h +++ b/kpovmodeler/pmobject.h @@ -54,22 +54,22 @@ typedef TQPtrListIterator<PMObject> PMObjectListIterator; * Used pattern: Composite * * All list/child functionality is disabled in this class. Objects that - * can have children has to be inherited from @ref PMCompositeObject. + * can have tqchildren has to be inherited from @ref PMCompositeObject. */ class PMObject { friend class PMCompositeObject; public: /** - * Creates an empty PMObject without parent. + * Creates an empty PMObject without tqparent. */ PMObject( PMPart* part ); /** - * Copy constructor. All object pointers (parent, siblings) are set to 0! + * Copy constructor. All object pointers (tqparent, siblings) are set to 0! */ PMObject( const PMObject& o ); /** - * Deletes the object and all children. + * Deletes the object and all tqchildren. */ virtual ~PMObject( ); @@ -85,7 +85,7 @@ public: /** * Returns the meta object for the class */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** * Returns true if the object is of type t or inherits the object @@ -110,7 +110,7 @@ public: * Returns the name of the object. This is the name that helps * the user to identify a object (like "south wall", "floor" ...) */ - virtual TQString name( ) const { return TQString::null; } + virtual TQString name( ) const { return TQString(); } /** * Returns true if the object can have a name */ @@ -121,9 +121,9 @@ public: virtual bool exportPovray( ) const { return true; } /** - * Returns a pointer to the parent object. + * Returns a pointer to the tqparent object. */ - PMObject* parent( ) const { return m_pParent; } + PMObject* tqparent( ) const { return m_pParent; } /** * Returns a pointer to the corresponding part */ @@ -157,7 +157,7 @@ public: int canInsert( const TQStringList& classes, const PMObject* after ) const; /** - * Returns true if an insert or remove operation of children will + * Returns true if an insert or remove operation of tqchildren will * change data inside this class */ virtual bool dataChangeOnInsertRemove( ) const { return false; } @@ -174,7 +174,7 @@ public: * Returns a pointer to the child object at position index, * or null if the index is out of range. */ - virtual PMObject* childAt( uint ) const { return 0; } + virtual PMObject* tqchildAt( uint ) const { return 0; } /** * Returns the next sibling of that item */ @@ -219,7 +219,7 @@ public: return false; } /** - * Returns the number of children. 0 in this class + * Returns the number of tqchildren. 0 in this class */ virtual int countChildren( ) const { return 0; } /** @@ -235,12 +235,12 @@ public: /** * Called when a child was removed. For classes that have to be informed - * when children are removed + * when tqchildren are removed */ virtual void childRemoved( PMObject* ) { }; /** * Called when a child was added. For classes that have to be informed - * when children are added + * when tqchildren are added */ virtual void childAdded( PMObject* ) { }; @@ -302,7 +302,7 @@ public: * not only this object. * * If you leave the list empty, only this object was changed. - * If you add children or other objects to the list, add this object + * If you add tqchildren or other objects to the list, add this object * to the list, too, if it was changed! * * IMPORTANT: When you change additional objects, make sure that @@ -356,7 +356,7 @@ public: */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const = 0; /** - * Reads the attributes from the QDomElement + * Reads the attributes from the TQDomElement */ virtual void readAttributes( const PMXMLHelper& h ); @@ -385,7 +385,7 @@ public: void setSelected( bool s ); /** * Returns true if this item can be selected. An item cannot be selected - * if a parent object is selected + * if a tqparent object is selected */ bool isSelectable( ); /** @@ -402,7 +402,7 @@ public: */ bool isReadOnly( ) const; /** - * Makes this object read only, if yes == true. All children will + * Makes this object read only, if yes == true. All tqchildren will * be read only, too */ void setReadOnly( bool yes = true ) { m_readOnly = yes; } @@ -411,9 +411,9 @@ public: * Creates a new edit widget that can display this object and * returns a pointer to it. * - * The widget will be created as a child of parent. + * The widget will be created as a child of tqparent. */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view @@ -470,7 +470,7 @@ public: protected: /** * Adds num to the number of selected objects in this object and all - * parent objects. num can be negative. + * tqparent objects. num can be negative. */ virtual void adjustSelectedChildren( int /*num*/ ) { }; /** @@ -479,7 +479,7 @@ protected: PMMemento* m_pMemento; private: /** - * Pointer to the parent object. 0 if the object has no parent. + * Pointer to the tqparent object. 0 if the object has no tqparent. */ PMObject* m_pParent; /** @@ -495,7 +495,7 @@ private: */ bool m_selected; /** - * true if this object is read only. All children will be read only, too + * true if this object is read only. All tqchildren will be read only, too */ bool m_readOnly; /** diff --git a/kpovmodeler/pmobjectdrag.cpp b/kpovmodeler/pmobjectdrag.cpp index cd1ee6da..879bbc1c 100644 --- a/kpovmodeler/pmobjectdrag.cpp +++ b/kpovmodeler/pmobjectdrag.cpp @@ -73,7 +73,7 @@ PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, TQWidget* dragSource TQBuffer buffer( data ); buffer.open( IO_WriteOnly ); - PMSerializer* ser = it.current( )->newSerializer( &buffer ); + PMSerializer* ser = it.current( )->newSerializer( TQT_TQIODEVICE(&buffer) ); if( ser ) { @@ -143,7 +143,7 @@ PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, TQWidget* TQBuffer buffer( data ); buffer.open( IO_WriteOnly ); - PMSerializer* ser = fit.current( )->newSerializer( &buffer ); + PMSerializer* ser = fit.current( )->newSerializer( TQT_TQIODEVICE(&buffer) ); if( ser ) { @@ -170,7 +170,7 @@ PMObjectDrag::~PMObjectDrag( ) { } -TQByteArray PMObjectDrag::encodedData( const char* format ) const +TQByteArray PMObjectDrag::tqencodedData( const char* format ) const { TQValueList<TQByteArray>::ConstIterator dit; TQStringList::ConstIterator sit; @@ -211,7 +211,7 @@ bool PMObjectDrag::canDecode( const TQMimeSource* e, PMPart* part ) PMParser* PMObjectDrag::newParser( const TQMimeSource* e, PMPart* part ) { if( e->provides( c_kpmDocumentMimeFormat ) ) - return new PMXMLParser( part, e->encodedData( c_kpmDocumentMimeFormat ) ); + return new PMXMLParser( part, e->tqencodedData( c_kpmDocumentMimeFormat ) ); const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); TQPtrListIterator<PMIOFormat> fit( formats ); @@ -221,7 +221,7 @@ PMParser* PMObjectDrag::newParser( const TQMimeSource* e, PMPart* part ) TQString str = f->mimeType( ); const char* lat = str.latin1( ); if( f->services( ) & PMIOFormat::Import && e->provides( lat ) ) - return f->newParser( part, e->encodedData( lat ) ); + return f->newParser( part, e->tqencodedData( lat ) ); } return 0; diff --git a/kpovmodeler/pmobjectdrag.h b/kpovmodeler/pmobjectdrag.h index 757eae8d..a02b4401 100644 --- a/kpovmodeler/pmobjectdrag.h +++ b/kpovmodeler/pmobjectdrag.h @@ -31,7 +31,7 @@ class PMPart; * Supports drag/drop and copy/paste of kpovmodeler objects */ -class PMObjectDrag : public QDragObject +class PMObjectDrag : public TQDragObject { public: /** @@ -56,7 +56,7 @@ public: * Returns the encoded payload of this object, in the * specified MIME format. */ - virtual TQByteArray encodedData( const char* ) const; + virtual TQByteArray tqencodedData( const char* ) const; /** * Returns the ith format, or NULL. */ diff --git a/kpovmodeler/pmobjectlibrarysettings.cpp b/kpovmodeler/pmobjectlibrarysettings.cpp index 47a38435..d57e5949 100644 --- a/kpovmodeler/pmobjectlibrarysettings.cpp +++ b/kpovmodeler/pmobjectlibrarysettings.cpp @@ -33,19 +33,19 @@ #include <kmessagebox.h> #include <kstandarddirs.h> -PMObjectLibrarySettings::PMObjectLibrarySettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMObjectLibrarySettings::PMObjectLibrarySettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + TQVBoxLayout* vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); TQGroupBox* gb = new TQGroupBox( i18n( "Libraries" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); - TQHBoxLayout* hlayout = new TQHBoxLayout( gb, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) ); + TQHBoxLayout* htqlayout = new TQHBoxLayout( gb, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) ); m_pObjectLibraries = new TQListBox( gb ); connect( m_pObjectLibraries, TQT_SIGNAL( selectionChanged( ) ), TQT_SLOT( slotObjectLibraryChanged( ) ) ); - hlayout->addWidget( m_pObjectLibraries ); - TQVBoxLayout* gvl = new TQVBoxLayout( hlayout ); + htqlayout->addWidget( m_pObjectLibraries ); + TQVBoxLayout* gvl = new TQVBoxLayout( htqlayout ); m_pCreateObjectLibrary = new TQPushButton( i18n( "Create..." ), gb ); connect( m_pCreateObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCreateObjectLibrary( ) ) ); gvl->addWidget( m_pCreateObjectLibrary ); @@ -77,9 +77,9 @@ PMObjectLibrarySettings::PMObjectLibrarySettings( TQWidget* parent, const char* grid->addWidget( m_pLibraryDescription, 2, 1 ); grid->addMultiCellWidget( m_pReadOnlyText, 3, 3, 0, 1 ); grid->setColStretch( 1, 1 ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMObjectLibrarySettings::displaySettings( ) diff --git a/kpovmodeler/pmobjectlibrarysettings.h b/kpovmodeler/pmobjectlibrarysettings.h index f4e7f854..dd9d30ce 100644 --- a/kpovmodeler/pmobjectlibrarysettings.h +++ b/kpovmodeler/pmobjectlibrarysettings.h @@ -35,11 +35,12 @@ class TQListBox; class PMObjectLibrarySettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMObjectLibrarySettings( TQWidget* parent, const char* name = 0 ); + PMObjectLibrarySettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmobjectlink.cpp b/kpovmodeler/pmobjectlink.cpp index 559d3fe4..b6add85b 100644 --- a/kpovmodeler/pmobjectlink.cpp +++ b/kpovmodeler/pmobjectlink.cpp @@ -58,11 +58,11 @@ TQString PMObjectLink::description( ) const return i18n( "object link" ); } -PMMetaObject* PMObjectLink::metaObject( ) const +PMMetaObject* PMObjectLink::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ObjectLink", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "ObjectLink", Base::tqmetaObject( ), createNewObjectLink ); s_pMetaObject->addProperty( new PMObjectLinkProperty( "linkedObject", &PMObjectLink::setLinkedObjectProperty, @@ -161,15 +161,15 @@ void PMObjectLink::readAttributes( const PMXMLHelper& h ) } else h.parser( )->printError( i18n( "Declare \"%1\" has wrong type." ) - .arg( id ) ); + .tqarg( id ) ); } } Base::readAttributes( h ); } -PMDialogEditBase* PMObjectLink::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMObjectLink::editWidget( TQWidget* tqparent ) const { - return new PMObjectLinkEdit( parent ); + return new PMObjectLinkEdit( tqparent ); } void PMObjectLink::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmobjectlink.h b/kpovmodeler/pmobjectlink.h index 8ec7b474..dce54498 100644 --- a/kpovmodeler/pmobjectlink.h +++ b/kpovmodeler/pmobjectlink.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -80,7 +80,7 @@ public: /** * Returns a new @ref PMObjectLinkEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmobjectlink" ); } diff --git a/kpovmodeler/pmobjectlinkedit.cpp b/kpovmodeler/pmobjectlinkedit.cpp index 98aead0c..c2ddf61b 100644 --- a/kpovmodeler/pmobjectlinkedit.cpp +++ b/kpovmodeler/pmobjectlinkedit.cpp @@ -24,8 +24,8 @@ #include <tqlayout.h> -PMObjectLinkEdit::PMObjectLinkEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMObjectLinkEdit::PMObjectLinkEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmobjectlinkedit.h b/kpovmodeler/pmobjectlinkedit.h index fd1ce86b..82ed645d 100644 --- a/kpovmodeler/pmobjectlinkedit.h +++ b/kpovmodeler/pmobjectlinkedit.h @@ -35,12 +35,13 @@ class PMLinkEdit; class PMObjectLinkEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMObjectLinkEdit with parent and name + * Creates a PMObjectLinkEdit with tqparent and name */ - PMObjectLinkEdit( TQWidget* parent, const char* name = 0 ); + PMObjectLinkEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmobjectselect.cpp b/kpovmodeler/pmobjectselect.cpp index fcfbb3f5..5469c487 100644 --- a/kpovmodeler/pmobjectselect.cpp +++ b/kpovmodeler/pmobjectselect.cpp @@ -84,8 +84,8 @@ PMListBoxObject::~PMListBoxObject( ) TQSize PMObjectSelect::s_size = TQSize( 200, 300 ); -PMObjectSelect::PMObjectSelect( TQWidget* parent, const char* name, bool modal ) - : KDialogBase( parent, name, modal, i18n( "Choose Object" ), Ok | Cancel ) +PMObjectSelect::PMObjectSelect( TQWidget* tqparent, const char* name, bool modal ) + : KDialogBase( tqparent, name, modal, i18n( "Choose Object" ), Ok | Cancel ) { m_pSelectedObject = 0; m_pListBox = new TQListBox( this ); @@ -110,7 +110,7 @@ void PMObjectSelect::addObject( PMObject* obj ) } int PMObjectSelect::selectObject( PMObject* link, const TQString& t, - PMObject* & obj, TQWidget* parent ) + PMObject* & obj, TQWidget* tqparent ) { PMObject* last = link; PMObject* scene; @@ -119,7 +119,7 @@ int PMObjectSelect::selectObject( PMObject* link, const TQString& t, do { - scene = last->parent( ); + scene = last->tqparent( ); if( scene ) { if( scene->type( ) == "Scene" ) @@ -129,7 +129,7 @@ int PMObjectSelect::selectObject( PMObject* link, const TQString& t, found = true; } else - last = last->parent( ); + last = last->tqparent( ); } else stop = true; @@ -138,7 +138,7 @@ int PMObjectSelect::selectObject( PMObject* link, const TQString& t, if( found ) { - PMObjectSelect s( parent ); + PMObjectSelect s( tqparent ); PMObject* o = scene->firstChild( ); bool l = false; @@ -167,7 +167,7 @@ int PMObjectSelect::selectObject( PMObject* link, const TQString& t, int PMObjectSelect::selectObject( PMObject* link, const TQStringList& t, - PMObject* & obj, TQWidget* parent ) + PMObject* & obj, TQWidget* tqparent ) { PMObject* last = link; PMObject* scene; @@ -176,7 +176,7 @@ int PMObjectSelect::selectObject( PMObject* link, do { - scene = last->parent( ); + scene = last->tqparent( ); if( scene ) { if( scene->type( ) == "Scene" ) @@ -186,7 +186,7 @@ int PMObjectSelect::selectObject( PMObject* link, found = true; } else - last = last->parent( ); + last = last->tqparent( ); } else stop = true; @@ -195,14 +195,14 @@ int PMObjectSelect::selectObject( PMObject* link, if( found ) { - PMObjectSelect s( parent ); + PMObjectSelect s( tqparent ); PMObject* o = scene->firstChild( ); bool l = false; while( o && !l && last ) { - if( t.findIndex( o->type( ) ) >= 0 ) + if( t.tqfindIndex( o->type( ) ) >= 0 ) s.m_pListBox->insertItem( new PMListBoxObject( o ) ); if( o == last ) @@ -223,7 +223,7 @@ int PMObjectSelect::selectObject( PMObject* link, } int PMObjectSelect::selectDeclare( PMObject* link, const TQString& declareType, - PMObject* & obj, TQWidget* parent ) + PMObject* & obj, TQWidget* tqparent ) { PMObject* last = link; PMObject* scene; @@ -232,7 +232,7 @@ int PMObjectSelect::selectDeclare( PMObject* link, const TQString& declareType, do { - scene = last->parent( ); + scene = last->tqparent( ); if( scene ) { if( scene->type( ) == "Scene" ) @@ -242,7 +242,7 @@ int PMObjectSelect::selectDeclare( PMObject* link, const TQString& declareType, found = true; } else - last = last->parent( ); + last = last->tqparent( ); } else stop = true; @@ -251,7 +251,7 @@ int PMObjectSelect::selectDeclare( PMObject* link, const TQString& declareType, if( found ) { - PMObjectSelect s( parent ); + PMObjectSelect s( tqparent ); PMObject* o = scene->firstChild( ); PMDeclare* decl; @@ -285,7 +285,7 @@ int PMObjectSelect::selectDeclare( PMObject* link, const TQString& declareType, } int PMObjectSelect::selectDeclare( PMObject* link, const TQStringList& declareTypes, - PMObject* & obj, TQWidget* parent ) + PMObject* & obj, TQWidget* tqparent ) { PMObject* last = link; PMObject* scene; @@ -294,7 +294,7 @@ int PMObjectSelect::selectDeclare( PMObject* link, const TQStringList& declareTy do { - scene = last->parent( ); + scene = last->tqparent( ); if( scene ) { if( scene->type( ) == "Scene" ) @@ -304,7 +304,7 @@ int PMObjectSelect::selectDeclare( PMObject* link, const TQStringList& declareTy found = true; } else - last = last->parent( ); + last = last->tqparent( ); } else stop = true; @@ -313,7 +313,7 @@ int PMObjectSelect::selectDeclare( PMObject* link, const TQStringList& declareTy if( found ) { - PMObjectSelect s( parent ); + PMObjectSelect s( tqparent ); PMObject* o = scene->firstChild( ); PMDeclare* decl; @@ -325,7 +325,7 @@ int PMObjectSelect::selectDeclare( PMObject* link, const TQStringList& declareTy if( o->type( ) == "Declare" ) { decl = ( PMDeclare* ) o; - if( declareTypes.findIndex( decl->declareType( ) ) >= 0 ) + if( declareTypes.tqfindIndex( decl->declareType( ) ) >= 0 ) s.m_pListBox->insertItem( new PMListBoxObject( o ) ); } diff --git a/kpovmodeler/pmobjectselect.h b/kpovmodeler/pmobjectselect.h index 46d39d21..c8604eb4 100644 --- a/kpovmodeler/pmobjectselect.h +++ b/kpovmodeler/pmobjectselect.h @@ -34,7 +34,7 @@ /** * TQListBoxItem for @ref PMObject */ -class PMListBoxObject : public QListBoxPixmap +class PMListBoxObject : public TQListBoxPixmap { public: /** @@ -84,11 +84,12 @@ private: class PMObjectSelect : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** - * Creates a selection widget with parent and name + * Creates a selection widget with tqparent and name */ - PMObjectSelect( TQWidget* parent = 0, const char* name = 0, + PMObjectSelect( TQWidget* tqparent = 0, const char* name = 0, bool modal = true ); /** * Deletes the dialog @@ -112,13 +113,13 @@ public: * Only objects above the object link are listed. */ static int selectObject( PMObject* link, const TQString& t, PMObject* & obj, - TQWidget* parent = 0 ); + TQWidget* tqparent = 0 ); static int selectObject( PMObject* link, const TQStringList& t, - PMObject* & obj, TQWidget* parent = 0 ); + PMObject* & obj, TQWidget* tqparent = 0 ); static int selectDeclare( PMObject* link, const TQString& declareType, - PMObject* & obj, TQWidget* parent = 0 ); + PMObject* & obj, TQWidget* tqparent = 0 ); static int selectDeclare( PMObject* link, const TQStringList& dt, - PMObject* & obj, TQWidget* parent = 0 ); + PMObject* & obj, TQWidget* tqparent = 0 ); protected slots: void slotHighlighted( TQListBoxItem* lbi ); diff --git a/kpovmodeler/pmobjectsettings.cpp b/kpovmodeler/pmobjectsettings.cpp index 411b0a49..50cc1356 100644 --- a/kpovmodeler/pmobjectsettings.cpp +++ b/kpovmodeler/pmobjectsettings.cpp @@ -44,191 +44,191 @@ #include <klocale.h> -PMObjectSettings::PMObjectSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMObjectSettings::PMObjectSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQVBoxLayout* gvl; TQGridLayout* grid; TQGroupBox* gb; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); gb = new TQGroupBox( i18n( "Subdivisions" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); grid = new TQGridLayout( gvl, 13, 3 ); grid->addWidget( new TQLabel( i18n( "Sphere:" ), gb ), 0, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 0, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 0, 2 ); grid->addWidget( new TQLabel( "u", gb ), 0, 1 ); m_pSphereUSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pSphereUSteps ); + htqlayout->addWidget( m_pSphereUSteps ); m_pSphereUSteps->setValidation( true, 2, true, 32 ); - hlayout->addWidget( new TQLabel( "v", gb ) ); + htqlayout->addWidget( new TQLabel( "v", gb ) ); m_pSphereVSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pSphereVSteps ); + htqlayout->addWidget( m_pSphereVSteps ); m_pSphereVSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Cylinder:" ), gb ), 1, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 1, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 1, 2 ); m_pCylinderSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pCylinderSteps ); + htqlayout->addWidget( m_pCylinderSteps ); m_pCylinderSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Cone:" ), gb ), 2, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 2, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 2, 2 ); m_pConeSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pConeSteps ); + htqlayout->addWidget( m_pConeSteps ); m_pConeSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Torus:" ), gb ), 3, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 3, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 3, 2 ); grid->addWidget( new TQLabel( "u", gb ), 3, 1 ); m_pTorusUSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pTorusUSteps ); + htqlayout->addWidget( m_pTorusUSteps ); m_pTorusUSteps->setValidation( true, 2, true, 16 ); - hlayout->addWidget( new TQLabel( "v", gb ) ); + htqlayout->addWidget( new TQLabel( "v", gb ) ); m_pTorusVSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pTorusVSteps ); + htqlayout->addWidget( m_pTorusVSteps ); m_pTorusVSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Disc:" ), gb ), 4, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 4, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 4, 2 ); m_pDiscSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pDiscSteps ); + htqlayout->addWidget( m_pDiscSteps ); m_pDiscSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Blob sphere:" ), gb ), 5, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 5, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 5, 2 ); grid->addWidget( new TQLabel( "u", gb ), 5, 1 ); m_pBlobSphereUSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pBlobSphereUSteps ); + htqlayout->addWidget( m_pBlobSphereUSteps ); m_pBlobSphereUSteps->setValidation( true, 2, true, 32 ); - hlayout->addWidget( new TQLabel( "v", gb ) ); + htqlayout->addWidget( new TQLabel( "v", gb ) ); m_pBlobSphereVSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pBlobSphereVSteps ); + htqlayout->addWidget( m_pBlobSphereVSteps ); m_pBlobSphereVSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Blob cylinder:" ), gb ), 6, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 6, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 6, 2 ); grid->addWidget( new TQLabel( "u", gb ), 6, 1 ); m_pBlobCylinderUSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pBlobCylinderUSteps ); + htqlayout->addWidget( m_pBlobCylinderUSteps ); m_pBlobCylinderUSteps->setValidation( true, 2, true, 32 ); - hlayout->addWidget( new TQLabel( "v", gb ) ); + htqlayout->addWidget( new TQLabel( "v", gb ) ); m_pBlobCylinderVSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pBlobCylinderVSteps ); + htqlayout->addWidget( m_pBlobCylinderVSteps ); m_pBlobCylinderVSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Lathe:" ), gb ), 7, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 7, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 7, 2 ); grid->addWidget( new TQLabel( "u", gb ), 7, 1 ); m_pLatheUSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pLatheUSteps ); + htqlayout->addWidget( m_pLatheUSteps ); m_pLatheUSteps->setValidation( true, 1, true, 16 ); - hlayout->addWidget( new TQLabel( "v", gb ) ); + htqlayout->addWidget( new TQLabel( "v", gb ) ); m_pLatheRSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pLatheRSteps ); + htqlayout->addWidget( m_pLatheRSteps ); m_pLatheRSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Surface of revolution:" ), gb ), 8, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 8, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 8, 2 ); grid->addWidget( new TQLabel( "u", gb ), 8, 1 ); m_pSorUSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pSorUSteps ); + htqlayout->addWidget( m_pSorUSteps ); m_pSorUSteps->setValidation( true, 1, true, 16 ); - hlayout->addWidget( new TQLabel( "v", gb ) ); + htqlayout->addWidget( new TQLabel( "v", gb ) ); m_pSorRSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pSorRSteps ); + htqlayout->addWidget( m_pSorRSteps ); m_pSorRSteps->setValidation( true, 4, true, 64 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Prism:" ), gb ), 9, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 9, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 9, 2 ); m_pPrismSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pPrismSteps ); + htqlayout->addWidget( m_pPrismSteps ); m_pPrismSteps->setValidation( true, 1, true, 16 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Superquadric ellipsoid:" ), gb ), 10, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 10, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 10, 2 ); grid->addWidget( new TQLabel( "u", gb ), 10, 1 ); m_pSqeUSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pSqeUSteps ); + htqlayout->addWidget( m_pSqeUSteps ); m_pSqeUSteps->setValidation( true, 2, true, 8 ); - hlayout->addWidget( new TQLabel( "v", gb ) ); + htqlayout->addWidget( new TQLabel( "v", gb ) ); m_pSqeVSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pSqeVSteps ); + htqlayout->addWidget( m_pSqeVSteps ); m_pSqeVSteps->setValidation( true, 2, true, 8 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Sphere sweep:" ), gb ), 11, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 11, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 11, 2 ); grid->addWidget( new TQLabel( "r", gb ), 11, 1 ); m_pSphereSweepRSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pSphereSweepRSteps ); + htqlayout->addWidget( m_pSphereSweepRSteps ); m_pSphereSweepRSteps->setValidation( true, 4, true, 64 ); - hlayout->addWidget( new TQLabel( "s", gb ) ); + htqlayout->addWidget( new TQLabel( "s", gb ) ); m_pSphereSweepSSteps = new PMIntEdit( gb ); - hlayout->addWidget( m_pSphereSweepSSteps ); + htqlayout->addWidget( m_pSphereSweepSSteps ); m_pSphereSweepSSteps->setValidation( true, 1, true, 16 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); grid->addWidget( new TQLabel( i18n( "Heightfield:" ), gb ), 12, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 12, 2 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 12, 2 ); m_pHeightFieldVariance = new PMIntEdit( gb ); - hlayout->addWidget( m_pHeightFieldVariance ); + htqlayout->addWidget( m_pHeightFieldVariance ); m_pHeightFieldVariance->setValidation( true, 1, true, 16 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); gb = new TQGroupBox( i18n( "Sizes" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); grid = new TQGridLayout( gvl, 1, 2 ); grid->addWidget( new TQLabel( i18n( "Plane:" ), gb ), 0, 0 ); - hlayout = new TQHBoxLayout( ); - grid->addLayout( hlayout, 0, 1 ); + htqlayout = new TQHBoxLayout( ); + grid->addLayout( htqlayout, 0, 1 ); m_pPlaneSize = new PMFloatEdit( gb ); - hlayout->addWidget( m_pPlaneSize ); + htqlayout->addWidget( m_pPlaneSize ); m_pPlaneSize->setValidation( true, 0.1, false, 0.0 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); gb = new TQGroupBox( i18n( "Camera Views" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); m_pHighDetailCameraViews = new TQCheckBox( i18n( "High detail for enhanced projections" ), gb ); gvl->addWidget( m_pHighDetailCameraViews ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMObjectSettings::displaySettings( ) @@ -425,126 +425,126 @@ bool PMObjectSettings::validateData( ) void PMObjectSettings::applySettings( ) { - bool repaint = false; + bool tqrepaint = false; PMRenderManager* rm = PMRenderManager::theManager( ); if( rm->highDetailCameraViews( ) != m_pHighDetailCameraViews->isChecked( ) ) { rm->setHighDetailCameraViews( m_pHighDetailCameraViews->isChecked( ) ); - repaint = true; + tqrepaint = true; } if( PMSphere::uSteps( ) != m_pSphereUSteps->value( ) ) { PMSphere::setUSteps( m_pSphereUSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMSphere::vSteps( ) != m_pSphereVSteps->value( ) ) { PMSphere::setVSteps( m_pSphereVSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMCylinder::steps( ) != m_pCylinderSteps->value( ) ) { PMCylinder::setSteps( m_pCylinderSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMCone::steps( ) != m_pConeSteps->value( ) ) { PMCone::setSteps( m_pConeSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMTorus::uSteps( ) != m_pTorusUSteps->value( ) ) { PMTorus::setUSteps( m_pTorusUSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMTorus::vSteps( ) != m_pTorusVSteps->value( ) ) { PMTorus::setVSteps( m_pTorusVSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMDisc::steps( ) != m_pDiscSteps->value( ) ) { PMDisc::setSteps( m_pDiscSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMBlobSphere::uSteps( ) != m_pBlobSphereUSteps->value( ) ) { PMBlobSphere::setUSteps( m_pBlobSphereUSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMBlobSphere::vSteps( ) != m_pBlobSphereVSteps->value( ) ) { PMBlobSphere::setVSteps( m_pBlobSphereVSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMBlobCylinder::uSteps( ) != m_pBlobCylinderUSteps->value( ) ) { PMBlobCylinder::setUSteps( m_pBlobCylinderUSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMBlobCylinder::vSteps( ) != m_pBlobCylinderVSteps->value( ) ) { PMBlobCylinder::setVSteps( m_pBlobCylinderVSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMPlane::planeSize( ) != m_pPlaneSize->value( ) ) { PMPlane::setPlaneSize( m_pPlaneSize->value( ) ); - repaint = true; + tqrepaint = true; } if( PMLathe::sSteps( ) != m_pLatheUSteps->value( ) ) { PMLathe::setSSteps( m_pLatheUSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMLathe::rSteps( ) != m_pLatheRSteps->value( ) ) { PMLathe::setRSteps( m_pLatheRSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMSurfaceOfRevolution::sSteps( ) != m_pSorUSteps->value( ) ) { PMSurfaceOfRevolution::setSSteps( m_pSorUSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMSurfaceOfRevolution::rSteps( ) != m_pSorRSteps->value( ) ) { PMSurfaceOfRevolution::setRSteps( m_pSorRSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMPrism::sSteps( ) != m_pPrismSteps->value( ) ) { PMPrism::setSSteps( m_pPrismSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMSuperquadricEllipsoid::uSteps( ) != m_pSqeUSteps->value( ) ) { PMSuperquadricEllipsoid::setUSteps( m_pSqeUSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMSuperquadricEllipsoid::vSteps( ) != m_pSqeVSteps->value( ) ) { PMSuperquadricEllipsoid::setVSteps( m_pSqeVSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMSphereSweep::rSteps( ) != m_pSphereSweepRSteps->value( ) ) { PMSphereSweep::setRSteps( m_pSphereSweepRSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMSphereSweep::sSteps( ) != m_pSphereSweepSSteps->value( ) ) { PMSphereSweep::setSSteps( m_pSphereSweepSSteps->value( ) ); - repaint = true; + tqrepaint = true; } if( PMHeightField::variance( ) != m_pHeightFieldVariance->value( ) ) { PMHeightField::setVariance( m_pHeightFieldVariance->value( ) ); - repaint = true; + tqrepaint = true; } - if( repaint ) - emit repaintViews( ); + if( tqrepaint ) + emit tqrepaintViews( ); } #include "pmobjectsettings.moc" diff --git a/kpovmodeler/pmobjectsettings.h b/kpovmodeler/pmobjectsettings.h index 426ee47d..216b2c2f 100644 --- a/kpovmodeler/pmobjectsettings.h +++ b/kpovmodeler/pmobjectsettings.h @@ -34,11 +34,12 @@ class TQCheckBox; class PMObjectSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMObjectSettings( TQWidget* parent, const char* name = 0 ); + PMObjectSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmopenglsettings.cpp b/kpovmodeler/pmopenglsettings.cpp index 9c125c32..0b76abdc 100644 --- a/kpovmodeler/pmopenglsettings.cpp +++ b/kpovmodeler/pmopenglsettings.cpp @@ -25,15 +25,15 @@ #include <tqlabel.h> #include <klocale.h> -PMOpenGLSettings::PMOpenGLSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMOpenGLSettings::PMOpenGLSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + TQVBoxLayout* vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); m_pDirect = new TQCheckBox( i18n( "Direct rendering" ), this ); - vlayout->addWidget( new TQLabel( i18n( "Changes take only effect after a restart!" ), this ) ); - vlayout->addWidget( m_pDirect ); - vlayout->addStretch( 1 ); + vtqlayout->addWidget( new TQLabel( i18n( "Changes take only effect after a restart!" ), this ) ); + vtqlayout->addWidget( m_pDirect ); + vtqlayout->addStretch( 1 ); } void PMOpenGLSettings::displaySettings( ) diff --git a/kpovmodeler/pmopenglsettings.h b/kpovmodeler/pmopenglsettings.h index 424265f7..265cc056 100644 --- a/kpovmodeler/pmopenglsettings.h +++ b/kpovmodeler/pmopenglsettings.h @@ -32,11 +32,12 @@ class TQCheckBox; class PMOpenGLSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMOpenGLSettings( TQWidget* parent, const char* name = 0 ); + PMOpenGLSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmoutputdevice.cpp b/kpovmodeler/pmoutputdevice.cpp index abad0e36..1ee91b52 100644 --- a/kpovmodeler/pmoutputdevice.cpp +++ b/kpovmodeler/pmoutputdevice.cpp @@ -55,22 +55,22 @@ void PMOutputDevice::callSerialization( const PMObject* o, const PMMetaObject* m info->call( o, mo, this ); else { - if( mo == o->metaObject( ) ) + if( mo == o->tqmetaObject( ) ) { printError( i18n( "The object \"%1\" doesn't support %2." ) - .arg( o->description( ) ).arg( description( ) ) ); + .tqarg( o->description( ) ).tqarg( description( ) ) ); } else { printError( i18n( "The class \"%1\" doesn't support %2." ) - .arg( o->description( ) ).arg( mo->className( ) ) ); + .tqarg( o->description( ) ).tqarg( mo->className( ) ) ); } } } void PMOutputDevice::serialize( PMObject* o ) { - callSerialization( o, o->metaObject( ) ); + callSerialization( o, o->tqmetaObject( ) ); } void PMOutputDevice::close( ) diff --git a/kpovmodeler/pmpalettevalueedit.cpp b/kpovmodeler/pmpalettevalueedit.cpp index ca029887..b81caa78 100644 --- a/kpovmodeler/pmpalettevalueedit.cpp +++ b/kpovmodeler/pmpalettevalueedit.cpp @@ -35,25 +35,25 @@ #include <kdialog.h> #include <kfiledialog.h> -PMPaletteValueEdit::PMPaletteValueEdit( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMPaletteValueEdit::PMPaletteValueEdit( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { TQLabel* lbl; - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pIndexEdit = new PMIntEdit( this ); m_pValueEdit = new PMFloatEdit( this ); - layout = new TQHBoxLayout( this ); + tqlayout = new TQHBoxLayout( this ); lbl = new TQLabel( i18n( "Index" ), this ); - layout->addWidget( lbl ); - layout->addSpacing( KDialog::spacingHint( ) ); - layout->addWidget( m_pIndexEdit ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( lbl ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( m_pIndexEdit ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); lbl = new TQLabel( i18n( "Value" ), this ); - layout->addWidget( lbl ); - layout->addSpacing( KDialog::spacingHint( ) ); - layout->addWidget( m_pValueEdit ); + tqlayout->addWidget( lbl ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( m_pValueEdit ); connect( m_pIndexEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pValueEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmpalettevalueedit.h b/kpovmodeler/pmpalettevalueedit.h index c2375de5..86e7cc0c 100644 --- a/kpovmodeler/pmpalettevalueedit.h +++ b/kpovmodeler/pmpalettevalueedit.h @@ -32,12 +32,13 @@ class PMIntEdit; /** * Dialog edit class for @ref PMPaletteValue. */ -class PMPaletteValueEdit: public QWidget +class PMPaletteValueEdit: public TQWidget { Q_OBJECT + TQ_OBJECT public: /** */ - PMPaletteValueEdit( TQWidget* parent, const char* name = 0 ); + PMPaletteValueEdit( TQWidget* tqparent, const char* name = 0 ); /** */ void setIndex( int idx ); /** */ diff --git a/kpovmodeler/pmpalettevaluememento.cpp b/kpovmodeler/pmpalettevaluememento.cpp index f683068c..e3417b39 100644 --- a/kpovmodeler/pmpalettevaluememento.cpp +++ b/kpovmodeler/pmpalettevaluememento.cpp @@ -33,7 +33,7 @@ void PMPaletteValueMemento::setFilterPaletteValues( const TQValueList<PMPaletteV { if( !m_bFilterPaletteValuesSaved ) { - // Direct assignment does not work with Qt 2.3.x + // Direct assignment does not work with TQt 2.3.x // The list will be changed later in a graphical // change because TQValueList::detach( ) is called // too late! @@ -60,7 +60,7 @@ void PMPaletteValueMemento::setTransmitPaletteValues( const TQValueList<PMPalett { if( !m_bTransmitPaletteValuesSaved ) { - // Direct assignment does not work with Qt 2.3.x + // Direct assignment does not work with TQt 2.3.x // The list will be changed later in a graphical // change because TQValueList::detach( ) is called // too late! diff --git a/kpovmodeler/pmparser.cpp b/kpovmodeler/pmparser.cpp index dfe37a6d..2c027314 100644 --- a/kpovmodeler/pmparser.cpp +++ b/kpovmodeler/pmparser.cpp @@ -48,7 +48,7 @@ PMParser::PMParser( PMPart* part, const TQByteArray& array ) m_pPart = part; TQBuffer* buffer = new TQBuffer( array ); buffer->open( IO_ReadOnly ); - m_pDevice = buffer; + m_pDevice = TQT_TQIODEVICE(buffer); m_bDeviceCreated = true; init( ); @@ -107,7 +107,7 @@ void PMParser::printMessage( const PMPMessage messageNum ) void PMParser::printMessage( const TQString& type, const TQString& msg ) { if( m_lineNum >= 0 ) - m_messages += PMMessage( i18n( "Line %1: " ).arg( m_lineNum ) + type + ": " + msg ); + m_messages += PMMessage( i18n( "Line %1: " ).tqarg( m_lineNum ) + type + ": " + msg ); else m_messages += PMMessage( type + ": " + msg ); } @@ -122,7 +122,7 @@ void PMParser::printError( const TQString& msg ) else if( m_errors == s_maxErrors ) { m_messages += PMMessage( i18n( "Maximum of %1 errors reached." ) - .arg( s_maxErrors ) ); + .tqarg( s_maxErrors ) ); m_errors++; } } @@ -137,7 +137,7 @@ void PMParser::printWarning( const TQString& msg ) else if( m_warnings == s_maxWarnings ) { m_messages += PMMessage( i18n( "Maximum of %1 warnings reached." ) - .arg( s_maxWarnings ) ); + .tqarg( s_maxWarnings ) ); m_warnings++; } } @@ -145,18 +145,18 @@ void PMParser::printWarning( const TQString& msg ) void PMParser::printExpected( const char c, const char* sValue ) { printError( i18n( "'%1' expected, found token '%2' instead." ) - .arg( c ).arg( sValue ) ); + .tqarg( c ).tqarg( sValue ) ); } void PMParser::printExpected( const TQString& str, const char* sValue ) { printError( i18n( "'%1' expected, found token '%2' instead." ) - .arg( str ).arg( sValue ) ); + .tqarg( str ).tqarg( sValue ) ); } void PMParser::printUnexpected( const TQString& str ) { - printError( i18n( "Unexpected token '%1'." ).arg( str ) ); + printError( i18n( "Unexpected token '%1'." ).tqarg( str ) ); } void PMParser::printInfo( const TQString& msg ) @@ -177,18 +177,18 @@ int PMParser::errorFlags( ) const } -void PMParser::parse( PMObjectList* list, PMObject* parent, +void PMParser::parse( PMObjectList* list, PMObject* tqparent, PMObject* after ) { m_pResultList = list; - m_pTopParent = parent; + m_pTopParent = tqparent; m_pAfter = after; // find first item, that can be a declare and can be used as link // for parsed objects. - if( parent ) + if( tqparent ) { - if( parent->type( ) == "Scene" ) + if( tqparent->type( ) == "Scene" ) { if( after ) m_pNextCheckDeclare = after; @@ -197,19 +197,19 @@ void PMParser::parse( PMObjectList* list, PMObject* parent, } else { - PMObject* obj = parent; + PMObject* obj = tqparent; bool stop = false; - // go to parents, until the parent is the scene + // go to tqparents, until the tqparent is the scene // (declares can only be inserted as top level objects) do { - if( obj->parent( ) ) + if( obj->tqparent( ) ) { - if( obj->parent( )->type( ) == "Scene" ) + if( obj->tqparent( )->type( ) == "Scene" ) stop = true; else - obj = obj->parent( ); + obj = obj->tqparent( ); } else { @@ -219,7 +219,7 @@ void PMParser::parse( PMObjectList* list, PMObject* parent, } while( obj && !stop ); - // now obj is the top level parent of the object, where parsed objects + // now obj is the top level tqparent of the object, where parsed objects // will be inserted if( obj ) m_pNextCheckDeclare = obj->prevSibling( ); @@ -240,22 +240,22 @@ void PMParser::parse( PMObjectList* list, PMObject* parent, setFatalError( ); } -bool PMParser::insertChild( PMObject* child, PMObject* parent ) +bool PMParser::insertChild( PMObject* child, PMObject* tqparent ) { bool inserted = false; - if( parent ) + if( tqparent ) { - if( parent->canInsert( child, parent->lastChild( ) ) ) + if( tqparent->canInsert( child, tqparent->lastChild( ) ) ) { - parent->appendChild( child ); + tqparent->appendChild( child ); inserted = true; } else { printError( i18n( "Can't insert %1 into %2." ) - .arg( child->description( ) ) - .arg( parent->description( ) ) ); + .tqarg( child->description( ) ) + .tqarg( tqparent->description( ) ) ); } } else @@ -270,8 +270,8 @@ bool PMParser::insertChild( PMObject* child, PMObject* parent ) else { printError( i18n( "Can't insert %1 into %2." ) - .arg( child->description( ) ) - .arg( m_pTopParent->description( ) ) ); + .tqarg( child->description( ) ) + .tqarg( m_pTopParent->description( ) ) ); } } else @@ -304,9 +304,9 @@ bool PMParser::insertChild( PMObject* child, PMObject* parent ) void PMParser::checkID( PMDeclare* decl ) { PMSymbolTable* st = m_pPart->symbolTable( ); - PMSymbol* s = m_pLocalST.find( decl->id( ) ); + PMSymbol* s = m_pLocalST.tqfind( decl->id( ) ); if( !s ) - s = st->find( decl->id( ) ); + s = st->tqfind( decl->id( ) ); if( s ) { @@ -336,7 +336,7 @@ void PMParser::checkID( PMDeclare* decl ) void PMParser::checkID( const TQString& id, const PMValue& v ) { PMSymbolTable* st = m_pPart->symbolTable( ); - PMSymbol* s = m_pLocalST.find( id ); + PMSymbol* s = m_pLocalST.tqfind( id ); if( s ) { @@ -374,19 +374,19 @@ PMDeclare* PMParser::checkLink( const TQString& id ) bool ok = false; // is object declared? - PMSymbol* s = m_pLocalST.find( id ); + PMSymbol* s = m_pLocalST.tqfind( id ); if( !s ) - s = t->find( id ); + s = t->tqfind( id ); if( !s ) - printError( i18n( "Undefined object \"%1\"." ).arg( id ) ); + printError( i18n( "Undefined object \"%1\"." ).tqarg( id ) ); else if( s->type( ) != PMSymbol::Object ) - printError( i18n( "Undefined object \"%1\"." ).arg( id ) ); + printError( i18n( "Undefined object \"%1\"." ).tqarg( id ) ); else { // the object is declared // is the id already in m_okDeclares - bool* lok = m_okDeclares.find( id ); + bool* lok = m_okDeclares.tqfind( id ); if( lok ) ok = true; else @@ -409,7 +409,7 @@ PMDeclare* PMParser::checkLink( const TQString& id ) if( !ok ) printError( i18n( "Object \"%1\" is undefined at that point." ) - .arg( id ) ); + .tqarg( id ) ); } if( ok ) @@ -425,9 +425,9 @@ PMDeclare* PMParser::checkLink( const TQString& id ) PMSymbol* PMParser::getSymbol( const TQString& id ) const { - PMSymbol* s = m_pLocalST.find( id ); + PMSymbol* s = m_pLocalST.tqfind( id ); if( !s ) - s = m_pPart->symbolTable( )->find( id ); + s = m_pPart->symbolTable( )->tqfind( id ); return s; } diff --git a/kpovmodeler/pmparser.h b/kpovmodeler/pmparser.h index e72cbd60..3c48bb49 100644 --- a/kpovmodeler/pmparser.h +++ b/kpovmodeler/pmparser.h @@ -81,13 +81,13 @@ public: * * Appends all parsed objects to the list. * - * parent is the object where the parsed objects will be inserted as - * children behind the object after. These parameters are used to check + * tqparent is the object where the parsed objects will be inserted as + * tqchildren behind the object after. These parameters are used to check * the consistency of declares and links. * - * Set parent and after to 0 if and only if a document is parsed/opened. + * Set tqparent and after to 0 if and only if a document is parsed/opened. */ - void parse( PMObjectList* list, PMObject* parent, + void parse( PMObjectList* list, PMObject* tqparent, PMObject* after ); /** @@ -196,12 +196,12 @@ public: */ PMSymbol* getSymbol( const TQString& id ) const; /** - * Tries to insert obj as child of parent. If parent is 0, the object + * Tries to insert obj as child of tqparent. If tqparent is 0, the object * will be inserted in the list of top level objects. * * Returns true if the object could be inserted. */ - bool insertChild( PMObject* obj, PMObject* parent ); + bool insertChild( PMObject* obj, PMObject* tqparent ); protected: /** @@ -217,8 +217,8 @@ protected: */ PMPart* m_pPart; /** - * parent object where the parsed top level objects - * will be inserted _later_ (not from the parser) as children + * tqparent object where the parsed top level objects + * will be inserted _later_ (not from the parser) as tqchildren */ const PMObject* m_pTopParent; const PMObject* m_pAfter; @@ -227,7 +227,7 @@ protected: */ PMObjectList* m_pResultList; /** - * The QIODevice + * The TQIODevice */ TQIODevice* m_pDevice; /** diff --git a/kpovmodeler/pmpart.cpp b/kpovmodeler/pmpart.cpp index fe0f58b4..db94f33e 100644 --- a/kpovmodeler/pmpart.cpp +++ b/kpovmodeler/pmpart.cpp @@ -99,11 +99,11 @@ TQTime PMDebugTime; //#define KPM_WITH_OBJECT_LIBRARY -PMPart::PMPart( TQWidget* parentWidget, const char* widgetName, - TQObject* parent, const char* name, bool readwrite, +PMPart::PMPart( TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent, const char* name, bool readwrite, PMShell* shell ) : DCOPObject( "PMPartIface" ), - KParts::ReadWritePart( parent, name ), + KParts::ReadWritePart( tqparent, name ), m_commandManager( this ) { setPluginLoadingMode( LoadPlugins ); @@ -141,11 +141,11 @@ PMPart::PMPart( TQWidget* parentWidget, const char* widgetName, initActions( ); initDocument( ); - initView( parentWidget, widgetName ); + initView( tqparentWidget, widgetName ); restoreConfig( instance( )->config( ) ); - connect( qApp->clipboard( ), TQT_SIGNAL( dataChanged( ) ), + connect( tqApp->tqclipboard( ), TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotClipboardDataChanged( ) ) ); slotClipboardDataChanged( ); connect( &m_commandManager, TQT_SIGNAL( updateUndoRedo( const TQString&, const TQString& ) ), @@ -161,11 +161,11 @@ PMPart::PMPart( TQWidget* parentWidget, const char* widgetName, slotObjectChanged( m_pScene, PMCNewSelection, this ); } -PMPart::PMPart( TQWidget* /*parentWidget*/, const char* /*widgetName*/, - TQObject* parent, const char* name, bool readwrite, +PMPart::PMPart( TQWidget* /*tqparentWidget*/, const char* /*widgetName*/, + TQObject* tqparent, const char* name, bool readwrite, bool /*onlyCutPaste*/, PMShell* shell ) : DCOPObject( "LibraryBrowserIface" ), - KParts::ReadWritePart( parent, name ), + KParts::ReadWritePart( tqparent, name ), m_commandManager( this ) { setPluginLoadingMode( LoadPlugins ); @@ -227,7 +227,7 @@ void PMPart::initCopyPasteActions( ) m_pPasteAction = KStdAction::paste( this, TQT_SLOT( slotEditPaste( ) ), actionCollection( ) ); m_pDeleteAction = - new KAction( i18n( "Delete" ), "edittrash", Qt::Key_Delete, + new KAction( i18n( "Delete" ), "edittrash", TQt::Key_Delete, this, TQT_SLOT( slotEditDelete( ) ), actionCollection( ), "edit_delete" ); @@ -662,8 +662,8 @@ void PMPart::updateNewObjectActions( ) bool readWriteParent = false; if( m_pActiveObject ) - if( m_pActiveObject->parent( ) ) - if( !m_pActiveObject->parent( )->isReadOnly( ) ) + if( m_pActiveObject->tqparent( ) ) + if( !m_pActiveObject->tqparent( )->isReadOnly( ) ) readWriteParent = true; for( ; it.current( ); ++it ) @@ -685,7 +685,7 @@ void PMPart::updateNewObjectActions( ) enable = m_pActiveObject->canInsert( insertName, m_pActiveObject->lastChild( ) ); if( !enable ) if( readWriteParent ) - enable |= m_pActiveObject->parent( )->canInsert( insertName, m_pActiveObject ); + enable |= m_pActiveObject->tqparent( )->canInsert( insertName, m_pActiveObject ); } else enable = false; @@ -701,7 +701,7 @@ void PMPart::updateNewObjectActions( ) enable = m_pActiveObject->canInsert( TQString( "CSG" ), m_pActiveObject->lastChild( ) ); if( !enable ) if( readWriteParent ) - enable = m_pActiveObject->parent( )->canInsert( TQString( "CSG" ), m_pActiveObject ); + enable = m_pActiveObject->tqparent( )->canInsert( TQString( "CSG" ), m_pActiveObject ); } else enable = false; @@ -725,13 +725,13 @@ void PMPart::initDocument( ) newDocument( ); } -void PMPart::initView( TQWidget* parent, const char* name ) +void PMPart::initView( TQWidget* tqparent, const char* name ) { if( !m_pShell ) { // a part inside konqueror - // simple layout - m_pView = new PMView( this, parent, name ); + // simple tqlayout + m_pView = new PMView( this, tqparent, name ); m_pView->show( ); setWidget( m_pView ); } @@ -951,7 +951,7 @@ bool PMPart::exportPovray( const KURL& url ) if( ok ) { PMPovray35Format format; - PMSerializer* dev = format.newSerializer( file ); + PMSerializer* dev = format.newSerializer( TQT_TQIODEVICE(file) ); dev->serialize( m_pScene ); delete dev; @@ -995,7 +995,7 @@ TQString PMPart::activeObjectName( ) result = tmpObj->type( ) + "/" + result; // go up in the scene - tmpObj = tmpObj->parent( ); + tmpObj = tmpObj->tqparent( ); idx = 0; } @@ -1023,7 +1023,7 @@ bool PMPart::setActiveObject( const TQString& name ) tmpObj = activeObject( ); // get the first element - pos = objPath.find( '/' ); + pos = objPath.tqfind( '/' ); if( pos != -1 ) { pathElem = objPath.mid( 0, pos ); @@ -1032,7 +1032,7 @@ bool PMPart::setActiveObject( const TQString& name ) else { pathElem = objPath; - objPath = TQString::null; + objPath = TQString(); } while( !pathElem.isNull( ) ) @@ -1040,17 +1040,17 @@ bool PMPart::setActiveObject( const TQString& name ) if( !pathElem.isEmpty( ) ) { // Special treatment for brackets - firstBracket = pathElem.find( '[' ); + firstBracket = pathElem.tqfind( '[' ); if( firstBracket != -1 ) { - lastBracket = pathElem.findRev( ']' ); + lastBracket = pathElem.tqfindRev( ']' ); objIndex = pathElem.mid( firstBracket + 1, lastBracket - firstBracket - 1).toInt( ); pathElem = pathElem.left( firstBracket ); } else objIndex = 0; - // Iterate the children for this element. We stop when there are no more siblings + // Iterate the tqchildren for this element. We stop when there are no more siblings // or the object is of the correct type and it's index count is also correct siblingIndex = 0; tmpSibling = tmpObj->firstChild( ); @@ -1070,7 +1070,7 @@ bool PMPart::setActiveObject( const TQString& name ) } // Get the next element - pos = objPath.find( '/' ); + pos = objPath.tqfind( '/' ); if( pos != -1 ) { pathElem = objPath.mid( 0, pos ); @@ -1079,7 +1079,7 @@ bool PMPart::setActiveObject( const TQString& name ) else { pathElem = objPath; - objPath = TQString::null; + objPath = TQString(); } } if( tmpObj ) @@ -1240,9 +1240,9 @@ int PMPart::whereToInsert( PMObject* obj, const PMObjectList& list ) } } - if( obj->parent( ) ) + if( obj->tqparent( ) ) { - PMObject* p = obj->parent( ); + PMObject* p = obj->tqparent( ); if( !p->isReadOnly( ) ) { canInsertAsSibling = p->canInsert( list, obj ); @@ -1301,9 +1301,9 @@ int PMPart::whereToInsert( PMObject* obj, const TQStringList& list ) } } - if( obj->parent( ) ) + if( obj->tqparent( ) ) { - PMObject* p = obj->parent( ); + PMObject* p = obj->tqparent( ); if( !p->isReadOnly( ) ) { canInsertAsSibling = p->canInsert( list, obj ); @@ -1336,7 +1336,7 @@ int PMPart::whereToInsert( PMObject* obj ) int insertAs = 0; int insertPossibilities = 0; - if( obj->parent( ) ) + if( obj->tqparent( ) ) { insertAs |= PMInsertPopup::PMISibling; insertPossibilities++; @@ -1369,14 +1369,14 @@ void PMPart::slotFileImport( ) TQFile file( fileName ); if( file.open( IO_ReadOnly ) ) { - PMParser* newParser = selectedFormat->newParser( this, &file ); + PMParser* newParser = selectedFormat->newParser( this, TQT_TQIODEVICE(&file) ); if( newParser ) { if( m_pActiveObject ) - insertFromParser( i18n( "Import %1" ).arg( selectedFormat->description( ) ), + insertFromParser( i18n( "Import %1" ).tqarg( selectedFormat->description( ) ), newParser, m_pActiveObject ); else - insertFromParser( i18n( "Import %1" ).arg( selectedFormat->description( ) ), + insertFromParser( i18n( "Import %1" ).tqarg( selectedFormat->description( ) ), newParser, m_pScene ); delete newParser; } @@ -1404,7 +1404,7 @@ void PMPart::slotFileExport( ) TQBuffer buffer( baData ); buffer.open( IO_WriteOnly ); - PMSerializer* newSer = selectedFormat->newSerializer( &buffer ); + PMSerializer* newSer = selectedFormat->newSerializer( TQT_TQIODEVICE(&buffer) ); if( newSer ) { newSer->serialize( m_pScene ); @@ -1450,7 +1450,7 @@ void PMPart::slotEditCut( ) if( sortedList.count( ) > 0 ) { - TQApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) ); + TQApplication::tqclipboard( )->setData( new PMObjectDrag( this, sortedList ) ); removeSelection( i18n( "Cut" ) ); } @@ -1472,7 +1472,7 @@ void PMPart::slotEditCopy( ) const PMObjectList& sortedList = selectedObjects( ); if( sortedList.count( ) > 0 ) - TQApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) ); + TQApplication::tqclipboard( )->setData( new PMObjectDrag( this, sortedList ) ); emit setStatusBarText( "" ); } @@ -1513,7 +1513,7 @@ bool PMPart::dragMoveSelectionTo( PMObject* obj ) command = new PMMoveCommand( sortedList, obj, hlp ); break; case PMInsertPopup::PMISibling: - command = new PMMoveCommand( sortedList, obj->parent( ), obj ); + command = new PMMoveCommand( sortedList, obj->tqparent( ), obj ); break; } } @@ -1549,7 +1549,7 @@ void PMPart::slotEditPaste( ) { emit setStatusBarText( i18n( "Inserting clipboard contents..." ) ); - pasteOrDrop( i18n( "Paste" ), qApp->clipboard( )->data( ), + pasteOrDrop( i18n( "Paste" ), tqApp->tqclipboard( )->data( ), m_pActiveObject ); emit setStatusBarText( "" ); @@ -1600,30 +1600,30 @@ bool PMPart::insertFromParser( const TQString& type, PMParser* parser, if( success && insertAs ) { - PMObject* parent = 0; + PMObject* tqparent = 0; PMObject* after = 0; switch( insertAs ) { case PMInsertPopup::PMIFirstChild: - parent = obj; + tqparent = obj; after = 0; break; case PMInsertPopup::PMILastChild: - parent = obj; + tqparent = obj; after = obj->lastChild( ); break; case PMInsertPopup::PMISibling: - parent = obj->parent( ); + tqparent = obj->tqparent( ); after = obj; break; default: - parent = obj; + tqparent = obj; after = 0; break; } - parser->parse( &list, parent, after ); + parser->parse( &list, tqparent, after ); success = !( parser->warnings( ) || parser->errors( ) ); if( !success ) @@ -1639,7 +1639,7 @@ bool PMPart::insertFromParser( const TQString& type, PMParser* parser, if( success ) { // parsing was successful - command = new PMAddCommand( list, parent, after ); + command = new PMAddCommand( list, tqparent, after ); command->setText( type ); success = executeCommand( command ); @@ -1850,8 +1850,8 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m, if( mode & PMCRemove ) { - if( obj->parent( ) ) - if( obj->parent( ) == m_pActiveObject ) + if( obj->tqparent( ) ) + if( obj->tqparent( ) == m_pActiveObject ) m_updateNewObjectActions = true; if( m_pNewSelection == obj ) { @@ -1859,12 +1859,12 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m, m_pNewSelection = obj->nextSibling( ); else if( obj->prevSibling( ) ) m_pNewSelection = obj->nextSibling( ); - else if( obj->parent( ) ) - m_pNewSelection = obj->parent( ); + else if( obj->tqparent( ) ) + m_pNewSelection = obj->tqparent( ); else m_pNewSelection = 0; } - if( m_selectedObjects.containsRef( obj ) ) + if( m_selectedObjects.tqcontainsRef( obj ) ) { m_selectedObjects.removeRef( obj ); if( m_selectedObjects.isEmpty( ) ) @@ -1873,8 +1873,8 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m, m_pNewSelection = obj->nextSibling( ); else if( obj->prevSibling( ) ) m_pNewSelection = obj->prevSibling( ); - else if( obj->parent( ) ) - m_pNewSelection = obj->parent( ); + else if( obj->tqparent( ) ) + m_pNewSelection = obj->tqparent( ); else m_pNewSelection = 0; } @@ -1903,7 +1903,7 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m, if( obj->isA( "Declare" ) ) { PMDeclare* decl = ( PMDeclare* ) obj; - PMSymbol* s = m_pSymbolTable->find( decl->id( ) ); + PMSymbol* s = m_pSymbolTable->tqfind( decl->id( ) ); if( !s ) m_pSymbolTable->insert( decl->id( ), new PMSymbol( decl->id( ), decl ) ); @@ -1911,8 +1911,8 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m, if( obj->type( ) == "Camera" ) m_bCameraListUpToDate = false; } - if( obj->parent( ) ) - if( obj->parent( ) == m_pActiveObject ) + if( obj->tqparent( ) ) + if( obj->tqparent( ) == m_pActiveObject ) m_updateNewObjectActions = true; m_numAddedObjects++; } @@ -1977,7 +1977,7 @@ void PMPart::slotIDChanged( PMObject* obj, const TQString& oldID ) if( obj->isA( "Declare" ) ) { PMDeclare* d = ( PMDeclare* ) obj; - PMSymbol* s = m_pSymbolTable->find( oldID ); + PMSymbol* s = m_pSymbolTable->tqfind( oldID ); if( s ) { if( s->type( ) == PMSymbol::Object ) @@ -2028,7 +2028,7 @@ void PMPart::slotNewObject( PMObject* newObject, int insertAs ) break; case PMInsertPopup::PMISibling: command = new PMAddCommand( list, - m_pActiveObject->parent( ), + m_pActiveObject->tqparent( ), m_pActiveObject ); break; default: @@ -2508,7 +2508,7 @@ void PMPart::slotClipboardDataChanged( ) { if( isReadWrite( ) ) { - m_canDecode = PMObjectDrag::canDecode( qApp->clipboard( )->data( ), this ); + m_canDecode = PMObjectDrag::canDecode( tqApp->tqclipboard( )->data( ), this ); m_pPasteAction->setEnabled( m_canDecode && m_pActiveObject ); } else @@ -2525,8 +2525,8 @@ void PMPart::clearSelection( ) m_pNewSelection = it.current( )->nextSibling( ); else if( it.current( )->prevSibling( ) ) m_pNewSelection = it.current( )->prevSibling( ); - else if( it.current( )->parent( ) ) - m_pNewSelection = it.current( )->parent( ); + else if( it.current( )->tqparent( ) ) + m_pNewSelection = it.current( )->tqparent( ); for( ; it.current( ); ++it ) { @@ -2537,8 +2537,8 @@ void PMPart::clearSelection( ) m_pNewSelection = it.current( )->nextSibling( ); else if( it.current( )->prevSibling( ) ) m_pNewSelection = it.current( )->prevSibling( ); - else if( it.current( )->parent( ) ) - m_pNewSelection = it.current( )->parent( ); + else if( it.current( )->tqparent( ) ) + m_pNewSelection = it.current( )->tqparent( ); } } } @@ -2713,7 +2713,7 @@ void PMPart::slotRender( ) TQBuffer buffer( a ); buffer.open( IO_WriteOnly ); PMPovray35Format format; - PMSerializer* dev = format.newSerializer( &buffer ); + PMSerializer* dev = format.newSerializer( TQT_TQIODEVICE(&buffer) ); dev->serialize( m_pScene ); delete dev; diff --git a/kpovmodeler/pmpart.h b/kpovmodeler/pmpart.h index e1b36b46..0fe3bd22 100644 --- a/kpovmodeler/pmpart.h +++ b/kpovmodeler/pmpart.h @@ -70,21 +70,22 @@ class KProcess; class PMPart : public KParts::ReadWritePart, virtual public PMPartIface { Q_OBJECT + TQ_OBJECT public: /** * construtor of PMPart, calls all init functions to create the * application. */ - PMPart( TQWidget* parentWidget, const char* widgetName, - TQObject* parent, const char* name, bool readWrite, + PMPart( TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent, const char* name, bool readWrite, PMShell* shell = 0 ); /** * construtor of PMPart, calls all init functions to create the * application. It does not create the main widget. */ - PMPart( TQWidget* parentWidget, const char* widgetName, - TQObject* parent, const char* name, bool readWrite, + PMPart( TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent, const char* name, bool readWrite, bool onlyCutPaste, PMShell* shell = 0 ); /** @@ -770,7 +771,7 @@ protected: * creates the widget of the part instance and sets * it as the view */ - void initView( TQWidget* parent, const char* name ); + void initView( TQWidget* tqparent, const char* name ); /** * initializes the documents contents */ @@ -1025,10 +1026,11 @@ private: class PMBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT friend class PMPart; public: - PMBrowserExtension( PMPart* parent ) - : KParts::BrowserExtension( parent, "PMBrowserExtension" ) + PMBrowserExtension( PMPart* tqparent ) + : KParts::BrowserExtension( tqparent, "PMBrowserExtension" ) { KGlobal::locale()->insertCatalogue("kpovmodeler"); } diff --git a/kpovmodeler/pmpattern.cpp b/kpovmodeler/pmpattern.cpp index 2d60e9ce..bafbedda 100644 --- a/kpovmodeler/pmpattern.cpp +++ b/kpovmodeler/pmpattern.cpp @@ -453,11 +453,11 @@ void PMPattern::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMPattern::metaObject( ) const +PMMetaObject* PMPattern::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Pattern", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Pattern", Base::tqmetaObject( ), createNewPattern ); s_pMetaObject->addProperty( new PMPatternProperty( "agateTurbulence", &PMPattern::setAgateTurbulence, &PMPattern::agateTurbulence ) ); @@ -982,9 +982,9 @@ void PMPattern::setDepth( const double c ) } } -PMDialogEditBase* PMPattern::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMPattern::editWidget( TQWidget* tqparent ) const { - return new PMPatternEdit( parent ); + return new PMPatternEdit( tqparent ); } void PMPattern::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmpattern.h b/kpovmodeler/pmpattern.h index 7dcf9cff..8b742280 100644 --- a/kpovmodeler/pmpattern.h +++ b/kpovmodeler/pmpattern.h @@ -76,7 +76,7 @@ public: virtual TQString pixmap( ) const { return TQString( "pmpattern" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -88,7 +88,7 @@ public: /** * Returns a new @ref PMPatternEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Gets the pattern type diff --git a/kpovmodeler/pmpatternedit.cpp b/kpovmodeler/pmpatternedit.cpp index 1e07b822..87f5c987 100644 --- a/kpovmodeler/pmpatternedit.cpp +++ b/kpovmodeler/pmpatternedit.cpp @@ -38,8 +38,8 @@ #include <kfiledialog.h> #include <kiconloader.h> -PMPatternEdit::PMPatternEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMPatternEdit::PMPatternEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -48,12 +48,12 @@ void PMPatternEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQGridLayout* layout; + TQGridLayout* tqlayout; TQHBoxLayout* hl; TQVBoxLayout* vl; TQGridLayout* gl; - layout = new TQGridLayout( topLayout( ), 12, 2 ); + tqlayout = new TQGridLayout( topLayout( ), 12, 2 ); hl = new TQHBoxLayout( KDialog::spacingHint( ) ); hl->addWidget( new TQLabel( i18n( "Type:" ), this ) ); m_pTypeCombo = new TQComboBox( false, this ); @@ -88,12 +88,12 @@ void PMPatternEdit::createTopWidgets( ) m_pTypeCombo->insertItem( i18n( "Wrinkles" ) ); hl->addWidget( m_pTypeCombo ); hl->addStretch( 1 ); - layout->addMultiCellLayout( hl, 0, 0, 0, 1 ); + tqlayout->addMultiCellLayout( hl, 0, 0, 0, 1 ); m_pAgateTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), this ); - layout->addWidget( m_pAgateTurbulenceLabel, 1, 0 ); + tqlayout->addWidget( m_pAgateTurbulenceLabel, 1, 0 ); m_pAgateTurbulenceEdit = new PMFloatEdit( this ); - layout->addWidget( m_pAgateTurbulenceEdit, 1, 1, AlignLeft ); + tqlayout->addWidget( m_pAgateTurbulenceEdit, 1, 1, AlignLeft ); m_pCrackleWidget = new TQWidget( this ); vl = new TQVBoxLayout( m_pCrackleWidget, 0, KDialog::spacingHint( ) ); @@ -114,7 +114,7 @@ void PMPatternEdit::createTopWidgets( ) m_pCrackleSolid = new TQCheckBox( i18n( "Solid:" ), m_pCrackleWidget ); gl->addMultiCellWidget( m_pCrackleSolid, 2, 2, 0, 1 ); hl->addStretch( 1 ); - layout->addMultiCellWidget( m_pCrackleWidget, 2, 2, 0, 1 ); + tqlayout->addMultiCellWidget( m_pCrackleWidget, 2, 2, 0, 1 ); m_pDensityWidget = new TQWidget( this ); vl = new TQVBoxLayout( m_pDensityWidget, 0, KDialog::spacingHint( ) ); @@ -132,17 +132,17 @@ void PMPatternEdit::createTopWidgets( ) m_pDensityInterpolate->insertItem( i18n( "Trilinear" ) ); hl->addWidget( m_pDensityInterpolate ); hl->addStretch( 1 ); - layout->addMultiCellWidget( m_pDensityWidget, 3, 3, 0, 1 ); + tqlayout->addMultiCellWidget( m_pDensityWidget, 3, 3, 0, 1 ); m_pGradientLabel = new TQLabel( i18n( "Gradient:" ), this ); - layout->addWidget( m_pGradientLabel, 4, 0 ); + tqlayout->addWidget( m_pGradientLabel, 4, 0 ); m_pGradientEdit = new PMVectorEdit( "x", "y", "z", this ); - layout->addWidget( m_pGradientEdit, 4, 1 ); + tqlayout->addWidget( m_pGradientEdit, 4, 1 ); m_pJuliaComplexLabel = new TQLabel( i18n( "Complex number:" ), this ); - layout->addWidget( m_pJuliaComplexLabel, 5, 0 ); + tqlayout->addWidget( m_pJuliaComplexLabel, 5, 0 ); m_pJuliaComplex = new PMVectorEdit( "Real", "Imaginary", this ); - layout->addWidget( m_pJuliaComplex, 5, 1 ); + tqlayout->addWidget( m_pJuliaComplex, 5, 1 ); m_pFractalWidget = new TQWidget( this ); vl = new TQVBoxLayout( m_pFractalWidget, 0, KDialog::spacingHint( ) ); @@ -195,7 +195,7 @@ void PMPatternEdit::createTopWidgets( ) m_pFractalIntFactor = new PMFloatEdit( m_pFractalWidget ); gl->addWidget( m_pFractalIntFactor, 1, 3 ); hl->addStretch( 1 ); - layout->addMultiCellWidget( m_pFractalWidget, 6, 6, 0, 1 ); + tqlayout->addMultiCellWidget( m_pFractalWidget, 6, 6, 0, 1 ); m_pQuiltControlsLabel = new TQLabel( i18n( "Quilt controls:" ), this ); m_pQuiltControl0Edit = new PMFloatEdit( this ); @@ -204,8 +204,8 @@ void PMPatternEdit::createTopWidgets( ) hl->addWidget( m_pQuiltControl0Edit ); hl->addWidget( m_pQuiltControl1Edit ); hl->addStretch( 1 ); - layout->addWidget( m_pQuiltControlsLabel, 7, 0 ); - layout->addLayout( hl, 7, 1 ); + tqlayout->addWidget( m_pQuiltControlsLabel, 7, 0 ); + tqlayout->addLayout( hl, 7, 1 ); m_pSlopeWidget = new TQWidget( this ); vl = new TQVBoxLayout( m_pSlopeWidget, 0, KDialog::spacingHint( ) ); @@ -240,17 +240,17 @@ void PMPatternEdit::createTopWidgets( ) m_pSlopeHiAlt = new PMFloatEdit( m_pSlopeWidget ); gl->addWidget( m_pSlopeHiAlt, 1, 1 ); hl->addStretch( 1 ); - layout->addMultiCellWidget( m_pSlopeWidget, 8, 8, 0, 1 ); + tqlayout->addMultiCellWidget( m_pSlopeWidget, 8, 8, 0, 1 ); m_pSpiralNumberLabel = new TQLabel( i18n( "Spiral number:" ), this ); m_pSpiralNumberEdit = new PMIntEdit( this ); - layout->addWidget( m_pSpiralNumberLabel, 9, 0 ); - layout->addWidget( m_pSpiralNumberEdit, 9, 1, AlignLeft ); + tqlayout->addWidget( m_pSpiralNumberLabel, 9, 0 ); + tqlayout->addWidget( m_pSpiralNumberEdit, 9, 1, AlignLeft ); m_pDepthLabel = new TQLabel( i18n( "Depth:" ), this ); m_pDepthEdit = new PMFloatEdit( this ); - layout->addWidget( m_pDepthLabel, 10, 0 ); - layout->addWidget( m_pDepthEdit, 10, 1, AlignLeft ); + tqlayout->addWidget( m_pDepthLabel, 10, 0 ); + tqlayout->addWidget( m_pDepthEdit, 10, 1, AlignLeft ); m_pNoiseGeneratorLabel = new TQLabel( i18n( "Noise generator:" ), this ); m_pNoiseGenerator = new TQComboBox( false, this ); @@ -258,8 +258,8 @@ void PMPatternEdit::createTopWidgets( ) m_pNoiseGenerator->insertItem( i18n( "Original" ) ); m_pNoiseGenerator->insertItem( i18n( "Range Corrected" ) ); m_pNoiseGenerator->insertItem( i18n( "Perlin" ) ); - layout->addWidget( m_pNoiseGeneratorLabel, 11, 0 ); - layout->addWidget( m_pNoiseGenerator, 11, 1 ); + tqlayout->addWidget( m_pNoiseGeneratorLabel, 11, 0 ); + tqlayout->addWidget( m_pNoiseGenerator, 11, 1 ); m_pEnableTurbulenceEdit = new TQCheckBox( i18n( "Turbulence" ), this ); topLayout( )->addWidget( m_pEnableTurbulenceEdit ); @@ -510,7 +510,7 @@ void PMPatternEdit::displayObject( PMObject* o ) m_pLambdaEdit->setValue( m_pDisplayedObject->lambda( ) ); m_pLambdaEdit->setReadOnly( readOnly ); - if( o->parent( ) && ( o->parent( )->type( ) == "Normal" ) ) + if( o->tqparent( ) && ( o->tqparent( )->type( ) == "Normal" ) ) { m_pDepthEdit->setValue( m_pDisplayedObject->depth( ) ); m_pDepthEdit->setReadOnly( readOnly ); @@ -685,8 +685,8 @@ void PMPatternEdit::saveContents( ) m_pDisplayedObject->setOmega( m_pOmegaEdit->value( ) ); m_pDisplayedObject->setLambda( m_pLambdaEdit->value( ) ); - if( m_pDisplayedObject->parent( ) && - ( m_pDisplayedObject->parent( )->type( ) == "Normal" ) ) + if( m_pDisplayedObject->tqparent( ) && + ( m_pDisplayedObject->tqparent( )->type( ) == "Normal" ) ) m_pDisplayedObject->setDepth( m_pDepthEdit->value( ) ); } } @@ -740,8 +740,8 @@ bool PMPatternEdit::isDataValid( ) if( !m_pOmegaEdit->isDataValid( ) ) return false; if( !m_pLambdaEdit->isDataValid( ) ) return false; } - if( m_pDisplayedObject->parent( ) && - m_pDisplayedObject->parent( )->type( ) == "Normal" && + if( m_pDisplayedObject->tqparent( ) && + m_pDisplayedObject->tqparent( )->type( ) == "Normal" && !m_pDepthEdit->isDataValid( ) ) return false; @@ -1008,7 +1008,7 @@ void PMPatternEdit::slotComboChanged( int c ) void PMPatternEdit::slotDensityFileBrowseClicked( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmpatternedit.h b/kpovmodeler/pmpatternedit.h index 6826e13b..fea9f140 100644 --- a/kpovmodeler/pmpatternedit.h +++ b/kpovmodeler/pmpatternedit.h @@ -45,12 +45,13 @@ class TQPushButton; class PMPatternEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMPatternEdit with parent and name + * Creates a PMPatternEdit with tqparent and name */ - PMPatternEdit( TQWidget* parent, const char* name = 0 ); + PMPatternEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmphotons.cpp b/kpovmodeler/pmphotons.cpp index cce7665b..129fc28f 100644 --- a/kpovmodeler/pmphotons.cpp +++ b/kpovmodeler/pmphotons.cpp @@ -60,11 +60,11 @@ PMPhotons::~PMPhotons( ) { } -PMMetaObject* PMPhotons::metaObject( ) const +PMMetaObject* PMPhotons::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Photons", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Photons", Base::tqmetaObject( ), createNewPhotons ); s_pMetaObject->addProperty( new PMPhotonsProperty( "target", @@ -192,9 +192,9 @@ void PMPhotons::setAreaLight( bool al ) } } -PMDialogEditBase* PMPhotons::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMPhotons::editWidget( TQWidget* tqparent ) const { - return new PMPhotonsEdit( parent ); + return new PMPhotonsEdit( tqparent ); } void PMPhotons::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmphotons.h b/kpovmodeler/pmphotons.h index a28041f5..6fa8ad3c 100644 --- a/kpovmodeler/pmphotons.h +++ b/kpovmodeler/pmphotons.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMPhotonsEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmphotonsedit.cpp b/kpovmodeler/pmphotonsedit.cpp index a2fde9a2..0dbf8871 100644 --- a/kpovmodeler/pmphotonsedit.cpp +++ b/kpovmodeler/pmphotonsedit.cpp @@ -28,8 +28,8 @@ #include <kmessagebox.h> -PMPhotonsEdit::PMPhotonsEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMPhotonsEdit::PMPhotonsEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -84,7 +84,7 @@ void PMPhotonsEdit::displayObject( PMObject* o ) bool readOnly = o->isReadOnly( ); m_pDisplayedObject = ( PMPhotons* ) o; - if ( o->parent( ) && ( o->parent( )->isA( "Light" ) ) ) + if ( o->tqparent( ) && ( o->tqparent( )->isA( "Light" ) ) ) { m_pLayoutWidget->hide( ); m_pCollect->hide( ); diff --git a/kpovmodeler/pmphotonsedit.h b/kpovmodeler/pmphotonsedit.h index a4d3e414..c5950eb1 100644 --- a/kpovmodeler/pmphotonsedit.h +++ b/kpovmodeler/pmphotonsedit.h @@ -37,12 +37,13 @@ class TQLabel; class PMPhotonsEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMPhotonsEdit with parent and name + * Creates a PMPhotonsEdit with tqparent and name */ - PMPhotonsEdit( TQWidget* parent, const char* name = 0 ); + PMPhotonsEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmpigment.cpp b/kpovmodeler/pmpigment.cpp index be37cfb1..697ac24f 100644 --- a/kpovmodeler/pmpigment.cpp +++ b/kpovmodeler/pmpigment.cpp @@ -45,11 +45,11 @@ PMPigment::~PMPigment( ) { } -PMMetaObject* PMPigment::metaObject( ) const +PMMetaObject* PMPigment::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Pigment", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Pigment", Base::tqmetaObject( ), createNewPigment ); s_pMetaObject->addProperty( new PMPigmentProperty( "uvMapping", &PMPigment::setUVMapping, &PMPigment::uvMapping ) ); @@ -72,9 +72,9 @@ TQString PMPigment::description( ) const return i18n( "pigment" ); } -PMDialogEditBase* PMPigment::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMPigment::editWidget( TQWidget* tqparent ) const { - return new PMPigmentEdit( parent ); + return new PMPigmentEdit( tqparent ); } void PMPigment::serialize( TQDomElement& e, TQDomDocument& doc ) const diff --git a/kpovmodeler/pmpigment.h b/kpovmodeler/pmpigment.h index b520ad27..4a1e6322 100644 --- a/kpovmodeler/pmpigment.h +++ b/kpovmodeler/pmpigment.h @@ -52,7 +52,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMPigmentEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmpigment" ); } diff --git a/kpovmodeler/pmpigmentedit.cpp b/kpovmodeler/pmpigmentedit.cpp index 16bfab2c..761cb1bb 100644 --- a/kpovmodeler/pmpigmentedit.cpp +++ b/kpovmodeler/pmpigmentedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMPigmentEdit::PMPigmentEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMPigmentEdit::PMPigmentEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmpigmentedit.h b/kpovmodeler/pmpigmentedit.h index 89bb2fb0..578bdb46 100644 --- a/kpovmodeler/pmpigmentedit.h +++ b/kpovmodeler/pmpigmentedit.h @@ -35,12 +35,13 @@ class TQCheckBox; class PMPigmentEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMPigmentEdit with parent and name + * Creates a PMPigmentEdit with tqparent and name */ - PMPigmentEdit( TQWidget* parent, const char* name = 0 ); + PMPigmentEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmplane.cpp b/kpovmodeler/pmplane.cpp index db7af35a..8c6dbf30 100644 --- a/kpovmodeler/pmplane.cpp +++ b/kpovmodeler/pmplane.cpp @@ -82,11 +82,11 @@ void PMPlane::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMPlane::metaObject( ) const +PMMetaObject* PMPlane::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Plane", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Plane", Base::tqmetaObject( ), createNewPlane ); s_pMetaObject->addProperty( new PMPlaneProperty( "normal", &PMPlane::setNormal, &PMPlane::normal ) ); @@ -126,9 +126,9 @@ void PMPlane::setDistance( double distance ) } } -PMDialogEditBase* PMPlane::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMPlane::editWidget( TQWidget* tqparent ) const { - return new PMPlaneEdit( parent ); + return new PMPlaneEdit( tqparent ); } void PMPlane::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmplane.h b/kpovmodeler/pmplane.h index d5321dd8..32b25724 100644 --- a/kpovmodeler/pmplane.h +++ b/kpovmodeler/pmplane.h @@ -57,7 +57,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMPlaneEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ diff --git a/kpovmodeler/pmplaneedit.cpp b/kpovmodeler/pmplaneedit.cpp index 13e28aab..6f6306bf 100644 --- a/kpovmodeler/pmplaneedit.cpp +++ b/kpovmodeler/pmplaneedit.cpp @@ -28,8 +28,8 @@ #include <klocale.h> #include <kmessagebox.h> -PMPlaneEdit::PMPlaneEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMPlaneEdit::PMPlaneEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -38,24 +38,24 @@ void PMPlaneEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pNormal = new PMVectorEdit( "x", "y", "z", this ); m_pDistance = new PMFloatEdit( this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Normal:" ), this ) ); - layout->addWidget( m_pNormal ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Normal:" ), this ) ); + tqlayout->addWidget( m_pNormal ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Distance:" ), this ) ); - layout->addWidget( m_pDistance ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Distance:" ), this ) ); + tqlayout->addWidget( m_pDistance ); + tqlayout->addStretch( 1 ); TQPushButton* nb = new TQPushButton( i18n( "Normalize" ), this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( nb ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( nb ); + tqlayout->addStretch( 1 ); connect( m_pNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pDistance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmplaneedit.h b/kpovmodeler/pmplaneedit.h index 80e72e47..0b4c3f3f 100644 --- a/kpovmodeler/pmplaneedit.h +++ b/kpovmodeler/pmplaneedit.h @@ -34,12 +34,13 @@ class TQCheckBox; class PMPlaneEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMPlaneEdit with parent and name + * Creates a PMPlaneEdit with tqparent and name */ - PMPlaneEdit( TQWidget* parent, const char* name = 0 ); + PMPlaneEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmpluginmanager.cpp b/kpovmodeler/pmpluginmanager.cpp index 7af50d5c..1453f76d 100644 --- a/kpovmodeler/pmpluginmanager.cpp +++ b/kpovmodeler/pmpluginmanager.cpp @@ -81,7 +81,7 @@ PMPluginManager* PMPluginManager::theManager( ) void PMPluginManager::registerPart( PMPart* p ) { - if( !m_parts.containsRef( p ) ) + if( !m_parts.tqcontainsRef( p ) ) { m_parts.append( p ); Plugin::loadPlugins( p, p, PMFactory::instance( ), false ); diff --git a/kpovmodeler/pmpluginsettings.cpp b/kpovmodeler/pmpluginsettings.cpp index 0a635845..95f75e72 100644 --- a/kpovmodeler/pmpluginsettings.cpp +++ b/kpovmodeler/pmpluginsettings.cpp @@ -25,22 +25,22 @@ #include <tqpushbutton.h> #include <klocale.h> -class PMPluginListViewItem : public QListViewItem +class PMPluginListViewItem : public TQListViewItem { public: - PMPluginListViewItem( TQListView* parent, PMPluginInfo* info ) - : TQListViewItem( parent, info->name( ), info->description( ) ) + PMPluginListViewItem( TQListView* tqparent, PMPluginInfo* info ) + : TQListViewItem( tqparent, info->name( ), info->description( ) ) { m_info = info; m_enabled = info->enabled( ); - setStatus( ); + settqStatus( ); } - void toggleStatus( ) + void toggletqStatus( ) { m_enabled = !m_enabled; - setStatus( ); + settqStatus( ); } - void setStatus( ) + void settqStatus( ) { if( m_enabled ) setText( 2, i18n( "loaded" ) ); @@ -51,13 +51,13 @@ public: bool m_enabled; }; -PMPluginSettings::PMPluginSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMPluginSettings::PMPluginSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + TQVBoxLayout* vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); TQGroupBox* gb = new TQGroupBox( i18n( "Installed Plugins" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); TQVBoxLayout* gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); @@ -67,7 +67,7 @@ PMPluginSettings::PMPluginSettings( TQWidget* parent, const char* name ) TQT_SLOT( slotSelectionChanged( ) ) ); m_pPluginsList->addColumn( i18n( "Name" ) ); m_pPluginsList->addColumn( i18n( "Description" ) ); - m_pPluginsList->addColumn( i18n( "Status" ) ); + m_pPluginsList->addColumn( i18n( "tqStatus" ) ); gvl->addWidget( m_pPluginsList, 1 ); TQHBoxLayout* hl = new TQHBoxLayout( gvl ); @@ -77,7 +77,7 @@ PMPluginSettings::PMPluginSettings( TQWidget* parent, const char* name ) hl->addWidget( m_pToggle ); hl->addStretch( 1 ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMPluginSettings::displaySettings( ) @@ -122,7 +122,7 @@ void PMPluginSettings::slotToggle( ) ( PMPluginListViewItem* ) m_pPluginsList->currentItem( ); if( item ) { - item->toggleStatus( ); + item->toggletqStatus( ); if( item->m_enabled ) m_pToggle->setText( i18n( "Deactivate" ) ); diff --git a/kpovmodeler/pmpluginsettings.h b/kpovmodeler/pmpluginsettings.h index 186ca074..42aa872d 100644 --- a/kpovmodeler/pmpluginsettings.h +++ b/kpovmodeler/pmpluginsettings.h @@ -34,11 +34,12 @@ class TQPushButton; class PMPluginSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMPluginSettings( TQWidget* parent, const char* name = 0 ); + PMPluginSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmpolynom.cpp b/kpovmodeler/pmpolynom.cpp index e44044c5..a281e947 100644 --- a/kpovmodeler/pmpolynom.cpp +++ b/kpovmodeler/pmpolynom.cpp @@ -130,11 +130,11 @@ void PMPolynom::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMPolynom::metaObject( ) const +PMMetaObject* PMPolynom::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Polynom", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Polynom", Base::tqmetaObject( ), createNewPolynom ); s_pMetaObject->addProperty( new PMPolynomProperty( "polynomOrder", &PMPolynom::setPolynomOrder, @@ -158,9 +158,9 @@ void PMPolynom::cleanUp( ) const Base::cleanUp( ); } -PMDialogEditBase* PMPolynom::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMPolynom::editWidget( TQWidget* tqparent ) const { - return new PMPolynomEdit( parent ); + return new PMPolynomEdit( tqparent ); } void PMPolynom::setPolynomOrder( int o ) diff --git a/kpovmodeler/pmpolynom.h b/kpovmodeler/pmpolynom.h index 65a9ad20..cd0338f0 100644 --- a/kpovmodeler/pmpolynom.h +++ b/kpovmodeler/pmpolynom.h @@ -54,7 +54,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMPolynomEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmpolynomedit.cpp b/kpovmodeler/pmpolynomedit.cpp index e0e3bebc..7da978a1 100644 --- a/kpovmodeler/pmpolynomedit.cpp +++ b/kpovmodeler/pmpolynomedit.cpp @@ -29,8 +29,8 @@ #include <klocale.h> #include <kdialog.h> -PMPolynomEdit::PMPolynomEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMPolynomEdit::PMPolynomEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; m_currentOrder = 0; @@ -96,8 +96,8 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder, { if( m_currentOrder > 0 ) { - if( m_pPolyWidget->layout( ) ) - delete m_pPolyWidget->layout( ); + if( m_pPolyWidget->tqlayout( ) ) + delete m_pPolyWidget->tqlayout( ); m_labels.setAutoDelete( true ); m_labels.clear( ); diff --git a/kpovmodeler/pmpolynomedit.h b/kpovmodeler/pmpolynomedit.h index 1d745437..2a1e5898 100644 --- a/kpovmodeler/pmpolynomedit.h +++ b/kpovmodeler/pmpolynomedit.h @@ -39,12 +39,13 @@ class TQCheckBox; class PMPolynomEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMPolynomEdit with parent and name + * Creates a PMPolynomEdit with tqparent and name */ - PMPolynomEdit( TQWidget* parent, const char* name = 0 ); + PMPolynomEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmpovray31serialization.cpp b/kpovmodeler/pmpovray31serialization.cpp index d153261d..9e057c56 100644 --- a/kpovmodeler/pmpovray31serialization.cpp +++ b/kpovmodeler/pmpovray31serialization.cpp @@ -21,7 +21,7 @@ const double c_defaultPatchFlatness = 0; -void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMBicubicPatch* o = ( PMBicubicPatch* ) object; @@ -53,7 +53,7 @@ void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj dev->writeLine( line ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -102,16 +102,16 @@ void PMPov31SerBlendMapModifiers( const PMObject* object, const PMMetaObject*, P } } -void PMPov31SerBlob( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerBlob( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMBlob* o = ( PMBlob* ) object; dev->objectBegin( "blob" ); dev->writeName( object->name( ) ); - dev->writeLine( TQString( "threshold %1" ).arg( o->threshold( ) ) ); + dev->writeLine( TQString( "threshold %1" ).tqarg( o->threshold( ) ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->sturm( ) ) dev->writeLine( "sturm" ); @@ -121,7 +121,7 @@ void PMPov31SerBlob( const PMObject* object, const PMMetaObject* metaObject, PMO dev->objectEnd( ); } -void PMPov31SerBlobCylinder( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerBlobCylinder( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMBlobCylinder* o = ( PMBlobCylinder* ) object; @@ -132,36 +132,36 @@ void PMPov31SerBlobCylinder( const PMObject* object, const PMMetaObject* metaObj str1.setNum( o->radius( ) ); dev->writeLine( o->end1( ).serialize( ) + ", " + o->end2( ).serialize( ) + ", " + str1 + "," ); - dev->writeLine( TQString( "strength %1" ).arg( o->strength( ) ) ); + dev->writeLine( TQString( "strength %1" ).tqarg( o->strength( ) ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerBlobSphere( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerBlobSphere( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMBlobSphere* o = ( PMBlobSphere* ) object; dev->objectBegin( "sphere" ); dev->writeName( object->name( ) ); - dev->writeLine( o->centre( ).serialize( ) + TQString( ", %1," ).arg( o->radius( ) ) ); - dev->writeLine( TQString( "strength %1" ).arg( o->strength( ) ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->writeLine( o->centre( ).serialize( ) + TQString( ", %1," ).tqarg( o->radius( ) ) ); + dev->writeLine( TQString( "strength %1" ).tqarg( o->strength( ) ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerBoundedBy( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerBoundedBy( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMBoundedBy* o = ( PMBoundedBy* ) object; dev->objectBegin( "bounded_by" ); if( o->clippedBy( ) ) dev->writeLine( "clipped_by" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerBox( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerBox( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMBox* o = ( PMBox* ) object; @@ -170,7 +170,7 @@ void PMPov31SerBox( const PMObject* object, const PMMetaObject* metaObject, PMOu dev->writeName( object->name( ) ); dev->writeLine( o->corner1( ).serialize( ) + ", " + o->corner2( ).serialize( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -257,7 +257,7 @@ void PMPov31SerBumpMap( const PMObject* object, const PMMetaObject*, PMOutputDev dev->objectEnd( ); } -void PMPov31SerCamera( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerCamera( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMCamera* o = ( PMCamera* ) object; @@ -301,18 +301,18 @@ void PMPov31SerCamera( const PMObject* object, const PMMetaObject* metaObject, P dev->writeLine( "variance " + str ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerClippedBy( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerClippedBy( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMClippedBy* o = ( PMClippedBy* ) object; dev->objectBegin( "clipped_by" ); if( o->boundedBy( ) ) dev->writeLine( "bounded_by" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -334,7 +334,7 @@ void PMPov31SerCompositeObject( const PMObject* object, const PMMetaObject*, PMO dev->serialize( tmp ); } -void PMPov31SerCone( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerCone( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMCone* o = ( PMCone* ) object; @@ -349,11 +349,11 @@ void PMPov31SerCone( const PMObject* object, const PMMetaObject* metaObject, PMO if( o->open( ) ) dev->writeLine( TQString( "open" ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerCSG( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerCSG( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMCSG* o = ( PMCSG* ) object; @@ -374,11 +374,11 @@ void PMPov31SerCSG( const PMObject* object, const PMMetaObject* metaObject, PMOu } dev->writeName( object->name( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerCylinder( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerCylinder( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMCylinder* o = ( PMCylinder* ) object; @@ -392,36 +392,36 @@ void PMPov31SerCylinder( const PMObject* object, const PMMetaObject* metaObject, if( o->open( ) ) dev->writeLine( TQString( "open" ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerDeclare( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerDeclare( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMDeclare* o = ( PMDeclare* ) object; if( o->firstChild( ) ) { dev->declareBegin( o->id( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } } -void PMPov31SerDensity( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerDensity( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { bool bObject = true; - if( object->parent( ) ) - if( object->parent( )->type( ) == "DensityMap" ) + if( object->tqparent( ) ) + if( object->tqparent( )->type( ) == "DensityMap" ) bObject = false; if( bObject ) dev->objectBegin( "density" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( bObject ) dev->objectEnd( ); } -void PMPov31SerDisc( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerDisc( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMDisc* o = ( PMDisc* ) object; @@ -439,11 +439,11 @@ void PMPov31SerDisc( const PMObject* object, const PMMetaObject* metaObject, PMO { dev->writeLine( o->center( ).serialize( ) + "," + o->normal( ).serialize( ) + ", " + str1 ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerFinish( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerFinish( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMFinish* o = ( PMFinish* ) object; @@ -451,7 +451,7 @@ void PMPov31SerFinish( const PMObject* object, const PMMetaObject* metaObject, P dev->objectBegin( "finish" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->isAmbientEnabled( ) ) dev->writeLine( "ambient " + o->ambientColor( ).serialize( ) ); @@ -544,7 +544,7 @@ void PMPov31SerFog( const PMObject* object, const PMMetaObject*, PMOutputDevice* if( text.isEmpty( ) ) text = o->description( ); - dev->writeComment( TQString( "No prototype for %1" ).arg( text ) ); + dev->writeComment( TQString( "No prototype for %1" ).tqarg( text ) ); } } @@ -587,8 +587,8 @@ void PMPov31SerFog( const PMObject* object, const PMMetaObject*, PMOutputDevice* dev->writeLine( "fog_alt " + str ); dev->writeLine( "up " + o->up( ).serialize( ) ); } - // Serialize the children of this object - dev->callSerialization( object, object->metaObject( )->superClass( )->superClass( ) ); + // Serialize the tqchildren of this object + dev->callSerialization( object, object->tqmetaObject( )->superClass( )->superClass( ) ); dev->objectEnd( ); } @@ -708,16 +708,16 @@ void PMPov31SerGlobalSettings( const PMObject* object, const PMMetaObject*, PMOu dev->objectEnd( ); } -void PMPov31SerGraphicalObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerGraphicalObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMGraphicalObject* o = ( PMGraphicalObject* ) object; - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->noShadow( ) ) dev->writeLine( "no_shadow" ); } -void PMPov31SerHeightField( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerHeightField( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMHeightField* o = ( PMHeightField* ) object; @@ -727,13 +727,13 @@ void PMPov31SerHeightField( const PMObject* object, const PMMetaObject* metaObje dev->writeLine( o->typeToString( o->heightFieldType( ) ) + " \"" + o->fileName( ) + "\"" ); if( o->waterLevel( ) > 0.0 ) - dev->writeLine( TQString( "water_level %1" ).arg( o->waterLevel( ) ) ); + dev->writeLine( TQString( "water_level %1" ).tqarg( o->waterLevel( ) ) ); if( !o->hierarchy( ) ) dev->writeLine( "hierarchy off" ); if( o->smooth( ) ) dev->writeLine( "smooth" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -842,14 +842,14 @@ void PMPov31SerImageMap( const PMObject* object, const PMMetaObject*, PMOutputDe dev->objectEnd( ); } -void PMPov31SerInterior( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerInterior( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMInterior* o = ( PMInterior* ) object; TQString str1; dev->objectBegin( "interior" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->isIorEnabled( ) ) { @@ -874,7 +874,7 @@ void PMPov31SerInterior( const PMObject* object, const PMMetaObject* metaObject, dev->objectEnd( ); } -void PMPov31SerJuliaFractal( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerJuliaFractal( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMJuliaFractal* o = ( PMJuliaFractal* ) object; @@ -885,22 +885,22 @@ void PMPov31SerJuliaFractal( const PMObject* object, const PMMetaObject* metaObj dev->writeLine( o->algebraTypeToString( o->algebraType( ) ) ); if( o->functionType( ) == PMJuliaFractal::FTpwr ) - dev->writeLine( TQString( "pwr(%1, %2)" ).arg( o->exponent( )[0] ). + dev->writeLine( TQString( "pwr(%1, %2)" ).tqarg( o->exponent( )[0] ). arg( o->exponent( )[1] ) ); else dev->writeLine( o->functionTypeToString( o->functionType( ) ) ); - dev->writeLine( TQString( "max_iteration %1" ).arg( o->maximumIterations( ) ) ); - dev->writeLine( TQString( "precision %1" ).arg( o->precision( ) ) ); - dev->writeLine( TQString( "slice %1, %2" ).arg( o->sliceNormal( ).serialize( ) ) - .arg( o->sliceDistance( ) ) ); + dev->writeLine( TQString( "max_iteration %1" ).tqarg( o->maximumIterations( ) ) ); + dev->writeLine( TQString( "precision %1" ).tqarg( o->precision( ) ) ); + dev->writeLine( TQString( "slice %1, %2" ).tqarg( o->sliceNormal( ).serialize( ) ) + .tqarg( o->sliceDistance( ) ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerLathe( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerLathe( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMLathe* o = ( PMLathe* ) object; @@ -925,7 +925,7 @@ void PMPov31SerLathe( const PMObject* object, const PMMetaObject* metaObject, PM } int num = o->points( ).count( ); - dev->writeLine( TQString( "%1," ).arg( num ) ); + dev->writeLine( TQString( "%1," ).tqarg( num ) ); bool first = true; TQValueList<PMVector> points = o->points( ); @@ -942,14 +942,14 @@ void PMPov31SerLathe( const PMObject* object, const PMMetaObject* metaObject, PM if( o->sturm( ) ) dev->writeLine( "sturm" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } const double c_defaultLightTightness = 10; const int c_defaultLightAdaptive = 0; -void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerLight( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMLight* o = ( PMLight* ) object; @@ -968,10 +968,10 @@ void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PM if( ( o->lightType( ) == PMLight::SpotLight ) || ( o->lightType( ) == PMLight::CylinderLight ) ) { - dev->writeLine( TQString( "radius %1" ).arg( o->radius( ) ) ); - dev->writeLine( TQString( "falloff %1" ).arg( o->falloff( ) ) ); + dev->writeLine( TQString( "radius %1" ).tqarg( o->radius( ) ) ); + dev->writeLine( TQString( "falloff %1" ).tqarg( o->falloff( ) ) ); if( o->tightness( ) != c_defaultLightTightness ) - dev->writeLine( TQString( "tightness %1" ).arg( o->tightness( ) ) ); + dev->writeLine( TQString( "tightness %1" ).tqarg( o->tightness( ) ) ); dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) ); } @@ -979,17 +979,17 @@ void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PM { dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( ) + TQString( ", " ) + o->axis2( ).serialize( ) - + TQString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) ); + + TQString( ", %1, %2" ).tqarg( o->size1( ) ).tqarg( o->size2( ) ) ); if( o->adaptive( ) != c_defaultLightAdaptive ) - dev->writeLine( TQString( "adaptive %1" ).arg( o->adaptive( ) ) ); + dev->writeLine( TQString( "adaptive %1" ).tqarg( o->adaptive( ) ) ); if( o->jitter( ) ) dev->writeLine( TQString( "jitter" ) ); } if( o->fading( ) ) { - dev->writeLine( TQString( "fade_distance %1" ).arg( o->fadeDistance( ) ) ); - dev->writeLine( TQString( "fade_power %1" ).arg( o->fadePower( ) ) ); + dev->writeLine( TQString( "fade_distance %1" ).tqarg( o->fadeDistance( ) ) ); + dev->writeLine( TQString( "fade_power %1" ).tqarg( o->fadePower( ) ) ); } if( !o->mediaInteraction( ) ) @@ -997,11 +997,11 @@ void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PM if( !o->mediaAttenuation( ) ) dev->writeLine( TQString( "media_attenuation off" ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerListPattern( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerListPattern( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMListPattern* o = ( PMListPattern* ) object; @@ -1020,7 +1020,7 @@ void PMPov31SerListPattern( const PMObject* object, const PMMetaObject* metaObje break; } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->listType( ) == PMListPattern::ListPatternBrick ) { @@ -1031,24 +1031,24 @@ void PMPov31SerListPattern( const PMObject* object, const PMMetaObject* metaObje } } -void PMPov31SerTextureList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerTextureList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } -void PMPov31SerPigmentList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerPigmentList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } -void PMPov31SerColorList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerColorList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } -void PMPov31SerDensityList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerDensityList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } void PMPov31SerNormalList( const PMObject* object, const PMMetaObject*, PMOutputDevice* dev ) @@ -1083,22 +1083,22 @@ void PMPov31SerNormalList( const PMObject* object, const PMMetaObject*, PMOutput } } -void PMPov31SerLooksLike( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerLooksLike( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "looks_like" ); dev->writeName( object->name( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerMaterial( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerMaterial( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "material" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerMaterialMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerMaterialMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMMaterialMap* o = ( PMMaterialMap* ) object; @@ -1169,7 +1169,7 @@ void PMPov31SerMaterialMap( const PMObject* object, const PMMetaObject* metaObje break; } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -1183,7 +1183,7 @@ const double c_defaultMediaRatio = 0.9; const double c_defaultMediaScatteringEccentricity = 0; const double c_defaultMediaScatteringExtinction = 1.0; -void PMPov31SerMedia( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerMedia( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMMedia* o = ( PMMedia* ) object; @@ -1191,7 +1191,7 @@ void PMPov31SerMedia( const PMObject* object, const PMMetaObject* metaObject, PM TQString str2; dev->objectBegin( "media" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->intervals( ) != c_defaultMediaIntervals ) { str1.setNum( o->intervals( ) ); @@ -1248,25 +1248,25 @@ void PMPov31SerMedia( const PMObject* object, const PMMetaObject* metaObject, PM dev->objectEnd( ); } -void PMPov31SerNamedObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerNamedObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } -void PMPov31SerNormal( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerNormal( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMNormal* o = ( PMNormal* ) object; TQString str1; bool bObject = true; - if( o->parent( ) ) - if( o->parent( )->type( ) == "NormalMap" ) + if( o->tqparent( ) ) + if( o->tqparent( )->type( ) == "NormalMap" ) bObject = false; if( bObject ) dev->objectBegin( "normal" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->isBumpSizeEnabled( ) ) { str1.setNum( o->bumpSize( ) ); @@ -1276,7 +1276,7 @@ void PMPov31SerNormal( const PMObject* object, const PMMetaObject* metaObject, P dev->objectEnd( ); } -void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMObjectLink* o = ( PMObjectLink* ) object; @@ -1289,7 +1289,7 @@ void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* metaObjec dev->writeName( object->name( ) ); dev->writeLine( o->linkedObject( )->id( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); writeComment = false; dev->objectEnd( ); @@ -1302,7 +1302,7 @@ void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* metaObjec if( text.isEmpty( ) ) text = o->description( ); - dev->writeComment( TQString( "No prototype for %1" ).arg( text ) ); + dev->writeComment( TQString( "No prototype for %1" ).tqarg( text ) ); } } @@ -1404,9 +1404,9 @@ void PMPov31SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev break; } // depth - if( o->parent( ) ) + if( o->tqparent( ) ) { - if( o->depth( ) && o->parent( )->type( ) == "Normal" ) + if( o->depth( ) && o->tqparent( )->type( ) == "Normal" ) { str.setNum( o->depth( ) ); dev->writeLine( str ); @@ -1453,23 +1453,23 @@ void PMPov31SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev } } -void PMPov31SerPigment( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerPigment( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMPigment* o = ( PMPigment* ) object; bool bObject = true; - if( o->parent( ) ) - if( o->parent( )->type( ) == "PigmentMap" ) + if( o->tqparent( ) ) + if( o->tqparent( )->type( ) == "PigmentMap" ) bObject = false; if( bObject ) dev->objectBegin( "pigment" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( bObject ) dev->objectEnd( ); } -void PMPov31SerPlane( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerPlane( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMPlane* o = ( PMPlane* ) object; @@ -1479,11 +1479,11 @@ void PMPov31SerPlane( const PMObject* object, const PMMetaObject* metaObject, PM TQString str1; str1.setNum( o->distance( ) ); dev->writeLine( o->normal( ).serialize( ) + ", " + str1 ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMPolynom* o = ( PMPolynom* ) object; PMVector coefficients = o->coefficients( ); @@ -1501,18 +1501,18 @@ void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* metaObject, if( o->polynomOrder( ) == 2 ) { - dev->writeLine( TQString( "<%1, %2, %3>," ).arg( coefficients[0] ) - .arg( coefficients[4] ).arg( coefficients[7] ) ); - dev->writeLine( TQString( "<%1, %2, %3>," ).arg( coefficients[1] ) - .arg( coefficients[2] ).arg( coefficients[5] ) ); - dev->writeLine( TQString( "<%1, %2, %3>, %4" ).arg( coefficients[3] ) - .arg( coefficients[6] ).arg( coefficients[8] ) - .arg( coefficients[9] ) ); + dev->writeLine( TQString( "<%1, %2, %3>," ).tqarg( coefficients[0] ) + .tqarg( coefficients[4] ).tqarg( coefficients[7] ) ); + dev->writeLine( TQString( "<%1, %2, %3>," ).tqarg( coefficients[1] ) + .tqarg( coefficients[2] ).tqarg( coefficients[5] ) ); + dev->writeLine( TQString( "<%1, %2, %3>, %4" ).tqarg( coefficients[3] ) + .tqarg( coefficients[6] ).tqarg( coefficients[8] ) + .tqarg( coefficients[9] ) ); } else { if( o->polynomOrder( ) > 4 ) - dev->writeLine( TQString( "%1," ).arg( o->polynomOrder( ) ) ); + dev->writeLine( TQString( "%1," ).tqarg( o->polynomOrder( ) ) ); int size = coefficients.size( ); @@ -1537,7 +1537,7 @@ void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* metaObject, dev->writeLine( "sturm" ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -1545,17 +1545,17 @@ void PMPov31SerPovrayMatrix( const PMObject* object, const PMMetaObject*, PMOutp { PMPovrayMatrix* o = ( PMPovrayMatrix* ) object; - dev->writeLine( TQString( "matrix < %1, %2, %3," ).arg( o->values( )[0] ) - .arg( o->values( )[1] ).arg( o->values( )[2] ) ); - dev->writeLine( TQString( " %1, %2, %3," ).arg( o->values( )[3] ) - .arg( o->values( )[4] ).arg( o->values( )[5] ) ); - dev->writeLine( TQString( " %1, %2, %3," ).arg( o->values( )[6] ) - .arg( o->values( )[7] ).arg( o->values( )[8] ) ); - dev->writeLine( TQString( " %1, %2, %3 >" ).arg( o->values( )[9] ) - .arg( o->values( )[10] ).arg( o->values( )[11] ) ); + dev->writeLine( TQString( "matrix < %1, %2, %3," ).tqarg( o->values( )[0] ) + .tqarg( o->values( )[1] ).tqarg( o->values( )[2] ) ); + dev->writeLine( TQString( " %1, %2, %3," ).tqarg( o->values( )[3] ) + .tqarg( o->values( )[4] ).tqarg( o->values( )[5] ) ); + dev->writeLine( TQString( " %1, %2, %3," ).tqarg( o->values( )[6] ) + .tqarg( o->values( )[7] ).tqarg( o->values( )[8] ) ); + dev->writeLine( TQString( " %1, %2, %3 >" ).tqarg( o->values( )[9] ) + .tqarg( o->values( )[10] ).tqarg( o->values( )[11] ) ); } -void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerPrism( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMPrism* o = ( PMPrism* ) object; @@ -1587,7 +1587,7 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM dev->writeLine( "conic_sweep" ); break; } - dev->writeLine( TQString( "%1, %2," ).arg( o->height1( ) ).arg( o->height2( ) ) ); + dev->writeLine( TQString( "%1, %2," ).tqarg( o->height1( ) ).tqarg( o->height2( ) ) ); // count number of points TQValueList< TQValueList<PMVector> > points = o->points( ); @@ -1600,7 +1600,7 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM else lines += ( *spit ).count( ) / 3 * 4; } - dev->writeLine( TQString( "%1," ).arg( lines ) ); + dev->writeLine( TQString( "%1," ).tqarg( lines ) ); for( spit = points.begin( ); spit != points.end( ); ++spit ) { @@ -1628,7 +1628,7 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM if( o->sturm( ) ) dev->writeLine( "sturm" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -1639,14 +1639,14 @@ void PMPov31SerQuickColor( const PMObject* object, const PMMetaObject*, PMOutput dev->writeLine( "quick_color " + o->color( ).serialize( ) ); } -void PMPov31SerRainbow( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerRainbow( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMRainbow* o = ( PMRainbow* ) object; TQString str1; dev->objectBegin( "rainbow" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->isDirectionEnabled( ) ) dev->writeLine( "direction " + o->direction( ).serialize( ) ); @@ -1756,20 +1756,20 @@ void PMPov31SerScale( const PMObject* object, const PMMetaObject* , PMOutputDevi if( approx( scale[0], scale[1] ) && approx( scale[1], scale[2] ) ) - dev->writeLine( TQString( "scale %1" ).arg( scale[0] ) ); + dev->writeLine( TQString( "scale %1" ).tqarg( scale[0] ) ); else dev->writeLine( "scale " + scale.serialize( ) ); } -void PMPov31SerScene( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerScene( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } -void PMPov31SerSkySphere( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerSkySphere( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "sky_sphere" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -1792,11 +1792,11 @@ void PMPov31SerSolidColor( const PMObject* object, const PMMetaObject* , PMOutpu dev->writeLine( o->color( ).serialize( true ) ); } -void PMPov31SerSolidObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerSolidObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMSolidObject* o = ( PMSolidObject* ) object; - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); switch( o->hollow( ) ) { case PMTrue: @@ -1812,7 +1812,7 @@ void PMPov31SerSolidObject( const PMObject* object, const PMMetaObject* metaObje dev->writeLine( "inverse" ); } -void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMSurfaceOfRevolution* o = ( PMSurfaceOfRevolution* ) object; @@ -1821,7 +1821,7 @@ void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject* dev->writeName( object->name( ) ); int num = o->points( ).count( ); - dev->writeLine( TQString( "%1," ).arg( num ) ); + dev->writeLine( TQString( "%1," ).tqarg( num ) ); bool first = true; TQValueList<PMVector> points = o->points( ); @@ -1840,11 +1840,11 @@ void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject* if( o->sturm( ) ) dev->writeLine( "sturm" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerSphere( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerSphere( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMSphere* o = ( PMSphere* ) object; @@ -1853,25 +1853,25 @@ void PMPov31SerSphere( const PMObject* object, const PMMetaObject* metaObject, P TQString str; str.setNum( o->radius( ) ); dev->writeLine( o->centre( ).serialize( ) + ", " + str ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerSuperquadricEllipsoid( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerSuperquadricEllipsoid( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMSuperquadricEllipsoid* o = ( PMSuperquadricEllipsoid* ) object; dev->objectBegin( "superellipsoid" ); dev->writeName( object->name( ) ); - dev->writeLine( TQString( "<%1, %2>" ).arg( o->eastWestExponent( ) ) - .arg( o->northSouthExponent( ) ) ); + dev->writeLine( TQString( "<%1, %2>" ).tqarg( o->eastWestExponent( ) ) + .tqarg( o->northSouthExponent( ) ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerText( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerText( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMText* o = ( PMText* ) object; @@ -1880,30 +1880,30 @@ void PMPov31SerText( const PMObject* object, const PMMetaObject* metaObject, PMO dev->writeName( object->name( ) ); dev->writeLine( TQString( "ttf \"" ) + o->font( ) + "\"" ); dev->writeLine( PMOutputDevice::escapeAndQuoteString( o->text( ) ) ); - dev->writeLine( TQString( "%1, " ).arg( o->thickness( ) ) + dev->writeLine( TQString( "%1, " ).tqarg( o->thickness( ) ) + o->offset( ).serialize( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerTexture( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerTexture( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMTexture* o = ( PMTexture* ) object; bool bObject = true; - if( o->parent( ) ) - if( o->parent( )->type( ) == "TextureMap" ) + if( o->tqparent( ) ) + if( o->tqparent( )->type( ) == "TextureMap" ) bObject = false; if( bObject ) dev->objectBegin( "texture" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( bObject ) dev->objectEnd( ); } -void PMPov31SerTextureBase( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerTextureBase( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMTextureBase* o = ( PMTextureBase* ) object; @@ -1922,11 +1922,11 @@ void PMPov31SerTextureBase( const PMObject* object, const PMMetaObject* metaObje if( text.isEmpty( ) ) text = o->description( ); - dev->writeComment( TQString( "No prototype for %1" ).arg( text ) ); + dev->writeComment( TQString( "No prototype for %1" ).tqarg( text ) ); } } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMOutputDevice* dev ) @@ -1950,7 +1950,7 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO if( text.isEmpty( ) ) text = o->description( ); - dev->writeComment( TQString( "No prototype for %1" ).arg( text ) ); + dev->writeComment( TQString( "No prototype for %1" ).tqarg( text ) ); } } @@ -1962,7 +1962,7 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO value = 1.0; if( it != mapValues.end( ) ) value = *it; - dev->write( TQString( "[ %1 " ).arg( value ) ); + dev->write( TQString( "[ %1 " ).tqarg( value ) ); dev->serialize( c ); dev->writeLine( "]" ); ++it; @@ -1970,49 +1970,49 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO } } -void PMPov31SerTextureMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerTextureMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "texture_map" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerPigmentMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerPigmentMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "pigment_map" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerColorMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerColorMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "color_map" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerNormalMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerNormalMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "normal_map" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerSlopeMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerSlopeMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "slope_map" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerDensityMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerDensityMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "density_map" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov31SerTorus( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerTorus( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMTorus* o = ( PMTorus* ) object; @@ -2027,7 +2027,7 @@ void PMPov31SerTorus( const PMObject* object, const PMMetaObject* metaObject, PM if( o->sturm( ) ) dev->writeLine( TQString( "sturm" ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -2081,7 +2081,7 @@ void PMPov31SerTranslate( const PMObject* object, const PMMetaObject* , PMOutput dev->writeLine( "translate " + vector ); } -void PMPov31SerTriangle( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerTriangle( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMTriangle* o = ( PMTriangle* ) object; @@ -2094,7 +2094,7 @@ void PMPov31SerTriangle( const PMObject* object, const PMMetaObject* metaObject, dev->writeLine( o->point( 1 ).serialize( ) + ", " + o->normal( 1 ).serialize( ) + "," ); dev->writeLine( o->point( 2 ).serialize( ) + ", " + o->normal( 2 ).serialize( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } else @@ -2105,7 +2105,7 @@ void PMPov31SerTriangle( const PMObject* object, const PMMetaObject* metaObject, dev->writeLine( o->point( 0 ).serialize( ) + ", " + o->point( 1 ).serialize( ) + ", " + o->point( 2 ).serialize( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } } @@ -2193,7 +2193,7 @@ void PMPov31SerWarp( const PMObject* object, const PMMetaObject* , PMOutputDevic dev->objectEnd( ); } -void PMPov31SerDetailObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov31SerDetailObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); } diff --git a/kpovmodeler/pmpovray31serialization.h b/kpovmodeler/pmpovray31serialization.h index 5c48c0cd..397ae9e9 100644 --- a/kpovmodeler/pmpovray31serialization.h +++ b/kpovmodeler/pmpovray31serialization.h @@ -24,80 +24,80 @@ class PMOutputDevice; // serialization methods for POV-Ray 3.1 -void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerBlendMapModifiers( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerBlob( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerBlobCylinder( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerBlobSphere( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerBoundedBy( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerBox( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerBumpMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerCamera( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerClippedBy( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerComment( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerCompositeObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerCone( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerCSG( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerCylinder( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerDeclare( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerDensity( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerDisc( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerFinish( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerFog( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerGlobalSettings( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerGraphicalObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerHeightField( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerImageMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerInterior( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerJuliaFractal( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerLathe( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerListPattern( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerTextureList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerPigmentList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerColorList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerDensityList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerNormalList( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerLooksLike( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerMaterial( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerMaterialMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerMedia( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerNamedObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerNormal( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerPattern( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerPigment( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerPlane( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerPovrayMatrix( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerQuickColor( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerRainbow( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerRaw( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerRotate( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerScale( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerScene( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerSkySphere( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerSlope( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerSolidColor( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerSolidObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerSphere( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerSuperquadricEllipsoid( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerText( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerTexture( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerTextureBase( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerTextureMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerPigmentMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerColorMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerNormalMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerSlopeMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerDensityMap( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerTorus( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerTranslate( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerTriangle( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerWarp( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov31SerDetailObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); +void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerBlendMapModifiers( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerBlob( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerBlobCylinder( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerBlobSphere( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerBoundedBy( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerBox( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerBumpMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerCamera( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerClippedBy( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerComment( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerCompositeObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerCone( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerCSG( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerCylinder( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerDeclare( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerDensity( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerDisc( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerFinish( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerFog( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerGlobalSettings( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerGraphicalObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerHeightField( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerImageMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerInterior( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerJuliaFractal( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerLathe( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerLight( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerListPattern( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerTextureList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerPigmentList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerColorList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerDensityList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerNormalList( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerLooksLike( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerMaterial( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerMaterialMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerMedia( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerNamedObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerNormal( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerPattern( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerPigment( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerPlane( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerPovrayMatrix( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerPrism( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerQuickColor( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerRainbow( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerRaw( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerRotate( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerScale( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerScene( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerSkySphere( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerSlope( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerSolidColor( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerSolidObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerSphere( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerSuperquadricEllipsoid( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerText( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerTexture( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerTextureBase( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerTextureMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerPigmentMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerColorMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerNormalMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerSlopeMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerDensityMap( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerTorus( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerTranslate( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerTriangle( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerWarp( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov31SerDetailObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); #endif diff --git a/kpovmodeler/pmpovray35serialization.cpp b/kpovmodeler/pmpovray35serialization.cpp index d567100e..d3f4ec95 100644 --- a/kpovmodeler/pmpovray35serialization.cpp +++ b/kpovmodeler/pmpovray35serialization.cpp @@ -58,7 +58,7 @@ const double c_defaultIsoOpen = false; const int c_defaultIsoMaxTrace = 1; const bool c_defaultIsoAllIntersections = false; -void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMIsoSurface* o = ( PMIsoSurface* ) object; TQString str; @@ -102,8 +102,8 @@ void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObjec } if( o->evaluate( ) ) { - str = TQString( "%1, %2, %3" ).arg( o->evaluateValue( 0 ) ) - .arg( o->evaluateValue( 1 ) ).arg( o->evaluateValue( 2 ) ); + str = TQString( "%1, %2, %3" ).tqarg( o->evaluateValue( 0 ) ) + .tqarg( o->evaluateValue( 1 ) ).tqarg( o->evaluateValue( 2 ) ); dev->writeLine( "evaluate " + str ); } if( o->allIntersections( ) ) @@ -116,14 +116,14 @@ void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObjec if( o->open( ) ) dev->writeLine( "open" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } const double c_defaultLightTightness = 10; const int c_defaultLightAdaptive = 0; -void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerLight( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMLight* o = ( PMLight* ) object; @@ -145,10 +145,10 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM if( ( o->lightType( ) == PMLight::SpotLight ) || ( o->lightType( ) == PMLight::CylinderLight ) ) { - dev->writeLine( TQString( "radius %1" ).arg( o->radius( ) ) ); - dev->writeLine( TQString( "falloff %1" ).arg( o->falloff( ) ) ); + dev->writeLine( TQString( "radius %1" ).tqarg( o->radius( ) ) ); + dev->writeLine( TQString( "falloff %1" ).tqarg( o->falloff( ) ) ); if( o->tightness( ) != c_defaultLightTightness ) - dev->writeLine( TQString( "tightness %1" ).arg( o->tightness( ) ) ); + dev->writeLine( TQString( "tightness %1" ).tqarg( o->tightness( ) ) ); dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) ); } @@ -156,9 +156,9 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM { dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( ) + TQString( ", " ) + o->axis2( ).serialize( ) - + TQString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) ); + + TQString( ", %1, %2" ).tqarg( o->size1( ) ).tqarg( o->size2( ) ) ); if( o->adaptive( ) != c_defaultLightAdaptive ) - dev->writeLine( TQString( "adaptive %1" ).arg( o->adaptive( ) ) ); + dev->writeLine( TQString( "adaptive %1" ).tqarg( o->adaptive( ) ) ); if( o->jitter( ) ) dev->writeLine( TQString( "jitter" ) ); if ( o->areaType( ) == PMLight::Circular ) @@ -169,8 +169,8 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM if( o->fading( ) ) { - dev->writeLine( TQString( "fade_distance %1" ).arg( o->fadeDistance( ) ) ); - dev->writeLine( TQString( "fade_power %1" ).arg( o->fadePower( ) ) ); + dev->writeLine( TQString( "fade_distance %1" ).tqarg( o->fadeDistance( ) ) ); + dev->writeLine( TQString( "fade_power %1" ).tqarg( o->fadePower( ) ) ); } if( !o->mediaInteraction( ) ) @@ -178,15 +178,15 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM if( !o->mediaAttenuation( ) ) dev->writeLine( TQString( "media_attenuation off" ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov35SerProjectedThrough( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerProjectedThrough( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "projected_through" ); dev->writeName( object->name( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -209,7 +209,7 @@ const double c_defaultGlobalSettingsMinimumReuse = 0.015; const int c_defaultGlobalSettingsNearestCount = 5; const int c_defaultGlobalSettingsRecursionLimit = 2; -void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMGlobalSettings* o = ( PMGlobalSettings* ) object; @@ -310,7 +310,7 @@ void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* metaO dev->objectEnd( ); } else - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -526,7 +526,7 @@ void PMPov35SerPhotons( const PMObject* object, const PMMetaObject*, PMOutputDev dev->objectBegin( "photons" ); - if( o->parent( ) && ( o->parent( )->type( ) == "Light" ) ) + if( o->tqparent( ) && ( o->tqparent( )->type( ) == "Light" ) ) { if( o->refraction( ) ) dev->writeLine( TQString( "refraction on" ) ); @@ -559,14 +559,14 @@ void PMPov35SerPhotons( const PMObject* object, const PMMetaObject*, PMOutputDev dev->objectEnd( ); } -void PMPov35SerInterior( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerInterior( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMInterior* o = ( PMInterior* ) object; TQString str1; dev->objectBegin( "interior" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->isIorEnabled( ) ) { @@ -601,14 +601,14 @@ void PMPov35SerInterior( const PMObject* object, const PMMetaObject* metaObject, dev->objectEnd( ); } -void PMPov35SerLightGroup( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerLightGroup( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMLightGroup* o = ( PMLightGroup* ) object; dev->objectBegin( "light_group" ); dev->writeName( object->name( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if ( o->globalLights( ) ) dev->writeLine( "global_lights on" ); @@ -779,9 +779,9 @@ void PMPov35SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev break; } // depth - if( o->parent( ) ) + if( o->tqparent( ) ) { - if( o->depth( ) && o->parent( )->type( ) == "Normal" ) + if( o->depth( ) && o->tqparent( )->type( ) == "Normal" ) { str.setNum( o->depth( ) ); dev->writeLine( str ); @@ -887,16 +887,16 @@ void PMPov35SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev const double c_defaultNormalAccuracy = 0.02; -void PMPov35SerNormal( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerNormal( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMNormal* o = ( PMNormal* ) object; TQString str1; bool bObject = true; - if( o->parent( ) ) + if( o->tqparent( ) ) { - if( o->parent( )->type( ) == "NormalMap" ) + if( o->tqparent( )->type( ) == "NormalMap" ) bObject = false; } @@ -907,7 +907,7 @@ void PMPov35SerNormal( const PMObject* object, const PMMetaObject* metaObject, P dev->writeLine( "uv_mapping" ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->isBumpSizeEnabled( ) ) { @@ -925,10 +925,10 @@ void PMPov35SerNormal( const PMObject* object, const PMMetaObject* metaObject, P dev->objectEnd( ); } -void PMPov35SerInteriorTexture( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerInteriorTexture( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { dev->objectBegin( "interior_texture" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } @@ -1057,7 +1057,7 @@ void PMPov35SerWarp( const PMObject* object, const PMMetaObject* , PMOutputDevic const double c_sphereSweepToleranceDefault = 1e-6; -void PMPov35SerSphereSweep( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerSphereSweep( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMSphereSweep* o = ( PMSphereSweep* ) object; @@ -1099,11 +1099,11 @@ void PMPov35SerSphereSweep( const PMObject* object, const PMMetaObject* metaObje dev->writeLine( "tolerance " + str1 ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov35SerFinish( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerFinish( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMFinish* o = ( PMFinish* ) object; @@ -1111,7 +1111,7 @@ void PMPov35SerFinish( const PMObject* object, const PMMetaObject* metaObject, P dev->objectBegin( "finish" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->isAmbientEnabled( ) ) dev->writeLine( "ambient " + o->ambientColor( ).serialize( ) ); @@ -1216,7 +1216,7 @@ void PMPov35SerFinish( const PMObject* object, const PMMetaObject* metaObject, P dev->objectEnd( ); } -void PMPov35SerMesh( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerMesh( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMMesh* o = ( PMMesh* ) object; @@ -1225,7 +1225,7 @@ void PMPov35SerMesh( const PMObject* object, const PMMetaObject* metaObject, PMO if( o->isInsideVectorEnabled( ) ) dev->writeLine( "inside_vector " + o->insideVector( ).serialize( ) ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( !o->hierarchy( ) ) dev->writeLine( "hierarchy off" ); @@ -1245,7 +1245,7 @@ const double c_defaultMediaAAThreshold = 0.1; const double c_defaultMediaScatteringEccentricity = 0; const double c_defaultMediaScatteringExtinction = 1.0; -void PMPov35SerMedia( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerMedia( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMMedia* o = ( PMMedia* ) object; @@ -1253,7 +1253,7 @@ void PMPov35SerMedia( const PMObject* object, const PMMetaObject* metaObject, PM TQString str2; dev->objectBegin( "media" ); - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->method( ) != c_defaultMediaMethod ) { @@ -1332,11 +1332,11 @@ void PMPov35SerMedia( const PMObject* object, const PMMetaObject* metaObject, PM dev->objectEnd( ); } -void PMPov35SerGraphicalObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerGraphicalObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMGraphicalObject* o = ( PMGraphicalObject* ) object; - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( o->noShadow( ) ) dev->writeLine( "no_shadow" ); @@ -1351,13 +1351,13 @@ void PMPov35SerGraphicalObject( const PMObject* object, const PMMetaObject* meta dev->writeLine( "double_illuminate" ); } -void PMPov35SerPigment( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerPigment( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMPigment* o = ( PMPigment* ) object; bool bObject = true; - if( o->parent( ) ) - if( o->parent( )->type( ) == "PigmentMap" ) + if( o->tqparent( ) ) + if( o->tqparent( )->type( ) == "PigmentMap" ) bObject = false; if( bObject ) @@ -1366,18 +1366,18 @@ void PMPov35SerPigment( const PMObject* object, const PMMetaObject* metaObject, if ( o->uvMapping() ) dev->writeLine( "uv_mapping" ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( bObject ) dev->objectEnd( ); } -void PMPov35SerTexture( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerTexture( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMTexture* o = ( PMTexture* ) object; bool bObject = true; - if( o->parent( ) ) - if( o->parent( )->type( ) == "TextureMap" ) + if( o->tqparent( ) ) + if( o->tqparent( )->type( ) == "TextureMap" ) bObject = false; if( bObject ) @@ -1386,14 +1386,14 @@ void PMPov35SerTexture( const PMObject* object, const PMMetaObject* metaObject, if ( o->uvMapping() ) dev->writeLine( "uv_mapping" ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); if( bObject ) dev->objectEnd( ); } const double c_defaultPatchFlatness = 0; -void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMBicubicPatch* o = ( PMBicubicPatch* ) object; @@ -1433,11 +1433,11 @@ void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj dev->writeLine( line ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } -void PMPov35SerTriangle( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) +void PMPov35SerTriangle( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ) { PMTriangle* o = ( PMTriangle* ) object; @@ -1466,6 +1466,6 @@ void PMPov35SerTriangle( const PMObject* object, const PMMetaObject* metaObject, " " + o->uvVector( 2 ).serialize( ) ); } - dev->callSerialization( object, metaObject->superClass( ) ); + dev->callSerialization( object, tqmetaObject->superClass( ) ); dev->objectEnd( ); } diff --git a/kpovmodeler/pmpovray35serialization.h b/kpovmodeler/pmpovray35serialization.h index 4e511d55..507b941b 100644 --- a/kpovmodeler/pmpovray35serialization.h +++ b/kpovmodeler/pmpovray35serialization.h @@ -24,26 +24,26 @@ class PMOutputDevice; // serialization methods for POV-Ray 3.5 -void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerProjectedThrough( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerRadiosity( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerGlobalPhotons( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerPhotons( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerInterior( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerLightGroup( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerPattern( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerNormal( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerInteriorTexture( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerWarp( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerSphereSweep( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerFinish( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerMesh( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerMedia( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerGraphicalObject( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerPigment( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerTexture( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); -void PMPov35SerTriangle( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ); +void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerLight( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerProjectedThrough( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerRadiosity( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerGlobalPhotons( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerPhotons( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerInterior( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerLightGroup( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerPattern( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerNormal( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerInteriorTexture( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerWarp( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerSphereSweep( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerFinish( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerMesh( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerMedia( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerGraphicalObject( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerPigment( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerTexture( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); +void PMPov35SerTriangle( const PMObject* object, const PMMetaObject* tqmetaObject, PMOutputDevice* dev ); #endif diff --git a/kpovmodeler/pmpovrayformat.cpp b/kpovmodeler/pmpovrayformat.cpp index 35e0881a..9824680a 100644 --- a/kpovmodeler/pmpovrayformat.cpp +++ b/kpovmodeler/pmpovrayformat.cpp @@ -32,7 +32,7 @@ PMPovrayFormat::~PMPovrayFormat( ) void PMPovrayFormat::registerMethod( const TQString& className, PMPovraySerializeMethod method ) { - PMPovraySerializeMethodInfo* info = m_methodDict.find( className ); + PMPovraySerializeMethodInfo* info = m_methodDict.tqfind( className ); if( info ) kdWarning( PMArea ) << "Serialization method for " << className << " shadows old implementation" << endl; @@ -48,5 +48,5 @@ void PMPovrayFormat::removeMethod( const TQString& className ) const PMPovraySerializeMethodInfo* PMPovrayFormat::serializationMethod( const TQString& className ) { - return m_methodDict.find( className ); + return m_methodDict.tqfind( className ); } diff --git a/kpovmodeler/pmpovraymatrix.cpp b/kpovmodeler/pmpovraymatrix.cpp index d51610f1..3a12f1eb 100644 --- a/kpovmodeler/pmpovraymatrix.cpp +++ b/kpovmodeler/pmpovraymatrix.cpp @@ -72,11 +72,11 @@ void PMPovrayMatrix::readAttributes( const PMXMLHelper& h ) m_values.resize( 12 ); } -PMMetaObject* PMPovrayMatrix::metaObject( ) const +PMMetaObject* PMPovrayMatrix::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "PovrayMatrix", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "PovrayMatrix", Base::tqmetaObject( ), createNewPovrayMatrix ); s_pMetaObject->addProperty( new PMPovrayMatrixProperty( "values", &PMPovrayMatrix::setValues, &PMPovrayMatrix::values ) ); @@ -108,9 +108,9 @@ void PMPovrayMatrix::setValues( const PMVector& v ) } } -PMDialogEditBase* PMPovrayMatrix::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMPovrayMatrix::editWidget( TQWidget* tqparent ) const { - return new PMPovrayMatrixEdit( parent ); + return new PMPovrayMatrixEdit( tqparent ); } void PMPovrayMatrix::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmpovraymatrix.h b/kpovmodeler/pmpovraymatrix.h index c4e0d886..4bdc2eee 100644 --- a/kpovmodeler/pmpovraymatrix.h +++ b/kpovmodeler/pmpovraymatrix.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMPovrayMatrixEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmmatrix" ); } diff --git a/kpovmodeler/pmpovraymatrixedit.cpp b/kpovmodeler/pmpovraymatrixedit.cpp index 1e0f7833..8bc4f9a5 100644 --- a/kpovmodeler/pmpovraymatrixedit.cpp +++ b/kpovmodeler/pmpovraymatrixedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMPovrayMatrixEdit::PMPovrayMatrixEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMPovrayMatrixEdit::PMPovrayMatrixEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmpovraymatrixedit.h b/kpovmodeler/pmpovraymatrixedit.h index 4b3b3512..7b5a52ea 100644 --- a/kpovmodeler/pmpovraymatrixedit.h +++ b/kpovmodeler/pmpovraymatrixedit.h @@ -35,12 +35,13 @@ class PMFloatEdit; class PMPovrayMatrixEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMPovrayMatrixEdit with parent and name + * Creates a PMPovrayMatrixEdit with tqparent and name */ - PMPovrayMatrixEdit( TQWidget* parent, const char* name = 0 ); + PMPovrayMatrixEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmpovrayoutputwidget.cpp b/kpovmodeler/pmpovrayoutputwidget.cpp index f7eb9da4..af56b62f 100644 --- a/kpovmodeler/pmpovrayoutputwidget.cpp +++ b/kpovmodeler/pmpovrayoutputwidget.cpp @@ -30,15 +30,15 @@ TQSize PMPovrayOutputWidget::s_size = TQSize( 400, 400 ); -PMPovrayOutputWidget::PMPovrayOutputWidget( TQWidget* parent, const char* name ) - : KDialog( parent, name ) +PMPovrayOutputWidget::PMPovrayOutputWidget( TQWidget* tqparent, const char* name ) + : KDialog( tqparent, name ) { TQVBoxLayout* topLayout = new TQVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) ); m_pTextView = new TQTextEdit( this ); topLayout->addWidget( m_pTextView, 1 ); m_pTextView->setFont( KGlobalSettings::fixedFont( ) ); - m_pTextView->setTextFormat( Qt::PlainText ); + m_pTextView->setTextFormat( TQt::PlainText ); m_pTextView->setReadOnly( true ); TQHBoxLayout* buttonLayout = new TQHBoxLayout( topLayout ); @@ -60,7 +60,7 @@ PMPovrayOutputWidget::~PMPovrayOutputWidget( ) void PMPovrayOutputWidget::slotClear( ) { - m_output = TQString::null; + m_output = TQString(); m_startOfLastLine = 0; m_pTextView->clear( ); } diff --git a/kpovmodeler/pmpovrayoutputwidget.h b/kpovmodeler/pmpovrayoutputwidget.h index e617dba1..a5fbe883 100644 --- a/kpovmodeler/pmpovrayoutputwidget.h +++ b/kpovmodeler/pmpovrayoutputwidget.h @@ -34,11 +34,12 @@ class KConfig; class PMPovrayOutputWidget : public KDialog { Q_OBJECT + TQ_OBJECT public: /** * Standard constructor */ - PMPovrayOutputWidget( TQWidget* parent = 0, const char* name = 0 ); + PMPovrayOutputWidget( TQWidget* tqparent = 0, const char* name = 0 ); /** * Destructor */ diff --git a/kpovmodeler/pmpovrayparser.cpp b/kpovmodeler/pmpovrayparser.cpp index 3755ce42..5889cd19 100644 --- a/kpovmodeler/pmpovrayparser.cpp +++ b/kpovmodeler/pmpovrayparser.cpp @@ -191,7 +191,7 @@ bool PMPovrayParser::parseBool( ) return true; } -bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, +bool PMPovrayParser::parseChildObjects( PMCompositeObject* tqparent, int max /* = -1 */ ) { PMObject* child = 0; @@ -202,10 +202,10 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, do { - if( !m_bLastPMCommentEmpty && parent ) + if( !m_bLastPMCommentEmpty && tqparent ) { - if( parent->isA( "NamedObject" ) ) - ( ( PMNamedObject* ) parent )->setName( m_lastPMComment ); + if( tqparent->isA( "NamedObject" ) ) + ( ( PMNamedObject* ) tqparent )->setName( m_lastPMComment ); m_bLastPMCommentEmpty = true; } if( m_skippedComments.count( ) > 0 ) @@ -230,8 +230,8 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, error = !parseBox( ( PMBox* ) child ); break; case SPHERE_TOK: - if( ( parent && ( parent->type( ) == "Blob" ) ) - || ( !parent && m_pTopParent + if( ( tqparent && ( tqparent->type( ) == "Blob" ) ) + || ( !tqparent && m_pTopParent && ( m_pTopParent->type( ) == "Blob" ) ) ) { child = new PMBlobSphere( m_pPart ); @@ -244,8 +244,8 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, } break; case CYLINDER_TOK: - if( ( parent && ( parent->type( ) == "Blob" ) ) - || ( !parent && m_pTopParent + if( ( tqparent && ( tqparent->type( ) == "Blob" ) ) + || ( !tqparent && m_pTopParent && ( m_pTopParent->type( ) == "Blob" ) ) ) { child = new PMBlobCylinder( m_pPart ); @@ -289,9 +289,9 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, child = new PMPlane( m_pPart ); error = !parsePlane( ( PMPlane* ) child ); break; - case QUADRIC_TOK: + case TQUADRIC_TOK: case CUBIC_TOK: - case QUARTIC_TOK: + case TQUARTIC_TOK: case POLY_TOK: child = new PMPolynom( m_pPart ); error = !parsePolynom( ( PMPolynom* ) child ); @@ -364,7 +364,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, case MARBLE_TOK: case ONION_TOK: case PLANAR_TOK: - case QUILTED_TOK: + case TQUILTED_TOK: case RADIAL_TOK: case RIPPLES_TOK: case SLOPE_TOK: @@ -378,14 +378,14 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, child = new PMPattern( m_pPart ); { bool normal = true; - if( parent && ( parent->type( ) != "Normal" ) ) + if( tqparent && ( tqparent->type( ) != "Normal" ) ) normal = false; error = !parsePattern( ( PMPattern* ) child, normal ); } break; case TURBULENCE_TOK: - // Search for a PMPattern in the object's children - child = parent->firstChild( ); + // Search for a PMPattern in the object's tqchildren + child = tqparent->firstChild( ); while( child && !child->isA( "Pattern" ) ) child = child->nextSibling( ); if( child ) @@ -408,8 +408,8 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, case SCALLOP_WAVE_TOK: case CUBIC_WAVE_TOK: case POLY_WAVE_TOK: - // Search for a PMBlendMapModifiers in the object's children - child = parent->firstChild( ); + // Search for a PMBlendMapModifiers in the object's tqchildren + child = tqparent->firstChild( ); while( child && !child->isA( "BlendMapModifiers" ) ) child = child->nextSibling( ); if( child ) @@ -478,7 +478,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, int expect = 0; PMListPattern::PMListType type = PMListPattern::ListPatternChecker; - if( parent && parent->type( ) == "Normal" ) + if( tqparent && tqparent->type( ) == "Normal" ) normal = true; else if( m_pTopParent && m_pTopParent->type( ) == "Normal" ) normal = true; @@ -640,7 +640,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, error = !parseMatrix( ( PMPovrayMatrix* ) child ); break; case BOUNDED_BY_TOK: - if( parent && ( parent->type( ) == "ClippedBy" ) ) + if( tqparent && ( tqparent->type( ) == "ClippedBy" ) ) finished = true; else { @@ -649,7 +649,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, } break; case CLIPPED_BY_TOK: - if( parent && ( parent->type( ) == "BoundedBy" ) ) + if( tqparent && ( tqparent->type( ) == "BoundedBy" ) ) finished = true; else { @@ -666,7 +666,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, error = !parseRadiosity( ( PMRadiosity* ) child ); break; case PHOTONS_TOK: - if ( parent && ( parent->type( ) == "GlobalSettings" ) ) + if ( tqparent && ( tqparent->type( ) == "GlobalSettings" ) ) { child = new PMGlobalPhotons( m_pPart ); error = !parseGlobalPhotons( ( PMGlobalPhotons* ) child ); @@ -733,9 +733,9 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, case SMOOTH_TRIANGLE_TOK: // infinite solid case PLANE_TOK: - case QUADRIC_TOK: + case TQUADRIC_TOK: case CUBIC_TOK: - case QUARTIC_TOK: + case TQUARTIC_TOK: case POLY_TOK: // csg case UNION_TOK: @@ -791,7 +791,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, printExpected( i18n( "identifier" ), m_pScanner->sValue( ) ); break; case OBJECT_TOK: - error = !parseObject( parent ); + error = !parseObject( tqparent ); noChild = true; break; case RAW_POVRAY_TOK: @@ -808,7 +808,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, error = true; if( child ) { - if( !insertChild( child, parent ) ) + if( !insertChild( child, tqparent ) ) { delete child; child = 0; @@ -972,7 +972,7 @@ bool PMPovrayParser::parseNumericItem( PMValue& v, bool checkForBool /*=false*/ else { printError( i18n( "Undefined identifier \"%1\"." ) - .arg( m_pScanner->sValue( ) ) ); + .tqarg( m_pScanner->sValue( ) ) ); nextToken( ); } break; @@ -2331,7 +2331,7 @@ bool PMPovrayParser::parseJuliaFractal( PMJuliaFractal* pNewFractal ) switch( m_token ) { - case QUATERNION_TOK: + case TQUATERNION_TOK: pNewFractal->setAlgebraType( PMJuliaFractal::Quaternion ); nextToken( ); break; @@ -2339,7 +2339,7 @@ bool PMPovrayParser::parseJuliaFractal( PMJuliaFractal* pNewFractal ) pNewFractal->setAlgebraType( PMJuliaFractal::Hypercomplex ); nextToken( ); break; - case SQR_TOK: + case STQR_TOK: pNewFractal->setFunctionType( PMJuliaFractal::FTsqr ); nextToken( ); break; @@ -2515,8 +2515,8 @@ bool PMPovrayParser::parsePolynom( PMPolynom* pNewPoly ) pNewPoly->setSturm( false ); - if( ( m_token == QUADRIC_TOK ) || ( m_token == CUBIC_TOK ) || - ( m_token == QUARTIC_TOK ) || ( m_token == POLY_TOK ) ) + if( ( m_token == TQUADRIC_TOK ) || ( m_token == CUBIC_TOK ) || + ( m_token == TQUARTIC_TOK ) || ( m_token == POLY_TOK ) ) { nextToken( ); if( !parseToken( '{' ) ) @@ -2525,7 +2525,7 @@ bool PMPovrayParser::parsePolynom( PMPolynom* pNewPoly ) else printExpected( "poly", m_pScanner->sValue( ) ); - if( type == QUADRIC_TOK ) + if( type == TQUADRIC_TOK ) { c = PMVector( 10 ); pNewPoly->setPolynomOrder( 2 ); @@ -2565,7 +2565,7 @@ bool PMPovrayParser::parsePolynom( PMPolynom* pNewPoly ) { if( type == CUBIC_TOK ) order = 3; - else if( type == QUARTIC_TOK ) + else if( type == TQUARTIC_TOK ) order = 4; else { @@ -2587,7 +2587,7 @@ bool PMPovrayParser::parsePolynom( PMPolynom* pNewPoly ) if( vector.size( ) != ( unsigned ) c_polynomSize[order] ) { printError( i18n( "%1 coefficients are needed for a polynom with order %2" ) - .arg( c_polynomSize[order] ).arg( order ) ); + .tqarg( c_polynomSize[order] ).tqarg( order ) ); vector.resize( c_polynomSize[order] ); } pNewPoly->setCoefficients( vector ); @@ -2846,7 +2846,7 @@ bool PMPovrayParser::parseLathe( PMLathe* pNewLathe ) nextToken( ); minp = 2; break; - case QUADRATIC_SPLINE_TOK: + case TQUADRATIC_SPLINE_TOK: pNewLathe->setSplineType( PMLathe::QuadraticSpline ); nextToken( ); minp = 3; @@ -2883,7 +2883,7 @@ bool PMPovrayParser::parseLathe( PMLathe* pNewLathe ) if( nump < minp ) printError( i18n( "At least %1 points are needed for that spline type" ) - .arg( minp ) ); + .tqarg( minp ) ); else if( ( pNewLathe->splineType( ) == PMLathe::BezierSpline ) && ( ( nump % 4 ) != 0 ) ) printError( i18n( "Bezier splines need 4 points for each segment" ) ); @@ -2934,7 +2934,7 @@ bool PMPovrayParser::parsePrism( PMPrism* pNewPrism ) nextToken( ); minp = 3; break; - case QUADRATIC_SPLINE_TOK: + case TQUADRATIC_SPLINE_TOK: pNewPrism->setSplineType( PMPrism::QuadraticSpline ); nextToken( ); minp = 4; @@ -3231,7 +3231,7 @@ bool PMPovrayParser::parseSor( PMSurfaceOfRevolution* pNewSor ) if( approxZero( ( *it1 )[1] - ( *it3 )[1], c_sorTolerance ) ) { printError( i18n( "The v coordinate of point %1 and %2 must be different; fixed" ) - .arg( pnr + 1 ).arg( pnr + 3 ) ); + .tqarg( pnr + 1 ).tqarg( pnr + 3 ) ); if( pnr == 0 ) ( *it1 )[1] = ( *it3 )[1] - c_sorTolerance; else @@ -3911,7 +3911,7 @@ bool PMPovrayParser::parsePattern( PMPattern* pattern, bool normal ) pattern->setPatternType( PMPattern::PatternPlanar ); type = true; break; - case QUILTED_TOK: + case TQUILTED_TOK: nextToken( ); pattern->setPatternType( PMPattern::PatternQuilted ); type = true; @@ -4658,7 +4658,7 @@ bool PMPovrayParser::parseNormalMap( PMNormalMap* normalMap ) { oldConsumed = m_consumedTokens; - // If we find '}' no need to search for an entry + // If we tqfind '}' no need to search for an entry if( m_token != '}' && parseToken( '[' ) ) { if( !parseFloat( f_number1 ) ) @@ -4958,7 +4958,7 @@ bool PMPovrayParser::parseSlopeMap( PMSlopeMap* slopeMap ) { oldConsumed = m_consumedTokens; - // If we find '}' no need to search for an entry + // If we tqfind '}' no need to search for an entry if( m_token != '}' && parseToken( '[' ) ) { if( !parseFloat( f_number1 ) ) @@ -5014,7 +5014,7 @@ bool PMPovrayParser::parseDensityMap( PMDensityMap* densityMap ) { oldConsumed = m_consumedTokens; - // If we find '}' no need to search for an entry + // If we tqfind '}' no need to search for an entry if( m_token != '}' && parseToken( '[' ) ) { if( !parseFloat( f_number1 ) ) @@ -6436,9 +6436,9 @@ bool PMPovrayParser::parseDeclare( PMDeclare* decl ) child = new PMPlane( m_pPart ); error = !parsePlane( ( PMPlane* ) child ); break; - case QUADRIC_TOK: + case TQUADRIC_TOK: case CUBIC_TOK: - case QUARTIC_TOK: + case TQUARTIC_TOK: case POLY_TOK: child = new PMPolynom( m_pPart ); error = !parsePolynom( ( PMPolynom* ) child ); @@ -6572,7 +6572,7 @@ bool PMPovrayParser::parseDeclare( PMDeclare* decl ) return !error; } -bool PMPovrayParser::parseObject( PMCompositeObject* parent ) +bool PMPovrayParser::parseObject( PMCompositeObject* tqparent ) { PMObject* child; bool error = false; @@ -6586,23 +6586,23 @@ bool PMPovrayParser::parseObject( PMCompositeObject* parent ) case ID_TOK: child = new PMObjectLink( m_pPart ); error = !parseObjectLink( ( PMObjectLink* ) child ); - if( !insertChild( child, parent ) ) + if( !insertChild( child, tqparent ) ) delete child; break; default: { PMObject* lastChild = 0; - if( parent ) - lastChild = parent->lastChild( ); + if( tqparent ) + lastChild = tqparent->lastChild( ); else lastChild = m_pResultList->last( ); - error = !parseChildObjects( parent, 1 ); + error = !parseChildObjects( tqparent, 1 ); if( !error ) { PMObject* newLast = 0; - if( parent ) - newLast = parent->lastChild( ); + if( tqparent ) + newLast = tqparent->lastChild( ); else newLast = m_pResultList->last( ); diff --git a/kpovmodeler/pmpovrayparser.h b/kpovmodeler/pmpovrayparser.h index 72306508..c00bdfbe 100644 --- a/kpovmodeler/pmpovrayparser.h +++ b/kpovmodeler/pmpovrayparser.h @@ -160,14 +160,14 @@ private: /** - * Looks for child objects, parses them and appends them to the parent - * object. If parent is 0, all objects are appended to the result list. + * Looks for child objects, parses them and appends them to the tqparent + * object. If tqparent is 0, all objects are appended to the result list. * * If max is > 0, then the maximum number of parsed objects is max. * * Returns true if there where no objects or parsing was successful. */ - bool parseChildObjects( PMCompositeObject* parent, int max = -1 ); + bool parseChildObjects( PMCompositeObject* tqparent, int max = -1 ); /** @@ -179,7 +179,7 @@ private: * If t is not a single character token, set tokenName to the token * name (like "box", "sphere" ...) */ - bool parseToken( int t, const TQString& tokenName = TQString::null ); + bool parseToken( int t, const TQString& tokenName = TQString() ); /** * Parses an item of a vector, float or color expression @@ -491,7 +491,7 @@ private: /** * Parse function for object keywords */ - bool parseObject( PMCompositeObject* parent ); + bool parseObject( PMCompositeObject* tqparent ); // POV-Ray 3.5 objects bool parseIsoSurface( PMIsoSurface* iso ); diff --git a/kpovmodeler/pmpovrayrenderwidget.cpp b/kpovmodeler/pmpovrayrenderwidget.cpp index 7581cbea..fb3cbf67 100644 --- a/kpovmodeler/pmpovrayrenderwidget.cpp +++ b/kpovmodeler/pmpovrayrenderwidget.cpp @@ -40,8 +40,8 @@ TQString PMPovrayRenderWidget::s_povrayCommand = c_defaultPovrayCommand; TQStringList PMPovrayRenderWidget::s_libraryPaths; -PMPovrayRenderWidget::PMPovrayRenderWidget( TQWidget* parent, const char* name ) - : PMDragWidget( parent, name ) +PMPovrayRenderWidget::PMPovrayRenderWidget( TQWidget* tqparent, const char* name ) + : PMDragWidget( tqparent, name ) { m_pProcess = 0; m_bSuspended = false; @@ -74,7 +74,7 @@ bool PMPovrayRenderWidget::render( const TQByteArray& scene, } // output to tmp file - m_pTempFile = new KTempFile( TQString::null, ".pov" ); + m_pTempFile = new KTempFile( TQString(), ".pov" ); TQDataStream* dstr = m_pTempFile->dataStream( ); if( ( m_pTempFile->status( ) != 0 ) || !dstr ) @@ -132,9 +132,9 @@ bool PMPovrayRenderWidget::render( const TQByteArray& scene, m_image.create( width, height, 32 ); m_image.setAlphaBuffer( m_renderMode.alpha( ) ); - m_image.fill( qRgb( 0, 0, 0 ) ); + m_image.fill( tqRgb( 0, 0, 0 ) ); m_bPixmapUpToDate = false; - repaint( ); + tqrepaint( ); if( !m_pProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { @@ -236,11 +236,11 @@ void PMPovrayRenderWidget::slotPovrayImage( KProcess*, char* buffer, int buflen if( m_bytespp == 4 ) setPixel( m_column, m_line, - qRgba( m_restBytes[2], m_restBytes[1], + tqRgba( m_restBytes[2], m_restBytes[1], m_restBytes[0], m_restBytes[3] ) ); else setPixel( m_column, m_line, - qRgb( m_restBytes[2], m_restBytes[1], m_restBytes[0] ) ); + tqRgb( m_restBytes[2], m_restBytes[1], m_restBytes[0] ) ); m_column++; m_rcvPixels++; @@ -259,11 +259,11 @@ void PMPovrayRenderWidget::slotPovrayImage( KProcess*, char* buffer, int buflen { if( m_bytespp == 4 ) setPixel( m_column, m_line, - qRgba( buffer[index+2], buffer[index+1], + tqRgba( buffer[index+2], buffer[index+1], buffer[index], buffer[index+3] ) ); else setPixel( m_column, m_line, - qRgb( buffer[index+2], buffer[index+1], + tqRgb( buffer[index+2], buffer[index+1], buffer[index] ) ); index += m_bytespp; @@ -393,7 +393,7 @@ void PMPovrayRenderWidget::cleanup( ) m_pTempFile = 0; } -TQSize PMPovrayRenderWidget::sizeHint( ) const +TQSize PMPovrayRenderWidget::tqsizeHint( ) const { TQSize s; if( m_image.isNull( ) ) @@ -401,7 +401,7 @@ TQSize PMPovrayRenderWidget::sizeHint( ) const else s = m_image.size( ); - return s.expandedTo( minimumSize( ) ); + return s.expandedTo( tqminimumSize( ) ); } void PMPovrayRenderWidget::saveConfig( KConfig* cfg ) diff --git a/kpovmodeler/pmpovrayrenderwidget.h b/kpovmodeler/pmpovrayrenderwidget.h index cc447b06..1fbd891a 100644 --- a/kpovmodeler/pmpovrayrenderwidget.h +++ b/kpovmodeler/pmpovrayrenderwidget.h @@ -43,11 +43,12 @@ class KTempFile; class PMPovrayRenderWidget : public PMDragWidget { Q_OBJECT + TQ_OBJECT public: /** * Standard constructor */ - PMPovrayRenderWidget( TQWidget* parent = 0, const char* name = 0 ); + PMPovrayRenderWidget( TQWidget* tqparent = 0, const char* name = 0 ); /** * destructor */ @@ -90,7 +91,7 @@ public: */ static void setPovrayLibraryPaths( const TQStringList& slist ) { s_libraryPaths = slist; } - virtual TQSize sizeHint( ) const; + virtual TQSize tqsizeHint( ) const; virtual void startDrag( ); signals: diff --git a/kpovmodeler/pmpovraysettings.cpp b/kpovmodeler/pmpovraysettings.cpp index 607c5752..a6828cbb 100644 --- a/kpovmodeler/pmpovraysettings.cpp +++ b/kpovmodeler/pmpovraysettings.cpp @@ -35,65 +35,65 @@ #include <kmessagebox.h> #include <kfiledialog.h> -PMPovraySettings::PMPovraySettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMPovraySettings::PMPovraySettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { m_selectionIndex = 0; - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQVBoxLayout* gvl; TQGroupBox* gb; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); gb = new TQGroupBox( i18n( "Povray Command" ), this ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Command:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Command:" ), gb ) ); m_pPovrayCommand = new TQLineEdit( gb ); - hlayout->addWidget( m_pPovrayCommand ); + htqlayout->addWidget( m_pPovrayCommand ); m_pBrowsePovrayCommand = new TQPushButton( gb ); m_pBrowsePovrayCommand->setPixmap( SmallIcon( "fileopen" ) ); connect( m_pBrowsePovrayCommand, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotBrowsePovrayCommand( ) ) ); - hlayout->addWidget( m_pBrowsePovrayCommand ); - vlayout->addWidget( gb ); + htqlayout->addWidget( m_pBrowsePovrayCommand ); + vtqlayout->addWidget( gb ); gb = new TQGroupBox( i18n( "Povray User Documentation" ), this ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Path:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Path:" ), gb ) ); m_pDocumentationPath = new TQLineEdit( gb ); - hlayout->addWidget( m_pDocumentationPath ); + htqlayout->addWidget( m_pDocumentationPath ); m_pBrowseDocumentationPath = new TQPushButton( gb ); m_pBrowseDocumentationPath->setPixmap( SmallIcon( "fileopen" ) ); connect( m_pBrowseDocumentationPath, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotBrowsePovrayDocumentation( ) ) ); - hlayout->addWidget( m_pBrowseDocumentationPath ); - vlayout->addWidget( gb ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Version:" ), gb ) ); + htqlayout->addWidget( m_pBrowseDocumentationPath ); + vtqlayout->addWidget( gb ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Version:" ), gb ) ); m_pDocumentationVersion = new TQComboBox( false, gb ); TQValueList<TQString> versions = PMDocumentationMap::theMap( )->availableVersions( ); TQValueListIterator<TQString> it; for( it = versions.begin( ); it != versions.end( ); ++it ) m_pDocumentationVersion->insertItem( *it ); - hlayout->addWidget( m_pDocumentationVersion ); - hlayout->addStretch( ); + htqlayout->addWidget( m_pDocumentationVersion ); + htqlayout->addStretch( ); gb = new TQGroupBox( i18n( "Library Paths" ), this ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); + htqlayout = new TQHBoxLayout( gvl ); m_pLibraryPaths = new TQListBox( gb ); connect( m_pLibraryPaths, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( slotPathSelected( int ) ) ); - hlayout->addWidget( m_pLibraryPaths ); + htqlayout->addWidget( m_pLibraryPaths ); - TQVBoxLayout* bl = new TQVBoxLayout( hlayout ); + TQVBoxLayout* bl = new TQVBoxLayout( htqlayout ); m_pAddLibraryPath = new TQPushButton( i18n( "Add..." ), gb ); connect( m_pAddLibraryPath, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPath( ) ) ); bl->addWidget( m_pAddLibraryPath ); @@ -113,9 +113,9 @@ PMPovraySettings::PMPovraySettings( TQWidget* parent, const char* name ) TQT_SLOT( slotPathDown( ) ) ); bl->addWidget( m_pLibraryPathDown ); bl->addStretch( 1 ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMPovraySettings::displaySettings( ) @@ -152,7 +152,7 @@ void PMPovraySettings::displayDefaults( ) { m_pPovrayCommand->setText( c_defaultPovrayCommand ); m_pDocumentationVersion->setCurrentItem( 0 ); - m_pDocumentationPath->setText( TQString::null ); + m_pDocumentationPath->setText( TQString() ); m_pLibraryPaths->clear(); } @@ -180,7 +180,7 @@ void PMPovraySettings::applySettings( ) PMPovrayRenderWidget::setPovrayLibraryPaths( plist ); PMResourceLocator::clearCache( ); PMText::povrayLibraryPathsChanged( ); - emit repaintViews( ); + emit tqrepaintViews( ); } } @@ -190,14 +190,10 @@ void PMPovraySettings::slotAddPath( ) KMessageBox::error( this, i18n( "Povray only supports up to 20 library paths." ) ); else { - TQString path = KFileDialog::getExistingDirectory( TQString::null, this ); + TQString path = KFileDialog::getExistingDirectory( TQString(), this ); if( !path.isEmpty( ) ) { -#if ( QT_VERSION >= 300 ) - TQListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch ); -#else - TQListBoxItem* item = 0; -#endif + TQListBoxItem* item = m_pLibraryPaths->tqfindItem( path, ExactMatch ); if( !item ) { m_pLibraryPaths->insertItem( path, m_selectionIndex + 1 ); @@ -254,11 +250,7 @@ void PMPovraySettings::slotEditPath( ) TQString path = KFileDialog::getExistingDirectory( text, this ); if( !path.isEmpty( ) ) { -#if ( QT_VERSION >= 300 ) - TQListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch ); -#else - TQListBoxItem* item = 0; -#endif + TQListBoxItem* item = m_pLibraryPaths->tqfindItem( path, ExactMatch ); if( !item ) m_pLibraryPaths->changeItem( path, m_selectionIndex ); else if( item != lbi ) @@ -289,7 +281,7 @@ void PMPovraySettings::slotPathSelected( int index ) void PMPovraySettings::slotBrowsePovrayCommand( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmpovraysettings.h b/kpovmodeler/pmpovraysettings.h index 6858eb5f..5b267880 100644 --- a/kpovmodeler/pmpovraysettings.h +++ b/kpovmodeler/pmpovraysettings.h @@ -35,11 +35,12 @@ class TQListBox; class PMPovraySettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMPovraySettings( TQWidget* parent, const char* name = 0 ); + PMPovraySettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmpovraywidget.cpp b/kpovmodeler/pmpovraywidget.cpp index cd1232e4..6e462edd 100644 --- a/kpovmodeler/pmpovraywidget.cpp +++ b/kpovmodeler/pmpovraywidget.cpp @@ -40,8 +40,8 @@ const int timerIntervall = 1000; bool PMPovrayWidget::s_imageFormatsRegistered = false; -PMPovrayWidget::PMPovrayWidget( TQWidget* parent, const char* name ) - : KDialog( parent, name ) +PMPovrayWidget::PMPovrayWidget( TQWidget* tqparent, const char* name ) + : KDialog( tqparent, name ) { TQVBoxLayout* topLayout = new TQVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) ); topLayout->addStretch( ); @@ -140,13 +140,13 @@ bool PMPovrayWidget::render( const TQByteArray& scene, const PMRenderMode& m, int w, h; w = maxSize.width( ) + KDialog::spacingHint( ) * 2; - h = maxSize.height( ) + m_pSaveButton->sizeHint( ).height( ) * 2 + h = maxSize.height( ) + m_pSaveButton->tqsizeHint( ).height( ) * 2 + KDialog::spacingHint( ) * 6; - if( m_pProgressLabel->sizeHint( ).height( ) - > m_pProgressBar->sizeHint( ).height( ) ) - h += m_pProgressLabel->sizeHint( ).height( ); + if( m_pProgressLabel->tqsizeHint( ).height( ) + > m_pProgressBar->tqsizeHint( ).height( ) ) + h += m_pProgressLabel->tqsizeHint( ).height( ); else - h += m_pProgressBar->sizeHint( ).height( ); + h += m_pProgressBar->tqsizeHint( ).height( ); w += 16; h += 16; @@ -239,7 +239,7 @@ void PMPovrayWidget::slotSave( ) s_imageFormatsRegistered = true; } - KURL url = KFileDialog::getSaveURL( TQString::null, KImageIO::pattern( KImageIO::Writing ) ); + KURL url = KFileDialog::getSaveURL( TQString(), KImageIO::pattern( KImageIO::Writing ) ); if( url.isEmpty( ) ) return; if( !PMShell::overwriteURL( url ) ) @@ -319,11 +319,11 @@ void PMPovrayWidget::slotPovrayOutput( ) m_pPovrayOutputWidget->show( ); } -void PMPovrayWidget::slotRenderingFinished( int returnStatus ) +void PMPovrayWidget::slotRenderingFinished( int returntqStatus ) { - kdDebug( PMArea ) << "Povray exited with status " << returnStatus << endl; + kdDebug( PMArea ) << "Povray exited with status " << returntqStatus << endl; m_bRunning = false; - if( returnStatus == 0 ) + if( returntqStatus == 0 ) m_pSaveButton->setEnabled( true ); m_pStopButton->setEnabled( false ); m_pSuspendButton->setEnabled( false ); @@ -331,13 +331,13 @@ void PMPovrayWidget::slotRenderingFinished( int returnStatus ) m_pProgressLabel->setText( i18n( "finished" ) ); m_pProgressTimer->stop( ); - if( ( returnStatus != 0 ) && !m_stopped ) + if( ( returntqStatus != 0 ) && !m_stopped ) { KMessageBox::error( this, i18n( "Povray exited abnormally.\n" "See the povray output for details." ) - .arg( returnStatus ) ); + .tqarg( returntqStatus ) ); } - else if( m_pRenderWidget->povrayOutput( ).contains( "ERROR" ) ) + else if( m_pRenderWidget->povrayOutput( ).tqcontains( "ERROR" ) ) { KMessageBox::error( this, i18n( "There were errors while rendering.\n" "See the povray output for details." ) ); @@ -405,7 +405,7 @@ void PMPovrayWidget::showSpeed( double pps ) else num.setNum( pps, 'g', 3 ); - m_pProgressLabel->setText( i18n( "running, %1 pixels/second" ).arg( num ) ); + m_pProgressLabel->setText( i18n( "running, %1 pixels/second" ).tqarg( num ) ); } #include "pmpovraywidget.moc" diff --git a/kpovmodeler/pmpovraywidget.h b/kpovmodeler/pmpovraywidget.h index 058e12ee..fe910a88 100644 --- a/kpovmodeler/pmpovraywidget.h +++ b/kpovmodeler/pmpovraywidget.h @@ -42,11 +42,12 @@ class KURL; class PMPovrayWidget : public KDialog { Q_OBJECT + TQ_OBJECT public: /** * Standard constructor */ - PMPovrayWidget( TQWidget* parent = 0, const char* name = 0 ); + PMPovrayWidget( TQWidget* tqparent = 0, const char* name = 0 ); /** * Destructor */ @@ -69,7 +70,7 @@ public slots: void slotPovrayOutput( ); protected slots: - void slotRenderingFinished( int returnStatus ); + void slotRenderingFinished( int returntqStatus ); void slotProgress( int i ); void slotLineFinished( int line ); void slotUpdateSpeed( ); diff --git a/kpovmodeler/pmpreviewsettings.cpp b/kpovmodeler/pmpreviewsettings.cpp index 700c19ee..54afb0dd 100644 --- a/kpovmodeler/pmpreviewsettings.cpp +++ b/kpovmodeler/pmpreviewsettings.cpp @@ -29,19 +29,19 @@ #include <klocale.h> #include <kmessagebox.h> -PMPreviewSettings::PMPreviewSettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMPreviewSettings::PMPreviewSettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQVBoxLayout* gvl; TQGridLayout* grid; TQGroupBox* gb; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - hlayout = new TQHBoxLayout( vlayout ); - grid = new TQGridLayout( hlayout, 2, 2 ); + htqlayout = new TQHBoxLayout( vtqlayout ); + grid = new TQGridLayout( htqlayout, 2, 2 ); grid->addWidget( new TQLabel( i18n( "Size:" ), this ), 0, 0 ); m_pPreviewSize = new PMIntEdit( this ); m_pPreviewSize->setValidation( true, 10, true, 400 ); @@ -50,10 +50,10 @@ PMPreviewSettings::PMPreviewSettings( TQWidget* parent, const char* name ) grid->addWidget( new TQLabel( i18n( "Gamma:" ), this ), 1, 0 ); m_pPreviewGamma = new PMFloatEdit( this ); grid->addWidget( m_pPreviewGamma, 1, 1 ); - hlayout->addStretch( 1 ); + htqlayout->addStretch( 1 ); gb = new TQGroupBox( i18n( "Rendered Objects" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); m_pPreviewSphere = new TQCheckBox( i18n( "Sphere" ), gb ); @@ -64,52 +64,52 @@ PMPreviewSettings::PMPreviewSettings( TQWidget* parent, const char* name ) gvl->addWidget( m_pPreviewBox ); gb = new TQGroupBox( i18n( "Wall" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); m_pPreviewWall = new TQCheckBox( i18n( "Enable wall" ), gb ); gvl->addWidget( m_pPreviewWall ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Color 1:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Color 1:" ), gb ) ); m_pWallColor1 = new KColorButton( gb ); - hlayout->addWidget( m_pWallColor1 ); - hlayout->addWidget( new TQLabel( i18n( "Color 2:" ), gb ) ); + htqlayout->addWidget( m_pWallColor1 ); + htqlayout->addWidget( new TQLabel( i18n( "Color 2:" ), gb ) ); m_pWallColor2 = new KColorButton( gb ); - hlayout->addWidget( m_pWallColor2 ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pWallColor2 ); + htqlayout->addStretch( 1 ); gb = new TQGroupBox( i18n( "Floor" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); m_pPreviewFloor = new TQCheckBox( i18n( "Enable floor" ), gb ); gvl->addWidget( m_pPreviewFloor ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Color 1:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Color 1:" ), gb ) ); m_pFloorColor1 = new KColorButton( gb ); - hlayout->addWidget( m_pFloorColor1 ); - hlayout->addWidget( new TQLabel( i18n( "Color 2:" ), gb ) ); + htqlayout->addWidget( m_pFloorColor1 ); + htqlayout->addWidget( new TQLabel( i18n( "Color 2:" ), gb ) ); m_pFloorColor2 = new KColorButton( gb ); - hlayout->addWidget( m_pFloorColor2 ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pFloorColor2 ); + htqlayout->addStretch( 1 ); gb = new TQGroupBox( i18n( "Antialiasing" ), this ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); m_pPreviewAA = new TQCheckBox( i18n( "Enable antialiasing" ), gb ); gvl->addWidget( m_pPreviewAA ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Depth:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Depth:" ), gb ) ); m_pPreviewAALevel = new PMIntEdit( gb ); m_pPreviewAALevel->setValidation( true, 1, true, 9 ); - hlayout->addWidget( m_pPreviewAALevel ); - hlayout->addWidget( new TQLabel( i18n( "Threshold:" ), gb ) ); + htqlayout->addWidget( m_pPreviewAALevel ); + htqlayout->addWidget( new TQLabel( i18n( "Threshold:" ), gb ) ); m_pPreviewAAThreshold = new PMFloatEdit( gb ); - hlayout->addWidget( m_pPreviewAAThreshold ); - hlayout->addStretch( 1 ); + htqlayout->addWidget( m_pPreviewAAThreshold ); + htqlayout->addStretch( 1 ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMPreviewSettings::displaySettings( ) diff --git a/kpovmodeler/pmpreviewsettings.h b/kpovmodeler/pmpreviewsettings.h index b3c38af2..4818fb3b 100644 --- a/kpovmodeler/pmpreviewsettings.h +++ b/kpovmodeler/pmpreviewsettings.h @@ -35,11 +35,12 @@ class KColorButton; class PMPreviewSettings : public PMSettingsDialogPage { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMPreviewSettings( TQWidget* parent, const char* name = 0 ); + PMPreviewSettings( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmprism.cpp b/kpovmodeler/pmprism.cpp index 81417ba3..a1beddca 100644 --- a/kpovmodeler/pmprism.cpp +++ b/kpovmodeler/pmprism.cpp @@ -272,11 +272,11 @@ void PMPrism::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMPrism::metaObject( ) const +PMMetaObject* PMPrism::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Prism", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Prism", Base::tqmetaObject( ), createNewPrism ); s_pMetaObject->addProperty( new PMPrismProperty( "sturm", &PMPrism::setSturm, &PMPrism::sturm ) ); @@ -392,9 +392,9 @@ void PMPrism::setPoints( const TQValueList< TQValueList<PMVector> >& points ) } } -PMDialogEditBase* PMPrism::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMPrism::editWidget( TQWidget* tqparent ) const { - return new PMPrismEdit( parent ); + return new PMPrismEdit( tqparent ); } void PMPrism::createMemento( ) @@ -645,7 +645,7 @@ void PMPrism::controlPoints( PMControlPointList& list ) for( i2 = 0; it2 != ( *it1 ).end( ); ++it2, ++i2 ) { cp = new PM2DControlPoint( *it2, PM2DControlPoint::PM2DXZ, i2, - i18n( "Point %1.%2" ).arg( i1 + 1 ).arg( i2 + 1 ) ); + i18n( "Point %1.%2" ).tqarg( i1 + 1 ).tqarg( i2 + 1 ) ); if( i2 == 0 ) firstPoint = cp; else if( i2 == 1 ) @@ -678,7 +678,7 @@ void PMPrism::controlPoints( PMControlPointList& list ) { int i2mod4 = i2 % 4; cp = new PM2DControlPoint( *it2, PM2DControlPoint::PM2DXZ, i2, - i18n( "Point %1.%2" ).arg( i1 + 1 ).arg( i2 + 1 ) ); + i18n( "Point %1.%2" ).tqarg( i1 + 1 ).tqarg( i2 + 1 ) ); if( i2mod4 == 0 ) firstPoint = cp; if( i2mod4 == 2 ) diff --git a/kpovmodeler/pmprism.h b/kpovmodeler/pmprism.h index a22fb748..4b0196e6 100644 --- a/kpovmodeler/pmprism.h +++ b/kpovmodeler/pmprism.h @@ -67,7 +67,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -78,7 +78,7 @@ public: /** * Returns a new @ref PMPrismEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmprismedit.cpp b/kpovmodeler/pmprismedit.cpp index e5cf8615..db85654d 100644 --- a/kpovmodeler/pmprismedit.cpp +++ b/kpovmodeler/pmprismedit.cpp @@ -34,8 +34,8 @@ #include <kiconloader.h> #include <kmessagebox.h> -PMPrismEdit::PMPrismEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMPrismEdit::PMPrismEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; m_lastSplineType = 0; @@ -206,7 +206,7 @@ void PMPrismEdit::createEdits( const TQValueList< TQValueList<PMVector> >& sp ) { // create all edits for one sub prism hl = new TQHBoxLayout( tvl ); - label = new TQLabel( i18n( "Sub prism %1:" ).arg( spnr + 1 ), + label = new TQLabel( i18n( "Sub prism %1:" ).tqarg( spnr + 1 ), m_pEditWidget ); hl->addWidget( label ); hl->addStretch( 1 ); @@ -332,8 +332,8 @@ void PMPrismEdit::deleteEdits( ) m_points.clear( ); m_points.setAutoDelete( false ); - if( m_pEditWidget->layout( ) ) - delete m_pEditWidget->layout( ); + if( m_pEditWidget->tqlayout( ) ) + delete m_pEditWidget->tqlayout( ); } TQValueList< TQValueList<PMVector> > PMPrismEdit::splinePoints( ) @@ -452,7 +452,7 @@ void PMPrismEdit::slotAddPointAbove( ) TQPushButton* bt = ( TQPushButton* ) sender( ); if( bt ) { - int subIndex = m_addAboveButtons.findRef( bt ); + int subIndex = m_addAboveButtons.tqfindRef( bt ); if( subIndex >= 0 ) { PMVectorListEdit* ed = m_points.at( subIndex ); @@ -488,7 +488,7 @@ void PMPrismEdit::slotAddPointBelow( ) TQPushButton* bt = ( TQPushButton* ) sender( ); if( bt ) { - int subIndex = m_addBelowButtons.findRef( bt ); + int subIndex = m_addBelowButtons.tqfindRef( bt ); if( subIndex >= 0 ) { PMVectorListEdit* ed = m_points.at( subIndex ); @@ -524,7 +524,7 @@ void PMPrismEdit::slotRemovePoint( ) TQPushButton* bt = ( TQPushButton* ) sender( ); if( bt ) { - int subIndex = m_removeButtons.findRef( bt ); + int subIndex = m_removeButtons.tqfindRef( bt ); if( subIndex >= 0 ) { PMVectorListEdit* ed = m_points.at( subIndex ); @@ -560,7 +560,7 @@ void PMPrismEdit::slotAddSubPrism( ) TQPushButton* button = ( TQPushButton* ) sender( ); if( button ) { - int index = m_subPrismAddButtons.findRef( button ); + int index = m_subPrismAddButtons.tqfindRef( button ); if( index >= 0 ) { TQValueList< TQValueList<PMVector> > points = splinePoints( ); @@ -600,7 +600,7 @@ void PMPrismEdit::slotRemoveSubPrism( ) TQPushButton* button = ( TQPushButton* ) sender( ); if( button ) { - int index = m_subPrismRemoveButtons.findRef( button ); + int index = m_subPrismRemoveButtons.tqfindRef( button ); if( index >= 0 ) { TQValueList< TQValueList<PMVector> > points = splinePoints( ); diff --git a/kpovmodeler/pmprismedit.h b/kpovmodeler/pmprismedit.h index 8f54beb2..6a9c03e5 100644 --- a/kpovmodeler/pmprismedit.h +++ b/kpovmodeler/pmprismedit.h @@ -45,12 +45,13 @@ class TQLabel; class PMPrismEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMPrismEdit with parent and name + * Creates a PMPrismEdit with tqparent and name */ - PMPrismEdit( TQWidget* parent, const char* name = 0 ); + PMPrismEdit( TQWidget* tqparent, const char* name = 0 ); /** * Destructor */ diff --git a/kpovmodeler/pmprismmemento.cpp b/kpovmodeler/pmprismmemento.cpp index 4b24d500..e727946c 100644 --- a/kpovmodeler/pmprismmemento.cpp +++ b/kpovmodeler/pmprismmemento.cpp @@ -31,7 +31,7 @@ void PMPrismMemento::setPrismPoints( const TQValueList< TQValueList<PMVector> >& { if( !m_bPrismPointsSaved ) { - // Direct assignment does not work with Qt 2.3.x + // Direct assignment does not work with TQt 2.3.x // The list will be changed later in a graphical // change because TQValueList::detach( ) is called // too late! diff --git a/kpovmodeler/pmprojectedthrough.cpp b/kpovmodeler/pmprojectedthrough.cpp index 96c0c00a..9458a19d 100644 --- a/kpovmodeler/pmprojectedthrough.cpp +++ b/kpovmodeler/pmprojectedthrough.cpp @@ -49,11 +49,11 @@ TQString PMProjectedThrough::description( ) const return i18n( "projected through" ); } -PMMetaObject* PMProjectedThrough::metaObject( ) const +PMMetaObject* PMProjectedThrough::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ProjectedThrough", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "ProjectedThrough", Base::tqmetaObject( ), createNewProjectedThrough ); // no properties } @@ -80,9 +80,9 @@ void PMProjectedThrough::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMProjectedThrough::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMProjectedThrough::editWidget( TQWidget* tqparent ) const { - return new PMNamedObjectEdit( parent ); + return new PMNamedObjectEdit( tqparent ); } void PMProjectedThrough::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmprojectedthrough.h b/kpovmodeler/pmprojectedthrough.h index 4212097f..e1dc200a 100644 --- a/kpovmodeler/pmprojectedthrough.h +++ b/kpovmodeler/pmprojectedthrough.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMProjectedThroughEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmprototypemanager.cpp b/kpovmodeler/pmprototypemanager.cpp index a32a6692..1df5540f 100644 --- a/kpovmodeler/pmprototypemanager.cpp +++ b/kpovmodeler/pmprototypemanager.cpp @@ -147,33 +147,33 @@ void PMPrototypeManager::addPrototype( PMObject* obj ) if( !obj ) return; - PMMetaObject* metaObject = obj->metaObject( ); - PMMetaObject* m2 = m_metaDict.find( metaObject->className( ) ); + PMMetaObject* tqmetaObject = obj->tqmetaObject( ); + PMMetaObject* m2 = m_metaDict.tqfind( tqmetaObject->className( ) ); if( m2 ) { kdError( PMArea ) << "PMPrototypeManager: Class '" - << metaObject->className( ) + << tqmetaObject->className( ) << "' already registered." << endl; } else { - if( metaObject->isAbstract( ) ) + if( tqmetaObject->isAbstract( ) ) kdError( PMArea ) << "PMPrototypeManager: The meta object for the prototype " - << metaObject->className( ) + << tqmetaObject->className( ) << " doesn't have a factory method" << endl; - m_prototypes.append( metaObject ); - m_lowerCaseDict[metaObject->className( ).lower( )] = metaObject->className( ); + m_prototypes.append( tqmetaObject ); + m_lowerCaseDict[tqmetaObject->className( ).lower( )] = tqmetaObject->className( ); // insert the meta object and all super classes into the hash table - while( metaObject ) + while( tqmetaObject ) { - if( m_metaDict.find( metaObject->className( ) ) ) - metaObject = 0; + if( m_metaDict.tqfind( tqmetaObject->className( ) ) ) + tqmetaObject = 0; else { - m_metaDict.insert( metaObject->className( ), metaObject ); - metaObject = metaObject->superClass( ); + m_metaDict.insert( tqmetaObject->className( ), tqmetaObject ); + tqmetaObject = tqmetaObject->superClass( ); } } } @@ -184,7 +184,7 @@ void PMPrototypeManager::addDeclarationType( const TQString& className, const TQString& description, const TQString& pixmap ) { - PMMetaObject* m = metaObject( className ); + PMMetaObject* m = tqmetaObject( className ); if( !m ) kdError( PMArea ) << "PMPrototypeManager::addDeclarationType: Unknown class " << className << endl; else @@ -206,29 +206,29 @@ PMObject* PMPrototypeManager::newObject( const TQString& name ) const if( name.isEmpty( ) ) return 0; - PMMetaObject* meta = m_metaDict.find( name ); + PMMetaObject* meta = m_metaDict.tqfind( name ); if( !meta ) return 0; return meta->newObject( m_pPart ); } -PMMetaObject* PMPrototypeManager::metaObject( const TQString& name ) const +PMMetaObject* PMPrototypeManager::tqmetaObject( const TQString& name ) const { if( name.isNull( ) ) return 0; - return m_metaDict.find( name ); + return m_metaDict.tqfind( name ); } bool PMPrototypeManager::isA( const TQString& className, const TQString& baseClass ) const { - return isA( metaObject( className ), baseClass ); + return isA( tqmetaObject( className ), baseClass ); } bool PMPrototypeManager::isA( PMMetaObject* c, const TQString& baseClass ) const { - PMMetaObject* bc = metaObject( baseClass ); + PMMetaObject* bc = tqmetaObject( baseClass ); while( c && c != bc ) c = c->superClass( ); return( c && ( c == bc ) ); @@ -236,8 +236,8 @@ bool PMPrototypeManager::isA( PMMetaObject* c, TQString PMPrototypeManager::className( const TQString& lowercase ) const { - TQMap<TQString, TQString>::const_iterator it = m_lowerCaseDict.find( lowercase ); + TQMap<TQString, TQString>::const_iterator it = m_lowerCaseDict.tqfind( lowercase ); if( it != m_lowerCaseDict.end( ) ) return *it; - return TQString::null; + return TQString(); } diff --git a/kpovmodeler/pmprototypemanager.h b/kpovmodeler/pmprototypemanager.h index bade9e29..f37a5852 100644 --- a/kpovmodeler/pmprototypemanager.h +++ b/kpovmodeler/pmprototypemanager.h @@ -111,13 +111,13 @@ public: * not exist. * @see PMMetaObject */ - PMMetaObject* metaObject( const TQString& name ) const; + PMMetaObject* tqmetaObject( const TQString& name ) const; /** * Returns true if the class exists */ bool existsClass( const TQString& name ) const { - return metaObject( name ); + return tqmetaObject( name ); } /** * Returns true if the second class is a base class for diff --git a/kpovmodeler/pmquickcolor.cpp b/kpovmodeler/pmquickcolor.cpp index 25fc7aff..ac025a62 100644 --- a/kpovmodeler/pmquickcolor.cpp +++ b/kpovmodeler/pmquickcolor.cpp @@ -67,11 +67,11 @@ void PMQuickColor::readAttributes( const PMXMLHelper& h ) m_color = h.colorAttribute( "quickcolor", colorDefault ); } -PMMetaObject* PMQuickColor::metaObject( ) const +PMMetaObject* PMQuickColor::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "QuickColor", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "QuickColor", Base::tqmetaObject( ), createNewQuickColor ); s_pMetaObject->addProperty( new PMQuickColorProperty( "color", &PMQuickColor::setColor, &PMQuickColor::color ) ); @@ -102,9 +102,9 @@ void PMQuickColor::setColor( const PMColor& c ) } } -PMDialogEditBase* PMQuickColor::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMQuickColor::editWidget( TQWidget* tqparent ) const { - return new PMQuickColorEdit( parent ); + return new PMQuickColorEdit( tqparent ); } void PMQuickColor::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmquickcolor.h b/kpovmodeler/pmquickcolor.h index 84a3afb5..80f5ee4b 100644 --- a/kpovmodeler/pmquickcolor.h +++ b/kpovmodeler/pmquickcolor.h @@ -19,8 +19,8 @@ **************************************************************************/ -#ifndef PMQUICKCOLOR_H -#define PMQUICKCOLOR_H +#ifndef PMTQUICKCOLOR_H +#define PMTQUICKCOLOR_H #ifdef HAVE_CONFIG_H #include <config.h> @@ -57,7 +57,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -69,7 +69,7 @@ public: /** * Returns a new @ref PMQuickColorEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmquickcoloredit.cpp b/kpovmodeler/pmquickcoloredit.cpp index cb86c0c0..1a48c873 100644 --- a/kpovmodeler/pmquickcoloredit.cpp +++ b/kpovmodeler/pmquickcoloredit.cpp @@ -26,8 +26,8 @@ #include <klocale.h> -PMQuickColorEdit::PMQuickColorEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMQuickColorEdit::PMQuickColorEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -36,10 +36,10 @@ void PMQuickColorEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pColorEdit = new PMColorEdit( false, this ); - layout->addWidget( new TQLabel( i18n( "Color:" ), this ), 0, AlignTop ); - layout->addWidget( m_pColorEdit ); + tqlayout->addWidget( new TQLabel( i18n( "Color:" ), this ), 0, AlignTop ); + tqlayout->addWidget( m_pColorEdit ); connect( m_pColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } diff --git a/kpovmodeler/pmquickcoloredit.h b/kpovmodeler/pmquickcoloredit.h index 7f6d16e9..456b9660 100644 --- a/kpovmodeler/pmquickcoloredit.h +++ b/kpovmodeler/pmquickcoloredit.h @@ -17,8 +17,8 @@ **************************************************************************/ -#ifndef PMQUICKCOLOREDIT_H -#define PMQUICKCOLOREDIT_H +#ifndef PMTQUICKCOLOREDIT_H +#define PMTQUICKCOLOREDIT_H #ifdef HAVE_CONFIG_H #include <config.h> @@ -37,12 +37,13 @@ class PMColorEdit; class PMQuickColorEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMQuickColorEdit with parent and name + * Creates a PMQuickColorEdit with tqparent and name */ - PMQuickColorEdit( TQWidget* parent, const char* name = 0 ); + PMQuickColorEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmradiosity.cpp b/kpovmodeler/pmradiosity.cpp index 86d36e74..6f6a6811 100644 --- a/kpovmodeler/pmradiosity.cpp +++ b/kpovmodeler/pmradiosity.cpp @@ -86,11 +86,11 @@ PMRadiosity::~PMRadiosity( ) { } -PMMetaObject* PMRadiosity::metaObject( ) const +PMMetaObject* PMRadiosity::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Radiosity", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Radiosity", Base::tqmetaObject( ), createNewRadiosity ); s_pMetaObject->addProperty( new PMRadiosityProperty( "adcBailout", &PMRadiosity::setAdcBailout, &PMRadiosity::adcBailout ) ); @@ -356,9 +356,9 @@ void PMRadiosity::setRecursionLimit( int c ) } } -PMDialogEditBase* PMRadiosity::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMRadiosity::editWidget( TQWidget* tqparent ) const { - return new PMRadiosityEdit( parent ); + return new PMRadiosityEdit( tqparent ); } void PMRadiosity::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmradiosity.h b/kpovmodeler/pmradiosity.h index c56ccec2..7eb34498 100644 --- a/kpovmodeler/pmradiosity.h +++ b/kpovmodeler/pmradiosity.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMRadiosityEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmradiosityedit.cpp b/kpovmodeler/pmradiosityedit.cpp index 97494ff8..968227fb 100644 --- a/kpovmodeler/pmradiosityedit.cpp +++ b/kpovmodeler/pmradiosityedit.cpp @@ -28,8 +28,8 @@ #include <kmessagebox.h> -PMRadiosityEdit::PMRadiosityEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMRadiosityEdit::PMRadiosityEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmradiosityedit.h b/kpovmodeler/pmradiosityedit.h index d2389cab..ae4586ce 100644 --- a/kpovmodeler/pmradiosityedit.h +++ b/kpovmodeler/pmradiosityedit.h @@ -37,12 +37,13 @@ class TQCheckBox; class PMRadiosityEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMRadiosityEdit with parent and name + * Creates a PMRadiosityEdit with tqparent and name */ - PMRadiosityEdit( TQWidget* parent, const char* name = 0 ); + PMRadiosityEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmrainbow.cpp b/kpovmodeler/pmrainbow.cpp index 1fd9e8ca..fe5ea8f9 100644 --- a/kpovmodeler/pmrainbow.cpp +++ b/kpovmodeler/pmrainbow.cpp @@ -87,11 +87,11 @@ PMRainbow::~PMRainbow( ) { } -PMMetaObject* PMRainbow::metaObject( ) const +PMMetaObject* PMRainbow::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Rainbow", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Rainbow", Base::tqmetaObject( ), createNewRainbow ); s_pMetaObject->addProperty( new PMRainbowProperty( "direction", &PMRainbow::setDirection, &PMRainbow::direction ) ); @@ -347,9 +347,9 @@ void PMRainbow::enableFalloffAngle( bool c ) } } -PMDialogEditBase* PMRainbow::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMRainbow::editWidget( TQWidget* tqparent ) const { - return new PMRainbowEdit( parent ); + return new PMRainbowEdit( tqparent ); } void PMRainbow::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmrainbow.h b/kpovmodeler/pmrainbow.h index 64dae5d7..b9c2915b 100644 --- a/kpovmodeler/pmrainbow.h +++ b/kpovmodeler/pmrainbow.h @@ -52,7 +52,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMRainbowEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmrainbow" ); } diff --git a/kpovmodeler/pmrainbowedit.cpp b/kpovmodeler/pmrainbowedit.cpp index 7765f720..b2aa7cee 100644 --- a/kpovmodeler/pmrainbowedit.cpp +++ b/kpovmodeler/pmrainbowedit.cpp @@ -30,8 +30,8 @@ #include <kmessagebox.h> -PMRainbowEdit::PMRainbowEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMRainbowEdit::PMRainbowEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmrainbowedit.h b/kpovmodeler/pmrainbowedit.h index d520f6e2..e2c4698d 100644 --- a/kpovmodeler/pmrainbowedit.h +++ b/kpovmodeler/pmrainbowedit.h @@ -38,12 +38,13 @@ class TQLabel; class PMRainbowEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMRainbowEdit with parent and name + * Creates a PMRainbowEdit with tqparent and name */ - PMRainbowEdit( TQWidget* parent, const char* name = 0 ); + PMRainbowEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmraw.cpp b/kpovmodeler/pmraw.cpp index 31d7ec1a..f1f2575b 100644 --- a/kpovmodeler/pmraw.cpp +++ b/kpovmodeler/pmraw.cpp @@ -69,11 +69,11 @@ void PMRaw::setCode( const TQString& code ) } } -PMMetaObject* PMRaw::metaObject( ) const +PMMetaObject* PMRaw::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Raw", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Raw", Base::tqmetaObject( ), createNewRaw ); s_pMetaObject->addProperty( new PMRawProperty( "code", &PMRaw::setCode, &PMRaw::code ) ); @@ -104,9 +104,9 @@ void PMRaw::readAttributes( const PMXMLHelper& h ) m_code = e.toText( ).data( ); } -PMDialogEditBase* PMRaw::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMRaw::editWidget( TQWidget* tqparent ) const { - return new PMRawEdit( parent ); + return new PMRawEdit( tqparent ); } void PMRaw::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmraw.h b/kpovmodeler/pmraw.h index 11c28ad2..7d5673cb 100644 --- a/kpovmodeler/pmraw.h +++ b/kpovmodeler/pmraw.h @@ -67,12 +67,12 @@ public: virtual void readAttributes( const PMXMLHelper& h ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; /** */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmraw" ); } /** */ diff --git a/kpovmodeler/pmrawedit.cpp b/kpovmodeler/pmrawedit.cpp index 59e0f237..c43adadc 100644 --- a/kpovmodeler/pmrawedit.cpp +++ b/kpovmodeler/pmrawedit.cpp @@ -25,8 +25,8 @@ #include <kglobalsettings.h> #include <klocale.h> -PMRawEdit::PMRawEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMRawEdit::PMRawEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -37,10 +37,8 @@ void PMRawEdit::createTopWidgets( ) topLayout( )->addWidget( new TQLabel( i18n( "Povray code:" ), this ) ); m_pEdit = new TQMultiLineEdit( this ); -#if ( QT_VERSION >= 300 ) - m_pEdit->setTextFormat( Qt::PlainText ); + m_pEdit->setTextFormat( TQt::PlainText ); m_pEdit->setWordWrap( TQTextEdit::NoWrap ); -#endif m_pEdit->setFont( KGlobalSettings::fixedFont( ) ); topLayout( )->addWidget( m_pEdit, 2 ); diff --git a/kpovmodeler/pmrawedit.h b/kpovmodeler/pmrawedit.h index 2a34db6a..f3ba740d 100644 --- a/kpovmodeler/pmrawedit.h +++ b/kpovmodeler/pmrawedit.h @@ -35,12 +35,13 @@ class TQMultiLineEdit; class PMRawEdit : public PMNamedObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMNamedObjectEdit Base; public: /** - * Creates a PMRawEdit with parent and name + * Creates a PMRawEdit with tqparent and name */ - PMRawEdit( TQWidget* parent, const char* name = 0 ); + PMRawEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmrecursiveobjectiterator.cpp b/kpovmodeler/pmrecursiveobjectiterator.cpp index eeacfaa6..423e0556 100644 --- a/kpovmodeler/pmrecursiveobjectiterator.cpp +++ b/kpovmodeler/pmrecursiveobjectiterator.cpp @@ -39,7 +39,7 @@ PMObject* PMRecursiveObjectIterator::operator++( ) bool stop = false; do { - m_pCurrent = m_pCurrent->parent( ); + m_pCurrent = m_pCurrent->tqparent( ); if( !m_pCurrent ) stop = true; else if( m_pCurrent == m_pObject ) diff --git a/kpovmodeler/pmrendermanager.cpp b/kpovmodeler/pmrendermanager.cpp index 27d62465..ff7d5987 100644 --- a/kpovmodeler/pmrendermanager.cpp +++ b/kpovmodeler/pmrendermanager.cpp @@ -16,8 +16,8 @@ **************************************************************************/ // conflicting types for INT32 in qt and glx -#ifndef QT_CLEAN_NAMESPACE -#define QT_CLEAN_NAMESPACE +#ifndef TQT_CLEAN_NAMESPACE +#define TQT_CLEAN_NAMESPACE #endif #include "pmrendermanager.h" @@ -78,7 +78,7 @@ PMRenderManager* PMRenderManager::theManager( ) } PMRenderManager::PMRenderManager( ) - : TQObject( qApp ) + : TQObject( tqApp ) { int i; @@ -146,7 +146,7 @@ void PMRenderManager::addView( PMGLView* view, PMObject* active, PMObject* top, restart = true; else if( graphicalChange ) { - m_renderTasks.findRef( task ); + m_renderTasks.tqfindRef( task ); m_renderTasks.take( ); m_renderTasks.prepend( task ); restart = true; @@ -205,12 +205,12 @@ void PMRenderManager::removeView( PMGLView* view ) bool PMRenderManager::containsTask( PMGLView* view ) const { PMRenderTaskListIterator it( m_renderTasks ); - bool contains = false; + bool tqcontains = false; - for( ; it.current( ) && !contains; ++it ) + for( ; it.current( ) && !tqcontains; ++it ) if( it.current( )->view( ) == view ) - contains = true; - return contains; + tqcontains = true; + return tqcontains; } TQColor PMRenderManager::controlPointColor( int i ) const @@ -377,7 +377,7 @@ void PMRenderManager::renderTask( ) emit renderingFinished( m_pCurrentGlView ); if( m_bStopTask || m_bStartTask ) break; - qApp->processEvents( maxEventTime ); + tqApp->processEvents( maxEventTime ); if( m_bStopTask || m_bStartTask ) break; m_renderTasks.removeFirst( ); @@ -394,7 +394,7 @@ void PMRenderManager::renderTask( ) void PMRenderManager::renderObject( PMObject* objectToRender ) { - bool children = false; + bool tqchildren = false; PMGraphicalObject* go = 0; m_objectToRenderStack.append( objectToRender ); @@ -416,8 +416,8 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) m_selected = true; m_pDeselectObject = objectToRender; if( objectToRender->hasTransformationMatrix( ) ) - if( objectToRender->parent( ) ) - m_pDeselectObject = objectToRender->parent( ); + if( objectToRender->tqparent( ) ) + m_pDeselectObject = objectToRender->tqparent( ); } } @@ -426,8 +426,8 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) { PMObject* obj = 0; - children = objectToRender->lastChild( ) || objectToRender->linkedObject( ); - if( children ) + tqchildren = objectToRender->lastChild( ) || objectToRender->linkedObject( ); + if( tqchildren ) { bool stop; @@ -438,7 +438,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) matrix = new PMMatrix( PMMatrix::modelviewMatrix( ) ); m_matrixStack.push( matrix ); - // render the children and the linked object + // render the tqchildren and the linked object obj = objectToRender->lastChild( ); while( obj && !m_bStopTask && !m_bStartTask ) { @@ -469,7 +469,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) if( !m_bStopTask && !m_bStartTask ) { - // children of the object are rendered + // tqchildren of the object are rendered // render the object if( objectToRender == m_pCurrentTask->activeObject( ) ) @@ -500,7 +500,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) { m_quickColorObjects.push( it.current( ) ); m_quickColors.push( new TQColor( m_currentColor ) ); - m_currentColor = qc->color( ).toQColor( ); + m_currentColor = qc->color( ).toTQColor( ); } } } @@ -515,7 +515,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) || ( objectToRender == m_pCurrentTask->activeObject( ) ) ) { // render the view structure. - // call qApp->processEvents( ) each m_nMaxRenderedLines rendered + // call tqApp->processEvents( ) each m_nMaxRenderedLines rendered // lines if( m_selected ) setGLColor( m_graphicalObjectColor[ 1 ] ); @@ -538,7 +538,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) } if( !m_bStopTask && !m_bStartTask ) { - if( children ) + if( tqchildren ) { PMMatrix* matrix = m_matrixStack.pop( ); @@ -681,7 +681,7 @@ void PMRenderManager::renderViewStructureSimple( PMPointArray& points, if( m_renderedLines >= m_nMaxRenderedLines ) { m_renderedLines = 0; - qApp->processEvents( maxEventTime ); + tqApp->processEvents( maxEventTime ); if( !m_bStopTask && !m_bStartTask ) m_pCurrentGlView->makeCurrent( ); } @@ -1315,10 +1315,10 @@ void PMRenderManager::renderFieldOfView( ) if( camera->cameraType( ) == PMCamera::Omnimax ) renderString( i18n( "not supported" ), 5.0, - height - qApp->fontMetrics( ).height( ) * 2 - 2 ); + height - tqApp->fontMetrics( ).height( ) * 2 - 2 ); else if( m_specialCameraMode && !m_highDetailCameraView ) renderString( i18n( "approximated" ), 5.0, - height - qApp->fontMetrics( ).height( ) * 2 - 2 ); + height - tqApp->fontMetrics( ).height( ) * 2 - 2 ); glBegin( GL_LINE_LOOP ); @@ -1363,7 +1363,7 @@ void PMRenderManager::renderGrid( ) int width = m_pCurrentGlView->width( ); double transX = m_pCurrentGlView->translationX( ); double transY = m_pCurrentGlView->translationY( ); - int fontHeight = qApp->fontMetrics( ).height( ); + int fontHeight = tqApp->fontMetrics( ).height( ); glMatrixMode( GL_PROJECTION ); glPushMatrix( ); @@ -1410,8 +1410,8 @@ void PMRenderManager::renderGrid( ) glVertex2d( screenx, height/2 ); glEnd( ); - TQString label = TQString( "%1" ).arg( x * signx, 0, 'g', 4 ); - if( approxZero( x ) && label.find( "e-" ) ) + TQString label = TQString( "%1" ).tqarg( x * signx, 0, 'g', 4 ); + if( approxZero( x ) && label.tqfind( "e-" ) ) label = "0"; renderString( label, screenx + 3, height / 2 - fontHeight - 2 ); @@ -1431,8 +1431,8 @@ void PMRenderManager::renderGrid( ) glVertex2d( width/2, screeny ); glEnd( ); - TQString label = TQString( "%1" ).arg( y * signy, 0, 'g', 4 ); - if( approxZero( y ) && label.find( "e-" ) ) + TQString label = TQString( "%1" ).tqarg( y * signy, 0, 'g', 4 ); + if( approxZero( y ) && label.tqfind( "e-" ) ) label = "0"; renderString( label, -width / 2 + 3, screeny + 2 ); @@ -1448,7 +1448,7 @@ void PMRenderManager::renderGrid( ) case PMGLView::PMViewPosY: case PMGLView::PMViewPosZ: case PMGLView::PMViewNegY: - renderString( "x", width / 2 - qApp->fontMetrics( ).boundingRect( "x" ).width( ) - 4, -3 ); + renderString( "x", width / 2 - tqApp->fontMetrics( ).boundingRect( "x" ).width( ) - 4, -3 ); break; case PMGLView::PMViewNegZ: renderString( "x", -width / 2 + 3, -3 ); @@ -1475,7 +1475,7 @@ void PMRenderManager::renderGrid( ) renderString( "z", -width / 2 + 3, -3 ); break; case PMGLView::PMViewNegX: - renderString( "z", width / 2 - qApp->fontMetrics( ).boundingRect( "z" ).width( ) - 4, -3 ); + renderString( "z", width / 2 - tqApp->fontMetrics( ).boundingRect( "z" ).width( ) - 4, -3 ); break; case PMGLView::PMViewNegY: renderString( "z", -3, height / 2 - fontHeight ); @@ -1499,7 +1499,7 @@ void PMRenderManager::renderDescription( ) { int height = m_pCurrentGlView->height( ); int width = m_pCurrentGlView->width( ); - int fontHeight = qApp->fontMetrics( ).height( ); + int fontHeight = tqApp->fontMetrics( ).height( ); glMatrixMode( GL_PROJECTION ); glPushMatrix( ); @@ -1561,19 +1561,19 @@ void PMRenderManager::renderDescription( ) void PMRenderManager::renderString( const TQString& str, double x, double y ) { - int width = qApp->fontMetrics( ).boundingRect( str ).width( ); - int height = qApp->fontMetrics( ).height( ); + int width = tqApp->fontMetrics( ).boundingRect( str ).width( ); + int height = tqApp->fontMetrics( ).height( ); // GL wants word aligned bitmap TQBitmap bm( ( ( width + 32 ) % 32 ) * 32, height, true ); TQPainter p( &bm ); - p.setFont( qApp->font( ) ); - p.drawText( bm.rect( ), Qt::AlignLeft | Qt::AlignBottom, str ); + p.setFont( tqApp->font( ) ); + p.drawText( bm.rect( ), TQt::AlignLeft | TQt::AlignBottom, str ); p.end(); // Transform to GL bitmap - TQImage img = bm.convertToImage( ).mirror( ).convertBitOrder( TQImage::BigEndian ); + TQImage img = TQImage(bm.convertToImage( )).mirror( ).convertBitOrder( TQImage::BigEndian ); glRasterPos2d( x, y ); glBitmap( img.width( ), img.height( ), 0, 0, 0, 0, img.bits( ) ); diff --git a/kpovmodeler/pmrendermanager.h b/kpovmodeler/pmrendermanager.h index f8e248fb..722a094c 100644 --- a/kpovmodeler/pmrendermanager.h +++ b/kpovmodeler/pmrendermanager.h @@ -93,9 +93,10 @@ typedef TQPtrListIterator<PMRenderTask> PMRenderTaskListIterator; /** * Class that controls the background rendering */ -class PMRenderManager : public QObject +class PMRenderManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Returns a pointer to the render manager diff --git a/kpovmodeler/pmrendermode.cpp b/kpovmodeler/pmrendermode.cpp index 8ef8d207..622f7b2f 100644 --- a/kpovmodeler/pmrendermode.cpp +++ b/kpovmodeler/pmrendermode.cpp @@ -160,33 +160,33 @@ TQStringList PMRenderMode::commandLineSwitches( ) const TQStringList cl; TQString tmp; - cl.append( TQString( "+W%1" ).arg( m_width ) ); - cl.append( TQString( "+H%1" ).arg( m_height ) ); + cl.append( TQString( "+W%1" ).tqarg( m_width ) ); + cl.append( TQString( "+H%1" ).tqarg( m_height ) ); if( m_subSection ) { if( m_startRow < 1.0 ) tmp.sprintf( "+SR%4.2f", m_startRow ); else - tmp = TQString( "+SR%1" ).arg( ( int ) ( m_startRow + 0.5 ) ); + tmp = TQString( "+SR%1" ).tqarg( ( int ) ( m_startRow + 0.5 ) ); cl.append( tmp ); if( m_endRow < 1.0 ) tmp.sprintf( "+ER%4.2f", m_endRow ); else - tmp = TQString( "+ER%1" ).arg( ( int ) ( m_endRow + 0.5 ) ); + tmp = TQString( "+ER%1" ).tqarg( ( int ) ( m_endRow + 0.5 ) ); cl.append( tmp ); if( m_startColumn < 1.0 ) tmp.sprintf( "+SC%4.2f", m_startColumn ); else - tmp = TQString( "+SC%1" ).arg( ( int ) ( m_startColumn + 0.5 ) ); + tmp = TQString( "+SC%1" ).tqarg( ( int ) ( m_startColumn + 0.5 ) ); cl.append( tmp ); if( m_endColumn < 1.0 ) tmp.sprintf( "+EC%4.2f", m_endColumn ); else - tmp = TQString( "+EC%1" ).arg( ( int ) ( m_endColumn + 0.5 ) ); + tmp = TQString( "+EC%1" ).tqarg( ( int ) ( m_endColumn + 0.5 ) ); cl.append( tmp ); } - cl.append( TQString( "+Q%1" ).arg( m_quality ) ); + cl.append( TQString( "+Q%1" ).tqarg( m_quality ) ); if( m_radiosity ) cl.append( TQString( "+QR" ) ); else @@ -195,7 +195,7 @@ TQStringList PMRenderMode::commandLineSwitches( ) const if( m_antialiasing ) { cl.append( TQString( "+A" ) ); - cl.append( TQString( "+AM%1" ).arg( m_samplingMethod ) ); + cl.append( TQString( "+AM%1" ).tqarg( m_samplingMethod ) ); tmp.sprintf( "+A%5.3f", m_antialiasThreshold ); cl.append( tmp ); if( m_antialiasJitter ) @@ -205,7 +205,7 @@ TQStringList PMRenderMode::commandLineSwitches( ) const } else cl.append( TQString( "-J" ) ); - cl.append( TQString( "+R%1" ).arg( m_antialiasDepth ) ); + cl.append( TQString( "+R%1" ).tqarg( m_antialiasDepth ) ); } else cl.append( TQString( "-A" ) ); diff --git a/kpovmodeler/pmrendermode.h b/kpovmodeler/pmrendermode.h index eb9410e4..f4037906 100644 --- a/kpovmodeler/pmrendermode.h +++ b/kpovmodeler/pmrendermode.h @@ -47,7 +47,7 @@ public: */ PMRenderMode( ); /** - * Reads the attributes from the QDomElement + * Reads the attributes from the TQDomElement */ PMRenderMode( const TQDomElement& e ); diff --git a/kpovmodeler/pmrendermodesdialog.cpp b/kpovmodeler/pmrendermodesdialog.cpp index 4fa8f09f..55f969cf 100644 --- a/kpovmodeler/pmrendermodesdialog.cpp +++ b/kpovmodeler/pmrendermodesdialog.cpp @@ -37,8 +37,8 @@ TQSize PMRenderModesDialog::s_size = TQSize( 300, 200 ); -PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, TQWidget* parent, const char* name ) - : KDialogBase( parent, name, true, i18n( "Render Modes" ), +PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n( "Render Modes" ), Ok | Cancel, Ok ) { m_selectionIndex = modes->at( ); @@ -239,8 +239,8 @@ const char* qualityString[numQuality] = const int c_qualityToIndex[12] = { 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 8 }; const int c_indexToQuality[numQuality] = { 0, 2, 4, 5, 6, 8, 9, 10, 11 }; -PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent, const char* name ) - : KDialogBase( parent, name, true, i18n( "Render Modes" ), +PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n( "Render Modes" ), Ok | Cancel, Ok ) { m_pMode = mode; diff --git a/kpovmodeler/pmrendermodesdialog.h b/kpovmodeler/pmrendermodesdialog.h index 1afce03b..1494095e 100644 --- a/kpovmodeler/pmrendermodesdialog.h +++ b/kpovmodeler/pmrendermodesdialog.h @@ -39,11 +39,12 @@ class PMFloatEdit; class PMRenderModesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Creates a dialog for the modes list */ - PMRenderModesDialog( PMRenderModeList* modes, TQWidget* parent = 0, const char* name = 0 ); + PMRenderModesDialog( PMRenderModeList* modes, TQWidget* tqparent = 0, const char* name = 0 ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); @@ -107,11 +108,12 @@ private: class PMRenderModeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Creates a dialog for the mode */ - PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent = 0, const char* name = 0 ); + PMRenderModeDialog( PMRenderMode* mode, TQWidget* tqparent = 0, const char* name = 0 ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); diff --git a/kpovmodeler/pmresourcelocator.cpp b/kpovmodeler/pmresourcelocator.cpp index 715abc45..46ab9502 100644 --- a/kpovmodeler/pmresourcelocator.cpp +++ b/kpovmodeler/pmresourcelocator.cpp @@ -52,16 +52,16 @@ void PMResourceLocator::clearCache( ) TQString PMResourceLocator::lookUp( const TQString& file ) { if( file.isEmpty( ) ) - return TQString::null; + return TQString(); kdDebug( PMArea ) << "LookUp: " << file << endl; - TQString* ps = m_cache.find( file ); + TQString* ps = m_cache.tqfind( file ); if( ps ) return *ps; bool found = false; - TQString fullPath = TQString::null; + TQString fullPath = TQString(); if( file[0] == '/' ) { diff --git a/kpovmodeler/pmrotate.cpp b/kpovmodeler/pmrotate.cpp index 5a432c91..700c611c 100644 --- a/kpovmodeler/pmrotate.cpp +++ b/kpovmodeler/pmrotate.cpp @@ -66,11 +66,11 @@ void PMRotate::readAttributes( const PMXMLHelper& h ) m_rotate = h.vectorAttribute( "value", rotateDefault ); } -PMMetaObject* PMRotate::metaObject( ) const +PMMetaObject* PMRotate::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Rotate", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Rotate", Base::tqmetaObject( ), createNewRotate ); s_pMetaObject->addProperty( new PMRotateProperty( "rotation", &PMRotate::setRotation, &PMRotate::rotation ) ); @@ -102,9 +102,9 @@ void PMRotate::setRotation( const PMVector& p ) } } -PMDialogEditBase* PMRotate::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMRotate::editWidget( TQWidget* tqparent ) const { - return new PMRotateEdit( parent ); + return new PMRotateEdit( tqparent ); } void PMRotate::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmrotate.h b/kpovmodeler/pmrotate.h index 4ecc6d9a..ad80f2b0 100644 --- a/kpovmodeler/pmrotate.h +++ b/kpovmodeler/pmrotate.h @@ -54,7 +54,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMRotateEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmrotate" ); } diff --git a/kpovmodeler/pmrotateedit.cpp b/kpovmodeler/pmrotateedit.cpp index 2ad5f06e..6803b90c 100644 --- a/kpovmodeler/pmrotateedit.cpp +++ b/kpovmodeler/pmrotateedit.cpp @@ -24,8 +24,8 @@ #include <klocale.h> -PMRotateEdit::PMRotateEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMRotateEdit::PMRotateEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmrotateedit.h b/kpovmodeler/pmrotateedit.h index f9e895df..147c4b1c 100644 --- a/kpovmodeler/pmrotateedit.h +++ b/kpovmodeler/pmrotateedit.h @@ -35,12 +35,13 @@ class PMVectorEdit; class PMRotateEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMRotateEdit with parent and name + * Creates a PMRotateEdit with tqparent and name */ - PMRotateEdit( TQWidget* parent, const char* name = 0 ); + PMRotateEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmscale.cpp b/kpovmodeler/pmscale.cpp index af8245b8..9b78f7e3 100644 --- a/kpovmodeler/pmscale.cpp +++ b/kpovmodeler/pmscale.cpp @@ -66,11 +66,11 @@ void PMScale::readAttributes( const PMXMLHelper& h ) m_scale = h.vectorAttribute( "value", scaleDefault ); } -PMMetaObject* PMScale::metaObject( ) const +PMMetaObject* PMScale::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Scale", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Scale", Base::tqmetaObject( ), createNewScale ); s_pMetaObject->addProperty( new PMScaleProperty( "scale", &PMScale::setScale, &PMScale::scale ) ); @@ -102,9 +102,9 @@ void PMScale::setScale( const PMVector& p ) } } -PMDialogEditBase* PMScale::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMScale::editWidget( TQWidget* tqparent ) const { - return new PMScaleEdit( parent ); + return new PMScaleEdit( tqparent ); } void PMScale::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmscale.h b/kpovmodeler/pmscale.h index 72821041..b0b6a12d 100644 --- a/kpovmodeler/pmscale.h +++ b/kpovmodeler/pmscale.h @@ -55,7 +55,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMScaleEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmscale" ); } diff --git a/kpovmodeler/pmscaleedit.cpp b/kpovmodeler/pmscaleedit.cpp index 24f3a471..9b96c496 100644 --- a/kpovmodeler/pmscaleedit.cpp +++ b/kpovmodeler/pmscaleedit.cpp @@ -24,8 +24,8 @@ #include <klocale.h> -PMScaleEdit::PMScaleEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMScaleEdit::PMScaleEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmscaleedit.h b/kpovmodeler/pmscaleedit.h index 0e553be5..19ca04ce 100644 --- a/kpovmodeler/pmscaleedit.h +++ b/kpovmodeler/pmscaleedit.h @@ -35,12 +35,13 @@ class PMVectorEdit; class PMScaleEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMScaleEdit with parent and name + * Creates a PMScaleEdit with tqparent and name */ - PMScaleEdit( TQWidget* parent, const char* name = 0 ); + PMScaleEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmscanner.cpp b/kpovmodeler/pmscanner.cpp index ebabb147..15e50489 100644 --- a/kpovmodeler/pmscanner.cpp +++ b/kpovmodeler/pmscanner.cpp @@ -304,13 +304,13 @@ PMReservedWordDict::PMReservedWordDict( PMDictMode mode ) insert( "prism", new int( PRISM_TOK ) ); insert( "projected_through", new int( PROJECTED_THROUGH_TOK ) ); insert( "pwr", new int( PWR_TOK ) ); - insert( "quadratic_spline", new int( QUADRATIC_SPLINE_TOK ) ); - insert( "quadric", new int( QUADRIC_TOK ) ); - insert( "quartic", new int( QUARTIC_TOK ) ); - insert( "quaternion", new int( QUATERNION_TOK ) ); - insert( "quick_color", new int( QUICK_COLOR_TOK ) ); - insert( "quick_colour", new int( QUICK_COLOUR_TOK ) ); - insert( "quilted", new int( QUILTED_TOK ) ); + insert( "quadratic_spline", new int( TQUADRATIC_SPLINE_TOK ) ); + insert( "quadric", new int( TQUADRIC_TOK ) ); + insert( "quartic", new int( TQUARTIC_TOK ) ); + insert( "quaternion", new int( TQUATERNION_TOK ) ); + insert( "quick_color", new int( TQUICK_COLOR_TOK ) ); + insert( "quick_colour", new int( TQUICK_COLOUR_TOK ) ); + insert( "quilted", new int( TQUILTED_TOK ) ); insert( "radial", new int( RADIAL_TOK ) ); insert( "radians", new int( RADIANS_TOK ) ); insert( "radiosity", new int( RADIOSITY_TOK ) ); @@ -362,7 +362,7 @@ PMReservedWordDict::PMReservedWordDict( PMDictMode mode ) insert( "spiral2", new int( SPIRAL2_TOK ) ); insert( "spotlight", new int( SPOTLIGHT_TOK ) ); insert( "spotted", new int( SPOTTED_TOK ) ); - insert( "sqr", new int( SQR_TOK ) ); + insert( "sqr", new int( STQR_TOK ) ); insert( "sqrt", new int( SQRT_TOK ) ); insert( "str", new int( STR_TOK ) ); insert( "strcmp", new int( STRCMP_TOK ) ); @@ -577,10 +577,10 @@ void PMScanner::scanError( int c ) m_token = SCANNER_ERROR_TOK; if( isprint( c ) ) m_error = i18n( "Unexpected character '%1' after \"%2\"" ) - .arg( ( char )c ).arg( m_svalue ); + .tqarg( ( char )c ).tqarg( m_svalue ); else m_error = i18n( "Unexpected character %1 after \"%2\"" ) - .arg( c, 4, 16 ).arg( m_svalue ); + .tqarg( c, 4, 16 ).tqarg( m_svalue ); #ifdef PMSCAN_DEBUG kdDebug( PMArea ) << "Line " << m_line << ": Error " << m_error << "\n"; diff --git a/kpovmodeler/pmscanner.h b/kpovmodeler/pmscanner.h index 9d2515ea..b18d1722 100644 --- a/kpovmodeler/pmscanner.h +++ b/kpovmodeler/pmscanner.h @@ -49,13 +49,13 @@ public: /** * Returns the token constant for the key if found, otherwise -1 */ - int operator[] ( const char* key ) const { return find( key ); } + int operator[] ( const char* key ) const { return tqfind( key ); } /** * Returns the token constant for the key if found, otherwise -1 */ - int find( const char* key ) const + int tqfind( const char* key ) const { - int* result = TQAsciiDict<int>::find( key ); + int* result = TQAsciiDict<int>::tqfind( key ); if( result ) return *result; return -1; @@ -64,7 +64,7 @@ public: /** - * Scanner that scans povray tokens out of a QIODevice + * Scanner that scans povray tokens out of a TQIODevice */ class PMScanner { diff --git a/kpovmodeler/pmscene.cpp b/kpovmodeler/pmscene.cpp index cd6593cd..810fa84c 100644 --- a/kpovmodeler/pmscene.cpp +++ b/kpovmodeler/pmscene.cpp @@ -52,11 +52,11 @@ TQString PMScene::description( ) const return i18n( "scene" ); } -PMMetaObject* PMScene::metaObject( ) const +PMMetaObject* PMScene::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Scene", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Scene", Base::tqmetaObject( ), createNewScene ); } return s_pMetaObject; diff --git a/kpovmodeler/pmscene.h b/kpovmodeler/pmscene.h index ed7cf227..cc1ec26a 100644 --- a/kpovmodeler/pmscene.h +++ b/kpovmodeler/pmscene.h @@ -31,7 +31,7 @@ * Class for povray scenes. * * A document has a PMScene object as top level object. A PMScene can't have - * a parent + * a tqparent */ class PMScene : public PMCompositeObject { @@ -51,7 +51,7 @@ public: virtual ~PMScene( ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; diff --git a/kpovmodeler/pmserializer.cpp b/kpovmodeler/pmserializer.cpp index 2f58d0c1..149e6020 100644 --- a/kpovmodeler/pmserializer.cpp +++ b/kpovmodeler/pmserializer.cpp @@ -72,7 +72,7 @@ void PMSerializer::printError( const TQString& msg ) else if( m_errors == s_maxErrors ) { m_messages += PMMessage( i18n( "Maximum of %1 errors reached." ) - .arg( s_maxErrors ) ); + .tqarg( s_maxErrors ) ); m_errors++; } } @@ -87,7 +87,7 @@ void PMSerializer::printWarning( const TQString& msg ) else if( m_warnings == s_maxWarnings ) { m_messages += PMMessage( i18n( "Maximum of %1 warnings reached." ) - .arg( s_maxWarnings ) ); + .tqarg( s_maxWarnings ) ); m_warnings++; } } diff --git a/kpovmodeler/pmsettingsdialog.cpp b/kpovmodeler/pmsettingsdialog.cpp index 3830a5d9..dc224d9d 100644 --- a/kpovmodeler/pmsettingsdialog.cpp +++ b/kpovmodeler/pmsettingsdialog.cpp @@ -40,16 +40,16 @@ //#define KPM_WITH_OBJECT_LIBRARY -PMSettingsDialogPage::PMSettingsDialogPage( TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMSettingsDialogPage::PMSettingsDialogPage( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { } TQSize PMSettingsDialog::s_size = TQSize( 640, 400 ); -PMSettingsDialog::PMSettingsDialog( PMPart* part, TQWidget* parent, const char* name ) +PMSettingsDialog::PMSettingsDialog( PMPart* part, TQWidget* tqparent, const char* name ) : KDialogBase( TreeList, i18n( "Configure" ), Ok | Apply | Cancel | Default, Ok, - parent, name ) + tqparent, name ) { TQStringList sl; TQWidget* w = 0; @@ -111,7 +111,7 @@ PMSettingsDialog::PMSettingsDialog( PMPart* part, TQWidget* parent, const char* sl.clear( ); sl.append( i18n( "View Layout" ) ); w = addVBoxPage( sl, i18n( "Display Settings for View Layouts" ), - SmallIcon( "pmconfigureviewlayout", 22 ) ); + SmallIcon( "pmconfigureviewtqlayout", 22 ) ); p = new PMLayoutSettings( w ); registerPage( w, p ); @@ -187,13 +187,13 @@ bool PMSettingsDialog::validateData( ) void PMSettingsDialog::saveSettings( ) { - m_repaint = false; + m_tqrepaint = false; TQValueList<PMRegisteredSettingsPage>::const_iterator it; for( it = m_pages.begin( ); it != m_pages.end( ); ++it ) ( *it ).page->applySettings( ); - if( m_repaint ) + if( m_tqrepaint ) { PMRenderManager* rm = PMRenderManager::theManager( ); rm->slotRenderingSettingsChanged( ); @@ -229,19 +229,19 @@ void PMSettingsDialog::registerPage( TQWidget* topPage, else { m_pages.push_back( PMRegisteredSettingsPage( topPage, page, i ) ); - connect( page, TQT_SIGNAL( repaintViews( ) ), TQT_SLOT( slotRepaint( ) ) ); + connect( page, TQT_SIGNAL( tqrepaintViews( ) ), TQT_SLOT( slotRepaint( ) ) ); connect( page, TQT_SIGNAL( showMe( ) ), TQT_SLOT( slotShowPage( ) ) ); } } void PMSettingsDialog::slotRepaint( ) { - m_repaint = true; + m_tqrepaint = true; } void PMSettingsDialog::slotShowPage( ) { - const TQObject* w = sender( ); + const TQObject* w = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender( ))); if( w ) { int index = findPage( ( const PMSettingsDialogPage* ) w ); diff --git a/kpovmodeler/pmsettingsdialog.h b/kpovmodeler/pmsettingsdialog.h index 478fafe0..adbcdb97 100644 --- a/kpovmodeler/pmsettingsdialog.h +++ b/kpovmodeler/pmsettingsdialog.h @@ -49,14 +49,15 @@ class PMViewLayoutEntry; * methods @ref displaySettings, @ref displayDefaults, @ref validateData * and @ref applySettings */ -class PMSettingsDialogPage : public QWidget +class PMSettingsDialogPage : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - PMSettingsDialogPage( TQWidget* parent, const char* name = 0 ); + PMSettingsDialogPage( TQWidget* tqparent, const char* name = 0 ); /** * Display the settings here. * @@ -88,7 +89,7 @@ signals: * Emit this signal if a parameter was changed * that influences the wire frame rendering. */ - void repaintViews( ); + void tqrepaintViews( ); /** * Tells the settings dialog to show this page. */ @@ -126,11 +127,12 @@ public: class PMSettingsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Standard constructor */ - PMSettingsDialog( PMPart* part, TQWidget* parent = 0, const char* name = 0 ); + PMSettingsDialog( PMPart* part, TQWidget* tqparent = 0, const char* name = 0 ); /** * Registers a new settings page. * @@ -177,7 +179,7 @@ private: bool validateData( ); void saveSettings( ); int findPage( const PMSettingsDialogPage* page ); - bool m_repaint; + bool m_tqrepaint; TQValueList<PMRegisteredSettingsPage> m_pages; PMPart* m_pPart; diff --git a/kpovmodeler/pmshell.cpp b/kpovmodeler/pmshell.cpp index a09b1f82..4eee45a9 100644 --- a/kpovmodeler/pmshell.cpp +++ b/kpovmodeler/pmshell.cpp @@ -52,7 +52,7 @@ PMShell::PMShell( const KURL& url ) setPluginLoadingMode( DoNotLoadPlugins ); setInstance( PMFactory::instance( ), false ); - m_pPart = new PMPart( this, "part", this, "part", true, this ); + m_pPart = new PMPart( this, "part", TQT_TQOBJECT(this), "part", true, this ); m_pPart->setReadWrite( ); // read-write mode m_viewNumber = 0; m_objectsToDelete.setAutoDelete( true ); @@ -95,71 +95,71 @@ void PMShell::setupActions( ) // m_helpMenu = new KHelpMenu( this, PMFactory::aboutData( ), true, // actionCollection( ) ); - KStdAction::openNew( this, TQT_SLOT( slotFileNew( ) ), actionCollection( ) ); - KStdAction::open( this, TQT_SLOT( slotFileOpen( ) ), actionCollection( ) ); - m_pRecent = KStdAction::openRecent( this, TQT_SLOT( slotOpenRecent( const KURL& ) ), + KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT( slotFileNew( ) ), actionCollection( ) ); + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen( ) ), actionCollection( ) ); + m_pRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( slotOpenRecent( const KURL& ) ), actionCollection( ) ); - KStdAction::save( this, TQT_SLOT( slotFileSave( ) ), actionCollection( ) ); - KStdAction::saveAs( this, TQT_SLOT( slotFileSaveAs( ) ), actionCollection( ) ); + KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( slotFileSave( ) ), actionCollection( ) ); + KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( slotFileSaveAs( ) ), actionCollection( ) ); - KStdAction::revert( this, TQT_SLOT( slotFileRevert( ) ), actionCollection( ) ); - KStdAction::print( this, TQT_SLOT( slotFilePrint( ) ), actionCollection( ) ); + KStdAction::revert( TQT_TQOBJECT(this), TQT_SLOT( slotFileRevert( ) ), actionCollection( ) ); + KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( slotFilePrint( ) ), actionCollection( ) ); - KStdAction::close( this, TQT_SLOT( slotFileClose( ) ), actionCollection( ) ); - KStdAction::quit( this, TQT_SLOT( close( ) ), actionCollection( ) ); + KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( slotFileClose( ) ), actionCollection( ) ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close( ) ), actionCollection( ) ); - m_pPathAction = new KToggleAction( i18n( "Show &Path" ), 0, this, + m_pPathAction = new KToggleAction( i18n( "Show &Path" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotShowPath( ) ), actionCollection( ), "options_show_path" ); m_pPathAction->setCheckedState(i18n("Hide &Path")); - m_pStatusbarAction = KStdAction::showStatusbar( this, TQT_SLOT( slotShowStatusbar( ) ), + m_pStatusbarAction = KStdAction::showStatusbar( TQT_TQOBJECT(this), TQT_SLOT( slotShowStatusbar( ) ), actionCollection( ) ); - KStdAction::saveOptions( this, TQT_SLOT( saveOptions( ) ), actionCollection( ) ); + KStdAction::saveOptions( TQT_TQOBJECT(this), TQT_SLOT( saveOptions( ) ), actionCollection( ) ); - KStdAction::keyBindings( this, TQT_SLOT( slotConfigureKeys( ) ), + KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeys( ) ), actionCollection( ) ); - KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars( ) ), + KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars( ) ), actionCollection( ) ); - KStdAction::preferences( this, TQT_SLOT( slotSettings( ) ), actionCollection( ) ); + KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT( slotSettings( ) ), actionCollection( ) ); - m_pNewTopViewAction = new KAction( i18n( "New Top View" ), 0, this, + m_pNewTopViewAction = new KAction( i18n( "New Top View" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewTopView( ) ), actionCollection( ), "view_new_topview" ); - m_pNewBottomViewAction = new KAction( i18n( "New Bottom View" ), 0, this, + m_pNewBottomViewAction = new KAction( i18n( "New Bottom View" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewBottomView( ) ), actionCollection( ), "view_new_bottomview" ); - m_pNewLeftViewAction = new KAction( i18n( "New Left View" ), 0, this, + m_pNewLeftViewAction = new KAction( i18n( "New Left View" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewLeftView( ) ), actionCollection( ), "view_new_leftview" ); - m_pNewRightViewAction = new KAction( i18n( "New Right View" ), 0, this, + m_pNewRightViewAction = new KAction( i18n( "New Right View" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewRightView( ) ), actionCollection( ), "view_new_rightview" ); - m_pNewFrontViewAction = new KAction( i18n( "New Front View" ), 0, this, + m_pNewFrontViewAction = new KAction( i18n( "New Front View" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewFrontView( ) ), actionCollection( ), "view_new_frontview" ); - m_pNewBackViewAction = new KAction( i18n( "New Back View" ), 0, this, + m_pNewBackViewAction = new KAction( i18n( "New Back View" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewBackView( ) ), actionCollection( ), "view_new_back_view" ); - m_pNewCameraViewAction = new KAction( i18n( "New Camera View" ), 0, this, + m_pNewCameraViewAction = new KAction( i18n( "New Camera View" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewCameraView( ) ), actionCollection( ), "view_new_cameraview" ); - m_pNewTreeViewAction = new KAction( i18n( "New Object Tree" ), 0, this, + m_pNewTreeViewAction = new KAction( i18n( "New Object Tree" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewTreeView( ) ), actionCollection( ), "view_new_treeview" ); - m_pNewDialogViewAction = new KAction( i18n( "New Properties View" ), 0, this, + m_pNewDialogViewAction = new KAction( i18n( "New Properties View" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewDialogView( ) ), actionCollection( ), "view_new_dialogview" ); #ifdef KPM_WITH_OBJECT_LIBRARY - m_pNewLibraryBrowserAction = new KAction( i18n( "New Library Browser" ), 0, this, + m_pNewLibraryBrowserAction = new KAction( i18n( "New Library Browser" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotNewLibraryBrowserView( ) ), actionCollection( ), "view_new_librarybrowser" ); #endif - // Creating the view layouts menu + // Creating the view tqlayouts menu m_pViewLayoutsAction = new KActionMenu( i18n( "View Layouts" ), actionCollection( ), "view_layouts_menu" ); KPopupMenu* menu = m_pViewLayoutsAction->popupMenu( ); @@ -167,7 +167,7 @@ void PMShell::setupActions( ) PMViewLayoutManager::theManager( )->fillPopupMenu( menu ); connect( menu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotSelectedLayout( int ) ) ); - m_pSaveViewLayoutAction = new KAction( i18n( "Save View Layout..." ), 0, this, + m_pSaveViewLayoutAction = new KAction( i18n( "Save View Layout..." ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotSaveViewLayout( ) ), actionCollection( ), "save_view_layout" ); } @@ -188,7 +188,7 @@ PMDockWidget* PMShell::createView( const TQString& t, PMViewOptions* o, PMViewFactory::theFactory( )->viewFactory( t ); m_viewNumber++; - TQString name = TQString( "View (%1)" ).arg( m_viewNumber ); + TQString name = TQString( "View (%1)" ).tqarg( m_viewNumber ); if( factory ) { @@ -231,7 +231,7 @@ PMDockWidget* PMShell::createTreeView( ) { PMDockWidget* dock = 0; m_numTreeViews++; - TQString name = TQString( "Object Tree (%1)" ).arg( m_numTreeViews ); + TQString name = TQString( "Object Tree (%1)" ).tqarg( m_numTreeViews ); dock = createDockWidget( name, SmallIcon( "pmtreeview" ), 0L, i18n( "Object Tree" ), i18n( "Object Tree" ) ); dock->setDockSite( PMDockWidget::DockFullSite ); @@ -248,7 +248,7 @@ PMDockWidget* PMShell::createDialogView( ) { PMDockWidget* dock = 0; m_numDialogViews++; - TQString name = TQString( "Object Properties (%1)" ).arg( m_numDialogViews ); + TQString name = TQString( "Object Properties (%1)" ).tqarg( m_numDialogViews ); dock = createDockWidget( name, SmallIcon( "pmdialogview" ), 0L, i18n( "Object Properties" ), i18n( "Object Properties" ) ); dock->setDockSite( PMDockWidget::DockFullSite ); @@ -265,7 +265,7 @@ PMDockWidget* PMShell::create3DView( PMGLView::PMViewType t ) { PMDockWidget* dock = 0; m_numGLViews++; - TQString name = TQString( "3D View (%1)" ).arg( m_numGLViews ); + TQString name = TQString( "3D View (%1)" ).tqarg( m_numGLViews ); dock = createDockWidget( name, SmallIcon( "pmglview" ), 0L, i18n( "3D View" ), i18n( "3D View" ) ); dock->setDockSite( PMDockWidget::DockFullSite ); @@ -341,13 +341,13 @@ void PMShell::slotNewLibraryBrowserView( ) void PMShell::slotDockWidgetClosed( ) { - const TQObject* o = sender( ); + const TQObject* o = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender( ))); if( o && o->inherits( "PMDockWidget" ) ) { - if( m_objectsToDelete.containsRef( o ) == 0 ) + if( m_objectsToDelete.tqcontainsRef( o ) == 0 ) { m_objectsToDelete.append( o ); - TQTimer::singleShot( 0, this, TQT_SLOT( slotDeleteClosedObjects( ) ) ); + TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( slotDeleteClosedObjects( ) ) ); } } } @@ -377,7 +377,7 @@ void PMShell::openURL( const KURL& url ) void PMShell::slotOpenRecent( const KURL& url ) { m_openRecentURL = url; - TQTimer::singleShot( 0, this, TQT_SLOT( slotOpenRecentTimer( ) ) ); + TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( slotOpenRecentTimer( ) ) ); } void PMShell::slotOpenRecentTimer( ) @@ -402,7 +402,7 @@ void PMShell::slotFileNew( ) void PMShell::slotFileOpen( ) { KURL url = KFileDialog::getOpenURL( - TQString::null, TQString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) + TQString(), TQString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) + "\n*|" + i18n( "All Files" ) ); if( !url.isEmpty( ) ) @@ -434,7 +434,7 @@ void PMShell::slotFileSaveAs( ) void PMShell::saveAs( ) { - KFileDialog dlg( TQString::null, + KFileDialog dlg( TQString(), TQString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) + TQString( "\n*|" ) + i18n( "All Files" ), 0, "filedialog", true ); @@ -602,7 +602,7 @@ void PMShell::setCaption( const TQString& caption ) else { if( !m_pPathAction->isChecked( ) ) - tmp = caption.right( caption.length( ) - caption.findRev( '/' ) - 1 ); + tmp = caption.right( caption.length( ) - caption.tqfindRev( '/' ) - 1 ); else tmp = caption; } @@ -649,14 +649,14 @@ bool PMShell::overwriteURL( const KURL& u ) TQString name( u.path( ) ); info.setFile( name ); if( info.exists( ) ) - query = KMessageBox::warningContinueCancel( 0, i18n( "A file with this name already exists.\nDo you want to overwrite it?" ), TQString::null, i18n("Overwrite") ); + query = KMessageBox::warningContinueCancel( 0, i18n( "A file with this name already exists.\nDo you want to overwrite it?" ), TQString(), i18n("Overwrite") ); } return ( query == KMessageBox::Continue ); } void PMShell::slotSelectedLayout( int id ) { - TQMenuItem* menu = m_pViewLayoutsAction->popupMenu( )->findItem( id ); + TQMenuItem* menu = m_pViewLayoutsAction->popupMenu( )->tqfindItem( id ); PMViewLayoutManager::theManager( )->displayLayout( menu->text( ), this ); } diff --git a/kpovmodeler/pmshell.h b/kpovmodeler/pmshell.h index 2165e15c..7ae0a62c 100644 --- a/kpovmodeler/pmshell.h +++ b/kpovmodeler/pmshell.h @@ -43,6 +43,7 @@ class PMViewOptions; class PMShell : public PMDockMainWindow { Q_OBJECT + TQ_OBJECT public: /** @@ -113,9 +114,9 @@ public slots: void saveOptions( ); void restoreOptions( ); - void setCaption( const TQString& caption = TQString::null ); - void statusMsg( const TQString& text = TQString::null ); - void slotControlPointMsg( const TQString& msg = TQString::null ); + void setCaption( const TQString& caption = TQString() ); + void statusMsg( const TQString& text = TQString() ); + void slotControlPointMsg( const TQString& msg = TQString() ); void slotModified( ); void slotDockWidgetClosed( ); diff --git a/kpovmodeler/pmskysphere.cpp b/kpovmodeler/pmskysphere.cpp index a31cc475..f44f2c55 100644 --- a/kpovmodeler/pmskysphere.cpp +++ b/kpovmodeler/pmskysphere.cpp @@ -44,11 +44,11 @@ PMSkySphere::~PMSkySphere( ) { } -PMMetaObject* PMSkySphere::metaObject( ) const +PMMetaObject* PMSkySphere::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "SkySphere", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "SkySphere", Base::tqmetaObject( ), createNewSkySphere ); } return s_pMetaObject; @@ -69,8 +69,8 @@ TQString PMSkySphere::description( ) const return i18n( "skysphere" ); } -PMDialogEditBase* PMSkySphere::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMSkySphere::editWidget( TQWidget* tqparent ) const { - return new PMSkySphereEdit( parent ); + return new PMSkySphereEdit( tqparent ); } diff --git a/kpovmodeler/pmskysphere.h b/kpovmodeler/pmskysphere.h index 116af543..ef14cbd8 100644 --- a/kpovmodeler/pmskysphere.h +++ b/kpovmodeler/pmskysphere.h @@ -52,14 +52,14 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; /** * Returns a new @ref PMSkySphereEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmskysphere" ); } diff --git a/kpovmodeler/pmskysphereedit.cpp b/kpovmodeler/pmskysphereedit.cpp index 4a1590b2..4cab0157 100644 --- a/kpovmodeler/pmskysphereedit.cpp +++ b/kpovmodeler/pmskysphereedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMSkySphereEdit::PMSkySphereEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMSkySphereEdit::PMSkySphereEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmskysphereedit.h b/kpovmodeler/pmskysphereedit.h index f0e2946e..2f8c811e 100644 --- a/kpovmodeler/pmskysphereedit.h +++ b/kpovmodeler/pmskysphereedit.h @@ -34,12 +34,13 @@ class PMSkySphere; class PMSkySphereEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMSkySphereEdit with parent and name + * Creates a PMSkySphereEdit with tqparent and name */ - PMSkySphereEdit( TQWidget* parent, const char* name = 0 ); + PMSkySphereEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmslope.cpp b/kpovmodeler/pmslope.cpp index 1d2d2977..4cabc973 100644 --- a/kpovmodeler/pmslope.cpp +++ b/kpovmodeler/pmslope.cpp @@ -69,11 +69,11 @@ void PMSlope::readAttributes( const PMXMLHelper& h ) m_slope = h.doubleAttribute( "slope", slopeDefault ); } -PMMetaObject* PMSlope::metaObject( ) const +PMMetaObject* PMSlope::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Slope", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Slope", Base::tqmetaObject( ), createNewSlope ); s_pMetaObject->addProperty( new PMSlopeProperty( "height", &PMSlope::setHeight, &PMSlope::height ) ); @@ -113,9 +113,9 @@ void PMSlope::setSlope( const double c ) } } -PMDialogEditBase* PMSlope::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMSlope::editWidget( TQWidget* tqparent ) const { - return new PMSlopeEdit( parent ); + return new PMSlopeEdit( tqparent ); } void PMSlope::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmslope.h b/kpovmodeler/pmslope.h index eb860373..12cc28b7 100644 --- a/kpovmodeler/pmslope.h +++ b/kpovmodeler/pmslope.h @@ -53,7 +53,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMSlopeEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmslopeedit.cpp b/kpovmodeler/pmslopeedit.cpp index 63b0ee44..848565ee 100644 --- a/kpovmodeler/pmslopeedit.cpp +++ b/kpovmodeler/pmslopeedit.cpp @@ -29,8 +29,8 @@ #include <kdialog.h> -PMSlopeEdit::PMSlopeEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMSlopeEdit::PMSlopeEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmslopeedit.h b/kpovmodeler/pmslopeedit.h index a2defaa9..a57816a1 100644 --- a/kpovmodeler/pmslopeedit.h +++ b/kpovmodeler/pmslopeedit.h @@ -40,12 +40,13 @@ class TQLabel; class PMSlopeEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMSlopeEdit with parent and name + * Creates a PMSlopeEdit with tqparent and name */ - PMSlopeEdit( TQWidget* parent, const char* name = 0 ); + PMSlopeEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsolidcolor.cpp b/kpovmodeler/pmsolidcolor.cpp index dd50d030..0c05f9c9 100644 --- a/kpovmodeler/pmsolidcolor.cpp +++ b/kpovmodeler/pmsolidcolor.cpp @@ -65,11 +65,11 @@ void PMSolidColor::readAttributes( const PMXMLHelper& h ) m_color = h.colorAttribute( "color", colorDefault ); } -PMMetaObject* PMSolidColor::metaObject( ) const +PMMetaObject* PMSolidColor::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "SolidColor", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "SolidColor", Base::tqmetaObject( ), createNewSolidColor ); s_pMetaObject->addProperty( new PMSolidColorProperty( "color", &PMSolidColor::setColor, &PMSolidColor::color ) ); @@ -97,9 +97,9 @@ void PMSolidColor::setColor( const PMColor& c ) } } -PMDialogEditBase* PMSolidColor::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMSolidColor::editWidget( TQWidget* tqparent ) const { - return new PMSolidColorEdit( parent ); + return new PMSolidColorEdit( tqparent ); } void PMSolidColor::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmsolidcolor.h b/kpovmodeler/pmsolidcolor.h index 225a3a5b..34e8dbff 100644 --- a/kpovmodeler/pmsolidcolor.h +++ b/kpovmodeler/pmsolidcolor.h @@ -54,7 +54,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMSolidColorEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmsolidcoloredit.cpp b/kpovmodeler/pmsolidcoloredit.cpp index 3eb326c4..9b757d72 100644 --- a/kpovmodeler/pmsolidcoloredit.cpp +++ b/kpovmodeler/pmsolidcoloredit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMSolidColorEdit::PMSolidColorEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMSolidColorEdit::PMSolidColorEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -35,12 +35,12 @@ void PMSolidColorEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + TQHBoxLayout* tqlayout = new TQHBoxLayout( topLayout( ) ); m_pColorEdit = new PMColorEdit( true, this ); TQLabel* label = new TQLabel( i18n( "Color:" ), this ); - layout->addWidget( label, 0, AlignTop ); - layout->addWidget( m_pColorEdit ); + tqlayout->addWidget( label, 0, AlignTop ); + tqlayout->addWidget( m_pColorEdit ); connect( m_pColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } diff --git a/kpovmodeler/pmsolidcoloredit.h b/kpovmodeler/pmsolidcoloredit.h index c3dada09..46bcba07 100644 --- a/kpovmodeler/pmsolidcoloredit.h +++ b/kpovmodeler/pmsolidcoloredit.h @@ -35,12 +35,13 @@ class PMColorEdit; class PMSolidColorEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMSolidColorEdit with parent and name + * Creates a PMSolidColorEdit with tqparent and name */ - PMSolidColorEdit( TQWidget* parent, const char* name = 0 ); + PMSolidColorEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsolidobject.cpp b/kpovmodeler/pmsolidobject.cpp index 61ddd45c..0c98ded9 100644 --- a/kpovmodeler/pmsolidobject.cpp +++ b/kpovmodeler/pmsolidobject.cpp @@ -43,11 +43,11 @@ PMSolidObject::~PMSolidObject( ) { } -PMMetaObject* PMSolidObject::metaObject( ) const +PMMetaObject* PMSolidObject::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "SolidObject", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "SolidObject", Base::tqmetaObject( ) ); s_pMetaObject->addProperty( new PMSolidObjectProperty( "inverse", &PMSolidObject::setInverse, &PMSolidObject::inverse ) ); s_pMetaObject->addProperty( diff --git a/kpovmodeler/pmsolidobject.h b/kpovmodeler/pmsolidobject.h index be2d2f5c..9406aa0e 100644 --- a/kpovmodeler/pmsolidobject.h +++ b/kpovmodeler/pmsolidobject.h @@ -44,11 +44,11 @@ public: PMSolidObject( const PMSolidObject& s ); /** - * Deletes the object and all children + * Deletes the object and all tqchildren */ virtual ~PMSolidObject( ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; diff --git a/kpovmodeler/pmsolidobjectedit.cpp b/kpovmodeler/pmsolidobjectedit.cpp index 4a1a2205..848e7a64 100644 --- a/kpovmodeler/pmsolidobjectedit.cpp +++ b/kpovmodeler/pmsolidobjectedit.cpp @@ -23,8 +23,8 @@ #include <tqlayout.h> #include <klocale.h> -PMSolidObjectEdit::PMSolidObjectEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMSolidObjectEdit::PMSolidObjectEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmsolidobjectedit.h b/kpovmodeler/pmsolidobjectedit.h index 719e3f01..c0a5f52d 100644 --- a/kpovmodeler/pmsolidobjectedit.h +++ b/kpovmodeler/pmsolidobjectedit.h @@ -35,12 +35,13 @@ class TQCheckBox; class PMSolidObjectEdit : public PMGraphicalObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMGraphicalObjectEdit Base; public: /** - * Creates a PMSolidObjectEdit with parent and name + * Creates a PMSolidObjectEdit with tqparent and name */ - PMSolidObjectEdit( TQWidget* parent, const char* name = 0 ); + PMSolidObjectEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsor.cpp b/kpovmodeler/pmsor.cpp index 2ede8b8a..ae5a34e4 100644 --- a/kpovmodeler/pmsor.cpp +++ b/kpovmodeler/pmsor.cpp @@ -194,11 +194,11 @@ void PMSurfaceOfRevolution::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMSurfaceOfRevolution::metaObject( ) const +PMMetaObject* PMSurfaceOfRevolution::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "SurfaceOfRevolution", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "SurfaceOfRevolution", Base::tqmetaObject( ), createNewSurfaceOfRevolution ); s_pMetaObject->addProperty( new PMSurfaceOfRevolutionProperty( "sturm", &PMSurfaceOfRevolution::setSturm, @@ -253,9 +253,9 @@ void PMSurfaceOfRevolution::setPoints( const TQValueList<PMVector>& points ) } } -PMDialogEditBase* PMSurfaceOfRevolution::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMSurfaceOfRevolution::editWidget( TQWidget* tqparent ) const { - return new PMSurfaceOfRevolutionEdit( parent ); + return new PMSurfaceOfRevolutionEdit( tqparent ); } void PMSurfaceOfRevolution::createMemento( ) @@ -421,7 +421,7 @@ void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list ) { lastPoint = cp; cp = new PMSorControlPoint( lastPoint, *it, PMSorControlPoint::PM2DXY, i, - i18n( "Point %1 (xy)" ).arg( i + 1 ) ); + i18n( "Point %1 (xy)" ).tqarg( i + 1 ) ); tmp1.append( cp ); } @@ -432,7 +432,7 @@ void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list ) { lastPoint = cp; cp = new PMSorControlPoint( lastPoint, *it, PMSorControlPoint::PM2DZY, i, - i18n( "Point %1 (yz)" ).arg( i + 1 ) ); + i18n( "Point %1 (yz)" ).tqarg( i + 1 ) ); tmp2.append( cp ); } diff --git a/kpovmodeler/pmsor.h b/kpovmodeler/pmsor.h index 46db677e..6256b280 100644 --- a/kpovmodeler/pmsor.h +++ b/kpovmodeler/pmsor.h @@ -60,7 +60,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -71,7 +71,7 @@ public: /** * Returns a new @ref PMSurfaceOfRevolutionEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmsoredit.cpp b/kpovmodeler/pmsoredit.cpp index 127015df..7bd7eb73 100644 --- a/kpovmodeler/pmsoredit.cpp +++ b/kpovmodeler/pmsoredit.cpp @@ -32,8 +32,8 @@ #include <kiconloader.h> #include <kmessagebox.h> -PMSurfaceOfRevolutionEdit::PMSurfaceOfRevolutionEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMSurfaceOfRevolutionEdit::PMSurfaceOfRevolutionEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -160,7 +160,7 @@ bool PMSurfaceOfRevolutionEdit::isDataValid( ) { m_pPoints->setCurrentCell( pnr, 1 ); KMessageBox::error( this, i18n( "The v coordinate of point %1 and %2 must be different." ) - .arg( pnr + 1 ).arg( pnr + 3 ), + .tqarg( pnr + 1 ).tqarg( pnr + 3 ), i18n( "Error" ) ); return false; } diff --git a/kpovmodeler/pmsoredit.h b/kpovmodeler/pmsoredit.h index 1c7c57fd..3858dd11 100644 --- a/kpovmodeler/pmsoredit.h +++ b/kpovmodeler/pmsoredit.h @@ -43,12 +43,13 @@ class PMVectorListEdit; class PMSurfaceOfRevolutionEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMSurfaceOfRevolutionEdit with parent and name + * Creates a PMSurfaceOfRevolutionEdit with tqparent and name */ - PMSurfaceOfRevolutionEdit( TQWidget* parent, const char* name = 0 ); + PMSurfaceOfRevolutionEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsphere.cpp b/kpovmodeler/pmsphere.cpp index cca385c9..8a419a3e 100644 --- a/kpovmodeler/pmsphere.cpp +++ b/kpovmodeler/pmsphere.cpp @@ -71,11 +71,11 @@ TQString PMSphere::description( ) const return i18n( "sphere" ); } -PMMetaObject* PMSphere::metaObject( ) const +PMMetaObject* PMSphere::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Sphere", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Sphere", Base::tqmetaObject( ), createNewSphere ); s_pMetaObject->addProperty( new PMSphereProperty( "radius", &PMSphere::setRadius, &PMSphere::radius ) ); @@ -99,10 +99,10 @@ void PMSphere::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMSphere::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMSphere::editWidget( TQWidget* tqparent ) const { - return new PMSphereEdit( parent ); + return new PMSphereEdit( tqparent ); } void PMSphere::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmsphere.h b/kpovmodeler/pmsphere.h index 984bc6d6..9450572e 100644 --- a/kpovmodeler/pmsphere.h +++ b/kpovmodeler/pmsphere.h @@ -57,7 +57,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -66,7 +66,7 @@ public: /** * Returns a new @ref PMSphereEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmsphereedit.cpp b/kpovmodeler/pmsphereedit.cpp index c12f95bd..68d474f0 100644 --- a/kpovmodeler/pmsphereedit.cpp +++ b/kpovmodeler/pmsphereedit.cpp @@ -26,8 +26,8 @@ #include <tqlabel.h> #include <klocale.h> -PMSphereEdit::PMSphereEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMSphereEdit::PMSphereEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -36,19 +36,19 @@ void PMSphereEdit::createTopWidgets( ) { Base::createTopWidgets( ); - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; m_pCentre = new PMVectorEdit( "x", "y", "z", this ); m_pRadius = new PMFloatEdit( this ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Center:" ), this ) ); - layout->addWidget( m_pCentre ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Center:" ), this ) ); + tqlayout->addWidget( m_pCentre ); - layout = new TQHBoxLayout( topLayout( ) ); - layout->addWidget( new TQLabel( i18n( "Radius:" ), this ) ); - layout->addWidget( m_pRadius ); - layout->addStretch( 1 ); + tqlayout = new TQHBoxLayout( topLayout( ) ); + tqlayout->addWidget( new TQLabel( i18n( "Radius:" ), this ) ); + tqlayout->addWidget( m_pRadius ); + tqlayout->addStretch( 1 ); connect( m_pCentre, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); diff --git a/kpovmodeler/pmsphereedit.h b/kpovmodeler/pmsphereedit.h index b885b9ac..c5939767 100644 --- a/kpovmodeler/pmsphereedit.h +++ b/kpovmodeler/pmsphereedit.h @@ -36,12 +36,13 @@ class PMFloatEdit ; class PMSphereEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMSphereEdit with parent and name + * Creates a PMSphereEdit with tqparent and name */ - PMSphereEdit( TQWidget* parent, const char* name = 0 ); + PMSphereEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmspheresweep.cpp b/kpovmodeler/pmspheresweep.cpp index b19ef173..19ff24b6 100644 --- a/kpovmodeler/pmspheresweep.cpp +++ b/kpovmodeler/pmspheresweep.cpp @@ -87,7 +87,7 @@ public: { if( !m_bRadiiSaved ) { - // Direct assignment does not work with Qt 2.3.x + // Direct assignment does not work with TQt 2.3.x // The list will be changed later in a graphical // change because TQValueList::detach( ) is called // too late! @@ -216,11 +216,11 @@ void PMSphereSweep::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMSphereSweep::metaObject( ) const +PMMetaObject* PMSphereSweep::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "SphereSweep", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "SphereSweep", Base::tqmetaObject( ), createNewSphereSweep ); s_pMetaObject->addProperty( new PMSphereSweepProperty( "tolerance", &PMSphereSweep::setTolerance, &PMSphereSweep::tolerance ) ); @@ -290,9 +290,9 @@ void PMSphereSweep::setRadii( const TQValueList<double>& radii ) } } -PMDialogEditBase* PMSphereSweep::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMSphereSweep::editWidget( TQWidget* tqparent ) const { - return new PMSphereSweepEdit( parent ); + return new PMSphereSweepEdit( tqparent ); } void PMSphereSweep::createMemento( ) @@ -434,19 +434,19 @@ void PMSphereSweep::controlPoints( PMControlPointList& list ) it != m_points.end( ) && it2 != m_radii.end( ); ++it, ++it2, ++nr ) { PM3DControlPoint* p = new PM3DControlPoint( *it, i++, - i18n( "Center %1" ).arg( nr ) ); + i18n( "Center %1" ).tqarg( nr ) ); list.append( p ); list.append( new PMDistanceControlPoint( p, PMVector( 1.0, 0.0, 0.0 ), *it2, i++, - i18n( "Radius %1 (x)" ).arg( nr ), + i18n( "Radius %1 (x)" ).tqarg( nr ), true ) ); list.append( new PMDistanceControlPoint( p, PMVector( 0.0, 1.0, 0.0 ), *it2, i++, - i18n( "Radius %1 (y)" ).arg( nr ), + i18n( "Radius %1 (y)" ).tqarg( nr ), true ) ); list.append( new PMDistanceControlPoint( p, PMVector( 0.0, 0.0, 1.0 ), *it2, i++, - i18n( "Radius %1 (z)" ).arg( nr ), + i18n( "Radius %1 (z)" ).tqarg( nr ), true ) ); } } diff --git a/kpovmodeler/pmspheresweep.h b/kpovmodeler/pmspheresweep.h index b28d69a5..23909bed 100644 --- a/kpovmodeler/pmspheresweep.h +++ b/kpovmodeler/pmspheresweep.h @@ -63,7 +63,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -74,7 +74,7 @@ public: /** * Returns a new @ref PMSphereSweepEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmspheresweepedit.cpp b/kpovmodeler/pmspheresweepedit.cpp index 9798a304..a10c8e62 100644 --- a/kpovmodeler/pmspheresweepedit.cpp +++ b/kpovmodeler/pmspheresweepedit.cpp @@ -34,8 +34,8 @@ #include <kiconloader.h> #include <kmessagebox.h> -PMSphereSweepEdit::PMSphereSweepEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMSphereSweepEdit::PMSphereSweepEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmspheresweepedit.h b/kpovmodeler/pmspheresweepedit.h index 16d86246..c6b8a9f1 100644 --- a/kpovmodeler/pmspheresweepedit.h +++ b/kpovmodeler/pmspheresweepedit.h @@ -44,12 +44,13 @@ class TQLabel; class PMSphereSweepEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMSphereSweepEdit with parent and name + * Creates a PMSphereSweepEdit with tqparent and name */ - PMSphereSweepEdit( TQWidget* parent, const char* name = 0 ); + PMSphereSweepEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsplinememento.cpp b/kpovmodeler/pmsplinememento.cpp index 7836fc7d..99568e74 100644 --- a/kpovmodeler/pmsplinememento.cpp +++ b/kpovmodeler/pmsplinememento.cpp @@ -32,7 +32,7 @@ void PMSplineMemento::setSplinePoints( const TQValueList<PMVector>& v ) { if( !m_bSplinePointsSaved ) { - // Direct assignment does not work with Qt 2.3.x + // Direct assignment does not work with TQt 2.3.x // The list will be changed later in a graphical // change because TQValueList::detach( ) is called // too late! diff --git a/kpovmodeler/pmsqe.cpp b/kpovmodeler/pmsqe.cpp index 61279251..4d79d218 100644 --- a/kpovmodeler/pmsqe.cpp +++ b/kpovmodeler/pmsqe.cpp @@ -80,11 +80,11 @@ void PMSuperquadricEllipsoid::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMSuperquadricEllipsoid::metaObject( ) const +PMMetaObject* PMSuperquadricEllipsoid::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "SuperquadricEllipsoid", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "SuperquadricEllipsoid", Base::tqmetaObject( ), createNewSuperquadricEllipsoid ); s_pMetaObject->addProperty( new PMSuperquadricEllipsoidProperty( "eastWestExponent", @@ -133,9 +133,9 @@ void PMSuperquadricEllipsoid::setNorthSouthExponent( double n ) } } -PMDialogEditBase* PMSuperquadricEllipsoid::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMSuperquadricEllipsoid::editWidget( TQWidget* tqparent ) const { - return new PMSuperquadricEllipsoidEdit( parent ); + return new PMSuperquadricEllipsoidEdit( tqparent ); } void PMSuperquadricEllipsoid::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmsqe.h b/kpovmodeler/pmsqe.h index b73a95c3..17a2aded 100644 --- a/kpovmodeler/pmsqe.h +++ b/kpovmodeler/pmsqe.h @@ -17,8 +17,8 @@ **************************************************************************/ -#ifndef PMSQE_H -#define PMSQE_H +#ifndef PMSTQE_H +#define PMSTQE_H #ifdef HAVE_CONFIG_H #include <config.h> @@ -58,7 +58,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMSuperquadricEllipsoidEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view @@ -138,7 +138,7 @@ private: /** * IDs for @ref PMMementoData */ - enum PMSQEMementoID { PMEastWestExponentID, PMNorthSouthExponentID }; + enum PMSTQEMementoID { PMEastWestExponentID, PMNorthSouthExponentID }; double m_eastWestExponent, m_northSouthExponent; /** diff --git a/kpovmodeler/pmsqeedit.cpp b/kpovmodeler/pmsqeedit.cpp index 377b552b..1cb02f89 100644 --- a/kpovmodeler/pmsqeedit.cpp +++ b/kpovmodeler/pmsqeedit.cpp @@ -24,8 +24,8 @@ #include <tqlabel.h> #include <klocale.h> -PMSuperquadricEllipsoidEdit::PMSuperquadricEllipsoidEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMSuperquadricEllipsoidEdit::PMSuperquadricEllipsoidEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmsqeedit.h b/kpovmodeler/pmsqeedit.h index 99e87967..6cde9fc4 100644 --- a/kpovmodeler/pmsqeedit.h +++ b/kpovmodeler/pmsqeedit.h @@ -17,8 +17,8 @@ **************************************************************************/ -#ifndef PMSQEEDIT_H -#define PMSQEEDIT_H +#ifndef PMSTQEEDIT_H +#define PMSTQEEDIT_H #ifdef HAVE_CONFIG_H #include <config.h> @@ -35,12 +35,13 @@ class PMFloatEdit; class PMSuperquadricEllipsoidEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMSuperquadricEllipsoidEdit with parent and name + * Creates a PMSuperquadricEllipsoidEdit with tqparent and name */ - PMSuperquadricEllipsoidEdit( TQWidget* parent, const char* name = 0 ); + PMSuperquadricEllipsoidEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsymboltable.cpp b/kpovmodeler/pmsymboltable.cpp index e8a15c3d..fa04d78e 100644 --- a/kpovmodeler/pmsymboltable.cpp +++ b/kpovmodeler/pmsymboltable.cpp @@ -85,7 +85,7 @@ TQString PMSymbolTable::findNewID( const TQString& prefix ) TQString testID; unsigned int number; - int* lastNumber = m_lastID.find( prefix ); + int* lastNumber = m_lastID.tqfind( prefix ); if( lastNumber ) number = *lastNumber + 1; else @@ -94,8 +94,8 @@ TQString PMSymbolTable::findNewID( const TQString& prefix ) // find next free id do { - testID = prefix + TQString( "%1" ).arg( number ); - symbol = find( testID ); + testID = prefix + TQString( "%1" ).tqarg( number ); + symbol = tqfind( testID ); if( symbol ) number++; } diff --git a/kpovmodeler/pmtext.cpp b/kpovmodeler/pmtext.cpp index 9410228d..d67edf2e 100644 --- a/kpovmodeler/pmtext.cpp +++ b/kpovmodeler/pmtext.cpp @@ -89,11 +89,11 @@ void PMText::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMText::metaObject( ) const +PMMetaObject* PMText::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Text", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Text", Base::tqmetaObject( ), createNewText ); s_pMetaObject->addProperty( new PMTextProperty( "font", &PMText::setFont, &PMText::font ) ); @@ -162,9 +162,9 @@ void PMText::setOffset( const PMVector& o ) } } -PMDialogEditBase* PMText::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMText::editWidget( TQWidget* tqparent ) const { - return new PMTextEdit( parent ); + return new PMTextEdit( tqparent ); } void PMText::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmtext.h b/kpovmodeler/pmtext.h index 7ab4aff7..3c7037ac 100644 --- a/kpovmodeler/pmtext.h +++ b/kpovmodeler/pmtext.h @@ -56,7 +56,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMTextEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmtextedit.cpp b/kpovmodeler/pmtextedit.cpp index 835808bd..84dcec3d 100644 --- a/kpovmodeler/pmtextedit.cpp +++ b/kpovmodeler/pmtextedit.cpp @@ -29,8 +29,8 @@ #include <kiconloader.h> #include <kfiledialog.h> -PMTextEdit::PMTextEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMTextEdit::PMTextEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -126,7 +126,7 @@ void PMTextEdit::slotTextChanged( const TQString& ) void PMTextEdit::slotChooseFont( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmtextedit.h b/kpovmodeler/pmtextedit.h index 132adc5e..96510257 100644 --- a/kpovmodeler/pmtextedit.h +++ b/kpovmodeler/pmtextedit.h @@ -38,12 +38,13 @@ class TQPushButton; class PMTextEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMTextEdit with parent and name + * Creates a PMTextEdit with tqparent and name */ - PMTextEdit( TQWidget* parent, const char* name = 0 ); + PMTextEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtexture.cpp b/kpovmodeler/pmtexture.cpp index a40da8cb..e7046834 100644 --- a/kpovmodeler/pmtexture.cpp +++ b/kpovmodeler/pmtexture.cpp @@ -45,11 +45,11 @@ PMTexture::~PMTexture( ) { } -PMMetaObject* PMTexture::metaObject( ) const +PMMetaObject* PMTexture::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Texture", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Texture", Base::tqmetaObject( ), createNewTexture ); s_pMetaObject->addProperty( new PMTextureProperty( "uvMapping", &PMTexture::setUVMapping, &PMTexture::uvMapping ) ); @@ -72,9 +72,9 @@ TQString PMTexture::description( ) const return i18n( "texture" ); } -PMDialogEditBase* PMTexture::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMTexture::editWidget( TQWidget* tqparent ) const { - return new PMTextureEdit( parent ); + return new PMTextureEdit( tqparent ); } void PMTexture::serialize( TQDomElement& e, TQDomDocument& doc ) const diff --git a/kpovmodeler/pmtexture.h b/kpovmodeler/pmtexture.h index b2675b11..f247d09a 100644 --- a/kpovmodeler/pmtexture.h +++ b/kpovmodeler/pmtexture.h @@ -52,7 +52,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -64,7 +64,7 @@ public: /** * Returns a new @ref PMTextureEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmtexture" ); } diff --git a/kpovmodeler/pmtexturebase.cpp b/kpovmodeler/pmtexturebase.cpp index a49b103f..93c3cdb3 100644 --- a/kpovmodeler/pmtexturebase.cpp +++ b/kpovmodeler/pmtexturebase.cpp @@ -49,11 +49,11 @@ PMTextureBase::~PMTextureBase( ) { } -PMMetaObject* PMTextureBase::metaObject( ) const +PMMetaObject* PMTextureBase::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "TextureBase", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "TextureBase", Base::tqmetaObject( ) ); s_pMetaObject->addProperty( new PMTextureBaseProperty( "linkedObject", &PMTextureBase::setLinkedObjectProperty, &PMTextureBase::linkedObjectProperty ) ); @@ -150,7 +150,7 @@ void PMTextureBase::readAttributes( const PMXMLHelper& h ) } else h.parser( )->printError( i18n( "Declare \"%1\" has wrong type." ) - .arg( id ) ); + .tqarg( id ) ); } } } diff --git a/kpovmodeler/pmtexturebase.h b/kpovmodeler/pmtexturebase.h index a3ecdc0a..3d57d70f 100644 --- a/kpovmodeler/pmtexturebase.h +++ b/kpovmodeler/pmtexturebase.h @@ -55,7 +55,7 @@ public: virtual void readAttributes( const PMXMLHelper& h ); /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; diff --git a/kpovmodeler/pmtexturebaseedit.cpp b/kpovmodeler/pmtexturebaseedit.cpp index 0768adc1..7591538b 100644 --- a/kpovmodeler/pmtexturebaseedit.cpp +++ b/kpovmodeler/pmtexturebaseedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMTextureBaseEdit::PMTextureBaseEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMTextureBaseEdit::PMTextureBaseEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmtexturebaseedit.h b/kpovmodeler/pmtexturebaseedit.h index 8e89af9f..8178b612 100644 --- a/kpovmodeler/pmtexturebaseedit.h +++ b/kpovmodeler/pmtexturebaseedit.h @@ -35,12 +35,13 @@ class PMLinkEdit; class PMTextureBaseEdit : public PMNamedObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMNamedObjectEdit Base; public: /** - * Creates a PMTextureBaseEdit with parent and name + * Creates a PMTextureBaseEdit with tqparent and name */ - PMTextureBaseEdit( TQWidget* parent, const char* name = 0 ); + PMTextureBaseEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtextureedit.cpp b/kpovmodeler/pmtextureedit.cpp index 768cc3cc..a6bf2b94 100644 --- a/kpovmodeler/pmtextureedit.cpp +++ b/kpovmodeler/pmtextureedit.cpp @@ -25,8 +25,8 @@ #include <klocale.h> -PMTextureEdit::PMTextureEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMTextureEdit::PMTextureEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmtextureedit.h b/kpovmodeler/pmtextureedit.h index e1487794..21852ad9 100644 --- a/kpovmodeler/pmtextureedit.h +++ b/kpovmodeler/pmtextureedit.h @@ -35,12 +35,13 @@ class TQCheckBox; class PMTextureEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMTextureEdit with parent and name + * Creates a PMTextureEdit with tqparent and name */ - PMTextureEdit( TQWidget* parent, const char* name = 0 ); + PMTextureEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtexturemap.cpp b/kpovmodeler/pmtexturemap.cpp index 1ab0c3a4..20287432 100644 --- a/kpovmodeler/pmtexturemap.cpp +++ b/kpovmodeler/pmtexturemap.cpp @@ -119,7 +119,7 @@ TQString PMTextureMapBase::valuesToString( ) const str.setNum( *it ); ++it; for( ; it != m_mapValues.end( ); ++it ) - str += TQString( " %1" ).arg( *it ); + str += TQString( " %1" ).tqarg( *it ); } return str; } @@ -138,11 +138,11 @@ void PMTextureMapBase::stringToValues( const TQString& str ) } } -PMMetaObject* PMTextureMapBase::metaObject( ) const +PMMetaObject* PMTextureMapBase::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "TextureMapBase", Base::metaObject( ) ); + s_pMetaObject = new PMMetaObject( "TextureMapBase", Base::tqmetaObject( ) ); s_pMetaObject->addProperty( new PMValueProperty( ) ); } return s_pMetaObject; @@ -158,9 +158,9 @@ void PMTextureMapBase::cleanUp( ) const Base::cleanUp( ); } -PMDialogEditBase* PMTextureMapBase::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMTextureMapBase::editWidget( TQWidget* tqparent ) const { - return new PMTextureMapEdit( parent ); + return new PMTextureMapEdit( tqparent ); } void PMTextureMapBase::restoreMemento( PMMemento* s ) @@ -342,11 +342,11 @@ PMTextureMap::~PMTextureMap( ) { } -PMMetaObject* PMTextureMap::metaObject( ) const +PMMetaObject* PMTextureMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "TextureMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "TextureMap", Base::tqmetaObject( ), createNewTextureMap ); } return s_pMetaObject; @@ -388,11 +388,11 @@ PMPigmentMap::~PMPigmentMap( ) { } -PMMetaObject* PMPigmentMap::metaObject( ) const +PMMetaObject* PMPigmentMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "PigmentMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "PigmentMap", Base::tqmetaObject( ), createNewPigmentMap ); } return s_pMetaObject; @@ -434,11 +434,11 @@ PMColorMap::~PMColorMap( ) { } -PMMetaObject* PMColorMap::metaObject( ) const +PMMetaObject* PMColorMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "ColorMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "ColorMap", Base::tqmetaObject( ), createNewColorMap ); } return s_pMetaObject; @@ -480,11 +480,11 @@ PMNormalMap::~PMNormalMap( ) { } -PMMetaObject* PMNormalMap::metaObject( ) const +PMMetaObject* PMNormalMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "NormalMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "NormalMap", Base::tqmetaObject( ), createNewNormalMap ); } return s_pMetaObject; @@ -526,11 +526,11 @@ PMSlopeMap::~PMSlopeMap( ) { } -PMMetaObject* PMSlopeMap::metaObject( ) const +PMMetaObject* PMSlopeMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "SlopeMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "SlopeMap", Base::tqmetaObject( ), createNewSlopeMap ); } return s_pMetaObject; @@ -572,11 +572,11 @@ PMDensityMap::~PMDensityMap( ) { } -PMMetaObject* PMDensityMap::metaObject( ) const +PMMetaObject* PMDensityMap::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "DensityMap", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "DensityMap", Base::tqmetaObject( ), createNewDensityMap ); } return s_pMetaObject; diff --git a/kpovmodeler/pmtexturemap.h b/kpovmodeler/pmtexturemap.h index 6a7b020d..b08a3770 100644 --- a/kpovmodeler/pmtexturemap.h +++ b/kpovmodeler/pmtexturemap.h @@ -54,7 +54,7 @@ public: virtual bool dataChangeOnInsertRemove( ) const { return true; } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -76,7 +76,7 @@ public: /** * Returns a new @ref PMTextureMapEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual void createMemento( ); @@ -153,7 +153,7 @@ public: virtual TQString mapType( ) const { return TQString( "Texture" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -193,7 +193,7 @@ public: virtual TQString mapType( ) const { return TQString( "Pigment" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -233,7 +233,7 @@ public: virtual TQString mapType( ) const { return TQString( "SolidColor" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -274,7 +274,7 @@ public: virtual TQString mapType( ) const { return TQString( "Normal" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -314,7 +314,7 @@ public: virtual TQString mapType( ) const { return TQString( "Slope" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -354,7 +354,7 @@ public: virtual TQString mapType( ) const { return TQString( "Density" ); } /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; diff --git a/kpovmodeler/pmtexturemapedit.cpp b/kpovmodeler/pmtexturemapedit.cpp index 2efa7708..efb77c15 100644 --- a/kpovmodeler/pmtexturemapedit.cpp +++ b/kpovmodeler/pmtexturemapedit.cpp @@ -26,8 +26,8 @@ #include <kmessagebox.h> -PMTextureMapEdit::PMTextureMapEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMTextureMapEdit::PMTextureMapEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; m_numValues = 0; diff --git a/kpovmodeler/pmtexturemapedit.h b/kpovmodeler/pmtexturemapedit.h index 7ec806d3..7ca57401 100644 --- a/kpovmodeler/pmtexturemapedit.h +++ b/kpovmodeler/pmtexturemapedit.h @@ -39,12 +39,13 @@ class TQLabel; class PMTextureMapEdit : public PMTextureBaseEdit { Q_OBJECT + TQ_OBJECT typedef PMTextureBaseEdit Base; public: /** - * Creates a PMTextureMapEdit with parent and name + * Creates a PMTextureMapEdit with tqparent and name */ - PMTextureMapEdit( TQWidget* parent, const char* name = 0 ); + PMTextureMapEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtokens.h b/kpovmodeler/pmtokens.h index f1606e53..785bb1db 100644 --- a/kpovmodeler/pmtokens.h +++ b/kpovmodeler/pmtokens.h @@ -308,13 +308,13 @@ enum PMToken { PRISM_TOK, PROJECTED_THROUGH_TOK, PWR_TOK, - QUADRATIC_SPLINE_TOK, - QUADRIC_TOK, - QUARTIC_TOK, - QUATERNION_TOK, - QUICK_COLOR_TOK, - QUICK_COLOUR_TOK, - QUILTED_TOK, + TQUADRATIC_SPLINE_TOK, + TQUADRIC_TOK, + TQUARTIC_TOK, + TQUATERNION_TOK, + TQUICK_COLOR_TOK, + TQUICK_COLOUR_TOK, + TQUILTED_TOK, RADIAL_TOK, RADIANS_TOK, RADIOSITY_TOK, @@ -368,7 +368,7 @@ enum PMToken { SPIRAL2_TOK, SPOTLIGHT_TOK, SPOTTED_TOK, - SQR_TOK, + STQR_TOK, SQRT_TOK, STATISTICS_TOK, STR_TOK, diff --git a/kpovmodeler/pmtorus.cpp b/kpovmodeler/pmtorus.cpp index 5e5be5ea..0039713b 100644 --- a/kpovmodeler/pmtorus.cpp +++ b/kpovmodeler/pmtorus.cpp @@ -74,11 +74,11 @@ TQString PMTorus::description( ) const return i18n( "torus" ); } -PMMetaObject* PMTorus::metaObject( ) const +PMMetaObject* PMTorus::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Torus", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Torus", Base::tqmetaObject( ), createNewTorus ); s_pMetaObject->addProperty( new PMTorusProperty( "minorRadius", &PMTorus::setMinorRadius, @@ -110,10 +110,10 @@ void PMTorus::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMTorus::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMTorus::editWidget( TQWidget* tqparent ) const { - return new PMTorusEdit( parent ); + return new PMTorusEdit( tqparent ); } void PMTorus::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmtorus.h b/kpovmodeler/pmtorus.h index a7f1ee6a..65f8458f 100644 --- a/kpovmodeler/pmtorus.h +++ b/kpovmodeler/pmtorus.h @@ -58,7 +58,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -67,7 +67,7 @@ public: /** * Returns a new @ref PMTrousEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmtorusedit.cpp b/kpovmodeler/pmtorusedit.cpp index e47301b9..f497018f 100644 --- a/kpovmodeler/pmtorusedit.cpp +++ b/kpovmodeler/pmtorusedit.cpp @@ -26,8 +26,8 @@ #include <tqcheckbox.h> -PMTorusEdit::PMTorusEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMTorusEdit::PMTorusEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmtorusedit.h b/kpovmodeler/pmtorusedit.h index 1d3f4f5a..95870664 100644 --- a/kpovmodeler/pmtorusedit.h +++ b/kpovmodeler/pmtorusedit.h @@ -35,12 +35,13 @@ class TQCheckBox; class PMTorusEdit : public PMSolidObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMSolidObjectEdit Base; public: /** - * Creates a PMSphereEdit with parent and name + * Creates a PMSphereEdit with tqparent and name */ - PMTorusEdit( TQWidget* parent, const char* name = 0 ); + PMTorusEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtranslate.cpp b/kpovmodeler/pmtranslate.cpp index a0a09b7b..08611749 100644 --- a/kpovmodeler/pmtranslate.cpp +++ b/kpovmodeler/pmtranslate.cpp @@ -65,11 +65,11 @@ void PMTranslate::readAttributes( const PMXMLHelper& h ) m_move = h.vectorAttribute( "value", moveDefault ); } -PMMetaObject* PMTranslate::metaObject( ) const +PMMetaObject* PMTranslate::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Translate", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Translate", Base::tqmetaObject( ), createNewTranslate ); s_pMetaObject->addProperty( new PMTranslateProperty( "translation", &PMTranslate::setTranslation, &PMTranslate::translation ) ); @@ -101,9 +101,9 @@ void PMTranslate::setTranslation( const PMVector& p ) } } -PMDialogEditBase* PMTranslate::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMTranslate::editWidget( TQWidget* tqparent ) const { - return new PMTranslateEdit( parent ); + return new PMTranslateEdit( tqparent ); } void PMTranslate::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmtranslate.h b/kpovmodeler/pmtranslate.h index d1272bf6..59b428a7 100644 --- a/kpovmodeler/pmtranslate.h +++ b/kpovmodeler/pmtranslate.h @@ -54,7 +54,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMTranslateEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** */ virtual TQString pixmap( ) const { return TQString( "pmtranslate" ); } diff --git a/kpovmodeler/pmtranslateedit.cpp b/kpovmodeler/pmtranslateedit.cpp index f98bcf00..4796714f 100644 --- a/kpovmodeler/pmtranslateedit.cpp +++ b/kpovmodeler/pmtranslateedit.cpp @@ -24,8 +24,8 @@ #include <klocale.h> -PMTranslateEdit::PMTranslateEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMTranslateEdit::PMTranslateEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } diff --git a/kpovmodeler/pmtranslateedit.h b/kpovmodeler/pmtranslateedit.h index f2061ca0..955a6243 100644 --- a/kpovmodeler/pmtranslateedit.h +++ b/kpovmodeler/pmtranslateedit.h @@ -35,12 +35,13 @@ class PMVectorEdit; class PMTranslateEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMTranslateEdit with parent and name + * Creates a PMTranslateEdit with tqparent and name */ - PMTranslateEdit( TQWidget* parent, const char* name = 0 ); + PMTranslateEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtreeview.cpp b/kpovmodeler/pmtreeview.cpp index 827a52c0..cbedabdc 100644 --- a/kpovmodeler/pmtreeview.cpp +++ b/kpovmodeler/pmtreeview.cpp @@ -38,9 +38,9 @@ #include "pmobjectdrag.h" -PMTreeViewWidget::PMTreeViewWidget( PMPart* part, TQWidget* parent /*= 0*/, +PMTreeViewWidget::PMTreeViewWidget( PMPart* part, TQWidget* tqparent /*= 0*/, const char* name /*=0*/ ) - : PMViewBase( parent, name ) + : PMViewBase( tqparent, name ) { TQHBoxLayout* hl = new TQHBoxLayout( this ); PMTreeView* tv = new PMTreeView( part, this ); @@ -52,9 +52,9 @@ TQString PMTreeViewWidget::description( ) const return i18n( "Object Tree" ); } -PMTreeView::PMTreeView( PMPart* part, TQWidget* parent /*= 0*/, +PMTreeView::PMTreeView( PMPart* part, TQWidget* tqparent /*= 0*/, const char* name /*= 0*/ ) - : TQListView( parent, name ) + : TQListView( tqparent, name ) { addColumn( i18n( "Objects" ) ); header( )->hide( ); @@ -75,8 +75,8 @@ PMTreeView::PMTreeView( PMPart* part, TQWidget* parent /*= 0*/, viewport( )->setAcceptDrops( true ); viewport( )->setMouseTracking( true ); - viewport( )->setFocusPolicy( TQWidget::WheelFocus ); - setFocusPolicy( TQWidget::WheelFocus ); + viewport( )->setFocusPolicy( TQ_WheelFocus ); + setFocusPolicy( TQ_WheelFocus ); setAcceptDrops( true ); connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) ); @@ -101,20 +101,20 @@ void PMTreeView::slotObjectChanged( PMObject* obj, const int mode, bool as = m_acceptSelect; m_acceptSelect = true; - if( sender != this ) + if( TQT_BASE_OBJECT(sender) != TQT_BASE_OBJECT(this) ) { if( ( mode & PMCAdd ) && !( mode & PMCInsertError ) ) { // object was added - if( !obj->parent( ) ) + if( !obj->tqparent( ) ) { - // object has no parent, append it as top level item + // object has no tqparent, append it as top level item pTreeItem = new PMTreeViewItem( obj, this ); } else { - // find the parent in the listview - TQListViewItem* pParentTreeItem = findObject( obj->parent( ) ); + // find the tqparent in the listview + TQListViewItem* pParentTreeItem = findObject( obj->tqparent( ) ); if( pParentTreeItem ) { PMObject* hObj = obj->prevSibling( ); @@ -186,7 +186,7 @@ void PMTreeView::slotObjectChanged( PMObject* obj, const int mode, if( pTreeItem ) { PMTreeViewItem* p; - for( p = pTreeItem->parent( ); p; p = p->parent( ) ) + for( p = pTreeItem->tqparent( ); p; p = p->tqparent( ) ) p->setOpen( true ); pTreeItem->setSelected( true ); setCurrentItem( pTreeItem ); @@ -238,7 +238,7 @@ PMTreeViewItem* PMTreeView::findObject( const PMObject* obj ) { PMTreeViewItem* pTreeItem = 0; - if( !obj->parent( ) ) + if( !obj->tqparent( ) ) { // top level object pTreeItem = ( PMTreeViewItem* ) firstChild( ); @@ -248,7 +248,7 @@ PMTreeViewItem* PMTreeView::findObject( const PMObject* obj ) } else { - pTreeItem = findObject( obj->parent( ) ); + pTreeItem = findObject( obj->tqparent( ) ); if( pTreeItem ) { pTreeItem = ( PMTreeViewItem* ) pTreeItem->firstChild( ); @@ -269,7 +269,7 @@ void PMTreeView::selectItem( TQListViewItem* /*sitem*/ ) m_pSelectedObject = ( ( PMTreeViewItem* ) sitem )->object( ); - for( pItem = sitem->parent( ); pItem; pItem = pItem->parent( ) ) + for( pItem = sitem->tqparent( ); pItem; pItem = pItem->tqparent( ) ) pItem->setOpen( true ); ensureItemVisible( sitem ); setCurrentItem( sitem ); @@ -292,7 +292,7 @@ void PMTreeView::addChildItems( PMTreeViewItem* item ) else // first child listItem = new PMTreeViewItem( obj, item ); - // recursive call, if child has children + // recursive call, if child has tqchildren if( obj->countChildren( ) > 0 ) addChildItems( listItem ); } @@ -324,7 +324,7 @@ void PMTreeView::slotClear( ) void PMTreeView::itemSelected( PMTreeViewItem* item, bool selected ) { - repaintItem( item ); + tqrepaintItem( item ); if( m_event ) { @@ -361,7 +361,7 @@ void PMTreeView::contentsMousePressEvent( TQMouseEvent * e ) if( m_selectionCleared ) { - emit objectChanged( 0, PMCNewSelection, this ); + emit objectChanged( 0, PMCNewSelection, TQT_TQOBJECT(this) ); specialAction = true; } else if( m_itemSelected || m_itemDeselected ) @@ -378,7 +378,7 @@ void PMTreeView::contentsMousePressEvent( TQMouseEvent * e ) m_pLastSelected->setSelected( true ); emit objectChanged( m_pLastSelected->object( ), PMCNewSelection, - this ); + TQT_TQOBJECT(this) ); } else { @@ -389,11 +389,11 @@ void PMTreeView::contentsMousePressEvent( TQMouseEvent * e ) else if( ( e->state( ) & ShiftButton ) && oldCurrent && m_pLastSelected ) { if( ( oldCurrent != m_pLastSelected ) && - ( oldCurrent->parent( ) == m_pLastSelected->parent( ) ) ) + ( oldCurrent->tqparent( ) == m_pLastSelected->tqparent( ) ) ) { specialAction = true; - // shift click, old current item has the same parent + // shift click, old current item has the same tqparent // as the new selection. Select all items between the two // items if( m_pLastSelected->object( )->isSelectable( ) ) @@ -407,7 +407,7 @@ void PMTreeView::contentsMousePressEvent( TQMouseEvent * e ) { tmp->setSelected( true ); emit objectChanged( (( PMTreeViewItem* ) tmp)->object( ), - PMCSelected, this ); + PMCSelected, TQT_TQOBJECT(this) ); if( tmp == m_pLastSelected ) break; } @@ -418,7 +418,7 @@ void PMTreeView::contentsMousePressEvent( TQMouseEvent * e ) { tmp->setSelected( true ); emit objectChanged( (( PMTreeViewItem* ) tmp)->object( ), - PMCSelected, this ); + PMCSelected, TQT_TQOBJECT(this) ); if( tmp == oldCurrent ) break; } @@ -436,12 +436,12 @@ void PMTreeView::contentsMousePressEvent( TQMouseEvent * e ) if( m_itemSelected ) { if( m_pLastSelected->object( )->isSelectable( ) ) - emit objectChanged( m_pLastSelected->object( ), PMCSelected, this ); + emit objectChanged( m_pLastSelected->object( ), PMCSelected, TQT_TQOBJECT(this) ); else m_pLastSelected->setSelected( false ); } else if( m_itemDeselected ) - emit objectChanged( m_pLastSelected->object( ), PMCDeselected, this ); + emit objectChanged( m_pLastSelected->object( ), PMCDeselected, TQT_TQOBJECT(this) ); } m_acceptSelect = false; } @@ -472,7 +472,7 @@ void PMTreeView::viewportMousePressEvent( TQMouseEvent* e ) TQPoint p = e->pos( ); - if( e->button( ) & RightButton ) + if( e->button( ) & Qt::RightButton ) { if( m_pPart->factory( ) ) { @@ -497,7 +497,7 @@ void PMTreeView::viewportMousePressEvent( TQMouseEvent* e ) if( item ) { - if( e->button( ) == LeftButton || e->button( ) == MidButton ) + if( e->button( ) == Qt::LeftButton || e->button( ) == Qt::MidButton ) { m_pressed = true; m_pressedPos = e->pos( ); @@ -526,7 +526,7 @@ void PMTreeView::viewportMouseReleaseEvent( TQMouseEvent* e ) m_pLastSelected->setSelected( true ); m_acceptSelect = false; - emit objectChanged( m_pLastSelected->object( ), PMCNewSelection, this ); + emit objectChanged( m_pLastSelected->object( ), PMCNewSelection, TQT_TQOBJECT(this) ); } } } @@ -628,8 +628,8 @@ void PMTreeView::viewportDragMoveEvent( TQDragMoveEvent *e ) accept = false; if( !obj->isReadOnly( ) ) accept = true; - if( obj->parent( ) ) - if( !obj->parent( )->isReadOnly( ) ) + if( obj->tqparent( ) ) + if( !obj->tqparent( )->isReadOnly( ) ) accept = true; } } @@ -724,35 +724,35 @@ void PMTreeView::keyPressEvent( TQKeyEvent* e ) { switch( e->key( ) ) { - case Qt::Key_Up: + case TQt::Key_Up: newSelection = current->itemAbove( ); accept = true; break; - case Qt::Key_Down: + case TQt::Key_Down: newSelection = current->itemBelow( ); accept = true; break; - case Qt::Key_Left: - newSelection = current->parent( ); + case TQt::Key_Left: + newSelection = current->tqparent( ); accept = true; break; - case Qt::Key_Right: + case TQt::Key_Right: newSelection = current->firstChild( ); accept = true; break; - case Qt::Key_Plus: + case TQt::Key_Plus: current->setOpen( true ); accept = true; break; - case Qt::Key_Minus: + case TQt::Key_Minus: current->setOpen( false ); accept = true; - case Qt::Key_Delete: + case TQt::Key_Delete: deleteItem = true; accept = true; break; - case Qt::CTRL+Qt::Key_V: - case Qt::SHIFT+Qt::Key_Insert: + case TQt::CTRL+TQt::Key_V: + case TQt::SHIFT+TQt::Key_Insert: pasteItem = true; accept = true; break; @@ -769,7 +769,7 @@ void PMTreeView::keyPressEvent( TQKeyEvent* e ) m_acceptSelect = false; emit objectChanged( ( ( PMTreeViewItem* ) newSelection )->object( ), - PMCNewSelection, this ); + PMCNewSelection, TQT_TQOBJECT(this) ); } if( deleteItem && m_pPart->isReadWrite( ) ) @@ -804,7 +804,7 @@ bool PMTreeView::targetDisplaysPart( TQWidget* target ) // find the tree view TQWidget* t = target; while( t && !t->isA( "PMTreeView" ) ) - t = t->parentWidget( ); + t = t->tqparentWidget( ); if( t ) if( ( ( PMTreeView* ) t )->part( ) == m_pPart ) result = true; diff --git a/kpovmodeler/pmtreeview.h b/kpovmodeler/pmtreeview.h index ec4d9c1b..445b53fd 100644 --- a/kpovmodeler/pmtreeview.h +++ b/kpovmodeler/pmtreeview.h @@ -41,7 +41,7 @@ public: /** * Default constructor */ - PMTreeViewWidget( PMPart* pare, TQWidget* parent, const char* name = 0 ); + PMTreeViewWidget( PMPart* pare, TQWidget* tqparent, const char* name = 0 ); /** */ virtual TQString viewType( ) const { return TQString( "treeview" ); } @@ -52,16 +52,17 @@ public: /** * Widget that displays the scene as tree view */ -class PMTreeView : public QListView +class PMTreeView : public TQListView { Q_OBJECT + TQ_OBJECT friend class PMTreeViewItem; public: /** - * Creates a PMTreeView with parent and name that displays the + * Creates a PMTreeView with tqparent and name that displays the * document doc */ - PMTreeView( PMPart* part, TQWidget* parent = 0, const char* name = 0 ); + PMTreeView( PMPart* part, TQWidget* tqparent = 0, const char* name = 0 ); /** * Deletes the PMTreeView */ @@ -173,9 +174,9 @@ public: virtual TQString viewType( ) const { return TQString( "treeview" ); } virtual TQString description( ) const; virtual TQString iconName( ) const { return TQString( "pmtreeview" ); } - virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const + virtual PMViewBase* newInstance( TQWidget* tqparent, PMPart* part ) const { - return new PMTreeViewWidget( part, parent ); + return new PMTreeViewWidget( part, tqparent ); } }; diff --git a/kpovmodeler/pmtreeviewitem.cpp b/kpovmodeler/pmtreeviewitem.cpp index cac3b3c7..e167e86b 100644 --- a/kpovmodeler/pmtreeviewitem.cpp +++ b/kpovmodeler/pmtreeviewitem.cpp @@ -24,34 +24,34 @@ #include "pmfactory.h" #include "pmtexturemap.h" -PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListView* parent ) - : TQListViewItem( parent ) +PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListView* tqparent ) + : TQListViewItem( tqparent ) { m_pObject = object; setDescriptions( ); initSelection( ); } -PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListViewItem* parent ) - : TQListViewItem( parent ) +PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListViewItem* tqparent ) + : TQListViewItem( tqparent ) { m_pObject = object; setDescriptions( ); initSelection( ); } -PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListView* parent, +PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListView* tqparent, TQListViewItem* after ) - : TQListViewItem( parent, after ) + : TQListViewItem( tqparent, after ) { m_pObject = object; setDescriptions( ); initSelection( ); } -PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListViewItem* parent, +PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListViewItem* tqparent, TQListViewItem* after ) - : TQListViewItem( parent, after ) + : TQListViewItem( tqparent, after ) { m_pObject = object; setDescriptions( ); @@ -72,13 +72,13 @@ void PMTreeViewItem::setDescriptions( ) else text = m_pObject->description( ); - if( m_pObject->parent( ) ) + if( m_pObject->tqparent( ) ) { - if( m_pObject->parent( )->isA( "TextureMapBase" ) ) + if( m_pObject->tqparent( )->isA( "TextureMapBase" ) ) { - PMTextureMapBase* tm = ( PMTextureMapBase* ) m_pObject->parent( ); + PMTextureMapBase* tm = ( PMTextureMapBase* ) m_pObject->tqparent( ); if( m_pObject->type( ) == tm->mapType( ) ) - text = TQString( "[%1] " ).arg( tm->mapValue( m_pObject ), 4, 'f', 2 ) + text; + text = TQString( "[%1] " ).tqarg( tm->mapValue( m_pObject ), 4, 'f', 2 ) + text; } } setText( 0, text ); @@ -87,8 +87,8 @@ void PMTreeViewItem::setDescriptions( ) TQString PMTreeViewItem::key( int, bool ) const { TQString result; - if( m_pObject->parent( ) ) - result.sprintf( "%06i", m_pObject->parent( )->findChild( m_pObject ) ); + if( m_pObject->tqparent( ) ) + result.sprintf( "%06i", m_pObject->tqparent( )->findChild( m_pObject ) ); else result = "000000"; return result; @@ -113,5 +113,5 @@ void PMTreeViewItem::initSelection( ) { TQListViewItem::setSelected( m_pObject->isSelected( ) ); // if( m_pObject->isSelected( ) ) -// repaint( ); +// tqrepaint( ); } diff --git a/kpovmodeler/pmtreeviewitem.h b/kpovmodeler/pmtreeviewitem.h index 21cd26c1..234506bf 100644 --- a/kpovmodeler/pmtreeviewitem.h +++ b/kpovmodeler/pmtreeviewitem.h @@ -32,28 +32,28 @@ class PMObject; * * Each PMListViewItem is connected to a PMObject. */ -class PMTreeViewItem : public QListViewItem +class PMTreeViewItem : public TQListViewItem { public: /** - * Constructs a new top-level list view item in the TQListView parent. + * Constructs a new top-level list view item in the TQListView tqparent. */ - PMTreeViewItem( PMObject* object, TQListView* parent ); + PMTreeViewItem( PMObject* object, TQListView* tqparent ); /** - * Constructs a new list view item which is a child of parent and - * first in the parent's list of children. + * Constructs a new list view item which is a child of tqparent and + * first in the tqparent's list of tqchildren. */ - PMTreeViewItem( PMObject* object, TQListViewItem* parent ); + PMTreeViewItem( PMObject* object, TQListViewItem* tqparent ); /** - * Constructs a list view item which is a child of parent - * and is after after in the parent's list of children. + * Constructs a list view item which is a child of tqparent + * and is after after in the tqparent's list of tqchildren. */ - PMTreeViewItem( PMObject* object, TQListView* parent, TQListViewItem* after ); + PMTreeViewItem( PMObject* object, TQListView* tqparent, TQListViewItem* after ); /** - * Constructs a list view item which is a child of parent - * and is after after in the parent's list of children. + * Constructs a list view item which is a child of tqparent + * and is after after in the tqparent's list of tqchildren. */ - PMTreeViewItem( PMObject* object, TQListViewItem* parent, + PMTreeViewItem( PMObject* object, TQListViewItem* tqparent, TQListViewItem* after ); /** * Returns the connected @ref PMObject @@ -61,15 +61,15 @@ public: PMObject* object( ) const { return m_pObject; } /** * Returns a key that can be used for sorting, here the index in the - * parents list of children + * tqparents list of tqchildren */ virtual TQString key( int column, bool ascending ) const; /** - * Returns a pointer to the parent item + * Returns a pointer to the tqparent item */ - PMTreeViewItem* parent( ) + PMTreeViewItem* tqparent( ) { - return ( PMTreeViewItem* ) TQListViewItem::parent( ); + return ( PMTreeViewItem* ) TQListViewItem::tqparent( ); } void setSelected( bool select ); diff --git a/kpovmodeler/pmtriangle.cpp b/kpovmodeler/pmtriangle.cpp index ecf00f8c..362ae868 100644 --- a/kpovmodeler/pmtriangle.cpp +++ b/kpovmodeler/pmtriangle.cpp @@ -228,11 +228,11 @@ void PMTriangle::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMMetaObject* PMTriangle::metaObject( ) const +PMMetaObject* PMTriangle::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Triangle", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Triangle", Base::tqmetaObject( ), createNewTriangle ); s_pMetaObject->addProperty( new PMTriangleProperty( "smooth", &PMTriangle::setSmoothTriangle, @@ -345,9 +345,9 @@ void PMTriangle::enableUV( bool yes ) } } -PMDialogEditBase* PMTriangle::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMTriangle::editWidget( TQWidget* tqparent ) const { - return new PMTriangleEdit( parent ); + return new PMTriangleEdit( tqparent ); } void PMTriangle::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmtriangle.h b/kpovmodeler/pmtriangle.h index e2ef3026..fbff523d 100644 --- a/kpovmodeler/pmtriangle.h +++ b/kpovmodeler/pmtriangle.h @@ -56,7 +56,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; @@ -65,7 +65,7 @@ public: /** * Returns a new @ref PMTriangleEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmtriangleedit.cpp b/kpovmodeler/pmtriangleedit.cpp index 457ddb29..0fde6e22 100644 --- a/kpovmodeler/pmtriangleedit.cpp +++ b/kpovmodeler/pmtriangleedit.cpp @@ -27,8 +27,8 @@ #include <klocale.h> #include <kmessagebox.h> -PMTriangleEdit::PMTriangleEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMTriangleEdit::PMTriangleEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -55,21 +55,21 @@ void PMTriangleEdit::createTopWidgets( ) for( i = 0; i < 3; i++ ) { m_pPoint[i] = new PMVectorEdit( "x", "y", "z", this ); - gl->addWidget( new TQLabel( i18n( "Point %1:" ).arg( i+1 ), this ), + gl->addWidget( new TQLabel( i18n( "Point %1:" ).tqarg( i+1 ), this ), i * 3, 0 ); gl->addWidget( m_pPoint[i], i * 3, 1 ); connect( m_pPoint[i], TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); m_pNormal[i] = new PMVectorEdit( "x", "y", "z", this ); - m_pNormalLabel[i] = new TQLabel( i18n( "Normal %1:" ).arg( i+1 ), this ); + m_pNormalLabel[i] = new TQLabel( i18n( "Normal %1:" ).tqarg( i+1 ), this ); gl->addWidget( m_pNormalLabel[i], i * 3 + 1, 0 ); gl->addWidget( m_pNormal[i], i * 3 + 1, 1 ); connect( m_pNormal[i], TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); m_pUVVector[i] = new PMVectorEdit( "u", "v", this ); - m_pUVVectorLabel[i] = new TQLabel( i18n( "UV vector %1:" ).arg( i+1 ), this ); + m_pUVVectorLabel[i] = new TQLabel( i18n( "UV vector %1:" ).tqarg( i+1 ), this ); gl->addWidget( m_pUVVectorLabel[i], i * 3 + 2, 0 ); gl->addWidget( m_pUVVector[i], i * 3 + 2, 1 ); connect( m_pUVVector[i], TQT_SIGNAL( dataChanged( ) ), diff --git a/kpovmodeler/pmtriangleedit.h b/kpovmodeler/pmtriangleedit.h index aff323ad..b1982f57 100644 --- a/kpovmodeler/pmtriangleedit.h +++ b/kpovmodeler/pmtriangleedit.h @@ -38,12 +38,13 @@ class TQPushButton; class PMTriangleEdit : public PMGraphicalObjectEdit { Q_OBJECT + TQ_OBJECT typedef PMGraphicalObjectEdit Base; public: /** - * Creates a PMTriangleEdit with parent and name + * Creates a PMTriangleEdit with tqparent and name */ - PMTriangleEdit( TQWidget* parent, const char* name = 0 ); + PMTriangleEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtruetypecache.cpp b/kpovmodeler/pmtruetypecache.cpp index f685001a..d3fcf8d5 100644 --- a/kpovmodeler/pmtruetypecache.cpp +++ b/kpovmodeler/pmtruetypecache.cpp @@ -57,7 +57,7 @@ PMTrueTypeFont* PMTrueTypeCache::lookUp( const TQString& file ) if( file.isEmpty( ) ) return 0; - PMTrueTypeFont* f = m_cache.find( file ); + PMTrueTypeFont* f = m_cache.tqfind( file ); if( !f ) { FT_Face face; @@ -151,7 +151,7 @@ PMTrueTypeOutline* PMTrueTypeFont::outline( TQChar c ) if( isValid( ) ) { TQString str( c ); - ol = m_cache.find( str ); + ol = m_cache.tqfind( str ); if( !ol ) { FT_UInt glyphIndex = findGlyphIndex( c ); @@ -217,7 +217,7 @@ FT_UInt PMTrueTypeFont::findGlyphIndex( TQChar c ) if( m_face ) { - // glyphIndex = FT_Get_Char_Index( m_face, c.unicode( ) ); + // glyphIndex = FT_Get_Char_Index( m_face, c.tqunicode( ) ); // if( !glyphIndex ) char ch = c.latin1( ); if( !ch ) diff --git a/kpovmodeler/pmunknownview.cpp b/kpovmodeler/pmunknownview.cpp index e1660d02..60b65658 100644 --- a/kpovmodeler/pmunknownview.cpp +++ b/kpovmodeler/pmunknownview.cpp @@ -20,13 +20,13 @@ #include <tqlayout.h> PMUnknownView::PMUnknownView( const TQString& viewType, - TQWidget* parent, const char* name ) - : PMViewBase( parent, name ) + TQWidget* tqparent, const char* name ) + : PMViewBase( tqparent, name ) { TQHBoxLayout* hl = new TQHBoxLayout( this ); TQLabel* l; - l = new TQLabel( i18n( "Unknown view type \"%1\"" ).arg( viewType ), this ); - l->setAlignment( Qt::AlignCenter ); + l = new TQLabel( i18n( "Unknown view type \"%1\"" ).tqarg( viewType ), this ); + l->tqsetAlignment( TQt::AlignCenter ); hl->addWidget( l ); m_viewType = viewType; } diff --git a/kpovmodeler/pmunknownview.h b/kpovmodeler/pmunknownview.h index dbb5d042..8947b689 100644 --- a/kpovmodeler/pmunknownview.h +++ b/kpovmodeler/pmunknownview.h @@ -34,7 +34,7 @@ public: /** * Default constructor */ - PMUnknownView( const TQString& viewType, TQWidget* parent, + PMUnknownView( const TQString& viewType, TQWidget* tqparent, const char* name = 0 ); /** */ virtual TQString viewType( ) const { return m_viewType; } diff --git a/kpovmodeler/pmvariant.cpp b/kpovmodeler/pmvariant.cpp index fb2175c7..8dd4fe2c 100644 --- a/kpovmodeler/pmvariant.cpp +++ b/kpovmodeler/pmvariant.cpp @@ -360,7 +360,7 @@ TQString PMVariant::stringData( ) const if( m_dataType == PMVariant::String ) return *( ( TQString* ) m_pData ); kdError( PMArea ) << "Wrong type in PMVariant get function\n"; - return TQString::null; + return TQString(); } PMVector PMVariant::vectorData( ) const @@ -897,7 +897,7 @@ bool PMVariant::fromString( const PMVariant::PMVariantDataType t, const TQString TQDataStream& operator<<( TQDataStream& stream, const PMVariant& value ) { - stream << (Q_INT8)value.dataType( ); + stream << (TQ_INT8)value.dataType( ); stream << value.asString( ); return stream; @@ -905,7 +905,7 @@ TQDataStream& operator<<( TQDataStream& stream, const PMVariant& value ) TQDataStream& operator>>( TQDataStream& stream, PMVariant& value ) { - Q_INT8 type; + TQ_INT8 type; PMVariant::PMVariantDataType dataType; TQString str; diff --git a/kpovmodeler/pmvector.cpp b/kpovmodeler/pmvector.cpp index 13ba6ba4..e1b71d37 100644 --- a/kpovmodeler/pmvector.cpp +++ b/kpovmodeler/pmvector.cpp @@ -575,7 +575,7 @@ TQString PMVector::serializeXML( ) const bool PMVector::loadXML( const TQString& str ) { int i; - int size = str.contains( ' ' ) + 1; + int size = str.tqcontains( ' ' ) + 1; TQString tmp( str ); TQTextStream s( &tmp, IO_ReadOnly ); TQString val; diff --git a/kpovmodeler/pmvectoredit.cpp b/kpovmodeler/pmvectoredit.cpp index 7b9b6568..5140f297 100644 --- a/kpovmodeler/pmvectoredit.cpp +++ b/kpovmodeler/pmvectoredit.cpp @@ -28,11 +28,11 @@ PMVectorEdit::PMVectorEdit( const TQString& descriptionX, const TQString& descriptionY, - TQWidget* parent, const char* name ) - : TQWidget( parent, name ) + TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { unsigned int i; - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQLabel* label; m_edits.resize( 2 ); @@ -43,34 +43,34 @@ PMVectorEdit::PMVectorEdit( const TQString& descriptionX, TQT_SLOT( slotTextChanged( const TQString& ) ) ); } - layout = new TQHBoxLayout( this ); + tqlayout = new TQHBoxLayout( this ); if( !descriptionX.isEmpty( ) ) { label = new TQLabel( descriptionX, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[0] ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( m_edits[0] ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); if( !descriptionY.isEmpty( ) ) { label = new TQLabel( descriptionY, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[1] ); + tqlayout->addWidget( m_edits[1] ); } PMVectorEdit::PMVectorEdit( const TQString& descriptionX, const TQString& descriptionY, const TQString& descriptionZ, - TQWidget* parent, const char* name ) - : TQWidget( parent, name ) + TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { unsigned int i; - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQLabel* label; m_edits.resize( 3 ); @@ -81,44 +81,44 @@ PMVectorEdit::PMVectorEdit( const TQString& descriptionX, TQT_SLOT( slotTextChanged( const TQString& ) ) ); } - layout = new TQHBoxLayout( this ); + tqlayout = new TQHBoxLayout( this ); if( !descriptionX.isEmpty( ) ) { label = new TQLabel( descriptionX, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[0] ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( m_edits[0] ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); if( !descriptionY.isEmpty( ) ) { label = new TQLabel( descriptionY, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[1] ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( m_edits[1] ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); if( !descriptionZ.isEmpty( ) ) { label = new TQLabel( descriptionZ, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[2] ); + tqlayout->addWidget( m_edits[2] ); } PMVectorEdit::PMVectorEdit( const TQString& descriptionA, const TQString& descriptionB, const TQString& descriptionC, const TQString& descriptionD, - TQWidget* parent, const char* name ) - : TQWidget( parent, name ) + TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { unsigned int i; - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; TQLabel* label; m_edits.resize( 4 ); @@ -129,42 +129,42 @@ PMVectorEdit::PMVectorEdit( const TQString& descriptionA, TQT_SLOT( slotTextChanged( const TQString& ) ) ); } - layout = new TQHBoxLayout( this ); + tqlayout = new TQHBoxLayout( this ); if( !descriptionA.isEmpty( ) ) { label = new TQLabel( descriptionA, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[0] ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( m_edits[0] ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); if( !descriptionB.isEmpty( ) ) { label = new TQLabel( descriptionB, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[1] ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( m_edits[1] ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); if( !descriptionC.isEmpty( ) ) { label = new TQLabel( descriptionC, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[2] ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( m_edits[2] ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); if( !descriptionD.isEmpty( ) ) { label = new TQLabel( descriptionD, this ); - layout->addWidget( label ); - layout->addSpacing( KDialog::spacingHint( ) ); + tqlayout->addWidget( label ); + tqlayout->addSpacing( KDialog::spacingHint( ) ); } - layout->addWidget( m_edits[3] ); + tqlayout->addWidget( m_edits[3] ); } void PMVectorEdit::setVector( const PMVector& v, int precision ) diff --git a/kpovmodeler/pmvectoredit.h b/kpovmodeler/pmvectoredit.h index be94977d..9f46a147 100644 --- a/kpovmodeler/pmvectoredit.h +++ b/kpovmodeler/pmvectoredit.h @@ -32,9 +32,10 @@ /** * Edit widget for @ref PMVector */ -class PMVectorEdit : public QWidget +class PMVectorEdit : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Creates an edit widget for 2D vectors. @@ -43,7 +44,7 @@ public: */ PMVectorEdit( const TQString& descriptionX, const TQString& descriptionY, - TQWidget* parent, const char* name = 0 ); + TQWidget* tqparent, const char* name = 0 ); /** * Creates an edit widget for 3D vectors. * @@ -51,7 +52,7 @@ public: */ PMVectorEdit( const TQString& descriptionX, const TQString& descriptionY, const TQString& descriptionZ, - TQWidget* parent, const char* name = 0 ); + TQWidget* tqparent, const char* name = 0 ); /** * Creates an edit widget for 4D vectors. * @@ -60,7 +61,7 @@ public: */ PMVectorEdit( const TQString& descriptionA, const TQString& descriptionB, const TQString& descriptionC, const TQString& descriptionD, - TQWidget* parent, const char* name = 0 ); + TQWidget* tqparent, const char* name = 0 ); /** * Sets the displayed vector @@ -82,7 +83,7 @@ public: */ void setReadOnly( bool yes = true ); /** - * Reimplemented from QWidget + * Reimplemented from TQWidget */ virtual void setEnabled( bool yes ); signals: diff --git a/kpovmodeler/pmvectorlistedit.cpp b/kpovmodeler/pmvectorlistedit.cpp index bf8f74ad..e6d4385a 100644 --- a/kpovmodeler/pmvectorlistedit.cpp +++ b/kpovmodeler/pmvectorlistedit.cpp @@ -53,12 +53,12 @@ void PMTableItem::paint( TQPainter* p, const TQColorGroup& cg, else p->setPen( cg.text( ) ); p->drawText( x + 2, 0, w - x - 4, h, - wordWrap( ) ? ( alignment( ) | WordBreak ) : alignment( ), text( ) ); + wordWrap( ) ? ( tqalignment( ) | WordBreak ) : tqalignment( ), text( ) ); } */ -PMVectorListEdit::PMVectorListEdit( TQWidget* parent, const char* name ) - : TQTable( 1, 3, parent, name ) +PMVectorListEdit::PMVectorListEdit( TQWidget* tqparent, const char* name ) + : TQTable( 1, 3, tqparent, name ) { init( 3 ); @@ -70,8 +70,8 @@ PMVectorListEdit::PMVectorListEdit( TQWidget* parent, const char* name ) PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2, const TQString& c3, const TQString& c4, - TQWidget* parent, const char* name ) - : TQTable( 1, 4, parent, name ) + TQWidget* tqparent, const char* name ) + : TQTable( 1, 4, tqparent, name ) { init( 4 ); @@ -83,9 +83,9 @@ PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2, } PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2, - const TQString& c3, TQWidget* parent, + const TQString& c3, TQWidget* tqparent, const char* name ) - : TQTable( 1, 3, parent, name ) + : TQTable( 1, 3, tqparent, name ) { init( 3 ); @@ -96,8 +96,8 @@ PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2, } PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2, - TQWidget* parent, const char* name ) - : TQTable( 1, 2, parent, name ) + TQWidget* tqparent, const char* name ) + : TQTable( 1, 2, tqparent, name ) { init( 2 ); @@ -121,7 +121,7 @@ void PMVectorListEdit::init( int dimensions ) setColumnStretchable( i, true ); connect( this, TQT_SIGNAL( valueChanged( int, int ) ), TQT_SLOT( slotTextChanged( int, int ) ) ); - setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); } void PMVectorListEdit::setVectors( const TQValueList<PMVector>& l, @@ -256,7 +256,7 @@ void PMVectorListEdit::setLink( int p1, int p2 ) if( p2 >= 0 ) { m_disabled[p2] = true; - str = TQString( "%1 (=%2)" ).arg( p2 + 1 ).arg( p1 + 1 ); + str = TQString( "%1 (=%2)" ).tqarg( p2 + 1 ).tqarg( p1 + 1 ); h->setLabel( p2, str ); if( !isReadOnly( ) ) setRowReadOnly( p2, true ); @@ -315,11 +315,11 @@ bool PMVectorListEdit::isDataValid( ) return valid; } -TQSize PMVectorListEdit::sizeHint( ) const +TQSize PMVectorListEdit::tqsizeHint( ) const { return TQSize( c_columnWidth * m_dimension + frameWidth( ) * 2, frameWidth( ) * 2 + horizontalHeader( )->height( ) - + verticalHeader( )->sizeHint( ).height( ) ); + + verticalHeader( )->tqsizeHint( ).height( ) ); } void PMVectorListEdit::slotTextChanged( int, int ) @@ -342,10 +342,10 @@ void PMVectorListEdit::blockSelectionUpdates( bool block ) bool PMVectorListEdit::eventFilter( TQObject* o, TQEvent* e ) { - if( e->type( ) == TQEvent::Wheel && parent( ) ) - return TQApplication::sendEvent( parent( ), e ); + if( e->type( ) == TQEvent::Wheel && tqparent( ) ) + return TQApplication::sendEvent( tqparent( ), e ); if( e->type( ) == TQEvent::MouseButtonPress - && ( ( TQMouseEvent* ) e )->button( ) == RightButton ) + && ( ( TQMouseEvent* ) e )->button( ) == Qt::RightButton ) { bool b = TQTable::eventFilter( o, e ); emit showContextMenu( ); diff --git a/kpovmodeler/pmvectorlistedit.h b/kpovmodeler/pmvectorlistedit.h index 73e32036..d84334a4 100644 --- a/kpovmodeler/pmvectorlistedit.h +++ b/kpovmodeler/pmvectorlistedit.h @@ -32,7 +32,7 @@ /* const int c_pmTableRTTI = 14352; -class PMTableItem : public QTableItem +class PMTableItem : public TQTableItem { public: PMTableItem( TQTable* table ); @@ -54,30 +54,31 @@ private: /** * Widget that displays a list of vectors, based on @ref TQTable. */ -class PMVectorListEdit : public QTable +class PMVectorListEdit : public TQTable { Q_OBJECT + TQ_OBJECT public: /** * Constructor for 3d vectors (x, y, z) */ - PMVectorListEdit( TQWidget* parent, const char* name = 0 ); + PMVectorListEdit( TQWidget* tqparent, const char* name = 0 ); /** * Constructor for 3d vectors */ PMVectorListEdit( const TQString& c1, const TQString& c2, const TQString& c3, - TQWidget* parent, const char* name = 0 ); + TQWidget* tqparent, const char* name = 0 ); /** * Constructor for 2d vectors */ PMVectorListEdit( const TQString& c1, const TQString& c2, - TQWidget* parent, const char* name = 0 ); + TQWidget* tqparent, const char* name = 0 ); /** * Constructor for 4d vectors */ PMVectorListEdit( const TQString& c1, const TQString& c2, const TQString& c3, - const TQString& c4, TQWidget* parent, const char* name = 0 ); + const TQString& c4, TQWidget* tqparent, const char* name = 0 ); /** * Sets and displays the vectors. The widget will automatically * resize if no link is set and resize is true. @@ -136,7 +137,7 @@ public: void select( int i, int j ); /** * Blocks/unblocks selection updates. If block is false, the - * selection is repainted. + * selection is tqrepainted. */ void blockSelectionUpdates( bool block ); @@ -146,7 +147,7 @@ public: bool isDataValid( ); /** */ - virtual TQSize sizeHint( ) const; + virtual TQSize tqsizeHint( ) const; /** */ bool eventFilter( TQObject* o, TQEvent* e ); diff --git a/kpovmodeler/pmview.cpp b/kpovmodeler/pmview.cpp index 2fcd7eb2..2fab58d9 100644 --- a/kpovmodeler/pmview.cpp +++ b/kpovmodeler/pmview.cpp @@ -34,12 +34,12 @@ #include "pmdialogview.h" #include "pmglview.h" -PMView::PMView( PMPart* part, TQWidget* parent, const char* name ) - : TQWidget( parent, name ) +PMView::PMView( PMPart* part, TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { setBackgroundMode( PaletteBase ); - TQVBoxLayout* layout = new TQVBoxLayout( this ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); m_pMainSplitter = new TQSplitter( Qt::Horizontal, this, "MainSplitter" ); m_pTreeEditSplitter = new TQSplitter( Qt::Vertical, m_pMainSplitter, "TreeEditSplitter" ); @@ -68,8 +68,8 @@ PMView::PMView( PMPart* part, TQWidget* parent, const char* name ) m_pMainSplitter->show( ); - layout->addWidget( m_pMainSplitter ); - layout->activate( ); + tqlayout->addWidget( m_pMainSplitter ); + tqlayout->activate( ); m_pPart = part; } diff --git a/kpovmodeler/pmview.h b/kpovmodeler/pmview.h index 38249ed4..9ad1c7b9 100644 --- a/kpovmodeler/pmview.h +++ b/kpovmodeler/pmview.h @@ -24,7 +24,7 @@ #include <config.h> #endif -// include files for Qt +// include files for TQt #include <tqwidget.h> class PMTreeView; @@ -36,14 +36,15 @@ class KConfig; /** * The PMView class provides the view widget for the PMPart document class. */ -class PMView : public QWidget +class PMView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Constructor for the main view */ - PMView( PMPart* part, TQWidget* parent = 0, const char* name = 0 ); + PMView( PMPart* part, TQWidget* tqparent = 0, const char* name = 0 ); /** * Destructor for the main view */ diff --git a/kpovmodeler/pmviewbase.h b/kpovmodeler/pmviewbase.h index 357929c4..1268694f 100644 --- a/kpovmodeler/pmviewbase.h +++ b/kpovmodeler/pmviewbase.h @@ -60,17 +60,18 @@ public: /** * Base class for configuration widgets for view types - * for the layout settings dialog page + * for the tqlayout settings dialog page */ -class PMViewOptionsWidget : public QWidget +class PMViewOptionsWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMViewOptionsWidget( TQWidget* parent, const char* name = 0 ) - : TQWidget( parent, name ) + PMViewOptionsWidget( TQWidget* tqparent, const char* name = 0 ) + : TQWidget( tqparent, name ) { } @@ -87,15 +88,16 @@ signals: * Each view type has to implement this interface. Handles the * config loading and saving */ -class PMViewBase : public QWidget +class PMViewBase : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - PMViewBase( TQWidget* parent, const char* name = 0, WFlags f = 0 ) - : TQWidget( parent, name, f ) + PMViewBase( TQWidget* tqparent, const char* name = 0, WFlags f = 0 ) + : TQWidget( tqparent, name, f ) { } /** diff --git a/kpovmodeler/pmviewfactory.cpp b/kpovmodeler/pmviewfactory.cpp index 804c787c..f997d4eb 100644 --- a/kpovmodeler/pmviewfactory.cpp +++ b/kpovmodeler/pmviewfactory.cpp @@ -62,11 +62,11 @@ void PMViewFactory::addViewType( PMViewTypeFactory* vt ) } PMViewBase* PMViewFactory::newViewInstance( const TQString& viewType, - TQWidget* parent, PMPart* part ) const + TQWidget* tqparent, PMPart* part ) const { - PMViewTypeFactory* f = m_dict.find( viewType ); + PMViewTypeFactory* f = m_dict.tqfind( viewType ); if( f ) - return f->newInstance( parent, part ); + return f->newInstance( tqparent, part ); kdError( PMArea ) << "Unknown view type \"" << viewType << "\"" << endl; return 0; @@ -74,7 +74,7 @@ PMViewBase* PMViewFactory::newViewInstance( const TQString& viewType, PMViewOptions* PMViewFactory::newOptionsInstance( const TQString& viewType ) const { - PMViewTypeFactory* f = m_dict.find( viewType ); + PMViewTypeFactory* f = m_dict.tqfind( viewType ); if( f ) return f->newOptionsInstance( ); @@ -84,7 +84,7 @@ PMViewOptions* PMViewFactory::newOptionsInstance( const TQString& viewType ) con PMViewTypeFactory* PMViewFactory::viewFactory( const TQString& viewType ) const { - return m_dict.find( viewType ); + return m_dict.tqfind( viewType ); } const TQPtrList<PMViewTypeFactory>& PMViewFactory::viewTypes( ) const diff --git a/kpovmodeler/pmviewfactory.h b/kpovmodeler/pmviewfactory.h index 5fd42c1a..78f8981f 100644 --- a/kpovmodeler/pmviewfactory.h +++ b/kpovmodeler/pmviewfactory.h @@ -72,7 +72,7 @@ public: /** * Returns a new view instance */ - virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const = 0; + virtual PMViewBase* newInstance( TQWidget* tqparent, PMPart* part ) const = 0; /** * Creates a config object for the view type. * If the view doesn't have special attributes, the function returns 0; @@ -116,7 +116,7 @@ public: * Returns a new view of type viewType if available */ PMViewBase* newViewInstance( const TQString& viewType, - TQWidget* parent, PMPart* part ) const; + TQWidget* tqparent, PMPart* part ) const; /** * Returns a new view option instance for the given view type */ diff --git a/kpovmodeler/pmviewlayoutmanager.cpp b/kpovmodeler/pmviewlayoutmanager.cpp index fe3a031d..1314ec85 100644 --- a/kpovmodeler/pmviewlayoutmanager.cpp +++ b/kpovmodeler/pmviewlayoutmanager.cpp @@ -443,7 +443,7 @@ void PMViewLayout::normalize( ) PMViewLayout PMViewLayout::extractViewLayout( PMShell* shell ) { - PMViewLayout layout; + PMViewLayout tqlayout; TQValueList< TQValueList< PMViewLayoutEntry > > cols; cols.append( TQValueList< PMViewLayoutEntry >( ) ); @@ -457,7 +457,7 @@ PMViewLayout PMViewLayout::extractViewLayout( PMShell* shell ) for( cit = cols.begin( ); cit != cols.end( ); ++cit ) for( eit = ( *cit ).begin( ); eit != ( *cit ).end( ); ++eit ) - layout.addEntry( *eit ); + tqlayout.addEntry( *eit ); // find floating widgets TQPtrList<PMDockWidget> list; @@ -495,11 +495,11 @@ PMViewLayout PMViewLayout::extractViewLayout( PMShell* shell ) invalid = true; if( !invalid ) - layout.addEntry( e ); + tqlayout.addEntry( e ); } } - return layout; + return tqlayout; } void PMViewLayout::recursiveExtractColumns( @@ -663,10 +663,10 @@ void PMViewLayoutManager::loadData( ) m_layoutsLoaded = true; - TQString fileName = locate( "data", "kpovmodeler/viewlayouts.xml" ); + TQString fileName = locate( "data", "kpovmodeler/viewtqlayouts.xml" ); if( fileName.isEmpty( ) ) { - // Generate a default layout + // Generate a default tqlayout // I have a feeling this shouldn't be here but hey, it works for now // TODO Must find a way to move this cleanly to PMShell PMViewLayout a; @@ -710,7 +710,7 @@ void PMViewLayoutManager::loadData( ) TQFile file( fileName ); if( !file.open( IO_ReadOnly ) ) { - kdError( PMArea ) << i18n( "Could not open the view layouts file." ) + kdError( PMArea ) << i18n( "Could not open the view tqlayouts file." ) << endl; return; } @@ -740,16 +740,16 @@ void PMViewLayoutManager::loadData( ) void PMViewLayoutManager::saveData( ) { - TQString fileName = locateLocal( "data", "kpovmodeler/viewlayouts.xml" ); + TQString fileName = locateLocal( "data", "kpovmodeler/viewtqlayouts.xml" ); if( fileName.isEmpty( ) ) { - kdError( PMArea ) << i18n( "View layouts not found." ) << endl; + kdError( PMArea ) << i18n( "View tqlayouts not found." ) << endl; return; } TQFile file( fileName ); if( !file.open( IO_WriteOnly ) ) { - kdError( PMArea ) << i18n( "Could not open the view layouts file." ) + kdError( PMArea ) << i18n( "Could not open the view tqlayouts file." ) << endl; return; } @@ -763,7 +763,7 @@ void PMViewLayoutManager::saveData( ) { TQDomElement l; - l = doc.createElement( "viewlayout" ); + l = doc.createElement( "viewtqlayout" ); ( *it ).saveData( l, doc ); e.appendChild( l ); } @@ -810,7 +810,7 @@ void PMViewLayoutManager::displayLayout( const TQString& name, PMShell* shell ) flist.remove( ); } } - // Create the new layout + // Create the new tqlayout v_layout->displayLayout( shell ); m_layoutDisplayed = true; } @@ -866,12 +866,12 @@ void PMViewLayoutManager::removeLayout( const TQString& name ) } -PMSaveViewLayoutDialog::PMSaveViewLayoutDialog( PMShell* parent, +PMSaveViewLayoutDialog::PMSaveViewLayoutDialog( PMShell* tqparent, const char* name ) - : KDialogBase( parent, name, true, i18n( "Save View Layout" ), + : KDialogBase( tqparent, name, true, i18n( "Save View Layout" ), KDialogBase::Ok | KDialogBase::Cancel ) { - m_pShell = parent; + m_pShell = tqparent; setButtonOK( KStdGuiItem::save() ); enableButtonOK( false ); @@ -879,7 +879,7 @@ PMSaveViewLayoutDialog::PMSaveViewLayoutDialog( PMShell* parent, TQWidget* w = new TQWidget( this ); TQVBoxLayout* vl = new TQVBoxLayout( w, 0, KDialog::spacingHint( ) ); - TQLabel* l = new TQLabel( i18n( "Enter view layout name:" ), w ); + TQLabel* l = new TQLabel( i18n( "Enter view tqlayout name:" ), w ); vl->addWidget( l ); m_pLayoutName = new TQLineEdit( w ); @@ -907,13 +907,13 @@ void PMSaveViewLayoutDialog::slotOk( ) TQString name = m_pLayoutName->text( ); PMViewLayoutManager* m = PMViewLayoutManager::theManager( ); - PMViewLayout* layout = m->findLayout( name ); + PMViewLayout* tqlayout = m->findLayout( name ); PMViewLayout newLayout = PMViewLayout::extractViewLayout( m_pShell ); newLayout.setName( name ); - if( layout ) - *layout = newLayout; + if( tqlayout ) + *tqlayout = newLayout; else m->addLayout( newLayout ); diff --git a/kpovmodeler/pmviewlayoutmanager.h b/kpovmodeler/pmviewlayoutmanager.h index 01235337..686472c3 100644 --- a/kpovmodeler/pmviewlayoutmanager.h +++ b/kpovmodeler/pmviewlayoutmanager.h @@ -108,8 +108,8 @@ private: /** * Class used internally by @ref PMViewLayoutManager * - * This class maintains a named layout. It basically stores all views - * associated with that layout. + * This class maintains a named tqlayout. It basically stores all views + * associated with that tqlayout. */ class PMViewLayout { @@ -143,12 +143,12 @@ public: */ void displayLayout( PMShell* shell ); /** - * Sets the name of the layout + * Sets the name of the tqlayout */ void setName( const TQString& n ); /** * - * Add a new entry to the layout. By default it adds the entry at the end + * Add a new entry to the tqlayout. By default it adds the entry at the end * of the list. If a position is given it adds the entry at the indicated * position */ @@ -179,7 +179,7 @@ public: void normalize( ); /** - * Extracts the view layout from the current window + * Extracts the view tqlayout from the current window */ static PMViewLayout extractViewLayout( PMShell* shell ); private: @@ -198,11 +198,11 @@ private: }; /** - * Singleton that contains the view layouts available. + * Singleton that contains the view tqlayouts available. * - * It interacts with @ref PMShell to create the view layouts. - * The class maintains a list of layouts as well as the name of the default - * layout. The layouts are stored in a XML file caled viewlayouts.xml. + * It interacts with @ref PMShell to create the view tqlayouts. + * The class maintains a list of tqlayouts as well as the name of the default + * tqlayout. The tqlayouts are stored in a XML file caled viewtqlayouts.xml. */ class PMViewLayoutManager { @@ -217,15 +217,15 @@ public: static PMViewLayoutManager* theManager( ); /** - * Returns the list of available view layouts + * Returns the list of available view tqlayouts */ TQStringList availableLayouts( ); /** - * Sets the default layout + * Sets the default tqlayout */ void setDefaultLayout( const TQString& name ); /** - * Returns the default layout + * Returns the default tqlayout */ TQString defaultLayout( ) const { return m_defaultLayout; } /** @@ -233,43 +233,43 @@ public: */ void displayLayout( const TQString& name, PMShell* shell ); /** - * Displays the layout indicated as default + * Displays the tqlayout indicated as default */ void displayDefaultLayout( PMShell* shell ); /** - * Loads all layouts from the configuration file + * Loads all tqlayouts from the configuration file */ void loadData( ); /** - * Saves the current layout collection to the configuration file + * Saves the current tqlayout collection to the configuration file */ void saveData( ); /** - * Add a new empty layout + * Add a new empty tqlayout */ void addLayout( const TQString& name ); /** - * Add a new layout + * Add a new tqlayout */ void addLayout( const PMViewLayout& l ) { m_layouts.append( l ); } /** - * Remove a layout + * Remove a tqlayout */ void removeLayout( const TQString& name ); /** - * Get a known layout + * Get a known tqlayout */ PMViewLayout* findLayout( const TQString& name ); /** - * Returns the list of available layouts + * Returns the list of available tqlayouts */ - TQValueList<PMViewLayout> layouts( ) { return m_layouts; } + TQValueList<PMViewLayout> tqlayouts( ) { return m_layouts; } /** - * Sets the list of available layouts + * Sets the list of available tqlayouts */ void setLayouts( const TQValueList<PMViewLayout>& l ) { m_layouts = l; } /** - * Fill the available layouts menu + * Fill the available tqlayouts menu */ void fillPopupMenu( KPopupMenu* pMenu ); private: @@ -291,8 +291,9 @@ private: class PMSaveViewLayoutDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PMSaveViewLayoutDialog( PMShell* parent, const char* name = 0 ); + PMSaveViewLayoutDialog( PMShell* tqparent, const char* name = 0 ); ~PMSaveViewLayoutDialog( ); protected slots: virtual void slotOk( ); diff --git a/kpovmodeler/pmwarp.cpp b/kpovmodeler/pmwarp.cpp index 166777ce..b9e8682b 100644 --- a/kpovmodeler/pmwarp.cpp +++ b/kpovmodeler/pmwarp.cpp @@ -221,11 +221,11 @@ void PMWarp::readAttributes( const PMXMLHelper& h ) } } -PMMetaObject* PMWarp::metaObject( ) const +PMMetaObject* PMWarp::tqmetaObject( ) const { if( !s_pMetaObject ) { - s_pMetaObject = new PMMetaObject( "Warp", Base::metaObject( ), + s_pMetaObject = new PMMetaObject( "Warp", Base::tqmetaObject( ), createNewWarp ); PMWarpTypeProperty* p = new PMWarpTypeProperty( @@ -467,9 +467,9 @@ void PMWarp::setMajorRadius( const double c ) } } -PMDialogEditBase* PMWarp::editWidget( TQWidget* parent ) const +PMDialogEditBase* PMWarp::editWidget( TQWidget* tqparent ) const { - return new PMWarpEdit( parent ); + return new PMWarpEdit( tqparent ); } void PMWarp::restoreMemento( PMMemento* s ) diff --git a/kpovmodeler/pmwarp.h b/kpovmodeler/pmwarp.h index 6b50f498..d58fab8f 100644 --- a/kpovmodeler/pmwarp.h +++ b/kpovmodeler/pmwarp.h @@ -56,7 +56,7 @@ public: virtual TQString description( ) const; /** */ - virtual PMMetaObject* metaObject( ) const; + virtual PMMetaObject* tqmetaObject( ) const; /** */ virtual void cleanUp( ) const; @@ -68,7 +68,7 @@ public: /** * Returns a new @ref PMWarpEdit */ - virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* tqparent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view diff --git a/kpovmodeler/pmwarpedit.cpp b/kpovmodeler/pmwarpedit.cpp index 3f247eee..f7afa539 100644 --- a/kpovmodeler/pmwarpedit.cpp +++ b/kpovmodeler/pmwarpedit.cpp @@ -29,8 +29,8 @@ #include <kdialog.h> -PMWarpEdit::PMWarpEdit( TQWidget* parent, const char* name ) - : Base( parent, name ) +PMWarpEdit::PMWarpEdit( TQWidget* tqparent, const char* name ) + : Base( tqparent, name ) { m_pDisplayedObject = 0; } @@ -139,7 +139,7 @@ void PMWarpEdit::createTopWidgets( ) /* Mapping Warp Objects */ m_pMappingWidget = new TQWidget( this ); vl = new TQVBoxLayout( m_pMappingWidget, 0, KDialog::spacingHint( ) ); - label = new TQLabel( i18n( "Orientation:" ), m_pMappingWidget ); + label = new TQLabel( i18n( "Qt::Orientation:" ), m_pMappingWidget ); m_pOrientationEdit = new PMVectorEdit( "x", "y", "z", m_pMappingWidget ); hl = new TQHBoxLayout( vl ); hl->addWidget( label ); diff --git a/kpovmodeler/pmwarpedit.h b/kpovmodeler/pmwarpedit.h index fa12a358..653219b9 100644 --- a/kpovmodeler/pmwarpedit.h +++ b/kpovmodeler/pmwarpedit.h @@ -40,12 +40,13 @@ class TQLabel; class PMWarpEdit : public PMDialogEditBase { Q_OBJECT + TQ_OBJECT typedef PMDialogEditBase Base; public: /** - * Creates a PMWarpEdit with parent and name + * Creates a PMWarpEdit with tqparent and name */ - PMWarpEdit( TQWidget* parent, const char* name = 0 ); + PMWarpEdit( TQWidget* tqparent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmxmlhelper.h b/kpovmodeler/pmxmlhelper.h index 9e9af51c..87304fae 100644 --- a/kpovmodeler/pmxmlhelper.h +++ b/kpovmodeler/pmxmlhelper.h @@ -35,7 +35,7 @@ class PMPart; class PMParser; /** - * Class for reading attributes out of a @ref QDomElement + * Class for reading attributes out of a @ref TQDomElement */ class PMXMLHelper { @@ -46,7 +46,7 @@ public: PMXMLHelper( const TQDomElement& e, PMPart* p, PMParser* par, int majorDocumentFormat, int minorDocumentFormat ); /** - * Returns the QDomElement + * Returns the TQDomElement */ TQDomElement element( ) const { return m_e; } diff --git a/kpovmodeler/pmxmlparser.cpp b/kpovmodeler/pmxmlparser.cpp index 11d42015..c82b6f4c 100644 --- a/kpovmodeler/pmxmlparser.cpp +++ b/kpovmodeler/pmxmlparser.cpp @@ -117,7 +117,7 @@ void PMXMLParser::topParse( ) } } -void PMXMLParser::parseChildObjects( TQDomElement& e, PMObject* parent ) +void PMXMLParser::parseChildObjects( TQDomElement& e, PMObject* tqparent ) { TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) @@ -132,7 +132,7 @@ void PMXMLParser::parseChildObjects( TQDomElement& e, PMObject* parent ) PMXMLHelper hlp( ce, m_pPart, this, m_majorDocumentFormat, m_minorDocumentFormat ); obj->readAttributes( hlp ); - if( insertChild( obj, parent ) ) + if( insertChild( obj, tqparent ) ) { parseChildObjects( ce, obj ); @@ -143,7 +143,7 @@ void PMXMLParser::parseChildObjects( TQDomElement& e, PMObject* parent ) delete obj; } else if( ce.tagName( ) != "extra_data" ) - printError( i18n( "Unknown object %1" ).arg( ce.tagName( ) ) ); + printError( i18n( "Unknown object %1" ).tqarg( ce.tagName( ) ) ); } c = c.nextSibling( ); } diff --git a/kpovmodeler/pmxmlparser.h b/kpovmodeler/pmxmlparser.h index 2ff8f351..d33ff434 100644 --- a/kpovmodeler/pmxmlparser.h +++ b/kpovmodeler/pmxmlparser.h @@ -70,10 +70,10 @@ private: bool initDocument( ); /** - * Looks for child objects, parses them and appends them to the parent - * object. If parent is 0, all objects are appended to the result list. + * Looks for child objects, parses them and appends them to the tqparent + * object. If tqparent is 0, all objects are appended to the result list. */ - void parseChildObjects( TQDomElement& e, PMObject* parent ); + void parseChildObjects( TQDomElement& e, PMObject* tqparent ); TQDomDocument* m_pDoc; int m_majorDocumentFormat; diff --git a/kruler/klineal.cpp b/kruler/klineal.cpp index 0f08d6de..17a18eb6 100644 --- a/kruler/klineal.cpp +++ b/kruler/klineal.cpp @@ -67,7 +67,7 @@ static const uchar cursorBits[] = { * create the thingy with no borders and set up * its members */ -KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){ +KLineal::KLineal(TQWidget*tqparent,const char* name):KMainWindow(tqparent,name){ if (!name) { name = "klineal"; } @@ -78,7 +78,7 @@ KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){ TQWhatsThis::add(this, i18n( "This is a tool to measure pixel distances and colors on the screen. " - "It is useful for working on layouts of dialogs, web pages etc." + "It is useful for working on tqlayouts of dialogs, web pages etc." )); TQBitmap bim = TQBitmap(TQSize(8, 48), cursorBits); TQWMatrix m; @@ -152,7 +152,7 @@ KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){ oriMenu->insertItem(UserIconSet("kruler-west"), i18n("&West"), this, TQT_SLOT(setWest()), Key_W); oriMenu->insertItem(i18n("&Turn Right"), this, TQT_SLOT(turnRight()), Key_R); oriMenu->insertItem(i18n("Turn &Left"), this, TQT_SLOT(turnLeft()), Key_L); - mMenu->insertItem(i18n("&Orientation"), oriMenu); + mMenu->insertItem(i18n("&Qt::Orientation"), oriMenu); mLenMenu = new KPopupMenu(this); mLenMenu->insertItem(i18n("&Short"), this, TQT_SLOT(setShortLength()), CTRL+Key_S); mLenMenu->insertItem(i18n("&Medium"), this, TQT_SLOT(setMediumLength()), CTRL+Key_M); @@ -165,7 +165,7 @@ KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){ mMenu->insertItem(SmallIcon( "help" ), KStdGuiItem::help().text(), helpMenu()); mMenu->insertSeparator(); mMenu->insertItem(SmallIcon( "exit" ), KStdGuiItem::quit().text(), kapp, TQT_SLOT(quit()), CTRL+Key_Q); - mLastClickPos = geometry().topLeft()+TQPoint(width()/2, height()/2); + mLastClickPos = tqgeometry().topLeft()+TQPoint(width()/2, height()/2); } KLineal::~KLineal(){ @@ -293,7 +293,7 @@ void KLineal::setOrientation(int inOrientation) { mLenMenu->changeItem(FULLSCREENID, mOrientation % 2 ? i18n("&Full Screen Height") : i18n("&Full Screen Width")); setCursor(mCurrentCursor); setupBackground(); - repaint(); + tqrepaint(); } void KLineal::setNorth() { setOrientation(North); @@ -390,7 +390,7 @@ void KLineal::choseFont() { void KLineal::setFont(TQFont &font) { mScaleFont = font; saveSettings(); - repaint(); + tqrepaint(); } @@ -451,7 +451,7 @@ void KLineal::enterEvent(TQEvent * /*inEvent*/) { * overwritten to switch the value label and line cursor off */ void KLineal::leaveEvent(TQEvent * /*inEvent*/) { - if (!geometry().contains(TQCursor::pos())) { + if (!tqgeometry().tqcontains(TQCursor::pos())) { hideLabel(); } } @@ -518,7 +518,7 @@ void KLineal::keyPressEvent(TQKeyEvent *e) { dist *= 10; } move(pos()+dist); - KNotifyClient::event(0, "cursormove", TQString::null); + KNotifyClient::event(0, "cursormove", TQString()); } /** * overwritten to handle the line cursor which is a seperate widget outside the main @@ -547,7 +547,7 @@ void KLineal::mouseMoveEvent(TQMouseEvent * /*inEvent*/) { TQColor color = KColorDialog::grabColor(p); int h, s, v; color.hsv(&h, &s, &v); - mColorLabel->setText(color.name().upper()); + mColorLabel->setText(TQString(color.name()).upper()); mColorLabel->setPaletteBackgroundColor(color); if (v < 255/2) { v = 255; @@ -569,17 +569,17 @@ void KLineal::mousePressEvent(TQMouseEvent *inEvent) { mLastClickPos = TQCursor::pos(); hideLabel(); - TQRect gr = geometry(); + TQRect gr = tqgeometry(); mDragOffset = mLastClickPos - TQPoint(gr.left(), gr.top()); - if (inEvent->button() == LeftButton) { + if (inEvent->button() == Qt::LeftButton) { if (!mDragging) { grabMouse(KCursor::sizeAllCursor()); mDragging = TRUE; } - } else if (inEvent->button() == MidButton) { + } else if (inEvent->button() == Qt::MidButton) { _clicked = true; turnLeft(); - } else if (inEvent->button() == RightButton) { + } else if (inEvent->button() == Qt::RightButton) { showMenu(); } } diff --git a/kruler/klineal.h b/kruler/klineal.h index ce723cce..0acdda1c 100644 --- a/kruler/klineal.h +++ b/kruler/klineal.h @@ -32,10 +32,11 @@ class KLineal : public KMainWindow { Q_OBJECT + TQ_OBJECT public: enum { North=0, West=1, South=2, East=3 }; /** constructor */ - KLineal(TQWidget*parent=0,const char* name=0); + KLineal(TQWidget*tqparent=0,const char* name=0); /** destructor */ ~KLineal(); void move(int x, int y); diff --git a/ksnapshot/ksnapshot.cpp b/ksnapshot/ksnapshot.cpp index f8ad1977..c32e983b 100644 --- a/ksnapshot/ksnapshot.cpp +++ b/ksnapshot/ksnapshot.cpp @@ -58,9 +58,9 @@ #define kApp KApplication::kApplication() -KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent) +KSnapshot::KSnapshot(TQWidget *tqparent, const char *name, bool grabCurrent) : DCOPObject("interface"), - KDialogBase(parent, name, true, TQString::null, Help|User1, User1, + KDialogBase(tqparent, name, true, TQString(), Help|User1, User1, true, KStdGuiItem::quit() ) { grabber = new TQWidget( 0, 0, WStyle_Customize | WX11BypassWM ); @@ -106,9 +106,9 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent) autoincFilename(); } - connect( &grabTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( grabTimerDone() ) ); - connect( &updateTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updatePreview() ) ); - TQTimer::singleShot( 0, this, TQT_SLOT( updateCaption() ) ); + connect( &grabTimer, TQT_SIGNAL( timeout() ), TQT_TQOBJECT(this), TQT_SLOT( grabTimerDone() ) ); + connect( &updateTimer, TQT_SIGNAL( timeout() ), TQT_TQOBJECT(this), TQT_SLOT( updatePreview() ) ); + TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateCaption() ) ); KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), false); @@ -116,24 +116,24 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent) helpButton->setPopup(helpMenu->menu()); KAccel* accel = new KAccel(this); - accel->insert(KStdAccel::Quit, kapp, TQT_SLOT(quit())); + accel->insert(KStdAccel::Quit, TQT_TQOBJECT(kapp), TQT_SLOT(quit())); accel->insert( "QuickSave", i18n("Quick Save Snapshot &As..."), i18n("Save the snapshot to the file specified by the user without showing the file dialog."), - CTRL+SHIFT+Key_S, this, TQT_SLOT(slotSave())); - accel->insert(KStdAccel::Save, this, TQT_SLOT(slotSaveAs())); -// accel->insert(KShortcut(CTRL+Key_A), this, TQT_SLOT(slotSaveAs())); + CTRL+SHIFT+Key_S, TQT_TQOBJECT(this), TQT_SLOT(slotSave())); + accel->insert(KStdAccel::Save, TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs())); +// accel->insert(KShortcut(CTRL+Key_A), TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs())); accel->insert( "SaveAs", i18n("Save Snapshot &As..."), i18n("Save the snapshot to the file specified by the user."), - CTRL+Key_A, this, TQT_SLOT(slotSaveAs())); - accel->insert(KStdAccel::Print, this, TQT_SLOT(slotPrint())); - accel->insert(KStdAccel::New, this, TQT_SLOT(slotGrab())); - accel->insert(KStdAccel::Copy, this, TQT_SLOT(slotCopy())); + CTRL+Key_A, TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs())); + accel->insert(KStdAccel::Print, TQT_TQOBJECT(this), TQT_SLOT(slotPrint())); + accel->insert(KStdAccel::New, TQT_TQOBJECT(this), TQT_SLOT(slotGrab())); + accel->insert(KStdAccel::Copy, TQT_TQOBJECT(this), TQT_SLOT(slotCopy())); - accel->insert( "Quit2", Key_Q, this, TQT_SLOT(slotSave())); - accel->insert( "Save2", Key_S, this, TQT_SLOT(slotSaveAs())); - accel->insert( "Print2", Key_P, this, TQT_SLOT(slotPrint())); - accel->insert( "New2", Key_N, this, TQT_SLOT(slotGrab())); - accel->insert( "New3", Key_Space, this, TQT_SLOT(slotGrab())); + accel->insert( "Quit2", Key_Q, TQT_TQOBJECT(this), TQT_SLOT(slotSave())); + accel->insert( "Save2", Key_S, TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs())); + accel->insert( "Print2", Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotPrint())); + accel->insert( "New2", Key_N, TQT_TQOBJECT(this), TQT_SLOT(slotGrab())); + accel->insert( "New3", Key_Space, TQT_TQOBJECT(this), TQT_SLOT(slotGrab())); setEscapeButton( User1 ); connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( reject() ) ); @@ -162,7 +162,7 @@ bool KSnapshot::save( const KURL& url ) { if ( KIO::NetAccess::exists( url, false, this ) ) { const TQString title = i18n( "File Exists" ); - const TQString text = i18n( "<qt>Do you really want to overwrite <b>%1</b>?</qt>" ).arg(url.prettyURL()); + const TQString text = i18n( "<qt>Do you really want to overwrite <b>%1</b>?</qt>" ).tqarg(url.prettyURL()); if (KMessageBox::Continue != KMessageBox::warningContinueCancel( this, text, title, i18n("Overwrite") ) ) { return false; @@ -199,7 +199,7 @@ bool KSnapshot::save( const KURL& url ) TQString caption = i18n("Unable to save image"); TQString text = i18n("KSnapshot was unable to save the image to\n%1.") - .arg(url.prettyURL()); + .tqarg(url.prettyURL()); KMessageBox::error(this, text, caption); } @@ -241,7 +241,7 @@ void KSnapshot::slotSaveAs() void KSnapshot::slotCopy() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setPixmap( snapshot ); } @@ -279,11 +279,11 @@ void KSnapshot::slotPrint() else printer.setOrientation(KPrinter::Portrait); - qApp->processEvents(); + tqApp->processEvents(); if (printer.setup(this, i18n("Print Screenshot"))) { - qApp->processEvents(); + tqApp->processEvents(); TQPainter painter(&printer); TQPaintDeviceMetrics metrics(painter.device()); @@ -300,7 +300,7 @@ void KSnapshot::slotPrint() if ( scale ) { TQImage img = snapshot.convertToImage(); - qApp->processEvents(); + tqApp->processEvents(); float newh, neww; if ( dw > dh ) { @@ -312,8 +312,8 @@ void KSnapshot::slotPrint() neww = newh/h*w; } - img = img.smoothScale( int(neww), int(newh), TQImage::ScaleMin ); - qApp->processEvents(); + img = img.smoothScale( int(neww), int(newh), TQ_ScaleMin ); + tqApp->processEvents(); int x = (metrics.width()-img.width())/2; int y = (metrics.height()-img.height())/2; @@ -327,7 +327,7 @@ void KSnapshot::slotPrint() } } - qApp->processEvents(); + tqApp->processEvents(); } void KSnapshot::slotRegionGrabbed( const TQPixmap &pix ) @@ -367,18 +367,18 @@ void KSnapshot::closeEvent( TQCloseEvent * e ) conf->writeEntry("mode",mainWidget->mode()); conf->writeEntry("includeDecorations",mainWidget->includeDecorations()); KURL url = filename; - url.setPass( TQString::null ); + url.setPass( TQString() ); conf->writePathEntry("filename",url.url()); e->accept(); } bool KSnapshot::eventFilter( TQObject* o, TQEvent* e) { - if ( o == grabber && e->type() == TQEvent::MouseButtonPress ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(grabber) && e->type() == TQEvent::MouseButtonPress ) { TQMouseEvent* me = (TQMouseEvent*) e; if ( TQWidget::mouseGrabber() != grabber ) return false; - if ( me->button() == LeftButton ) + if ( me->button() == Qt::LeftButton ) performGrab(); } return false; @@ -400,11 +400,11 @@ void KSnapshot::autoincFilename() TQString numAsStr= name.mid(start, len); TQString number = TQString::number(numAsStr.toInt() + 1); number = number.rightJustify( len, '0'); - name.replace(start, len, number ); + name.tqreplace(start, len, number ); } else { // no number - start = name.findRev('.'); + start = name.tqfindRev('.'); if (start != -1) { // has a . somewhere, e.g. it has an extension name.insert(start, '1'); diff --git a/ksnapshot/ksnapshot.h b/ksnapshot/ksnapshot.h index 81dadd6d..99f0d8c1 100644 --- a/ksnapshot/ksnapshot.h +++ b/ksnapshot/ksnapshot.h @@ -20,16 +20,17 @@ class RegionGrabber; class KSnapshotWidget; -class KSnapshotPreview : public QLabel +class KSnapshotPreview : public TQLabel { Q_OBJECT + TQ_OBJECT public: - KSnapshotPreview(TQWidget *parent, const char *name = 0) - : TQLabel(parent, name) + KSnapshotPreview(TQWidget *tqparent, const char *name = 0) + : TQLabel(tqparent, name) { - setAlignment(AlignHCenter | AlignVCenter); - setCursor(TQCursor(Qt::PointingHandCursor)); + tqsetAlignment(AlignHCenter | AlignVCenter); + setCursor(TQCursor(TQt::PointingHandCursor)); } virtual ~KSnapshotPreview() {} @@ -39,18 +40,18 @@ class KSnapshotPreview : public QLabel // does unexpected things when painting directly onto the pixmap TQPixmap pixmap(pm); TQPixmap handle(15, 15); - TQBitmap mask(15, 15, true); + TQBitmap tqmask(15, 15, true); { - TQPainter p(&mask); - style().drawPrimitive(TQStyle::PE_SizeGrip, &p, TQRect(0, 0, 15, 15), palette().active()); + TQPainter p(&tqmask); + tqstyle().tqdrawPrimitive(TQStyle::PE_SizeGrip, &p, TQRect(0, 0, 15, 15), tqpalette().active()); p.end(); - handle.setMask(mask); + handle.setMask(tqmask); } { TQPainter p(&handle); - style().drawPrimitive(TQStyle::PE_SizeGrip, &p, TQRect(0, 0, 15, 15), palette().active()); + tqstyle().tqdrawPrimitive(TQStyle::PE_SizeGrip, &p, TQRect(0, 0, 15, 15), tqpalette().active()); p.end(); } @@ -91,9 +92,10 @@ class KSnapshotPreview : public QLabel class KSnapshot : public KDialogBase, virtual public KSnapshotIface { Q_OBJECT + TQ_OBJECT public: - KSnapshot(TQWidget *parent= 0, const char *name= 0, bool grabCurrent=false); + KSnapshot(TQWidget *tqparent= 0, const char *name= 0, bool grabCurrent=false); ~KSnapshot(); enum CaptureMode { FullScreen=0, WindowUnderCursor=1, Region=2, ChildWindow=3 }; diff --git a/ksnapshot/ksnapshotwidget.ui b/ksnapshot/ksnapshotwidget.ui index 88efce1a..41fc9146 100644 --- a/ksnapshot/ksnapshotwidget.ui +++ b/ksnapshot/ksnapshotwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSnapshotWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSnapshotWidget</cstring> </property> @@ -23,7 +23,7 @@ <property name="name"> <cstring>lblImage</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>130</height> @@ -51,7 +51,7 @@ You can also copy the image to the clipboard by pressing Ctrl+C.</string> <enum>Horizontal</enum> </property> </widget> - <widget class="QSpinBox" row="3" column="1"> + <widget class="TQSpinBox" row="3" column="1"> <property name="name"> <cstring>spinDelay</cstring> </property> @@ -75,7 +75,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b </qt></string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>lblDelay</cstring> </property> @@ -86,7 +86,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b <cstring>spinDelay</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -107,14 +107,14 @@ If <i>no delay</i> is set, the program will wait for a mouse click b <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>156</width> <height>16</height> </size> </property> </spacer> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>cbIncludeDecorations</cstring> </property> @@ -128,7 +128,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b <string>When enabled, snapshot of a window will also include the window decorations</string> </property> </widget> - <widget class="QComboBox" row="2" column="1" rowspan="1" colspan="3"> + <widget class="TQComboBox" row="2" column="1" rowspan="1" colspan="3"> <item> <property name="text"> <string>Full Screen</string> @@ -161,9 +161,9 @@ If <i>no delay</i> is set, the program will wait for a mouse click b <b>Section of Window</b> - captures only a section of the window. When taking a new snapshot in this mode you will be able to select any child window by moving the mouse over it.</p></qt></string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="3"> + <widget class="TQLayoutWidget" row="0" column="3"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <vbox> <property name="name"> @@ -193,7 +193,7 @@ If <i>no delay</i> is set, the program will wait for a mouse click b <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> @@ -323,14 +323,14 @@ If <i>no delay</i> is set, the program will wait for a mouse click b <include location="global" impldecl="in implementation">kglobalsettings.h</include> <include location="local" impldecl="in implementation">ksnapshotwidget.ui.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>newClicked()</signal> <signal>saveClicked()</signal> <signal>copyClicked()</signal> <signal>printClicked()</signal> <signal>startImageDrag()</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="protected" specifier="non virtual">slotModeChanged( int mode )</slot> <slot access="protected" specifier="non virtual">slotNewClicked()</slot> <slot access="protected" specifier="non virtual">slotSaveClicked()</slot> @@ -339,20 +339,20 @@ If <i>no delay</i> is set, the program will wait for a mouse click b <slot access="protected" specifier="non virtual">slotStartDrag()</slot> <slot specifier="non virtual" returnType="int">previewWidth()</slot> <slot specifier="non virtual" returnType="int">previewHeight()</slot> -</slots> +</Q_SLOTS> <functions> - <function specifier="non virtual">setPreview( const QPixmap & pm )</function> + <function specifier="non virtual">setPreview( const TQPixmap & pm )</function> <function specifier="non virtual">setDelay( int i )</function> <function specifier="non virtual">setIncludeDecorations( bool b )</function> <function specifier="non virtual">setMode( int mode )</function> <function specifier="non virtual" returnType="int">delay()</function> <function specifier="non virtual" returnType="bool">includeDecorations()</function> <function specifier="non virtual" returnType="int">mode()</function> - <function specifier="non virtual" returnType="QPixmap">preview()</function> + <function specifier="non virtual" returnType="TQPixmap">preview()</function> </functions> <pixmapfunction>SmallIconSet</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/ksnapshot/ksnapshotwidget.ui.h b/ksnapshot/ksnapshotwidget.ui.h index ab811bf2..601b624f 100644 --- a/ksnapshot/ksnapshotwidget.ui.h +++ b/ksnapshot/ksnapshotwidget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -39,15 +39,15 @@ void KSnapshotWidget::setPreview( const TQPixmap &pm ) if ( r1 * previewWidth() < previewHeight() ) img = img.smoothScale( previewWidth(), int( previewWidth() * r1 ), - TQImage::ScaleMin ); + TQ_ScaleMin ); else img = img.smoothScale( ( int ) ( ( ( double )previewHeight() ) / r1 ), - previewHeight(), TQImage::ScaleMin ); + previewHeight(), TQ_ScaleMin ); TQToolTip::remove( lblImage ); TQToolTip::add( lblImage, TQString( "Preview of the snapshot image (%1 x %2)" ) - .arg( pm.width() ).arg( pm.height() ) ); + .tqarg( pm.width() ).tqarg( pm.height() ) ); lblImage->setPixmap( img ); lblImage->adjustSize(); diff --git a/ksnapshot/regiongrabber.cpp b/ksnapshot/regiongrabber.cpp index 3522b74b..ede99aee 100644 --- a/ksnapshot/regiongrabber.cpp +++ b/ksnapshot/regiongrabber.cpp @@ -28,8 +28,8 @@ #include <kglobalsettings.h> -SizeTip::SizeTip( TQWidget *parent, const char *name ) - : TQLabel( parent, name, WStyle_Customize | WX11BypassWM | +SizeTip::SizeTip( TQWidget *tqparent, const char *name ) + : TQLabel( tqparent, name, WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WStyle_NoBorder | WStyle_Tool ) { setMargin( 2 ); @@ -41,8 +41,8 @@ SizeTip::SizeTip( TQWidget *parent, const char *name ) void SizeTip::setTip( const TQRect &rect ) { - TQString tip = TQString( "%1x%2" ).arg( rect.width() ) - .arg( rect.height() ); + TQString tip = TQString( "%1x%2" ).tqarg( rect.width() ) + .tqarg( rect.height() ); setText( tip ); adjustSize(); @@ -52,7 +52,7 @@ void SizeTip::setTip( const TQRect &rect ) void SizeTip::positionTip( const TQRect &rect ) { - TQRect tipRect = geometry(); + TQRect tipRect = tqgeometry(); tipRect.moveTopLeft( TQPoint( 0, 0 ) ); if ( rect.intersects( tipRect ) ) @@ -60,8 +60,8 @@ void SizeTip::positionTip( const TQRect &rect ) TQRect deskR = KGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) ); tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) ); - if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) - tipRect.moveBottomRight( geometry().bottomRight() ); + if ( !rect.tqcontains( tipRect, true ) && rect.intersects( tipRect ) ) + tipRect.moveBottomRight( tqgeometry().bottomRight() ); } move( tipRect.topLeft() ); @@ -92,7 +92,7 @@ void RegionGrabber::initGrabber() TQDesktopWidget desktopWidget; TQRect desktopSize; if ( desktopWidget.isVirtualDesktop() ) - desktopSize = desktopWidget.geometry(); + desktopSize = desktopWidget.tqgeometry(); else desktopSize = desktopWidget.screenGeometry( qt_xrootwin() ); @@ -104,7 +104,7 @@ void RegionGrabber::initGrabber() void RegionGrabber::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == LeftButton ) + if ( e->button() == Qt::LeftButton ) { mouseDown = true; grabRect = TQRect( e->pos(), e->pos() ); @@ -168,8 +168,8 @@ void RegionGrabber::drawRubber() p.setPen( TQPen( color0, 1 ) ); p.setBrush( NoBrush ); - style().drawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, colorGroup(), - TQStyle::Style_Default, TQStyleOption( colorGroup().base() ) ); + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, tqcolorGroup(), + TQStyle::Style_Default, TQStyleOption( tqcolorGroup().base() ) ); p.end(); } diff --git a/ksnapshot/regiongrabber.h b/ksnapshot/regiongrabber.h index 5a9d28b9..1c9f4a3a 100644 --- a/ksnapshot/regiongrabber.h +++ b/ksnapshot/regiongrabber.h @@ -25,19 +25,20 @@ class TQTimer; -class SizeTip : public QLabel +class SizeTip : public TQLabel { public: - SizeTip( TQWidget *parent, const char *name=0 ); + SizeTip( TQWidget *tqparent, const char *name=0 ); ~SizeTip() {} void setTip( const TQRect &rect ); void positionTip( const TQRect &rect ); }; -class RegionGrabber : public QWidget +class RegionGrabber : public TQWidget { Q_OBJECT + TQ_OBJECT public: RegionGrabber(); diff --git a/ksnapshot/windowgrabber.cpp b/ksnapshot/windowgrabber.cpp index 7e556efc..8bf8deee 100644 --- a/ksnapshot/windowgrabber.cpp +++ b/ksnapshot/windowgrabber.cpp @@ -39,7 +39,7 @@ bool operator< ( const TQRect& r1, const TQRect& r2 ) return r1.width() * r1.height() < r2.width() * r2.height(); } -// Recursively iterates over the window w and its children, thereby building +// Recursively iterates over the window w and its tqchildren, thereby building // a tree of window descriptors. Windows in non-viewable state or with height // or width smaller than minSize will be ignored. static @@ -61,16 +61,16 @@ void getWindowsRecursive( std::vector<TQRect>& windows, Window w, windows.push_back( r ); } - Window root, parent; - Window* children; - unsigned int nchildren; + Window root, tqparent; + Window* tqchildren; + unsigned int ntqchildren; - if( XQueryTree( qt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) { - for( unsigned int i = 0; i < nchildren; ++i ) { - getWindowsRecursive( windows, children[ i ], x, y, depth + 1 ); + if( XQueryTree( qt_xdisplay(), w, &root, &tqparent, &tqchildren, &ntqchildren ) != 0 ) { + for( unsigned int i = 0; i < ntqchildren; ++i ) { + getWindowsRecursive( windows, tqchildren[ i ], x, y, depth + 1 ); } - if( children != NULL ) - XFree( children ); + if( tqchildren != NULL ) + XFree( tqchildren ); } } if ( depth == 0 ) @@ -94,17 +94,17 @@ Window findRealWindow( Window w, int depth = 0 ) if( type != None ) return w; } - Window root, parent; - Window* children; - unsigned int nchildren; + Window root, tqparent; + Window* tqchildren; + unsigned int ntqchildren; Window ret = None; - if( XQueryTree( qt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) { + if( XQueryTree( qt_xdisplay(), w, &root, &tqparent, &tqchildren, &ntqchildren ) != 0 ) { for( unsigned int i = 0; - i < nchildren && ret == None; + i < ntqchildren && ret == None; ++i ) - ret = findRealWindow( children[ i ], depth + 1 ); - if( children != NULL ) - XFree( children ); + ret = findRealWindow( tqchildren[ i ], depth + 1 ); + if( tqchildren != NULL ) + XFree( tqchildren ); } return ret; } @@ -114,11 +114,11 @@ Window windowUnderCursor( bool includeDecorations = true ) { Window root; Window child; - uint mask; + uint tqmask; int rootX, rootY, winX, winY; XGrabServer( qt_xdisplay() ); XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, - &rootX, &rootY, &winX, &winY, &mask ); + &rootX, &rootY, &winX, &winY, &tqmask ); if( child == None ) child = qt_xrootwin(); if( !includeDecorations ) { @@ -138,17 +138,17 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border ) int tmp1, tmp2; //Check whether the extension is available if ( XShapeQueryExtension( qt_xdisplay(), &tmp1, &tmp2 ) ) { - TQBitmap mask( w, h ); - //As the first step, get the mask from XShape. + TQBitmap tqmask( w, h ); + //As the first step, get the tqmask from XShape. int count, order; XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child, ShapeBounding, &count, &order ); - //The ShapeBounding region is the outermost shape of the window; + //The ShapeBounding region is the outermost tqshape of the window; //ShapeBounding - ShapeClipping is defined to be the border. //Since the border area is part of the window, we use bounding // to limit our work region if (rects) { - //Create a TQRegion from the rectangles describing the bounding mask. + //Create a TQRegion from the rectangles describing the bounding tqmask. TQRegion contents; for ( int pos = 0; pos < count; pos++ ) contents += TQRegion( rects[pos].x, rects[pos].y, @@ -166,18 +166,18 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border ) contents += TQRegion( w - border, 0, border, h ); } - //Get the masked away area. - TQRegion maskedAway = bbox - contents; - TQMemArray<TQRect> maskedAwayRects = maskedAway.rects(); + //Get the tqmasked away area. + TQRegion tqmaskedAway = bbox - contents; + TQMemArray<TQRect> tqmaskedAwayRects = tqmaskedAway.tqrects(); - //Construct a bitmap mask from the rectangles - TQPainter p(&mask); - p.fillRect(0, 0, w, h, Qt::color1); - for (uint pos = 0; pos < maskedAwayRects.count(); pos++) - p.fillRect(maskedAwayRects[pos], Qt::color0); + //Construct a bitmap tqmask from the rectangles + TQPainter p(&tqmask); + p.fillRect(0, 0, w, h, TQt::color1); + for (uint pos = 0; pos < tqmaskedAwayRects.count(); pos++) + p.fillRect(tqmaskedAwayRects[pos], TQt::color0); p.end(); - pm.setMask(mask); + pm.setMask(tqmask); } } #endif @@ -186,8 +186,8 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border ) } WindowGrabber::WindowGrabber() -: TQDialog( 0, 0, true, Qt::WStyle_Customize | Qt::WStyle_NoBorder | - Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ), +: TQDialog( 0, 0, true, TQt::WStyle_Customize | TQt::WStyle_NoBorder | + TQt::WStyle_StaysOnTop | TQt::WX11BypassWM ), current( -1 ), yPos( -1 ) { Window root; @@ -218,16 +218,16 @@ TQPixmap WindowGrabber::grabCurrent( bool includeDecorations ) XGrabServer( qt_xdisplay() ); Window child = windowUnderCursor( includeDecorations ); XGetGeometry( qt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth ); - Window parent; - Window* children; - unsigned int nchildren; - if( XQueryTree( qt_xdisplay(), child, &root, &parent, - &children, &nchildren ) != 0 ) { - if( children != NULL ) - XFree( children ); + Window tqparent; + Window* tqchildren; + unsigned int ntqchildren; + if( XQueryTree( qt_xdisplay(), child, &root, &tqparent, + &tqchildren, &ntqchildren ) != 0 ) { + if( tqchildren != NULL ) + XFree( tqchildren ); int newx, newy; Window dummy; - if( XTranslateCoordinates( qt_xdisplay(), parent, qt_xrootwin(), + if( XTranslateCoordinates( qt_xdisplay(), tqparent, qt_xrootwin(), x, y, &newx, &newy, &dummy )) { x = newx; y = newy; @@ -240,7 +240,7 @@ TQPixmap WindowGrabber::grabCurrent( bool includeDecorations ) void WindowGrabber::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == TQMouseEvent::RightButton ) + if ( e->button() == Qt::RightButton ) yPos = e->globalY(); else { TQPixmap pm; @@ -258,7 +258,7 @@ void WindowGrabber::mousePressEvent( TQMouseEvent *e ) void WindowGrabber::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e->button() == TQMouseEvent::RightButton ) + if ( e->button() == Qt::RightButton ) yPos = -1; } @@ -303,7 +303,7 @@ void WindowGrabber::wheelEvent( TQWheelEvent *e ) void WindowGrabber::increaseScope( const TQPoint &pos ) { for ( uint i = current + 1; i < windows.size(); i++ ) { - if ( windows[ i ].contains( pos ) ) { + if ( windows[ i ].tqcontains( pos ) ) { current = i; break; } @@ -317,7 +317,7 @@ void WindowGrabber::increaseScope( const TQPoint &pos ) void WindowGrabber::decreaseScope( const TQPoint &pos ) { for ( int i = current - 1; i >= 0; i-- ) { - if ( windows[ i ].contains( pos ) ) { + if ( windows[ i ].tqcontains( pos ) ) { current = i; break; } @@ -330,7 +330,7 @@ void WindowGrabber::decreaseScope( const TQPoint &pos ) int WindowGrabber::windowIndex( const TQPoint &pos ) const { for ( uint i = 0; i < windows.size(); i++ ) { - if ( windows[ i ].contains( pos ) ) + if ( windows[ i ].tqcontains( pos ) ) return i; } return -1; @@ -339,12 +339,12 @@ int WindowGrabber::windowIndex( const TQPoint &pos ) const // Draws a border around the (child) window currently containing the pointer void WindowGrabber::drawBorder() { - repaint(); + tqrepaint(); if ( current >= 0 ) { TQPainter p; p.begin( this ); - p.setPen( TQPen( Qt::red, 3 ) ); + p.setPen( TQPen( TQt::red, 3 ) ); p.drawRect( windows[ current ] ); p.end(); } diff --git a/ksnapshot/windowgrabber.h b/ksnapshot/windowgrabber.h index d6a56d6c..dd071f70 100644 --- a/ksnapshot/windowgrabber.h +++ b/ksnapshot/windowgrabber.h @@ -26,9 +26,10 @@ #include <X11/Xlib.h> #include <X11/Xatom.h> -class WindowGrabber : public QDialog +class WindowGrabber : public TQDialog { Q_OBJECT + TQ_OBJECT public: WindowGrabber(); diff --git a/ksvg/configure.in.in b/ksvg/configure.in.in index 83109d48..5643818e 100644 --- a/ksvg/configure.in.in +++ b/ksvg/configure.in.in @@ -202,5 +202,5 @@ fi AC_LANG_SAVE AC_LANG_CPLUSPLUS -AC_CHECK_HEADERS(sstream) +KDE_CHECK_HEADERS(sstream) AC_LANG_RESTORE diff --git a/ksvg/core/CanvasFactory.cpp b/ksvg/core/CanvasFactory.cpp index e03bf9ea..d1278334 100644 --- a/ksvg/core/CanvasFactory.cpp +++ b/ksvg/core/CanvasFactory.cpp @@ -149,7 +149,7 @@ TQString CanvasFactory::internalNameFor(const TQString &name) ++it; } - return TQString::null; + return TQString(); } void CanvasFactory::deleteCanvas(KSVGCanvas *canvas) diff --git a/ksvg/core/CanvasItems.cpp b/ksvg/core/CanvasItems.cpp index 333f4608..b5b5681f 100644 --- a/ksvg/core/CanvasItems.cpp +++ b/ksvg/core/CanvasItems.cpp @@ -107,7 +107,7 @@ void CanvasText::handleTSpan(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM, TQString text = tspan->text(); if(!text.isEmpty()) { - T2P::GlyphLayoutParams *params = tspan->layoutParams(); + T2P::GlyphLayoutParams *params = tspan->tqlayoutParams(); if(bMultipleX || bMultipleY) { @@ -265,7 +265,7 @@ KSVGTextChunk *CanvasText::createTextChunk(KSVGCanvas *canvas, const SVGMatrixIm curx = usex; cury = usey; - T2P::GlyphLayoutParams *params = tpath->layoutParams(); + T2P::GlyphLayoutParams *params = tpath->tqlayoutParams(); if(!params->tb()) curx += endx; @@ -290,7 +290,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons TQMemArray<double> _cury(1); _cury[0] = double(cury); - T2P::GlyphLayoutParams *params = m_text->layoutParams(); + T2P::GlyphLayoutParams *params = m_text->tqlayoutParams(); SVGTextPositioningElementImpl *tp = textChunk->getTextElement(0); SVGTextContentElementImpl *tc = textChunk->getTextContentElement(0); SVGTextContentElementImpl *tc0 = tc; @@ -373,14 +373,14 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons } { - T2P::GlyphLayoutParams *params = tc->layoutParams(); + T2P::GlyphLayoutParams *params = tc->tqlayoutParams(); params->setLetterSpacing(params->letterSpacing() + addLetterSpacing); if(bpath) { params->setTextPathStartOffset(pathAdvance); if(tp && tp->dy()->baseVal()->numberOfItems() > 0) pathDy += tp->dy()->baseVal()->getItem(0)->value(); - TQString shift = TQString("%1%%").arg((pathDy / font->fontParams()->size()) * -100.0); + TQString shift = TQString("%1%%").tqarg((pathDy / font->fontParams()->size()) * -100.0); params->setBaselineShift(shift.latin1()); } @@ -429,7 +429,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons return; // Draw 'text-decoration' - // TODO: Currently just ignore text-decoration on vertical layouts, is that correct? + // TODO: Currently just ignore text-decoration on vertical tqlayouts, is that correct? // Underline and overline have to be drawn before the glyphs are rendered if(tc0->getTextDecoration() & UNDERLINE && !params->tb()) addTextDecoration(tc0, (curx - anchor), (cury + (glyph->underlinePosition() - glyph->pixelBaseline())), @@ -444,7 +444,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons SVGTextContentElementImpl *style = textChunk->getTextContentElement(j); // Draw 'text-decoration' - // TODO: Currently just ignore text-decoration on vertical layouts, is that correct? + // TODO: Currently just ignore text-decoration on vertical tqlayouts, is that correct? // Underline and overline have to be drawn before the glyphs are rendered if(style->getAttribute("text-decoration") == "underline" && !params->tb()) addTextDecoration(style, glyph->bboxX() - anchor, (cury + (glyph->underlinePosition() - glyph->pixelBaseline())), @@ -484,26 +484,26 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons // ##### -void MarkerHelper::doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const TQString &markerId) +void MarkerHelper::doMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle, const TQString &markerId) { - SVGMarkerElementImpl *marker = dynamic_cast<SVGMarkerElementImpl *>(shape->ownerSVGElement()->getElementById(markerId)); + SVGMarkerElementImpl *marker = dynamic_cast<SVGMarkerElementImpl *>(tqshape->ownerSVGElement()->getElementById(markerId)); if(marker) - marker->draw(shape, x, y, style->getStrokeWidth()->baseVal()->value(), angle); + marker->draw(tqshape, x, y, style->getStrokeWidth()->baseVal()->value(), angle); } -void MarkerHelper::doStartMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle) +void MarkerHelper::doStartMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle) { - doMarker(shape, style, x, y, angle, style->getStartMarker()); + doMarker(tqshape, style, x, y, angle, style->getStartMarker()); } -void MarkerHelper::doMidMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle) +void MarkerHelper::doMidMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle) { - doMarker(shape, style, x, y, angle, style->getMidMarker()); + doMarker(tqshape, style, x, y, angle, style->getMidMarker()); } -void MarkerHelper::doEndMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle) +void MarkerHelper::doEndMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle) { - doMarker(shape, style, x, y, angle, style->getEndMarker()); + doMarker(tqshape, style, x, y, angle, style->getEndMarker()); } // vim:ts=4:noet diff --git a/ksvg/core/CanvasItems.h b/ksvg/core/CanvasItems.h index 9f5eed43..45818712 100644 --- a/ksvg/core/CanvasItems.h +++ b/ksvg/core/CanvasItems.h @@ -80,12 +80,12 @@ protected: class MarkerHelper { protected: - void doStartMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0); - void doMidMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0); - void doEndMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0); + void doStartMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle = 0.0); + void doMidMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle = 0.0); + void doEndMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle = 0.0); private: - void doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const TQString &marker); + void doMarker(SVGShapeImpl *tqshape, SVGStylableImpl *style, double x, double y, double angle, const TQString &marker); }; class CanvasText : public CanvasItem diff --git a/ksvg/core/KSVGCanvas.cpp b/ksvg/core/KSVGCanvas.cpp index 1f504c02..d20264bf 100644 --- a/ksvg/core/KSVGCanvas.cpp +++ b/ksvg/core/KSVGCanvas.cpp @@ -181,7 +181,7 @@ void KSVGCanvas::resize(unsigned int w, unsigned int h) { for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { - if(!drawables.contains(*it)) + if(!drawables.tqcontains(*it)) drawables.append(*it); } } @@ -203,7 +203,7 @@ void KSVGCanvas::resize(unsigned int w, unsigned int h) { for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { - if(!drawables.contains(*it)) + if(!drawables.tqcontains(*it)) drawables.append(*it); } } @@ -254,7 +254,7 @@ void KSVGCanvas::clear(const TQRect &r) if(!r2.isEmpty() && m_buffer) { for(int i = 0; i < r2.height(); i++) - memset(m_buffer + int(r2.x() * m_nrChannels) + int((r2.y() + i) * (m_width * m_nrChannels)), qRgba(250, 250, 250, 250), r2.width() * m_nrChannels); + memset(m_buffer + int(r2.x() * m_nrChannels) + int((r2.y() + i) * (m_width * m_nrChannels)), tqRgba(250, 250, 250, 250), r2.width() * m_nrChannels); } } @@ -284,13 +284,13 @@ void KSVGCanvas::fill() } else { - Q_UINT32 *p = reinterpret_cast<Q_UINT32 *>(m_buffer); - unsigned char a = qAlpha(m_backgroundColor.rgb()); + TQ_UINT32 *p = reinterpret_cast<TQ_UINT32 *>(m_buffer); + unsigned char a = tqAlpha(m_backgroundColor.rgb()); #if X_BYTE_ORDER == X_LITTLE_ENDIAN - Q_UINT32 rgba = (a << 24) | (b << 16) | (g << 8) | r; + TQ_UINT32 rgba = (a << 24) | (b << 16) | (g << 8) | r; #else - Q_UINT32 rgba = (r << 24) | (g << 16) | (b << 8) | a; + TQ_UINT32 rgba = (r << 24) | (g << 16) | (b << 8) | a; #endif for(int i = 0; i < m_width * m_height; i++) *p++ = rgba; @@ -302,17 +302,17 @@ void KSVGCanvas::fill() void KSVGCanvas::clipToBuffer(int &x0, int &y0, int &x1, int &y1) const { // clamp to viewport - x0 = QMAX(x0, 0); - x0 = QMIN(x0, int(m_width - 1)); + x0 = TQMAX(x0, 0); + x0 = TQMIN(x0, int(m_width - 1)); - y0 = QMAX(y0, 0); - y0 = QMIN(y0, int(m_height - 1)); + y0 = TQMAX(y0, 0); + y0 = TQMIN(y0, int(m_height - 1)); - x1 = QMAX(x1, 0); - x1 = QMIN(x1, int(m_width - 1)); + x1 = TQMAX(x1, 0); + x1 = TQMIN(x1, int(m_width - 1)); - y1 = QMAX(y1, 0); - y1 = QMIN(y1, int(m_height - 1)); + y1 = TQMAX(y1, 0); + y1 = TQMIN(y1, int(m_height - 1)); } T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) const @@ -324,11 +324,11 @@ T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) cons EFontStyle fontStyle = style->getFontStyle(); TQString fontWeight = style->getFontWeight(); - if(fontWeight.contains("bold")) + if(fontWeight.tqcontains("bold")) weight |= FC_WEIGHT_DEMIBOLD; - if(fontWeight.contains("bolder")) + if(fontWeight.tqcontains("bolder")) weight |= FC_WEIGHT_BOLD; - if(fontWeight.contains("lighter")) + if(fontWeight.tqcontains("lighter")) weight |= FC_WEIGHT_LIGHT; bool ok = true; @@ -341,7 +341,7 @@ T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) cons slant |= FC_SLANT_ROMAN; else if(fontStyle == ITALIC) slant |= FC_SLANT_ITALIC; - else if(fontStyle == OBLIQUE) + else if(fontStyle == OBLITQUE) slant |= FC_SLANT_OBLIQUE; // Calc font names @@ -362,9 +362,9 @@ T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) cons return fontVisualParams; } -void KSVGCanvas::invalidate(CanvasItem *item, bool recalc) +void KSVGCanvas::tqinvalidate(CanvasItem *item, bool recalc) { - if(m_chunksByItem.find(item) != m_chunksByItem.end()) + if(m_chunksByItem.tqfind(item) != m_chunksByItem.end()) { if(recalc) { @@ -376,7 +376,7 @@ void KSVGCanvas::invalidate(CanvasItem *item, bool recalc) for(it.toFirst(); it.current(); ++it) { (*it)->setDirty(); - if(!m_dirtyChunks.contains(*it)) + if(!m_dirtyChunks.tqcontains(*it)) m_dirtyChunks.append(*it); } } @@ -395,7 +395,7 @@ void KSVGCanvas::insert(CanvasItem *item, int z) bool visible = item->isVisible(); if(visible) - invalidate(item, false); + tqinvalidate(item, false); if(m_immediateUpdate) { @@ -429,7 +429,7 @@ void KSVGCanvas::removeFromChunks(CanvasItem *item) for(it.toFirst(); it.current(); ++it) { (*it)->remove(item); - if(!m_dirtyChunks.contains(*it)) + if(!m_dirtyChunks.tqcontains(*it)) m_dirtyChunks.append(*it); } m_chunksByItem.remove(item); @@ -462,15 +462,15 @@ void KSVGCanvas::addToChunks(CanvasItem *item) unsigned int KSVGCanvas::setElementItemZIndexRecursive(SVGElementImpl *element, unsigned int z) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); - if(shape) + if(tqshape) { - CanvasItem *item = shape->item(); + CanvasItem *item = tqshape->item(); if(item) { - SVGImageElementImpl *image = dynamic_cast<SVGImageElementImpl *>(shape); + SVGImageElementImpl *image = dynamic_cast<SVGImageElementImpl *>(tqshape); if(image && image->svgImageRootElement()) { @@ -481,7 +481,7 @@ unsigned int KSVGCanvas::setElementItemZIndexRecursive(SVGElementImpl *element, else { item->setZIndex(z); - invalidate(item, false); + tqinvalidate(item, false); z++; } } @@ -540,7 +540,7 @@ void KSVGCanvas::update(const TQPoint &panPoint, bool erase) { for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { - if(!drawables.contains(*it)) + if(!drawables.tqcontains(*it)) drawables.append(*it); } } @@ -607,7 +607,7 @@ void KSVGCanvas::update(float zoomFactor) { for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { - if(!drawables.contains(*it)) + if(!drawables.tqcontains(*it)) drawables.append(*it); } } @@ -666,7 +666,7 @@ void KSVGCanvas::update() for(CanvasItemList::ConstIterator it = chunk->list().begin(); it != chunk->list().end(); ++it) { // kdDebug(26005) << k_funcinfo << " Checking: " << *it << endl; - if(!drawables.contains(*it)) + if(!drawables.tqcontains(*it)) { // kdDebug(26005) << k_funcinfo << " Yes, appending to update list!" << endl; drawables.append(*it); @@ -724,7 +724,7 @@ CanvasItemList KSVGCanvas::collisions(const TQPoint &p, bool exact) const { for(CanvasItemList::Iterator it = list.begin(); it != list.end(); ++it) { - if((*it)->fillContains(p) || (*it)->strokeContains(p) || (*it)->bbox().contains(p)) + if((*it)->fillContains(p) || (*it)->strokeContains(p) || (*it)->bbox().tqcontains(p)) result.append(*it); } @@ -740,20 +740,20 @@ void KSVGCanvas::blit(const TQRect &rect, bool direct) { // clamp to viewport int x0 = rect.x(); - x0 = QMAX(x0, 0); - x0 = QMIN(x0, int(m_width - 1)); + x0 = TQMAX(x0, 0); + x0 = TQMIN(x0, int(m_width - 1)); int y0 = rect.y(); - y0 = QMAX(y0, 0); - y0 = QMIN(y0, int(m_height - 1)); + y0 = TQMAX(y0, 0); + y0 = TQMIN(y0, int(m_height - 1)); int x1 = rect.x() + rect.width() + 1; - x1 = QMAX(x1, 0); - x1 = QMIN(x1, int(m_width)); + x1 = TQMAX(x1, 0); + x1 = TQMIN(x1, int(m_width)); int y1 = rect.y() + rect.height() + 1; - y1 = QMAX(y1, 0); - y1 = QMIN(y1, int(m_height)); + y1 = TQMAX(y1, 0); + y1 = TQMIN(y1, int(m_height)); xlib_draw_rgb_image(direct ? m_directWindow->handle() : m_drawWindow->handle(), m_gc, x0, y0, x1 - x0, y1 - y0, XLIB_RGB_DITHER_NONE, m_buffer + (m_width * y0 + x0) * m_nrChannels, m_width * m_nrChannels); } @@ -766,7 +766,7 @@ void KSVGCanvas::blit() void KSVGCanvas::ChunkManager::addChunk(CanvasChunk *chunk) { - TQString key = TQString("%1 %2").arg(chunk->x()).arg(chunk->y()); + TQString key = TQString("%1 %2").tqarg(chunk->x()).tqarg(chunk->y()); // kdDebug(26005) << k_funcinfo << "Adding chunk : " << chunk << endl; m_chunks.insert(key, chunk); } @@ -774,7 +774,7 @@ void KSVGCanvas::ChunkManager::addChunk(CanvasChunk *chunk) CanvasChunk *KSVGCanvas::ChunkManager::getChunk(short x, short y) const { // kdDebug(26005) << k_funcinfo << "getting chunk from : " << x << ", " << y << endl; - TQString key = TQString("%1 %2").arg(x).arg(y); + TQString key = TQString("%1 %2").tqarg(x).tqarg(y); return m_chunks[key]; } diff --git a/ksvg/core/KSVGCanvas.h b/ksvg/core/KSVGCanvas.h index aa41e6c2..367d17d4 100644 --- a/ksvg/core/KSVGCanvas.h +++ b/ksvg/core/KSVGCanvas.h @@ -56,9 +56,10 @@ class CanvasClipPath; class CanvasPaintServer; // Must be a TQObject to be able to be loaded by KLibLoader... -class KSVGCanvas : public QObject +class KSVGCanvas : public TQObject { Q_OBJECT + TQ_OBJECT public: KSVGCanvas(unsigned int width, unsigned int height); virtual ~KSVGCanvas(); @@ -74,7 +75,7 @@ public: void update(const TQPoint &panPoint, bool erase = true); void resize(unsigned int w, unsigned int h); void retune(unsigned int csh, unsigned int csv); - void invalidate(CanvasItem *item, bool recalc = true); + void tqinvalidate(CanvasItem *item, bool recalc = true); CanvasItemList collisions(const TQPoint &p, bool exact = false) const; void setBackgroundColor(const TQColor &c) { m_backgroundColor = c; } @@ -125,7 +126,7 @@ public: T2P::FontVisualParams *fontVisualParams(SVGStylableImpl *style) const; virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const { Q_UNUSED(item); return 0; } - // Assign z indices to the element and its children, starting with z, and + // Assign z indices to the element and its tqchildren, starting with z, and // return the next z value to be used. unsigned int setElementItemZIndexRecursive(SVGElementImpl *element, unsigned int z); diff --git a/ksvg/core/KSVGHelper.h b/ksvg/core/KSVGHelper.h index 27c8b88f..fe68b77e 100644 --- a/ksvg/core/KSVGHelper.h +++ b/ksvg/core/KSVGHelper.h @@ -73,12 +73,12 @@ public: static unsigned int toArtColor(const TQColor &color) { - return (qRed(color.rgb()) << 24) | (qGreen(color.rgb()) << 16) | ( qBlue(color.rgb()) << 8) | (qAlpha(color.rgb())); + return (tqRed(color.rgb()) << 24) | (tqGreen(color.rgb()) << 16) | ( tqBlue(color.rgb()) << 8) | (tqAlpha(color.rgb())); } static unsigned int toArtColor(const TQColor &color, short opacity) { - return (qRed(color.rgb()) << 24) | (qGreen(color.rgb()) << 16) | ( qBlue(color.rgb()) << 8) | (opacity); + return (tqRed(color.rgb()) << 24) | (tqGreen(color.rgb()) << 16) | ( tqBlue(color.rgb()) << 8) | (opacity); } static int linearRGBFromsRGB(int sRGB8bit) { return m_linearRGBFromsRGB[sRGB8bit]; } diff --git a/ksvg/core/KSVGLoader.cpp b/ksvg/core/KSVGLoader.cpp index 63c3efc8..9e8c5c54 100644 --- a/ksvg/core/KSVGLoader.cpp +++ b/ksvg/core/KSVGLoader.cpp @@ -60,7 +60,7 @@ TQString KSVGLoader::loadXML(::KURL url) return TQString(contents); } - return TQString::null; + return TQString(); } void KSVGLoader::getSVGContent(::KURL url) @@ -125,17 +125,17 @@ void KSVGLoader::slotResult(KIO::Job *job) if(m_job->error() == 0) { TQString check = static_cast<KIO::TransferJob *>(job)->url().prettyURL(); - if(check.contains(".svgz") || check.contains(".svg.gz")) + if(check.tqcontains(".svgz") || check.tqcontains(".svg.gz")) { // decode the gzipped svg and emit it - TQIODevice *dev = KFilterDev::device(new TQBuffer(m_data), "application/x-gzip"); + TQIODevice *dev = KFilterDev::device(TQT_TQIODEVICE(new TQBuffer(m_data)), "application/x-gzip"); dev->open(IO_ReadOnly); emit gotResult(dev); } else { m_job = 0; - emit gotResult(new TQBuffer(m_data)); + emit gotResult(TQT_TQIODEVICE(new TQBuffer(m_data))); m_data.resize(0); } } @@ -162,7 +162,7 @@ void KSVGLoader::slotResult(KIO::Job *job) if(buffer.open(IO_ReadOnly)) { - const char *imageFormat = TQImageIO::imageFormat(&buffer); + const char *imageFormat = TQImageIO::imageFormat(TQT_TQIODEVICE(&buffer)); if(imageFormat != 0) { @@ -199,7 +199,7 @@ TQString KSVGLoader::getUrl(::KURL url, bool local) if(local || (!url.prettyURL().isEmpty()) && ((url.protocol() == "http") || (url.protocol() == "https"))) return loadXML(url); - return TQString::null; + return TQString(); } void KSVGLoader::postUrl(::KURL url, const TQByteArray &data, const TQString &mimeType, KJS::ExecState *exec, KJS::Object &callBackFunction, KJS::Object &status) @@ -215,7 +215,7 @@ void KSVGLoader::postUrl(::KURL url, const TQByteArray &data, const TQString &mi connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); } -class CharacterDataSearcher : public QXmlDefaultHandler +class CharacterDataSearcher : public TQXmlDefaultHandler { public: CharacterDataSearcher(const TQString &id) : m_id(id) { } @@ -289,7 +289,7 @@ TQString KSVGLoader::getCharacterData(::KURL url, const TQString &id) -class SVGFragmentSearcher : public QXmlDefaultHandler +class SVGFragmentSearcher : public TQXmlDefaultHandler { public: SVGFragmentSearcher(SVGDocumentImpl *doc, const TQString &id, ::KURL url) : m_id(id), m_url(url), m_doc(doc) { } @@ -348,7 +348,7 @@ public: // Convert the id to its mangled version. TQString id = "@fragment@" + m_url.prettyURL() + "@" + value; - if(m_idMap.contains(id)) + if(m_idMap.tqcontains(id)) { // This is a local reference to an element within the fragment. // Just convert the href. diff --git a/ksvg/core/KSVGLoader.h b/ksvg/core/KSVGLoader.h index 443d0fb7..28ebda01 100644 --- a/ksvg/core/KSVGLoader.h +++ b/ksvg/core/KSVGLoader.h @@ -52,9 +52,10 @@ typedef struct class SVGImageElementImpl; class SVGElementImpl; class SVGDocumentImpl; -class KSVGLoader : public QObject +class KSVGLoader : public TQObject { Q_OBJECT + TQ_OBJECT public: KSVGLoader(); ~KSVGLoader(); diff --git a/ksvg/core/KSVGReader.cc b/ksvg/core/KSVGReader.cc index e479b9a1..690069ba 100644 --- a/ksvg/core/KSVGReader.cc +++ b/ksvg/core/KSVGReader.cc @@ -84,7 +84,7 @@ private: TQString m_SVGFragmentId; }; -class InputHandler : public QXmlDefaultHandler +class InputHandler : public TQXmlDefaultHandler { public: virtual bool startDocument(); @@ -146,13 +146,13 @@ SVGSVGElementImpl *Helper::nextSVGElement(SVGElementImpl *elem) SVGSVGElementImpl *Helper::nextSVGElement(DOM::Node elem) { DOM::Node foundSVG; - DOM::Node shape = elem.parentNode(); + DOM::Node tqshape = elem.parentNode(); - for(; !shape.isNull(); shape = shape.parentNode()) + for(; !tqshape.isNull(); tqshape = tqshape.parentNode()) { - if(reinterpret_cast<DOM::Element &>(shape).nodeName() == "svg") + if(reinterpret_cast<DOM::Element &>(tqshape).nodeName() == "svg") { - foundSVG = shape; + foundSVG = tqshape; break; } } @@ -245,7 +245,7 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &, SVGLengthImpl *height = SVGSVGElementImpl::createSVGLength(); width->setValueAsString(svg->getAttribute("width").string()); height->setValueAsString(svg->getAttribute("height").string()); - TQString viewbox = TQString("0 0 %1 %2").arg(width->value()).arg(height->value()); + TQString viewbox = TQString("0 0 %1 %2").tqarg(width->value()).tqarg(height->value()); //kdDebug(26001) << "VIEWBOX : " << viewbox.latin1() << endl; svg->setAttribute("viewBox", viewbox); width->deref(); @@ -289,7 +289,7 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &, Helper::self()->doc()->appendChild(*newElement); // Special logics: - if(qName == "switch" || qName == "pattern" || qName == "mask") + if(qName == "switch" || qName == "pattern" || qName == "tqmask") m_noRendering = true; } @@ -300,13 +300,13 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &, if(svg && svg->ownerSVGElement() == 0) { - SVGImageElementImpl *parentImage = Helper::self()->doc()->parentImage(); + SVGImageElementImpl *tqparentImage = Helper::self()->doc()->tqparentImage(); - if(parentImage) + if(tqparentImage) { // We're being displayed in a document via an 'image' element. Set // us up to fit into it's rectangle. - parentImage->setupSVGElement(svg); + tqparentImage->setupSVGElement(svg); } } @@ -316,25 +316,25 @@ bool InputHandler::startElement(const TQString &namespaceURI, const TQString &, { // Set up the cached screenCTM SVGLocatableImpl *locatableParent = 0; - DOM::Node parentNode = newElement->parentNode(); + DOM::Node tqparentNode = newElement->parentNode(); - if(!parentNode.isNull()) + if(!tqparentNode.isNull()) { - SVGElementImpl *parent = Helper::self()->doc()->getElementFromHandle(parentNode.handle()); + SVGElementImpl *tqparent = Helper::self()->doc()->getElementFromHandle(tqparentNode.handle()); - if(parent) - locatableParent = dynamic_cast<SVGLocatableImpl *>(parent); + if(tqparent) + locatableParent = dynamic_cast<SVGLocatableImpl *>(tqparent); } - SVGMatrixImpl *parentMatrix = 0; + SVGMatrixImpl *tqparentMatrix = 0; if(locatableParent) - parentMatrix = locatableParent->getScreenCTM(); + tqparentMatrix = locatableParent->getScreenCTM(); else - parentMatrix = SVGSVGElementImpl::createSVGMatrix(); + tqparentMatrix = SVGSVGElementImpl::createSVGMatrix(); - locatable->updateCachedScreenCTM(parentMatrix); - parentMatrix->deref(); + locatable->updateCachedScreenCTM(tqparentMatrix); + tqparentMatrix->deref(); } m_currentNode = newElement; @@ -349,7 +349,7 @@ bool InputHandler::endElement(const TQString &, const TQString &, const TQString SVGSVGElementImpl *root = Helper::self()->nextSVGElement(*m_currentNode); SVGElementImpl *element = root ? root->ownerDoc()->getElementFromHandle(m_currentNode->handle()) : Helper::self()->doc()->getElementFromHandle(m_currentNode->handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); @@ -386,18 +386,18 @@ bool InputHandler::endElement(const TQString &, const TQString &, const TQString if(haveCanvas && (tests ? tests->ok() : true)) { - if((shape && !shape->isContainer()) || (!shape && element)) + if((tqshape && !tqshape->isContainer()) || (!tqshape && element)) element->createItem(); } } // Special logics: - if(qName == "switch" || qName == "pattern" || qName == "mask") + if(qName == "switch" || qName == "pattern" || qName == "tqmask") { m_noRendering = false; bool ok = tests ? tests->ok() : true; - if(haveCanvas && element && style && ok && style->getDisplay() && style->getVisible() && qName == "pattern" || (shape && shape->directRender())) + if(haveCanvas && element && style && ok && style->getDisplay() && style->getVisible() && qName == "pattern" || (tqshape && tqshape->directRender())) element->createItem(); } @@ -426,10 +426,10 @@ bool InputHandler::fatalError(const TQXmlParseException &e) if(Helper::self()->hasError()) { error = Helper::self()->errorDescription(); - Helper::self()->setErrorDescription(TQString::null); + Helper::self()->setErrorDescription(TQString()); } else - error = TQString("[%1:%2]: FATAL ERROR: %3").arg(e.lineNumber()).arg(e.columnNumber()).arg(e.message()); + error = TQString("[%1:%2]: FATAL ERROR: %3").tqarg(e.lineNumber()).tqarg(e.columnNumber()).tqarg(e.message()); kdDebug(26001) << "InputHandler::fatalError, " << error << endl; diff --git a/ksvg/core/KSVGReader.h b/ksvg/core/KSVGReader.h index 49259d7d..136b145f 100644 --- a/ksvg/core/KSVGReader.h +++ b/ksvg/core/KSVGReader.h @@ -28,9 +28,10 @@ namespace KSVG { class SVGDocumentImpl; -class KSVGReader : public QObject +class KSVGReader : public TQObject { Q_OBJECT + TQ_OBJECT public: struct ParsingArgs { diff --git a/ksvg/data/SVGEcma.lut.h b/ksvg/data/SVGEcma.lut.h index 54909bab..be6a221c 100644 --- a/ksvg/data/SVGEcma.lut.h +++ b/ksvg/data/SVGEcma.lut.h @@ -13,7 +13,7 @@ static const char SVGDOMNodeBridge__s_hashTableStrings[] = { "attributes\0" "childNodes\0" "firstChild\0" - "parentNode\0" + "tqparentNode\0" "lastChild\0" "localName\0" "nodeValue\0" @@ -84,7 +84,7 @@ static const char SVGDOMNodeBridgeProto__s_hashTableStrings[] = { "cloneNode\0" "getPrefix\0" "normalize\0" - "contains\0" + "tqcontains\0" }; diff --git a/ksvg/data/SVGGlyphElementImpl.lut.h b/ksvg/data/SVGGlyphElementImpl.lut.h index b4f54c4e..621bb98d 100644 --- a/ksvg/data/SVGGlyphElementImpl.lut.h +++ b/ksvg/data/SVGGlyphElementImpl.lut.h @@ -13,7 +13,7 @@ static const char SVGGlyphElementImpl__s_hashTableStrings[] = { "orientation\0" "glyph-name\0" "vert-adv-y\0" - "unicode\0" + "tqunicode\0" "lang\0" "d\0" }; diff --git a/ksvg/data/SVGMaskElementImpl.lut.h b/ksvg/data/SVGMaskElementImpl.lut.h index bcc32c39..6d325e81 100644 --- a/ksvg/data/SVGMaskElementImpl.lut.h +++ b/ksvg/data/SVGMaskElementImpl.lut.h @@ -6,8 +6,8 @@ namespace KSVG { static const char SVGMaskElementImpl__s_hashTableStrings[] = { "\0" - "maskContentUnits\0" - "maskUnits\0" + "tqmaskContentUnits\0" + "tqmaskUnits\0" "height\0" "width\0" "x\0" diff --git a/ksvg/data/SVGPathSegImpl.lut.h b/ksvg/data/SVGPathSegImpl.lut.h index 94436a77..1ef4cf85 100644 --- a/ksvg/data/SVGPathSegImpl.lut.h +++ b/ksvg/data/SVGPathSegImpl.lut.h @@ -28,12 +28,12 @@ namespace KSVG { static const char SVGPathSegImplConstructor__s_hashTableStrings[] = { "\0" - "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS\0" - "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL\0" + "PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS\0" + "PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL\0" "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS\0" "PATHSEG_CURVETO_CUBIC_SMOOTH_REL\0" - "PATHSEG_CURVETO_QUADRATIC_ABS\0" - "PATHSEG_CURVETO_QUADRATIC_REL\0" + "PATHSEG_CURVETO_TQUADRATIC_ABS\0" + "PATHSEG_CURVETO_TQUADRATIC_REL\0" "PATHSEG_LINETO_HORIZONTAL_ABS\0" "PATHSEG_LINETO_HORIZONTAL_REL\0" "PATHSEG_LINETO_VERTICAL_ABS\0" @@ -56,7 +56,7 @@ static const struct HashEntry SVGPathSegImplConstructor__s_hashTableEntries[] = { 317, KSVG::PATHSEG_CURVETO_CUBIC_ABS, DontDelete|ReadOnly, 0, -1 }, { 0, 0, 0, 0, -1 }, { 0, 0, 0, 0, -1 }, - { 171, KSVG::PATHSEG_CURVETO_QUADRATIC_REL, DontDelete|ReadOnly, 0, 27 }, + { 171, KSVG::PATHSEG_CURVETO_TQUADRATIC_REL, DontDelete|ReadOnly, 0, 27 }, { 479, KSVG::PATHSEG_ARC_REL, DontDelete|ReadOnly, 0, -1 }, { 495, KSVG::PATHSEG_UNKNOWN, DontDelete|ReadOnly, 0, 23 }, { 369, KSVG::PATHSEG_LINETO_ABS, DontDelete|ReadOnly, 0, -1 }, @@ -73,14 +73,14 @@ static const struct HashEntry SVGPathSegImplConstructor__s_hashTableEntries[] = { 75, KSVG::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, DontDelete|ReadOnly, 0, -1 }, { 231, KSVG::PATHSEG_LINETO_HORIZONTAL_REL, DontDelete|ReadOnly, 0, -1 }, { 388, KSVG::PATHSEG_LINETO_REL, DontDelete|ReadOnly, 0, -1 }, - { 38, KSVG::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, DontDelete|ReadOnly, 0, -1 }, + { 38, KSVG::PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL, DontDelete|ReadOnly, 0, -1 }, { 407, KSVG::PATHSEG_MOVETO_ABS, DontDelete|ReadOnly, 0, -1 }, { 445, KSVG::PATHSEG_CLOSEPATH, DontDelete|ReadOnly, 0, 25 }, - { 141, KSVG::PATHSEG_CURVETO_QUADRATIC_ABS, DontDelete|ReadOnly, 0, 26 }, + { 141, KSVG::PATHSEG_CURVETO_TQUADRATIC_ABS, DontDelete|ReadOnly, 0, 26 }, { 201, KSVG::PATHSEG_LINETO_HORIZONTAL_ABS, DontDelete|ReadOnly, 0, -1 }, { 261, KSVG::PATHSEG_LINETO_VERTICAL_ABS, DontDelete|ReadOnly, 0, -1 }, { 289, KSVG::PATHSEG_LINETO_VERTICAL_REL, DontDelete|ReadOnly, 0, -1 }, - { 1, KSVG::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, DontDelete|ReadOnly, 0, -1 } + { 1, KSVG::PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS, DontDelete|ReadOnly, 0, -1 } }; const struct HashTable SVGPathSegImplConstructor::s_hashTable = { 2, 29, SVGPathSegImplConstructor__s_hashTableEntries, 23, SVGPathSegImplConstructor__s_hashTableStrings}; diff --git a/ksvg/data/SVGStylableImpl.lut.h b/ksvg/data/SVGStylableImpl.lut.h index f6e0570f..5e4f6520 100644 --- a/ksvg/data/SVGStylableImpl.lut.h +++ b/ksvg/data/SVGStylableImpl.lut.h @@ -23,7 +23,7 @@ static const char SVGStylableImpl__s_hashTableStrings[] = { "fill-opacity\0" "marker-start\0" "stroke-width\0" - "unicode-bidi\0" + "tqunicode-bidi\0" "word-spacing\0" "writing-mode\0" "font-family\0" @@ -47,7 +47,7 @@ static const char SVGStylableImpl__s_hashTableStrings[] = { "stroke\0" "clip\0" "fill\0" - "mask\0" + "tqmask\0" }; diff --git a/ksvg/dom/SVGCircleElement.h b/ksvg/dom/SVGCircleElement.h index 65406a1c..d621ce8b 100644 --- a/ksvg/dom/SVGCircleElement.h +++ b/ksvg/dom/SVGCircleElement.h @@ -51,7 +51,7 @@ class SVGAnimatedLength; * point and radius. * * For more info look here : <a href = - * "http://www.w3.org/TR/SVG/shapes.html#CircleElement">9.3 The + * "http://www.w3.org/TR/SVG/tqshapes.html#CircleElement">9.3 The * 'circle' element</a>. */ class SVGCircleElement : public SVGElement, diff --git a/ksvg/dom/SVGElementInstance.cc b/ksvg/dom/SVGElementInstance.cc index 9bc027c0..95b24964 100644 --- a/ksvg/dom/SVGElementInstance.cc +++ b/ksvg/dom/SVGElementInstance.cc @@ -78,10 +78,10 @@ SVGUseElement SVGElementInstance::correspondingUseElement() const return SVGUseElement(impl->correspondingUseElement()); } -SVGElementInstance SVGElementInstance::parentNode() const +SVGElementInstance SVGElementInstance::tqparentNode() const { if(!impl) return SVGElementInstance(0); - return SVGElementInstance(impl->parentNode()); + return SVGElementInstance(impl->tqparentNode()); } SVGElementInstanceList SVGElementInstance::childNodes() const diff --git a/ksvg/dom/SVGElementInstance.h b/ksvg/dom/SVGElementInstance.h index 51d81831..97335b32 100644 --- a/ksvg/dom/SVGElementInstance.h +++ b/ksvg/dom/SVGElementInstance.h @@ -39,7 +39,7 @@ public: SVGElement correspondingElement() const; SVGUseElement correspondingUseElement() const; - SVGElementInstance parentNode() const; + SVGElementInstance tqparentNode() const; SVGElementInstanceList childNodes() const; SVGElementInstance firstChild() const; SVGElementInstance lastChild() const; diff --git a/ksvg/dom/SVGEllipseElement.h b/ksvg/dom/SVGEllipseElement.h index 78399779..07d86504 100644 --- a/ksvg/dom/SVGEllipseElement.h +++ b/ksvg/dom/SVGEllipseElement.h @@ -52,7 +52,7 @@ class SVGEllipseElementImpl; * center point and two radii. * * For more info look here : <a href = - * "http://www.w3.org/TR/SVG/shapes.html#EllipseElement">9.4 The + * "http://www.w3.org/TR/SVG/tqshapes.html#EllipseElement">9.4 The * 'ellipse' element</a>. */ class SVGEllipseElement : public SVGElement, diff --git a/ksvg/dom/SVGLength.cc b/ksvg/dom/SVGLength.cc index bb2db73f..6ae3f55f 100644 --- a/ksvg/dom/SVGLength.cc +++ b/ksvg/dom/SVGLength.cc @@ -77,7 +77,7 @@ void SVGLength::setValue(float value) { impl->setValue(value); - // Automatic updating of the shape if any value is changed, imagine: + // Automatic updating of the tqshape if any value is changed, imagine: // SVGCircleElement c; [...] c.r().baseVal().setValue(150); if(impl->context() && dynamic_cast<SVGShapeImpl *>(impl->context())) dynamic_cast<SVGShapeImpl *>(impl->context())->update(UPDATE_TRANSFORM, 0, 0); diff --git a/ksvg/dom/SVGLineElement.h b/ksvg/dom/SVGLineElement.h index b08a78ba..0bd2e58f 100644 --- a/ksvg/dom/SVGLineElement.h +++ b/ksvg/dom/SVGLineElement.h @@ -51,7 +51,7 @@ class SVGLineElementImpl; * one point and ends at another. * * For more info look here : <a href = - * "http://www.w3.org/TR/SVG/shapes.html#CircleElement">9.5 The + * "http://www.w3.org/TR/SVG/tqshapes.html#CircleElement">9.5 The * 'line' element</a>. */ class SVGLineElement : public SVGElement, diff --git a/ksvg/dom/SVGLocatable.h b/ksvg/dom/SVGLocatable.h index ecb93adc..fafe5204 100644 --- a/ksvg/dom/SVGLocatable.h +++ b/ksvg/dom/SVGLocatable.h @@ -66,7 +66,7 @@ public: /** * Returns the tight bounding box in current user space (i.e., after application of - * the <code>transform</code> attribute, if any) on the geometry of all contained graphics + * the <code>transform</code> attribute, if any) on the tqgeometry of all contained graphics * elements, exclusive of stroke-width and filter effects). * * @return An SVGRect object that defines the bounding box. @@ -84,7 +84,7 @@ public: /** * Returns the transformation matrix from current user units (i.e., after application of - * the <code>transform</code> attribute, if any) to the parent user agent's notice of a "pixel". + * the <code>transform</code> attribute, if any) to the tqparent user agent's notice of a "pixel". * For display devices, ideally this represents a physical screen pixel. For other devices or * environments where physical pixel sizes are not known, then an algorithm similar to the * CSS2 definition of a "pixel" can be used instead. diff --git a/ksvg/dom/SVGMaskElement.cc b/ksvg/dom/SVGMaskElement.cc index c4513adc..0ec23f0a 100644 --- a/ksvg/dom/SVGMaskElement.cc +++ b/ksvg/dom/SVGMaskElement.cc @@ -70,16 +70,16 @@ SVGMaskElement::~SVGMaskElement() impl->deref(); } -SVGAnimatedEnumeration SVGMaskElement::maskUnits() const +SVGAnimatedEnumeration SVGMaskElement::tqmaskUnits() const { if(!impl) return SVGAnimatedEnumeration(0); - return SVGAnimatedEnumeration(impl->maskUnits()); + return SVGAnimatedEnumeration(impl->tqmaskUnits()); } -SVGAnimatedEnumeration SVGMaskElement::maskContentUnits() const +SVGAnimatedEnumeration SVGMaskElement::tqmaskContentUnits() const { if(!impl) return SVGAnimatedEnumeration(0); - return SVGAnimatedEnumeration(impl->maskContentUnits()); + return SVGAnimatedEnumeration(impl->tqmaskContentUnits()); } SVGAnimatedLength SVGMaskElement::x() const diff --git a/ksvg/dom/SVGMaskElement.h b/ksvg/dom/SVGMaskElement.h index 6a8e26a4..a93958a7 100644 --- a/ksvg/dom/SVGMaskElement.h +++ b/ksvg/dom/SVGMaskElement.h @@ -48,8 +48,8 @@ public: SVGMaskElement(SVGMaskElementImpl *other); virtual ~SVGMaskElement(); - SVGAnimatedEnumeration maskUnits() const; - SVGAnimatedEnumeration maskContentUnits() const; + SVGAnimatedEnumeration tqmaskUnits() const; + SVGAnimatedEnumeration tqmaskContentUnits() const; SVGAnimatedLength x() const; SVGAnimatedLength y() const; SVGAnimatedLength width() const; diff --git a/ksvg/dom/SVGPathSeg.h b/ksvg/dom/SVGPathSeg.h index f82e3c80..0120276b 100644 --- a/ksvg/dom/SVGPathSeg.h +++ b/ksvg/dom/SVGPathSeg.h @@ -35,8 +35,8 @@ enum PATHSEG_LINETO_REL = 5, PATHSEG_CURVETO_CUBIC_ABS = 6, PATHSEG_CURVETO_CUBIC_REL = 7, - PATHSEG_CURVETO_QUADRATIC_ABS = 8, - PATHSEG_CURVETO_QUADRATIC_REL = 9, + PATHSEG_CURVETO_TQUADRATIC_ABS = 8, + PATHSEG_CURVETO_TQUADRATIC_REL = 9, PATHSEG_ARC_ABS = 10, PATHSEG_ARC_REL = 11, PATHSEG_LINETO_HORIZONTAL_ABS = 12, @@ -45,8 +45,8 @@ enum PATHSEG_LINETO_VERTICAL_REL = 15, PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16, PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17, - PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18, - PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19 + PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS = 18, + PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL = 19 }; class SVGPathSegImpl; diff --git a/ksvg/dom/SVGPolygonElement.h b/ksvg/dom/SVGPolygonElement.h index 526e9815..4ad16863 100644 --- a/ksvg/dom/SVGPolygonElement.h +++ b/ksvg/dom/SVGPolygonElement.h @@ -48,11 +48,11 @@ class SVGPointList; class SVGPolygonElementImpl; /** - * The <code>polygon</code> element defines a closed shape consisting + * The <code>polygon</code> element defines a closed tqshape consisting * of connected straight line segments. * * For more info look here : <a href = - * "http://www.w3.org/TR/SVG/shapes.html#PolylineElement">9.7 The + * "http://www.w3.org/TR/SVG/tqshapes.html#PolylineElement">9.7 The * 'polygon' element</a>. */ class SVGPolygonElement : public SVGElement, @@ -81,7 +81,7 @@ public: /** * Provides access to the current animated contents of the points * attribute. - * If the given attribute or property is being animated, contains + * If the given attribute or property is being animated, tqcontains * the current animated value of the attribute or property. * If the given attribute or property is not currently being * animated, contains the same value as <code>points</code>'. diff --git a/ksvg/dom/SVGPolylineElement.h b/ksvg/dom/SVGPolylineElement.h index 35e948f7..2ab617fc 100644 --- a/ksvg/dom/SVGPolylineElement.h +++ b/ksvg/dom/SVGPolylineElement.h @@ -47,10 +47,10 @@ namespace KSVG /** * The <code>polyline</code> element defines a set of connected * straight line segments. Typically, <code>polyline</code> elements - * define open shapes. + * define open tqshapes. * * For more info look here : <a href = - * "http://www.w3.org/TR/SVG/shapes.html#PolylineElement">9.6 The + * "http://www.w3.org/TR/SVG/tqshapes.html#PolylineElement">9.6 The * 'polyline' element</a>. */ class SVGPointList; @@ -81,7 +81,7 @@ public: /** * Provides access to the current animated contents of the points * attribute. - * If the given attribute or property is being animated, contains + * If the given attribute or property is being animated, tqcontains * the current animated value of the attribute or property. * If the given attribute or property is not currently being * animated, contains the same value as <code>points</code>'. diff --git a/ksvg/dom/SVGRectElement.h b/ksvg/dom/SVGRectElement.h index 2a77420d..2c33b045 100644 --- a/ksvg/dom/SVGRectElement.h +++ b/ksvg/dom/SVGRectElement.h @@ -55,7 +55,7 @@ class SVGRectElementImpl; * for attributes <code> x </code> and <code> y</code>. * * For more info look here : <a href = - * "http://www.w3.org/TR/SVG/shapes.html#RectElement"> 9.2 The + * "http://www.w3.org/TR/SVG/tqshapes.html#RectElement"> 9.2 The * 'rect' element</a>. */ class SVGRectElement : public SVGElement, @@ -130,7 +130,7 @@ public: * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing"> Error * processing</a>). * - * See <a href="http://www.w3.org/TR/SVG/shapes.html#RectElement"> + * See <a href="http://www.w3.org/TR/SVG/tqshapes.html#RectElement"> * 9.2 The 'rect' element </a> for info about what happens if the * attribute is not specified. * @@ -148,7 +148,7 @@ public: * "http://www.w3.org/TR/SVG/implnote.html#ErrorProcessing">Error * processing</a>). * - * See <a href="http://www.w3.org/TR/SVG/shapes.html#RectElement"> + * See <a href="http://www.w3.org/TR/SVG/tqshapes.html#RectElement"> * 9.2 The 'rect' element </a> for info about what happens if the * attribute is not specified. * diff --git a/ksvg/dom/SVGSVGElement.h b/ksvg/dom/SVGSVGElement.h index 59621e2e..9380f992 100644 --- a/ksvg/dom/SVGSVGElement.h +++ b/ksvg/dom/SVGSVGElement.h @@ -56,7 +56,7 @@ class SVGSVGElementImpl; /** * A key interface definition is the SVGSVGElement interface, which is the - * interface that corresponds to the 'svg' element. This interface contains + * interface that corresponds to the 'svg' element. This interface tqcontains * various miscellaneous commonly-used utility methods, such as matrix * operations and the ability to control the time of redraw on visual * rendering devices. SVGSVGElement extends ViewCSS and DocumentCSS to provide @@ -185,13 +185,13 @@ public: * corresponds to this 'svg' element. When the user agent is actually * rendering the content, then the position and size values represent the * actual values when rendering. The position and size values are unitless - * values in the coordinate system of the parent element. If no parent element + * values in the coordinate system of the tqparent element. If no tqparent element * exists (i.e., 'svg' element represents the root of the document tree), if * this SVG document is embedded as part of another document (e.g., via the * HTML 'object' element), then the position and size are unitless values in - * the coordinate system of the parent document. (If the parent uses CSS or - * XSL layout, then unitless values represent pixel units for the current CSS - * or XSL viewport, as described in the CSS2 specification.) If the parent + * the coordinate system of the tqparent document. (If the tqparent uses CSS or + * XSL tqlayout, then unitless values represent pixel units for the current CSS + * or XSL viewport, as described in the CSS2 specification.) If the tqparent * element does not have a coordinate system, then the user agent should * provide reasonable default values for this attribute. * diff --git a/ksvg/dom/SVGTextElement.h b/ksvg/dom/SVGTextElement.h index 0bf459fe..111d2929 100644 --- a/ksvg/dom/SVGTextElement.h +++ b/ksvg/dom/SVGTextElement.h @@ -57,11 +57,11 @@ class SVGTextElementImpl; * specification and painting attributes which describe how exactly to render * the characters. Since <code>text</code> elements are rendered using the * same rendering methods as other graphics elements, all of the same - * coordinate system transformations, painting, clipping and masking - * features that apply to shapes such as paths and rectangles also + * coordinate system transformations, painting, clipping and tqmasking + * features that apply to tqshapes such as paths and rectangles also * apply to <code>text</code> elements. * - * It is possible to apply a gradient, pattern, clipping path, mask or + * It is possible to apply a gradient, pattern, clipping path, tqmask or * filter to text.When one of these facilities is applied to text and * keyword objectBoundingBox is used to specify a graphical effect * relative to the "object bounding box", then the object bounding box diff --git a/ksvg/ecma/ksvg_ecma.cpp b/ksvg/ecma/ksvg_ecma.cpp index a42d69ad..2cb17dcd 100644 --- a/ksvg/ecma/ksvg_ecma.cpp +++ b/ksvg/ecma/ksvg_ecma.cpp @@ -38,18 +38,18 @@ using namespace KSVG; using namespace KJS; -class AsyncStatus : public ObjectImp +class AsynctqStatus : public ObjectImp { public: - AsyncStatus() : ObjectImp() { } + AsynctqStatus() : ObjectImp() { } virtual bool implementsCall() const { return true; } virtual Value call(ExecState *exec, Object &thisObj, const List &args); }; -Value AsyncStatus::call(ExecState *exec, Object &, const List &args) +Value AsynctqStatus::call(ExecState *exec, Object &, const List &args) { - kdDebug(26004) << "[AsyncStatus] " << args[0].toString(exec).ascii() << endl; + kdDebug(26004) << "[AsynctqStatus] " << args[0].toString(exec).ascii() << endl; if(args[0].toString(exec) == "success") return Number(1); @@ -163,7 +163,7 @@ TQString KSVGEcma::valueOfEventListener(SVGEventListener *listener) const { KSVGEcmaEventListener *event = static_cast<KSVGEcmaEventListener *>(listener); if(!event) - return TQString::null; + return TQString(); return event->type(); } @@ -175,7 +175,7 @@ void KSVGEcma::addEventListener(KSVGEcmaEventListener *listener) void KSVGEcma::removeEventListener(KSVGEcmaEventListener *listener) { - m_ecmaEventListeners.take(m_ecmaEventListeners.find(listener)); + m_ecmaEventListeners.take(m_ecmaEventListeners.tqfind(listener)); if(m_ecmaEventListeners.count() == 0) m_hasListeners = false; @@ -194,7 +194,7 @@ void KSVGEcma::finishedWithEvent(SVGEventImpl *event) Value KSVGEcma::getUrl(ExecState *exec, ::KURL url) { - Object *status = new Object(new AsyncStatus()); + Object *status = new Object(new AsynctqStatus()); // FIXME: Security issue, allows local testing of getURL(), REMOVE BEFORE RELEASE! (Niko) TQString svgDocument = KSVGLoader::getUrl(url, true); @@ -214,7 +214,7 @@ Value KSVGEcma::getUrl(ExecState *exec, ::KURL url) void KSVGEcma::postUrl(ExecState *exec, ::KURL url, const TQString &data, const TQString &mimeType, const TQString &contentEncoding, Object &callBackFunction) { - Object *status = new Object(new AsyncStatus()); + Object *status = new Object(new AsynctqStatus()); status->put(exec, Identifier("content"), String("")); status->put(exec, Identifier("success"), Boolean(false)); @@ -224,7 +224,7 @@ void KSVGEcma::postUrl(ExecState *exec, ::KURL url, const TQString &data, const // Support gzip compression if(contentEncoding == "gzip" || contentEncoding == "deflate") - byteArray = qCompress(byteArray); + byteArray = tqCompress(byteArray); KSVGLoader *loader = new KSVGLoader(); loader->postUrl(url, byteArray, mimeType, exec, callBackFunction, *status); diff --git a/ksvg/ecma/ksvg_helper.cpp b/ksvg/ecma/ksvg_helper.cpp index 24f05101..1d41733e 100644 --- a/ksvg/ecma/ksvg_helper.cpp +++ b/ksvg/ecma/ksvg_helper.cpp @@ -33,7 +33,7 @@ KJS::UString::UString(const DOM::DOMString &d) unsigned int len = d.length(); KJS::UChar *dat = new UChar[len]; - memcpy(dat, d.unicode(), len * sizeof(UChar)); + memcpy(dat, d.tqunicode(), len * sizeof(UChar)); rep = KJS::UString::Rep::create(dat, len); } @@ -41,7 +41,7 @@ KJS::UString::UString(const TQString &d) { unsigned int len = d.length(); KJS::UChar *dat = new UChar[len]; - memcpy(dat, d.unicode(), len * sizeof(UChar)); + memcpy(dat, d.tqunicode(), len * sizeof(UChar)); rep = KJS::UString::Rep::create(dat, len); } diff --git a/ksvg/ecma/ksvg_lookup.h b/ksvg/ecma/ksvg_lookup.h index 11c41462..659ce8c7 100644 --- a/ksvg/ecma/ksvg_lookup.h +++ b/ksvg/ecma/ksvg_lookup.h @@ -31,13 +31,13 @@ #define KSVG_GET_COMMON \ public: \ \ - /* The standard hasProperty call, auto-generated. Looks in hashtable, forwards to parents. */ \ + /* The standard hasProperty call, auto-generated. Looks in hashtable, forwards to tqparents. */ \ bool hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const; \ \ /* get() method, called by KSVGBridge::get */ \ KJS::Value get(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::ObjectImp* bridge) const; \ \ - /* Called by lookupGet(). Auto-generated. Forwards to the parent which has the given property. */ \ + /* Called by lookupGet(). Auto-generated. Forwards to the tqparent which has the given property. */ \ KJS::Value getInParents(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::ObjectImp* bridge) const; \ \ KJS::Object prototype(KJS::ExecState *exec) const;\ @@ -59,7 +59,7 @@ public: \ KSVG_GET_COMMON \ virtual KJS::Value cache(KJS::ExecState *exec) const; -// For classes without properties, but with a parent class to forward to +// For classes without properties, but with a tqparent class to forward to #define KSVG_FORWARDGET \ public: \ \ @@ -80,7 +80,7 @@ public: \ /* put() method, called by KSVGBridge::put */ \ bool put(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr); \ \ - /* Called by lookupPut. Auto-generated. Looks in hashtable, forwards to parents. */ \ + /* Called by lookupPut. Auto-generated. Looks in hashtable, forwards to tqparents. */ \ bool putInParents(KJS::ExecState *exec, const KJS::Identifier &propertyName, const KJS::Value &value, int attr); // For classes which inherit a read-write class, but have no readwrite property themselves @@ -127,7 +127,7 @@ namespace KSVG * * This method does it all (looking in the hashtable, checking for function * overrides, creating the function or retrieving from cache, calling - * getValueProperty in case of a non-function property, forwarding to parent[s] if + * getValueProperty in case of a non-function property, forwarding to tqparent[s] if * unknown property). * * Template arguments: @@ -150,7 +150,7 @@ namespace KSVG { const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName); - if(!entry) // not found, forward to parents + if(!entry) // not found, forward to tqparents return thisObj->getInParents(exec, propertyName, bridge); if(entry->attr & KJS::Function) @@ -174,7 +174,7 @@ namespace KSVG { const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName); - if(!entry) // not found, forward to parents + if(!entry) // not found, forward to tqparents return thisObj->getInParents(exec, propertyName, bridge); if(entry->attr & KJS::Function) @@ -199,7 +199,7 @@ namespace KSVG { const KJS::HashEntry *entry = KJS::Lookup::findEntry(table, propertyName); - if(!entry) // not found, forward to parents + if(!entry) // not found, forward to tqparents return thisObj->putInParents(exec, propertyName, value, attr); else if(entry->attr & KJS::Function) // Function: put as override property return false; @@ -256,14 +256,14 @@ namespace KSVG } \ const KJS::ClassInfo ClassProto::info = { ClassName, 0, &s_hashTable, 0 }; \ -// same as KSVG_IMPLEMENT_PROTOTYPE but with a parent class to forward calls to +// same as KSVG_IMPLEMENT_PROTOTYPE but with a tqparent class to forward calls to // Not used within KSVG up to now - each class does a self proto lookup in generateddata.cpp #define KSVG_IMPLEMENT_PROTOTYPE_WITH_PARENT(ClassName,ClassProto,ClassFunc,ParentProto) \ KJS::Value KSVG::ClassProto::get(KJS::ExecState *exec, const KJS::Identifier &propertyName) const \ { \ KJS::Value val = lookupGetFunction<ClassFunc,KJS::ObjectImp>(exec, propertyName, &s_hashTable, this ); \ if ( val.type() != UndefinedType ) return val; \ - /* Not found -> forward request to "parent" prototype */ \ + /* Not found -> forward request to "tqparent" prototype */ \ return ParentProto::self(exec).get( exec, propertyName ); \ } \ bool KSVG::ClassProto::hasProperty(KJS::ExecState *exec, const KJS::Identifier &propertyName) const \ @@ -310,7 +310,7 @@ namespace KSVG // To be used in all call() implementations! // Can't use if (!thisObj.inherits(&ClassName::s_classInfo) since we don't -// use the (single-parent) inheritance of ClassInfo... +// use the (single-tqparent) inheritance of ClassInfo... #define KSVG_CHECK_THIS(ClassName) KSVG_CHECK(ClassName, thisObj) #endif diff --git a/ksvg/ecma/ksvg_window.cpp b/ksvg/ecma/ksvg_window.cpp index 80a4ee14..7137bfbd 100644 --- a/ksvg/ecma/ksvg_window.cpp +++ b/ksvg/ecma/ksvg_window.cpp @@ -108,7 +108,7 @@ const ClassInfo KSVG::Window::s_classInfo = { "Window", 0, &s_hashTable, 0 }; KSVG::Window::Window(KSVG::SVGDocumentImpl *p) : ObjectImp(), m_doc(p) { - winq = new WindowQObject(this); + winq = new WindowTQObject(this); } KSVG::Window::~Window() @@ -278,7 +278,7 @@ void KSVG::Window::clear(ExecState *exec) { kdDebug(26004) << "KSVG::Window::clear " << this << endl; delete winq; - winq = new WindowQObject(this);; + winq = new WindowTQObject(this);; // Get rid of everything, those user vars could hold references to DOM nodes deleteAllProperties(exec); @@ -330,11 +330,11 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args) case KSVG::Window::_GetURL: { KURL url((const_cast<Window *>(window))->doc()->baseUrl(), args[0].toString(exec).qstring()); - Value asyncStatus = (const_cast<Window *>(window))->doc()->ecmaEngine()->getUrl(exec, url); + Value asynctqStatus = (const_cast<Window *>(window))->doc()->ecmaEngine()->getUrl(exec, url); Object callBackFunction = Object::dynamicCast(args[1]); List callBackArgs; - callBackArgs.append(asyncStatus); + callBackArgs.append(asynctqStatus); callBackFunction.call(exec, callBackFunction, callBackArgs); return Undefined(); @@ -392,7 +392,7 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args) else str2 = KInputDialog::getText(i18n("Prompt"), TQStyleSheet::convertFromPlainText(str), - TQString::null, &ok); + TQString(), &ok); if ( ok ) return String(str2); else @@ -488,18 +488,18 @@ void ScheduledAction::execute(Window *window) } } -////////////////////// WindowQObject //////////////////////// +////////////////////// WindowTQObject //////////////////////// -WindowQObject::WindowQObject(Window *w) : parent(w) +WindowTQObject::WindowTQObject(Window *w) : tqparent(w) { } -WindowQObject::~WindowQObject() +WindowTQObject::~WindowTQObject() { - parentDestroyed(); // reuse same code + tqparentDestroyed(); // reuse same code } -void WindowQObject::parentDestroyed() +void WindowTQObject::tqparentDestroyed() { killTimers(); @@ -513,7 +513,7 @@ void WindowQObject::parentDestroyed() scheduledActions.clear(); } -int WindowQObject::installTimeout(const UString &handler, int t, bool singleShot) +int WindowTQObject::installTimeout(const UString &handler, int t, bool singleShot) { int id = startTimer(t); ScheduledAction *action = new ScheduledAction(handler.qstring(), singleShot); @@ -521,7 +521,7 @@ int WindowQObject::installTimeout(const UString &handler, int t, bool singleShot return id; } -int WindowQObject::installTimeout(const Value &func, List args, int t, bool singleShot) +int WindowTQObject::installTimeout(const Value &func, List args, int t, bool singleShot) { Object objFunc = Object::dynamicCast(func); int id = startTimer(t); @@ -529,13 +529,13 @@ int WindowQObject::installTimeout(const Value &func, List args, int t, bool sing return id; } -void WindowQObject::clearTimeout(int timerId, bool delAction) +void WindowTQObject::clearTimeout(int timerId, bool delAction) { killTimer(timerId); if(delAction) { - TQMapIterator<int, ScheduledAction *> it = scheduledActions.find(timerId); + TQMapIterator<int, ScheduledAction *> it = scheduledActions.tqfind(timerId); if(it != scheduledActions.end()) { ScheduledAction *action = *it; @@ -545,9 +545,9 @@ void WindowQObject::clearTimeout(int timerId, bool delAction) } } -void WindowQObject::timerEvent(TQTimerEvent *e) +void WindowTQObject::timerEvent(TQTimerEvent *e) { - TQMapIterator<int, ScheduledAction *> it = scheduledActions.find(e->timerId()); + TQMapIterator<int, ScheduledAction *> it = scheduledActions.tqfind(e->timerId()); if(it != scheduledActions.end()) { ScheduledAction *action = *it; @@ -560,8 +560,8 @@ void WindowQObject::timerEvent(TQTimerEvent *e) scheduledActions.remove(it); } - if(parent->doc()) - action->execute(parent); + if(tqparent->doc()) + action->execute(tqparent); // It is important to test singleShot and not action->singleShot here - the // action could have been deleted already if not single shot and if the @@ -570,9 +570,9 @@ void WindowQObject::timerEvent(TQTimerEvent *e) delete action; } else - kdWarning(6070) << "WindowQObject::timerEvent this=" << this << " timer " << e->timerId() << " not found (" << scheduledActions.count() << " actions in map)" << endl; + kdWarning(6070) << "WindowTQObject::timerEvent this=" << this << " timer " << e->timerId() << " not found (" << scheduledActions.count() << " actions in map)" << endl; } -void WindowQObject::timeoutClose() +void WindowTQObject::timeoutClose() { } diff --git a/ksvg/ecma/ksvg_window.h b/ksvg/ecma/ksvg_window.h index db6ac9a3..6f1e511a 100644 --- a/ksvg/ecma/ksvg_window.h +++ b/ksvg/ecma/ksvg_window.h @@ -25,14 +25,14 @@ namespace KSVG { class SVGDocumentImpl; -class WindowQObject; +class WindowTQObject; // This is currently a fork of khtml's Window object, simplified. // However in the long run it could become a base class for it. // Author: David Faure <faure@kde.org> class Window : public KJS::ObjectImp { friend class WindowFunc; - friend class WindowQObject; + friend class WindowTQObject; friend class ScheduledAction; public: Window(KSVG::SVGDocumentImpl *p); @@ -81,7 +81,7 @@ public: static const struct KJS::HashTable s_hashTable; private: - WindowQObject *winq; + WindowTQObject *winq; TQGuardedPtr<KSVG::SVGDocumentImpl> m_doc; }; @@ -98,22 +98,23 @@ public: bool singleShot; }; -class WindowQObject : public TQObject { +class WindowTQObject : public TQObject { Q_OBJECT + TQ_OBJECT public: - WindowQObject(Window *w); - ~WindowQObject(); + WindowTQObject(Window *w); + ~WindowTQObject(); int installTimeout(const KJS::UString &handler, int t, bool singleShot); int installTimeout(const KJS::Value &func, KJS::List args, int t, bool singleShot); void clearTimeout(int timerId, bool delAction = true); public slots: void timeoutClose(); protected slots: - void parentDestroyed(); + void tqparentDestroyed(); protected: void timerEvent(TQTimerEvent *e); private: - Window *parent; + Window *tqparent; //KHTMLPart *part; // not guarded, may be dangling TQMap<int, ScheduledAction*> scheduledActions; }; diff --git a/ksvg/impl/LRUCache.h b/ksvg/impl/LRUCache.h index f9045262..ef51e1d8 100644 --- a/ksvg/impl/LRUCache.h +++ b/ksvg/impl/LRUCache.h @@ -36,7 +36,7 @@ public: virtual ~MinOneLRUCache() {} void insert(const keyType& key, const valueType& value, int cost); - bool find(const keyType& key, valueType& result); + bool tqfind(const keyType& key, valueType& result); void setMaxTotalCost(int maxTotalCost); int maxTotalCost() const { return m_maxTotalCost; } @@ -63,7 +63,7 @@ protected: typedef TQValueList<CacheItem> CacheItemList; - typename CacheItemList::iterator find(const keyType& key); + typename CacheItemList::iterator tqfind(const keyType& key); void enforceCostConstraint(); CacheItemList m_items; @@ -74,7 +74,7 @@ protected: template<class keyType, class valueType> void MinOneLRUCache<keyType, valueType>::insert(const keyType& key, const valueType& value, int cost) { - typename CacheItemList::iterator it = find(key); + typename CacheItemList::iterator it = tqfind(key); if(it != m_items.end()) { @@ -91,10 +91,10 @@ void MinOneLRUCache<keyType, valueType>::insert(const keyType& key, const valueT } template<class keyType, class valueType> -bool MinOneLRUCache<keyType, valueType>::find(const keyType& key, valueType& result) +bool MinOneLRUCache<keyType, valueType>::tqfind(const keyType& key, valueType& result) { bool foundKey = false; - typename CacheItemList::iterator it = find(key); + typename CacheItemList::iterator it = tqfind(key); if(it != m_items.end()) { @@ -115,7 +115,7 @@ bool MinOneLRUCache<keyType, valueType>::find(const keyType& key, valueType& res } template<class keyType, class valueType> -typename MinOneLRUCache<keyType, valueType>::CacheItemList::iterator MinOneLRUCache<keyType, valueType>::find(const keyType& key) +typename MinOneLRUCache<keyType, valueType>::CacheItemList::iterator MinOneLRUCache<keyType, valueType>::tqfind(const keyType& key) { typename CacheItemList::iterator it; diff --git a/ksvg/impl/SVGAnimateElementImpl.cc b/ksvg/impl/SVGAnimateElementImpl.cc index ccf8565d..471d27bb 100644 --- a/ksvg/impl/SVGAnimateElementImpl.cc +++ b/ksvg/impl/SVGAnimateElementImpl.cc @@ -127,7 +127,7 @@ void SVGAnimateElementImpl::handleTimerEvent() { /* m_from += m_addStep; - if(m_additive == "replace" && needCombine) + if(m_additive == "tqreplace" && needCombine) needCombine = false; applyAttribute(m_attributeName, TQString::number(m_from), needCombine); diff --git a/ksvg/impl/SVGAnimateMotionElementImpl.cc b/ksvg/impl/SVGAnimateMotionElementImpl.cc index fe816769..9be742c0 100644 --- a/ksvg/impl/SVGAnimateMotionElementImpl.cc +++ b/ksvg/impl/SVGAnimateMotionElementImpl.cc @@ -64,7 +64,7 @@ void SVGAnimateMotionElementImpl::setAttributes() /* if(!m_pathArray) { bool temp; - m_pathArray = m_path->preparePath(&temp, p->worldMatrix()); + m_pathArray = m_path->preparePath(&temp, p->tqworldMatrix()); }*/ //} diff --git a/ksvg/impl/SVGAnimateTransformElementImpl.cc b/ksvg/impl/SVGAnimateTransformElementImpl.cc index cf3922f8..a3384c9d 100644 --- a/ksvg/impl/SVGAnimateTransformElementImpl.cc +++ b/ksvg/impl/SVGAnimateTransformElementImpl.cc @@ -129,7 +129,7 @@ void SVGAnimateTransformElementImpl::setAttributes() { TQString test = _values.string(); - if(test.contains(";")) + if(test.tqcontains(";")) { SVGLengthImpl *temp = SVGSVGElementImpl::createSVGLength(); @@ -201,7 +201,7 @@ void SVGAnimateTransformElementImpl::handleTimerEvent(bool) if(!m_lastTransform.isEmpty()) { - int pos = trans.find(m_lastTransform); + int pos = trans.tqfind(m_lastTransform); TQString extract; extract += trans.mid(0, pos); diff --git a/ksvg/impl/SVGAnimatedPointsImpl.cc b/ksvg/impl/SVGAnimatedPointsImpl.cc index 07db7d3b..d3eb426d 100644 --- a/ksvg/impl/SVGAnimatedPointsImpl.cc +++ b/ksvg/impl/SVGAnimatedPointsImpl.cc @@ -69,12 +69,12 @@ void SVGAnimatedPointsImpl::parsePoints(TQString _points, SVGPointListImpl *poin _points = _points.simplifyWhiteSpace(); - if(_points.contains(",,") || _points.contains(", ,")) + if(_points.tqcontains(",,") || _points.tqcontains(", ,")) return; - _points.replace(',', ' '); - _points.replace('\r', TQString::null); - _points.replace('\n', TQString::null); + _points.tqreplace(',', ' '); + _points.tqreplace('\r', TQString()); + _points.tqreplace('\n', TQString()); _points = _points.simplifyWhiteSpace(); diff --git a/ksvg/impl/SVGAnimationElementImpl.cc b/ksvg/impl/SVGAnimationElementImpl.cc index 45c4af2b..3fd29d1e 100644 --- a/ksvg/impl/SVGAnimationElementImpl.cc +++ b/ksvg/impl/SVGAnimationElementImpl.cc @@ -68,7 +68,7 @@ SVGElementImpl *SVGAnimationElementImpl::targetElement() const if(!m_href.isEmpty()) modify->setTargetElement(ownerDoc()->getElementByIdRecursive(ownerSVGElement(), SVGURIReferenceImpl::getTarget(m_href))); else if(!parentNode().isNull()) - modify->setTargetElement(ownerDoc()->getElementFromHandle(parentNode().handle())); + modify->setTargetElement(ownerDoc()->getElementFromHandle(parentNode().handle())); } return m_targetElement; @@ -84,8 +84,8 @@ double SVGAnimationElementImpl::parseClockValue(const TQString &data) const double result; - int doublePointOne = parse.find(':'); - int doublePointTwo = parse.find(':', doublePointOne + 1); + int doublePointOne = parse.tqfind(':'); + int doublePointTwo = parse.tqfind(':', doublePointOne + 1); if(doublePointOne != -1 && doublePointTwo != -1) // Spec: "Full clock values" { @@ -96,7 +96,7 @@ double SVGAnimationElementImpl::parseClockValue(const TQString &data) const result = (3600 * hours) + (60 * minutes) + seconds; - if(parse.find('.') != -1) + if(parse.tqfind('.') != -1) { TQString temp = parse.mid(9, 2); milliseconds = temp.toUInt(); @@ -111,7 +111,7 @@ double SVGAnimationElementImpl::parseClockValue(const TQString &data) const result = (60 * minutes) + seconds; - if(parse.find('.') != -1) + if(parse.tqfind('.') != -1) { TQString temp = parse.mid(6, 2); milliseconds = temp.toUInt(); @@ -120,7 +120,7 @@ double SVGAnimationElementImpl::parseClockValue(const TQString &data) const } else // Spec: "Timecount values" { - int dotPosition = parse.find('.'); + int dotPosition = parse.tqfind('.'); if(parse.endsWith("h")) { @@ -304,34 +304,34 @@ void SVGAnimationElementImpl::putValueProperty(ExecState *exec, int token, const } else if(current.startsWith("wallclock")) { - int firstBrace = current.find("("); - int secondBrace = current.find(")"); + int firstBrace = current.tqfind("("); + int secondBrace = current.tqfind(")"); TQString wallclockValue = current.mid(firstBrace + 1, secondBrace - firstBrace - 2); kdDebug() << "WALLCLOCK VALUE " << wallclockValue << endl; } - else if(current.contains(".")) + else if(current.tqcontains(".")) { - int dotPosition = current.find("."); + int dotPosition = current.tqfind("."); TQString element = current.mid(0, dotPosition); TQString clockValue; - if(current.contains("begin")) + if(current.tqcontains("begin")) clockValue = current.mid(dotPosition + 6); - else if(current.contains("end")) + else if(current.tqcontains("end")) clockValue = current.mid(dotPosition + 4); - else if(current.contains("repeat")) + else if(current.tqcontains("repeat")) clockValue = current.mid(dotPosition + 7); else // DOM2 Event Reference { int plusMinusPosition = -1; - if(current.contains("+")) - plusMinusPosition = current.find("+"); - else if(current.contains("-")) - plusMinusPosition = current.find("-"); + if(current.tqcontains("+")) + plusMinusPosition = current.tqfind("+"); + else if(current.tqcontains("-")) + plusMinusPosition = current.tqfind("-"); TQString event = current.mid(dotPosition + 1, plusMinusPosition - dotPosition - 1); @@ -405,9 +405,9 @@ void SVGAnimationElementImpl::setAttributes() { SVGElementImpl::setAttributes(); - // Spec: Default value is "replace" + // Spec: Default value is "tqreplace" if(KSVG_TOKEN_NOT_PARSED(Additive)) - KSVG_SET_ALT_ATTRIBUTE(Additive, "replace") + KSVG_SET_ALT_ATTRIBUTE(Additive, "tqreplace") // Spec: Default value is "none" if(KSVG_TOKEN_NOT_PARSED(Accumulate)) diff --git a/ksvg/impl/SVGColorImpl.cc b/ksvg/impl/SVGColorImpl.cc index 799c43ec..3808fe90 100644 --- a/ksvg/impl/SVGColorImpl.cc +++ b/ksvg/impl/SVGColorImpl.cc @@ -295,7 +295,7 @@ void SVGColorImpl::setRGBColor(const DOM::DOMString &rgbColor) setRGBColor(245, 255, 250); else if(rgbColor == "mistyrose") setRGBColor(255, 228, 225); - else if(rgbColor == "moccasin") + else if(rgbColor == "tqmoccasin") setRGBColor(255, 228, 181); else if(rgbColor == "navajowhite") setRGBColor(255, 222, 173); @@ -398,7 +398,7 @@ void SVGColorImpl::setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM TQColor color; TQString content = iccColor.string().right(iccColor.string().length() - 10); - TQString iccTarget = content.mid(0, content.find(',')); + TQString iccTarget = content.mid(0, content.tqfind(',')); TQStringList colors = TQStringList::split(',', content); TQString r = colors[1]; diff --git a/ksvg/impl/SVGColorProfileElementImpl.cc b/ksvg/impl/SVGColorProfileElementImpl.cc index 385a836b..7890f07e 100644 --- a/ksvg/impl/SVGColorProfileElementImpl.cc +++ b/ksvg/impl/SVGColorProfileElementImpl.cc @@ -229,12 +229,12 @@ void SVGColorProfileElementImpl::closeColorProfile() cmsCloseProfile(m_hInput); } -QRgb SVGColorProfileElementImpl::correctPixel(float r, float g, float b) +TQRgb SVGColorProfileElementImpl::correctPixel(float r, float g, float b) { if(!m_loaded) { if(!loadColorProfile()) - return qRgb(0, 0, 0); + return tqRgb(0, 0, 0); } unsigned short input[MAXCHANNELS], output[MAXCHANNELS]; @@ -246,9 +246,9 @@ QRgb SVGColorProfileElementImpl::correctPixel(float r, float g, float b) cmsDoTransform(m_hTrans, input, output, 1); if(m_outputColorSpace == icSigRgbData) - return qRgb(output[0] / 257, output[1] / 257, output[2] / 257); + return tqRgb(output[0] / 257, output[1] / 257, output[2] / 257); - return qRgb(0, 0, 0); + return tqRgb(0, 0, 0); } TQImage *SVGColorProfileElementImpl::correctImage(TQImage *input) @@ -260,8 +260,8 @@ TQImage *SVGColorProfileElementImpl::correctImage(TQImage *input) { for(int x = 0; x < input->width(); x++) { - QRgb pixel = input->pixel(x, y); - input->setPixel(x, y, correctPixel(qRed(pixel), qGreen(pixel), qBlue(pixel))); + TQRgb pixel = input->pixel(x, y); + input->setPixel(x, y, correctPixel(tqRed(pixel), tqGreen(pixel), tqBlue(pixel))); } } diff --git a/ksvg/impl/SVGColorProfileElementImpl.h b/ksvg/impl/SVGColorProfileElementImpl.h index ad498c4b..db4f322e 100644 --- a/ksvg/impl/SVGColorProfileElementImpl.h +++ b/ksvg/impl/SVGColorProfileElementImpl.h @@ -55,7 +55,7 @@ public: unsigned short renderingIntent() const; TQImage *correctImage(TQImage *input); - QRgb correctPixel(float r, float g, float b); + TQRgb correctPixel(float r, float g, float b); private: bool loadColorProfile(); diff --git a/ksvg/impl/SVGContainerImpl.cc b/ksvg/impl/SVGContainerImpl.cc index e4a7c0db..63487227 100644 --- a/ksvg/impl/SVGContainerImpl.cc +++ b/ksvg/impl/SVGContainerImpl.cc @@ -36,21 +36,21 @@ SVGContainerImpl::~SVGContainerImpl() SVGRectImpl *SVGContainerImpl::getBBox() { - // just get the union of the children bboxes + // just get the union of the tqchildren bboxes TQRect rect; DOM::Node node = firstChild(); for(; !node.isNull(); node = node.nextSibling()) { SVGElementImpl *elem = ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(elem); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(elem); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(elem); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(elem); bool ok = tests ? tests->ok() : true; - if(shape && style && ok && style->getVisible() && style->getDisplay()) + if(tqshape && style && ok && style->getVisible() && style->getDisplay()) { - SVGRectImpl *current = shape->getBBox(); + SVGRectImpl *current = tqshape->getBBox(); rect = rect.unite(current->qrect()); current->deref(); } @@ -90,21 +90,21 @@ void SVGContainerImpl::update(CanvasItemUpdate reason, int param1, int param2) for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); - if(shape) - shape->update(reason, param1, param2); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); + if(tqshape) + tqshape->update(reason, param1, param2); } } -void SVGContainerImpl::invalidate(KSVGCanvas *c, bool recalc) +void SVGContainerImpl::tqinvalidate(KSVGCanvas *c, bool recalc) { - SVGShapeImpl::invalidate(c, recalc); + SVGShapeImpl::tqinvalidate(c, recalc); for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); - if(shape) - shape->invalidate(c, recalc); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); + if(tqshape) + tqshape->tqinvalidate(c, recalc); } } @@ -114,9 +114,9 @@ void SVGContainerImpl::setReferenced(bool referenced) for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); - if(shape) - shape->setReferenced(referenced); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); + if(tqshape) + tqshape->setReferenced(referenced); } } @@ -126,9 +126,9 @@ void SVGContainerImpl::draw() for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); - if(shape) - shape->draw(); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(node.handle())); + if(tqshape) + tqshape->draw(); } } diff --git a/ksvg/impl/SVGContainerImpl.h b/ksvg/impl/SVGContainerImpl.h index 353a6154..2d01fdc8 100644 --- a/ksvg/impl/SVGContainerImpl.h +++ b/ksvg/impl/SVGContainerImpl.h @@ -40,7 +40,7 @@ public: virtual void removeItem(KSVGCanvas *c); virtual void update(CanvasItemUpdate reason, int param1, int param2); - virtual void invalidate(KSVGCanvas *c, bool recalc); + virtual void tqinvalidate(KSVGCanvas *c, bool recalc); virtual void setReferenced(bool referenced); virtual void draw(); diff --git a/ksvg/impl/SVGDocumentImpl.cc b/ksvg/impl/SVGDocumentImpl.cc index c2b412f3..13de4b79 100644 --- a/ksvg/impl/SVGDocumentImpl.cc +++ b/ksvg/impl/SVGDocumentImpl.cc @@ -74,7 +74,7 @@ unsigned int SVGDocumentImpl::elemDictHashSizes [] = const int SVGDocumentImpl::numElemDictHashSizes = sizeof(elemDictHashSizes) / sizeof(elemDictHashSizes[0]); -SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *parentImage) : TQObject(), DOM::DomShared(), DOM::Document(), SVGDOMNodeBridge(static_cast<DOM::Node>(*this)) +SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *tqparentImage) : TQObject(), DOM::DomShared(), DOM::Document(), SVGDOMNodeBridge(static_cast<DOM::Node>(*this)) { m_animations = anim; @@ -97,7 +97,7 @@ SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *paren m_resortZIndicesOnFinishedLoading = false; m_fit = fit; - m_parentImage = parentImage; + m_parentImage = tqparentImage; if(m_parentImage) m_parentImage->ref(); } @@ -112,9 +112,9 @@ SVGDocumentImpl::~SVGDocumentImpl() DOM::Node node = firstChild(); for(; !node.isNull(); node = node.nextSibling()) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(getElementFromHandle(node.handle())); - if(shape) - killList.append(shape); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(getElementFromHandle(node.handle())); + if(tqshape) + killList.append(tqshape); } SVGShapeImpl *rend = 0; @@ -252,7 +252,7 @@ void SVGDocumentImpl::slotSVGContent(TQIODevice *dev) args.getURLMode = false; TQString url = m_baseURL.prettyURL(); - int pos = url.find('#'); // url can become like this.svg#svgView(viewBox(63,226,74,74)), get part after '#' + int pos = url.tqfind('#'); // url can become like this.svg#svgView(viewBox(63,226,74,74)), get part after '#' if(pos > -1) args.SVGFragmentId = url.mid(pos + 1); @@ -358,7 +358,7 @@ void SVGDocumentImpl::checkFinishedLoading() void SVGDocumentImpl::addForwardReferencingUseElement(SVGUseElementImpl *use) { - if(!m_forwardReferencingUseElements.contains(use)) + if(!m_forwardReferencingUseElements.tqcontains(use)) m_forwardReferencingUseElements.append(use); } @@ -392,9 +392,9 @@ void SVGDocumentImpl::syncCachedMatrices() { if(rootElement()) { - SVGMatrixImpl *parentMatrix = SVGSVGElementImpl::createSVGMatrix(); - rootElement()->checkCachedScreenCTM(parentMatrix); - parentMatrix->deref(); + SVGMatrixImpl *tqparentMatrix = SVGSVGElementImpl::createSVGMatrix(); + rootElement()->checkCachedScreenCTM(tqparentMatrix); + tqparentMatrix->deref(); } } @@ -478,7 +478,7 @@ bool SVGDocumentImpl::dispatchRecursiveEvent(SVGEvent::EventId id, DOM::Node sta if(element && element->hasChildNodes()) { - // Dispatch to all children + // Dispatch to all tqchildren eventExecuted = dispatchRecursiveEvent(id, element->lastChild()) ? true : eventExecuted; // Dispatch, locally diff --git a/ksvg/impl/SVGDocumentImpl.h b/ksvg/impl/SVGDocumentImpl.h index 10eae77e..fcbb9f35 100644 --- a/ksvg/impl/SVGDocumentImpl.h +++ b/ksvg/impl/SVGDocumentImpl.h @@ -72,8 +72,9 @@ class SVGDocumentImpl : public TQObject, public SVGDOMNodeBridge { Q_OBJECT + TQ_OBJECT public: - SVGDocumentImpl(bool anim = true, bool bFit = false, SVGImageElementImpl *parentImage = 0); + SVGDocumentImpl(bool anim = true, bool bFit = false, SVGImageElementImpl *tqparentImage = 0); virtual ~SVGDocumentImpl(); float screenPixelsPerMillimeterX() const; @@ -89,7 +90,7 @@ public: void setRootElement(SVGSVGElementImpl *); SVGSVGElementImpl *rootElement() const; - SVGImageElementImpl *parentImage() const { return m_parentImage; } + SVGImageElementImpl *tqparentImage() const { return m_parentImage; } SVGWindowImpl *window(); diff --git a/ksvg/impl/SVGEcma.cc b/ksvg/impl/SVGEcma.cc index 39843a07..e0c427ae 100644 --- a/ksvg/impl/SVGEcma.cc +++ b/ksvg/impl/SVGEcma.cc @@ -49,7 +49,7 @@ using namespace KSVG; nodeName SVGDOMNodeBridge::NodeName DontDelete|ReadOnly nodeValue SVGDOMNodeBridge::NodeValue DontDelete nodeType SVGDOMNodeBridge::NodeType DontDelete|ReadOnly - parentNode SVGDOMNodeBridge::ParentNode DontDelete|ReadOnly + tqparentNode SVGDOMNodeBridge::ParentNode DontDelete|ReadOnly childNodes SVGDOMNodeBridge::ChildNodes DontDelete|ReadOnly firstChild SVGDOMNodeBridge::FirstChild DontDelete|ReadOnly lastChild SVGDOMNodeBridge::LastChild DontDelete|ReadOnly @@ -74,7 +74,7 @@ using namespace KSVG; isSupported SVGDOMNodeBridge::IsSupported DontDelete|Function 2 addEventListener SVGDOMNodeBridge::AddEventListener DontDelete|Function 3 removeEventListener SVGDOMNodeBridge::RemoveEventListener DontDelete|Function 3 - contains SVGDOMNodeBridge::Contains DontDelete|Function 1 + tqcontains SVGDOMNodeBridge::Contains DontDelete|Function 1 getNodeName SVGDOMNodeBridge::GetNodeName DontDelete|Function 0 getNodeValue SVGDOMNodeBridge::GetNodeValue DontDelete|Function 0 getNodeType SVGDOMNodeBridge::GetNodeType DontDelete|Function 0 @@ -150,13 +150,13 @@ void SVGDOMNodeBridge::putValueProperty(ExecState *exec, int token, const Value // triggered by one of the child nodes void updateTextItem(ExecState *exec, const DOM::Node node) { - DOM::Node parent; - while(!(parent = node.parentNode()).isNull()) + DOM::Node tqparent; + while(!(tqparent = node.parentNode()).isNull()) { - DOM::DOMString name = parent.nodeName(); + DOM::DOMString name = tqparent.nodeName(); if(name == "text" || name == "tspan" || name == "tref") { - SVGHelperImpl::updateItem(exec, parent); + SVGHelperImpl::updateItem(exec, tqparent); break; } } @@ -169,19 +169,19 @@ void removeItem(ExecState *exec, DOM::Node &node) SVGDocumentImpl *doc = KSVG::Window::retrieveActive(exec)->doc(); // Update canvas - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle())); - if(shape && shape->item()) - doc->canvas()->removeItem(shape->item()); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle())); + if(tqshape && tqshape->item()) + doc->canvas()->removeItem(tqshape->item()); } // parseXML + getURL() need all these 5 functions to work properly void correctHandles(SVGElementImpl *main, DOM::Node &node) { DOM::Element old(node.handle()); - DOM::Element *replace = static_cast<DOM::Element *>(main->ownerDoc()->getElementFromHandle(node.handle())); + DOM::Element *tqreplace = static_cast<DOM::Element *>(main->ownerDoc()->getElementFromHandle(node.handle())); - if(replace && node.nodeType() == DOM::Node::ELEMENT_NODE) - *replace = old; + if(tqreplace && node.nodeType() == DOM::Node::ELEMENT_NODE) + *tqreplace = old; if(node.hasChildNodes()) { @@ -304,7 +304,7 @@ Value appendHelper(ExecState *exec, DOM::Node node, DOM::Node newNode) // Get some SVGElementImpl's SVGElementImpl *nodeElement = doc->getElementFromHandle(newNode.handle()); - // TODO : extra check needed to see if the new elements parent is already appended + // TODO : extra check needed to see if the new elements tqparent is already appended // in the doc. Not really nice, should be some other way? (Rob) if(nodeElement && !nodeElement->parentNode().parentNode().isNull()) { @@ -405,7 +405,7 @@ Value SVGDOMNodeBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const Li { SVGEvent::EventId eventId = SVGEvent::typeToId(args[0].toString(exec).string()); if(eventId != SVGEvent::UNKNOWN_EVENT) - element->setEventListener(eventId, new KSVGEcmaEventListener(Object::dynamicCast(args[1]), TQString::null, doc->ecmaEngine())); + element->setEventListener(eventId, new KSVGEcmaEventListener(Object::dynamicCast(args[1]), TQString(), doc->ecmaEngine())); } return Undefined(); } @@ -556,7 +556,7 @@ Value SVGDOMElementBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const { // For now, we strip the NS part (Rob) DOM::DOMString attr = args[1].toString(exec).string(); - int pos = attr.string().find(':'); + int pos = attr.string().tqfind(':'); if(pos > -1) attr = attr.string().mid(pos + 1); diff --git a/ksvg/impl/SVGElementImpl.cc b/ksvg/impl/SVGElementImpl.cc index 940790f2..099918f5 100644 --- a/ksvg/impl/SVGElementImpl.cc +++ b/ksvg/impl/SVGElementImpl.cc @@ -134,7 +134,7 @@ bool SVGElementImpl::hasEventListener(int id, bool local) if(local) return false; - // Check every parent element + // Check every tqparent element for(DOM::Node node = parentNode(); !node.isNull(); node = node.parentNode()) { SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); @@ -328,7 +328,7 @@ TQDict<DOM::DOMString> &SVGElementImpl::attributes() // khtml overrides void SVGElementImpl::setAttribute(const DOM::DOMString &name, const DOM::DOMString &value) { - m_attributes.replace(name.string(), new DOM::DOMString(value)); + m_attributes.tqreplace(name.string(), new DOM::DOMString(value)); } // Changes internal value. This will have no effect on getAttribute(). @@ -368,7 +368,7 @@ DOM::DOMString SVGElementImpl::getAttributeInternal(const DOM::DOMString &name) bool SVGElementImpl::hasAttribute(const DOM::DOMString &name) { - return m_attributes.find(name.string()) != 0; + return m_attributes.tqfind(name.string()) != 0; } bool SVGElementImpl::hasAttributes() @@ -496,9 +496,9 @@ void SVGElementImpl::setAttributes(bool deep) bool SVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *mev) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this); - if(shape) - return shape->prepareMouseEvent(p, a, mev); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(this); + if(tqshape) + return tqshape->prepareMouseEvent(p, a, mev); return false; } @@ -518,7 +518,7 @@ bool SVGElementImpl::dispatchEvent(SVGEventImpl *evt, bool tempEvent) { evt->setTarget(this); - // Find out, where to send to -> collect parent nodes + // Find out, where to send to -> collect tqparent nodes TQPtrList<SVGElementImpl> nodeChain; for(DOM::Element e = *this; !e.isNull(); e = e.parentNode()) diff --git a/ksvg/impl/SVGElementInstanceImpl.cc b/ksvg/impl/SVGElementInstanceImpl.cc index 97cd28a2..46252fcd 100644 --- a/ksvg/impl/SVGElementInstanceImpl.cc +++ b/ksvg/impl/SVGElementInstanceImpl.cc @@ -75,7 +75,7 @@ SVGUseElementImpl *SVGElementInstanceImpl::correspondingUseElement() const return m_correspondingUseElement; } -SVGElementInstanceImpl *SVGElementInstanceImpl::parentNode() const +SVGElementInstanceImpl *SVGElementInstanceImpl::tqparentNode() const { return m_parentNode; } diff --git a/ksvg/impl/SVGElementInstanceImpl.h b/ksvg/impl/SVGElementInstanceImpl.h index d9f3afae..7ee469af 100644 --- a/ksvg/impl/SVGElementInstanceImpl.h +++ b/ksvg/impl/SVGElementInstanceImpl.h @@ -40,7 +40,7 @@ public: SVGElementImpl *correspondingElement() const; SVGUseElementImpl *correspondingUseElement() const; - SVGElementInstanceImpl *parentNode() const; + SVGElementInstanceImpl *tqparentNode() const; SVGElementInstanceListImpl *childNodes() const; SVGElementInstanceImpl *firstChild() const; SVGElementInstanceImpl *lastChild() const; diff --git a/ksvg/impl/SVGEventImpl.cc b/ksvg/impl/SVGEventImpl.cc index 17338f45..f665d25c 100644 --- a/ksvg/impl/SVGEventImpl.cc +++ b/ksvg/impl/SVGEventImpl.cc @@ -43,7 +43,7 @@ SVGEventImpl::SVGEventImpl() m_defaultPrevented = false; m_id = SVGEvent::UNKNOWN_EVENT; m_eventPhase = 0; - m_createTime = TQDateTime::currentDateTime(); + m_createTime = TQDateTime::tqcurrentDateTime(); m_defaultHandled = false; m_target = 0; @@ -62,7 +62,7 @@ SVGEventImpl::SVGEventImpl(SVGEvent::EventId _id, bool canBubbleArg, bool cancel m_defaultPrevented = false; m_id = _id; m_eventPhase = 0; - m_createTime = TQDateTime::currentDateTime(); + m_createTime = TQDateTime::tqcurrentDateTime(); m_defaultHandled = false; m_target = 0; @@ -345,8 +345,8 @@ SVGKeyEventImpl::SVGKeyEventImpl(TQKeyEvent *key, DOM::AbstractView &view, SVGEv { qKeyEvent = new TQKeyEvent(key->type(), key->key(), key->ascii(), key->state(), key->text(), key->isAutoRepeat(), key->count()); - // Events are supposed to be accepted by default in Qt! - // This line made QLineEdit's keyevents be ignored, so they were sent to the khtmlview + // Events are supposed to be accepted by default in TQt! + // This line made TQLineEdit's keyevents be ignored, so they were sent to the khtmlview // (and e.g. space would make it scroll down) //qKeyEvent->ignore(); @@ -359,147 +359,147 @@ SVGKeyEventImpl::SVGKeyEventImpl(TQKeyEvent *key, DOM::AbstractView &view, SVGEv switch(key->key()) { - case Qt::Key_Enter: + case TQt::Key_Enter: m_numPad = true; /* fall through */ - case Qt::Key_Return: + case TQt::Key_Return: m_virtKeyVal = DOM_VK_ENTER; break; - case Qt::Key_NumLock: + case TQt::Key_NumLock: m_numPad = true; m_virtKeyVal = DOM_VK_NUM_LOCK; break; - case Qt::Key_Alt: + case TQt::Key_Alt: m_virtKeyVal = DOM_VK_RIGHT_ALT; // ### DOM_VK_LEFT_ALT; break; - case Qt::Key_Control: + case TQt::Key_Control: m_virtKeyVal = DOM_VK_LEFT_CONTROL; // ### DOM_VK_RIGHT_CONTROL break; - case Qt::Key_Shift: + case TQt::Key_Shift: m_virtKeyVal = DOM_VK_LEFT_SHIFT; // ### DOM_VK_RIGHT_SHIFT break; - case Qt::Key_Meta: + case TQt::Key_Meta: m_virtKeyVal = DOM_VK_LEFT_META; // ### DOM_VK_RIGHT_META break; - case Qt::Key_CapsLock: + case TQt::Key_CapsLock: m_virtKeyVal = DOM_VK_CAPS_LOCK; break; - case Qt::Key_Delete: + case TQt::Key_Delete: m_virtKeyVal = DOM_VK_DELETE; break; - case Qt::Key_End: + case TQt::Key_End: m_virtKeyVal = DOM_VK_END; break; - case Qt::Key_Escape: + case TQt::Key_Escape: m_virtKeyVal = DOM_VK_ESCAPE; break; - case Qt::Key_Home: + case TQt::Key_Home: m_virtKeyVal = DOM_VK_HOME; break; - case Qt::Key_Insert: + case TQt::Key_Insert: m_virtKeyVal = DOM_VK_INSERT; break; - case Qt::Key_Pause: + case TQt::Key_Pause: m_virtKeyVal = DOM_VK_PAUSE; break; - case Qt::Key_Print: + case TQt::Key_Print: m_virtKeyVal = DOM_VK_PRINTSCREEN; break; - case Qt::Key_ScrollLock: + case TQt::Key_ScrollLock: m_virtKeyVal = DOM_VK_SCROLL_LOCK; break; - case Qt::Key_Left: + case TQt::Key_Left: m_virtKeyVal = DOM_VK_LEFT; break; - case Qt::Key_Right: + case TQt::Key_Right: m_virtKeyVal = DOM_VK_RIGHT; break; - case Qt::Key_Up: + case TQt::Key_Up: m_virtKeyVal = DOM_VK_UP; break; - case Qt::Key_Down: + case TQt::Key_Down: m_virtKeyVal = DOM_VK_DOWN; break; - case Qt::Key_Next: + case TQt::Key_Next: m_virtKeyVal = DOM_VK_PAGE_DOWN; break; - case Qt::Key_Prior: + case TQt::Key_Prior: m_virtKeyVal = DOM_VK_PAGE_UP; break; - case Qt::Key_F1: + case TQt::Key_F1: m_virtKeyVal = DOM_VK_F1; break; - case Qt::Key_F2: + case TQt::Key_F2: m_virtKeyVal = DOM_VK_F2; break; - case Qt::Key_F3: + case TQt::Key_F3: m_virtKeyVal = DOM_VK_F3; break; - case Qt::Key_F4: + case TQt::Key_F4: m_virtKeyVal = DOM_VK_F4; break; - case Qt::Key_F5: + case TQt::Key_F5: m_virtKeyVal = DOM_VK_F5; break; - case Qt::Key_F6: + case TQt::Key_F6: m_virtKeyVal = DOM_VK_F6; break; - case Qt::Key_F7: + case TQt::Key_F7: m_virtKeyVal = DOM_VK_F7; break; - case Qt::Key_F8: + case TQt::Key_F8: m_virtKeyVal = DOM_VK_F8; break; - case Qt::Key_F9: + case TQt::Key_F9: m_virtKeyVal = DOM_VK_F9; break; - case Qt::Key_F10: + case TQt::Key_F10: m_virtKeyVal = DOM_VK_F10; break; - case Qt::Key_F11: + case TQt::Key_F11: m_virtKeyVal = DOM_VK_F11; break; - case Qt::Key_F12: + case TQt::Key_F12: m_virtKeyVal = DOM_VK_F12; break; - case Qt::Key_F13: + case TQt::Key_F13: m_virtKeyVal = DOM_VK_F13; break; - case Qt::Key_F14: + case TQt::Key_F14: m_virtKeyVal = DOM_VK_F14; break; - case Qt::Key_F15: + case TQt::Key_F15: m_virtKeyVal = DOM_VK_F15; break; - case Qt::Key_F16: + case TQt::Key_F16: m_virtKeyVal = DOM_VK_F16; break; - case Qt::Key_F17: + case TQt::Key_F17: m_virtKeyVal = DOM_VK_F17; break; - case Qt::Key_F18: + case TQt::Key_F18: m_virtKeyVal = DOM_VK_F18; break; - case Qt::Key_F19: + case TQt::Key_F19: m_virtKeyVal = DOM_VK_F19; break; - case Qt::Key_F20: + case TQt::Key_F20: m_virtKeyVal = DOM_VK_F20; break; - case Qt::Key_F21: + case TQt::Key_F21: m_virtKeyVal = DOM_VK_F21; break; - case Qt::Key_F22: + case TQt::Key_F22: m_virtKeyVal = DOM_VK_F22; break; - case Qt::Key_F23: + case TQt::Key_F23: m_virtKeyVal = DOM_VK_F23; break; - case Qt::Key_F24: + case TQt::Key_F24: m_virtKeyVal = DOM_VK_F24; break; default: @@ -507,17 +507,17 @@ SVGKeyEventImpl::SVGKeyEventImpl(TQKeyEvent *key, DOM::AbstractView &view, SVGEv break; } - // m_keyVal should contain the unicode value + // m_keyVal should contain the tqunicode value // of the pressed key if available. if (!key->text().isNull()) - m_keyVal = key->text().unicode()[0]; + m_keyVal = TQString(key->text()).tqunicode()[0]; // m_numPad = ??? // key->state returns enum ButtonState, which is ShiftButton, ControlButton and AltButton or'ed together. m_modifier = key->state(); - // key->text() returns the unicode sequence as a QString + // key->text() returns the tqunicode sequence as a TQString m_outputString = DOM::DOMString(key->text()); } diff --git a/ksvg/impl/SVGFitToViewBoxImpl.cc b/ksvg/impl/SVGFitToViewBoxImpl.cc index aaee3045..7fc3856b 100644 --- a/ksvg/impl/SVGFitToViewBoxImpl.cc +++ b/ksvg/impl/SVGFitToViewBoxImpl.cc @@ -75,7 +75,7 @@ void SVGFitToViewBoxImpl::parseViewBox(const TQString &s) // allow for viewbox def with ',' or whitespace TQString viewbox(s); - TQStringList points = TQStringList::split(' ', viewbox.replace(',', ' ').simplifyWhiteSpace()); + TQStringList points = TQStringList::split(' ', viewbox.tqreplace(',', ' ').simplifyWhiteSpace()); viewBox()->baseVal()->setX(points[0].toFloat()); viewBox()->baseVal()->setY(points[1].toFloat()); diff --git a/ksvg/impl/SVGGlyphElementImpl.cc b/ksvg/impl/SVGGlyphElementImpl.cc index 4fbc6bb7..ef891912 100644 --- a/ksvg/impl/SVGGlyphElementImpl.cc +++ b/ksvg/impl/SVGGlyphElementImpl.cc @@ -43,10 +43,10 @@ TQString SVGGlyphElementImpl::d() const /* @namespace KSVG @begin SVGGlyphElementImpl::s_hashTable 11 - unicode SVGGlyphElementImpl::Unicode DontDelete|ReadOnly + tqunicode SVGGlyphElementImpl::Unicode DontDelete|ReadOnly glyph-name SVGGlyphElementImpl::GlyphName DontDelete|ReadOnly d SVGGlyphElementImpl::D DontDelete|ReadOnly - orientation SVGGlyphElementImpl::Orientation DontDelete|ReadOnly + orientation SVGGlyphElementImpl::Qt::Orientation DontDelete|ReadOnly arabic-form SVGGlyphElementImpl::ArabicForm DontDelete|ReadOnly lang SVGGlyphElementImpl::Lang DontDelete|ReadOnly horiz-adv-x SVGGlyphElementImpl::HorizAdvX DontDelete|ReadOnly diff --git a/ksvg/impl/SVGHelperImpl.cc b/ksvg/impl/SVGHelperImpl.cc index 7378b8f4..0a5f1093 100644 --- a/ksvg/impl/SVGHelperImpl.cc +++ b/ksvg/impl/SVGHelperImpl.cc @@ -58,13 +58,13 @@ void SVGHelperImpl::updateItem(KJS::ExecState *exec, const DOM::Node node) SVGDocumentImpl *doc = Window::retrieveActive(exec)->doc(); // Update canvas, recursively if needed - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle())); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(doc->getElementFromHandle(node.handle())); - if(shape && shape->item()) + if(tqshape && tqshape->item()) { - shape->item()->update(UPDATE_TRANSFORM); - shape->item()->draw(); - shape->blit(doc->canvas()); + tqshape->item()->update(UPDATE_TRANSFORM); + tqshape->item()->draw(); + tqshape->blit(doc->canvas()); } if(const_cast<DOM::Node &>(node).hasChildNodes()) diff --git a/ksvg/impl/SVGImageElementImpl.cc b/ksvg/impl/SVGImageElementImpl.cc index 49f48e7d..19152095 100644 --- a/ksvg/impl/SVGImageElementImpl.cc +++ b/ksvg/impl/SVGImageElementImpl.cc @@ -320,10 +320,10 @@ void SVGImageElementImpl::removeItem(KSVGCanvas *c) void SVGImageElementImpl::setupSVGElement(SVGSVGElementImpl *svg) { // Set up the root svg for an svg image. - svg->setAttributeInternal("x", TQString("%1").arg(x()->baseVal()->value())); - svg->setAttributeInternal("y", TQString("%1").arg(y()->baseVal()->value())); - svg->setAttributeInternal("width", TQString("%1").arg(width()->baseVal()->value())); - svg->setAttributeInternal("height", TQString("%1").arg(height()->baseVal()->value())); + svg->setAttributeInternal("x", TQString("%1").tqarg(x()->baseVal()->value())); + svg->setAttributeInternal("y", TQString("%1").tqarg(y()->baseVal()->value())); + svg->setAttributeInternal("width", TQString("%1").tqarg(width()->baseVal()->value())); + svg->setAttributeInternal("height", TQString("%1").tqarg(height()->baseVal()->value())); TQString par = getAttribute("preserveAspectRatio").string().stripWhiteSpace(); @@ -353,7 +353,7 @@ void SVGImageElementImpl::onScreenCTMUpdated() SVGMatrixImpl *ctm = getScreenCTM(); m_svgRoot->setRootParentScreenCTM(ctm); - m_svgRoot->invalidateCachedMatrices(); + m_svgRoot->tqinvalidateCachedMatrices(); m_svgRoot->ownerDoc()->syncCachedMatrices(); } } @@ -380,7 +380,7 @@ bool SVGImageElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &, S if(test && m_item) { - if(m_item->bbox().contains(p)) + if(m_item->bbox().tqcontains(p)) { mev->setTarget(dynamic_cast<SVGElementImpl *>(this)); return true; @@ -408,7 +408,7 @@ void SVGImageElementImpl::setImage(TQImage *image) if(m_item) { - ownerDoc()->canvas()->invalidate(m_item, false); + ownerDoc()->canvas()->tqinvalidate(m_item, false); ownerDoc()->rerender(); } } @@ -508,12 +508,12 @@ void SVGImageElementImpl::applyColorProfile(SVGColorProfileElementImpl *profile, if(image->m_image) { - // Image is already painted, we apply the color profile and repaint it + // Image is already painted, we apply the color profile and tqrepaint it image->applyColorProfile(); if(image->item()) { - image->ownerDoc()->canvas()->invalidate(image->item(), false); + image->ownerDoc()->canvas()->tqinvalidate(image->item(), false); image->ownerDoc()->rerender(); } } diff --git a/ksvg/impl/SVGImageElementImpl.h b/ksvg/impl/SVGImageElementImpl.h index 922ef3f8..64a96421 100644 --- a/ksvg/impl/SVGImageElementImpl.h +++ b/ksvg/impl/SVGImageElementImpl.h @@ -52,6 +52,7 @@ class SVGImageElementImpl : public TQObject, public SVGTransformableImpl { Q_OBJECT + TQ_OBJECT public: SVGImageElementImpl(DOM::ElementImpl *); virtual ~SVGImageElementImpl(); @@ -85,7 +86,7 @@ public: virtual SVGRectImpl *getBBox(); - // Screen-space clipping shape + // Screen-space clipping tqshape KSVGPolygon clippingShape(); void onScreenCTMUpdated(); diff --git a/ksvg/impl/SVGLangSpaceImpl.cc b/ksvg/impl/SVGLangSpaceImpl.cc index 92919698..5a55ef15 100644 --- a/ksvg/impl/SVGLangSpaceImpl.cc +++ b/ksvg/impl/SVGLangSpaceImpl.cc @@ -67,19 +67,19 @@ TQString SVGLangSpaceImpl::handleText(const TQString &data) const { // Spec: What to do here? // It will convert all newline and tab characters into space characters - result.replace("\n\r", TQString(" ")); - result.replace("\r\n", TQString(" ")); - result.replace('\t', ' '); + result.tqreplace("\n\r", TQString(" ")); + result.tqreplace("\r\n", TQString(" ")); + result.tqreplace('\t', ' '); } else if(xmlspace() == "default") { // Spec: What to do here? - // First, it will remove all newline characters (replace) + // First, it will remove all newline characters (tqreplace) // Then it will convert all tab characters into space characters (simplifyWhiteSpace) // Then, it will strip off all leading and trailing space characters (stripWhiteSpace) // Then, all contiguous space characters will be consolidated. (simplifyWhiteSpace) - result.replace('\n', TQString::null); - result.replace('\r', TQString::null); + result.tqreplace('\n', TQString()); + result.tqreplace('\r', TQString()); result = result.stripWhiteSpace().simplifyWhiteSpace(); } diff --git a/ksvg/impl/SVGLengthImpl.cc b/ksvg/impl/SVGLengthImpl.cc index a8c9080c..da094837 100644 --- a/ksvg/impl/SVGLengthImpl.cc +++ b/ksvg/impl/SVGLengthImpl.cc @@ -282,9 +282,9 @@ void SVGLengthImpl::convertNumToPx() bool sizeLocal = (style->getFontSize() != -1); bool familyLocal = (style->getFontFamily() && style->getFontFamily()->getFirst()); - SVGStylableImpl *parentStyle = 0; + SVGStylableImpl *tqparentStyle = 0; if((!sizeLocal || !familyLocal) && m_context) - parentStyle = dynamic_cast<SVGStylableImpl *>(m_context->ownerDoc()->getElementFromHandle(m_context->parentNode().handle())); + tqparentStyle = dynamic_cast<SVGStylableImpl *>(m_context->ownerDoc()->getElementFromHandle(m_context->parentNode().handle())); // Look up font-size in a SAFE way, because at this place // processStyle() has NOT yet been called, so we need @@ -294,13 +294,13 @@ void SVGLengthImpl::convertNumToPx() if(sizeLocal) useSize = style->getFontSize(); - else if(parentStyle && parentStyle->getFontSize() != -1) - useSize = parentStyle->getFontSize(); + else if(tqparentStyle && tqparentStyle->getFontSize() != -1) + useSize = tqparentStyle->getFontSize(); if(familyLocal) useFont = style->getFontFamily()->getFirst()->string(); - else if(parentStyle && parentStyle->getFontFamily() && parentStyle->getFontFamily()->getFirst()) - useFont = parentStyle->getFontFamily()->getFirst()->string(); + else if(tqparentStyle && tqparentStyle->getFontFamily() && tqparentStyle->getFontFamily()->getFirst()) + useFont = tqparentStyle->getFontFamily()->getFirst()->string(); if(m_unitType == SVG_LENGTHTYPE_EMS) m_value = m_valueInSpecifiedUnits * useSize; diff --git a/ksvg/impl/SVGLocatableImpl.cc b/ksvg/impl/SVGLocatableImpl.cc index 0ae143fa..87ccd604 100644 --- a/ksvg/impl/SVGLocatableImpl.cc +++ b/ksvg/impl/SVGLocatableImpl.cc @@ -79,9 +79,9 @@ SVGMatrixImpl *SVGLocatableImpl::getTransformToElement(SVGElementImpl *) return ret; } -void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM) +void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *tqparentScreenCTM) { - m_cachedScreenCTM->copy(parentScreenCTM); + m_cachedScreenCTM->copy(tqparentScreenCTM); const SVGMatrixImpl *local = localMatrix(); @@ -92,13 +92,13 @@ void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCT // Notify the element onScreenCTMUpdated(); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(this); - if(shape) + if(tqshape) { // TODO: Update due to matrix animations - //if(shape->item()) - // shape->item()->update(updateReason); + //if(tqshape->item()) + // tqshape->item()->update(updateReason); SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this); @@ -114,14 +114,14 @@ void SVGLocatableImpl::updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCT } } -void SVGLocatableImpl::checkCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM) +void SVGLocatableImpl::checkCachedScreenCTM(const SVGMatrixImpl *tqparentScreenCTM) { if(m_cachedScreenCTMIsValid) { SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(this); - if(shape) + if(tqshape) { DOM::Node node = element->firstChild(); for(; !node.isNull(); node = node.nextSibling()) @@ -135,7 +135,7 @@ void SVGLocatableImpl::checkCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM } } else - updateCachedScreenCTM(parentScreenCTM); + updateCachedScreenCTM(tqparentScreenCTM); } // Ecma stuff @@ -184,9 +184,9 @@ Value SVGLocatableImplProtoFunc::call(ExecState *exec, Object &thisObj, const Li return container->getBBox()->cache(exec); else { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(obj); - if(shape) - return shape->getBBox()->cache(exec); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(obj); + if(tqshape) + return tqshape->getBBox()->cache(exec); else return obj->getBBox()->cache(exec); } diff --git a/ksvg/impl/SVGLocatableImpl.h b/ksvg/impl/SVGLocatableImpl.h index 81ce3326..49469164 100644 --- a/ksvg/impl/SVGLocatableImpl.h +++ b/ksvg/impl/SVGLocatableImpl.h @@ -52,14 +52,14 @@ public: virtual const SVGMatrixImpl *localMatrix() { return 0; } bool cachedScreenCTMIsValid() const { return m_cachedScreenCTMIsValid; } - void invalidateCachedMatrices() { m_cachedScreenCTMIsValid = false; } + void tqinvalidateCachedMatrices() { m_cachedScreenCTMIsValid = false; } // If the cached matrix is invalid, update it and update any child elements // recursively. Otherwise, check child elements recursively. - virtual void checkCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM); + virtual void checkCachedScreenCTM(const SVGMatrixImpl *tqparentScreenCTM); // Update the cached matrix, and update child element cached matrices, // recursively. - virtual void updateCachedScreenCTM(const SVGMatrixImpl *parentScreenCTM); + virtual void updateCachedScreenCTM(const SVGMatrixImpl *tqparentScreenCTM); // Called immediately after the screen ctm has been updated. virtual void onScreenCTMUpdated() {} diff --git a/ksvg/impl/SVGMarkerElementImpl.cc b/ksvg/impl/SVGMarkerElementImpl.cc index a621b47f..c10d5280 100644 --- a/ksvg/impl/SVGMarkerElementImpl.cc +++ b/ksvg/impl/SVGMarkerElementImpl.cc @@ -236,21 +236,21 @@ void SVGMarkerElementImpl::draw(SVGShapeImpl *referencingElement, double x, doub for(; !node.isNull(); node = node.nextSibling()) { SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); bool ok = tests ? tests->ok() : true; - if(element && shape && style && ok && style->getVisible() && style->getDisplay()) + if(element && tqshape && style && ok && style->getVisible() && style->getDisplay()) { SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element); if(locatable) locatable->updateCachedScreenCTM(mtx); - shape->update(UPDATE_TRANSFORM); - shape->setReferenced(true); - shape->draw(); - shape->setReferenced(false); + tqshape->update(UPDATE_TRANSFORM); + tqshape->setReferenced(true); + tqshape->draw(); + tqshape->setReferenced(false); } } diff --git a/ksvg/impl/SVGMaskElementImpl.cc b/ksvg/impl/SVGMaskElementImpl.cc index d0f90974..b7f26ed3 100644 --- a/ksvg/impl/SVGMaskElementImpl.cc +++ b/ksvg/impl/SVGMaskElementImpl.cc @@ -63,11 +63,11 @@ SVGMaskElementImpl::SVGMaskElementImpl(DOM::ElementImpl *impl) : SVGElementImpl( m_height = new SVGAnimatedLengthImpl(LENGTHMODE_HEIGHT, this); m_height->ref(); - m_maskUnits = new SVGAnimatedEnumerationImpl(); - m_maskUnits->ref(); + m_tqmaskUnits = new SVGAnimatedEnumerationImpl(); + m_tqmaskUnits->ref(); - m_maskContentUnits = new SVGAnimatedEnumerationImpl(); - m_maskContentUnits->ref(); + m_tqmaskContentUnits = new SVGAnimatedEnumerationImpl(); + m_tqmaskContentUnits->ref(); m_converter = new SVGUnitConverter(); m_converter->add(m_x); @@ -77,7 +77,7 @@ SVGMaskElementImpl::SVGMaskElementImpl(DOM::ElementImpl *impl) : SVGElementImpl( m_canvas = 0; - m_maskCache.setMaxTotalCost(1024 * 1024); + m_tqmaskCache.setMaxTotalCost(1024 * 1024); } SVGMaskElementImpl::~SVGMaskElementImpl() @@ -90,23 +90,23 @@ SVGMaskElementImpl::~SVGMaskElementImpl() m_width->deref(); if(m_height) m_height->deref(); - if(m_maskUnits) - m_maskContentUnits->deref(); - if(m_maskUnits) - m_maskContentUnits->deref(); + if(m_tqmaskUnits) + m_tqmaskContentUnits->deref(); + if(m_tqmaskUnits) + m_tqmaskContentUnits->deref(); delete m_converter; if(m_canvas) delete m_canvas; } -SVGAnimatedEnumerationImpl *SVGMaskElementImpl::maskUnits() const +SVGAnimatedEnumerationImpl *SVGMaskElementImpl::tqmaskUnits() const { - return m_maskUnits; + return m_tqmaskUnits; } -SVGAnimatedEnumerationImpl *SVGMaskElementImpl::maskContentUnits() const +SVGAnimatedEnumerationImpl *SVGMaskElementImpl::tqmaskContentUnits() const { - return m_maskContentUnits; + return m_tqmaskContentUnits; } SVGAnimatedLengthImpl *SVGMaskElementImpl::x() const @@ -132,8 +132,8 @@ SVGAnimatedLengthImpl *SVGMaskElementImpl::height() const /* @namespace KSVG @begin SVGMaskElementImpl::s_hashTable 7 - maskUnits SVGMaskElementImpl::MaskUnits DontDelete|ReadOnly - maskContentUnits SVGMaskElementImpl::MaskContentUnits DontDelete|ReadOnly + tqmaskUnits SVGMaskElementImpl::MaskUnits DontDelete|ReadOnly + tqmaskContentUnits SVGMaskElementImpl::MaskContentUnits DontDelete|ReadOnly x SVGMaskElementImpl::X DontDelete|ReadOnly y SVGMaskElementImpl::Y DontDelete|ReadOnly width SVGMaskElementImpl::Width DontDelete|ReadOnly @@ -148,14 +148,14 @@ Value SVGMaskElementImpl::getValueProperty(ExecState *exec, int token) const { case MaskUnits: if(!attributeMode) - return m_maskUnits->cache(exec); + return m_tqmaskUnits->cache(exec); else - return Number(m_maskUnits->baseVal()); + return Number(m_tqmaskUnits->baseVal()); case MaskContentUnits: if(!attributeMode) - return m_maskContentUnits->cache(exec); + return m_tqmaskContentUnits->cache(exec); else - return Number(m_maskContentUnits->baseVal()); + return Number(m_tqmaskContentUnits->baseVal()); case X: if(!attributeMode) return m_x->cache(exec); @@ -194,15 +194,15 @@ void SVGMaskElementImpl::putValueProperty(ExecState *exec, int token, const Valu { case MaskUnits: if(value.toString(exec).qstring() == "objectBoundingBox") - m_maskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX); + m_tqmaskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX); else - m_maskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE); + m_tqmaskUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE); break; case MaskContentUnits: if(value.toString(exec).qstring() == "objectBoundingBox") - m_maskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX); + m_tqmaskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX); else - m_maskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE); + m_tqmaskContentUnits->setBaseVal(SVGMaskElement::SVG_UNIT_TYPE_USERSPACEONUSE); break; case X: converter()->modify(x(), value.toString(exec).qstring()); @@ -262,19 +262,19 @@ void SVGMaskElementImpl::setAttributes() SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight) { - converter()->finalize(referencingElement, ownerSVGElement(), maskUnits()->baseVal()); + converter()->finalize(referencingElement, ownerSVGElement(), tqmaskUnits()->baseVal()); - Q_UINT32 *imageBits = new Q_UINT32[imageWidth * imageHeight]; + TQ_UINT32 *imageBits = new TQ_UINT32[imageWidth * imageHeight]; if(m_canvas == 0) m_canvas = CanvasFactory::self()->loadCanvas(imageWidth, imageHeight); m_canvas->setup(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight); - m_canvas->setBackgroundColor(qRgba(0, 0, 0, 0)); + m_canvas->setBackgroundColor(tqRgba(0, 0, 0, 0)); SVGMatrixImpl *baseMatrix = SVGSVGElementImpl::createSVGMatrix(); - // Set the scale to map the mask onto the image + // Set the scale to map the tqmask onto the image double xScale = static_cast<double>(imageWidth) / width()->baseVal()->value(); double yScale = static_cast<double>(imageHeight) / height()->baseVal()->value(); @@ -282,12 +282,12 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin SVGRectImpl *bbox = referencingElement->getBBox(); - if(maskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) + if(tqmaskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) baseMatrix->translate(-(bbox->x() + x()->baseVal()->value()), -(bbox->y() + y()->baseVal()->value())); else baseMatrix->translate(-x()->baseVal()->value(), -y()->baseVal()->value()); - if(maskContentUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) + if(tqmaskContentUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { baseMatrix->translate(bbox->x(), bbox->y()); baseMatrix->scaleNonUniform(bbox->width(), bbox->height()); @@ -296,22 +296,22 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) { SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); bool ok = tests ? tests->ok() : true; - if(element && shape && style && ok && style->getVisible() && style->getDisplay()) + if(element && tqshape && style && ok && style->getVisible() && style->getDisplay()) { SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element); if(locatable) locatable->updateCachedScreenCTM(baseMatrix); element->createItem(m_canvas); - if(shape->item()) + if(tqshape->item()) { - shape->item()->setReferenced(true); - m_canvas->invalidate(shape->item(), true); + tqshape->item()->setReferenced(true); + m_canvas->tqinvalidate(tqshape->item(), true); } } } @@ -321,33 +321,33 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin for(DOM::Node node = firstChild(); !node.isNull(); node = node.nextSibling()) { SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); bool ok = tests ? tests->ok() : true; - if(element && shape && style && ok && style->getVisible() && style->getDisplay()) + if(element && tqshape && style && ok && style->getVisible() && style->getDisplay()) { - if(shape) - shape->removeItem(m_canvas); + if(tqshape) + tqshape->removeItem(m_canvas); } } { // Note: r and b reversed - //TQImage maskImage(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight, 32, 0, 0, TQImage::IgnoreEndian); - //maskImage.setAlphaBuffer(true); - //maskImage.save("mask.png", "PNG"); + //TQImage tqmaskImage(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight, 32, 0, 0, TQImage::IgnoreEndian); + //tqmaskImage.setAlphaBuffer(true); + //tqmaskImage.save("tqmask.png", "PNG"); } - TQByteArray maskData(imageWidth * imageHeight); + TQByteArray tqmaskData(imageWidth * imageHeight); const double epsilon = DBL_EPSILON; - // Convert the rgba image into an 8-bit mask, according to the specs. + // Convert the rgba image into an 8-bit tqmask, according to the specs. for(int i = 0; i < imageWidth * imageHeight; i++) { - Q_UINT32 rgba = imageBits[i]; + TQ_UINT32 rgba = imageBits[i]; #if X_BYTE_ORDER == X_LITTLE_ENDIAN double r = (rgba & 0xff) / 255.0; @@ -378,9 +378,9 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin double luminanceAlpha = 0.2125 * r + 0.7154 * g + 0.0721 * b; // Multiply by alpha. - double maskValue = luminanceAlpha * a; + double tqmaskValue = luminanceAlpha * a; - maskData[i] = static_cast<unsigned char>(maskValue * 255 + 0.5); + tqmaskData[i] = static_cast<unsigned char>(tqmaskValue * 255 + 0.5); } delete [] imageBits; @@ -388,16 +388,16 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin baseMatrix->deref(); bbox->deref(); - // The screenToMask matrix is calculated each time the mask is used so we don't + // The screenToMask matrix is calculated each time the tqmask is used so we don't // need to set it here. TQWMatrix tempMatrix; - return Mask(maskData, tempMatrix, imageWidth, imageHeight); + return Mask(tqmaskData, tempMatrix, imageWidth, imageHeight); } SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencingElement) { - converter()->finalize(referencingElement, ownerSVGElement(), maskUnits()->baseVal()); + converter()->finalize(referencingElement, ownerSVGElement(), tqmaskUnits()->baseVal()); SVGMatrixImpl *refCTM = 0; SVGLocatableImpl *locatableRef = dynamic_cast<SVGLocatableImpl *>(referencingElement); @@ -414,26 +414,26 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin int imageWidth = static_cast<int>(width()->baseVal()->value() * xScale + 0.5); int imageHeight = static_cast<int>(height()->baseVal()->value() * yScale + 0.5); - Mask mask; + Mask tqmask; if(imageWidth > 0 && imageHeight > 0) { CacheKey key(referencingElement, imageWidth, imageHeight); - if(!m_maskCache.find(key, mask)) + if(!m_tqmaskCache.tqfind(key, tqmask)) { - mask = createMask(referencingElement, imageWidth, imageHeight); - m_maskCache.insert(key, mask, imageWidth * imageHeight); + tqmask = createMask(referencingElement, imageWidth, imageHeight); + m_tqmaskCache.insert(key, tqmask, imageWidth * imageHeight); } - // Generate a mask-coordinates to screen-coordinates matrix + // Generate a tqmask-coordinates to screen-coordinates matrix SVGMatrixImpl *matrix = 0; if(locatableRef) matrix = locatableRef->getScreenCTM(); else matrix = SVGSVGElementImpl::createSVGMatrix(); - if(maskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) + if(tqmaskUnits()->baseVal() == SVGMaskElement::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) { SVGRectImpl *bbox = referencingElement->getBBox(); matrix->translate(bbox->x() + x()->baseVal()->value(), bbox->y() + y()->baseVal()->value()); @@ -447,46 +447,46 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin TQWMatrix screenToMask = matrix->qmatrix().invert(); matrix->deref(); - mask.setScreenToMask(screenToMask); + tqmask.setScreenToMask(screenToMask); } - return mask; + return tqmask; } -TQByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *shape, const TQRect& screenRectangle) +TQByteArray SVGMaskElementImpl::tqmaskRectangle(SVGShapeImpl *tqshape, const TQRect& screenRectangle) { TQByteArray cumulativeMask; do { - SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(shape); + SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(tqshape); if(style && style->hasMask()) { - SVGElementImpl *element = shape->ownerDoc()->rootElement()->getElementById(style->getMask()); + SVGElementImpl *element = tqshape->ownerDoc()->rootElement()->getElementById(style->getMask()); if(element) { - SVGMaskElementImpl *maskElement = dynamic_cast<SVGMaskElementImpl *>(element); + SVGMaskElementImpl *tqmaskElement = dynamic_cast<SVGMaskElementImpl *>(element); - if(maskElement) + if(tqmaskElement) { - SVGMaskElementImpl::Mask mask = maskElement->createMask(shape); + SVGMaskElementImpl::Mask tqmask = tqmaskElement->createMask(tqshape); - if(!mask.isEmpty()) + if(!tqmask.isEmpty()) { - TQByteArray maskData = mask.rectangle(screenRectangle); + TQByteArray tqmaskData = tqmask.rectangle(screenRectangle); if(cumulativeMask.size() == 0) - cumulativeMask = maskData; + cumulativeMask = tqmaskData; else { int size = cumulativeMask.size(); - // Multiply into the cumulative mask (using fast divide by 255) + // Multiply into the cumulative tqmask (using fast divide by 255) for(int i = 0; i < size; i++) { - int tmp = maskData[i] * cumulativeMask[i] + 0x80; + int tmp = tqmaskData[i] * cumulativeMask[i] + 0x80; cumulativeMask[i] = (tmp + (tmp >> 8)) >> 8; } } @@ -495,27 +495,27 @@ TQByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *shape, const TQRect& } } - DOM::Node parentNode = shape->parentNode(); + DOM::Node tqparentNode = tqshape->parentNode(); - if(!parentNode.isNull()) + if(!tqparentNode.isNull()) { - SVGElementImpl *parent = shape->ownerDoc()->getElementFromHandle(parentNode.handle()); + SVGElementImpl *tqparent = tqshape->ownerDoc()->getElementFromHandle(tqparentNode.handle()); - if(parent) - shape = dynamic_cast<SVGShapeImpl *>(parent); + if(tqparent) + tqshape = dynamic_cast<SVGShapeImpl *>(tqparent); else - shape = 0; + tqshape = 0; } else - shape = 0; + tqshape = 0; - } while(shape); + } while(tqshape); return cumulativeMask; } -SVGMaskElementImpl::Mask::Mask(const TQByteArray& mask, const TQWMatrix& screenToMask, int width, int height) - : m_width(width), m_height(height), m_mask(mask), m_screenToMask(screenToMask) +SVGMaskElementImpl::Mask::Mask(const TQByteArray& tqmask, const TQWMatrix& screenToMask, int width, int height) + : m_width(width), m_height(height), m_tqmask(tqmask), m_screenToMask(screenToMask) { } diff --git a/ksvg/impl/SVGMaskElementImpl.h b/ksvg/impl/SVGMaskElementImpl.h index 2a96967c..4631ebae 100644 --- a/ksvg/impl/SVGMaskElementImpl.h +++ b/ksvg/impl/SVGMaskElementImpl.h @@ -56,7 +56,7 @@ public: { public: Mask() : m_width(0), m_height(0) {} - Mask(const TQByteArray& mask, const TQWMatrix& screenToMask, int width, int height); + Mask(const TQByteArray& tqmask, const TQWMatrix& screenToMask, int width, int height); ~Mask() {} bool isEmpty() const { return m_width == 0; } @@ -68,15 +68,15 @@ public: private: int m_width; int m_height; - TQByteArray m_mask; + TQByteArray m_tqmask; TQWMatrix m_screenToMask; }; SVGMaskElementImpl(DOM::ElementImpl *); virtual ~SVGMaskElementImpl(); - SVGAnimatedEnumerationImpl *maskUnits() const; - SVGAnimatedEnumerationImpl *maskContentUnits() const; + SVGAnimatedEnumerationImpl *tqmaskUnits() const; + SVGAnimatedEnumerationImpl *tqmaskContentUnits() const; SVGAnimatedLengthImpl *x() const; SVGAnimatedLengthImpl *y() const; SVGAnimatedLengthImpl *width() const; @@ -89,10 +89,10 @@ public: Mask createMask(SVGShapeImpl *referencingElement); - // Compute the mask on a given shape, taking into account all masks defined - // on the shape's ancestors. This is a workaround for us not having a buffer - // for container elements, so we can't mask containers directly. - static TQByteArray maskRectangle(SVGShapeImpl *shape, const TQRect& screenRectangle); + // Compute the tqmask on a given tqshape, taking into account all tqmasks defined + // on the tqshape's ancestors. This is a workaround for us not having a buffer + // for container elements, so we can't tqmask containers directly. + static TQByteArray tqmaskRectangle(SVGShapeImpl *tqshape, const TQRect& screenRectangle); private: class CacheKey @@ -110,8 +110,8 @@ private: Mask createMask(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight); - SVGAnimatedEnumerationImpl *m_maskUnits; - SVGAnimatedEnumerationImpl *m_maskContentUnits; + SVGAnimatedEnumerationImpl *m_tqmaskUnits; + SVGAnimatedEnumerationImpl *m_tqmaskContentUnits; SVGAnimatedLengthImpl *m_x; SVGAnimatedLengthImpl *m_y; SVGAnimatedLengthImpl *m_width; @@ -120,7 +120,7 @@ private: SVGUnitConverter *m_converter; KSVGCanvas *m_canvas; - MinOneLRUCache<CacheKey, Mask> m_maskCache; + MinOneLRUCache<CacheKey, Mask> m_tqmaskCache; public: KSVG_GET @@ -137,7 +137,7 @@ public: void putValueProperty(KJS::ExecState *exec, int token, const KJS::Value &value, int attr); }; -KSVG_REGISTER_ELEMENT(SVGMaskElementImpl, "mask") +KSVG_REGISTER_ELEMENT(SVGMaskElementImpl, "tqmask") inline unsigned char SVGMaskElementImpl::Mask::value(int screenX, int screenY) const { @@ -146,7 +146,7 @@ inline unsigned char SVGMaskElementImpl::Mask::value(int screenX, int screenY) c m_screenToMask.map(screenX, screenY, &x, &y); if(x >= 0 && x < m_width && y >= 0 && y < m_height) - return m_mask[x + y * m_width]; + return m_tqmask[x + y * m_width]; else return 0; } diff --git a/ksvg/impl/SVGPathElementImpl.cc b/ksvg/impl/SVGPathElementImpl.cc index 506ad01a..5a0d0057 100644 --- a/ksvg/impl/SVGPathElementImpl.cc +++ b/ksvg/impl/SVGPathElementImpl.cc @@ -678,21 +678,21 @@ SVGPathElementImpl::MarkerData::MarkerData(SVGPathSegListImpl *path) previousCubicY2 = cury + s->y2(); break; } - case PATHSEG_CURVETO_QUADRATIC_ABS: + case PATHSEG_CURVETO_TQUADRATIC_ABS: { SVGPathSegCurvetoQuadraticAbsImpl *s = static_cast<SVGPathSegCurvetoQuadraticAbsImpl *>(segment); previousQuadraticX1 = s->x1(); previousQuadraticY1 = s->y1(); break; } - case PATHSEG_CURVETO_QUADRATIC_REL: + case PATHSEG_CURVETO_TQUADRATIC_REL: { SVGPathSegCurvetoQuadraticRelImpl *s = static_cast<SVGPathSegCurvetoQuadraticRelImpl *>(segment); previousQuadraticX1 = curx + s->x1(); previousQuadraticY1 = cury + s->y1(); break; } - case PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: + case PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS: { SVGPathSegCurvetoQuadraticSmoothAbsImpl *s = static_cast<SVGPathSegCurvetoQuadraticSmoothAbsImpl *>(segment); s->setPreviousX1(previousQuadraticX1); @@ -701,7 +701,7 @@ SVGPathElementImpl::MarkerData::MarkerData(SVGPathSegListImpl *path) previousQuadraticY1 = s->y1(cury); break; } - case PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: + case PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL: { SVGPathSegCurvetoQuadraticSmoothRelImpl *s = static_cast<SVGPathSegCurvetoQuadraticSmoothRelImpl *>(segment); s->setPreviousAbsX1(previousQuadraticX1); diff --git a/ksvg/impl/SVGPathSegArcImpl.h b/ksvg/impl/SVGPathSegArcImpl.h index d8a1f8f9..d77f0497 100644 --- a/ksvg/impl/SVGPathSegArcImpl.h +++ b/ksvg/impl/SVGPathSegArcImpl.h @@ -36,7 +36,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "A"; } - virtual TQString toString() const { return TQString("A %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("A %1 %2 %3 %4 %5 %6 %7").tqarg(m_r1).tqarg(m_r2).tqarg(m_angle).tqarg(m_largeArcFlag).tqarg(m_sweepFlag).tqarg(m_x).tqarg(m_y); } void setX(double x); double x() const; @@ -94,7 +94,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "a"; } - virtual TQString toString() const { return TQString("a %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("a %1 %2 %3 %4 %5 %6 %7").tqarg(m_r1).tqarg(m_r2).tqarg(m_angle).tqarg(m_largeArcFlag).tqarg(m_sweepFlag).tqarg(m_x).tqarg(m_y); } void setX(double x); double x() const; diff --git a/ksvg/impl/SVGPathSegCurvetoCubicImpl.h b/ksvg/impl/SVGPathSegCurvetoCubicImpl.h index 83f4de6b..7ab3a87b 100644 --- a/ksvg/impl/SVGPathSegCurvetoCubicImpl.h +++ b/ksvg/impl/SVGPathSegCurvetoCubicImpl.h @@ -36,7 +36,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "C"; } - virtual TQString toString() const { return TQString("C %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("C %1 %2 %3 %4 %5 %6").tqarg(m_x1).tqarg(m_y1).tqarg(m_x2).tqarg(m_y2).tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; @@ -88,7 +88,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "c"; } - virtual TQString toString() const { return TQString("c %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("c %1 %2 %3 %4 %5 %6").tqarg(m_x1).tqarg(m_y1).tqarg(m_x2).tqarg(m_y2).tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; diff --git a/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h b/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h index 3bcc8c87..ff52bfab 100644 --- a/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h +++ b/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h @@ -36,7 +36,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "S"; } - virtual TQString toString() const { return TQString("S %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("S %1 %2 %3 %4").tqarg(m_x2).tqarg(m_y2).tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; @@ -88,7 +88,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "s"; } - virtual TQString toString() const { return TQString("s %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("s %1 %2 %3 %4").tqarg(m_x2).tqarg(m_y2).tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; diff --git a/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h b/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h index 6772605f..d8e876b5 100644 --- a/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h +++ b/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h @@ -34,9 +34,9 @@ public: SVGPathSegCurvetoQuadraticAbsImpl(); virtual ~SVGPathSegCurvetoQuadraticAbsImpl(); - virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_ABS; } + virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "Q"; } - virtual TQString toString() const { return TQString("Q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("Q %1 %2 %3 %4").tqarg(m_x1).tqarg(m_y1).tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; @@ -78,9 +78,9 @@ public: SVGPathSegCurvetoQuadraticRelImpl(); virtual ~SVGPathSegCurvetoQuadraticRelImpl(); - virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_REL; } + virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "q"; } - virtual TQString toString() const { return TQString("q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("q %1 %2 %3 %4").tqarg(m_x1).tqarg(m_y1).tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; diff --git a/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h b/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h index 6c471bd6..be0a4033 100644 --- a/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h +++ b/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h @@ -34,9 +34,9 @@ public: SVGPathSegCurvetoQuadraticSmoothAbsImpl(); virtual ~SVGPathSegCurvetoQuadraticSmoothAbsImpl(); - virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; } + virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "T"; } - virtual TQString toString() const { return TQString("T %1 %2").arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("T %1 %2").tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; @@ -78,9 +78,9 @@ public: SVGPathSegCurvetoQuadraticSmoothRelImpl(); virtual ~SVGPathSegCurvetoQuadraticSmoothRelImpl(); - virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; } + virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "t"; } - virtual TQString toString() const { return TQString("t %1 %2").arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("t %1 %2").tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; diff --git a/ksvg/impl/SVGPathSegImpl.cc b/ksvg/impl/SVGPathSegImpl.cc index c1f2934d..ba2c8ec2 100644 --- a/ksvg/impl/SVGPathSegImpl.cc +++ b/ksvg/impl/SVGPathSegImpl.cc @@ -79,8 +79,8 @@ Value SVGPathSegImpl::getValueProperty(ExecState *, int token) const PATHSEG_LINETO_REL KSVG::PATHSEG_LINETO_REL DontDelete|ReadOnly PATHSEG_CURVETO_CUBIC_ABS KSVG::PATHSEG_CURVETO_CUBIC_ABS DontDelete|ReadOnly PATHSEG_CURVETO_CUBIC_REL KSVG::PATHSEG_CURVETO_CUBIC_REL DontDelete|ReadOnly - PATHSEG_CURVETO_QUADRATIC_ABS KSVG::PATHSEG_CURVETO_QUADRATIC_ABS DontDelete|ReadOnly - PATHSEG_CURVETO_QUADRATIC_REL KSVG::PATHSEG_CURVETO_QUADRATIC_REL DontDelete|ReadOnly + PATHSEG_CURVETO_TQUADRATIC_ABS KSVG::PATHSEG_CURVETO_TQUADRATIC_ABS DontDelete|ReadOnly + PATHSEG_CURVETO_TQUADRATIC_REL KSVG::PATHSEG_CURVETO_TQUADRATIC_REL DontDelete|ReadOnly PATHSEG_ARC_ABS KSVG::PATHSEG_ARC_ABS DontDelete|ReadOnly PATHSEG_ARC_REL KSVG::PATHSEG_ARC_REL DontDelete|ReadOnly PATHSEG_LINETO_HORIZONTAL_ABS KSVG::PATHSEG_LINETO_HORIZONTAL_ABS DontDelete|ReadOnly @@ -89,8 +89,8 @@ Value SVGPathSegImpl::getValueProperty(ExecState *, int token) const PATHSEG_LINETO_VERTICAL_REL KSVG::PATHSEG_LINETO_VERTICAL_REL DontDelete|ReadOnly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS KSVG::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS DontDelete|ReadOnly PATHSEG_CURVETO_CUBIC_SMOOTH_REL KSVG::PATHSEG_CURVETO_CUBIC_SMOOTH_REL DontDelete|ReadOnly - PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS KSVG::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS DontDelete|ReadOnly - PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL KSVG::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL DontDelete|ReadOnly + PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS KSVG::PATHSEG_CURVETO_TQUADRATIC_SMOOTH_ABS DontDelete|ReadOnly + PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL KSVG::PATHSEG_CURVETO_TQUADRATIC_SMOOTH_REL DontDelete|ReadOnly @end */ diff --git a/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h b/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h index 52355c5d..f170b303 100644 --- a/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h +++ b/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h @@ -36,7 +36,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "H"; } - virtual TQString toString() const { return TQString("H %1").arg(m_x); } + virtual TQString toString() const { return TQString("H %1").tqarg(m_x); } void setX(const double &); double x() const; @@ -68,7 +68,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "h"; } - virtual TQString toString() const { return TQString("h %1").arg(m_x); } + virtual TQString toString() const { return TQString("h %1").tqarg(m_x); } void setX(const double &); double x() const; diff --git a/ksvg/impl/SVGPathSegLinetoImpl.h b/ksvg/impl/SVGPathSegLinetoImpl.h index 78df51b9..69caeba4 100644 --- a/ksvg/impl/SVGPathSegLinetoImpl.h +++ b/ksvg/impl/SVGPathSegLinetoImpl.h @@ -36,7 +36,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "L"; } - virtual TQString toString() const { return TQString("L %1 %2").arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("L %1 %2").tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; @@ -72,7 +72,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_LINETO_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "l"; } - virtual TQString toString() const { return TQString("l %1 %2").arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("l %1 %2").tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; diff --git a/ksvg/impl/SVGPathSegLinetoVerticalImpl.h b/ksvg/impl/SVGPathSegLinetoVerticalImpl.h index 1bbf41f4..9e50405f 100644 --- a/ksvg/impl/SVGPathSegLinetoVerticalImpl.h +++ b/ksvg/impl/SVGPathSegLinetoVerticalImpl.h @@ -36,7 +36,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "V"; } - virtual TQString toString() const { return TQString("V %1").arg(m_y); } + virtual TQString toString() const { return TQString("V %1").tqarg(m_y); } void setY(const double &); double y() const; @@ -68,7 +68,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "v"; } - virtual TQString toString() const { return TQString("v %1").arg(m_y); } + virtual TQString toString() const { return TQString("v %1").tqarg(m_y); } void setY(const double &); double y() const; diff --git a/ksvg/impl/SVGPathSegMovetoImpl.h b/ksvg/impl/SVGPathSegMovetoImpl.h index 6db95702..dfa25935 100644 --- a/ksvg/impl/SVGPathSegMovetoImpl.h +++ b/ksvg/impl/SVGPathSegMovetoImpl.h @@ -36,7 +36,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "M"; } - virtual TQString toString() const { return TQString("M %1 %2").arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("M %1 %2").tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; @@ -72,7 +72,7 @@ public: virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; } virtual DOM::DOMString pathSegTypeAsLetter() const { return "m"; } - virtual TQString toString() const { return TQString("m %1 %2").arg(m_x).arg(m_y); } + virtual TQString toString() const { return TQString("m %1 %2").tqarg(m_x).tqarg(m_y); } void setX(const double &); double x() const; diff --git a/ksvg/impl/SVGPatternElementImpl.cc b/ksvg/impl/SVGPatternElementImpl.cc index 24d03239..99c79ff6 100644 --- a/ksvg/impl/SVGPatternElementImpl.cc +++ b/ksvg/impl/SVGPatternElementImpl.cc @@ -314,7 +314,7 @@ TQImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int if(m_canvas == 0) { m_canvas = CanvasFactory::self()->loadCanvas(image.width(), image.height()); - m_canvas->setBackgroundColor(qRgba(0, 0, 0, 0)); + m_canvas->setBackgroundColor(tqRgba(0, 0, 0, 0)); } m_canvas->setup(image.bits(), image.width(), image.height()); @@ -350,22 +350,22 @@ TQImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int for(DOM::Node node = m_location->firstChild(); !node.isNull(); node = node.nextSibling()) { SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); bool ok = tests ? tests->ok() : true; - if(element && shape && style && ok && style->getVisible() && style->getDisplay()) + if(element && tqshape && style && ok && style->getVisible() && style->getDisplay()) { SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(element); if(locatable) locatable->updateCachedScreenCTM(baseMatrix); element->createItem(m_canvas); - if(shape->item()) + if(tqshape->item()) { - shape->item()->setReferenced(true); - m_canvas->invalidate(shape->item(), true); + tqshape->item()->setReferenced(true); + m_canvas->tqinvalidate(tqshape->item(), true); } } } @@ -433,7 +433,7 @@ void SVGPatternElementImpl::reference(const TQString &href) SVGHelperImpl::copyAttributes(src, this); // Spec: Change location to referenced element so we - // can take the children elements to render from there + // can take the tqchildren elements to render from there if(m_location == this) m_location = src; } @@ -486,7 +486,7 @@ SVGPatternElementImpl::Tile SVGPatternElementImpl::createTile(SVGShapeImpl *refe TQSize size(imageWidth, imageHeight); TQImage image; - if(!m_tileCache.find(size, image)) + if(!m_tileCache.tqfind(size, image)) { image = createTile(referencingElement, imageWidth, imageHeight); m_tileCache.insert(size, image, image.width() * image.height() * 4); diff --git a/ksvg/impl/SVGSVGElementImpl.cc b/ksvg/impl/SVGSVGElementImpl.cc index c9b82445..b436ee73 100644 --- a/ksvg/impl/SVGSVGElementImpl.cc +++ b/ksvg/impl/SVGSVGElementImpl.cc @@ -166,7 +166,7 @@ void SVGSVGElementImpl::setAttributes() m_viewport->setWidth(width()->baseVal()->value()); m_viewport->setHeight(height()->baseVal()->value()); - if(isRootElement() && ownerDoc()->parentImage() == 0) + if(isRootElement() && ownerDoc()->tqparentImage() == 0) { if(ownerDoc()->canvas()) ownerDoc()->canvas()->setViewportDimension(int(ceil(width()->baseVal()->value() * currentScale())), int(ceil(height()->baseVal()->value() * currentScale()))); @@ -271,7 +271,7 @@ void SVGSVGElementImpl::setCurrentScale(float currentScale) if( m_currentScale != currentScale ) { m_currentScale = currentScale; - invalidateCachedMatrices(); + tqinvalidateCachedMatrices(); if(hasEventListener(SVGEvent::ZOOM_EVENT, true)) dispatchEvent(SVGEvent::ZOOM_EVENT, false, false); @@ -289,7 +289,7 @@ void SVGSVGElementImpl::setCurrentTranslate(const TQPoint &p) { m_currentTranslate->setX(p.x()); m_currentTranslate->setY(p.y()); - invalidateCachedMatrices(); + tqinvalidateCachedMatrices(); if(hasEventListener(SVGEvent::SCROLL_EVENT, true)) dispatchEvent(SVGEvent::SCROLL_EVENT, false, false); } @@ -372,18 +372,18 @@ DOM::NodeList SVGSVGElementImpl::getEnclosureList(SVGRectImpl *rect, SVGElementI for(; !node.isNull(); node = node.nextSibling()) { SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); - if(shape) + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); + if(tqshape) { - if(shape->isContainer()) + if(tqshape->isContainer()) // TODO : pass it on to container::getEnclosureList() which should return a NodeList - kdDebug() << "!shape" << endl; + kdDebug() << "!tqshape" << endl; else { - // TODO : add the shape to list if the test succeeds - SVGRectImpl *current = shape->getBBox(); - if(rect->qrect().contains(current->qrect(), true)) - kdDebug() << "shape : " << element->nodeName().string() << " is fully enclosed" << endl; + // TODO : add the tqshape to list if the test succeeds + SVGRectImpl *current = tqshape->getBBox(); + if(rect->qrect().tqcontains(current->qrect(), true)) + kdDebug() << "tqshape : " << element->nodeName().string() << " is fully enclosed" << endl; current->deref(); } @@ -395,11 +395,11 @@ DOM::NodeList SVGSVGElementImpl::getEnclosureList(SVGRectImpl *rect, SVGElementI bool SVGSVGElementImpl::checkIntersection(SVGElementImpl *element, SVGRectImpl *rect) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); - if(!shape) + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); + if(!tqshape) return false; - SVGRectImpl *current = shape->getBBox(); + SVGRectImpl *current = tqshape->getBBox(); bool result = rect->qrect().intersects(current->qrect()); current->deref(); return result; @@ -407,12 +407,12 @@ bool SVGSVGElementImpl::checkIntersection(SVGElementImpl *element, SVGRectImpl * bool SVGSVGElementImpl::checkEnclosure(SVGElementImpl *element, SVGRectImpl *rect) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); - if(!shape) + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); + if(!tqshape) return false; - SVGRectImpl *current = shape->getBBox(); - bool result = rect->qrect().contains(current->qrect()); + SVGRectImpl *current = tqshape->getBBox(); + bool result = rect->qrect().tqcontains(current->qrect()); current->deref(); return result; } @@ -672,7 +672,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV elem = (*it)->element(); if(elem) { - // Check if mouse is over a certain shape... + // Check if mouse is over a certain tqshape... // mop: once an element has been found check eventlisteners and leave immediately ret = elem->prepareMouseEvent(p, userA, mev); if(ret) break; @@ -693,7 +693,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV dorerender = true; // mop: if it has the event then rerender } - // If a mouse "moves" over a shape, it's also "over" the shape + // If a mouse "moves" over a tqshape, it's also "over" the tqshape if(mev->id() == SVGEvent::MOUSEMOVE_EVENT) { mev->target()->setMouseOver(true); @@ -742,7 +742,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV } } - // The mouse is over a shape, so we have a target..we need to register that for a mouseout + // The mouse is over a tqshape, so we have a target..we need to register that for a mouseout ownerDoc()->setLastTarget(mev->target()); } diff --git a/ksvg/impl/SVGSVGElementImpl.h b/ksvg/impl/SVGSVGElementImpl.h index d2667a35..b5d6212d 100644 --- a/ksvg/impl/SVGSVGElementImpl.h +++ b/ksvg/impl/SVGSVGElementImpl.h @@ -158,7 +158,7 @@ private: TQMap<TQString, SVGElementImpl *> m_map; - // Transformation provided by the 'parent' of the outermost svg element + // Transformation provided by the 'tqparent' of the outermost svg element SVGMatrixImpl *m_rootParentScreenCTM; SVGMatrixImpl *m_localMatrix; diff --git a/ksvg/impl/SVGScriptElementImpl.cc b/ksvg/impl/SVGScriptElementImpl.cc index 230adf25..c7e6994e 100644 --- a/ksvg/impl/SVGScriptElementImpl.cc +++ b/ksvg/impl/SVGScriptElementImpl.cc @@ -95,7 +95,7 @@ void SVGScriptElementImpl::slotResult(KIO::Job *) m_data[m_data.size() - 1] = '\0'; TQBuffer buf(m_data); - TQIODevice *dev = KFilterDev::device(&buf, "application/x-gzip", false); + TQIODevice *dev = KFilterDev::device(TQT_TQIODEVICE(&buf), "application/x-gzip", false); TQByteArray contents; if(dev->open(IO_ReadOnly)) contents = dev->readAll(); diff --git a/ksvg/impl/SVGScriptElementImpl.h b/ksvg/impl/SVGScriptElementImpl.h index f3662fa6..50ff92b2 100644 --- a/ksvg/impl/SVGScriptElementImpl.h +++ b/ksvg/impl/SVGScriptElementImpl.h @@ -42,6 +42,7 @@ class SVGScriptElementImpl : public TQObject, public SVGExternalResourcesRequiredImpl { Q_OBJECT + TQ_OBJECT public: SVGScriptElementImpl(DOM::ElementImpl *); virtual ~SVGScriptElementImpl(); diff --git a/ksvg/impl/SVGShapeImpl.cc b/ksvg/impl/SVGShapeImpl.cc index d8ef45c5..255ab286 100644 --- a/ksvg/impl/SVGShapeImpl.cc +++ b/ksvg/impl/SVGShapeImpl.cc @@ -59,9 +59,9 @@ SVGShapeImpl::~SVGShapeImpl() bool SVGShapeImpl::directRender() { - SVGShapeImpl *parent = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(parentNode().handle())); - if(parent) - return parent->directRender(); + SVGShapeImpl *tqparent = dynamic_cast<SVGShapeImpl *>(ownerDoc()->getElementFromHandle(parentNode().handle())); + if(tqparent) + return tqparent->directRender(); else return true; } @@ -125,10 +125,10 @@ void SVGShapeImpl::update(CanvasItemUpdate reason, int param1, int param2) m_item->update(reason, param1, param2); } -void SVGShapeImpl::invalidate(KSVGCanvas *c, bool recalc) +void SVGShapeImpl::tqinvalidate(KSVGCanvas *c, bool recalc) { if(m_item && c) - c->invalidate(m_item, recalc); + c->tqinvalidate(m_item, recalc); } void SVGShapeImpl::setReferenced(bool referenced) diff --git a/ksvg/impl/SVGShapeImpl.h b/ksvg/impl/SVGShapeImpl.h index c61038d2..c059d448 100644 --- a/ksvg/impl/SVGShapeImpl.h +++ b/ksvg/impl/SVGShapeImpl.h @@ -49,7 +49,7 @@ public: virtual bool isContainer() const { return false; } virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0); - virtual void invalidate(KSVGCanvas *c, bool recalc); + virtual void tqinvalidate(KSVGCanvas *c, bool recalc); virtual void setReferenced(bool referenced); virtual void draw(); virtual void blit(KSVGCanvas *); diff --git a/ksvg/impl/SVGStylableImpl.cc b/ksvg/impl/SVGStylableImpl.cc index 17a3e8cd..4b20ecc7 100644 --- a/ksvg/impl/SVGStylableImpl.cc +++ b/ksvg/impl/SVGStylableImpl.cc @@ -98,9 +98,9 @@ SVGStylableImpl::~SVGStylableImpl() void SVGStylableImpl::processStyle() { - SVGStylableImpl *parentStyle = 0; + SVGStylableImpl *tqparentStyle = 0; if(m_object && m_object->ownerDoc()) - parentStyle = dynamic_cast<SVGStylableImpl *>(m_object->ownerDoc()->getElementFromHandle((*m_object).parentNode().handle())); + tqparentStyle = dynamic_cast<SVGStylableImpl *>(m_object->ownerDoc()->getElementFromHandle((*m_object).parentNode().handle())); // Spec: default "none" if(~m_flags & SVG_STYLE_FLAG_STROKE) @@ -109,8 +109,8 @@ void SVGStylableImpl::processStyle() m_strokeColor->ref(); SVGPaintImpl *strokeColor = 0L; - if(parentStyle) - strokeColor = parentStyle->getStrokeColor(); + if(tqparentStyle) + strokeColor = tqparentStyle->getStrokeColor(); if(strokeColor) *m_strokeColor = *strokeColor; @@ -125,8 +125,8 @@ void SVGStylableImpl::processStyle() m_fillColor->ref(); SVGPaintImpl *fillColor = 0; - if(parentStyle) - fillColor = parentStyle->getFillColor(); + if(tqparentStyle) + fillColor = tqparentStyle->getFillColor(); if(fillColor) *m_fillColor = *fillColor; @@ -140,8 +140,8 @@ void SVGStylableImpl::processStyle() m_color = new SVGColorImpl(m_object); m_color->ref(); SVGColorImpl *color = 0; - if(parentStyle) - color = parentStyle->getColor(); + if(tqparentStyle) + color = tqparentStyle->getColor(); if(color) *m_color = *color; @@ -150,8 +150,8 @@ void SVGStylableImpl::processStyle() // Spec: default sRGB if(~m_flags & SVG_STYLE_FLAG_COLOR_INTERPOLATION) { - if(parentStyle) - m_colorInterpolation = parentStyle->getColorInterpolation(); + if(tqparentStyle) + m_colorInterpolation = tqparentStyle->getColorInterpolation(); else m_colorInterpolation = CI_SRGB; } @@ -163,8 +163,8 @@ void SVGStylableImpl::processStyle() m_strokeWidth->ref(); SVGAnimatedLengthImpl *strokeWidth = 0; - if(parentStyle) - strokeWidth = parentStyle->getStrokeWidth(); + if(tqparentStyle) + strokeWidth = tqparentStyle->getStrokeWidth(); if(strokeWidth) *m_strokeWidth = *strokeWidth; @@ -175,8 +175,8 @@ void SVGStylableImpl::processStyle() // Spec: default "4" if(~m_flags & SVG_STYLE_FLAG_STROKE_MITER_LIMIT) { - if(parentStyle) - m_strokeMiterlimit = parentStyle->getStrokeMiterlimit(); + if(tqparentStyle) + m_strokeMiterlimit = tqparentStyle->getStrokeMiterlimit(); else m_strokeMiterlimit = 4; } @@ -184,8 +184,8 @@ void SVGStylableImpl::processStyle() // Spec: default "butt" if(~m_flags & SVG_STYLE_FLAG_STROKE_LINE_CAP) { - if(parentStyle) - m_capStyle = parentStyle->getCapStyle(); + if(tqparentStyle) + m_capStyle = tqparentStyle->getCapStyle(); else m_capStyle = PATH_STROKE_CAP_BUTT; } @@ -193,8 +193,8 @@ void SVGStylableImpl::processStyle() // Spec: default "miter" if(~m_flags & SVG_STYLE_FLAG_STROKE_LINE_JOIN) { - if(parentStyle) - m_joinStyle = parentStyle->getJoinStyle(); + if(tqparentStyle) + m_joinStyle = tqparentStyle->getJoinStyle(); else m_joinStyle = PATH_STROKE_JOIN_MITER; } @@ -202,8 +202,8 @@ void SVGStylableImpl::processStyle() // Spec: default "auto" if(~m_flags & SVG_STYLE_FLAG_CURSOR) { - if(parentStyle) - m_cursor = parentStyle->getCursor(); + if(tqparentStyle) + m_cursor = tqparentStyle->getCursor(); else m_cursor = CURSOR_AUTO; } @@ -211,8 +211,8 @@ void SVGStylableImpl::processStyle() // Spec: default "visiblePainted" if(~m_flags & SVG_STYLE_FLAG_POINTER_EVENTS) { - if(parentStyle) - m_pointerEvents = parentStyle->getPointerEvents(); + if(tqparentStyle) + m_pointerEvents = tqparentStyle->getPointerEvents(); else m_pointerEvents = PE_VISIBLE_PAINTED; } @@ -224,8 +224,8 @@ void SVGStylableImpl::processStyle() m_dashOffset->ref(); SVGAnimatedLengthImpl *dashOffset = 0; - if(parentStyle) - dashOffset = parentStyle->getDashOffset(); + if(tqparentStyle) + dashOffset = tqparentStyle->getDashOffset(); if(dashOffset) *m_dashOffset = *dashOffset; @@ -237,8 +237,8 @@ void SVGStylableImpl::processStyle() if(~m_flags & SVG_STYLE_FLAG_STROKE_DASH_ARRAY) { SVGAnimatedLengthListImpl *dashArray = 0; - if(parentStyle) - dashArray = parentStyle->getDashArray(); + if(tqparentStyle) + dashArray = tqparentStyle->getDashArray(); if(dashArray) { @@ -256,51 +256,51 @@ void SVGStylableImpl::processStyle() // Spec: default "1" -> 1 == Not opaque if(~m_flags & SVG_STYLE_FLAG_FILL_OPACITY) { - if(parentStyle) - m_fillOpacity = parentStyle->getFillOpacity(); + if(tqparentStyle) + m_fillOpacity = tqparentStyle->getFillOpacity(); else m_fillOpacity = 1; } if(~m_flags & SVG_STYLE_FLAG_STROKE_OPACITY) { - if(parentStyle) - m_strokeOpacity = parentStyle->getStrokeOpacity(); + if(tqparentStyle) + m_strokeOpacity = tqparentStyle->getStrokeOpacity(); else m_strokeOpacity = 1; } - // Fake group opacity by multiplying by our parent's group opacity + // Fake group opacity by multiplying by our tqparent's group opacity if(~m_flags & SVG_STYLE_FLAG_OPACITY) { - if(parentStyle) - m_opacity = parentStyle->getOpacity(); + if(tqparentStyle) + m_opacity = tqparentStyle->getOpacity(); else m_opacity = 1; } else - if(parentStyle) - m_opacity *= parentStyle->getOpacity(); + if(tqparentStyle) + m_opacity *= tqparentStyle->getOpacity(); if(~m_flags & SVG_STYLE_FLAG_CLIP_PATH) m_clipPath = ""; if(~m_flags & SVG_STYLE_FLAG_MASK) - m_mask = ""; + m_tqmask = ""; // Spec: default "nonzero" if(~m_flags & SVG_STYLE_FLAG_FILL_RULE) { - if(parentStyle) - m_fillRule = parentStyle->getFillRule(); + if(tqparentStyle) + m_fillRule = tqparentStyle->getFillRule(); else m_fillRule = RULE_NONZERO; } if(~m_flags & SVG_STYLE_FLAG_CLIP_RULE) { - if(parentStyle) - m_clipRule = parentStyle->getClipRule(); + if(tqparentStyle) + m_clipRule = tqparentStyle->getClipRule(); else m_clipRule = RULE_NONZERO; } @@ -308,8 +308,8 @@ void SVGStylableImpl::processStyle() // Spec: default "hidden" if(~m_flags & SVG_STYLE_FLAG_OVERFLOW) { - if(parentStyle) - m_overflow = parentStyle->getOverflow(); + if(tqparentStyle) + m_overflow = tqparentStyle->getOverflow(); else m_overflow = false; } @@ -322,8 +322,8 @@ void SVGStylableImpl::processStyle() if(~m_flags & SVG_STYLE_FLAG_VISIBILITY) { - if(parentStyle) - m_visible = parentStyle->getVisible(); + if(tqparentStyle) + m_visible = tqparentStyle->getVisible(); else m_visible = true; } @@ -331,8 +331,8 @@ void SVGStylableImpl::processStyle() // Spec: default "medium" if(~m_flags & SVG_STYLE_FLAG_FONT_SIZE) { - if(parentStyle) - m_fontSize = parentStyle->getFontSize(); + if(tqparentStyle) + m_fontSize = tqparentStyle->getFontSize(); else m_fontSize = fontSizeForText("medium"); } @@ -347,8 +347,8 @@ void SVGStylableImpl::processStyle() } SVGStringListImpl *fontFamily = 0; - if(parentStyle) - fontFamily = parentStyle->getFontFamily(); + if(tqparentStyle) + fontFamily = tqparentStyle->getFontFamily(); if(fontFamily) *m_fontFamily = *fontFamily; @@ -364,8 +364,8 @@ void SVGStylableImpl::processStyle() // Spec: default "normal" if(~m_flags & SVG_STYLE_FLAG_FONT_STYLE) { - if(parentStyle) - m_fontStyle = parentStyle->getFontStyle(); + if(tqparentStyle) + m_fontStyle = tqparentStyle->getFontStyle(); else m_fontStyle = FSNORMAL; } @@ -373,8 +373,8 @@ void SVGStylableImpl::processStyle() // Spec: default "normal" if(~m_flags & SVG_STYLE_FLAG_FONT_WEIGHT) { - if(parentStyle) - m_fontWeight = parentStyle->getFontWeight(); + if(tqparentStyle) + m_fontWeight = tqparentStyle->getFontWeight(); else m_fontWeight = "normal"; } @@ -382,8 +382,8 @@ void SVGStylableImpl::processStyle() // Spec: default "start" if(~m_flags & SVG_STYLE_FLAG_TEXT_ANCHOR) { - if(parentStyle) - m_textAnchor = parentStyle->getTextAnchor(); + if(tqparentStyle) + m_textAnchor = tqparentStyle->getTextAnchor(); else m_textAnchor = TASTART; } @@ -391,8 +391,8 @@ void SVGStylableImpl::processStyle() // Spec: default "LTR" if(~m_flags & SVG_STYLE_FLAG_TEXT_DIRECTION) { - if(parentStyle) - m_textDirection = parentStyle->getTextDirection(); + if(tqparentStyle) + m_textDirection = tqparentStyle->getTextDirection(); else m_textDirection = LTR; } @@ -400,8 +400,8 @@ void SVGStylableImpl::processStyle() // Spec: default "none" if(~m_flags & SVG_STYLE_FLAG_TEXT_DECORATION) { - if(parentStyle) - m_textDecoration = parentStyle->getTextDecoration(); + if(tqparentStyle) + m_textDecoration = tqparentStyle->getTextDecoration(); else m_textDecoration = TDNONE; } @@ -409,8 +409,8 @@ void SVGStylableImpl::processStyle() // Spec: default "baseline" if(~m_flags & SVG_STYLE_FLAG_BASELINE_SHIFT) { - if(parentStyle) - m_baselineShift = parentStyle->getBaselineShift(); + if(tqparentStyle) + m_baselineShift = tqparentStyle->getBaselineShift(); else m_baselineShift = "baseline"; } @@ -418,8 +418,8 @@ void SVGStylableImpl::processStyle() // Spec: default "lr-tb", FIXME if(~m_flags & SVG_STYLE_FLAG_TEXT_WRITING_MODE) { - if(parentStyle) - m_textWritingMode = parentStyle->getTextWritingMode(); + if(tqparentStyle) + m_textWritingMode = tqparentStyle->getTextWritingMode(); else m_textWritingMode = LR; } @@ -427,8 +427,8 @@ void SVGStylableImpl::processStyle() // Spec: default "normal" if(~m_flags & SVG_STYLE_FLAG_TEXT_UNICODE_BIDI) { - if(parentStyle) - m_textUnicodeBidi = parentStyle->getTextUnicodeBidi(); + if(tqparentStyle) + m_textUnicodeBidi = tqparentStyle->getTextUnicodeBidi(); else m_textUnicodeBidi = UBNORMAL; } @@ -436,8 +436,8 @@ void SVGStylableImpl::processStyle() // Spec: default "auto" if(~m_flags & SVG_STYLE_FLAG_GLYPH_ORIENTATION_VERTICAL) { - if(parentStyle) - m_glyphOrientationVertical = parentStyle->getGlyphOrientationVertical(); + if(tqparentStyle) + m_glyphOrientationVertical = tqparentStyle->getGlyphOrientationVertical(); else m_glyphOrientationVertical = "auto"; } @@ -445,8 +445,8 @@ void SVGStylableImpl::processStyle() // Spec: default "auto" if(~m_flags & SVG_STYLE_FLAG_GLYPH_ORIENTATION_HORIZONTAL) { - if(parentStyle) - m_glyphOrientationHorizontal = parentStyle->getGlyphOrientationHorizontal(); + if(tqparentStyle) + m_glyphOrientationHorizontal = tqparentStyle->getGlyphOrientationHorizontal(); else m_glyphOrientationHorizontal = "auto"; } @@ -454,8 +454,8 @@ void SVGStylableImpl::processStyle() // Spec: default "normal" if(~m_flags & SVG_STYLE_FLAG_LETTER_SPACING) { - if(parentStyle) - m_letterSpacing = parentStyle->getLetterSpacing(); + if(tqparentStyle) + m_letterSpacing = tqparentStyle->getLetterSpacing(); else m_letterSpacing = "normal"; } @@ -463,8 +463,8 @@ void SVGStylableImpl::processStyle() // Spec: default "normal" if(~m_flags & SVG_STYLE_FLAG_WORD_SPACING) { - if(parentStyle) - m_wordSpacing = parentStyle->getWordSpacing(); + if(tqparentStyle) + m_wordSpacing = tqparentStyle->getWordSpacing(); else m_wordSpacing = "normal"; } @@ -481,28 +481,28 @@ void SVGStylableImpl::processStyle() // Spec: default "none" if(~m_flags & SVG_STYLE_FLAG_MARKER_START) { - if(parentStyle) - m_startMarker = parentStyle->getStartMarker(); + if(tqparentStyle) + m_startMarker = tqparentStyle->getStartMarker(); else - m_startMarker = TQString::null; + m_startMarker = TQString(); } // Spec: default "none" if(~m_flags & SVG_STYLE_FLAG_MARKER_MID) { - if(parentStyle) - m_midMarker = parentStyle->getMidMarker(); + if(tqparentStyle) + m_midMarker = tqparentStyle->getMidMarker(); else - m_midMarker = TQString::null; + m_midMarker = TQString(); } // Spec: default "none" if(~m_flags & SVG_STYLE_FLAG_MARKER_END) { - if(parentStyle) - m_endMarker = parentStyle->getEndMarker(); + if(tqparentStyle) + m_endMarker = tqparentStyle->getEndMarker(); else - m_endMarker = TQString::null; + m_endMarker = TQString(); } } @@ -532,7 +532,7 @@ TQString SVGStylableImpl::extractUrlId(const TQString &url) if(url.startsWith("url(#")) { - int idstart = url.find("#") + 1; + int idstart = url.tqfind("#") + 1; id = url.mid(idstart, url.length() - idstart - 1); } else @@ -552,33 +552,33 @@ void SVGStylableImpl::setStartMarker(const TQString &startMarker) { if(startMarker.startsWith("url(#")) { - int idstart = startMarker.find("#") + 1; + int idstart = startMarker.tqfind("#") + 1; m_startMarker = startMarker.mid(idstart, startMarker.length() - idstart - 1); } else if(startMarker == "none") - m_startMarker = TQString::null; + m_startMarker = TQString(); } void SVGStylableImpl::setMidMarker(const TQString &midMarker) { if(midMarker.startsWith("url(#")) { - int idstart = midMarker.find("#") + 1; + int idstart = midMarker.tqfind("#") + 1; m_midMarker = midMarker.mid(idstart, midMarker.length() - idstart - 1); } else if(midMarker == "none") - m_midMarker = TQString::null; + m_midMarker = TQString(); } void SVGStylableImpl::setEndMarker(const TQString &endMarker) { if(endMarker.startsWith("url(#")) { - int idstart = endMarker.find("#") + 1; + int idstart = endMarker.tqfind("#") + 1; m_endMarker = endMarker.mid(idstart, endMarker.length() - idstart - 1); } else if(endMarker == "none") - m_endMarker = TQString::null; + m_endMarker = TQString(); } bool SVGStylableImpl::hasMarkers() const @@ -600,7 +600,7 @@ void SVGStylableImpl::setColor(const TQString ¶m, SVGColorImpl *svgColor) { if(param.stripWhiteSpace().startsWith("#")) { - if(param.contains("icc-color")) + if(param.tqcontains("icc-color")) { TQString first = param.left(7); TQString last = param.right(param.length() - 8); @@ -622,19 +622,19 @@ void SVGStylableImpl::setColor(const TQString ¶m, SVGColorImpl *svgColor) TQString g = colors[1]; TQString b = colors[2].left((colors[2].length() - 1)); - if(r.contains("%")) + if(r.tqcontains("%")) { r = r.left(r.length() - 1); r = TQString::number(int((double(255 * r.toDouble()) / 100.0))); } - if(g.contains("%")) + if(g.tqcontains("%")) { g = g.left(g.length() - 1); g = TQString::number(int((double(255 * g.toDouble()) / 100.0))); } - if(b.contains("%")) + if(b.tqcontains("%")) { b = b.left(b.length() - 1); b = TQString::number(int((double(255 * b.toDouble()) / 100.0))); @@ -711,7 +711,7 @@ float SVGStylableImpl::fontSizeForText(const TQString &value) text-anchor SVGStylableImpl::TextAnchor DontDelete|ReadOnly direction SVGStylableImpl::Direction DontDelete|ReadOnly writing-mode SVGStylableImpl::WritingMode DontDelete|ReadOnly - unicode-bidi SVGStylableImpl::UnicodeBidi DontDelete|ReadOnly + tqunicode-bidi SVGStylableImpl::UnicodeBidi DontDelete|ReadOnly opacity SVGStylableImpl::Opacity DontDelete|ReadOnly fill-opacity SVGStylableImpl::FillOpacity DontDelete|ReadOnly stroke-opacity SVGStylableImpl::StrokeOpacity DontDelete|ReadOnly @@ -737,7 +737,7 @@ float SVGStylableImpl::fontSizeForText(const TQString &value) glyph-orientation-vertical SVGStylableImpl::GlyphOrientationVertical DontDelete|ReadOnly glyph-orientation-horizontal SVGStylableImpl::GlyphOrientationHorizontal DontDelete|ReadOnly color-interpolation SVGStylableImpl::ColorInterpolation DontDelete|ReadOnly - mask SVGStylableImpl::Mask DontDelete|ReadOnly + tqmask SVGStylableImpl::Mask DontDelete|ReadOnly @end @namespace KSVG @begin SVGStylableImplProto::s_hashTable 2 @@ -946,12 +946,12 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value & // Hacks // #1 Replace "'" characters by "" - param = param.replace('\'', TQString::null); + param = param.tqreplace('\'', TQString()); // #2 Replace "MS-Gothic" by "MS Gothic" - param = param.replace("MS-Gothic", "MS Gothic"); + param = param.tqreplace("MS-Gothic", "MS Gothic"); // #3 Replace "Helvetica" by "Arial" - param = param.replace("Helvetica", "Arial"); - param = param.replace("helvetica", "Arial"); + param = param.tqreplace("Helvetica", "Arial"); + param = param.tqreplace("helvetica", "Arial"); if(!m_fontFamily) { @@ -974,7 +974,7 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value & else if(param == "italic") m_fontStyle = ITALIC; else if(param == "oblique") - m_fontStyle = OBLIQUE; + m_fontStyle = OBLITQUE; break; case TextDecoration: m_flags |= SVG_STYLE_FLAG_TEXT_DECORATION; @@ -1006,7 +1006,7 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value & break; case Direction: m_flags |= SVG_STYLE_FLAG_TEXT_DIRECTION; - // Spec: direction is only processed when unicode-bidi + // Spec: direction is only processed when tqunicode-bidi // is set to bidi-override or embedded if(m_textUnicodeBidi == OVERRIDE || m_textUnicodeBidi == EMBED || @@ -1076,7 +1076,7 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value & case Mask: m_flags |= SVG_STYLE_FLAG_MASK; if(!inherit) - m_mask = extractUrlId(param); + m_tqmask = extractUrlId(param); break; case MarkerStart: m_flags |= SVG_STYLE_FLAG_MARKER_START; @@ -1276,16 +1276,16 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value & if(redraw) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_object); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_object); if(inherit) processStyle(); - if(shape && shape->item()) + if(tqshape && tqshape->item()) { if(update > -1) - shape->item()->update(static_cast<CanvasItemUpdate>(update)); + tqshape->item()->update(static_cast<CanvasItemUpdate>(update)); else if(m_object) - m_object->ownerDoc()->canvas()->invalidate(shape->item(), false); + m_object->ownerDoc()->canvas()->tqinvalidate(tqshape->item(), false); } } } diff --git a/ksvg/impl/SVGStylableImpl.h b/ksvg/impl/SVGStylableImpl.h index 50a37568..e2493317 100644 --- a/ksvg/impl/SVGStylableImpl.h +++ b/ksvg/impl/SVGStylableImpl.h @@ -162,7 +162,7 @@ enum EUnicodeBidi enum EFontStyle { - FSNORMAL, ITALIC, OBLIQUE + FSNORMAL, ITALIC, OBLITQUE }; enum ETextWritingMode @@ -225,7 +225,7 @@ public: STYLE_GET(TQString, WordSpacing, m_wordSpacing) STYLE_GET(TQString, FontWeight, m_fontWeight) STYLE_GET(TQString, ClipPath, m_clipPath) - STYLE_GET(TQString, Mask, m_mask) + STYLE_GET(TQString, Mask, m_tqmask) STYLE_GET(TQString, StartMarker, m_startMarker) STYLE_GET(TQString, MidMarker, m_midMarker) STYLE_GET(TQString, EndMarker, m_endMarker) @@ -255,7 +255,7 @@ public: STYLE_GET_OPTIM(EColorInterpolation, ColorInterpolation, m_colorInterpolation, 1) STYLE_HAS(ClipPath, m_clipPath) - STYLE_HAS(Mask, m_mask) + STYLE_HAS(Mask, m_tqmask) STYLE_HAS(StartMarker, m_startMarker) STYLE_HAS(MidMarker, m_midMarker) STYLE_HAS(EndMarker, m_endMarker) diff --git a/ksvg/impl/SVGSwitchElementImpl.cc b/ksvg/impl/SVGSwitchElementImpl.cc index 613a1982..f6861521 100644 --- a/ksvg/impl/SVGSwitchElementImpl.cc +++ b/ksvg/impl/SVGSwitchElementImpl.cc @@ -41,13 +41,13 @@ void SVGSwitchElementImpl::createItem(KSVGCanvas *c) for(; !node.isNull(); node = node.nextSibling()) { SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(element); bool ok = tests ? tests->ok() : true; - if(element && shape && ok && style->getVisible() && style->getDisplay() && (shape->directRender() || !directRender())) + if(element && tqshape && ok && style->getVisible() && style->getDisplay() && (tqshape->directRender() || !directRender())) { element->createItem(c); break; diff --git a/ksvg/impl/SVGTextContentElementImpl.cc b/ksvg/impl/SVGTextContentElementImpl.cc index 302b54b7..63157883 100644 --- a/ksvg/impl/SVGTextContentElementImpl.cc +++ b/ksvg/impl/SVGTextContentElementImpl.cc @@ -95,7 +95,7 @@ TQString SVGTextContentElementImpl::textDirectionAwareText() return text; } -T2P::GlyphLayoutParams *SVGTextContentElementImpl::layoutParams() const +T2P::GlyphLayoutParams *SVGTextContentElementImpl::tqlayoutParams() const { SVGStylableImpl *style = const_cast<SVGTextContentElementImpl *>(this); diff --git a/ksvg/impl/SVGTextContentElementImpl.h b/ksvg/impl/SVGTextContentElementImpl.h index bd962037..85999cb9 100644 --- a/ksvg/impl/SVGTextContentElementImpl.h +++ b/ksvg/impl/SVGTextContentElementImpl.h @@ -52,7 +52,7 @@ public: TQString textDirectionAwareText(); - virtual T2P::GlyphLayoutParams *layoutParams() const; + virtual T2P::GlyphLayoutParams *tqlayoutParams() const; SVGAnimatedLengthImpl *textLength() const; SVGAnimatedEnumerationImpl *lengthAdjust() const; diff --git a/ksvg/impl/SVGTextElementImpl.cc b/ksvg/impl/SVGTextElementImpl.cc index 82a53ea9..7603c622 100644 --- a/ksvg/impl/SVGTextElementImpl.cc +++ b/ksvg/impl/SVGTextElementImpl.cc @@ -111,7 +111,7 @@ bool SVGTextElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &, SV if(test) { - if(m_item->bbox().contains(p)) + if(m_item->bbox().tqcontains(p)) { mev->setTarget(dynamic_cast<SVGElementImpl *>(this)); return true; diff --git a/ksvg/impl/SVGTextPathElementImpl.cc b/ksvg/impl/SVGTextPathElementImpl.cc index 78c272f8..6ef8d545 100644 --- a/ksvg/impl/SVGTextPathElementImpl.cc +++ b/ksvg/impl/SVGTextPathElementImpl.cc @@ -104,9 +104,9 @@ void SVGTextPathElementImpl::setAttributes() KSVG_SET_ALT_ATTRIBUTE(Spacing, "exact") } -T2P::GlyphLayoutParams *SVGTextPathElementImpl::layoutParams() const +T2P::GlyphLayoutParams *SVGTextPathElementImpl::tqlayoutParams() const { - T2P::GlyphLayoutParams *params = SVGTextContentElementImpl::layoutParams(); + T2P::GlyphLayoutParams *params = SVGTextContentElementImpl::tqlayoutParams(); params->setTextPathStartOffset(startOffset()->baseVal()->value()); return params; } diff --git a/ksvg/impl/SVGTextPathElementImpl.h b/ksvg/impl/SVGTextPathElementImpl.h index 98a88d33..e1776815 100644 --- a/ksvg/impl/SVGTextPathElementImpl.h +++ b/ksvg/impl/SVGTextPathElementImpl.h @@ -41,7 +41,7 @@ public: SVGAnimatedEnumerationImpl *spacing() const; virtual void setAttributes(); - virtual T2P::GlyphLayoutParams *layoutParams() const; + virtual T2P::GlyphLayoutParams *tqlayoutParams() const; private: SVGAnimatedLengthImpl *m_startOffset; diff --git a/ksvg/impl/SVGTimeScheduler.cc b/ksvg/impl/SVGTimeScheduler.cc index caddf81f..d2a10e5a 100644 --- a/ksvg/impl/SVGTimeScheduler.cc +++ b/ksvg/impl/SVGTimeScheduler.cc @@ -92,7 +92,7 @@ void SVGTimer::notifyAll() animation->handleTimerEvent(); SVGElementImpl *target = animation->targetElement(); - if(!elements.contains(target)) + if(!elements.tqcontains(target)) elements.append(target); } } @@ -101,9 +101,9 @@ void SVGTimer::notifyAll() TQValueList<SVGElementImpl *>::iterator it2; for(it2 = elements.begin(); it2 != elements.end(); ++it2) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(*it2); - if(shape && shape->item()) - shape->item()->update(UPDATE_TRANSFORM); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(*it2); + if(tqshape && tqshape->item()) + tqshape->item()->update(UPDATE_TRANSFORM); } } diff --git a/ksvg/impl/SVGTimeScheduler.h b/ksvg/impl/SVGTimeScheduler.h index 52f9c9b9..5b184a52 100644 --- a/ksvg/impl/SVGTimeScheduler.h +++ b/ksvg/impl/SVGTimeScheduler.h @@ -64,9 +64,10 @@ private: typedef TQValueList<SVGTimer *> SVGTimerList; class SVGDocumentImpl; -class SVGTimeScheduler : public QObject +class SVGTimeScheduler : public TQObject { Q_OBJECT + TQ_OBJECT public: SVGTimeScheduler(SVGDocumentImpl *doc); ~SVGTimeScheduler(); diff --git a/ksvg/impl/SVGTransformableImpl.cc b/ksvg/impl/SVGTransformableImpl.cc index 59dd904b..ce69aa83 100644 --- a/ksvg/impl/SVGTransformableImpl.cc +++ b/ksvg/impl/SVGTransformableImpl.cc @@ -83,18 +83,18 @@ SVGMatrixImpl *SVGTransformableImpl::getCTM() SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(this); Q_ASSERT(element); - DOM::Node parentNde = element->parentNode(); + DOM::Node tqparentNde = element->parentNode(); - if(!parentNde.isNull() && parentNde.nodeType() != DOM::Node::DOCUMENT_NODE) + if(!tqparentNde.isNull() && tqparentNde.nodeType() != DOM::Node::DOCUMENT_NODE) { - SVGElementImpl *parent = element->ownerDoc()->getElementFromHandle(parentNde.handle()); - SVGLocatableImpl *locatableParent = dynamic_cast<SVGLocatableImpl *>(parent); + SVGElementImpl *tqparent = element->ownerDoc()->getElementFromHandle(tqparentNde.handle()); + SVGLocatableImpl *locatableParent = dynamic_cast<SVGLocatableImpl *>(tqparent); if(locatableParent) { - SVGMatrixImpl *parentCTM = locatableParent->getCTM(); - ctm->multiply(parentCTM); - parentCTM->deref(); + SVGMatrixImpl *tqparentCTM = locatableParent->getCTM(); + ctm->multiply(tqparentCTM); + tqparentCTM->deref(); } } @@ -124,7 +124,7 @@ void SVGTransformableImpl::updateLocalMatrix() } } - invalidateCachedMatrices(); + tqinvalidateCachedMatrices(); } // Ecma stuff diff --git a/ksvg/impl/SVGURIReferenceImpl.cc b/ksvg/impl/SVGURIReferenceImpl.cc index 8a6fda76..52db7a86 100644 --- a/ksvg/impl/SVGURIReferenceImpl.cc +++ b/ksvg/impl/SVGURIReferenceImpl.cc @@ -50,7 +50,7 @@ SVGAnimatedStringImpl *SVGURIReferenceImpl::href() const bool SVGURIReferenceImpl::parseURIReference(const TQString &urireference, TQString &uri, TQString &elementreference) { - int seperator = urireference.find("#"); + int seperator = urireference.tqfind("#"); if(seperator == -1) return false; @@ -71,14 +71,14 @@ TQString SVGURIReferenceImpl::getTarget(const TQString &url) { if(url.startsWith("url(")) // URI References, ie. fill:url(#target) { - unsigned int start = url.find("#") + 1; - unsigned int end = url.findRev(")"); + unsigned int start = url.tqfind("#") + 1; + unsigned int end = url.tqfindRev(")"); return url.mid(start, end - start); } - else if(url.find("#") > -1) // format is #target + else if(url.tqfind("#") > -1) // format is #target { - unsigned int start = url.find("#") + 1; + unsigned int start = url.tqfind("#") + 1; return url.mid(start, url.length() - start); } diff --git a/ksvg/impl/SVGUnitConverter.h b/ksvg/impl/SVGUnitConverter.h index 78eb2528..db85c42d 100644 --- a/ksvg/impl/SVGUnitConverter.h +++ b/ksvg/impl/SVGUnitConverter.h @@ -41,14 +41,14 @@ public: void add(SVGAnimatedLengthImpl *obj) { UnitData *data = new UnitData(); - data->valueAsString = TQString::null; + data->valueAsString = TQString(); m_dict.insert(obj, data); } void modify(SVGAnimatedLengthImpl *obj, const TQString &value) { - UnitData *data = m_dict.find(obj); + UnitData *data = m_dict.tqfind(obj); if(data) data->valueAsString = value; diff --git a/ksvg/impl/SVGUseElementImpl.cc b/ksvg/impl/SVGUseElementImpl.cc index 457436cb..b7bc40f2 100644 --- a/ksvg/impl/SVGUseElementImpl.cc +++ b/ksvg/impl/SVGUseElementImpl.cc @@ -182,9 +182,9 @@ SVGRectImpl *SVGUseElementImpl::getBBox() { if(m_instanceRoot) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); - if(KSVG_TOKEN_NOT_PARSED(Width) && KSVG_TOKEN_NOT_PARSED(Height) && shape) - return shape->getBBox(); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); + if(KSVG_TOKEN_NOT_PARSED(Width) && KSVG_TOKEN_NOT_PARSED(Height) && tqshape) + return tqshape->getBBox(); } SVGRectImpl *ret = new SVGRectImpl(); @@ -223,7 +223,7 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c) KURL fragmentUrl(ownerDoc()->baseUrl(), url.string()); id = fragmentUrl.ref(); - fragmentUrl.setRef(TQString::null); + fragmentUrl.setRef(TQString()); orig = KSVGLoader::getSVGFragment(fragmentUrl, ownerDoc(), id); } @@ -243,10 +243,10 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c) setReferencedElement(orig); - // Create a parent, a <g> - SVGElementImpl *parent = 0; + // Create a tqparent, a <g> + SVGElementImpl *tqparent = 0; DOM::Element impl = static_cast<DOM::Document *>(ownerDoc())->createElement("g"); - parent = SVGDocumentImpl::createElement("g", impl, ownerDoc()); + tqparent = SVGDocumentImpl::createElement("g", impl, ownerDoc()); SVGElementImpl *clone = orig->cloneNode(true); // Apply the use-correction @@ -258,8 +258,8 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c) trans += ")"; // Apply the transform attribute and render the element - parent->setAttributeInternal("transform", trans); - parent->setAttribute("transform", trans); + tqparent->setAttributeInternal("transform", trans); + tqparent->setAttribute("transform", trans); // Apply width/height if symbol if(dynamic_cast<SVGSymbolElementImpl *>(clone)) @@ -294,14 +294,14 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c) } } - appendChild(*parent); - parent->appendChild(*clone); + appendChild(*tqparent); + tqparent->appendChild(*clone); - setupSubtree(parent, ownerSVGElement(), viewportElement()); + setupSubtree(tqparent, ownerSVGElement(), viewportElement()); m_instanceRoot->setCorrespondingElement(clone); - dynamic_cast<SVGLocatableImpl *>(parent)->updateCachedScreenCTM(screenCTM()); + dynamic_cast<SVGLocatableImpl *>(tqparent)->updateCachedScreenCTM(screenCTM()); // Redirect local ecma event handlers to the correspondingElement TQPtrListIterator<SVGRegisteredEventListener> it(eventListeners()); @@ -370,19 +370,19 @@ void SVGUseElementImpl::update(CanvasItemUpdate reason, int param1, int param2) { if(m_instanceRoot) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); - if(shape) - shape->update(reason, param1, param2); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); + if(tqshape) + tqshape->update(reason, param1, param2); } } -void SVGUseElementImpl::invalidate(KSVGCanvas *c, bool recalc) +void SVGUseElementImpl::tqinvalidate(KSVGCanvas *c, bool recalc) { if(m_instanceRoot) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); - if(shape) - shape->invalidate(c, recalc); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); + if(tqshape) + tqshape->tqinvalidate(c, recalc); } } @@ -390,9 +390,9 @@ void SVGUseElementImpl::setReferenced(bool referenced) { if(m_instanceRoot) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); - if(shape) - shape->setReferenced(referenced); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); + if(tqshape) + tqshape->setReferenced(referenced); } } @@ -400,9 +400,9 @@ void SVGUseElementImpl::draw() { if(m_instanceRoot) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); - if(shape) - shape->draw(); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(m_instanceRoot->correspondingElement()); + if(tqshape) + tqshape->draw(); } } diff --git a/ksvg/impl/SVGUseElementImpl.h b/ksvg/impl/SVGUseElementImpl.h index 02eb8d88..15c644f7 100644 --- a/ksvg/impl/SVGUseElementImpl.h +++ b/ksvg/impl/SVGUseElementImpl.h @@ -59,7 +59,7 @@ public: virtual void createItem(KSVGCanvas *c); virtual void removeItem(KSVGCanvas *c); virtual void update(CanvasItemUpdate reason, int param1, int param2); - virtual void invalidate(KSVGCanvas *c, bool recalc); + virtual void tqinvalidate(KSVGCanvas *c, bool recalc); virtual void setReferenced(bool referenced); virtual void draw(); diff --git a/ksvg/impl/SVGWindowImpl.cc b/ksvg/impl/SVGWindowImpl.cc index 476185f1..f1506c14 100644 --- a/ksvg/impl/SVGWindowImpl.cc +++ b/ksvg/impl/SVGWindowImpl.cc @@ -133,9 +133,9 @@ DOM::DOMString SVGWindowImpl::printNode(const DOM::Node &node, unsigned short le TQDictIterator<DOM::DOMString> it(elem->attributes()); for(;it.current(); ++it) ret += " " + it.currentKey() + "=\"" + it.current()->string() + '\"'; - if(elem->firstChild().isNull()) // no children + if(elem->firstChild().isNull()) // no tqchildren ret += " />\n"; - else // handle children + else // handle tqchildren { ret += ">\n"; for(DOM::Node child = node.firstChild();!child.isNull();child = child.nextSibling()) diff --git a/ksvg/impl/generateddata.cpp b/ksvg/impl/generateddata.cpp index 5a4b3d7b..16ac3456 100644 --- a/ksvg/impl/generateddata.cpp +++ b/ksvg/impl/generateddata.cpp @@ -283,7 +283,7 @@ const ClassInfo SVGMPathElementImpl::s_classInfo = {"KSVG::SVGMPathElementImpl", const DOM::DOMString SVGMarkerElementImpl::s_tagName = "marker"; const ClassInfo SVGMarkerElementImpl::s_classInfo = {"KSVG::SVGMarkerElementImpl",0,&SVGMarkerElementImpl::s_hashTable,0}; const ClassInfo SVGMarkerElementImplConstructor::s_classInfo = {"KSVG::SVGMarkerElementImplConstructor",0,&SVGMarkerElementImplConstructor::s_hashTable,0}; -const DOM::DOMString SVGMaskElementImpl::s_tagName = "mask"; +const DOM::DOMString SVGMaskElementImpl::s_tagName = "tqmask"; const ClassInfo SVGMaskElementImpl::s_classInfo = {"KSVG::SVGMaskElementImpl",0,&SVGMaskElementImpl::s_hashTable,0}; const ClassInfo SVGMatrixImpl::s_classInfo = {"KSVG::SVGMatrixImpl",0,&SVGMatrixImpl::s_hashTable,0}; const ClassInfo SVGMetadataElementImpl::s_classInfo = {"KSVG::SVGMetadataElementImpl",0,0,0}; diff --git a/ksvg/impl/libs/art_support/art_misc.c b/ksvg/impl/libs/art_support/art_misc.c index 69b45306..6645fe2d 100644 --- a/ksvg/impl/libs/art_support/art_misc.c +++ b/ksvg/impl/libs/art_support/art_misc.c @@ -464,7 +464,7 @@ struct _ksvgArtRgbAffineClipAlphaData int src_width; int src_height; int src_rowstride; - const art_u8 *mask; + const art_u8 *tqmask; int y0; }; @@ -592,7 +592,7 @@ ksvg_art_rgb_affine_clip_callback (void *callback_data, int y, } static -void ksvg_art_rgb_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, int x1, int y, const double inv[6], +void ksvg_art_rgb_affine_clip_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6], int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height) { const art_u8 *src_p; @@ -626,7 +626,7 @@ void ksvg_art_rgb_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0 srcAlpha = alpha * src_p[3] + 0x80; srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8; - srcAlpha = (srcAlpha * *mask++) + 0x80; + srcAlpha = (srcAlpha * *tqmask++) + 0x80; srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8; d = *dst_p; @@ -656,13 +656,13 @@ void ksvg_art_rgb_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0 else { dst_p += 3; - mask++; + tqmask++; } } } static void -ksvg_art_rgb_affine_clip_mask_callback (void *callback_data, int y, +ksvg_art_rgb_affine_clip_tqmask_callback (void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps) { ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data; @@ -673,14 +673,14 @@ ksvg_art_rgb_affine_clip_mask_callback (void *callback_data, int y, int k; int *alphatab; int alpha; - const art_u8 *maskbuf; + const art_u8 *tqmaskbuf; linebuf = data->dst; x0 = data->x0; x1 = data->x1; alphatab = data->alphatab; - maskbuf = data->mask + (y - data->y0) * (x1 - x0); + tqmaskbuf = data->tqmask + (y - data->y0) * (x1 - x0); if(n_steps > 0) { @@ -689,7 +689,7 @@ ksvg_art_rgb_affine_clip_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgb_affine_clip_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgb_affine_clip_tqmask_run(linebuf, tqmaskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } for(k = 0; k < n_steps - 1; k++) @@ -701,7 +701,7 @@ ksvg_art_rgb_affine_clip_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgb_affine_clip_mask_run(linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgb_affine_clip_tqmask_run(linebuf + (run_x0 - x0) * 3, tqmaskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } } running_sum += steps[k].delta; @@ -709,14 +709,14 @@ ksvg_art_rgb_affine_clip_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgb_affine_clip_mask_run(linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgb_affine_clip_tqmask_run(linebuf + (run_x1 - x0) * 3, tqmaskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } } else { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgb_affine_clip_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgb_affine_clip_tqmask_run(linebuf, tqmaskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } data->dst += data->dst_rowstride; @@ -853,7 +853,7 @@ ksvg_art_rgba_affine_clip_callback (void *callback_data, int y, } static -void ksvg_art_rgba_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, int x1, int y, const double inv[6], +void ksvg_art_rgba_affine_clip_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6], int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height) { const art_u8 *src_p; @@ -887,7 +887,7 @@ void ksvg_art_rgba_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *mask, int x srcAlpha = alpha * src_p[3] + 0x80; srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8; - srcAlpha = (srcAlpha * *mask++) + 0x80; + srcAlpha = (srcAlpha * *tqmask++) + 0x80; srcAlpha = (srcAlpha + (srcAlpha >> 8)) >> 8; d = *dst_p; @@ -924,13 +924,13 @@ void ksvg_art_rgba_affine_clip_mask_run(art_u8 *dst_p, const art_u8 *mask, int x else { dst_p += 4; - mask++; + tqmask++; } } } static void -ksvg_art_rgba_affine_clip_mask_callback (void *callback_data, int y, +ksvg_art_rgba_affine_clip_tqmask_callback (void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps) { ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data; @@ -941,14 +941,14 @@ ksvg_art_rgba_affine_clip_mask_callback (void *callback_data, int y, int k; int *alphatab; int alpha; - const art_u8 *maskbuf; + const art_u8 *tqmaskbuf; linebuf = data->dst; x0 = data->x0; x1 = data->x1; alphatab = data->alphatab; - maskbuf = data->mask + (y - data->y0) * (x1 - x0); + tqmaskbuf = data->tqmask + (y - data->y0) * (x1 - x0); if(n_steps > 0) { @@ -957,7 +957,7 @@ ksvg_art_rgba_affine_clip_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgba_affine_clip_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgba_affine_clip_tqmask_run(linebuf, tqmaskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } for(k = 0; k < n_steps - 1; k++) @@ -969,7 +969,7 @@ ksvg_art_rgba_affine_clip_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgba_affine_clip_mask_run(linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgba_affine_clip_tqmask_run(linebuf + (run_x0 - x0) * 4, tqmaskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } } running_sum += steps[k].delta; @@ -977,14 +977,14 @@ ksvg_art_rgba_affine_clip_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgba_affine_clip_mask_run(linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgba_affine_clip_tqmask_run(linebuf + (run_x1 - x0) * 4, tqmaskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } } else { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgba_affine_clip_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgba_affine_clip_tqmask_run(linebuf, tqmaskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } data->dst += data->dst_rowstride; @@ -1030,7 +1030,7 @@ void ksvg_art_rgb_affine_clip(const ArtSVP *svp, art_u8 *dst, int x0, int y0, in const art_u8 *src, int src_width, int src_height, int src_rowstride, const double affine[6], - int alpha, const art_u8 *mask) + int alpha, const art_u8 *tqmask) { ksvgArtRgbAffineClipAlphaData data; int i; @@ -1052,7 +1052,7 @@ void ksvg_art_rgb_affine_clip(const ArtSVP *svp, art_u8 *dst, int x0, int y0, in data.x0 = x0; data.x1 = x1; data.y0 = y0; - data.mask = mask; + data.tqmask = tqmask; art_affine_invert(data.inv, affine); @@ -1063,15 +1063,15 @@ void ksvg_art_rgb_affine_clip(const ArtSVP *svp, art_u8 *dst, int x0, int y0, in if(dst_channels == 3) { - if(mask) - art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_mask_callback, &data); + if(tqmask) + art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_tqmask_callback, &data); else art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_affine_clip_callback, &data); } else { - if(mask) - art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_mask_callback, &data); + if(tqmask) + art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_tqmask_callback, &data); else art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_affine_clip_callback, &data); } @@ -1228,7 +1228,7 @@ ksvg_art_rgb_texture_callback (void *callback_data, int y, } static -void ksvg_art_rgb_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, int x1, int y, const double inv[6], +void ksvg_art_rgb_texture_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6], int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height) { const art_u8 *src_p; @@ -1277,11 +1277,11 @@ void ksvg_art_rgb_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, in /* Pattern source is in RGBA format, premultiplied. * alpha represents fill/stroke/group opacity. * - * Multiply source alpha by 'alpha' and mask value then composite over. - * For each channel, d = d + alpha * mask * (s - srcAlpha * d). + * Multiply source alpha by 'alpha' and tqmask value then composite over. + * For each channel, d = d + alpha * tqmask * (s - srcAlpha * d). */ - am = (alpha * *mask++) + 0x80; + am = (alpha * *tqmask++) + 0x80; am = (am + (am >> 8)) >> 8; srcAlpha = src_p[3]; @@ -1322,7 +1322,7 @@ void ksvg_art_rgb_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, in } static void -ksvg_art_rgb_texture_mask_callback (void *callback_data, int y, +ksvg_art_rgb_texture_tqmask_callback (void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps) { ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data; @@ -1333,7 +1333,7 @@ ksvg_art_rgb_texture_mask_callback (void *callback_data, int y, int k; int *alphatab; int alpha; - const art_u8 *maskbuf; + const art_u8 *tqmaskbuf; linebuf = data->dst; x0 = data->x0; @@ -1341,7 +1341,7 @@ ksvg_art_rgb_texture_mask_callback (void *callback_data, int y, alphatab = data->alphatab; - maskbuf = data->mask + (y - data->y0) * (x1 - x0); + tqmaskbuf = data->tqmask + (y - data->y0) * (x1 - x0); if(n_steps > 0) { @@ -1350,7 +1350,7 @@ ksvg_art_rgb_texture_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgb_texture_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgb_texture_tqmask_run(linebuf, tqmaskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } for(k = 0; k < n_steps - 1; k++) @@ -1362,7 +1362,7 @@ ksvg_art_rgb_texture_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgb_texture_mask_run(linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgb_texture_tqmask_run(linebuf + (run_x0 - x0) * 3, tqmaskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } } running_sum += steps[k].delta; @@ -1370,14 +1370,14 @@ ksvg_art_rgb_texture_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgb_texture_mask_run(linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgb_texture_tqmask_run(linebuf + (run_x1 - x0) * 3, tqmaskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } } else { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgb_texture_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgb_texture_tqmask_run(linebuf, tqmaskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } data->dst += data->dst_rowstride; @@ -1545,7 +1545,7 @@ ksvg_art_rgba_texture_callback (void *callback_data, int y, } static -void ksvg_art_rgba_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, int x1, int y, const double inv[6], +void ksvg_art_rgba_texture_tqmask_run(art_u8 *dst_p, const art_u8 *tqmask, int x0, int x1, int y, const double inv[6], int alpha, const art_u8 *src, int src_rowstride, int src_width, int src_height) { const art_u8 *src_p; @@ -1594,11 +1594,11 @@ void ksvg_art_rgba_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, i /* Pattern source is in RGBA format, premultiplied. * alpha represents fill/stroke/group opacity. * - * Multiply source alpha by 'alpha' and mask value then composite over. - * For each channel, d = d + alpha * mask * (s - srcAlpha * d). + * Multiply source alpha by 'alpha' and tqmask value then composite over. + * For each channel, d = d + alpha * tqmask * (s - srcAlpha * d). */ - am = (alpha * *mask++) + 0x80; + am = (alpha * *tqmask++) + 0x80; am = (am + (am >> 8)) >> 8; srcAlpha = src_p[3]; @@ -1636,7 +1636,7 @@ void ksvg_art_rgba_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, i *dst_p++ = d + tmp2; - /* dstAlpha = dstAlpha + srcAlpha * alpha * mask * (1 - dstAlpha) */ + /* dstAlpha = dstAlpha + srcAlpha * alpha * tqmask * (1 - dstAlpha) */ d = *dst_p; tmp = srcAlpha * am + 0x80; @@ -1651,7 +1651,7 @@ void ksvg_art_rgba_texture_mask_run(art_u8 *dst_p, const art_u8 *mask, int x0, i } static void -ksvg_art_rgba_texture_mask_callback (void *callback_data, int y, +ksvg_art_rgba_texture_tqmask_callback (void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps) { ksvgArtRgbAffineClipAlphaData *data = (ksvgArtRgbAffineClipAlphaData *)callback_data; @@ -1662,7 +1662,7 @@ ksvg_art_rgba_texture_mask_callback (void *callback_data, int y, int k; int *alphatab; int alpha; - const art_u8 *maskbuf; + const art_u8 *tqmaskbuf; linebuf = data->dst; x0 = data->x0; @@ -1670,7 +1670,7 @@ ksvg_art_rgba_texture_mask_callback (void *callback_data, int y, alphatab = data->alphatab; - maskbuf = data->mask + (y - data->y0) * (x1 - x0); + tqmaskbuf = data->tqmask + (y - data->y0) * (x1 - x0); if(n_steps > 0) { @@ -1679,7 +1679,7 @@ ksvg_art_rgba_texture_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgba_texture_mask_run(linebuf, maskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgba_texture_tqmask_run(linebuf, tqmaskbuf, x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } for(k = 0; k < n_steps - 1; k++) @@ -1691,7 +1691,7 @@ ksvg_art_rgba_texture_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgba_texture_mask_run(linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgba_texture_tqmask_run(linebuf + (run_x0 - x0) * 4, tqmaskbuf + (run_x0 - x0), run_x0, run_x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } } running_sum += steps[k].delta; @@ -1699,14 +1699,14 @@ ksvg_art_rgba_texture_mask_callback (void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgba_texture_mask_run(linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgba_texture_tqmask_run(linebuf + (run_x1 - x0) * 4, tqmaskbuf + (run_x1 - x0), run_x1, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } } else { alpha = (running_sum >> 16) & 0xff; if(alpha) - ksvg_art_rgba_texture_mask_run(linebuf, maskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); + ksvg_art_rgba_texture_tqmask_run(linebuf, tqmaskbuf, x0, x1, y, data->inv, alphatab[alpha], data->src, data->src_rowstride, data->src_width, data->src_height); } data->dst += data->dst_rowstride; @@ -1756,7 +1756,7 @@ void ksvg_art_rgb_texture(const ArtSVP *svp, art_u8 *dst, int x0, int y0, int x1 ArtFilterLevel level, ArtAlphaGamma *alphaGamma, int alpha, - const art_u8 *mask) + const art_u8 *tqmask) { ksvgArtRgbAffineClipAlphaData data; int i; @@ -1790,15 +1790,15 @@ void ksvg_art_rgb_texture(const ArtSVP *svp, art_u8 *dst, int x0, int y0, int x1 data.src_height = src_height; data.src_rowstride = src_rowstride; - data.mask = mask; + data.tqmask = tqmask; data.y0 = y0; - if(mask) + if(tqmask) { if(dst_channels == 3) - art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_texture_mask_callback, &data); + art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgb_texture_tqmask_callback, &data); else - art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_texture_mask_callback, &data); + art_svp_render_aa(svp, x0, y0, x1, y1, ksvg_art_rgba_texture_tqmask_callback, &data); } else { diff --git a/ksvg/impl/libs/art_support/art_misc.h b/ksvg/impl/libs/art_support/art_misc.h index 52f09a63..7311d4b7 100644 --- a/ksvg/impl/libs/art_support/art_misc.h +++ b/ksvg/impl/libs/art_support/art_misc.h @@ -58,7 +58,7 @@ extern "C" { const art_u8 *src, int src_width, int src_height, int src_rowstride, const double affine[6], - int alpha, const art_u8 *mask); + int alpha, const art_u8 *tqmask); void ksvg_art_rgb_texture(const ArtSVP *svp, art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride, int dst_channels, @@ -68,7 +68,7 @@ extern "C" { ArtFilterLevel level, ArtAlphaGamma *alphaGamma, int alpha, - const art_u8 *mask); + const art_u8 *tqmask); void ksvg_art_svp_move(ArtSVP *svp, int dx, int dy); diff --git a/ksvg/impl/libs/art_support/art_rgba_svp.c b/ksvg/impl/libs/art_support/art_rgba_svp.c index 47c7d924..ea2c1476 100644 --- a/ksvg/impl/libs/art_support/art_rgba_svp.c +++ b/ksvg/impl/libs/art_support/art_rgba_svp.c @@ -37,7 +37,7 @@ struct _ArtKSVGRgbaSVPAlphaData { art_u8 r, g, b, alpha; art_u32 rgba; art_u8 *buf; - art_u8 *mask; + art_u8 *tqmask; int rowstride; int x0, x1; int y0; @@ -124,7 +124,7 @@ art_ksvg_rgba_run_alpha (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, i } static void -art_ksvg_rgba_mask_run_alpha (art_u8 *buf, art_u8 *mask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) +art_ksvg_rgba_tqmask_run_alpha (art_u8 *buf, art_u8 *tqmask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) { int i; int v; @@ -136,7 +136,7 @@ art_ksvg_rgba_mask_run_alpha (art_u8 *buf, art_u8 *mask, art_u8 r, art_u8 g, art for(i = 0; i < n; i++) { - am = (alpha * *mask++) + 0x80; + am = (alpha * *tqmask++) + 0x80; am = (am + (am >> 8)) >> 8; v = *buf; @@ -330,7 +330,7 @@ art_ksvg_rgba_svp_alpha_opaque_callback(void *callback_data, int y, } static void -art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y, +art_ksvg_rgba_svp_alpha_tqmask_callback(void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps) { ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data; @@ -342,7 +342,7 @@ art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y, art_u8 r, g, b; int *alphatab; int alpha; - art_u8 *maskbuf; + art_u8 *tqmaskbuf; linebuf = data->buf; x0 = data->x0; @@ -353,7 +353,7 @@ art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y, b = data->b; alphatab = data->alphatab; - maskbuf = data->mask + (y - data->y0) * (data->x1 - data->x0); + tqmaskbuf = data->tqmask + (y - data->y0) * (data->x1 - data->x0); if(n_steps > 0) { @@ -362,7 +362,7 @@ art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - art_ksvg_rgba_mask_run_alpha (linebuf, maskbuf, + art_ksvg_rgba_tqmask_run_alpha (linebuf, tqmaskbuf, r, g, b, alphatab[alpha], run_x1 - x0); } @@ -376,7 +376,7 @@ art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - art_ksvg_rgba_mask_run_alpha (linebuf + (run_x0 - x0) * 4, maskbuf + (run_x0 - x0), + art_ksvg_rgba_tqmask_run_alpha (linebuf + (run_x0 - x0) * 4, tqmaskbuf + (run_x0 - x0), r, g, b, alphatab[alpha], run_x1 - run_x0); } @@ -386,7 +386,7 @@ art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - art_ksvg_rgba_mask_run_alpha (linebuf + (run_x1 - x0) * 4, maskbuf + (run_x1 - x0) , + art_ksvg_rgba_tqmask_run_alpha (linebuf + (run_x1 - x0) * 4, tqmaskbuf + (run_x1 - x0) , r, g, b, alphatab[alpha], x1 - run_x1); } @@ -395,7 +395,7 @@ art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - art_ksvg_rgba_mask_run_alpha (linebuf, maskbuf, + art_ksvg_rgba_tqmask_run_alpha (linebuf, tqmaskbuf, r, g, b, alphatab[alpha], x1 - x0); } @@ -415,7 +415,7 @@ art_ksvg_rgba_svp_alpha_mask_callback(void *callback_data, int y, * @rowstride: Rowstride of @buf buffer. * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing. * - * Renders the shape specified with @svp over the @buf RGB buffer. + * Renders the tqshape specified with @svp over the @buf RGB buffer. * @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height, * of the rectangle rendered. The new pixels are stored starting at * the first byte of @buf. Thus, the @x0 and @y0 parameters specify @@ -436,7 +436,7 @@ art_ksvg_rgba_svp_alpha(const ArtSVP *svp, art_u32 rgba, art_u8 *buf, int rowstride, ArtAlphaGamma *alphagamma, - art_u8 *mask) + art_u8 *tqmask) { ArtKSVGRgbaSVPAlphaData data; int r, g, b; @@ -454,7 +454,7 @@ art_ksvg_rgba_svp_alpha(const ArtSVP *svp, data.b = b; data.alpha = alpha; data.rgba = rgba; - data.mask = mask; + data.tqmask = tqmask; a = 0x8000; da = (alpha * 66051 + 0x80) >> 8; /* 66051 equals 2 ^ 32 / (255 * 255) */ @@ -471,8 +471,8 @@ art_ksvg_rgba_svp_alpha(const ArtSVP *svp, data.x1 = x1; data.y0 = y0; - if(mask) - art_svp_render_aa (svp, x0, y0, x1, y1, art_ksvg_rgba_svp_alpha_mask_callback, &data); + if(tqmask) + art_svp_render_aa (svp, x0, y0, x1, y1, art_ksvg_rgba_svp_alpha_tqmask_callback, &data); else { if (alpha == 255) @@ -485,7 +485,7 @@ art_ksvg_rgba_svp_alpha(const ArtSVP *svp, /* RGB renderers */ static void -art_ksvg_rgb_mask_run_alpha(art_u8 *buf, art_u8 *mask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) +art_ksvg_rgb_tqmask_run_alpha(art_u8 *buf, art_u8 *tqmask, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) { int i; int v; @@ -497,7 +497,7 @@ art_ksvg_rgb_mask_run_alpha(art_u8 *buf, art_u8 *mask, art_u8 r, art_u8 g, art_u for(i = 0; i < n; i++) { - am = (alpha * *mask++) + 0x80; + am = (alpha * *tqmask++) + 0x80; am = (am + (am >> 8)) >> 8; v = *buf; @@ -515,7 +515,7 @@ art_ksvg_rgb_mask_run_alpha(art_u8 *buf, art_u8 *mask, art_u8 r, art_u8 g, art_u } static void -art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, +art_ksvg_rgb_svp_alpha_tqmask_callback(void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps) { ArtKSVGRgbaSVPAlphaData *data = (ArtKSVGRgbaSVPAlphaData *)callback_data; @@ -527,7 +527,7 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, art_u8 r, g, b; int *alphatab; int alpha; - art_u8 *maskbuf; + art_u8 *tqmaskbuf; linebuf = data->buf; x0 = data->x0; @@ -538,7 +538,7 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, b = data->b; alphatab = data->alphatab; - maskbuf = data->mask + (y - data->y0) * (data->x1 - data->x0); + tqmaskbuf = data->tqmask + (y - data->y0) * (data->x1 - data->x0); if(n_steps > 0) { @@ -547,7 +547,7 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - art_ksvg_rgb_mask_run_alpha (linebuf, maskbuf, + art_ksvg_rgb_tqmask_run_alpha (linebuf, tqmaskbuf, r, g, b, alphatab[alpha], run_x1 - x0); } @@ -561,7 +561,7 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - art_ksvg_rgb_mask_run_alpha (linebuf + (run_x0 - x0) * 3, maskbuf + (run_x0 - x0), + art_ksvg_rgb_tqmask_run_alpha (linebuf + (run_x0 - x0) * 3, tqmaskbuf + (run_x0 - x0), r, g, b, alphatab[alpha], run_x1 - run_x0); } @@ -571,7 +571,7 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - art_ksvg_rgb_mask_run_alpha (linebuf + (run_x1 - x0) * 3, maskbuf + (run_x1 - x0) , + art_ksvg_rgb_tqmask_run_alpha (linebuf + (run_x1 - x0) * 3, tqmaskbuf + (run_x1 - x0) , r, g, b, alphatab[alpha], x1 - run_x1); } @@ -580,7 +580,7 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, { alpha = (running_sum >> 16) & 0xff; if(alpha) - art_ksvg_rgb_mask_run_alpha (linebuf, maskbuf, + art_ksvg_rgb_tqmask_run_alpha (linebuf, tqmaskbuf, r, g, b, alphatab[alpha], x1 - x0); } @@ -600,7 +600,7 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, * @rowstride: Rowstride of @buf buffer. * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing. * - * Renders the shape specified with @svp over the @buf RGB buffer. + * Renders the tqshape specified with @svp over the @buf RGB buffer. * @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height, * of the rectangle rendered. The new pixels are stored starting at * the first byte of @buf. Thus, the @x0 and @y0 parameters specify @@ -616,12 +616,12 @@ art_ksvg_rgb_svp_alpha_mask_callback(void *callback_data, int y, * @alphagamma is NULL. **/ void -art_ksvg_rgb_svp_alpha_mask(const ArtSVP *svp, +art_ksvg_rgb_svp_alpha_tqmask(const ArtSVP *svp, int x0, int y0, int x1, int y1, art_u32 rgba, art_u8 *buf, int rowstride, ArtAlphaGamma *alphagamma, - art_u8 *mask) + art_u8 *tqmask) { ArtKSVGRgbaSVPAlphaData data; int r, g, b, alpha; @@ -637,7 +637,7 @@ art_ksvg_rgb_svp_alpha_mask(const ArtSVP *svp, data.g = g; data.b = b; data.alpha = alpha; - data.mask = mask; + data.tqmask = tqmask; a = 0x8000; da = (alpha * 66051 + 0x80) >> 8; /* 66051 equals 2 ^ 32 / (255 * 255) */ @@ -654,6 +654,6 @@ art_ksvg_rgb_svp_alpha_mask(const ArtSVP *svp, data.x1 = x1; data.y0 = y0; - art_svp_render_aa(svp, x0, y0, x1, y1, art_ksvg_rgb_svp_alpha_mask_callback, &data); + art_svp_render_aa(svp, x0, y0, x1, y1, art_ksvg_rgb_svp_alpha_tqmask_callback, &data); } diff --git a/ksvg/impl/libs/art_support/art_rgba_svp.h b/ksvg/impl/libs/art_support/art_rgba_svp.h index b59096d4..860eabcc 100644 --- a/ksvg/impl/libs/art_support/art_rgba_svp.h +++ b/ksvg/impl/libs/art_support/art_rgba_svp.h @@ -40,15 +40,15 @@ art_ksvg_rgba_svp_alpha(const ArtSVP *svp, art_u32 rgba, art_u8 *buf, int rowstride, ArtAlphaGamma *alphagamma, - art_u8 *mask); + art_u8 *tqmask); void -art_ksvg_rgb_svp_alpha_mask(const ArtSVP *svp, +art_ksvg_rgb_svp_alpha_tqmask(const ArtSVP *svp, int x0, int y0, int x1, int y1, art_u32 rgba, art_u8 *buf, int rowstride, ArtAlphaGamma *alphagamma, - art_u8 *mask); + art_u8 *tqmask); #ifdef __cplusplus } diff --git a/ksvg/impl/libs/libtext2path/libtext2path.spec b/ksvg/impl/libs/libtext2path/libtext2path.spec index e0c217bd..208de711 100644 --- a/ksvg/impl/libs/libtext2path/libtext2path.spec +++ b/ksvg/impl/libs/libtext2path/libtext2path.spec @@ -31,8 +31,8 @@ make -j make install-strip DESTDIR=$RPM_BUILD_ROOT cd -find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > /%{name}-master.list -find . -type f -o -type l | sed 's|^\.||' >> $RPM_BUILD_DIR/%{name}-master.list +tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > /%{name}-master.list +tqfind . -type f -o -type l | sed 's|^\.||' >> $RPM_BUILD_DIR/%{name}-master.list %clean rm -rf $RPM_BUILD_DIR/%{name}-%{version} diff --git a/ksvg/impl/libs/libtext2path/src/Cache.h b/ksvg/impl/libs/libtext2path/src/Cache.h index a85fdf92..51d09f45 100644 --- a/ksvg/impl/libs/libtext2path/src/Cache.h +++ b/ksvg/impl/libs/libtext2path/src/Cache.h @@ -118,7 +118,7 @@ namespace T2P } // Lookup entry - SharedT find(const std::string &key) + SharedT tqfind(const std::string &key) { for(typename std::vector<SharedT>::const_iterator it = m_entries.begin(); it != m_entries.end(); ++it) { diff --git a/ksvg/impl/libs/libtext2path/src/Converter.cpp b/ksvg/impl/libs/libtext2path/src/Converter.cpp index 59ab8e5c..16aef608 100644 --- a/ksvg/impl/libs/libtext2path/src/Converter.cpp +++ b/ksvg/impl/libs/libtext2path/src/Converter.cpp @@ -90,7 +90,7 @@ void Converter::setKerning(bool mode) SharedFont Converter::requestFont(const FontVisualParams *params) { std::string cacheKey = cacheFontKey(params); - SharedFont cached = m_fontCache.find(cacheKey); + SharedFont cached = m_fontCache.tqfind(cacheKey); // If not available in cache, create new one and cache it :) if(cached) @@ -122,10 +122,10 @@ GlyphAffinePair *Converter::requestGlyph(GlyphRenderParams *params, Rectangle &b // needed to generate the cache lookup key selectGlyph(params); - SharedGlyph cached = m_glyphCache.find(cacheGlyphKey(params)); + SharedGlyph cached = m_glyphCache.tqfind(cacheGlyphKey(params)); // If not available in cache, render new one and cache it :) - // If we're mixing ie. japanese and latin characters (TTB layout), + // If we're mixing ie. japanese and latin characters (TTB tqlayout), // then we also have to re-calculate the glyph again with the appropriate rotation matrix (Niko) if(!cached || !onlyLatin) cached = calcGlyph(params, affine, onlyLatin); @@ -162,13 +162,13 @@ void Converter::selectGlyph(GlyphRenderParams *params) // 2. Load glyph into font's glyphSlot, according to the GlyphLayoutParams int flags = FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP; - // 3. Don't pass FT_LOAD_VERTICAL_LAYOUT on TTB layouts when rendering + // 3. Don't pass FT_LOAD_VERTICAL_LAYOUT on TTB tqlayouts when rendering // a latin glyph because it needs to be rotated... - if(params->layout()->tb()) + if(params->tqlayout()->tb()) { Script script; SCRIPT_FOR_CHAR(script, params->character()) - if(script != Latin || params->layout()->glyphOrientationVertical() == 0) + if(script != Latin || params->tqlayout()->glyphOrientationVertical() == 0) flags |= FT_LOAD_VERTICAL_LAYOUT; } @@ -193,7 +193,7 @@ SharedGlyph Converter::calcGlyph(const GlyphRenderParams *params, Affine &affine affine.dx() += kx + affine.m21() * ky; // Only apply y kerning in TB mode - if(params->layout()->tb()) + if(params->tqlayout()->tb()) affine.dy() += kx + affine.m22() * ky; } @@ -206,7 +206,7 @@ SharedGlyph Converter::calcGlyph(const GlyphRenderParams *params, Affine &affine traceAffine.scale(1000.0 / params->font()->fontFace()->units_per_EM); // 3b. Enable character rotation, if needed - if(params->layout()->tb()) + if(params->tqlayout()->tb()) { Script script; SCRIPT_FOR_CHAR(script, params->character()) @@ -214,7 +214,7 @@ SharedGlyph Converter::calcGlyph(const GlyphRenderParams *params, Affine &affine { FT_Matrix matrix; - double angle = deg2rad * params->layout()->glyphOrientationVertical(); + double angle = deg2rad * params->tqlayout()->glyphOrientationVertical(); matrix.xx = (FT_Fixed)( cos(angle) * 0x10000L); matrix.xy = (FT_Fixed)(-sin(angle) * 0x10000L); matrix.yx = (FT_Fixed)( sin(angle) * 0x10000L); @@ -257,21 +257,21 @@ GlyphSet *Converter::calcString(Font *font, const unsigned short *text, unsigned if(params->useBidi()) { FriBidiCharType baseDir = FRIBIDI_TYPE_N; - FriBidiChar *unicodeIn = new FriBidiChar[length + 1]; - FriBidiChar *unicodeOut = new FriBidiChar[length + 1]; + FriBidiChar *tqunicodeIn = new FriBidiChar[length + 1]; + FriBidiChar *tqunicodeOut = new FriBidiChar[length + 1]; bidi = new unsigned short[length + 1]; for(unsigned int i = 0; i < length; i++) - unicodeIn[i] = text[i]; + tqunicodeIn[i] = text[i]; - fribidi_log2vis(unicodeIn, length, &baseDir, unicodeOut, 0, 0, 0); + fribidi_log2vis(tqunicodeIn, length, &baseDir, tqunicodeOut, 0, 0, 0); for(unsigned int i = 0; i < length; i++) - bidi[i] = unicodeOut[i]; + bidi[i] = tqunicodeOut[i]; bidi[length] = 0; - delete []unicodeIn; - delete []unicodeOut; + delete []tqunicodeIn; + delete []tqunicodeOut; } else bidi = const_cast<unsigned short *>(text); @@ -302,7 +302,7 @@ GlyphSet *Converter::calcString(Font *font, const unsigned short *text, unsigned int pixelUnderlineThickness = T2PMAX(1, (int) ((font->fontFace()->underline_thickness * fontSize / font->fontFace()->units_per_EM) * affine.m22())); // 3. Prepare needed variables for the rendering loop - // - rendering params (layout, font...) + // - rendering params (tqlayout, font...) // - bounding box (per glyph, overall) // - glyph matrix (overall) // - resulting glyph sets @@ -456,7 +456,7 @@ GlyphSet *Converter::calcString(Font *font, const unsigned short *text, unsigned result->m_height = T2PMAX(1, int(bbox.b().y() - bbox.a().y())); // Correct bounding box information also on - // vertical layouts! (Niko) + // vertical tqlayouts! (Niko) if(!params->tb()) { if(bpath) diff --git a/ksvg/impl/libs/libtext2path/src/Font.cpp b/ksvg/impl/libs/libtext2path/src/Font.cpp index 1d6f7005..2ced971d 100644 --- a/ksvg/impl/libs/libtext2path/src/Font.cpp +++ b/ksvg/impl/libs/libtext2path/src/Font.cpp @@ -141,7 +141,7 @@ std::string Font::buildRequest(const FontVisualParams *fontParams, int &id) FcPatternAddString(pattern, FC_FAMILY, reinterpret_cast<const FcChar8 *>(string.c_str())); } - // Always load vertical layout + // Always load vertical tqlayout FcPatternAddBool(pattern, FC_VERTICAL_LAYOUT, true); // Disable hinting @@ -208,7 +208,7 @@ bool Font::load(const FontVisualParams *fontParams) return false; } - // Choose unicode charmap + // Choose tqunicode charmap for(int charmap = 0; charmap < m_fontFace->num_charmaps; charmap++) { if(m_fontFace->charmaps[charmap]->encoding == ft_encoding_unicode) @@ -217,7 +217,7 @@ bool Font::load(const FontVisualParams *fontParams) if(error) { - std::cout << "Font::load(), unable to select unicode charmap. Aborting!" << std::endl; + std::cout << "Font::load(), unable to select tqunicode charmap. Aborting!" << std::endl; FT_Done_Face(m_fontFace); m_fontFace = 0; diff --git a/ksvg/impl/libs/libtext2path/src/Glyph.cpp b/ksvg/impl/libs/libtext2path/src/Glyph.cpp index 5d172018..08ad55a8 100644 --- a/ksvg/impl/libs/libtext2path/src/Glyph.cpp +++ b/ksvg/impl/libs/libtext2path/src/Glyph.cpp @@ -1,5 +1,4 @@ -/* - Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org> +/* Copyright (C) 2003 Nikolas Zimmermann <wildfox@kde.org> This file is part of the KDE project This library is free software; you can redistribute it and/or @@ -310,14 +309,14 @@ void GlyphRenderParams::setFont(Font *font) m_font = font; } -const GlyphLayoutParams *GlyphRenderParams::layout() const +const GlyphLayoutParams *GlyphRenderParams::tqlayout() const { return m_layout; } -void GlyphRenderParams::setLayout(const GlyphLayoutParams *layout) +void GlyphRenderParams::setLayout(const GlyphLayoutParams *tqlayout) { - m_layout = layout; + m_layout = tqlayout; } unsigned int GlyphRenderParams::glyphIndex() const diff --git a/ksvg/impl/libs/libtext2path/src/Glyph.h b/ksvg/impl/libs/libtext2path/src/Glyph.h index b3bd3fb5..73951b47 100644 --- a/ksvg/impl/libs/libtext2path/src/Glyph.h +++ b/ksvg/impl/libs/libtext2path/src/Glyph.h @@ -171,8 +171,8 @@ namespace T2P Font *font() const; void setFont(Font *font); - const GlyphLayoutParams *layout() const; - void setLayout(const GlyphLayoutParams *layout); + const GlyphLayoutParams *tqlayout() const; + void setLayout(const GlyphLayoutParams *tqlayout); unsigned int glyphIndex() const; void setGlyphIndex(unsigned int glyphIndex); @@ -185,7 +185,7 @@ namespace T2P private: Font *m_font; - const GlyphLayoutParams *m_layout; // Glyph layouting params + const GlyphLayoutParams *m_layout; // Glyph tqlayouting params unsigned int m_glyphIndex; // 'character' index in font unsigned int m_lastGlyph; // Kerning diff --git a/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp b/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp index 33855a81..1103ab69 100644 --- a/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp +++ b/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp @@ -5,27 +5,27 @@ ** ** Copyright (C) 2002-2003 Trolltech AS. All rights reserved. ** -** This file is part of the kernel module of the Qt GUI Toolkit. +** This file is part of the kernel module of the TQt GUI Toolkit. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. +** LICENSE.TQPL included in the packaging of this file. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. +** information about TQt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for TQPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are diff --git a/ksvg/impl/libs/libtext2path/src/QtUnicode.h b/ksvg/impl/libs/libtext2path/src/QtUnicode.h index 41008500..29714502 100644 --- a/ksvg/impl/libs/libtext2path/src/QtUnicode.h +++ b/ksvg/impl/libs/libtext2path/src/QtUnicode.h @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#ifndef T2P_QT_UNICODE_H -#define T2P_QT_UNICODE_H +#ifndef T2P_TQT_UNICODE_H +#define T2P_TQT_UNICODE_H namespace T2P { diff --git a/ksvg/impl/libs/libtext2path/src/myboost/shared_ptr.hpp b/ksvg/impl/libs/libtext2path/src/myboost/shared_ptr.hpp index 3f2fe30d..696cfec3 100644 --- a/ksvg/impl/libs/libtext2path/src/myboost/shared_ptr.hpp +++ b/ksvg/impl/libs/libtext2path/src/myboost/shared_ptr.hpp @@ -372,7 +372,7 @@ template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> co #if (defined(__GNUC__) && (__GNUC__ < 3)) || (defined(__EDG_VERSION__) && (__EDG_VERSION__ <= 238)) // g++ 2.9x doesn't allow static_cast<X const *>(void *) -// apparently EDG 2.38 also doesn't accept it +// aptqparently EDG 2.38 also doesn't accept it template<class D, class T> D * get_deleter(shared_ptr<T> const & p) { diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-drawable.c b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-drawable.c index 01f60976..522480f1 100644 --- a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-drawable.c +++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib-drawable.c @@ -1103,24 +1103,24 @@ xlib_window_is_viewable (Window w) XWindowAttributes wa; while (w != 0) { - Window parent, root, *children; - int nchildren; + Window tqparent, root, *tqchildren; + int ntqchildren; XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa); if (wa.map_state != IsViewable) return 0; if (!XQueryTree (gdk_pixbuf_dpy, w, &root, - &parent, &children, &nchildren)) + &tqparent, &tqchildren, &ntqchildren)) return 0; - if (nchildren > 0) - XFree (children); + if (ntqchildren > 0) + XFree (tqchildren); - if (parent == root) + if (tqparent == root) return 1; - w = parent; + w = tqparent; } return 0; diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h index aa94c7c6..7848f8d3 100644 --- a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h +++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlib.h @@ -61,9 +61,9 @@ void gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf, XlibRgbDither dither, int x_dither, int y_dither); -void gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf, +void gdk_pixbuf_xlib_render_pixmap_and_tqmask (GdkPixbuf *pixbuf, Pixmap *pixmap_return, - Pixmap *mask_return, + Pixmap *tqmask_return, int alpha_threshold); diff --git a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c index eb7e4cdf..95a6c722 100644 --- a/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c +++ b/ksvg/impl/libs/xrgbrender/gdk-pixbuf-xlibrgb.c @@ -913,7 +913,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth) static_image[i]->byte_order = MSBFirst; } } - /* ok, so apparently, image_info->bpp is actually + /* ok, so aptqparently, image_info->bpp is actually BYTES per pixel. What fun! */ switch (static_image[0]->bits_per_pixel) { case 1: diff --git a/ksvg/impl/svgpathparser.cc b/ksvg/impl/svgpathparser.cc index 590ac2ba..e072b715 100644 --- a/ksvg/impl/svgpathparser.cc +++ b/ksvg/impl/svgpathparser.cc @@ -100,7 +100,7 @@ SVGPathParser::parseSVG( const TQString &s, bool process ) if(!s.isEmpty()) { TQString d = s; - d = d.replace(',', ' '); + d = d.tqreplace(',', ' '); d = d.simplifyWhiteSpace(); const char *ptr = d.latin1(); const char *end = d.latin1() + d.length() + 1; diff --git a/ksvg/plugin/backends/agg/AggCanvasFactory.h b/ksvg/plugin/backends/agg/AggCanvasFactory.h index 8e7d4747..92ba5b69 100644 --- a/ksvg/plugin/backends/agg/AggCanvasFactory.h +++ b/ksvg/plugin/backends/agg/AggCanvasFactory.h @@ -35,7 +35,7 @@ public: AggCanvasFactory(); virtual ~AggCanvasFactory(); - virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = "TQObject", const TQStringList &args = TQStringList()); + virtual TQObject *createObject(TQObject *tqparent = 0, const char *pname = 0, const char *name = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); }; }; diff --git a/ksvg/plugin/backends/agg/AggCanvasItems.cpp b/ksvg/plugin/backends/agg/AggCanvasItems.cpp index be4727ac..36b84e86 100644 --- a/ksvg/plugin/backends/agg/AggCanvasItems.cpp +++ b/ksvg/plugin/backends/agg/AggCanvasItems.cpp @@ -239,13 +239,13 @@ void AggShape::update(CanvasItemUpdate reason, int param1, int param2) m_fillPainter->update(m_style); if(m_strokePainter) m_strokePainter->update(m_style); - m_canvas->invalidate(this, false); + m_canvas->tqinvalidate(this, false); } else if(reason == UPDATE_TRANSFORM) { freeSVPs(); init(); - m_canvas->invalidate(this, true); + m_canvas->tqinvalidate(this, true); } else if(reason == UPDATE_ZOOM) init(); @@ -257,13 +257,13 @@ void AggShape::update(CanvasItemUpdate reason, int param1, int param2) else if(reason == UPDATE_LINEWIDTH) { init(); - m_canvas->invalidate(this, true); + m_canvas->tqinvalidate(this, true); } } -void AggShape::draw(SVGShapeImpl *shape) +void AggShape::draw(SVGShapeImpl *tqshape) { - if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender())) + if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !tqshape->directRender())) return; //if(!m_strokeSVP && (!m_fillSVP || !m_style->isFilled())) @@ -292,14 +292,14 @@ void AggShape::draw(SVGShapeImpl *shape) m_curved.approximation_scale(pow(m_transform.scale(), 0.75)); if(m_fillPainter) - m_fillPainter->draw(m_canvas, m_curved_trans, m_style, shape); + m_fillPainter->draw(m_canvas, m_curved_trans, m_style, tqshape); if(m_strokePainter) - m_strokePainter->draw(m_canvas, m_curved_stroked_trans, m_style, shape); + m_strokePainter->draw(m_canvas, m_curved_stroked_trans, m_style, tqshape); } -bool AggShape::isVisible(SVGShapeImpl *shape) +bool AggShape::isVisible(SVGShapeImpl *tqshape) { - return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender()); + return m_referenced || (m_style->getVisible() && m_style->getDisplay() && tqshape->directRender()); } void AggShape::calcSVPs(const SVGMatrixImpl *matrix) @@ -376,14 +376,14 @@ void AggStrokePaintServer::update(SVGStylableImpl *style) } template<class VertexSource> -void AggStrokePaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape) +void AggStrokePaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape) { canvas->m_ras.reset(); if(style->getStrokeColor()->paintType() == SVG_PAINTTYPE_URI) { - AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), style->getStrokeColor()->uri().string())); + AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), style->getStrokeColor()->uri().string())); if(!pserver) return; - pserver->setBBoxTarget(shape); + pserver->setBBoxTarget(tqshape); // TODO : Clipping if(!pserver->finalized()) @@ -425,14 +425,14 @@ void AggFillPaintServer::update(SVGStylableImpl *style) } template<class VertexSource> -void AggFillPaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape) +void AggFillPaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape) { canvas->m_ras.reset(); if(style->getFillColor()->paintType() == SVG_PAINTTYPE_URI) { - AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), style->getFillColor()->uri().string())); + AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), style->getFillColor()->uri().string())); if(!pserver) return; - pserver->setBBoxTarget(shape); + pserver->setBBoxTarget(tqshape); // TODO : Clipping if(!pserver->finalized()) @@ -1166,13 +1166,13 @@ void AggText::update(CanvasItemUpdate reason, int param1, int param2) svpelement = ++it; } - m_canvas->invalidate(this, false); + m_canvas->tqinvalidate(this, false); } else if(reason == UPDATE_TRANSFORM) { clearCurved(); init(); - m_canvas->invalidate(this, true); + m_canvas->tqinvalidate(this, true); } else if(reason == UPDATE_ZOOM) { @@ -1398,7 +1398,7 @@ void AggGradient::parseGradientStops(SVGGradientElementImpl *gradient) opacity *= elem->stopOpacity(); // Get rgba color including stop-opacity - Q_UINT32 rgba = (stopColor << 8) | int(floor(int(opacity * 255.0) + 0.5)); + TQ_UINT32 rgba = (stopColor << 8) | int(floor(int(opacity * 255.0) + 0.5)); // Convert from separated to premultiplied alpha a = rgba & 0xff; diff --git a/ksvg/plugin/backends/agg/AggCanvasItems.h b/ksvg/plugin/backends/agg/AggCanvasItems.h index b5599952..7612b234 100644 --- a/ksvg/plugin/backends/agg/AggCanvasItems.h +++ b/ksvg/plugin/backends/agg/AggCanvasItems.h @@ -270,7 +270,7 @@ namespace KSVG AggFillPaintServer(SVGStylableImpl *style); void update(SVGStylableImpl *style); template<class VertexSource> - void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape); + void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape); private: agg::rgba8 m_color; @@ -282,7 +282,7 @@ namespace KSVG AggStrokePaintServer(SVGStylableImpl *style); void update(SVGStylableImpl *style); template<class VertexSource> - void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape); + void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape); private: agg::rgba8 m_color; @@ -311,11 +311,11 @@ namespace KSVG virtual bool fillContains(const TQPoint &p); virtual bool strokeContains(const TQPoint &p); virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0); - void draw(SVGShapeImpl *shape); + void draw(SVGShapeImpl *tqshape); void calcSVPs(const SVGMatrixImpl *matrix); virtual void init(); virtual void init(const SVGMatrixImpl *); - bool isVisible(SVGShapeImpl *shape); + bool isVisible(SVGShapeImpl *tqshape); void setRenderContext(RenderContext context) { m_context = context; } @@ -327,7 +327,7 @@ namespace KSVG RenderContext m_context; AggCanvas *m_canvas; - QRect m_bbox; + TQRect m_bbox; AggFillPaintServer *m_fillPainter; AggStrokePaintServer *m_strokePainter; }; diff --git a/ksvg/plugin/backends/libart/LibartCanvas.cpp b/ksvg/plugin/backends/libart/LibartCanvas.cpp index 55b371dd..05f37e82 100644 --- a/ksvg/plugin/backends/libart/LibartCanvas.cpp +++ b/ksvg/plugin/backends/libart/LibartCanvas.cpp @@ -187,15 +187,15 @@ CanvasPaintServer *LibartCanvas::createPaintServer(SVGElementImpl *pserver) void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon) { - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(style); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(style); - if(shape) + if(tqshape) { if(image.depth() != 32) image = image.convertDepth(32); ArtSVP *imageBorder = svpFromPolygon(clippingPolygon); - ArtSVP *clipSvp = clipSingleSVP(imageBorder, shape); + ArtSVP *clipSvp = clipSingleSVP(imageBorder, tqshape); ArtDRect bbox; art_drect_svp(&bbox, clipSvp); @@ -214,12 +214,12 @@ void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMat TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1); - TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox); + TQByteArray tqmask = SVGMaskElementImpl::tqmaskRectangle(tqshape, screenBBox); double affine[6]; KSVGHelper::matrixToAffine(matrix, affine); - ksvg_art_rgb_affine_clip(clipSvp, m_buffer + x0 * nrChannels() + y0 * rowStride(), x0, y0, x1 + 1, y1 + 1, rowStride(), nrChannels(), image.bits(), image.width(), image.height(), image.width() * 4, affine, int(style->getOpacity() * 255), (const art_u8 *)mask.data()); + ksvg_art_rgb_affine_clip(clipSvp, m_buffer + x0 * nrChannels() + y0 * rowStride(), x0, y0, x1 + 1, y1 + 1, rowStride(), nrChannels(), image.bits(), image.width(), image.height(), image.width() * 4, affine, int(style->getOpacity() * 255), (const art_u8 *)tqmask.data()); } art_svp_free(imageBorder); @@ -266,10 +266,10 @@ ArtSVP *LibartCanvas::clippingRect(const TQRect &rect, const SVGMatrixImpl *ctm) return result; } -ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape) +ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape) { ArtSVP *clippedSvp = copy_svp(svp); - SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(shape); + SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(tqshape); if(style) { @@ -282,7 +282,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape) if(clipPath) { LibartClipPath *lclip = dynamic_cast<LibartClipPath *>(clipPath); - reinterpret_cast<SVGClipPathElementImpl *>(clipPath->element())->setBBoxTarget(shape); + reinterpret_cast<SVGClipPathElementImpl *>(clipPath->element())->setBBoxTarget(tqshape); lclip->init(); @@ -296,7 +296,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape) } } - SVGSVGElementImpl *svg = dynamic_cast<SVGSVGElementImpl *>(shape); + SVGSVGElementImpl *svg = dynamic_cast<SVGSVGElementImpl *>(tqshape); // Clip outer svg, unless width and height not set if(svg && (!svg->isRootElement() || !svg->getAttribute("width").isEmpty() || !svg->getAttribute("height").isEmpty()) && !svg->getOverflow()) @@ -308,13 +308,13 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape) clippedSvp = s; } - if(dynamic_cast<SVGPatternElementImpl *>(shape) != 0) + if(dynamic_cast<SVGPatternElementImpl *>(tqshape) != 0) { // TODO: inherit clipping paths into tile space } - else if(dynamic_cast<SVGMarkerElementImpl *>(shape) != 0) + else if(dynamic_cast<SVGMarkerElementImpl *>(tqshape) != 0) { - SVGMarkerElementImpl *marker = static_cast<SVGMarkerElementImpl *>(shape); + SVGMarkerElementImpl *marker = static_cast<SVGMarkerElementImpl *>(tqshape); if(!marker->clipShape().isEmpty()) { @@ -329,23 +329,23 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape) } else { - SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(shape); - DOM::Node parentNode = element->parentNode(); + SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(tqshape); + DOM::Node tqparentNode = element->parentNode(); - if(!parentNode.isNull()) + if(!tqparentNode.isNull()) { - SVGElementImpl *parent = element->ownerDoc()->getElementFromHandle(parentNode.handle()); + SVGElementImpl *tqparent = element->ownerDoc()->getElementFromHandle(tqparentNode.handle()); - if(parent) + if(tqparent) { - SVGShapeImpl *parentShape = dynamic_cast<SVGShapeImpl *>(parent); + SVGShapeImpl *tqparentShape = dynamic_cast<SVGShapeImpl *>(tqparent); - if(parentShape) + if(tqparentShape) { // Clip against ancestor clipping paths - ArtSVP *parentClippedSvp = clipSingleSVP(clippedSvp, parentShape); + ArtSVP *tqparentClippedSvp = clipSingleSVP(clippedSvp, tqparentShape); art_svp_free(clippedSvp); - clippedSvp = parentClippedSvp; + clippedSvp = tqparentClippedSvp; } } } @@ -354,7 +354,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape) return clippedSvp; } -void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, TQByteArray mask, TQRect screenBBox) +void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, TQByteArray tqmask, TQRect screenBBox) { int x0 = screenBBox.left(); int y0 = screenBBox.top(); @@ -363,13 +363,13 @@ void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, TQByteArray mask, TQRect if(m_nrChannels == 3) { - if(mask.data()) - art_ksvg_rgb_svp_alpha_mask(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 3 + y0 * 3 * m_width, m_width * 3, 0, (art_u8 *)mask.data()); + if(tqmask.data()) + art_ksvg_rgb_svp_alpha_tqmask(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 3 + y0 * 3 * m_width, m_width * 3, 0, (art_u8 *)tqmask.data()); else art_rgb_svp_alpha(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 3 + y0 * 3 * m_width, m_width * 3, 0); } else - art_ksvg_rgba_svp_alpha(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 4 + y0 * 4 * m_width, m_width * 4, 0, (art_u8 *)mask.data()); + art_ksvg_rgba_svp_alpha(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 4 + y0 * 4 * m_width, m_width * 4, 0, (art_u8 *)tqmask.data()); } ArtSVP *LibartCanvas::copy_svp(const ArtSVP *svp) diff --git a/ksvg/plugin/backends/libart/LibartCanvas.h b/ksvg/plugin/backends/libart/LibartCanvas.h index 9232789a..ff3829bd 100644 --- a/ksvg/plugin/backends/libart/LibartCanvas.h +++ b/ksvg/plugin/backends/libart/LibartCanvas.h @@ -50,7 +50,7 @@ class LibartCanvas : public KSVGCanvas public: LibartCanvas(unsigned int width, unsigned int height); - void drawSVP(_ArtSVP *svp, art_u32 color, TQByteArray mask, TQRect screenBBox); + void drawSVP(_ArtSVP *svp, art_u32 color, TQByteArray tqmask, TQRect screenBBox); void drawImage(TQImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon); virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const; diff --git a/ksvg/plugin/backends/libart/LibartCanvasFactory.h b/ksvg/plugin/backends/libart/LibartCanvasFactory.h index 58ad5047..0e5e3bed 100644 --- a/ksvg/plugin/backends/libart/LibartCanvasFactory.h +++ b/ksvg/plugin/backends/libart/LibartCanvasFactory.h @@ -35,7 +35,7 @@ public: LibartCanvasFactory(); virtual ~LibartCanvasFactory(); - virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = "TQObject", const TQStringList &args = TQStringList()); + virtual TQObject *createObject(TQObject *tqparent = 0, const char *pname = 0, const char *name = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); }; } diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp index 998fb51f..32dad452 100644 --- a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp +++ b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp @@ -129,9 +129,9 @@ TQRect LibartShape::bbox() const return rect; } -bool LibartShape::isVisible(SVGShapeImpl *shape) +bool LibartShape::isVisible(SVGShapeImpl *tqshape) { - return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender()); + return m_referenced || (m_style->getVisible() && m_style->getDisplay() && tqshape->directRender()); } bool LibartShape::fillContains(const TQPoint &p) @@ -160,12 +160,12 @@ void LibartShape::update(CanvasItemUpdate reason, int param1, int param2) m_fillPainter->update(m_style); if(m_strokePainter) m_strokePainter->update(m_style); - m_canvas->invalidate(this, false); + m_canvas->tqinvalidate(this, false); } else if(reason == UPDATE_TRANSFORM) { reset(); - m_canvas->invalidate(this, true); + m_canvas->tqinvalidate(this, true); } else if(reason == UPDATE_ZOOM) reset(); @@ -184,13 +184,13 @@ void LibartShape::update(CanvasItemUpdate reason, int param1, int param2) m_strokeSVP = 0; } init(); - m_canvas->invalidate(this, true); + m_canvas->tqinvalidate(this, true); } } -void LibartShape::draw(SVGShapeImpl *shape) +void LibartShape::draw(SVGShapeImpl *tqshape) { - if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender())) + if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !tqshape->directRender())) return; bool fillOk = m_fillSVP && m_style->isFilled(); @@ -199,10 +199,10 @@ void LibartShape::draw(SVGShapeImpl *shape) if(fillOk || strokeOk) { if(m_fillPainter && m_fillSVP) - m_fillPainter->draw(m_canvas, m_fillSVP, m_style, shape); + m_fillPainter->draw(m_canvas, m_fillSVP, m_style, tqshape); if(m_strokePainter && m_strokeSVP) - m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, shape); + m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, tqshape); } } @@ -230,9 +230,9 @@ void LibartPainter::update(SVGStylableImpl *style) } } -void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape) +void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *tqshape) { - ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, shape); + ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, tqshape); // Clipping ArtDRect bbox; @@ -252,22 +252,22 @@ void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *st TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1); - TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox); + TQByteArray tqmask = SVGMaskElementImpl::tqmaskRectangle(tqshape, screenBBox); if(paintType(style) == SVG_PAINTTYPE_URI) { - LibartPaintServer *pserver = static_cast<LibartPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), paintUri(style))); + LibartPaintServer *pserver = static_cast<LibartPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), paintUri(style))); if(pserver) { - pserver->setBBoxTarget(shape); + pserver->setBBoxTarget(tqshape); if(!pserver->finalized()) pserver->finalizePaintServer(); - pserver->render(canvas, clippedSvp, opacity(style), mask, screenBBox); + pserver->render(canvas, clippedSvp, opacity(style), tqmask, screenBBox); } } else - canvas->drawSVP(clippedSvp, m_color, mask, screenBBox); + canvas->drawSVP(clippedSvp, m_color, tqmask, screenBBox); } art_svp_free(clippedSvp); @@ -1064,29 +1064,29 @@ void LibartPath::init(const SVGMatrixImpl *screenCTM) double cury = m_array[index - 1].y3; // Find last subpath - int find = -1; + int tqfind = -1; for(int i = index - 1; i >= 0; i--) { if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO) { - find = i; + tqfind = i; break; } } // Fix a problem where the .svg file used floats as values... (sofico.svg) - if(curx != m_array[find].x3 && cury != m_array[find].y3) + if(curx != m_array[tqfind].x3 && cury != m_array[tqfind].y3) { - if((int) curx == (int) m_array[find].x3 && (int) cury == (int) m_array[find].y3) + if((int) curx == (int) m_array[tqfind].x3 && (int) cury == (int) m_array[tqfind].y3) { ensureSpace(m_array, index) m_array[index].code = ART_LINETO; - m_array[index].x3 = m_array[find].x3; - m_array[index].y3 = m_array[find].y3; + m_array[index].x3 = m_array[tqfind].x3; + m_array[index].y3 = m_array[tqfind].y3; - curx = m_array[find].x3; - cury = m_array[find].y3; + curx = m_array[tqfind].x3; + cury = m_array[tqfind].y3; index++; } @@ -1095,16 +1095,16 @@ void LibartPath::init(const SVGMatrixImpl *screenCTM) // handle filled paths that are not closed explicitly if(m_path->getFillColor()->paintType() != SVG_PAINTTYPE_NONE) { - if((int) curx != (int) m_array[find].x3 || (int) cury != (int) m_array[find].y3) + if((int) curx != (int) m_array[tqfind].x3 || (int) cury != (int) m_array[tqfind].y3) { ensureSpace(m_array, index) m_array[index].code = (ArtPathcode)ART_END2; - m_array[index].x3 = m_array[find].x3; - m_array[index].y3 = m_array[find].y3; + m_array[index].x3 = m_array[tqfind].x3; + m_array[index].y3 = m_array[tqfind].y3; - curx = m_array[find].x3; - cury = m_array[find].y3; + curx = m_array[tqfind].x3; + cury = m_array[tqfind].y3; index++; } @@ -1147,12 +1147,12 @@ void LibartPath::svgMoveTo(double x1, double y1, bool closed, bool) if(index > 0 && !closed) { // Find last subpath - int find = -1; + int tqfind = -1; for(int i = index - 1; i >= 0; i--) { if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO) { - find = i; + tqfind = i; break; } } @@ -1160,8 +1160,8 @@ void LibartPath::svgMoveTo(double x1, double y1, bool closed, bool) ensureSpace(m_array, index) m_array[index].code = (ArtPathcode) ART_END2; - m_array[index].x3 = m_array[find].x3; - m_array[index].y3 = m_array[find].y3; + m_array[index].x3 = m_array[tqfind].x3; + m_array[index].y3 = m_array[tqfind].y3; index++; } @@ -1205,25 +1205,25 @@ void LibartPath::svgClosePath() double curx = m_array[index - 1].x3; double cury = m_array[index - 1].y3; - int find = -1; + int tqfind = -1; for(int i = index - 1; i >= 0; i--) { if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO) { - find = i; + tqfind = i; break; } } - if(find != -1) + if(tqfind != -1) { - if(m_array[find].x3 != curx || m_array[find].y3 != cury) + if(m_array[tqfind].x3 != curx || m_array[tqfind].y3 != cury) { ensureSpace(m_array, index) m_array[index].code = ART_LINETO; - m_array[index].x3 = m_array[find].x3; - m_array[index].y3 = m_array[find].y3; + m_array[index].x3 = m_array[tqfind].x3; + m_array[index].y3 = m_array[tqfind].y3; } } } @@ -1285,28 +1285,28 @@ void LibartClipPath::init() for(; !node.isNull(); node = node.nextSibling()) { SVGElementImpl *element = m_clipPath->ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element); + SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element); SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element); bool ok = tests ? tests->ok() : true; - if(element && shape && ok && !shape->isContainer()) + if(element && tqshape && ok && !tqshape->isContainer()) { - LibartClipItem *clipElement = dynamic_cast<LibartClipItem *>(shape->item()); + LibartClipItem *clipElement = dynamic_cast<LibartClipItem *>(tqshape->item()); - if(dynamic_cast<LibartText *>(shape->item())) + if(dynamic_cast<LibartText *>(tqshape->item())) { // The cast to a clipElement above is failing when it is valid. But only // in the plugin - svgdisplay works fine. What's going on? (Adrian) - clipElement = dynamic_cast<LibartText *>(shape->item()); + clipElement = dynamic_cast<LibartText *>(tqshape->item()); } if(clipElement) { clipElement->setRenderContext(CLIPPING); - // Push coordinate system down to children. - SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(shape); + // Push coordinate system down to tqchildren. + SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(tqshape); if(locatable) locatable->updateCachedScreenCTM(clipMatrix); @@ -1505,22 +1505,22 @@ void LibartText::update(CanvasItemUpdate reason, int param1, int param2) bool strokeOk = stroke && stroke->svp && text->isStroked() && text->getStrokeWidth()->baseVal()->value() > 0; // Spec: A zero value causes no stroke to be painted. if(fillOk || strokeOk) { - if(m_fillPainters.find(text)) + if(m_fillPainters.tqfind(text)) m_fillPainters[text]->update(text); - if(m_strokePainters.find(text)) + if(m_strokePainters.tqfind(text)) m_strokePainters[text]->update(text); } fill = ++it1; stroke = ++it2; } - m_canvas->invalidate(this, false); + m_canvas->tqinvalidate(this, false); } else if(reason == UPDATE_TRANSFORM) { clearSVPs(); init(); - m_canvas->invalidate(this, true); + m_canvas->tqinvalidate(this, true); } else if(reason == UPDATE_ZOOM) { @@ -1574,10 +1574,10 @@ void LibartText::draw() if(fillOk || strokeOk) { - if(fillOk && m_fillPainters.find(text)) + if(fillOk && m_fillPainters.tqfind(text)) m_fillPainters[text]->draw(m_canvas, fill->svp, text, text); - if(strokeOk && m_strokePainters.find(text)) + if(strokeOk && m_strokePainters.tqfind(text)) m_strokePainters[text]->draw(m_canvas, stroke->svp, text, text); } fill = ++it1; @@ -1655,11 +1655,11 @@ void LibartText::renderCallback(SVGTextContentElementImpl *element, const SVGMat m_drawFillItems.append(fillElement); m_drawStrokeItems.append(strokeElement); - if(!m_fillPainters.find(element) && element->isFilled()) + if(!m_fillPainters.tqfind(element) && element->isFilled()) m_fillPainters.insert(element, new LibartFillPainter(element)); // Spec: A zero value causes no stroke to be painted. - if(!m_strokePainters.find(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0) + if(!m_strokePainters.tqfind(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0) m_strokePainters.insert(element, new LibartStrokePainter(element)); } } @@ -1734,7 +1734,7 @@ void LibartText::addTextDecoration(SVGTextContentElementImpl *element, double x, m_drawFillItems.append(fillElement); - if(!m_fillPainters.find(element) && element->isFilled()) + if(!m_fillPainters.tqfind(element) && element->isFilled()) m_fillPainters.insert(element, new LibartFillPainter(element)); art_svp_free(temp); @@ -1752,7 +1752,7 @@ void LibartText::addTextDecoration(SVGTextContentElementImpl *element, double x, m_drawStrokeItems.append(strokeElement); // Spec: A zero value causes no stroke to be painted. - if(!m_strokePainters.find(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0) + if(!m_strokePainters.tqfind(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0) m_strokePainters.insert(element, new LibartStrokePainter(element)); } art_free(vec); @@ -1799,10 +1799,10 @@ ArtRender *LibartPaintServer::createRenderer(TQRect bbox, KSVGCanvas *c) // Note: We always pass 3 for the number of channels since the ART_ALPHA parameter // adds the alpha channel when present. ArtRender *render = 0; - render = art_render_new(QMIN(x0, x1), - QMIN(y0, y1), - QMAX(x0, x1) + 1, - QMAX(y0, y1) + 1, + render = art_render_new(TQMIN(x0, x1), + TQMIN(y0, y1), + TQMAX(x0, x1) + 1, + TQMAX(y0, y1) + 1, c->renderingBuffer() + x0 * c->nrChannels() + y0 * c->rowStride(), c->rowStride(), 3, 8, c->nrChannels() == 3 ? ART_ALPHA_NONE : ART_ALPHA_PREMUL, 0); @@ -1868,8 +1868,8 @@ void LibartGradient::parseGradientStops(SVGGradientElementImpl *gradient) float opacity = elem->stopOpacity(); // Get rgba color including stop-opacity - Q_UINT32 rgba = (stopColor << 8) | int(opacity * 255.0 + 0.5); - Q_UINT32 r, g, b, a; + TQ_UINT32 rgba = (stopColor << 8) | int(opacity * 255.0 + 0.5); + TQ_UINT32 r, g, b, a; a = rgba & 0xff; r = (rgba >> 24) & 0xff; @@ -1899,7 +1899,7 @@ void LibartGradient::reference(const TQString &) { } -void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox) +void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox) { if(!m_stops.isEmpty()) { @@ -2022,9 +2022,9 @@ void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB art_render_svp(render, svp); art_ksvg_render_gradient_linear(render, linear, ART_FILTER_HYPER); - if(mask.data()) + if(tqmask.data()) art_render_mask(render, screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1, - (const art_u8 *)mask.data(), screenBBox.width()); + (const art_u8 *)tqmask.data(), screenBBox.width()); art_render_invoke(render); @@ -2032,7 +2032,7 @@ void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB } } -void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox) +void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox) { if(!m_stops.isEmpty()) { @@ -2085,7 +2085,7 @@ void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB // Here we're undoing the unit-converter's work because putting the // bounding box transform into the matrix here lets the gradient transform // sit at the right point in the chain to work with bounding box coordinates. - // It also produces the elliptical shape due to the non-uniform scaling. + // It also produces the elliptical tqshape due to the non-uniform scaling. SVGRectImpl *userBBox = getBBoxTarget()->getBBox(); double width = userBBox->width(); @@ -2158,9 +2158,9 @@ void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB art_render_svp(render, svp); art_ksvg_render_gradient_radial(render, radial, ART_FILTER_HYPER); - if(mask.data()) + if(tqmask.data()) art_render_mask(render, screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1, - (const art_u8 *)mask.data(), screenBBox.width()); + (const art_u8 *)tqmask.data(), screenBBox.width()); art_render_invoke(render); @@ -2184,7 +2184,7 @@ void LibartPattern::reference(const TQString &href) m_pattern->reference(href); } -void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox) +void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox) { SVGPatternElementImpl::Tile tile = m_pattern->createTile(getBBoxTarget()); @@ -2202,7 +2202,7 @@ void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArra int alpha = int(opacity * 255 + 0.5); - ksvg_art_rgb_texture(svp, c->renderingBuffer() + screenBBox.x() * c->nrChannels() + screenBBox.y() * c->rowStride(), screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1, c->rowStride(), c->nrChannels(), tile.image().bits(), tile.image().width(), tile.image().height(), tile.image().width() * 4, affine, ART_FILTER_NEAREST, 0L, alpha, (art_u8 *)mask.data()); + ksvg_art_rgb_texture(svp, c->renderingBuffer() + screenBBox.x() * c->nrChannels() + screenBBox.y() * c->rowStride(), screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1, c->rowStride(), c->nrChannels(), tile.image().bits(), tile.image().width(), tile.image().height(), tile.image().width() * 4, affine, ART_FILTER_NEAREST, 0L, alpha, (art_u8 *)tqmask.data()); } } diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.h b/ksvg/plugin/backends/libart/LibartCanvasItems.h index d34ec9f4..bf18dbd0 100644 --- a/ksvg/plugin/backends/libart/LibartCanvasItems.h +++ b/ksvg/plugin/backends/libart/LibartCanvasItems.h @@ -73,7 +73,7 @@ namespace KSVG LibartPaintServer() : CanvasPaintServer() {} virtual ~LibartPaintServer() {} - virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox) = 0; + virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox) = 0; _ArtRender *createRenderer(TQRect rect, KSVGCanvas *c); }; @@ -99,7 +99,7 @@ namespace KSVG public: LibartLinearGradient(SVGLinearGradientElementImpl *linear) : LibartGradient(linear), m_linear(linear) {} - virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox); + virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox); protected: SVGLinearGradientElementImpl *m_linear; @@ -110,7 +110,7 @@ namespace KSVG public: LibartRadialGradient(SVGRadialGradientElementImpl *radial) : LibartGradient(radial), m_radial(radial) {} - virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox); + virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox); protected: SVGRadialGradientElementImpl *m_radial; @@ -125,7 +125,7 @@ namespace KSVG virtual void finalizePaintServer(); virtual void reference(const TQString &href); - virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox); + virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox); protected: SVGPatternElementImpl *m_pattern; @@ -138,12 +138,12 @@ namespace KSVG virtual ~LibartPainter() {} void update(SVGStylableImpl *style); - void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape); + void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *tqshape); virtual float opacity(SVGStylableImpl *style) const = 0; virtual unsigned short paintType(SVGStylableImpl *style) const = 0; virtual TQString paintUri(SVGStylableImpl *style) const = 0; - virtual QRgb color(SVGStylableImpl *style) const = 0; + virtual TQRgb color(SVGStylableImpl *style) const = 0; protected: art_u32 m_color; @@ -157,7 +157,7 @@ namespace KSVG float opacity(SVGStylableImpl *style) const { return style->getFillOpacity() * style->getOpacity(); } unsigned short paintType(SVGStylableImpl *style) const { return style->getFillColor()->paintType(); } TQString paintUri(SVGStylableImpl *style) const { return style->getFillColor()->uri().string(); } - QRgb color(SVGStylableImpl *style) const { return style->getFillColor()->rgbColor().color(); } + TQRgb color(SVGStylableImpl *style) const { return style->getFillColor()->rgbColor().color(); } }; class LibartStrokePainter : public LibartPainter @@ -168,7 +168,7 @@ namespace KSVG float opacity(SVGStylableImpl *style) const { return style->getStrokeOpacity() * style->getOpacity(); } unsigned short paintType(SVGStylableImpl *style) const { return style->getStrokeColor()->paintType(); } TQString paintUri(SVGStylableImpl *style) const { return style->getStrokeColor()->uri().string(); } - QRgb color(SVGStylableImpl *style) const { return style->getStrokeColor()->rgbColor().color(); } + TQRgb color(SVGStylableImpl *style) const { return style->getStrokeColor()->rgbColor().color(); } }; class LibartClipItem @@ -195,8 +195,8 @@ namespace KSVG virtual bool fillContains(const TQPoint &p); virtual bool strokeContains(const TQPoint &p); virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0); - void draw(SVGShapeImpl *shape); - bool isVisible(SVGShapeImpl *shape); + void draw(SVGShapeImpl *tqshape); + bool isVisible(SVGShapeImpl *tqshape); virtual void init(); virtual void init(const SVGMatrixImpl *); diff --git a/ksvg/plugin/ksvg_factory.cpp b/ksvg/plugin/ksvg_factory.cpp index d5e5e1dc..41392c55 100644 --- a/ksvg/plugin/ksvg_factory.cpp +++ b/ksvg/plugin/ksvg_factory.cpp @@ -43,7 +43,7 @@ extern "C" KInstance *KSVGPluginFactory::s_instance = 0; KAboutData *KSVGPluginFactory::s_about = 0; -KSVGPluginFactory::KSVGPluginFactory(TQObject *parent, const char *name) : KParts::Factory(parent, name) +KSVGPluginFactory::KSVGPluginFactory(TQObject *tqparent, const char *name) : KParts::Factory(tqparent, name) { } @@ -56,7 +56,7 @@ KSVGPluginFactory::~KSVGPluginFactory() s_about = 0; } -KParts::Part *KSVGPluginFactory::createPartObject(TQWidget *parentWidget, const char *wname, TQObject *parent, const char *name, const char *, const TQStringList &args) +KParts::Part *KSVGPluginFactory::createPartObject(TQWidget *tqparentWidget, const char *wname, TQObject *tqparent, const char *name, const char *, const TQStringList &args) { // Get the width and height of the <embed> // TODO : <object> @@ -72,7 +72,7 @@ KParts::Part *KSVGPluginFactory::createPartObject(TQWidget *parentWidget, const height = r2.cap(3).toUInt(&dummy); } - return new KSVGPlugin(parentWidget, wname, parent, name, width, height); + return new KSVGPlugin(tqparentWidget, wname, tqparent, name, width, height); } KInstance *KSVGPluginFactory::instance() @@ -90,8 +90,8 @@ KInstance *KSVGPluginFactory::instance() return s_instance; } -KSVGPluginBrowserExtension::KSVGPluginBrowserExtension(KSVGPlugin *parent) -: KParts::BrowserExtension(parent, "KSVGPlugin BrowserExtension") +KSVGPluginBrowserExtension::KSVGPluginBrowserExtension(KSVGPlugin *tqparent) +: KParts::BrowserExtension(tqparent, "KSVGPlugin BrowserExtension") { } diff --git a/ksvg/plugin/ksvg_factory.h b/ksvg/plugin/ksvg_factory.h index c931e503..04b351be 100644 --- a/ksvg/plugin/ksvg_factory.h +++ b/ksvg/plugin/ksvg_factory.h @@ -30,11 +30,12 @@ class KInstance; class KSVGPluginFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: - KSVGPluginFactory(TQObject *parent = 0, const char *name = 0); + KSVGPluginFactory(TQObject *tqparent = 0, const char *name = 0); virtual ~KSVGPluginFactory(); - virtual KParts::Part *createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList()); + virtual KParts::Part *createPartObject(TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *tqparent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList()); static KInstance *instance(); @@ -46,10 +47,11 @@ private: class KSVGPluginBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT friend class KSVGPlugin; public: - KSVGPluginBrowserExtension(KSVGPlugin *parent); + KSVGPluginBrowserExtension(KSVGPlugin *tqparent); virtual ~KSVGPluginBrowserExtension(); }; diff --git a/ksvg/plugin/ksvg_plugin.cpp b/ksvg/plugin/ksvg_plugin.cpp index 75699ec7..87cd7398 100644 --- a/ksvg/plugin/ksvg_plugin.cpp +++ b/ksvg/plugin/ksvg_plugin.cpp @@ -81,7 +81,7 @@ struct KSVGPlugin::Private unsigned int height; }; -KSVGPlugin::KSVGPlugin(TQWidget *wparent, const char *, TQObject *parent, const char *name, unsigned int width, unsigned int height) : KParts::ReadOnlyPart(parent, name) +KSVGPlugin::KSVGPlugin(TQWidget *wtqparent, const char *, TQObject *tqparent, const char *name, unsigned int width, unsigned int height) : KParts::ReadOnlyPart(tqparent, name) { kdDebug(26003) << "KSVGPlugin::KSVGPlugin" << endl; setInstance(KSVGPluginFactory::instance()); @@ -95,7 +95,7 @@ KSVGPlugin::KSVGPlugin(TQWidget *wparent, const char *, TQObject *parent, const ksvgd->doc = 0; - ksvgd->window = new KSVGWidget(this, wparent, "Rendering Widget"); + ksvgd->window = new KSVGWidget(this, wtqparent, "Rendering Widget"); connect(ksvgd->window, TQT_SIGNAL(browseURL(const TQString &)), this, TQT_SLOT(browseURL(const TQString &))); ksvgd->window->show(); @@ -110,7 +110,7 @@ KSVGPlugin::KSVGPlugin(TQWidget *wparent, const char *, TQObject *parent, const if(!ksvgd->canvas) return; - ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window); + ksvgd->canvas->setup(TQT_TQPAINTDEVICE(ksvgd->backgroundPixmap), TQT_TQPAINTDEVICE(ksvgd->window)); ksvgd->zoomInAction = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection()); ksvgd->zoomOutAction = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection()); @@ -144,7 +144,7 @@ KSVGPlugin::KSVGPlugin(TQWidget *wparent, const char *, TQObject *parent, const ksvgd->renderingBackendAction->setItems(items); ksvgd->renderingBackendAction->setCurrentItem(KSVG::CanvasFactory::self()->itemInList(ksvgd->canvas)); - ksvgd->aboutKSVG = new KAboutApplication(KSVGPluginFactory::instance()->aboutData(), wparent); + ksvgd->aboutKSVG = new KAboutApplication(KSVGPluginFactory::instance()->aboutData(), wtqparent); setXMLFile("ksvgplugin.rc"); } @@ -299,7 +299,7 @@ void KSVGPlugin::slotRenderingBackend() if(!ksvgd->canvas) return; - ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window); + ksvgd->canvas->setup(TQT_TQPAINTDEVICE(ksvgd->backgroundPixmap), TQT_TQPAINTDEVICE(ksvgd->window)); openURL(m_url); } @@ -398,7 +398,7 @@ void KSVGPlugin::update() void KSVGPlugin::slotSetDescription(const TQString &desc) { ksvgd->description = desc; - emit setStatusBarText(i18n("Description: %1").arg(desc)); + emit setStatusBarText(i18n("Description: %1").tqarg(desc)); } void KSVGPlugin::slotSetTitle(const TQString &title) @@ -409,7 +409,7 @@ void KSVGPlugin::slotSetTitle(const TQString &title) void KSVGPlugin::slotGotURL(const TQString &text) { if(text.isNull() && !ksvgd->description.isEmpty()) - emit setStatusBarText(i18n("Description: %1").arg(ksvgd->description)); + emit setStatusBarText(i18n("Description: %1").tqarg(ksvgd->description)); else emit setStatusBarText(text); } diff --git a/ksvg/plugin/ksvg_plugin.h b/ksvg/plugin/ksvg_plugin.h index 669d3661..6bff6144 100644 --- a/ksvg/plugin/ksvg_plugin.h +++ b/ksvg/plugin/ksvg_plugin.h @@ -35,8 +35,9 @@ namespace KSVG class KSVGPlugin : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - KSVGPlugin(TQWidget *parentWidget, const char *wname, TQObject *parent, const char *name, unsigned int width = 0, unsigned int height = 0); + KSVGPlugin(TQWidget *tqparentWidget, const char *wname, TQObject *tqparent, const char *name, unsigned int width = 0, unsigned int height = 0); virtual ~KSVGPlugin(); virtual bool openFile() { return false; } diff --git a/ksvg/plugin/ksvg_widget.cpp b/ksvg/plugin/ksvg_widget.cpp index 0f1b9d3e..8cfb4baa 100644 --- a/ksvg/plugin/ksvg_widget.cpp +++ b/ksvg/plugin/ksvg_widget.cpp @@ -27,11 +27,11 @@ #include "SVGDocumentImpl.h" #include "SVGSVGElementImpl.h" -KSVGWidget::KSVGWidget(KSVGPlugin *part, TQWidget *parent, const char *name) -: TQWidget(parent, name), m_part(part) +KSVGWidget::KSVGWidget(KSVGPlugin *part, TQWidget *tqparent, const char *name) +: TQWidget(tqparent, name), m_part(part) { setMouseTracking(true); - setFocusPolicy(WheelFocus); + setFocusPolicy(TQ_WheelFocus); setBackgroundMode(NoBackground); @@ -90,10 +90,10 @@ KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, T event->globalY(), // screenYArg, clientX, // clientXArg clientY, // clientYArg - (event->state() & Qt::ControlButton), // ctrlKeyArg - (event->state() & Qt::AltButton), // altKeyArg - (event->state() & Qt::ShiftButton), // shiftKeyArg - (event->state() & Qt::MetaButton), // metaKeyArg + (event->state() & TQt::ControlButton), // ctrlKeyArg + (event->state() & TQt::AltButton), // altKeyArg + (event->state() & TQt::ShiftButton), // shiftKeyArg + (event->state() & TQt::MetaButton), // metaKeyArg button, // buttonArg 0); @@ -104,7 +104,7 @@ KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, T void KSVGWidget::mouseMoveEvent(TQMouseEvent *event) { - if(event->state() & TQMouseEvent::ControlButton && event->state() & TQMouseEvent::LeftButton) + if(event->state() & TQt::ControlButton && event->state() & Qt::LeftButton) { if(m_panningPos.isNull()) m_panningPos = event->pos(); @@ -113,7 +113,7 @@ void KSVGWidget::mouseMoveEvent(TQMouseEvent *event) return; } - else if(event->state() & TQMouseEvent::ControlButton) + else if(event->state() & TQt::ControlButton) return; KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEMOVE_EVENT, event); @@ -183,10 +183,10 @@ void KSVGWidget::mouseMoveEvent(TQMouseEvent *event) void KSVGWidget::mousePressEvent(TQMouseEvent *event) { - if(event->state() & TQMouseEvent::ControlButton) + if(event->state() & TQt::ControlButton) return; - if(event->button() == RightButton) + if(event->button() == Qt::RightButton) { if(part() && part()->factory()) { @@ -213,7 +213,7 @@ void KSVGWidget::mouseReleaseEvent(TQMouseEvent *event) m_panningPos.setY(0); } - if(event->state() & TQMouseEvent::ControlButton) + if(event->state() & TQt::ControlButton) return; KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEUP_EVENT, event); @@ -234,7 +234,7 @@ void KSVGWidget::mouseReleaseEvent(TQMouseEvent *event) void KSVGWidget::keyPressEvent(TQKeyEvent *ke) { - if(ke->stateAfter() & TQMouseEvent::ControlButton) + if(ke->stateAfter() & TQt::ControlButton) { setCursor(KCursor::sizeAllCursor()); return; @@ -246,7 +246,7 @@ void KSVGWidget::keyPressEvent(TQKeyEvent *ke) void KSVGWidget::keyReleaseEvent(TQKeyEvent *ke) { - if(ke->state() & TQMouseEvent::ControlButton) + if(ke->state() & TQt::ControlButton) { setCursor(KCursor::arrowCursor()); return; diff --git a/ksvg/plugin/ksvg_widget.h b/ksvg/plugin/ksvg_widget.h index c25fddbc..33fc82e3 100644 --- a/ksvg/plugin/ksvg_widget.h +++ b/ksvg/plugin/ksvg_widget.h @@ -28,11 +28,12 @@ #include <SVGEventImpl.h> class KSVGPlugin; -class KSVGWidget : public QWidget +class KSVGWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KSVGWidget(KSVGPlugin *part, TQWidget *parent, const char *name); + KSVGWidget(KSVGPlugin *part, TQWidget *tqparent, const char *name); virtual ~KSVGWidget(); KSVGPlugin *part() const; diff --git a/ksvg/plugin/svgcreator.cpp b/ksvg/plugin/svgcreator.cpp index dc20e06f..02e6cf95 100644 --- a/ksvg/plugin/svgcreator.cpp +++ b/ksvg/plugin/svgcreator.cpp @@ -56,10 +56,10 @@ bool SVGCreator::create(const TQString &path, int width, int height, TQImage &im doc->ref(); TQPixmap pix(width, height); - pix.fill(Qt::white); + pix.fill(TQt::white); KSVG::KSVGCanvas *c = KSVG::CanvasFactory::self()->loadCanvas(width, height); - c->setup(&pix, &pix); + c->setup(TQT_TQPAINTDEVICE(&pix), TQT_TQPAINTDEVICE(&pix)); doc->attach(c); connect(doc, TQT_SIGNAL(finishedRendering()), TQT_SLOT(slotFinished())); diff --git a/ksvg/plugin/svgcreator.h b/ksvg/plugin/svgcreator.h index 403f0a78..4f4c6510 100644 --- a/ksvg/plugin/svgcreator.h +++ b/ksvg/plugin/svgcreator.h @@ -27,6 +27,7 @@ class SVGCreator : public TQObject, public ThumbCreator { Q_OBJECT + TQ_OBJECT public: SVGCreator(); virtual ~SVGCreator(); diff --git a/ksvg/scripts/check_hashtablesize.pl b/ksvg/scripts/check_hashtablesize.pl index d22e3f30..b1fd103a 100755 --- a/ksvg/scripts/check_hashtablesize.pl +++ b/ksvg/scripts/check_hashtablesize.pl @@ -88,9 +88,9 @@ my %counter2; my %counter3; # Read hashtable size -my $readSize1 = `find -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep Function`; -my $readSize2 = `find -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep -v Function`; -my $readSize3 = `find -type f | xargs grep -I DontDelete | grep KSVG::`; +my $readSize1 = `tqfind -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep Function`; +my $readSize2 = `tqfind -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep -v Function`; +my $readSize3 = `tqfind -type f | xargs grep -I DontDelete | grep KSVG::`; my @result1 = split(/.\//, $readSize1); my @result2 = split(/.\//, $readSize2); @@ -100,9 +100,9 @@ my @result3 = split(/.\//, $readSize3); # calcSize1 = print out all prototype hashtables # calcSize2 = print out all non-prototype hashtables # calcSize3 = print out all svg*constructors hashtables -my $calcSize1 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Impl:: | grep -v Bridge::`; -my $calcSize2 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Proto::`; -my $calcSize3 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep Constructor`; +my $calcSize1 = `tqfind -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Impl:: | grep -v Bridge::`; +my $calcSize2 = `tqfind -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Proto::`; +my $calcSize3 = `tqfind -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep Constructor`; # Bring in suitable form calcSize($calcSize1, \%counter1, 5); diff --git a/ksvg/scripts/generate.pl b/ksvg/scripts/generate.pl index a9419dcc..0ef0ddc6 100755 --- a/ksvg/scripts/generate.pl +++ b/ksvg/scripts/generate.pl @@ -26,7 +26,7 @@ my %excludes = ( # List headers, and exclude the ones listed above my @headers = (); my $incdir=$here; -opendir (INCS, $incdir) or die "Couldn't find $incdir"; +opendir (INCS, $incdir) or die "Couldn't tqfind $incdir"; foreach $filename (readdir(INCS)) { $entry = $incdir."/".$filename; if ( ( -e $entry or -l $entry ) # A real file or a symlink diff --git a/ksvg/test/W3C_TESTSUITE_1.1 b/ksvg/test/W3C_TESTSUITE_1.1 index b0766355..39d280c4 100644 --- a/ksvg/test/W3C_TESTSUITE_1.1 +++ b/ksvg/test/W3C_TESTSUITE_1.1 @@ -103,13 +103,13 @@ linking-uri-02-b - linking-uri-03-t x [MASKING] -masking-mask-01-b - -masking-opacity-01-b o -masking-path-01-b x -masking-path-02-b x -masking-path-03-t x -masking-path-04-b o -masking-path-05-f x +tqmasking-tqmask-01-b - +tqmasking-opacity-01-b o +tqmasking-path-01-b x +tqmasking-path-02-b x +tqmasking-path-03-t x +tqmasking-path-04-b o +tqmasking-path-05-f x [METADATA] metadata-example-01-b x @@ -169,12 +169,12 @@ script-handle-03-t x script-handle-04-t x [SHAPES] -shapes-circle-01-t x -shapes-ellipse-01-t x -shapes-line-01-t x -shapes-polygon-01-t x -shapes-polyline-01-t x -shapes-rect-01-t x +tqshapes-circle-01-t x +tqshapes-ellipse-01-t x +tqshapes-line-01-t x +tqshapes-polygon-01-t x +tqshapes-polyline-01-t x +tqshapes-rect-01-t x [STRUCT] struct-cond-01-t x diff --git a/ksvg/test/ZVON-TEST-PASSED b/ksvg/test/ZVON-TEST-PASSED index 81cb6d52..1f92bef0 100644 --- a/ksvg/test/ZVON-TEST-PASSED +++ b/ksvg/test/ZVON-TEST-PASSED @@ -81,15 +81,15 @@ linking-view-BE-05.svg o linking-xlinkAttr-BE-02.svg x Group 11: [Masking] - 21.09.2003 -masking-clipPath-BE-01.svg: x -masking-clipPath-BE-02.svg: x -masking-clipPath-BE-08.svg: x -masking-clipRule-BE-03.svg: x -masking-groupOpac-BE-04.svg: x -masking-mask-BE-05.svg: x -masking-mask-BE-06.svg: x -masking-property-BE-07.svg: x -masking-vportClip-BE-09.svg: x +tqmasking-clipPath-BE-01.svg: x +tqmasking-clipPath-BE-02.svg: x +tqmasking-clipPath-BE-08.svg: x +tqmasking-clipRule-BE-03.svg: x +tqmasking-groupOpac-BE-04.svg: x +tqmasking-tqmask-BE-05.svg: x +tqmasking-tqmask-BE-06.svg: x +tqmasking-property-BE-07.svg: x +tqmasking-vportClip-BE-09.svg: x Group 12: [Metadata] - 21.09.2003 metadata-sample-BE-01.svg: x PLANE REFERENCE IMAGE LOOKS WRONG - WE MATCH BATIK'S OUTPUT @@ -112,7 +112,7 @@ path-lines-BE-01.svg: x Group 16: [Rendering] - 21.09.2003 rendering-orderGr-BE-01.svg: x -rendering-shape-BE-03.svg: x +rendering-tqshape-BE-03.svg: x rendering-text-BE-02.svg: x Group 17: [Script] - 21.09.2003 @@ -120,12 +120,12 @@ script-eventDom-BE-01.svg: x script-uiEvents-BE-02.svg: x Group 18: [Shapes] - 21.09.2003 -shapes-circle-BE-03.svg: x -shapes-ellipse-BE-02.svg: x -shapes-line-BE-04.svg: x -shapes-polygon-BE-05.svg: x -shapes-polyline-BE-06.svg: x -shapes-rect-BE-01.svg: x +tqshapes-circle-BE-03.svg: x +tqshapes-ellipse-BE-02.svg: x +tqshapes-line-BE-04.svg: x +tqshapes-polygon-BE-05.svg: x +tqshapes-polyline-BE-06.svg: x +tqshapes-rect-BE-01.svg: x Group 19: [Structure] - 21.09.2003 structure-allElem-BE-09.svg: x @@ -146,8 +146,8 @@ style-selector-BE-02.svg: o style-selector-BE-03.svg: o Group 21: [Text] - 29.09.2003 -text-alignment-BE-10.svg: x -text-alignment-BE-11.svg: x +text-tqalignment-BE-10.svg: x +text-tqalignment-BE-11.svg: x text-altGlyph-BE-07.svg: o FONTS SUPPORT MISSING text-decoration-BE-12.svg: x text-extTref-BE-18.svg: x diff --git a/ksvg/test/ecma/bbox/bbox.js b/ksvg/test/ecma/bbox/bbox.js index 2d692694..88eaa592 100644 --- a/ksvg/test/ecma/bbox/bbox.js +++ b/ksvg/test/ecma/bbox/bbox.js @@ -13,12 +13,12 @@ function bbox_loop(drawit, number) for(var i = 0; i < number; i++) { - var shape = doc.getElementById("test-" + i); - var bbox = shape.getBBox(); + var tqshape = doc.getElementById("test-" + i); + var bbox = tqshape.getBBox(); if(drawit == "true") { - draw_it(doc, bbox, shape, i + 1); + draw_it(doc, bbox, tqshape, i + 1); } else { @@ -27,13 +27,13 @@ function bbox_loop(drawit, number) } } -function do_string(shape, number) +function do_string(tqshape, number) { - var string = "\nShape " + number + "\nX = " + shape.x + "\nY = " + shape.y + "\nW = " + shape.width + "\nH = " + shape.height; + var string = "\nShape " + number + "\nX = " + tqshape.x + "\nY = " + tqshape.y + "\nW = " + tqshape.width + "\nH = " + shape.height; alert(string); } -function draw_it(doc, bbox, shape, number) +function draw_it(doc, bbox, tqshape, number) { var element = doc.createElement("rect"); element.setAttribute("x", bbox.x); @@ -45,7 +45,7 @@ function draw_it(doc, bbox, shape, number) element.setAttribute("stroke-width", "3"); element.setAttribute("id", "bbox" + number); - shape.getParentNode().appendChild(element); + tqshape.getParentNode().appendChild(element); } function gen_buttons(evt, number) diff --git a/ksvg/test/external/SVGTestWidget.cc b/ksvg/test/external/SVGTestWidget.cc index aa968e24..ba17bc37 100644 --- a/ksvg/test/external/SVGTestWidget.cc +++ b/ksvg/test/external/SVGTestWidget.cc @@ -16,11 +16,11 @@ using namespace KSVG; SVGTestWidget::SVGTestWidget(const KURL &url) { - setBackgroundColor(Qt::white); + setBackgroundColor(TQt::white); setMouseTracking(true); - setFocusPolicy(WheelFocus); + setFocusPolicy(TQ_WheelFocus); - m_doc = DocumentFactory::self()->requestDocument(this, TQT_SLOT(slotRenderingFinished())); + m_doc = DocumentFactory::self()->requestDocument(TQT_TQOBJECT(this), TQT_SLOT(slotRenderingFinished())); if(!m_doc) return; @@ -29,7 +29,7 @@ SVGTestWidget::SVGTestWidget(const KURL &url) if(!m_canvas) return; - m_canvas->setup(this, this); + m_canvas->setup(TQT_TQPAINTDEVICE(this), TQT_TQPAINTDEVICE(this)); if(!DocumentFactory::self()->attachCanvas(m_canvas, m_doc)) return; @@ -104,10 +104,10 @@ KSVG::SVGMouseEventImpl *newMouseEvent(SVGDocument *doc, KSVG::SVGEventImpl::Eve event->globalY(), // screenYArg, clientX, // clientXArg clientY, // clientYArg - (event->state() & Qt::ControlButton), // ctrlKeyArg - (event->state() & Qt::AltButton), // altKeyArg - (event->state() & Qt::ShiftButton), // shiftKeyArg - (event->state() & Qt::MetaButton), // metaKeyArg + (event->state() & TQt::ControlButton), // ctrlKeyArg + (event->state() & TQt::AltButton), // altKeyArg + (event->state() & TQt::ShiftButton), // shiftKeyArg + (event->state() & TQt::MetaButton), // metaKeyArg button, // buttonArg 0); @@ -185,7 +185,7 @@ void SVGTestWidget::keyReleaseEvent(TQKeyEvent *event) } SVGSVGElementImpl *root = m_doc->rootElement(); if(!root) return; - if(event->key() == Qt::Key_Minus) + if(event->key() == TQt::Key_Minus) { erase(0, 0, m_canvas->width(), m_canvas->height()); float zoomFactor = root->currentScale() / 1.2; @@ -193,7 +193,7 @@ void SVGTestWidget::keyReleaseEvent(TQKeyEvent *event) m_doc->syncCachedMatrices(); m_canvas->update(zoomFactor); } - else if(event->key() == Qt::Key_Plus) + else if(event->key() == TQt::Key_Plus) { float zoomFactor = root->currentScale() * 1.2; root->setCurrentScale(zoomFactor); diff --git a/ksvg/test/external/SVGTestWidget.h b/ksvg/test/external/SVGTestWidget.h index 676f3269..d3ad6b77 100644 --- a/ksvg/test/external/SVGTestWidget.h +++ b/ksvg/test/external/SVGTestWidget.h @@ -6,9 +6,10 @@ #include "SVGDocument.h" #include "KSVGCanvas.h" -class SVGTestWidget : public QWidget +class SVGTestWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: SVGTestWidget(const KURL &url); ~SVGTestWidget(); diff --git a/ksvg/test/external/printnodetest.h b/ksvg/test/external/printnodetest.h index 19385014..ac1bdbf8 100644 --- a/ksvg/test/external/printnodetest.h +++ b/ksvg/test/external/printnodetest.h @@ -8,9 +8,10 @@ namespace KSVG { class SVGDocument; -class Worker : public QObject +class Worker : public TQObject { Q_OBJECT + TQ_OBJECT public: Worker(const KURL &url); ~Worker(); diff --git a/kuickshow/kuickshow.spec b/kuickshow/kuickshow.spec index 0fcba9ea..ca157837 100644 --- a/kuickshow/kuickshow.spec +++ b/kuickshow/kuickshow.spec @@ -55,11 +55,11 @@ make install DESTDIR=$RPM_BUILD_ROOT cd $RPM_BUILD_ROOT -find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.%{name} -find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} -find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} +tqfind . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.%{name} %clean rm -rf $RPM_BUILD_ROOT diff --git a/kuickshow/src/aboutwidget.cpp b/kuickshow/src/aboutwidget.cpp index fc9825fd..f65b522b 100644 --- a/kuickshow/src/aboutwidget.cpp +++ b/kuickshow/src/aboutwidget.cpp @@ -31,17 +31,17 @@ #include "aboutwidget.h" -AboutWidget::AboutWidget( TQWidget *parent, const char *name ) - : TQVBox( parent, name, Qt::WShowModal ) +AboutWidget::AboutWidget( TQWidget *tqparent, const char *name ) + : TQVBox( tqparent, name, TQt::WShowModal ) { KWin::setType( winId(), NET::Override ); KWin::setState( winId(), NET::SkipTaskbar ); setFrameStyle( WinPanel | Raised ); - TQGroupBox *gBox = new TQGroupBox( 1, Horizontal, this); + TQGroupBox *gBox = new TQGroupBox( 1,Qt::Horizontal, this); gBox->setGeometry( 10, 10, width()-20, height()-20 ); - gBox->setAlignment( AlignHCenter ); + gBox->tqsetAlignment( AlignHCenter ); gBox->installEventFilter( this ); gBox->setPalette( TQPalette( TQColor( white ) ) ); @@ -57,14 +57,14 @@ AboutWidget::AboutWidget( TQWidget *parent, const char *name ) TQLabel *authors = new TQLabel("Kuickshow " KUICKSHOWVERSION " was brought to you by", gBox); - authors->setAlignment( AlignCenter ); + authors->tqsetAlignment( AlignCenter ); m_homepage = new KURLWidget("Carsten Pfeiffer", gBox); m_homepage->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" ); - m_homepage->setAlignment( AlignCenter ); + m_homepage->tqsetAlignment( AlignCenter ); TQLabel *copy = new TQLabel("(C) 1998-2006", gBox); - copy->setAlignment( AlignCenter ); + copy->tqsetAlignment( AlignCenter ); ImlibWidget *im = new ImlibWidget( 0L, gBox, "KuickShow Logo" ); if ( im->loadImage( file ) ) @@ -83,8 +83,8 @@ AboutWidget::~AboutWidget() bool AboutWidget::eventFilter( TQObject *o, TQEvent *e ) { if ( e->type() == TQEvent::MouseButtonPress ) { - TQMouseEvent *ev = static_cast<TQMouseEvent*>( e ); - if ( !m_homepage->geometry().contains( ev->pos() ) ) { + TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); + if ( !m_homepage->tqgeometry().tqcontains( ev->pos() ) ) { deleteLater(); return true; } diff --git a/kuickshow/src/aboutwidget.h b/kuickshow/src/aboutwidget.h index 0f70ccaa..c3bd487f 100644 --- a/kuickshow/src/aboutwidget.h +++ b/kuickshow/src/aboutwidget.h @@ -24,12 +24,13 @@ class KURLWidget; -class AboutWidget : public QVBox +class AboutWidget : public TQVBox { Q_OBJECT + TQ_OBJECT public: - AboutWidget(TQWidget *parent = 0, const char *name = 0); + AboutWidget(TQWidget *tqparent = 0, const char *name = 0); protected: ~AboutWidget(); diff --git a/kuickshow/src/defaultswidget.cpp b/kuickshow/src/defaultswidget.cpp index 7e94b1b1..c0596784 100644 --- a/kuickshow/src/defaultswidget.cpp +++ b/kuickshow/src/defaultswidget.cpp @@ -31,8 +31,8 @@ #include "imlibwidget.h" #include "defaultswidget.h" -DefaultsWidget::DefaultsWidget( TQWidget *parent, const char *name) - : TQWidget( parent, name ) +DefaultsWidget::DefaultsWidget( TQWidget *tqparent, const char *name) + : TQWidget( tqparent, name ) { imFiltered = 0L; @@ -92,7 +92,7 @@ DefaultsWidget::DefaultsWidget( TQWidget *parent, const char *name) // -- gbPreview = new TQGroupBox( i18n("Preview"), this ); - gbPreview->setAlignment( AlignCenter ); + gbPreview->tqsetAlignment( AlignCenter ); lbImOrig = new TQLabel( i18n("Original"), gbPreview ); imOrig = new ImlibWidget( 0L, gbPreview, "original image" ); @@ -105,13 +105,13 @@ DefaultsWidget::DefaultsWidget( TQWidget *parent, const char *name) //////////////// - // layout management + // tqlayout management TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 0, - KDialog::spacingHint(), "main layout" ); + KDialog::spacingHint(), "main tqlayout" ); - TQVBoxLayout *gbScaleLayout = new TQVBoxLayout( gbScale->layout(), + TQVBoxLayout *gbScaleLayout = new TQVBoxLayout( gbScale->tqlayout(), KDialog::spacingHint()); - TQVBoxLayout *gbGeometryLayout = new TQVBoxLayout(gbGeometry->layout(), + TQVBoxLayout *gbGeometryLayout = new TQVBoxLayout(gbGeometry->tqlayout(), KDialog::spacingHint()); TQGridLayout *gbPreviewLayout = new TQGridLayout(gbPreview, 2, 3, 0, KDialog::spacingHint()); diff --git a/kuickshow/src/defaultswidget.h b/kuickshow/src/defaultswidget.h index 5eeae365..c9f74b67 100644 --- a/kuickshow/src/defaultswidget.h +++ b/kuickshow/src/defaultswidget.h @@ -30,12 +30,13 @@ class TQLabel; class KComboBox; class KIntNumInput; -class DefaultsWidget : public QWidget +class DefaultsWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - DefaultsWidget( TQWidget *parent, const char *name ); + DefaultsWidget( TQWidget *tqparent, const char *name ); ~DefaultsWidget(); void loadSettings( const KuickData& data ); diff --git a/kuickshow/src/filecache.cpp b/kuickshow/src/filecache.cpp index 006bf46e..54403639 100644 --- a/kuickshow/src/filecache.cpp +++ b/kuickshow/src/filecache.cpp @@ -42,7 +42,7 @@ FileCache * FileCache::self() KuickFile * FileCache::getFile( const KURL& url ) { TQString urlString = url.prettyURL(); - KuickFile *file = m_files.find( urlString ); + KuickFile *file = m_files.tqfind( urlString ); if ( !file ) { file = new KuickFile( url ); m_files.insert( urlString, file ); @@ -58,7 +58,7 @@ TQString FileCache::tempDir() if ( !m_tempDir ) { kdWarning() << "Unable to create temporary directory for KuickShow" << endl; - return TQString::null; + return TQString(); } } @@ -68,7 +68,7 @@ TQString FileCache::tempDir() KTempDir * FileCache::createTempDir() { - TQString tmpName = TQString::fromLatin1( KGlobal::instance()->instanceName() ); + TQString tmpName = TQString::tqfromLatin1( KGlobal::instance()->instanceName() ); tmpName.append( TQString::number( getpid() ) ); TQString dirName = locateLocal( "tmp", tmpName ); KTempDir *dir = new KTempDir( dirName ); diff --git a/kuickshow/src/filecache.h b/kuickshow/src/filecache.h index 7cb97526..2152b5f9 100644 --- a/kuickshow/src/filecache.h +++ b/kuickshow/src/filecache.h @@ -27,7 +27,7 @@ public: int getLimit() const { return m_limit; } /** - * @return the temporary directory or TQString::null if none available + * @return the temporary directory or TQString() if none available */ TQString tempDir(); diff --git a/kuickshow/src/filefinder.cpp b/kuickshow/src/filefinder.cpp index 35bb382a..fc00b84c 100644 --- a/kuickshow/src/filefinder.cpp +++ b/kuickshow/src/filefinder.cpp @@ -26,8 +26,8 @@ #include "filefinder.h" -FileFinder::FileFinder( TQWidget *parent, const char *name ) - : KLineEdit( parent, name ) +FileFinder::FileFinder( TQWidget *tqparent, const char *name ) + : KLineEdit( tqparent, name ) { // make this widget just as large, as the font is + 8 Pixels int height = fontMetrics().height() + 8; @@ -49,7 +49,7 @@ FileFinder::FileFinder( TQWidget *parent, const char *name ) comp->setReplaceEnv( true ); setCompletionObject( comp, false ); setAutoDeleteCompletionObject( true ); - setFocusPolicy( ClickFocus ); + setFocusPolicy( TQ_ClickFocus ); KConfig *config = KGlobal::config(); KConfigGroupSaver cs( config, "GeneralConfiguration" ); @@ -87,7 +87,7 @@ void FileFinder::keyPressEvent( TQKeyEvent *e ) void FileFinder::hide() { KLineEdit::hide(); - parentWidget()->setFocus(); + tqparentWidget()->setFocus(); } void FileFinder::slotAccept( const TQString& dir ) diff --git a/kuickshow/src/filefinder.h b/kuickshow/src/filefinder.h index fc94bd71..3ec76797 100644 --- a/kuickshow/src/filefinder.h +++ b/kuickshow/src/filefinder.h @@ -28,9 +28,10 @@ class KURLCompletion; class FileFinder : public KLineEdit { Q_OBJECT + TQ_OBJECT public: - FileFinder( TQWidget *parent=0, const char *name=0 ); + FileFinder( TQWidget *tqparent=0, const char *name=0 ); ~FileFinder(); KURLCompletion *completion() { diff --git a/kuickshow/src/filewidget.cpp b/kuickshow/src/filewidget.cpp index d697db21..18284891 100644 --- a/kuickshow/src/filewidget.cpp +++ b/kuickshow/src/filewidget.cpp @@ -35,8 +35,8 @@ #undef KeyPress #endif -FileWidget::FileWidget( const KURL& url, TQWidget *parent, const char *name ) - : KDirOperator( url, parent, name ), +FileWidget::FileWidget( const KURL& url, TQWidget *tqparent, const char *name ) + : KDirOperator( url, tqparent, name ), m_validCompletion( false ), m_fileFinder( 0L ) { @@ -99,7 +99,7 @@ void FileWidget::initActions() TQPopupMenu *pMenu = menu->popupMenu(); int lastItemId = pMenu->idAt( pMenu->count() - 1 ); - TQMenuItem *mItem = pMenu->findItem( lastItemId ); + TQMenuItem *mItem = pMenu->tqfindItem( lastItemId ); if ( mItem && !mItem->isSeparator() ) menu->insert( sep ); @@ -152,7 +152,7 @@ void FileWidget::activatedMenu( const KFileItem *item, const TQPoint& pos ) void FileWidget::findCompletion( const TQString& text ) { if ( text.at(0) == '/' || text.at(0) == '~' || - text.find('/') != -1 ) { + text.tqfind('/') != -1 ) { TQString t = m_fileFinder->completion()->makeCompletion( text ); if (m_fileFinder->completionMode() == KGlobalSettings::CompletionPopup || @@ -179,7 +179,7 @@ void FileWidget::findCompletion( const TQString& text ) bool FileWidget::eventFilter( TQObject *o, TQEvent *e ) { if ( e->type() == TQEvent::KeyPress ) { - TQKeyEvent *k = static_cast<TQKeyEvent*>( e ); + TQKeyEvent *k = TQT_TQKEYEVENT( e ); if ( (k->state() & (ControlButton | AltButton)) == 0 ) { int key = k->key(); @@ -196,7 +196,7 @@ bool FileWidget::eventFilter( TQObject *o, TQEvent *e ) } const TQString& text = k->text(); - if ( !text.isEmpty() && text.unicode()->isPrint() ) { + if ( !text.isEmpty() && text.tqunicode()->isPrint() ) { k->accept(); if ( !m_fileFinder ) { @@ -360,7 +360,7 @@ void FileWidget::slotViewChanged() void FileWidget::slotItemsCleared() { - m_currentURL = TQString::null; + m_currentURL = TQString(); } void FileWidget::slotItemDeleted( KFileItem *item ) @@ -399,7 +399,7 @@ void FileWidget::slotReturnPressed( const TQString& t ) setURL( url, true ); } - else if ( text.find('/') != (int) text.length() -1 ) { // relative path + else if ( text.tqfind('/') != (int) text.length() -1 ) { // relative path TQString dir = m_fileFinder->completion()->replacedPath( text ); KURL u( url(), dir ); setURL( u, true ); @@ -444,11 +444,11 @@ void FileWidget::slotFinishedLoading() else if ( !current ) setCurrentItem( view()->items()->getFirst() ); - m_initialName = TQString::null; + m_initialName = TQString(); emit finished(); } -TQSize FileWidget::sizeHint() const +TQSize FileWidget::tqsizeHint() const { return TQSize( 300, 300 ); } diff --git a/kuickshow/src/filewidget.h b/kuickshow/src/filewidget.h index 2022bdbc..8591f9b5 100644 --- a/kuickshow/src/filewidget.h +++ b/kuickshow/src/filewidget.h @@ -29,11 +29,12 @@ class KFileItem; class FileWidget : public KDirOperator { Q_OBJECT + TQ_OBJECT public: enum WhichItem { Previous, Next, Current }; - FileWidget( const KURL& url, TQWidget *parent = 0L, const char *name = 0L ); + FileWidget( const KURL& url, TQWidget *tqparent = 0L, const char *name = 0L ); ~FileWidget(); bool hasFiles() const; @@ -70,7 +71,7 @@ protected: virtual bool eventFilter( TQObject *o, TQEvent * ); virtual void resizeEvent( TQResizeEvent * ); virtual void activatedMenu( const KFileItem *, const TQPoint& ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; private slots: void slotReturnPressed( const TQString& text ); diff --git a/kuickshow/src/generalwidget.cpp b/kuickshow/src/generalwidget.cpp index 1308885a..3b9b0352 100644 --- a/kuickshow/src/generalwidget.cpp +++ b/kuickshow/src/generalwidget.cpp @@ -33,11 +33,11 @@ #include "generalwidget.h" -GeneralWidget::GeneralWidget( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) +GeneralWidget::GeneralWidget( TQWidget *tqparent, const char *name ) + : TQWidget( tqparent, name ) { - TQVBoxLayout *layout = new TQVBoxLayout( this ); - layout->setSpacing( KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); + tqlayout->setSpacing( KDialog::spacingHint() ); TQPixmap pixmap = UserIcon( "logo" ); KURLLabel *logo = new KURLLabel( this ); @@ -50,7 +50,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name ) connect( logo, TQT_SIGNAL( leftClickedURL( const TQString & ) ), TQT_SLOT( slotURLClicked( const TQString & ) ) ); - layout->addWidget( logo, 0, AlignRight ); + tqlayout->addWidget( logo, 0, AlignRight ); cbFullscreen = new TQCheckBox( i18n("Fullscreen mode"), this, "boscreen" ); @@ -70,17 +70,17 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name ) gridLayout->addWidget( l1, 1, 0 ); gridLayout->addWidget( editFilter, 1, 1 ); - layout->addWidget( cbFullscreen ); - layout->addWidget( cbPreload ); - layout->addWidget( cbLastdir ); - layout->addLayout( gridLayout ); + tqlayout->addWidget( cbFullscreen ); + tqlayout->addWidget( cbPreload ); + tqlayout->addWidget( cbLastdir ); + tqlayout->addLayout( gridLayout ); //////////////////////////////////////////////////////////////////////// TQVGroupBox *gbox2 = new TQVGroupBox( i18n("Quality/Speed"), this, "qualitybox" ); - layout->addWidget( gbox2 ); - layout->addStretch(); + tqlayout->addWidget( gbox2 ); + tqlayout->addStretch(); cbSmoothScale = new TQCheckBox( i18n("Smooth scaling"), gbox2, "smoothscale" ); cbFastRender = new TQCheckBox( i18n("Fast rendering"), gbox2, "fastrender" ); diff --git a/kuickshow/src/generalwidget.h b/kuickshow/src/generalwidget.h index e84c46ac..d9665170 100644 --- a/kuickshow/src/generalwidget.h +++ b/kuickshow/src/generalwidget.h @@ -29,12 +29,13 @@ class KLineEdit; class KIntNumInput; -class GeneralWidget : public QWidget +class GeneralWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - GeneralWidget( TQWidget *parent, const char *name ); + GeneralWidget( TQWidget *tqparent, const char *name ); ~GeneralWidget(); void loadSettings( const KuickData& data ); diff --git a/kuickshow/src/imagewindow.cpp b/kuickshow/src/imagewindow.cpp index 72de91c1..915443bb 100644 --- a/kuickshow/src/imagewindow.cpp +++ b/kuickshow/src/imagewindow.cpp @@ -74,15 +74,15 @@ TQCursor *ImageWindow::s_handCursor = 0L; -ImageWindow::ImageWindow( ImData *_idata, ImlibData *id, TQWidget *parent, +ImageWindow::ImageWindow( ImData *_idata, ImlibData *id, TQWidget *tqparent, const char *name ) - : ImlibWidget( _idata, id, parent, name ) + : ImlibWidget( _idata, id, tqparent, name ) { init(); } -ImageWindow::ImageWindow( ImData *_idata, TQWidget *parent, const char *name ) - : ImlibWidget( _idata, parent, name ) +ImageWindow::ImageWindow( ImData *_idata, TQWidget *tqparent, const char *name ) + : ImlibWidget( _idata, tqparent, name ) { init(); } @@ -94,7 +94,7 @@ ImageWindow::~ImageWindow() void ImageWindow::init() { - setFocusPolicy( TQWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); KCursor::setAutoHideCursor( this, true, true ); KCursor::setHideCursorDelay( 1500 ); @@ -146,103 +146,103 @@ void ImageWindow::updateActions() void ImageWindow::setupActions() { new KAction( i18n("Show Next Image"), KStdAccel::next(), - this, TQT_SLOT( slotRequestNext() ), + TQT_TQOBJECT(this), TQT_SLOT( slotRequestNext() ), m_actions, "next_image" ); new KAction( i18n("Show Previous Image"), KStdAccel::prior(), - this, TQT_SLOT( slotRequestPrevious() ), + TQT_TQOBJECT(this), TQT_SLOT( slotRequestPrevious() ), m_actions, "previous_image" ); new KAction( i18n("Delete Image"), SHIFT + Key_Delete, - this, TQT_SLOT( imageDelete() ), + TQT_TQOBJECT(this), TQT_SLOT( imageDelete() ), m_actions, "delete_image" ); new KAction( i18n("Move Image to Trash"), Key_Delete, - this, TQT_SLOT( imageTrash() ), + TQT_TQOBJECT(this), TQT_SLOT( imageTrash() ), m_actions, "trash_image" ); new KAction( i18n("Zoom In"), Key_Plus, - this, TQT_SLOT( zoomIn() ), + TQT_TQOBJECT(this), TQT_SLOT( zoomIn() ), m_actions, "zoom_in" ); new KAction( i18n("Zoom Out"), Key_Minus, - this, TQT_SLOT( zoomOut() ), + TQT_TQOBJECT(this), TQT_SLOT( zoomOut() ), m_actions, "zoom_out" ); new KAction( i18n("Restore Original Size"), Key_O, - this, TQT_SLOT( showImageOriginalSize() ), + TQT_TQOBJECT(this), TQT_SLOT( showImageOriginalSize() ), m_actions, "original_size" ); new KAction( i18n("Maximize"), Key_M, - this, TQT_SLOT( maximize() ), + TQT_TQOBJECT(this), TQT_SLOT( maximize() ), m_actions, "maximize" ); new KAction( i18n("Rotate 90 Degrees"), Key_9, - this, TQT_SLOT( rotate90() ), + TQT_TQOBJECT(this), TQT_SLOT( rotate90() ), m_actions, "rotate90" ); new KAction( i18n("Rotate 180 Degrees"), Key_8, - this, TQT_SLOT( rotate180() ), + TQT_TQOBJECT(this), TQT_SLOT( rotate180() ), m_actions, "rotate180" ); new KAction( i18n("Rotate 270 Degrees"), Key_7, - this, TQT_SLOT( rotate270() ), + TQT_TQOBJECT(this), TQT_SLOT( rotate270() ), m_actions, "rotate270" ); - new KAction( i18n("Flip Horizontally"), Key_Asterisk, - this, TQT_SLOT( flipHoriz() ), + new KAction( i18n("FlipQt::Horizontally"), Key_Asterisk, + TQT_TQOBJECT(this), TQT_SLOT( flipHoriz() ), m_actions, "flip_horicontally" ); - new KAction( i18n("Flip Vertically"), Key_Slash, - this, TQT_SLOT( flipVert() ), + new KAction( i18n("FlipQt::Vertically"), Key_Slash, + TQT_TQOBJECT(this), TQT_SLOT( flipVert() ), m_actions, "flip_vertically" ); new KAction( i18n("Print Image..."), KStdAccel::print(), - this, TQT_SLOT( printImage() ), + TQT_TQOBJECT(this), TQT_SLOT( printImage() ), m_actions, "print_image" ); - KStdAction::saveAs( this, TQT_SLOT( saveImage() ), + KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( saveImage() ), m_actions, "save_image_as" ); - KStdAction::close( this, TQT_SLOT( close() ), + KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( close() ), m_actions, "close_image" ); // -------- new KAction( i18n("More Brightness"), Key_B, - this, TQT_SLOT( moreBrightness() ), + TQT_TQOBJECT(this), TQT_SLOT( moreBrightness() ), m_actions, "more_brightness" ); new KAction( i18n("Less Brightness"), SHIFT + Key_B, - this, TQT_SLOT( lessBrightness() ), + TQT_TQOBJECT(this), TQT_SLOT( lessBrightness() ), m_actions, "less_brightness" ); new KAction( i18n("More Contrast"), Key_C, - this, TQT_SLOT( moreContrast() ), + TQT_TQOBJECT(this), TQT_SLOT( moreContrast() ), m_actions, "more_contrast" ); new KAction( i18n("Less Contrast"), SHIFT + Key_C, - this, TQT_SLOT( lessContrast() ), + TQT_TQOBJECT(this), TQT_SLOT( lessContrast() ), m_actions, "less_contrast" ); new KAction( i18n("More Gamma"), Key_G, - this, TQT_SLOT( moreGamma() ), + TQT_TQOBJECT(this), TQT_SLOT( moreGamma() ), m_actions, "more_gamma" ); new KAction( i18n("Less Gamma"), SHIFT + Key_G, - this, TQT_SLOT( lessGamma() ), + TQT_TQOBJECT(this), TQT_SLOT( lessGamma() ), m_actions, "less_gamma" ); // -------- new KAction( i18n("Scroll Up"), Key_Up, - this, TQT_SLOT( scrollUp() ), + TQT_TQOBJECT(this), TQT_SLOT( scrollUp() ), m_actions, "scroll_up" ); new KAction( i18n("Scroll Down"), Key_Down, - this, TQT_SLOT( scrollDown() ), + TQT_TQOBJECT(this), TQT_SLOT( scrollDown() ), m_actions, "scroll_down" ); new KAction( i18n("Scroll Left"), Key_Left, - this, TQT_SLOT( scrollLeft() ), + TQT_TQOBJECT(this), TQT_SLOT( scrollLeft() ), m_actions, "scroll_left" ); new KAction( i18n("Scroll Right"), Key_Right, - this, TQT_SLOT( scrollRight() ), + TQT_TQOBJECT(this), TQT_SLOT( scrollRight() ), m_actions, "scroll_right" ); // -------- new KAction( i18n("Pause Slideshow"), Key_P, - this, TQT_SLOT( pauseSlideShow() ), + TQT_TQOBJECT(this), TQT_SLOT( pauseSlideShow() ), m_actions, "kuick_slideshow_pause" ); - KAction *fullscreenAction = KStdAction::fullScreen(this, TQT_SLOT( toggleFullscreen() ), m_actions, 0 ); + KAction *fullscreenAction = KStdAction::fullScreen(TQT_TQOBJECT(this), TQT_SLOT( toggleFullscreen() ), m_actions, 0 ); KAction *reloadAction = new KAction( i18n("Reload Image"), KStdAccel::shortcut(KStdAccel::Reload), - this, TQT_SLOT( reload() ), + TQT_TQOBJECT(this), TQT_SLOT( reload() ), m_actions, "reload_image" ); new KAction( i18n("Properties"), ALT + Key_Return, - this, TQT_SLOT( slotProperties() ), + TQT_TQOBJECT(this), TQT_SLOT( slotProperties() ), m_actions, "properties" ); m_actions->readShortcutSettings(); @@ -310,8 +310,8 @@ void ImageWindow::updateGeometry( int imWidth, int imHeight ) TQString caption = i18n( "Filename (Imagewidth x Imageheight)", "%3 (%1 x %2)" ); - caption = caption.arg( m_kuim->originalWidth() ). - arg( m_kuim->originalHeight() ).arg( m_kuim->url().prettyURL() ); + caption = caption.tqarg( m_kuim->originalWidth() ). + tqarg( m_kuim->originalHeight() ).tqarg( m_kuim->url().prettyURL() ); setCaption( kapp->makeStdCaption( caption ) ); } @@ -403,7 +403,7 @@ void ImageWindow::scrollImage( int x, int y, bool restrict ) // XUnmapWindow(); // XSetWindowBackgroundPixmap() // resize window to fit image size, center image -// XClearWindow(); // repaint +// XClearWindow(); // tqrepaint // XMapWindow(), XSync(); // bool ImageWindow::showNextImage( const KURL& url ) @@ -412,7 +412,7 @@ bool ImageWindow::showNextImage( const KURL& url ) switch ( file->waitForDownload( this ) ) { case KuickFile::ERROR: { - TQString tmp = i18n("Unable to download the image from %1.").arg(url.prettyURL()); + TQString tmp = i18n("Unable to download the image from %1.").tqarg(url.prettyURL()); emit sigImageError( file, tmp ); return false; } @@ -430,7 +430,7 @@ bool ImageWindow::showNextImage( KuickFile *file ) if ( !loadImage( file ) ) { TQString tmp = i18n("Unable to load the image %1.\n" "Perhaps the file format is unsupported or " - "your Imlib is not installed properly.").arg(file->url().prettyURL()); + "your Imlib is not installed properly.").tqarg(file->url().prettyURL()); emit sigImageError( file, tmp ); return false; } @@ -630,7 +630,7 @@ void ImageWindow::mousePressEvent( TQMouseEvent *e ) xposPress = xmove; yposPress = ymove; - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { if ( e->state() & ShiftButton ) updateCursor( ZoomCursor ); else @@ -675,7 +675,7 @@ void ImageWindow::updateCursor( KuickCursor cursor ) void ImageWindow::mouseMoveEvent( TQMouseEvent *e ) { - if ( !(e->state() & LeftButton) ) { // only handle LeftButton actions + if ( !(e->state() & Qt::LeftButton) ) { // only handle LeftButton actions return; } @@ -692,7 +692,7 @@ void ImageWindow::mouseMoveEvent( TQMouseEvent *e ) // really required? p.eraseRect( transWidget->rect() ); transWidget->show(); - qApp->processOneEvent(); + tqApp->processOneEvent(); int width = e->x() - xposPress; int height = e->y() - yposPress; @@ -707,7 +707,7 @@ void ImageWindow::mouseMoveEvent( TQMouseEvent *e ) yzoom = e->y(); } - TQPen pen( Qt::white, 1, DashLine ); + TQPen pen( TQt::white, 1, DashLine ); p.setPen( pen ); // for drawing white dashed line p.drawRect( xzoom, yzoom, width, height ); p.setPen( DotLine ); // defaults to black dotted line pen @@ -736,7 +736,7 @@ void ImageWindow::mouseReleaseEvent( TQMouseEvent *e ) } // only proceed if shift-Key is still pressed - if ( !(e->button() == LeftButton && e->state() & ShiftButton) ) + if ( !(e->button() == Qt::LeftButton && e->state() & ShiftButton) ) return; int neww, newh, topX, topY, botX, botY; @@ -972,7 +972,7 @@ bool ImageWindow::saveImage( const KURL& dest, bool keepOriginalSize ) int w = keepOriginalSize ? m_kuim->originalWidth() : m_kuim->width(); int h = keepOriginalSize ? m_kuim->originalHeight() : m_kuim->height(); if ( m_kuim->absRotation() == ROT_90 || m_kuim->absRotation() == ROT_270 ) - qSwap( w, h ); + tqSwap( w, h ); ImlibImage *saveIm = Imlib_clone_scaled_image( id, m_kuim->imlibImage(), w, h ); @@ -987,7 +987,7 @@ bool ImageWindow::saveImage( const KURL& dest, bool keepOriginalSize ) if ( !extension.isEmpty() ) extension.prepend( '.' ); - KTempFile tmpFile( TQString::null, extension ); + KTempFile tmpFile( TQString(), extension ); if ( tmpFile.status() != 0 ) return false; tmpFile.close(); @@ -1045,7 +1045,7 @@ void ImageWindow::autoScale( KuickImage *kuim ) int mh = s.height(); if ( kuim->absRotation() == ROT_90 || kuim->absRotation() == ROT_270 ) - qSwap( newW, newH ); + tqSwap( newW, newH ); bool doIt = false; @@ -1128,7 +1128,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const { if ( myIsFullscreen || totalScreen ) { - return KGlobalSettings::desktopGeometry(topLevelWidget()).width(); + return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).width(); } else return Kuick::workArea().width(); } @@ -1137,7 +1137,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const int ImageWindow::desktopHeight( bool totalScreen ) const { if ( myIsFullscreen || totalScreen ) { - return KGlobalSettings::desktopGeometry(topLevelWidget()).height(); + return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).height(); } else { return Kuick::workArea().height(); } @@ -1146,7 +1146,7 @@ int ImageWindow::desktopHeight( bool totalScreen ) const TQSize ImageWindow::maxImageSize() const { if ( myIsFullscreen ) { - return KGlobalSettings::desktopGeometry(topLevelWidget()).size(); + return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).size(); } else { return Kuick::workArea().size() - Kuick::frameSize( winId() ); @@ -1193,7 +1193,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight ) if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) ) return false; - TQSize desktopSize = KGlobalSettings::desktopGeometry(topLevelWidget()).size(); + TQSize desktopSize = KGlobalSettings::desktopGeometry(tqtopLevelWidget()).size(); int desktopArea = desktopSize.width() * desktopSize.height(); int imageArea = newWidth * newHeight; @@ -1203,8 +1203,8 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight ) return KMessageBox::warningContinueCancel( this, i18n("You are about to view a very large image (%1 x %2 pixels), which can be very resource-consuming and even make your computer hang.\nDo you want to continue?") - .arg( newWidth ).arg( newHeight ), - TQString::null, + .tqarg( newWidth ).tqarg( newHeight ), + TQString(), KStdGuiItem::cont(), "ImageWindow_confirm_very_large_window" ) == KMessageBox::Continue; @@ -1245,7 +1245,7 @@ void ImageWindow::restoreCursor() bool ImageWindow::isCursorHidden() const { - return cursor().shape() == Qt::BlankCursor; + return cursor().shape() == TQt::BlankCursor; } #include "imagewindow.moc" diff --git a/kuickshow/src/imagewindow.h b/kuickshow/src/imagewindow.h index 19dc7462..f7558667 100644 --- a/kuickshow/src/imagewindow.h +++ b/kuickshow/src/imagewindow.h @@ -38,11 +38,12 @@ class KuickFile; class ImageWindow : public ImlibWidget { Q_OBJECT + TQ_OBJECT public: - ImageWindow( ImData *_idata, ImlibData *id, TQWidget *parent=0, + ImageWindow( ImData *_idata, ImlibData *id, TQWidget *tqparent=0, const char *name=0 ); - ImageWindow( ImData *_idata=0, TQWidget *parent=0, const char *name=0 ); + ImageWindow( ImData *_idata=0, TQWidget *tqparent=0, const char *name=0 ); bool showNextImage( KuickFile * file ); bool showNextImage( const KURL& url ); @@ -158,7 +159,7 @@ signals: private: int desktopWidth( bool totalScreen = false ) const; int desktopHeight( bool totalScreen = false ) const; - QSize maxImageSize() const; + TQSize maxImageSize() const; void setupActions(); void setPopupMenu(); bool isCursorHidden() const; diff --git a/kuickshow/src/imlibwidget.cpp b/kuickshow/src/imlibwidget.cpp index 8386e1ab..1eddb704 100644 --- a/kuickshow/src/imlibwidget.cpp +++ b/kuickshow/src/imlibwidget.cpp @@ -43,8 +43,8 @@ const int ImlibWidget::ImlibOffset = 256; -ImlibWidget::ImlibWidget( ImData *_idata, TQWidget *parent, const char *name ) : - TQWidget( parent, name, WDestructiveClose ) +ImlibWidget::ImlibWidget( ImData *_idata, TQWidget *tqparent, const char *name ) : + TQWidget( tqparent, name, WDestructiveClose ) { idata = _idata; deleteImData = false; @@ -82,9 +82,9 @@ ImlibWidget::ImlibWidget( ImData *_idata, TQWidget *parent, const char *name ) : } -ImlibWidget::ImlibWidget( ImData *_idata, ImlibData *_id, TQWidget *parent, +ImlibWidget::ImlibWidget( ImData *_idata, ImlibData *_id, TQWidget *tqparent, const char *name ) - : TQWidget( parent, name, WDestructiveClose ) + : TQWidget( tqparent, name, WDestructiveClose ) { id = _id; idata = _idata; @@ -104,7 +104,7 @@ void ImlibWidget::init() { int w = 1; // > 0 for XCreateWindow int h = 1; - myBackgroundColor = Qt::black; + myBackgroundColor = TQt::black; m_kuim = 0L; m_kuickFile = 0L; @@ -311,18 +311,16 @@ bool ImlibWidget::autoRotate( KuickImage *kuim ) if ( !metadatas.isValid() ) return false; - KFileMetaInfoItem metaitem = metadatas.item("Orientation"); + KFileMetaInfoItem metaitem = metadatas.item("Qt::Orientation"); if ( !metaitem.isValid() -#if QT_VERSION >= 0x030100 || metaitem.value().isNull() -#endif ) return false; switch ( metaitem.value().toInt() ) { - // Orientation: + // Qt::Orientation: // 1: normal // 2: flipped horizontally // 3: ROT 180 @@ -438,17 +436,17 @@ void ImlibWidget::setFlipMode( int mode ) } -void ImlibWidget::updateWidget( bool geometryUpdate ) +void ImlibWidget::updateWidget( bool tqgeometryUpdate ) { if ( !m_kuim ) return; -// if ( geometryUpdate ) +// if ( tqgeometryUpdate ) // XUnmapWindow( x11Display(), win );// remove the old image -> no flicker XSetWindowBackgroundPixmap( x11Display(), win, m_kuim->pixmap() ); - if ( geometryUpdate ) + if ( tqgeometryUpdate ) updateGeometry( m_kuim->width(), m_kuim->height() ); XClearWindow( x11Display(), win ); @@ -477,7 +475,7 @@ void ImlibWidget::setBackgroundColor( const TQColor& color ) { myBackgroundColor = color; setPalette( TQPalette( myBackgroundColor )); - repaint( false); // FIXME - false? necessary at all? + tqrepaint( false); // FIXME - false? necessary at all? } const TQColor& ImlibWidget::backgroundColor() const @@ -517,23 +515,23 @@ void ImlibWidget::setBusyCursor() void ImlibWidget::restoreCursor() { - if ( cursor().shape() == KCursor::waitCursor().shape() ) // only if nobody changed the cursor in the meantime! + if ( cursor().shape() == KCursor::waitCursor().tqshape() ) // only if nobody changed the cursor in the meantime! setCursor( m_oldCursor ); } -// Reparenting a widget in Qt in fact means destroying the old X window of the widget +// Retqparenting a widget in TQt in fact means destroying the old X window of the widget // and creating a new one. And since the X window used for the Imlib image is a child // of this widget's X window, destroying this widget's X window would mean also // destroying the Imlib image X window. Therefore it needs to be temporarily reparented // away and reparented back to the new X window. -// Reparenting may happen e.g. when doing the old-style (non-NETWM) fullscreen changes. -void ImlibWidget::reparent( TQWidget* parent, WFlags f, const TQPoint& p, bool showIt ) +// Retqparenting may happen e.g. when doing the old-style (non-NETWM) fullscreen changes. +void ImlibWidget::reparent( TQWidget* tqparent, WFlags f, const TQPoint& p, bool showIt ) { XWindowAttributes attr; XGetWindowAttributes( x11Display(), win, &attr ); XUnmapWindow( x11Display(), win ); XReparentWindow( x11Display(), win, attr.root, 0, 0 ); - TQWidget::reparent( parent, f, p, showIt ); + TQWidget::reparent( tqparent, f, p, showIt ); XReparentWindow( x11Display(), win, winId(), attr.x, attr.y ); if( attr.map_state != IsUnmapped ) XMapWindow( x11Display(), win ); @@ -604,7 +602,7 @@ KuickImage * ImageCache::getKuimage( KuickFile * file, return 0L; KuickImage *kuim = 0L; - int index = fileList.findIndex( file ); + int index = fileList.tqfindIndex( file ); if ( index != -1 ) { if ( index == 0 ) kuim = kuickList.at( 0 ); @@ -641,7 +639,7 @@ KuickImage * ImageCache::getKuimage( KuickFile * file, slotIdle(); if ( !im ) { slotBusy(); - im = loadImageWithQt( file->localFile() ); + im = loadImageWithTQt( file->localFile() ); slotIdle(); if ( !im ) return 0L; @@ -668,7 +666,7 @@ KuickImage * ImageCache::getKuimage( KuickFile * file, // Note: the returned image's filename will not be the real filename (which it usually // isn't anyway, according to Imlib's sources). -ImlibImage * ImageCache::loadImageWithQt( const TQString& fileName ) const +ImlibImage * ImageCache::loadImageWithTQt( const TQString& fileName ) const { kdDebug() << "Trying to load " << fileName << " with KImageIO..." << endl; @@ -695,12 +693,12 @@ ImlibImage * ImageCache::loadImageWithQt( const TQString& fileName ) const int h = image.height(); for (int y = 0; y < h; y++) { - QRgb *scanLine = reinterpret_cast<QRgb *>( image.scanLine(y) ); + TQRgb *scanLine = reinterpret_cast<TQRgb *>( image.scanLine(y) ); for (int x = 0; x < w; x++) { - const QRgb& pixel = scanLine[x]; - *(newData++) = qRed(pixel); - *(newData++) = qGreen(pixel); - *(newData++) = qBlue(pixel); + const TQRgb& pixel = scanLine[x]; + *(newData++) = tqRed(pixel); + *(newData++) = tqGreen(pixel); + *(newData++) = tqBlue(pixel); } } diff --git a/kuickshow/src/imlibwidget.h b/kuickshow/src/imlibwidget.h index de13cad8..a83f8eb4 100644 --- a/kuickshow/src/imlibwidget.h +++ b/kuickshow/src/imlibwidget.h @@ -1,7 +1,7 @@ /**************************************************************************** ** $Id$ ** -** ImlibWidget: maps an Xlib window with Imlib's contents on a QWidget +** ImlibWidget: maps an Xlib window with Imlib's contents on a TQWidget ** ** Created : 98 ** @@ -22,7 +22,7 @@ #include <kurl.h> -// #include those AFTER Qt-includes! +// #include those AFTER TQt-includes! #include <Imlib.h> #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -34,9 +34,10 @@ class KuickFile; class KuickImage; -class ImageCache : public QObject +class ImageCache : public TQObject { Q_OBJECT + TQ_OBJECT public: ImageCache( ImlibData *id, int maxImages=1 ); @@ -48,7 +49,7 @@ public: KuickImage * getKuimage( KuickFile * file, ImlibColorModifier ); private: - ImlibImage * loadImageWithQt( const TQString& filename ) const; + ImlibImage * loadImageWithTQt( const TQString& filename ) const; int myMaxImages; TQValueList<KuickFile*>fileList; @@ -72,14 +73,15 @@ signals: class TQColor; -class ImlibWidget : public QWidget +class ImlibWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ImlibWidget( ImData *_idata=0, TQWidget *parent=0, const char *name=0 ); - ImlibWidget( ImData *_idata, ImlibData *id, TQWidget *parent=0, + ImlibWidget( ImData *_idata=0, TQWidget *tqparent=0, const char *name=0 ); + ImlibWidget( ImData *_idata, ImlibData *id, TQWidget *tqparent=0, const char *name=0 ); virtual ~ImlibWidget(); @@ -119,7 +121,7 @@ public: ImlibData* getImlibData() const { return id; } - virtual void reparent( TQWidget* parent, WFlags f, const TQPoint& p, bool showIt = FALSE ); + virtual void reparent( TQWidget* tqparent, WFlags f, const TQPoint& p, bool showIt = FALSE ); public slots: void rotate90(); @@ -136,7 +138,7 @@ protected: void showImage(); void setImageModifier(); void rotate( int ); - void updateWidget( bool geometryUpdate=true ); + void updateWidget( bool tqgeometryUpdate=true ); virtual void updateGeometry( int width, int height ); virtual void loaded( KuickImage * ); virtual bool canZoomTo( int newWidth, int newHeight ); @@ -144,9 +146,9 @@ protected: void closeEvent( TQCloseEvent * ); - inline void autoUpdate( bool geometryUpdate=false ) { + inline void autoUpdate( bool tqgeometryUpdate=false ) { if ( isAutoRendering ) - updateWidget( geometryUpdate ); + updateWidget( tqgeometryUpdate ); } bool stillResizing, deleteImData, deleteImlibData; diff --git a/kuickshow/src/kuickconfigdlg.cpp b/kuickshow/src/kuickconfigdlg.cpp index 140c90d5..3d981e11 100644 --- a/kuickshow/src/kuickconfigdlg.cpp +++ b/kuickshow/src/kuickconfigdlg.cpp @@ -38,11 +38,11 @@ #include "kuickdata.h" -KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, TQWidget *parent, +KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, TQWidget *tqparent, const char *name, bool modal ) : KDialogBase( Tabbed, i18n("Configure"), Help | Default | Ok | Apply | Cancel, Ok, - parent, name, modal ) + tqparent, name, modal ) { coll = _coll; TQVBox *box = addVBoxPage( i18n("&General") ); diff --git a/kuickshow/src/kuickconfigdlg.h b/kuickshow/src/kuickconfigdlg.h index a19a6e97..9d7657b2 100644 --- a/kuickshow/src/kuickconfigdlg.h +++ b/kuickshow/src/kuickconfigdlg.h @@ -33,9 +33,10 @@ class ImageWindow; class KuickConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KuickConfigDialog( KActionCollection *coll, TQWidget *parent=0, + KuickConfigDialog( KActionCollection *coll, TQWidget *tqparent=0, const char *name=0, bool modal=true); ~KuickConfigDialog(); diff --git a/kuickshow/src/kuickdata.cpp b/kuickshow/src/kuickdata.cpp index a68a9d3e..528d1aa0 100644 --- a/kuickshow/src/kuickdata.cpp +++ b/kuickshow/src/kuickdata.cpp @@ -55,7 +55,7 @@ KuickData::KuickData() maxZoomFactor = 4.0; maxCachedImages = 4; - backgroundColor = Qt::black; + backgroundColor = TQt::black; startInLastDir = true; @@ -106,7 +106,7 @@ void KuickData::load() maxCachedImages = kc->readUnsignedNumEntry( "MaxCachedImages", def.maxCachedImages ); - backgroundColor = kc->readColorEntry( "BackgroundColor", &Qt::black ); + backgroundColor = kc->readColorEntry( "BackgroundColor", &TQt::black ); startInLastDir = kc->readBoolEntry( "StartInLastDir", true); diff --git a/kuickshow/src/kuickfile.cpp b/kuickshow/src/kuickfile.cpp index da38fdee..648cf6a6 100644 --- a/kuickshow/src/kuickfile.cpp +++ b/kuickshow/src/kuickfile.cpp @@ -41,7 +41,7 @@ TQString KuickFile::localFile() const // Note: never call isAvailable() from here, directly or indirectly if ( isDownloading() ) - return TQString::null; + return TQString(); return m_localFile; } @@ -61,13 +61,13 @@ bool KuickFile::download() return true; // reinitialize - m_localFile = TQString::null; + m_localFile = TQString(); m_currentProgress = 0; TQString ext; TQString fileName = m_url.fileName(); - int extIndex = fileName.findRev('.'); + int extIndex = fileName.tqfindRev('.'); if ( extIndex > 0 ) ext = fileName.mid( extIndex + 1 ); @@ -94,7 +94,7 @@ bool KuickFile::download() return m_job != 0L; } -KuickFile::DownloadStatus KuickFile::waitForDownload( TQWidget *parent ) +KuickFile::DownloadtqStatus KuickFile::waitForDownload( TQWidget *tqparent ) { if ( isAvailable() ) return OK; @@ -104,10 +104,10 @@ KuickFile::DownloadStatus KuickFile::waitForDownload( TQWidget *parent ) return ERROR; } - KProgressDialog *dialog = new KProgressDialog( parent ); + KProgressDialog *dialog = new KProgressDialog( tqparent ); dialog->setModal( true ); - dialog->setCaption( i18n("Downloading %1...").arg( m_url.fileName() ) ); - dialog->setLabel( i18n("Please wait while downloading\n%1").arg( m_url.prettyURL() )); + dialog->setCaption( i18n("Downloading %1...").tqarg( m_url.fileName() ) ); + dialog->setLabel( i18n("Please wait while downloading\n%1").tqarg( m_url.prettyURL() )); dialog->setAllowCancel( true ); dialog->setAutoClose( true ); @@ -152,7 +152,7 @@ void KuickFile::slotResult( KIO::Job *job ) TQString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path(); TQFile::remove( canceledFile ); - m_progress->topLevelWidget()->hide(); + m_progress->tqtopLevelWidget()->hide(); } else { m_localFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path(); @@ -162,7 +162,7 @@ void KuickFile::slotResult( KIO::Job *job ) m_progress->setProgress( 100 ); #define BUGGY_VERSION KDE_MAKE_VERSION(3,5,2) if ( KDE::version() <= BUGGY_VERSION ) { - m_progress->topLevelWidget()->hide(); // ### workaround broken KProgressDialog + m_progress->tqtopLevelWidget()->hide(); // ### workaround broken KProgressDialog } } } diff --git a/kuickshow/src/kuickfile.h b/kuickshow/src/kuickfile.h index 2076e612..08fa4557 100644 --- a/kuickshow/src/kuickfile.h +++ b/kuickshow/src/kuickfile.h @@ -21,12 +21,13 @@ namespace KIO { class FileCopyJob; } -class KuickFile : public QObject +class KuickFile : public TQObject { Q_OBJECT + TQ_OBJECT public: - enum DownloadStatus + enum DownloadtqStatus { OK = 1, CANCELED, @@ -71,7 +72,7 @@ public: * immediately. * @return true when the download has finished or false when the user aborted the dialog */ - KuickFile::DownloadStatus waitForDownload( TQWidget *parent ); + KuickFile::DownloadtqStatus waitForDownload( TQWidget *tqparent ); // bool needsDownload(); diff --git a/kuickshow/src/kuickimage.cpp b/kuickshow/src/kuickimage.cpp index 36fa97c2..894a0369 100644 --- a/kuickshow/src/kuickimage.cpp +++ b/kuickshow/src/kuickimage.cpp @@ -82,7 +82,7 @@ void KuickImage::rotate( Rotation rot ) } else if ( rot == ROT_90 || rot == ROT_270 ) { - qSwap( myWidth, myHeight ); + tqSwap( myWidth, myHeight ); Imlib_rotate_image( myId, myIm, -1 ); if ( rot == ROT_90 ) // rotate 90 degrees @@ -178,7 +178,7 @@ void KuickImage::restoreOriginalSize() myIsDirty = true; if ( myRotation == ROT_90 || myRotation == ROT_270 ) - qSwap( myWidth, myHeight ); + tqSwap( myWidth, myHeight ); } void KuickImage::resize( int width, int height, KuickImage::ResizeMode mode ) @@ -212,9 +212,9 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) { // qDebug("-- smoothResize: %i x %i", newWidth, newHeight); - TQImage *image = newQImage(); - // Note: TQImage::ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small) - TQImage scaledImage = image->smoothScale(newWidth, newHeight, TQImage::ScaleFree); + TQImage *image = newTQImage(); + // Note: TQ_ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small) + TQImage scaledImage = image->smoothScale(newWidth, newHeight, TQ_ScaleFree); delete image; @@ -235,11 +235,11 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) return false; } -TQImage * KuickImage::newQImage() const +TQImage * KuickImage::newTQImage() const { ImlibImage *im; -// qDebug("-- newQImage"); +// qDebug("-- newTQImage"); if ( myOrigIm != 0L && myRotation == ROT_0 && myFlipMode == FlipNone ) { @@ -257,7 +257,7 @@ TQImage * KuickImage::newQImage() const TQImage *image = new TQImage( w, h, 32 ); uchar *rgb = im->rgb_data; - QRgb **destImageData = reinterpret_cast<QRgb**>( image->jumpTable() ); + TQRgb **destImageData = reinterpret_cast<TQRgb**>( image->jumpTable() ); int byteIndex = 0; @@ -275,7 +275,7 @@ TQImage * KuickImage::newQImage() const uchar g = rgb[byteIndex++]; uchar b = rgb[byteIndex++]; - QRgb rgbPixel = qRgb( r, g, b ); + TQRgb rgbPixel = tqRgb( r, g, b ); destImageData[destLineIndex][destByteIndex++] = rgbPixel; } @@ -306,12 +306,12 @@ ImlibImage * KuickImage::toImage( ImlibData *id, TQImage& image ) int h = image.height(); for (int y = 0; y < h; y++) { - QRgb *scanLine = reinterpret_cast<QRgb *>( image.scanLine(y) ); + TQRgb *scanLine = reinterpret_cast<TQRgb *>( image.scanLine(y) ); for (int x = 0; x < w; x++) { - const QRgb& pixel = scanLine[x]; - *(newData++) = qRed(pixel); - *(newData++) = qGreen(pixel); - *(newData++) = qBlue(pixel); + const TQRgb& pixel = scanLine[x]; + *(newData++) = tqRed(pixel); + *(newData++) = tqGreen(pixel); + *(newData++) = tqBlue(pixel); } } @@ -341,7 +341,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) //TQImage dst(w, h, myIm->depth(), myIm->numColors(), myIm->bitOrder()); - //QRgb *scanline; + //TQRgb *scanline; int basis_ox, basis_oy, basis_xx, basis_yy; @@ -363,10 +363,10 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) int max_x2 = (myOrigWidth << 12); int max_y2 = (myOrigHeight << 12); -// QRgb background = idata->backgroundColor.rgb(); +// TQRgb background = idata->backgroundColor.rgb(); -// QRgb **imdata = (QRgb **) myIm->jumpTable(); -// QRgb *imdata = reinterpret_cast<QRgb*>( myIm->rgb_data ); +// TQRgb **imdata = (TQRgb **) myIm->jumpTable(); +// TQRgb *imdata = reinterpret_cast<TQRgb*>( myIm->rgb_data ); uchar *imdata = myIm->rgb_data; @@ -380,15 +380,15 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) // if ((y2 >= 0 && (y2 >> 12) < myIm->height()) || y >= h) // break; // -// scanline = (QRgb*) dst.scanLine(y); +// scanline = (TQRgb*) dst.scanLine(y); // for (int i = 0; i < w; i++) -// *(scanline++) = background; //qRgb(0,255,0); +// *(scanline++) = background; //tqRgb(0,255,0); // y++; // } for (; y < newHeight; y++) { -// scanline = (QRgb*) dst.scanLine(y); +// scanline = (TQRgb*) dst.scanLine(y); x2 = basis_ox; y2 = basis_oy + y * basis_yy; @@ -400,7 +400,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) // while ((x2 < 0 || (x2 >> 12) >= myIm->width()) && x < w) //fill the left of the target pixmap with the background color // { -// *(scanline++) = background; //qRgb(0,0,255); +// *(scanline++) = background; //tqRgb(0,0,255); // x2 += basis_xx; // x++; // } @@ -425,14 +425,14 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) unsigned int iwx = 0xfff - wx; unsigned int iwy = 0xfff - wy; - QRgb tl = 0, tr = 0, bl = 0, br = 0; + TQRgb tl = 0, tr = 0, bl = 0, br = 0; int ind = 0; ind = (left + top * myOrigWidth) * 3; tl = (imdata[ind] << 16); tl |= (imdata[ind + 1] << 8); tl |= (imdata[ind + 2] << 0); int bar = imdata[ind + 2] << 8; - bar = qBlue(bar); + bar = tqBlue(bar); ind = (right + top * myOrigWidth) * 3; tr = (imdata[ind] << 16); @@ -462,9 +462,9 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) br=getValidPixel(myIm, right, bottom, x, y); */ - unsigned int r = (unsigned int) (qRed(tl) * iwx * iwy + qRed(tr) * wx* iwy + qRed(bl) * iwx * wy + qRed(br) * wx * wy); // NB 12+12+8 == 32 - unsigned int g = (unsigned int) (qGreen(tl) * iwx * iwy + qGreen(tr) * wx * iwy + qGreen(bl) * iwx * wy + qGreen(br) * wx * wy); - unsigned int b = (unsigned int) (qBlue(tl) * iwx * iwy + qBlue(tr) * wx * iwy + qBlue(bl) * iwx * wy + qBlue(br) * wx * wy); + unsigned int r = (unsigned int) (tqRed(tl) * iwx * iwy + tqRed(tr) * wx* iwy + tqRed(bl) * iwx * wy + tqRed(br) * wx * wy); // NB 12+12+8 == 32 + unsigned int g = (unsigned int) (tqGreen(tl) * iwx * iwy + tqGreen(tr) * wx * iwy + tqGreen(bl) * iwx * wy + tqGreen(br) * wx * wy); + unsigned int b = (unsigned int) (tqBlue(tl) * iwx * iwy + tqBlue(tr) * wx * iwy + tqBlue(bl) * iwx * wy + tqBlue(br) * wx * wy); // ### endianness //we're actually off by one in 255 here! (254 instead of 255) @@ -474,7 +474,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) newImageData[(y * newWidth * 3) + (x * 3) + 0] = (r >> 24); newImageData[(y * newWidth * 3) + (x * 3) + 1] = (g >> 24); newImageData[(y * newWidth * 3) + (x * 3) + 2] = (b >> 24); -// *(scanline++) = qRgb(r >> 24, g >> 24, b >> 24); //we're actually off by one in 255 here +// *(scanline++) = tqRgb(r >> 24, g >> 24, b >> 24); //we're actually off by one in 255 here x2 += basis_xx; @@ -488,7 +488,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) // while (x < w) //fill the right of each scanline with the background colour // { -// *(scanline++) = background; //qRgb(255,0,0); +// *(scanline++) = background; //tqRgb(255,0,0); // x++; // } } @@ -500,9 +500,9 @@ bool KuickImage::smoothResize( int newWidth, int newHeight ) // if (y >= h) // break; // -// scanline = (QRgb*) dst.scanLine(y); +// scanline = (TQRgb*) dst.scanLine(y); // for (int i = 0; i < w; i++) -// *(scanline++) = background; //qRgb(255,255,0); +// *(scanline++) = background; //tqRgb(255,255,0); // y++; // } diff --git a/kuickshow/src/kuickimage.h b/kuickshow/src/kuickimage.h index 4463e83a..a1875e11 100644 --- a/kuickshow/src/kuickimage.h +++ b/kuickshow/src/kuickimage.h @@ -18,16 +18,17 @@ #include "kuickdata.h" #include "kuickfile.h" -// #include those AFTER Qt-includes! +// #include those AFTER TQt-includes! #include <Imlib.h> #include <X11/Xlib.h> #include <X11/Xutil.h> // #include <X11/extensions/shape.h> -class KuickImage : public QObject +class KuickImage : public TQObject { Q_OBJECT + TQ_OBJECT public: enum ResizeMode { FAST, SMOOTH }; @@ -66,7 +67,7 @@ private: /** * Note: caller must delete it! */ - TQImage * newQImage() const; + TQImage * newTQImage() const; const KuickFile * myFile; diff --git a/kuickshow/src/kuickshow.cpp b/kuickshow/src/kuickshow.cpp index 5504d01d..7186db09 100644 --- a/kuickshow/src/kuickshow.cpp +++ b/kuickshow/src/kuickshow.cpp @@ -133,7 +133,7 @@ KuickShow::KuickShow( const char *name ) if ( KMessageBox::warningYesNo( this, i18n("Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", - "Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", numArgs).arg(KStdGuiItem::no().plainText()), + "Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", numArgs).tqarg(KStdGuiItem::no().plainText()), i18n("Display Multiple Images?")) != KMessageBox::Yes ) { @@ -246,24 +246,24 @@ void KuickShow::initGUI( const KURL& startDir ) this, TQT_SLOT( slotDropped( const KFileItem *, TQDropEvent *, const KURL::List &)) ); // setup actions - KAction *open = KStdAction::open( this, TQT_SLOT( slotOpenURL() ), + KAction *open = KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotOpenURL() ), coll, "openURL" ); - KAction *print = KStdAction::print( this, TQT_SLOT( slotPrint() ), + KAction *print = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( slotPrint() ), coll, "kuick_print" ); print->setText( i18n("Print Image...") ); - KAction *configure = new KAction( i18n("Configure %1...").arg( KGlobal::instance()->aboutData()->programName() ), "configure", + KAction *configure = new KAction( i18n("Configure %1...").tqarg( KGlobal::instance()->aboutData()->programName() ), "configure", KShortcut(), - this, TQT_SLOT( configuration() ), + TQT_TQOBJECT(this), TQT_SLOT( configuration() ), coll, "kuick_configure" ); KAction *slide = new KAction( i18n("Start Slideshow" ), "ksslide", KShortcut( Key_F2 ), - this, TQT_SLOT( startSlideShow() ), + TQT_TQOBJECT(this), TQT_SLOT( startSlideShow() ), coll, "kuick_slideshow" ); KAction *about = new KAction( i18n( "About KuickShow" ), "about", KShortcut(), - this, TQT_SLOT( about() ), coll, "about" ); + TQT_TQOBJECT(this), TQT_SLOT( about() ), coll, "about" ); oneWindowAction = new KToggleAction( i18n("Open Only One Image Window"), "window_new", @@ -276,20 +276,20 @@ void KuickShow::initGUI( const KURL& startDir ) TQT_SLOT( toggleBrowser() )); KAction *showInOther = new KAction( i18n("Show Image"), KShortcut(), - this, TQT_SLOT( slotShowInOtherWindow() ), + TQT_TQOBJECT(this), TQT_SLOT( slotShowInOtherWindow() ), coll, "kuick_showInOtherWindow" ); KAction *showInSame = new KAction( i18n("Show Image in Active Window"), KShortcut(), - this, TQT_SLOT( slotShowInSameWindow() ), + TQT_TQOBJECT(this), TQT_SLOT( slotShowInSameWindow() ), coll, "kuick_showInSameWindow" ); KAction *showFullscreen = new KAction( i18n("Show Image in Fullscreen Mode"), - KShortcut(), this, TQT_SLOT( slotShowFullscreen() ), + KShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotShowFullscreen() ), coll, "kuick_showFullscreen" ); - KAction *quit = KStdAction::quit( this, TQT_SLOT(slotQuit()), coll, "quit"); + KAction *quit = KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), coll, "quit"); - // remove TQString::null parameter -- ellis - coll->readShortcutSettings( TQString::null ); + // remove TQString() parameter -- ellis + coll->readShortcutSettings( TQString() ); m_accel = coll->accel(); // menubar @@ -319,7 +319,7 @@ void KuickShow::initGUI( const KURL& startDir ) TQPopupMenu *mainPopup = mainActionMenu->popupMenu(); int sortingIndex = mainPopup->indexOf( sortingMenu->itemId( 0 ) ); int separatorId = mainPopup->idAt( sortingIndex + 1 ); - TQMenuItem *separatorItem = mainPopup->findItem( separatorId ); + TQMenuItem *separatorItem = mainPopup->tqfindItem( separatorId ); if ( separatorItem && separatorItem->isSeparator() ) mainPopup->removeItem( separatorId ); mainActionMenu->remove( sortingMenu ); @@ -363,7 +363,7 @@ void KuickShow::initGUI( const KURL& startDir ) tBar->insertSeparator(); about->plug( tBar ); - TQPopupMenu *help = helpMenu( TQString::null, false ); + TQPopupMenu *help = helpMenu( TQString(), false ); mBar->insertItem( KStdGuiItem::help().text() , help ); @@ -552,7 +552,7 @@ bool KuickShow::showImage( const KFileItem *fi, this, TQT_SLOT (slotTrashCurrentImage (ImageWindow *))); if ( s_viewers.count() == 1 && moveToTopLeft ) { // we have to move to 0x0 before showing _and_ - // after showing, otherwise we get some bogus geometry() + // after showing, otherwise we get some bogus tqgeometry() m_viewer->move( Kuick::workArea().topLeft() ); } @@ -631,7 +631,7 @@ void KuickShow::slotTrashCurrentImage(ImageWindow *viewer) performTrashCurrentImage(viewer); } -void KuickShow::performDeleteCurrentImage(TQWidget *parent) +void KuickShow::performDeleteCurrentImage(TQWidget *tqparent) { assert(fileWidget != 0L); @@ -640,8 +640,8 @@ void KuickShow::performDeleteCurrentImage(TQWidget *parent) list.append (item); if (KMessageBox::warningContinueCancel( - parent, - i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").arg(item->url().pathOrURL()), + tqparent, + i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").tqarg(item->url().pathOrURL()), i18n("Delete File"), KStdGuiItem::del(), "Kuick_delete_current_image") @@ -654,7 +654,7 @@ void KuickShow::performDeleteCurrentImage(TQWidget *parent) fileWidget->del(list, false, false); } -void KuickShow::performTrashCurrentImage(TQWidget *parent) +void KuickShow::performTrashCurrentImage(TQWidget *tqparent) { assert(fileWidget != 0L); @@ -665,8 +665,8 @@ void KuickShow::performTrashCurrentImage(TQWidget *parent) list.append (item); if (KMessageBox::warningContinueCancel( - parent, - i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").arg(item->url().pathOrURL()), + tqparent, + i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").tqarg(item->url().pathOrURL()), i18n("Trash File"), KGuiItem(i18n("to trash", "&Trash"),"edittrash"), "Kuick_trash_current_image") @@ -676,7 +676,7 @@ void KuickShow::performTrashCurrentImage(TQWidget *parent) } tryShowNextImage(); - fileWidget->trash(list, parent, false, false); + fileWidget->trash(list, tqparent, false, false); } void KuickShow::tryShowNextImage() @@ -880,7 +880,7 @@ bool KuickShow::eventFilter( TQObject *o, TQEvent *e ) int eventType = e->type(); TQKeyEvent *k = 0L; if ( eventType == TQEvent::KeyPress ) - k = static_cast<TQKeyEvent *>( e ); + k = TQT_TQKEYEVENT( e ); if ( k ) { if ( KStdAccel::quit().contains( KKey( k ) ) ) { @@ -1036,8 +1036,8 @@ bool KuickShow::eventFilter( TQObject *o, TQEvent *e ) // and shows browser when last window closed via doubleclick else if ( eventType == TQEvent::MouseButtonDblClick ) { - TQMouseEvent *ev = static_cast<TQMouseEvent*>( e ); - if ( ev->button() == LeftButton ) + TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); + if ( ev->button() == Qt::LeftButton ) { if ( s_viewers.count() == 1 ) { @@ -1300,10 +1300,10 @@ void KuickShow::slotReplayEvent() DelayedRepeatEvent *e = m_delayedRepeatItem; m_delayedRepeatItem = 0L; // otherwise, eventFilter aborts - eventFilter( e->viewer, e->event ); + eventFilter( TQT_TQOBJECT(e->viewer), TQT_TQEVENT(e->event) ); delete e; - // ### WORKAROUND for TQIconView bug in Qt <= 3.0.3 at least + // ### WORKAROUND for TQIconView bug in TQt <= 3.0.3 at least if ( fileWidget && fileWidget->view() ) { TQWidget *widget = fileWidget->view()->widget(); if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) || widget->child(0, TQICONVIEW_OBJECT_NAME_STRING ) ){ @@ -1315,7 +1315,7 @@ void KuickShow::slotReplayEvent() void KuickShow::replayAdvance(DelayedRepeatEvent *event) { - // ### WORKAROUND for TQIconView bug in Qt <= 3.0.3 at least + // ### WORKAROUND for TQIconView bug in TQt <= 3.0.3 at least // Sigh. According to qt-bugs, they won't fix this bug ever. So you can't // rely on sorting to be correct before the TQIconView has been show()n. if ( fileWidget && fileWidget->view() ) { @@ -1401,7 +1401,7 @@ void KuickShow::toggleBrowser() void KuickShow::slotOpenURL() { - KFileDialog dlg(TQString::null, kdata->fileFilter, this, "filedialog", true); + KFileDialog dlg(TQString(), kdata->fileFilter, this, "filedialog", true); dlg.setMode( KFile::Files | KFile::Directory ); dlg.setCaption( i18n("Select Files or Folder to Open") ); diff --git a/kuickshow/src/kuickshow.h b/kuickshow/src/kuickshow.h index 4aeb1f2e..f45027dd 100644 --- a/kuickshow/src/kuickshow.h +++ b/kuickshow/src/kuickshow.h @@ -82,6 +82,7 @@ public: class KuickShow : public KMainWindow { Q_OBJECT + TQ_OBJECT public: KuickShow( const char *name=0 ); @@ -132,7 +133,7 @@ private slots: void slotOpenURL(); void slotSetURL( const KURL& ); void slotURLComboReturnPressed(); -// void invalidateImages( const KFileItemList& items ); +// void tqinvalidateImages( const KFileItemList& items ); void slotDeleteCurrentImage(ImageWindow *viewer); void slotTrashCurrentImage(ImageWindow *viewer); void slotDeleteCurrentImage(); @@ -155,8 +156,8 @@ private: void delayAction(DelayedRepeatEvent *event); void replayAdvance(DelayedRepeatEvent *event); - void performDeleteCurrentImage(TQWidget *parent); - void performTrashCurrentImage(TQWidget *parent); + void performDeleteCurrentImage(TQWidget *tqparent); + void performTrashCurrentImage(TQWidget *tqparent); uint viewItem, renameItem, deleteItem, printItem; uint m_slideshowCycle; diff --git a/kuickshow/src/kurlwidget.cpp b/kuickshow/src/kurlwidget.cpp index 342c78c5..3d231061 100644 --- a/kuickshow/src/kurlwidget.cpp +++ b/kuickshow/src/kurlwidget.cpp @@ -23,8 +23,8 @@ #include "kurlwidget.h" -KURLWidget::KURLWidget(const TQString& text, TQWidget *parent, const char *name) - : KURLLabel( parent, name ) +KURLWidget::KURLWidget(const TQString& text, TQWidget *tqparent, const char *name) + : KURLLabel( tqparent, name ) { setText( text ); connect( this, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( run() )); diff --git a/kuickshow/src/kurlwidget.h b/kuickshow/src/kurlwidget.h index 68b621fc..cb02bf7e 100644 --- a/kuickshow/src/kurlwidget.h +++ b/kuickshow/src/kurlwidget.h @@ -24,6 +24,7 @@ class KURLWidget : public KURLLabel { Q_OBJECT + TQ_OBJECT public: KURLWidget( const TQString& text, TQWidget *, const char *name=0 ); diff --git a/kuickshow/src/mainwidget.cpp b/kuickshow/src/mainwidget.cpp index 47b3d837..b9e63576 100644 --- a/kuickshow/src/mainwidget.cpp +++ b/kuickshow/src/mainwidget.cpp @@ -21,8 +21,8 @@ #include "mainwidget.h" -MainWidget::MainWidget( TQString startDir, TQWidget *parent, - const char *name ) : TQWidget ( parent, name ) +MainWidget::MainWidget( TQString startDir, TQWidget *tqparent, + const char *name ) : TQWidget ( tqparent, name ) { box = new FileView( startDir, true, (TQDir::Dirs | TQDir::Files), this, "fileview" ); @@ -35,7 +35,7 @@ MainWidget::~MainWidget() } -// for now, no layout managers +// for now, no tqlayout managers void MainWidget::resizeEvent( TQResizeEvent * ) { box->resize( width(), height() ); diff --git a/kuickshow/src/mainwidget.h b/kuickshow/src/mainwidget.h index bb633ba8..875fbcec 100644 --- a/kuickshow/src/mainwidget.h +++ b/kuickshow/src/mainwidget.h @@ -25,12 +25,13 @@ class FileView; -class MainWidget : public QWidget +class MainWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - MainWidget( TQString, TQWidget *parent, const char *name=0L); + MainWidget( TQString, TQWidget *tqparent, const char *name=0L); ~MainWidget(); FileView* getFileBox() { return box; } diff --git a/kuickshow/src/printing.cpp b/kuickshow/src/printing.cpp index 64687e55..b2a4de64 100644 --- a/kuickshow/src/printing.cpp +++ b/kuickshow/src/printing.cpp @@ -43,23 +43,23 @@ #include "printing.h" #include "version.h" -bool Printing::printImage( ImageWindow& imageWin, TQWidget *parent ) +bool Printing::printImage( ImageWindow& imageWin, TQWidget *tqparent ) { TQString imageURL = imageWin.url().prettyURL(); KPrinter printer; printer.setDocName( imageURL ); printer.setCreator( "KuickShow-" KUICKSHOWVERSION ); - KPrinter::addDialogPage( new KuickPrintDialogPage( parent, "kuick page")); + KPrinter::addDialogPage( new KuickPrintDialogPage( tqparent, "kuick page")); - if ( printer.setup( parent, i18n("Print %1").arg(printer.docName().section('/', -1)) ) ) + if ( printer.setup( tqparent, i18n("Print %1").tqarg(printer.docName().section('/', -1)) ) ) { - KTempFile tmpFile( TQString::null, ".png" ); + KTempFile tmpFile( TQString(), ".png" ); if ( tmpFile.status() == 0 ) { tmpFile.setAutoDelete( true ); if ( imageWin.saveImage( tmpFile.name(), true ) ) - return printImageWithQt( tmpFile.name(), printer, + return printImageWithTQt( tmpFile.name(), printer, imageURL ); } @@ -69,7 +69,7 @@ bool Printing::printImage( ImageWindow& imageWin, TQWidget *parent ) return true; // user aborted } -bool Printing::printImageWithQt( const TQString& filename, KPrinter& printer, +bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer, const TQString& originalFileName ) { TQImage image( filename ); @@ -109,7 +109,7 @@ bool Printing::printImageWithQt( const TQString& filename, KPrinter& printer, bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f); TQSize imagesize = image.size(); if ( shrinkToFit && (image.width() > w || image.height() > h) ) { - imagesize.scale( w, h, TQSize::ScaleMin ); + imagesize.tqscale( w, h, TQSize::ScaleMin ); } @@ -117,28 +117,28 @@ bool Printing::printImageWithQt( const TQString& filename, KPrinter& printer, // align image // bool ok = false; - int alignment = printer.option("app-kuickshow-alignment").toInt( &ok ); + int tqalignment = printer.option("app-kuickshow-tqalignment").toInt( &ok ); if ( !ok ) - alignment = Qt::AlignCenter; // default + tqalignment = TQt::AlignCenter; // default int x = 0; int y = 0; // ### need a GUI for this in KuickPrintDialogPage! - // x - alignment - if ( alignment & Qt::AlignHCenter ) + // x - tqalignment + if ( tqalignment & TQt::AlignHCenter ) x = (w - imagesize.width())/2; - else if ( alignment & Qt::AlignLeft ) + else if ( tqalignment & TQt::AlignLeft ) x = 0; - else if ( alignment & Qt::AlignRight ) + else if ( tqalignment & TQt::AlignRight ) x = w - imagesize.width(); - // y - alignment - if ( alignment & Qt::AlignVCenter ) + // y - tqalignment + if ( tqalignment & TQt::AlignVCenter ) y = (h - imagesize.height())/2; - else if ( alignment & Qt::AlignTop ) + else if ( tqalignment & TQt::AlignTop ) y = 0; - else if ( alignment & Qt::AlignBottom ) + else if ( tqalignment & TQt::AlignBottom ) y = h - imagesize.height(); // @@ -167,7 +167,7 @@ TQString Printing::minimizeString( TQString text, const TQFontMetrics& metrics, int maxWidth ) { if ( text.length() <= 5 ) - return TQString::null; // no sense to cut that tiny little string + return TQString(); // no sense to cut that tiny little string bool changed = false; while ( metrics.width( text ) > maxWidth ) @@ -181,9 +181,9 @@ TQString Printing::minimizeString( TQString text, const TQFontMetrics& { int mid = text.length() / 2; if ( mid <= 5 ) // sanity check - return TQString::null; + return TQString(); - text.replace( mid - 1, 3, "..." ); + text.tqreplace( mid - 1, 3, "..." ); } return text; @@ -194,26 +194,26 @@ TQString Printing::minimizeString( TQString text, const TQFontMetrics& /////////////////////////////////////////////////////////////////// -KuickPrintDialogPage::KuickPrintDialogPage( TQWidget *parent, const char *name ) - : KPrintDialogPage( parent, name ) +KuickPrintDialogPage::KuickPrintDialogPage( TQWidget *tqparent, const char *name ) + : KPrintDialogPage( tqparent, name ) { setTitle( i18n("Image Settings") ); - TQVBoxLayout *layout = new TQVBoxLayout( this ); - layout->setMargin( KDialog::marginHint() ); - layout->setSpacing( KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); + tqlayout->setMargin( KDialog::marginHint() ); + tqlayout->setSpacing( KDialog::spacingHint() ); m_addFileName = new TQCheckBox( i18n("Print fi&lename below image"), this); m_addFileName->setChecked( true ); - layout->addWidget( m_addFileName ); + tqlayout->addWidget( m_addFileName ); m_blackwhite = new TQCheckBox ( i18n("Print image in &black and white"), this); m_blackwhite->setChecked( false ); - layout->addWidget (m_blackwhite ); + tqlayout->addWidget (m_blackwhite ); TQVButtonGroup *group = new TQVButtonGroup( i18n("Scaling"), this ); group->setRadioButtonExclusive( true ); - layout->addWidget( group ); + tqlayout->addWidget( group ); // m_shrinkToFit = new TQRadioButton( i18n("Shrink image to &fit, if necessary"), group ); m_shrinkToFit = new TQCheckBox( i18n("Shrink image to &fit, if necessary"), group ); m_shrinkToFit->setChecked( true ); @@ -258,7 +258,7 @@ void KuickPrintDialogPage::getOptions( TQMap<TQString,TQString>& opts, TQString t = "true"; TQString f = "false"; -// ### opts["app-kuickshow-alignment"] = ; +// ### opts["app-kuickshow-tqalignment"] = ; opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f; opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f; opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f; diff --git a/kuickshow/src/printing.h b/kuickshow/src/printing.h index 43365bf4..f58f05da 100644 --- a/kuickshow/src/printing.h +++ b/kuickshow/src/printing.h @@ -36,8 +36,8 @@ class ImageWindow; class Printing { public: - static bool printImage( ImageWindow& imageWin, TQWidget *parent = 0L); - static bool printImageWithQt( const TQString& filename, KPrinter& printer, + static bool printImage( ImageWindow& imageWin, TQWidget *tqparent = 0L); + static bool printImageWithTQt( const TQString& filename, KPrinter& printer, const TQString& originalFileName ); private: @@ -50,9 +50,10 @@ private: class KuickPrintDialogPage : public KPrintDialogPage { Q_OBJECT + TQ_OBJECT public: - KuickPrintDialogPage( TQWidget *parent = 0L, const char *name = 0 ); + KuickPrintDialogPage( TQWidget *tqparent = 0L, const char *name = 0 ); ~KuickPrintDialogPage(); virtual void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false); diff --git a/kuickshow/src/slideshowwidget.cpp b/kuickshow/src/slideshowwidget.cpp index 9727c203..a35f159c 100644 --- a/kuickshow/src/slideshowwidget.cpp +++ b/kuickshow/src/slideshowwidget.cpp @@ -26,13 +26,13 @@ #include "slideshowwidget.h" -SlideShowWidget::SlideShowWidget( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) +SlideShowWidget::SlideShowWidget( TQWidget *tqparent, const char *name ) + : TQWidget( tqparent, name ) { // setTitle( i18n("Slideshow") ); - TQVBoxLayout *layout = new TQVBoxLayout( this ); - layout->setSpacing( KDialog::spacingHint() ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); + tqlayout->setSpacing( KDialog::spacingHint() ); m_fullScreen = new TQCheckBox( i18n("Switch to &full-screen"), this ); m_startWithCurrent = new TQCheckBox( i18n("S&tart with current image"), this); @@ -48,11 +48,11 @@ SlideShowWidget::SlideShowWidget( TQWidget *parent, const char *name ) m_cycles->setSpecialValueText( i18n("infinite") ); m_cycles->setRange( 0, 500 ); - layout->addWidget( m_fullScreen ); - layout->addWidget( m_startWithCurrent ); - layout->addWidget( m_delayTime ); - layout->addWidget( m_cycles ); - layout->addStretch( 1 ); + tqlayout->addWidget( m_fullScreen ); + tqlayout->addWidget( m_startWithCurrent ); + tqlayout->addWidget( m_delayTime ); + tqlayout->addWidget( m_cycles ); + tqlayout->addStretch( 1 ); loadSettings( *kdata ); } diff --git a/kuickshow/src/slideshowwidget.h b/kuickshow/src/slideshowwidget.h index 182a977d..4408b20e 100644 --- a/kuickshow/src/slideshowwidget.h +++ b/kuickshow/src/slideshowwidget.h @@ -24,11 +24,12 @@ class TQCheckBox; class KIntNumInput; -class SlideShowWidget : public QWidget +class SlideShowWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SlideShowWidget( TQWidget *parent, const char *name ); + SlideShowWidget( TQWidget *tqparent, const char *name ); ~SlideShowWidget(); virtual void loadSettings( const KuickData& data ); diff --git a/kview/config/kviewconfmodules.cpp b/kview/config/kviewconfmodules.cpp index e994d8ed..f84310e2 100644 --- a/kview/config/kviewconfmodules.cpp +++ b/kview/config/kviewconfmodules.cpp @@ -32,15 +32,15 @@ typedef KGenericFactory<KViewGeneralConfig, TQWidget> KViewGeneralConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kviewgeneralconfig, KViewGeneralConfigFactory( "kcm_kviewgeneralconfig" ) ) -KViewGeneralConfig::KViewGeneralConfig( TQWidget * parent, const char * /*name*/, const TQStringList & args ) - : KCModule( KViewGeneralConfigFactory::instance(), parent, args ) +KViewGeneralConfig::KViewGeneralConfig( TQWidget * tqparent, const char * /*name*/, const TQStringList & args ) + : KCModule( KViewGeneralConfigFactory::instance(), tqparent, args ) { - TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); m_pResizeGroup = new TQVButtonGroup( i18n( "Resizing" ), this ); - m_pResizeGroup->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); + m_pResizeGroup->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); connect( m_pResizeGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( resizeChanged( int ) ) ); - layout->addWidget( m_pResizeGroup ); + tqlayout->addWidget( m_pResizeGroup ); ( void )new TQRadioButton( i18n( "Only resize window" ), m_pResizeGroup ); ( void )new TQRadioButton( i18n( "Resize image to fit window" ), m_pResizeGroup ); diff --git a/kview/config/kviewconfmodules.h b/kview/config/kviewconfmodules.h index 1c9c1e7f..bd01dbaf 100644 --- a/kview/config/kviewconfmodules.h +++ b/kview/config/kviewconfmodules.h @@ -26,8 +26,9 @@ class TQVButtonGroup; class KViewGeneralConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - KViewGeneralConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() ); + KViewGeneralConfig( TQWidget * tqparent, const char * name = 0, const TQStringList & args = TQStringList() ); ~KViewGeneralConfig(); virtual void load(); diff --git a/kview/config/plugins/kviewpluginsconfig.cpp b/kview/config/plugins/kviewpluginsconfig.cpp index bad5bd55..cf085d3c 100644 --- a/kview/config/plugins/kviewpluginsconfig.cpp +++ b/kview/config/plugins/kviewpluginsconfig.cpp @@ -28,11 +28,11 @@ typedef KGenericFactory<KViewPluginsConfig, TQWidget> KViewPluginsConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kviewpluginsconfig, KViewPluginsConfigFactory( "kcm_kviewpluginsconfig" ) ) -KViewPluginsConfig::KViewPluginsConfig( TQWidget * parent, const char *, const TQStringList & args ) - : KSettings::PluginPage( KViewPluginsConfigFactory::instance(), parent, args ) +KViewPluginsConfig::KViewPluginsConfig( TQWidget * tqparent, const char *, const TQStringList & args ) + : KSettings::PluginPage( KViewPluginsConfigFactory::instance(), tqparent, args ) { m_config = new KSimpleConfig( "kviewrc" ); - pluginSelector()->addPlugins( TQString::fromAscii( "kview" ), i18n( "Application" ), TQString::null, m_config ); + pluginSelector()->addPlugins( TQString::fromAscii( "kview" ), i18n( "Application" ), TQString(), m_config ); pluginSelector()->setShowEmptyConfigPage( false ); } diff --git a/kview/config/plugins/kviewpluginsconfig.h b/kview/config/plugins/kviewpluginsconfig.h index 4095944d..3353bf6b 100644 --- a/kview/config/plugins/kviewpluginsconfig.h +++ b/kview/config/plugins/kviewpluginsconfig.h @@ -26,8 +26,9 @@ class KConfig; class KViewPluginsConfig : public KSettings::PluginPage { Q_OBJECT + TQ_OBJECT public: - KViewPluginsConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() ); + KViewPluginsConfig( TQWidget * tqparent, const char * name = 0, const TQStringList & args = TQStringList() ); ~KViewPluginsConfig(); private: KConfig * m_config; diff --git a/kview/kimageviewer/canvas.h b/kview/kimageviewer/canvas.h index 18aae3be..51736844 100644 --- a/kview/kimageviewer/canvas.h +++ b/kview/kimageviewer/canvas.h @@ -29,7 +29,7 @@ class TQPoint; class TQWidget; #include <tqstring.h> -#include <qobjectdefs.h> +#include <tqobjectdefs.h> #include <kdemacros.h> namespace KImageViewer { @@ -47,7 +47,7 @@ namespace KImageViewer * your program: * * <pre> - TQWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<TQWidget>( "KImageViewer/Canvas", TQString::null, this ); + TQWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<TQWidget>( "KImageViewer/Canvas", TQString(), this ); m_canvas = static_cast<KImageViewer::Canvas *>( widget->qt_cast( "KImageViewer::Canvas" ) ); if( ! ( widget && m_canvas ) ) { @@ -151,7 +151,7 @@ class KDE_EXPORT Canvas /** * @return the description of the blend effect */ - virtual TQString blendEffectDescription( unsigned int ) const { return TQString::null; } + virtual TQString blendEffectDescription( unsigned int ) const { return TQString(); } /** * Sets the blending effect used to create a transition between images diff --git a/kview/kimageviewer/viewer.cpp b/kview/kimageviewer/viewer.cpp index 1a5890d6..445cb6de 100644 --- a/kview/kimageviewer/viewer.cpp +++ b/kview/kimageviewer/viewer.cpp @@ -22,8 +22,8 @@ namespace KImageViewer { - Viewer::Viewer( TQObject * parent, const char * name ) - : KParts::ReadWritePart( parent, name ) + Viewer::Viewer( TQObject * tqparent, const char * name ) + : KParts::ReadWritePart( tqparent, name ) { } diff --git a/kview/kimageviewer/viewer.h b/kview/kimageviewer/viewer.h index 995be8b9..a656f049 100644 --- a/kview/kimageviewer/viewer.h +++ b/kview/kimageviewer/viewer.h @@ -48,8 +48,9 @@ namespace KImageViewer class KDE_EXPORT Viewer : public KParts::ReadWritePart { Q_OBJECT + TQ_OBJECT public: - Viewer( TQObject * parent = 0, const char * name = 0 ); + Viewer( TQObject * tqparent = 0, const char * name = 0 ); virtual ~Viewer(); diff --git a/kview/kview.cpp b/kview/kview.cpp index 44d792df..f30d5c3c 100644 --- a/kview/kview.cpp +++ b/kview/kview.cpp @@ -59,12 +59,12 @@ KView::KView() : KParts::MainWindow( 0, "KView" ) , m_pViewer( 0 ) , m_pCanvas( 0 ) - , m_pWinModule( new KWinModule( this, KWinModule::INFO_DESKTOP ) ) + , m_pWinModule( new KWinModule( TQT_TQOBJECT(this), KWinModule::INFO_DESKTOP ) ) , m_bImageSizeChangedBlocked( false ) , m_bFullscreen( false ) { KParts::ReadWritePart * part = KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadWritePart>( - "libkviewviewer", this, "KViewViewer Widget", this, "KImageViewer Part" ); + "libkviewviewer", this, "KViewViewer Widget", TQT_TQOBJECT(this), "KImageViewer Part" ); if( part ) { m_pViewer = static_cast<KImageViewer::Viewer *>( part ); @@ -89,7 +89,7 @@ KView::KView() connect( part->widget(), TQT_SIGNAL( contextPress( const TQPoint & ) ), TQT_SLOT( contextPress( const TQPoint & ) ) ); - connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), + connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), TQT_SLOT( clipboardDataChanged() ) ); connect( m_pViewer, TQT_SIGNAL( started( KIO::Job * ) ), @@ -112,7 +112,7 @@ KView::KView() m_pViewer->widget()->installEventFilter( this ); // reload configuration when it's changed by the conf dlg - KSettings::Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( readSettings() ) ); + KSettings::Dispatcher::self()->registerInstance( instance(), TQT_TQOBJECT(this), TQT_SLOT( readSettings() ) ); setPluginLoadingMode( LoadPluginsIfEnabled ); createGUI( part ); @@ -120,13 +120,13 @@ KView::KView() // create status bar (hidden by default) statusBar()->insertItem( "", STATUSBAR_SPEED_ID, 0, true ); statusBar()->setItemFixed( STATUSBAR_SPEED_ID, - 8 + fontMetrics().width( i18n( "%1/s" ).arg( KIO::convertSize( 999000 ) ) ) ); + 8 + fontMetrics().width( i18n( "%1/s" ).tqarg( KIO::convertSize( 999000 ) ) ) ); statusBar()->insertItem( "", STATUSBAR_CURSOR_ID, 0, true ); statusBar()->setItemFixed( STATUSBAR_CURSOR_ID, 8 + fontMetrics().width( "8888, 8888" ) ); statusBar()->insertItem( "", STATUSBAR_SIZE_ID, 0, true ); statusBar()->setItemFixed( STATUSBAR_SIZE_ID, 8 + fontMetrics().width( "8888 x 8888" ) ); - statusBar()->insertItem( TQString::null, STATUSBAR_SELECTION_ID ); + statusBar()->insertItem( TQString(), STATUSBAR_SELECTION_ID ); m_pProgressBar = new KProgress( statusBar() ); m_pProgressBar->setFixedSize( 140, fontMetrics().height() ); @@ -163,13 +163,13 @@ void KView::load( const KURL & url ) if( url.isLocalFile() ) { // XXX: this code is what - //KRecentDirs::add( TQString::fromLatin1( ":load_image" ), url.directory() ); + //KRecentDirs::add( TQString::tqfromLatin1( ":load_image" ), url.directory() ); // would do: TQString directory = url.directory(); - TQString key = TQString::fromLatin1( "load_image" ); + TQString key = TQString::tqfromLatin1( "load_image" ); KConfig * config = KGlobal::config(); - config->setGroup( TQString::fromLatin1( "Recent Dirs" ) ); + config->setGroup( TQString::tqfromLatin1( "Recent Dirs" ) ); TQStringList result = config->readPathListEntry( key ); // make sure the dir is first in history result.remove( directory ); @@ -208,7 +208,7 @@ TQSize KView::sizeForCentralWidgetSize( TQSize size ) if( ! mb->isHidden() ) { size.rheight() += mb->heightForWidth( width() ); - if( style().styleHint( TQStyle::SH_MainWindow_SpaceBelowMenuBar, this ) ) + if( tqstyle().tqstyleHint( TQStyle::SH_MainWindow_SpaceBelowMenuBar, this ) ) size.rheight() += dockWindowsMovable() ? 1 : 2; } kdDebug( 4600 ) << "added Menubar: " << size << endl; @@ -251,7 +251,7 @@ void KView::readSettings() // KConfig * config ) bool KView::eventFilter( TQObject * obj, TQEvent * ev ) { - if( obj == m_pViewer->widget() && ev->type() == TQEvent::Resize ) + if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pViewer->widget()) && ev->type() == TQEvent::Resize ) { if( m_nResizeMode == ResizeImage ) handleResize(); @@ -262,7 +262,7 @@ bool KView::eventFilter( TQObject * obj, TQEvent * ev ) void KView::imageSizeChanged( const TQSize & /*size*/ ) { TQSize size = m_pCanvas->imageSize(); - statusBar()->changeItem( TQString( "%1 x %2" ).arg( size.width() ).arg( size.height() ), STATUSBAR_SIZE_ID ); + statusBar()->changeItem( TQString( "%1 x %2" ).tqarg( size.width() ).tqarg( size.height() ), STATUSBAR_SIZE_ID ); handleResize(); } @@ -270,9 +270,9 @@ void KView::selectionChanged( const TQRect & rect ) { kdDebug( 4600 ) << k_funcinfo << rect << endl; if( rect.isNull() ) - statusBar()->changeItem( TQString::null, STATUSBAR_SELECTION_ID ); + statusBar()->changeItem( TQString(), STATUSBAR_SELECTION_ID ); else - statusBar()->changeItem( TQString( "%1, %2 - %3 x %4" ).arg( rect.x() ).arg( rect.y() ).arg( rect.width() ).arg( rect.height() ), STATUSBAR_SELECTION_ID ); + statusBar()->changeItem( TQString( "%1, %2 - %3 x %4" ).tqarg( rect.x() ).tqarg( rect.y() ).tqarg( rect.width() ).tqarg( rect.height() ), STATUSBAR_SELECTION_ID ); action( "crop" )->setEnabled( ! rect.isNull() ); } @@ -301,7 +301,7 @@ void KView::slotClose() void KView::slotCopy() { - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setSelectionMode( false ); TQRect selectarea = m_pCanvas->selection(); @@ -320,7 +320,7 @@ void KView::slotCopy() void KView::slotPaste() { // Get TQImage from clipboard and create a new image. - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); TQImage img = cb->image(); if( ! img.isNull() ) m_pViewer->newImage( img ); @@ -412,9 +412,9 @@ void KView::enableAction( const char * name, bool b ) void KView::clipboardDataChanged() { - QClipboard * cb = TQApplication::clipboard(); + TQClipboard * cb = TQApplication::tqclipboard(); cb->setSelectionMode( false ); - bool hasImage = TQImageDrag::canDecode( cb->data( QClipboard::Clipboard ) ); + bool hasImage = TQImageDrag::canDecode( cb->data( TQClipboard::Clipboard ) ); m_paPaste->setEnabled( hasImage ); } @@ -466,7 +466,7 @@ void KView::speedProgress( KIO::Job *, unsigned long bytesPerSecond ) TQString sizeStr; if( bytesPerSecond > 0 ) - sizeStr = i18n( "%1/s" ).arg( KIO::convertSize( bytesPerSecond ) ); + sizeStr = i18n( "%1/s" ).tqarg( KIO::convertSize( bytesPerSecond ) ); else sizeStr = i18n( "Stalled" ); @@ -483,38 +483,38 @@ void KView::slotSetStatusBarText( const TQString & msg ) void KView::cursorPos( const TQPoint & pos ) { - statusBar()->changeItem( TQString( "%1, %2" ).arg( pos.x() ).arg( pos.y() ), STATUSBAR_CURSOR_ID ); + statusBar()->changeItem( TQString( "%1, %2" ).tqarg( pos.x() ).tqarg( pos.y() ), STATUSBAR_CURSOR_ID ); } void KView::setupActions( TQObject * partobject ) { // File - KStdAction::open( this, TQT_SLOT( slotOpenFile() ), actionCollection() ); - m_paRecent = KStdAction::openRecent( this, TQT_SLOT( slotOpenRecent( const KURL & ) ), actionCollection() ); - KAction * aClose = KStdAction::close( this, TQT_SLOT( slotClose() ), actionCollection() ); + KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotOpenFile() ), actionCollection() ); + m_paRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( slotOpenRecent( const KURL & ) ), actionCollection() ); + KAction * aClose = KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( slotClose() ), actionCollection() ); aClose->setEnabled( false ); connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), aClose, TQT_SLOT( setEnabled( bool ) ) ); TQObject * extension = partobject->child( 0, "KParts::BrowserExtension", false ); if( extension ) { - TQStrList slotNames = extension->metaObject()->slotNames(); - if( slotNames.contains( "print()" ) ) + TQStrList slotNames = extension->tqmetaObject()->slotNames(); + if( slotNames.tqcontains( "print()" ) ) KStdAction::print( extension, TQT_SLOT( print() ), actionCollection(), "print" ); - if( slotNames.contains( "del()" ) ) + if( slotNames.tqcontains( "del()" ) ) ( void )new KAction( i18n( "&Delete" ), "editdelete", SHIFT+Key_Delete, extension, TQT_SLOT( del() ), actionCollection(), "del" ); connect( extension, TQT_SIGNAL( enableAction( const char *, bool ) ), TQT_SLOT( enableAction( const char *, bool ) ) ); } - KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() ); // Edit - KAction * aCopy = KStdAction::copy( this, TQT_SLOT( slotCopy() ), actionCollection() ); + KAction * aCopy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( slotCopy() ), actionCollection() ); aCopy->setEnabled( false ); connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), aCopy, TQT_SLOT( setEnabled( bool ) ) ); - m_paPaste = KStdAction::paste( this, TQT_SLOT( slotPaste() ), actionCollection() ); + m_paPaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( slotPaste() ), actionCollection() ); clipboardDataChanged(); //enable or disable paste - KAction * aCrop = new KAction( i18n( "Cr&op" ), Key_C, this, TQT_SLOT( slotCrop() ), actionCollection(), "crop" ); + KAction * aCrop = new KAction( i18n( "Cr&op" ), Key_C, TQT_TQOBJECT(this), TQT_SLOT( slotCrop() ), actionCollection(), "crop" ); aCrop->setEnabled( false ); KAction * aReload = new KAction( i18n( "&Reload" ), "reload", KStdAccel::shortcut( KStdAccel::Reload ), partobject, @@ -523,17 +523,17 @@ void KView::setupActions( TQObject * partobject ) connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), aReload, TQT_SLOT( setEnabled( bool ) ) ); // Settings - m_paShowMenubar = KStdAction::showMenubar( this, TQT_SLOT( slotToggleMenubar() ), actionCollection() ); + m_paShowMenubar = KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotToggleMenubar() ), actionCollection() ); createStandardStatusBarAction(); - m_paShowStatusBar = ::qt_cast<KToggleAction*>( action( "options_show_statusbar" ) ); + m_paShowStatusBar = ::tqqt_cast<KToggleAction*>( action( "options_show_statusbar" ) ); if( m_paShowStatusBar ) connect( m_paShowStatusBar, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( statusbarToggled( bool ) ) ); m_paShowFullScreen = KStdAction::fullScreen( 0, 0, actionCollection(), this ); connect( m_paShowFullScreen, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( slotUpdateFullScreen( bool ))); - KStdAction::preferences( this, TQT_SLOT( slotPreferences() ), actionCollection() ); + KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT( slotPreferences() ), actionCollection() ); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); + KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); } void KView::handleResize() @@ -614,7 +614,7 @@ void KView::fitWindowToImage() winsize.setWidth( workarea.width() ); } - TQRect winrect( geometry() ); + TQRect winrect( tqgeometry() ); winrect.setSize( winsize ); int xdiff = winrect.x() + winrect.width() - workarea.x() - workarea.width(); @@ -653,7 +653,7 @@ TQSize KView::barSize( int mainwinwidth, BarSizeFrom from ) width += toolBar()->width(); break; case KToolBar::Flat: - height += kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ); + height += kapp->tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent ); break; case KToolBar::Floating: break; diff --git a/kview/kview.h b/kview/kview.h index 6726fb8b..ef886427 100644 --- a/kview/kview.h +++ b/kview/kview.h @@ -43,6 +43,7 @@ class KProgress; class KView : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: KView(); virtual ~KView(); diff --git a/kview/kviewcanvas/config/confmodules.cpp b/kview/kviewcanvas/config/confmodules.cpp index 4ecf07b9..a90c1024 100644 --- a/kview/kviewcanvas/config/confmodules.cpp +++ b/kview/kviewcanvas/config/confmodules.cpp @@ -34,12 +34,12 @@ typedef KGenericFactory<KViewCanvasConfig, TQWidget> KViewCanvasConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kviewcanvasconfig, KViewCanvasConfigFactory( "kcm_kviewcanvasconfig" ) ) -KViewCanvasConfig::KViewCanvasConfig( TQWidget * parent, const char *, const TQStringList & args ) - : KCModule( KViewCanvasConfigFactory::instance(), parent, args ) +KViewCanvasConfig::KViewCanvasConfig( TQWidget * tqparent, const char *, const TQStringList & args ) + : KCModule( KViewCanvasConfigFactory::instance(), tqparent, args ) , m_config( new KConfig( "kviewcanvasrc" ) ) { - TQBoxLayout * layout = new TQVBoxLayout( this ); - layout->setAutoAdd( true ); + TQBoxLayout * tqlayout = new TQVBoxLayout( this ); + tqlayout->setAutoAdd( true ); m_pWidget = new GeneralConfigWidget( this ); m_pWidget->m_pMinWidth ->setRange( 1, 200 ); diff --git a/kview/kviewcanvas/config/confmodules.h b/kview/kviewcanvas/config/confmodules.h index e513a9cd..95fa00c6 100644 --- a/kview/kviewcanvas/config/confmodules.h +++ b/kview/kviewcanvas/config/confmodules.h @@ -29,8 +29,9 @@ class KConfig; class KViewCanvasConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - KViewCanvasConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() ); + KViewCanvasConfig( TQWidget * tqparent, const char * name = 0, const TQStringList & args = TQStringList() ); ~KViewCanvasConfig(); void load(); diff --git a/kview/kviewcanvas/config/defaults.h b/kview/kviewcanvas/config/defaults.h index 02abbb19..166b3b02 100644 --- a/kview/kviewcanvas/config/defaults.h +++ b/kview/kviewcanvas/config/defaults.h @@ -27,7 +27,7 @@ namespace Defaults { static const bool smoothScaling = false; static const bool keepAspectRatio = true; static const bool centerImage = true; - static const TQColor bgColor( Qt::black ); + static const TQColor bgColor( TQt::black ); static const TQSize minSize( 1, 1 ); static const TQSize maxSize( 10000, 10000 ); static const unsigned int numOfBlendEffects = 4; diff --git a/kview/kviewcanvas/config/generalconfigwidget.ui b/kview/kviewcanvas/config/generalconfigwidget.ui index b4646381..da279892 100644 --- a/kview/kviewcanvas/config/generalconfigwidget.ui +++ b/kview/kviewcanvas/config/generalconfigwidget.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>GeneralConfigWidget</class> <author>Matthias Kretz <kretz@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>GeneralConfigWidget</cstring> </property> @@ -20,7 +20,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -110,7 +110,7 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>0</height> @@ -127,7 +127,7 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>0</height> @@ -136,15 +136,15 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a </spacer> </grid> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -179,15 +179,15 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pSmoothScaling</cstring> </property> @@ -195,7 +195,7 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a <string>Use smooth scaling (high quality but slower)</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pKeepRatio</cstring> </property> @@ -206,7 +206,7 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a <string>If this is checked KView will always try to keep the aspect ratio. That means if the width is scaled with a factor x, the height is scaled with the same factor.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_pCenterImage</cstring> </property> @@ -216,7 +216,7 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a </widget> </vbox> </widget> - <widget class="QGroupBox" row="0" column="1"> + <widget class="TQGroupBox" row="0" column="1"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -239,7 +239,7 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>32</width> <height>32</height> @@ -259,7 +259,7 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>151</width> <height>21</height> @@ -283,8 +283,8 @@ A value of 100 would cause a 1000x1000 image to be compressed horizontally by a <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kview/kviewcanvas/kimagecanvas.cpp b/kview/kviewcanvas/kimagecanvas.cpp index 97001670..d3a8608b 100644 --- a/kview/kviewcanvas/kimagecanvas.cpp +++ b/kview/kviewcanvas/kimagecanvas.cpp @@ -43,8 +43,8 @@ typedef KGenericFactory<KImageCanvas> KImageCanvasFactory; K_EXPORT_COMPONENT_FACTORY( libkviewcanvas, KImageCanvasFactory( "kviewcanvas" ) ) -KImageCanvas::KImageCanvas( TQWidget * parent, const char * name, const TQStringList & ) - : TQScrollView( parent, name, WResizeNoErase | WStaticContents ) +KImageCanvas::KImageCanvas( TQWidget * tqparent, const char * name, const TQStringList & ) + : TQScrollView( tqparent, name, WResizeNoErase | WStaticContents ) , m_client( 0 ) , m_oldClient( 0 ) , m_image( 0 ) @@ -75,7 +75,7 @@ KImageCanvas::KImageCanvas( TQWidget * parent, const char * name, const TQString connect( m_pTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( hideCursor() ) ); KSettings::Dispatcher::self()->registerInstance( - KImageCanvasFactory::instance(), this, + KImageCanvasFactory::instance(), TQT_TQOBJECT(this), TQT_SLOT( loadSettings() ) ); viewport()->setFocusProxy( this ); @@ -321,13 +321,13 @@ TQString KImageCanvas::blendEffectDescription( unsigned int idx ) const return i18n( Defaults::blendEffectDescription[ 4 ] ); } kdError( 4620 ) << "Effect description for effect with index " << idx << " doesn't exist\n"; - return TQString::null; + return TQString(); } bool KImageCanvas::eventFilter( TQObject * obj, TQEvent * ev ) { - if( ( obj == m_client || obj == m_oldClient ) && ev->type() == TQEvent::MouseMove ) - mouseMoveEvent( static_cast<TQMouseEvent*>( ev ) ); + if( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_client) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_oldClient) ) && ev->type() == TQEvent::MouseMove ) + mouseMoveEvent( TQT_TQMOUSEEVENT( ev ) ); return TQScrollView::eventFilter( obj, ev ); } @@ -543,7 +543,7 @@ void KImageCanvas::slotUpdateImage() if( m_bSizeChanged || m_bNewImage ) { - TQSize sh = m_client->sizeHint(); + TQSize sh = m_client->tqsizeHint(); if( ! sh.isValid() ) sh = TQSize( 0, 0 ); m_client->resize( sh ); @@ -587,7 +587,7 @@ void KImageCanvas::slotUpdateImage() void KImageCanvas::mouseMoveEvent( TQMouseEvent * ) { - if( m_cursor.shape() == Qt::BlankCursor ) + if( m_cursor.tqshape() == TQt::BlankCursor ) { m_cursor.setShape( Qt::CrossCursor ); viewport()->setCursor( m_cursor ); @@ -607,7 +607,7 @@ void KImageCanvas::resizeEvent( TQResizeEvent * ev ) void KImageCanvas::contentsMousePressEvent( TQMouseEvent * ev ) { - if ( ev->button() == RightButton ) + if ( ev->button() == Qt::RightButton ) emit contextPress( ev->globalPos() ); TQScrollView::contentsMousePressEvent( ev ); } @@ -935,7 +935,7 @@ KImageHolder * KImageCanvas::createNewClient() client->setMouseTracking( true ); client->installEventFilter( this ); setFocusProxy( client ); - client->setFocusPolicy( TQWidget::StrongFocus ); + client->setFocusPolicy( TQ_StrongFocus ); client->setFocus(); addChild( client, 0, 0 ); diff --git a/kview/kviewcanvas/kimagecanvas.h b/kview/kviewcanvas/kimagecanvas.h index 04934c74..c7af475e 100644 --- a/kview/kviewcanvas/kimagecanvas.h +++ b/kview/kviewcanvas/kimagecanvas.h @@ -42,11 +42,12 @@ class KPixmap; class KDE_EXPORT KImageCanvas : public TQScrollView, public KImageViewer::Canvas { Q_OBJECT + TQ_OBJECT public: /** * KImageCanvas Constructor */ - KImageCanvas( TQWidget * parent, const char * name, const TQStringList & args ); + KImageCanvas( TQWidget * tqparent, const char * name, const TQStringList & args ); /** * KImageCanvas Destructor diff --git a/kview/kviewcanvas/kimageholder.cpp b/kview/kviewcanvas/kimageholder.cpp index 6ca63698..13ee9e43 100644 --- a/kview/kviewcanvas/kimageholder.cpp +++ b/kview/kviewcanvas/kimageholder.cpp @@ -33,8 +33,8 @@ #include "kimageholder.h" -KImageHolder::KImageHolder( TQWidget * parent, const char * name ) - : TQWidget( parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase ) +KImageHolder::KImageHolder( TQWidget * tqparent, const char * name ) + : TQWidget( tqparent, name, TQt::WResizeNoErase | TQt::WRepaintNoErase ) , m_selected( false ) , m_bSelecting( false ) , m_scrollTimerId( 0 ) @@ -64,7 +64,7 @@ void KImageHolder::mousePressEvent( TQMouseEvent *ev ) { //kdDebug( 4620 ) << k_funcinfo << " ev->state() = " << ev->state() << endl; // if the right mouse button is pressed emit the contextPress signal - if ( ev->button() == RightButton ) + if ( ev->button() == Qt::RightButton ) { emit contextPress( mapToGlobal( ev->pos() ) ); return; @@ -73,7 +73,7 @@ void KImageHolder::mousePressEvent( TQMouseEvent *ev ) if( m_pPixmap == 0 ) return; - if( ev->button() == LeftButton || ev->button() == MidButton ) + if( ev->button() == Qt::LeftButton || ev->button() == Qt::MidButton ) { m_scrollpos = ev->globalPos(); m_selectionStartPoint = ev->pos(); @@ -83,20 +83,20 @@ void KImageHolder::mousePressEvent( TQMouseEvent *ev ) void KImageHolder::mouseMoveEvent( TQMouseEvent *ev ) { //FIXME: when scrolling the cursorpos shouldn't change - if( this->rect().contains( ev->pos(), false ) ) + if( TQT_TQRECT_OBJECT(this->rect()).tqcontains( ev->pos(), false ) ) emit cursorPos( ev->pos() ); //kdDebug( 4620 ) << k_funcinfo << " ev->state() = " << ev->state() << endl; - if( ev->state() & LeftButton || ev->state() & MidButton ) + if( ev->state() & Qt::LeftButton || ev->state() & Qt::MidButton ) { // scroll when a modifier and left button or the middle button is pressed - if( ev->state() & AltButton || ev->state() & ControlButton || ev->state() & ShiftButton || ev->state() & MidButton ) + if( ev->state() & AltButton || ev->state() & ControlButton || ev->state() & ShiftButton || ev->state() & Qt::MidButton ) { TQPoint difference = m_scrollpos - ev->globalPos(); emit wannaScroll( difference.x(), difference.y() ); } else // create a selection { - TQWidget * parentwidget = ( TQWidget* )parent(); + TQWidget * tqparentwidget = ( TQWidget* )tqparent(); if( ! m_bSelecting ) { m_bSelecting = true; @@ -127,17 +127,17 @@ void KImageHolder::mouseMoveEvent( TQMouseEvent *ev ) // -2 => scroll to the left 2 px per 50ms // 2 => scroll to the right 2 px per 50ms // ... - m_xOffset = mapTo( parentwidget, ev->pos() ).x(); - m_yOffset = mapTo( parentwidget, ev->pos() ).y(); + m_xOffset = mapTo( tqparentwidget, ev->pos() ).x(); + m_yOffset = mapTo( tqparentwidget, ev->pos() ).y(); if( m_xOffset > 0 ) { - m_xOffset -= parentwidget->width(); + m_xOffset -= tqparentwidget->width(); if( m_xOffset < 0 ) m_xOffset = 0; } if( m_yOffset > 0 ) { - m_yOffset -= parentwidget->height(); + m_yOffset -= tqparentwidget->height(); if( m_yOffset < 0 ) m_yOffset = 0; } @@ -181,7 +181,7 @@ void KImageHolder::mouseReleaseEvent( TQMouseEvent * ev ) m_scrollTimerId = 0; } } - if( ev->state() & LeftButton || ev->state() & MidButton ) + if( ev->state() & Qt::LeftButton || ev->state() & Qt::MidButton ) if( m_bSelecting ) m_bSelecting = false; else @@ -207,7 +207,7 @@ void KImageHolder::eraseSelect() inner.rBottom() -= 1; r -= inner; - TQMemArray<TQRect> rects = r.rects(); + TQMemArray<TQRect> rects = r.tqrects(); if( m_pDoubleBuffer ) for( unsigned int i = 0; i < rects.size(); ++i ) @@ -269,7 +269,7 @@ TQRect KImageHolder::selection() const return TQRect(); } -TQSize KImageHolder::sizeHint() const +TQSize KImageHolder::tqsizeHint() const { if( m_pPixmap ) return m_pPixmap->size(); @@ -282,7 +282,7 @@ void KImageHolder::paintEvent( TQPaintEvent *ev ) painter.setClipRegion( ev->region().intersect( m_drawRect ) ); if( m_pPixmap ) { - if( m_pPixmap->mask() ) + if( m_pPixmap->tqmask() ) { if( ! m_pDoubleBuffer ) { diff --git a/kview/kviewcanvas/kimageholder.h b/kview/kviewcanvas/kimageholder.h index 73148cbf..d8d220c0 100644 --- a/kview/kviewcanvas/kimageholder.h +++ b/kview/kviewcanvas/kimageholder.h @@ -32,11 +32,12 @@ class TQPoint; * @short Image widget * @version $Id$ */ -class KImageHolder : public QWidget +class KImageHolder : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KImageHolder( TQWidget *parent = 0, const char * name = 0 ); + KImageHolder( TQWidget *tqparent = 0, const char * name = 0 ); virtual ~KImageHolder(); @@ -56,7 +57,7 @@ class KImageHolder : public QWidget */ TQRect selection() const; - TQSize sizeHint() const; + TQSize tqsizeHint() const; void setDrawRect( const TQRect & rect ) { m_drawRect = rect; } const TQRect & drawRect() const { return m_drawRect; } diff --git a/kview/kviewcanvas/test/test.cpp b/kview/kviewcanvas/test/test.cpp index e913ab59..3d24cbce 100644 --- a/kview/kviewcanvas/test/test.cpp +++ b/kview/kviewcanvas/test/test.cpp @@ -17,7 +17,7 @@ KImageViewerTest::KImageViewerTest() : KParts::MainWindow( 0L, "KImageViewerTest" ) { TQWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<TQWidget>( - "KImageViewer/Canvas", TQString::null, this ); + "KImageViewer/Canvas", TQString(), this ); if( widget ) { m_part = dynamic_cast<KImageViewer::Canvas *>( widget ); diff --git a/kview/kviewcanvas/test/test.h b/kview/kviewcanvas/test/test.h index b6a85188..f04866ef 100644 --- a/kview/kviewcanvas/test/test.h +++ b/kview/kviewcanvas/test/test.h @@ -13,6 +13,7 @@ namespace KImageViewer { class Canvas; }; class KImageViewerTest : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: KImageViewerTest(); virtual ~KImageViewerTest(); diff --git a/kview/kviewviewer/config/kviewviewerpluginsconfig.cpp b/kview/kviewviewer/config/kviewviewerpluginsconfig.cpp index ea876950..a1576b49 100644 --- a/kview/kviewviewer/config/kviewviewerpluginsconfig.cpp +++ b/kview/kviewviewer/config/kviewviewerpluginsconfig.cpp @@ -30,11 +30,11 @@ typedef KGenericFactory<KViewViewerPluginsConfig, TQWidget> KViewViewerPluginsConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kviewviewerpluginsconfig, KViewViewerPluginsConfigFactory( "kcm_kviewviewerpluginsconfig" ) ) -KViewViewerPluginsConfig::KViewViewerPluginsConfig( TQWidget * parent, const char *, const TQStringList & args ) - : KSettings::PluginPage( KViewViewerPluginsConfigFactory::instance(), parent, args ) +KViewViewerPluginsConfig::KViewViewerPluginsConfig( TQWidget * tqparent, const char *, const TQStringList & args ) + : KSettings::PluginPage( KViewViewerPluginsConfigFactory::instance(), tqparent, args ) { m_config = new KSimpleConfig( "kviewviewerrc" ); - pluginSelector()->addPlugins( TQString::fromAscii( "kviewviewer" ), i18n( "Viewer" ), TQString::null, m_config ); + pluginSelector()->addPlugins( TQString::fromAscii( "kviewviewer" ), i18n( "Viewer" ), TQString(), m_config ); pluginSelector()->setShowEmptyConfigPage( false ); } diff --git a/kview/kviewviewer/config/kviewviewerpluginsconfig.h b/kview/kviewviewer/config/kviewviewerpluginsconfig.h index 1dbe39c3..94860fc9 100644 --- a/kview/kviewviewer/config/kviewviewerpluginsconfig.h +++ b/kview/kviewviewer/config/kviewviewerpluginsconfig.h @@ -26,8 +26,9 @@ class KConfig; class KViewViewerPluginsConfig : public KSettings::PluginPage { Q_OBJECT + TQ_OBJECT public: - KViewViewerPluginsConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() ); + KViewViewerPluginsConfig( TQWidget * tqparent, const char * name = 0, const TQStringList & args = TQStringList() ); ~KViewViewerPluginsConfig(); private: KConfig * m_config; diff --git a/kview/kviewviewer/imagesettings.cpp b/kview/kviewviewer/imagesettings.cpp index 0ee58b78..10781565 100644 --- a/kview/kviewviewer/imagesettings.cpp +++ b/kview/kviewviewer/imagesettings.cpp @@ -24,20 +24,20 @@ #include <klocale.h> #include <kdialog.h> -ImageSettings::ImageSettings( TQWidget * parent, const char * name ) - : KPrintDialogPage( parent, name ) +ImageSettings::ImageSettings( TQWidget * tqparent, const char * name ) + : KPrintDialogPage( tqparent, name ) , m_pFitImage( 0 ) { setTitle( i18n( "Image Settings" ) ); - TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); m_pFitImage = new TQCheckBox( i18n( "Fit image to page size" ), this ); m_pFitImage->setChecked( true ); - layout->addWidget( m_pFitImage ); + tqlayout->addWidget( m_pFitImage ); m_pCenter = new TQCheckBox( i18n( "Center image on page" ), this ); m_pCenter->setChecked( true ); - layout->addWidget( m_pCenter ); - layout->insertStretch( -1, 0 ); + tqlayout->addWidget( m_pCenter ); + tqlayout->insertStretch( -1, 0 ); } ImageSettings::~ImageSettings() diff --git a/kview/kviewviewer/imagesettings.h b/kview/kviewviewer/imagesettings.h index f627cbac..07bb9af8 100644 --- a/kview/kviewviewer/imagesettings.h +++ b/kview/kviewviewer/imagesettings.h @@ -26,8 +26,9 @@ class TQCheckBox; class ImageSettings : public KPrintDialogPage { Q_OBJECT + TQ_OBJECT public: - ImageSettings( TQWidget * parent = 0, const char * name = 0 ); + ImageSettings( TQWidget * tqparent = 0, const char * name = 0 ); ~ImageSettings(); void setOptions( const TQMap<TQString, TQString> & opts ); diff --git a/kview/kviewviewer/kviewkonqextension.cpp b/kview/kviewviewer/kviewkonqextension.cpp index b3f16a93..b47ea17d 100644 --- a/kview/kviewviewer/kviewkonqextension.cpp +++ b/kview/kviewviewer/kviewkonqextension.cpp @@ -33,9 +33,9 @@ #include <klocale.h> KViewKonqExtension::KViewKonqExtension( KImageViewer::Canvas * canvas, - KViewViewer *parent, const char *name ) - : KParts::BrowserExtension( parent, name ), - m_pViewer( parent ), + KViewViewer *tqparent, const char *name ) + : KParts::BrowserExtension( tqparent, name ), + m_pViewer( tqparent ), m_pCanvas( canvas ) { KGlobal::locale()->insertCatalogue("kview"); @@ -68,7 +68,7 @@ void KViewKonqExtension::print() printer.addDialogPage( new ImageSettings ); printer.setDocName( "KView: " + m_pViewer->url().fileName( false ) ); - if ( !printer.setup( ((KViewViewer *)parent())->widget(), i18n("Print %1").arg(m_pViewer->url().fileName( false )) ) ) + if ( !printer.setup( ((KViewViewer *)tqparent())->widget(), i18n("Print %1").tqarg(m_pViewer->url().fileName( false )) ) ) return; TQPainter painter; @@ -80,7 +80,7 @@ void KViewKonqExtension::print() TQImage imagetoprint; if( printer.option( "app-kviewviewer-fitimage" ) == "1" ) - imagetoprint = m_pCanvas->image()->smoothScale( metrics.width(), metrics.height(), TQImage::ScaleMin ); + imagetoprint = m_pCanvas->image()->smoothScale( metrics.width(), metrics.height(), TQ_ScaleMin ); else imagetoprint = *m_pCanvas->image(); diff --git a/kview/kviewviewer/kviewkonqextension.h b/kview/kviewviewer/kviewkonqextension.h index b7692f31..fa986c81 100644 --- a/kview/kviewviewer/kviewkonqextension.h +++ b/kview/kviewviewer/kviewkonqextension.h @@ -29,8 +29,9 @@ class KViewKonqExtension: public KParts::BrowserExtension { friend class KViewViewer; // it can emit our signals Q_OBJECT + TQ_OBJECT public: - KViewKonqExtension( KImageViewer::Canvas *, KViewViewer *parent, const char *name = 0 ); + KViewKonqExtension( KImageViewer::Canvas *, KViewViewer *tqparent, const char *name = 0 ); virtual ~KViewKonqExtension() {} virtual void setXYOffset( int x, int y ); diff --git a/kview/kviewviewer/kviewviewer.cpp b/kview/kviewviewer/kviewviewer.cpp index 06dd1716..e566b74b 100644 --- a/kview/kviewviewer/kviewviewer.cpp +++ b/kview/kviewviewer/kviewviewer.cpp @@ -55,10 +55,10 @@ typedef KParts::GenericFactory<KViewViewer> KViewViewerFactory; K_EXPORT_COMPONENT_FACTORY( libkviewviewer, KViewViewerFactory ) -KViewViewer::KViewViewer( TQWidget *parentWidget, const char * /*widgetName*/, - TQObject *parent, const char *name, const TQStringList & ) - : KImageViewer::Viewer( parent, name ) - , m_pParentWidget( parentWidget ) +KViewViewer::KViewViewer( TQWidget *tqparentWidget, const char * /*widgetName*/, + TQObject *tqparent, const char *name, const TQStringList & ) + : KImageViewer::Viewer( tqparent, name ) + , m_pParentWidget( tqparentWidget ) , m_pJob( 0 ) , m_pExtension( 0 ) , m_pCanvas( 0 ) @@ -69,7 +69,7 @@ KViewViewer::KViewViewer( TQWidget *parentWidget, const char * /*widgetName*/, KImageIO::registerFormats(); TQWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<TQWidget>( - "KImageViewer/Canvas", TQString::null, m_pParentWidget ); + "KImageViewer/Canvas", TQString(), TQT_TQOBJECT(m_pParentWidget) ); m_pCanvas = static_cast<KImageViewer::Canvas *>( widget->qt_cast( "KImageViewer::Canvas" ) ); kdDebug( 4610 ) << "KImageViewer::Canvas at " << m_pCanvas << endl; if( ! ( widget && m_pCanvas ) ) @@ -148,10 +148,10 @@ KViewViewer::~KViewViewer() int res = m_url.isEmpty() ? KMessageBox::warningYesNo( widget(), i18n( "This is a new document.\nDo you want to save it ?" ), - TQString::null, KStdGuiItem::saveAs(), KStdGuiItem::discard() ): + TQString(), KStdGuiItem::saveAs(), KStdGuiItem::discard() ): KMessageBox::warningYesNo( widget(), i18n( "The document has been modified.\nDo you want to save it ?" ), - TQString::null, KStdGuiItem::saveAs(), KStdGuiItem::dontSave() ); + TQString(), KStdGuiItem::saveAs(), KStdGuiItem::dontSave() ); if( res == KMessageBox::Yes ) { @@ -259,11 +259,11 @@ bool KViewViewer::openURL( const KURL & url ) // Use same extension as remote file. This is important for mimetype-determination (e.g. koffice) TQString extension; TQString fileName = url.fileName(); - int extensionPos = fileName.findRev( '.' ); + int extensionPos = fileName.tqfindRev( '.' ); if ( extensionPos != -1 ) extension = fileName.mid( extensionPos ); // keep the '.' delete m_pTempFile; - m_pTempFile = new KTempFile( TQString::null, extension ); + m_pTempFile = new KTempFile( TQString(), extension ); m_file = m_pTempFile->name(); m_pJob = KIO::get( m_url, m_pExtension->urlArgs().reload, isProgressInfoEnabled() ); @@ -294,7 +294,7 @@ void KViewViewer::newImage( const TQImage & newimg ) if( closeURL() ) { m_url = ""; - m_file = TQString::null; + m_file = TQString(); m_sCaption = i18n( "Title caption when new image selected", "new image" ); m_pCanvas->setImage( newimg ); if( isReadWrite() ) @@ -397,7 +397,7 @@ bool KViewViewer::openFile() } else { - emit setStatusBarText( i18n( "Unknown image format: %1" ).arg( m_url.prettyURL() ) ); + emit setStatusBarText( i18n( "Unknown image format: %1" ).tqarg( m_url.prettyURL() ) ); return false; } } @@ -406,12 +406,12 @@ bool KViewViewer::openFile() kdDebug( 4610 ) << k_funcinfo << " load from file: " << m_file << endl; if( ! TQFile::exists( m_file ) ) { - emit setStatusBarText( i18n( "No such file: %1" ).arg( m_file ) ); + emit setStatusBarText( i18n( "No such file: %1" ).tqarg( m_file ) ); return false; } if( TQImage::imageFormat( m_file ) == 0 ) { - emit setStatusBarText( i18n( "Unknown image format: %1" ).arg( m_file ) ); + emit setStatusBarText( i18n( "Unknown image format: %1" ).tqarg( m_file ) ); return false; } // determine Mime Type @@ -450,7 +450,7 @@ bool KViewViewer::saveFile() if( ! m_newMimeType.isNull() ) { m_mimeType = m_newMimeType; - m_newMimeType = TQString::null; + m_newMimeType = TQString(); } TQString type = KImageIO::typeForMime( m_mimeType ); kdDebug( 4610 ) << "save m_pCanvas->image() to " << m_file << " as " << type << endl; @@ -567,7 +567,7 @@ void KViewViewer::writeSettings() void KViewViewer::zoomChanged( double zoom ) { kdDebug( 4610 ) << k_funcinfo << endl; - emit setWindowCaption( m_sCaption + TQString( " (%1%)" ).arg( zoom * 100, 0, 'f', 0 ) ); + emit setWindowCaption( m_sCaption + TQString( " (%1%)" ).tqarg( zoom * 100, 0, 'f', 0 ) ); updateZoomMenu( zoom ); } @@ -610,7 +610,7 @@ void KViewViewer::slotSave() void KViewViewer::slotSaveAs() { kdDebug( 4610 ) << k_funcinfo << endl; - KFileDialog dlg( TQString::null, TQString::null, widget(), "filedialog", true ); + KFileDialog dlg( TQString(), TQString(), widget(), "filedialog", true ); dlg.setMimeFilter( KImageIO::mimeTypes( KImageIO::Writing ) ); dlg.setSelection( m_url.fileName() ); dlg.setCaption( i18n( "Save As" ) ); @@ -645,7 +645,7 @@ void KViewViewer::setZoom( const TQString & newZoom ) kdDebug( 4610 ) << k_funcinfo << newZoom << endl; double zoom; TQString z = newZoom; - z.remove( z.find( '%' ), 1 ); + z.remove( z.tqfind( '%' ), 1 ); if( newZoom == "33%" ) zoom = 1.0 / 3.0; else @@ -667,14 +667,14 @@ void KViewViewer::updateZoomMenu( double zoom ) TQStringList itemsList = m_paZoom->items(); for( TQStringList::Iterator it = itemsList.begin(); it != itemsList.end(); ++it ) { - z = ( *it ).replace( TQRegExp( "%" ), "" ); + z = ( *it ).tqreplace( TQRegExp( "%" ), "" ); z = z.simplifyWhiteSpace(); val = z.toInt( &ok ); - if( ok && val > 0 && list.contains( val ) == 0 ) + if( ok && val > 0 && list.tqcontains( val ) == 0 ) list << val; } val = TQString::number( zoom * 100, 'f', 0 ).toInt(); // round/lround from math.h doesn't work - dunno - if( list.contains( val ) == 0 ) + if( list.tqcontains( val ) == 0 ) list.append( val ); qHeapSort( list ); @@ -685,9 +685,9 @@ void KViewViewer::updateZoomMenu( double zoom ) } // first look if it's a new value (not in the list yet) - TQString z = TQString( "%1%" ).arg( zoom * 100, 0, 'f', 0 ); + TQString z = TQString( "%1%" ).tqarg( zoom * 100, 0, 'f', 0 ); TQStringList items = m_paZoom->items(); - int idx = items.findIndex( z ); + int idx = items.tqfindIndex( z ); if( -1 == idx ) { // not found XXX: remove when done @@ -773,7 +773,7 @@ void KViewViewer::slotResultSaveAs( KIO::Job *job ) else { emit completed(); - KIO::CopyJob * cjob = ::qt_cast<KIO::CopyJob*>( job ); + KIO::CopyJob * cjob = ::tqqt_cast<KIO::CopyJob*>( job ); if( cjob ) { m_url = cjob->destURL(); @@ -803,21 +803,21 @@ void KViewViewer::slotFileDirty( const TQString & ) if( isModified() && isReadWrite() ) { KPassivePopup * pop = new KPassivePopup( m_pParentWidget ); - TQVBox * vb = pop->standardView( i18n( "Load changed image? - %1" ).arg( kapp->aboutData()->programName() ), - TQString::null, kapp->miniIcon() ); + TQVBox * vb = pop->standardView( i18n( "Load changed image? - %1" ).tqarg( kapp->aboutData()->programName() ), + TQString(), kapp->miniIcon() ); ( void )new TQLabel( i18n( "The image %1 which you have modified has changed on disk.\n" "Do you want to reload the file and lose your changes?\n" "If you don't and subsequently save the image, you will lose the\n" - "changes that have already been saved." ).arg( url().fileName() ), vb ); + "changes that have already been saved." ).tqarg( url().fileName() ), vb ); TQWidget * hb = new TQWidget( vb ); - TQHBoxLayout * layout = new TQHBoxLayout( hb ); - layout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); + TQHBoxLayout * tqlayout = new TQHBoxLayout( hb ); + tqlayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); KPushButton * yes = new KPushButton( i18n("Reload"), hb ); - layout->addWidget( yes ); - layout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); + tqlayout->addWidget( yes ); + tqlayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); KPushButton * no = new KPushButton( i18n("Do Not Reload"), hb ); - layout->addWidget( no ); - layout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); + tqlayout->addWidget( no ); + tqlayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); connect( yes, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotReloadUnmodified() ) ); connect( yes, TQT_SIGNAL( clicked() ), pop, TQT_SLOT( hide() ) ); connect( no, TQT_SIGNAL( clicked() ), pop, TQT_SLOT( hide() ) ); diff --git a/kview/kviewviewer/kviewviewer.h b/kview/kviewviewer/kviewviewer.h index 0dc5d6a3..1d79696e 100644 --- a/kview/kviewviewer/kviewviewer.h +++ b/kview/kviewviewer/kviewviewer.h @@ -45,11 +45,12 @@ class TQCache; class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIface { Q_OBJECT + TQ_OBJECT friend class KViewKonqExtension; public: - KViewViewer( TQWidget * parentWidget, const char * widgetName, - TQObject * parent, const char * name, const TQStringList & ); + KViewViewer( TQWidget * tqparentWidget, const char * widgetName, + TQObject * tqparent, const char * name, const TQStringList & ); virtual ~KViewViewer(); KImageViewer::Canvas * canvas() const { return m_pCanvas; } diff --git a/kview/kviewviewer/printimagesettings.ui b/kview/kviewviewer/printimagesettings.ui index 4944ef3c..3c5418af 100644 --- a/kview/kviewviewer/printimagesettings.ui +++ b/kview/kviewviewer/printimagesettings.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>PrintImageSettings</class> <author>Matthias Kretz <kretz@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PrintImageSettings</cstring> </property> @@ -23,9 +23,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> @@ -37,9 +37,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> @@ -48,7 +48,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -59,7 +59,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton1</cstring> </property> @@ -67,7 +67,7 @@ <string>Fit to page size</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton2</cstring> </property> @@ -75,7 +75,7 @@ <string>9x13</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton3</cstring> </property> @@ -83,7 +83,7 @@ <string>10x15</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton4</cstring> </property> @@ -91,9 +91,9 @@ <string>Manual</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -104,7 +104,7 @@ <cstring>kIntSpinBox1</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -129,7 +129,7 @@ </widget> </vbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkBox1</cstring> </property> @@ -149,7 +149,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>0</height> @@ -168,7 +168,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>0</height> @@ -180,10 +180,10 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> - <includehint>qwidget.h</includehint> + <includehint>tqwidget.h</includehint> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> </includehints> diff --git a/kview/kviewviewer/test/test.h b/kview/kviewviewer/test/test.h index 82777090..c97a8951 100644 --- a/kview/kviewviewer/test/test.h +++ b/kview/kviewviewer/test/test.h @@ -13,6 +13,7 @@ namespace KParts { class ReadWritePart; } class Test : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: Test(); virtual ~Test(); diff --git a/kview/modules/browser/kviewbrowser.cpp b/kview/modules/browser/kviewbrowser.cpp index 936061eb..ef4d091a 100644 --- a/kview/modules/browser/kviewbrowser.cpp +++ b/kview/modules/browser/kviewbrowser.cpp @@ -36,13 +36,13 @@ typedef KGenericFactory<KViewBrowser> KViewBrowserFactory; K_EXPORT_COMPONENT_FACTORY( kview_browserplugin, KViewBrowserFactory( "kviewbrowserplugin" ) ) -KViewBrowser::KViewBrowser( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewBrowser::KViewBrowser( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) , m_pDirLister( 0 ) , m_pFileItemList( 0 ) , m_bShowCurrent( false ) { - m_pViewer = static_cast<KImageViewer::Viewer *>( parent ); + m_pViewer = static_cast<KImageViewer::Viewer *>( tqparent ); if( m_pViewer ) { m_paBack = KStdAction::back ( this, TQT_SLOT( slotBack() ), actionCollection(), "previous_image" ); @@ -163,7 +163,7 @@ void KViewBrowser::setupDirLister() { TQApplication::setOverrideCursor( WaitCursor ); TQString url = m_pViewer->url().prettyURL(); - int pos = url.findRev( "/" ); + int pos = url.tqfindRev( "/" ); url = url.left( (unsigned int)pos ); kdDebug( 4630 ) << "open KDirLister for " << url << endl; m_pDirLister->openURL( KURL( url )); diff --git a/kview/modules/browser/kviewbrowser.h b/kview/modules/browser/kviewbrowser.h index 96e8b17f..ecae29f3 100644 --- a/kview/modules/browser/kviewbrowser.h +++ b/kview/modules/browser/kviewbrowser.h @@ -33,8 +33,9 @@ class KMyFileItemList; class KViewBrowser : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewBrowser( TQObject* parent, const char* name, const TQStringList & ); + KViewBrowser( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewBrowser(); private slots: diff --git a/kview/modules/effects/kvieweffects.cpp b/kview/modules/effects/kvieweffects.cpp index a2e57327..c1ac49c2 100644 --- a/kview/modules/effects/kvieweffects.cpp +++ b/kview/modules/effects/kvieweffects.cpp @@ -24,15 +24,15 @@ typedef KGenericFactory<KViewEffects> KViewEffectsFactory; K_EXPORT_COMPONENT_FACTORY( kview_effectsplugin, KViewEffectsFactory( "kvieweffectsplugin" ) ) -KViewEffects::KViewEffects( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewEffects::KViewEffects( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) , m_gamma( 0.5 ), m_lastgamma( -1.0 ) , m_opacity( 50 ), m_lastopacity( -1 ) , m_intensity( 50 ), m_lastintensity( -1 ) , m_color( white ) , m_image( 0 ) { - TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) diff --git a/kview/modules/effects/kvieweffects.h b/kview/modules/effects/kvieweffects.h index 821b99c8..43c1b16d 100644 --- a/kview/modules/effects/kvieweffects.h +++ b/kview/modules/effects/kvieweffects.h @@ -13,8 +13,9 @@ namespace KImageViewer { class Viewer; } class KViewEffects : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewEffects( TQObject* parent, const char* name, const TQStringList & ); + KViewEffects( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewEffects(); private slots: diff --git a/kview/modules/presenter/config/kviewpresenterconfig.cpp b/kview/modules/presenter/config/kviewpresenterconfig.cpp index e44889ed..edcf157d 100644 --- a/kview/modules/presenter/config/kviewpresenterconfig.cpp +++ b/kview/modules/presenter/config/kviewpresenterconfig.cpp @@ -31,11 +31,11 @@ typedef KGenericFactory<KViewPresenterConfig, TQWidget> KViewPresenterConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kviewpresenterconfig, KViewPresenterConfigFactory( "kcm_kviewpresenterconfig" ) ) -KViewPresenterConfig::KViewPresenterConfig( TQWidget * parent, const char *, const TQStringList & args ) - : KCModule( KViewPresenterConfigFactory::instance(), parent, args ) +KViewPresenterConfig::KViewPresenterConfig( TQWidget * tqparent, const char *, const TQStringList & args ) + : KCModule( KViewPresenterConfigFactory::instance(), tqparent, args ) { - TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - layout->setAutoAdd( true ); + TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + tqlayout->setAutoAdd( true ); m_pCheckBox = new TQCheckBox( "This is only for testing...", this ); connect( m_pCheckBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( checkChanged() ) ); diff --git a/kview/modules/presenter/config/kviewpresenterconfig.h b/kview/modules/presenter/config/kviewpresenterconfig.h index ae257cea..d07c1506 100644 --- a/kview/modules/presenter/config/kviewpresenterconfig.h +++ b/kview/modules/presenter/config/kviewpresenterconfig.h @@ -26,8 +26,9 @@ class TQCheckBox; class KViewPresenterConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - KViewPresenterConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() ); + KViewPresenterConfig( TQWidget * tqparent, const char * name = 0, const TQStringList & args = TQStringList() ); ~KViewPresenterConfig(); virtual void load(); diff --git a/kview/modules/presenter/imagelistdialog.ui b/kview/modules/presenter/imagelistdialog.ui index 66d9e9b5..2bc7206a 100644 --- a/kview/modules/presenter/imagelistdialog.ui +++ b/kview/modules/presenter/imagelistdialog.ui @@ -60,7 +60,7 @@ <property name="name"> <cstring>m_pListView</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>400</width> <height>0</height> @@ -79,7 +79,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -87,7 +87,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout2</cstring> </property> @@ -140,7 +140,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -188,7 +188,7 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>80</height> @@ -206,7 +206,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -259,7 +259,7 @@ <include location="global" impldecl="in implementation">kio/netaccess.h</include> <include location="global" impldecl="in implementation">kurl.h</include> <include location="global" impldecl="in implementation">kfiledialog.h</include> - <include location="global" impldecl="in implementation">qstring.h</include> + <include location="global" impldecl="in implementation">tqstring.h</include> <include location="global" impldecl="in implementation">kmessagebox.h</include> <include location="local" impldecl="in implementation">imagelistitem.h</include> <include location="local" impldecl="in implementation">imagelistdialog.ui.h</include> @@ -267,12 +267,12 @@ <forwards> <forward>class KURL</forward> </forwards> -<slots> +<Q_SLOTS> <slot access="private" specifier="non virtual">init()</slot> <slot specifier="non virtual">noSort()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kdialog.h</includehint> <includehint>klistview.h</includehint> diff --git a/kview/modules/presenter/imagelistdialog.ui.h b/kview/modules/presenter/imagelistdialog.ui.h index ce97754e..5c391549 100644 --- a/kview/modules/presenter/imagelistdialog.ui.h +++ b/kview/modules/presenter/imagelistdialog.ui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ui.h extension file, included from the uic-generated form implementation. ** -** If you wish to add, delete or rename slots use Qt Designer which will +** If you wish to add, delete or rename slots use TQt Designer which will ** update this file, preserving your code. Create an init() slot in place of ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ diff --git a/kview/modules/presenter/imagelistitem.cpp b/kview/modules/presenter/imagelistitem.cpp index 547de656..b31c65b2 100644 --- a/kview/modules/presenter/imagelistitem.cpp +++ b/kview/modules/presenter/imagelistitem.cpp @@ -24,10 +24,10 @@ #include <klistview.h> -ImageListItem::ImageListItem( KListView * parent, const KURL & url ) - : KListViewItem( parent, parent->lastItem(), url.prettyURL() ) +ImageListItem::ImageListItem( KListView * tqparent, const KURL & url ) + : KListViewItem( tqparent, tqparent->lastItem(), url.prettyURL() ) , m_pImage( 0 ) - , m_filename( TQString::null ) + , m_filename( TQString() ) , m_url( url ) { setDragEnabled( true ); @@ -41,11 +41,11 @@ ImageListItem::ImageListItem( KListView * parent, const KURL & url ) /* TQString extension; TQString fileName = m_url.fileName(); - int extensionPos = fileName.findRev( '.' ); + int extensionPos = fileName.tqfindRev( '.' ); if ( extensionPos != -1 ) extension = fileName.mid( extensionPos ); // keep the '.' delete m_pTempFile; - m_pTempFile = new KTempFile( TQString::null, extension ); + m_pTempFile = new KTempFile( TQString(), extension ); m_filename = m_pTempFile->name(); m_pJob = KIO::get( m_url, m_pExtension->urlArgs().reload, false ); @@ -70,7 +70,7 @@ const TQImage * ImageListItem::image() const const TQString & ImageListItem::file() const { if( m_url.isLocalFile() ) - return TQString::null; + return TQString(); return m_filename; } diff --git a/kview/modules/presenter/imagelistitem.h b/kview/modules/presenter/imagelistitem.h index ee143a90..e54f84a4 100644 --- a/kview/modules/presenter/imagelistitem.h +++ b/kview/modules/presenter/imagelistitem.h @@ -30,7 +30,7 @@ class TQImage; class ImageListItem : public KListViewItem { public: - ImageListItem( KListView * parent, const KURL & url ); + ImageListItem( KListView * tqparent, const KURL & url ); ~ImageListItem(); const TQImage * image() const; diff --git a/kview/modules/presenter/kviewpresenter.cpp b/kview/modules/presenter/kviewpresenter.cpp index 3cf54d15..d85748c1 100644 --- a/kview/modules/presenter/kviewpresenter.cpp +++ b/kview/modules/presenter/kviewpresenter.cpp @@ -51,8 +51,8 @@ typedef KGenericFactory<KViewPresenter> KViewPresenterFactory; K_EXPORT_COMPONENT_FACTORY( kview_presenterplugin, KViewPresenterFactory( "kviewpresenterplugin" ) ) -KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewPresenter::KViewPresenter( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) , m_pImageList( new ImageListDialog() ) , m_paFileOpen( 0 ) , m_bDontAdd( false ) @@ -62,7 +62,7 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri kdDebug( 4630 ) << k_funcinfo << endl; m_imagelist.setAutoDelete( true ); - TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) @@ -82,17 +82,17 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ), m_paSlideshow, TQT_SLOT( setChecked( bool ) ) ); // search for file_open action - KXMLGUIClient * parentClient = static_cast<KXMLGUIClient*>( parent->qt_cast( "KXMLGUIClient" ) ); - if( parentClient ) + KXMLGUIClient * tqparentClient = static_cast<KXMLGUIClient*>( tqparent->qt_cast( "KXMLGUIClient" ) ); + if( tqparentClient ) { - m_paFileOpen = parentClient->actionCollection()->action( "file_open" ); - m_paFileClose = parentClient->actionCollection()->action( "file_close" ); + m_paFileOpen = tqparentClient->actionCollection()->action( "file_open" ); + m_paFileClose = tqparentClient->actionCollection()->action( "file_close" ); } if( m_paFileClose ) connect( m_paFileClose, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotClose() ) ); if( m_paFileOpen ) { - disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), parent, TQT_SLOT( slotOpenFile() ) ); + disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), tqparent, TQT_SLOT( slotOpenFile() ) ); connect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) ); } else @@ -150,18 +150,18 @@ KViewPresenter::~KViewPresenter() if( m_paFileOpen ) { disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) ); - // If the parent() doesn't exist we either leave the "File Open" action + // If the tqparent() doesn't exist we either leave the "File Open" action // in an unusable state or KView was just shutting down and therefor we // can ignore this. I've only seen the second one happening and to get - // rid of the TQObject::connect warning we do the parent() check. - if( parent() ) - connect( m_paFileOpen, TQT_SIGNAL( activated() ), parent(), TQT_SLOT( slotOpenFile() ) ); + // rid of the TQObject::connect warning we do the tqparent() check. + if( tqparent() ) + connect( m_paFileOpen, TQT_SIGNAL( activated() ), tqparent(), TQT_SLOT( slotOpenFile() ) ); } } bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev ) { - if( obj == m_pImageList || obj == m_pImageList->m_pListView || obj == m_pImageList->m_pListView->viewport() || obj == m_pViewer->widget() ) + if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList->m_pListView) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList->m_pListView->viewport()) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pViewer->widget()) ) { switch( ev->type() ) { @@ -191,7 +191,7 @@ bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev ) for( TQStringList::const_iterator it = l.begin(); it != l.end(); ++it ) { ImageInfo * info = new ImageInfo( KURL( *it ) ); - if( ! m_imagelist.contains( info ) ) + if( ! m_imagelist.tqcontains( info ) ) { m_imagelist.inSort( info ); ( void )new ImageListItem( m_pImageList->m_pListView, KURL( *it ) ); @@ -218,7 +218,7 @@ void KViewPresenter::slotImageOpened( const KURL & url ) { kdDebug( 4630 ) << k_funcinfo << "imagelist:" << endl; ImageInfo * info = new ImageInfo( url ); - if( ! m_imagelist.contains( info ) ) + if( ! m_imagelist.tqcontains( info ) ) { m_imagelist.inSort( info ); TQListViewItem * item = new ImageListItem( m_pImageList->m_pListView, url ); @@ -248,7 +248,7 @@ void KViewPresenter::slotOpenFiles() for( ++it; it != urls.end(); ++it ) { ImageInfo * info = new ImageInfo( *it ); - if( ! m_imagelist.contains( info ) ) + if( ! m_imagelist.tqcontains( info ) ) { m_imagelist.inSort( info ); ( void )new ImageListItem( m_pImageList->m_pListView, *it ); @@ -405,14 +405,14 @@ void KViewPresenter::closeAll() void KViewPresenter::loadList() { - KURL url = KFileDialog::getOpenURL( ":load_list", TQString::null, m_pImageList ); + KURL url = KFileDialog::getOpenURL( ":load_list", TQString(), m_pImageList ); if( url.isEmpty() ) return; TQString tempfile; if( ! KIO::NetAccess::download( url, tempfile, m_pViewer->widget() ) ) { - KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).arg( url.prettyURL() ) ); + KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).tqarg( url.prettyURL() ) ); return; } TQFile file( tempfile ); @@ -431,7 +431,7 @@ void KViewPresenter::loadList() { KURL url ( t.readLine() ); ImageInfo * info = new ImageInfo( url ); - if( ! m_imagelist.contains( info ) ) + if( ! m_imagelist.tqcontains( info ) ) { m_imagelist.inSort( info ); ( void )new ImageListItem( m_pImageList->m_pListView, url ); @@ -442,7 +442,7 @@ void KViewPresenter::loadList() } else { - KMessageBox::error( m_pImageList, i18n( "Wrong format\n%1" ).arg( url.prettyURL() ) ); + KMessageBox::error( m_pImageList, i18n( "Wrong format\n%1" ).tqarg( url.prettyURL() ) ); } file.close(); } @@ -451,7 +451,7 @@ void KViewPresenter::loadList() void KViewPresenter::saveList() { - KURL url = KFileDialog::getSaveURL( ":save_list", TQString::null, m_pImageList ); + KURL url = KFileDialog::getSaveURL( ":save_list", TQString(), m_pImageList ); if( url.isEmpty() ) return; diff --git a/kview/modules/presenter/kviewpresenter.h b/kview/modules/presenter/kviewpresenter.h index e607f92b..ba3198b2 100644 --- a/kview/modules/presenter/kviewpresenter.h +++ b/kview/modules/presenter/kviewpresenter.h @@ -38,8 +38,9 @@ class KAction; class KViewPresenter : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewPresenter( TQObject* parent, const char* name, const TQStringList & ); + KViewPresenter( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewPresenter(); protected: diff --git a/kview/modules/presenter/kviewpresenterconfmodule.cpp b/kview/modules/presenter/kviewpresenterconfmodule.cpp index 1c79ee15..ef051c28 100644 --- a/kview/modules/presenter/kviewpresenterconfmodule.cpp +++ b/kview/modules/presenter/kviewpresenterconfmodule.cpp @@ -29,8 +29,8 @@ #include <kglobal.h> #include <kconfig.h> -KViewPresenterConfModule::KViewPresenterConfModule( TQObject * parent ) - : KPreferencesModule( "kviewpresenter", parent, "KView Presenter Config Module" ) +KViewPresenterConfModule::KViewPresenterConfModule( TQObject * tqparent ) + : KPreferencesModule( "kviewpresenter", tqparent, "KView Presenter Config Module" ) { } @@ -49,8 +49,8 @@ void KViewPresenterConfModule::reset() void KViewPresenterConfModule::createPage( TQFrame * page ) { - TQBoxLayout * layout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); - layout->setAutoAdd( true ); + TQBoxLayout * tqlayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); + tqlayout->setAutoAdd( true ); m_pCheckBox = new TQCheckBox( "This is only for testing...", page ); } diff --git a/kview/modules/presenter/kviewpresenterconfmodule.h b/kview/modules/presenter/kviewpresenterconfmodule.h index 6e3dcb46..8ecaa345 100644 --- a/kview/modules/presenter/kviewpresenterconfmodule.h +++ b/kview/modules/presenter/kviewpresenterconfmodule.h @@ -28,8 +28,9 @@ class TQCheckBox; class KViewPresenterConfModule : public KPreferencesModule { Q_OBJECT + TQ_OBJECT public: - KViewPresenterConfModule( TQObject * parent ); + KViewPresenterConfModule( TQObject * tqparent ); ~KViewPresenterConfModule(); signals: diff --git a/kview/modules/scale/kfloatspinbox.cpp b/kview/modules/scale/kfloatspinbox.cpp index 936713f6..428dc2ee 100644 --- a/kview/modules/scale/kfloatspinbox.cpp +++ b/kview/modules/scale/kfloatspinbox.cpp @@ -20,7 +20,7 @@ #include "kfloatspinbox.h" -#if defined(QT_ACCESSIBILITY_SUPPORT) +#if defined(TQT_ACCESSIBILITY_SUPPORT) #include <tqaccessible.h> #endif @@ -37,8 +37,8 @@ int pow( int a, int b ) return ret; } -KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent, const char * name ) - : TQSpinBox( parent, name ) +KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * tqparent, const char * name ) + : TQSpinBox( tqparent, name ) , m_doselection( true ) { setRange( minValue, maxValue, step, precision ); @@ -102,7 +102,7 @@ void KFloatSpinBox::valueChange() { updateDisplay(); emit valueChanged( value() ); -#if defined(QT_ACCESSIBILITY_SUPPORT) +#if defined(TQT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::ValueChanged ); #endif } diff --git a/kview/modules/scale/kfloatspinbox.h b/kview/modules/scale/kfloatspinbox.h index 6424df38..572fc952 100644 --- a/kview/modules/scale/kfloatspinbox.h +++ b/kview/modules/scale/kfloatspinbox.h @@ -23,11 +23,12 @@ #include <tqspinbox.h> -class KFloatSpinBox : public QSpinBox +class KFloatSpinBox : public TQSpinBox { Q_OBJECT + TQ_OBJECT public: - KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent = 0, const char * name = 0 ); + KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * tqparent = 0, const char * name = 0 ); virtual ~KFloatSpinBox(); void setRange( float minValue, float maxValue, float step, unsigned int precision ); diff --git a/kview/modules/scale/kview_scale.cpp b/kview/modules/scale/kview_scale.cpp index 29e71b13..39cf9e37 100644 --- a/kview/modules/scale/kview_scale.cpp +++ b/kview/modules/scale/kview_scale.cpp @@ -35,12 +35,12 @@ typedef KGenericFactory<KViewScale> KViewScaleFactory; K_EXPORT_COMPONENT_FACTORY( kview_scale, KViewScaleFactory( "kview_scale" ) ) -KViewScale::KViewScale( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewScale::KViewScale( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) , m_pViewer( 0 ) , m_pCanvas( 0 ) { - m_pViewer = static_cast<KImageViewer::Viewer *>( parent ); + m_pViewer = static_cast<KImageViewer::Viewer *>( tqparent ); if( m_pViewer ) { kdDebug( 4630 ) << "m_pViewer->canvas() = " << m_pViewer->canvas() << endl; @@ -64,9 +64,9 @@ void KViewScale::slotScaleDlg() KDialogBase dlg( m_pViewer->widget(), "KView scale dialog", true, i18n( "Scale Image" ), KDialogBase::Ok|KDialogBase::Cancel ); ScaleDlg widget( m_pCanvas->imageSize(), dlg.makeVBoxMainWidget() ); #if 0 - TQVBox * layout = dlg.makeVBoxMainWidget(); + TQVBox * tqlayout = dlg.makeVBoxMainWidget(); - TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), layout ); + TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), tqlayout ); TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1, 0, KDialog::spacingHint() ); pixelgroupgrid->setSpacing( KDialog::spacingHint() ); pixelgroupgrid->setMargin( KDialog::marginHint() ); @@ -75,21 +75,21 @@ void KViewScale::slotScaleDlg() // show original width label = new TQLabel( i18n( "Original width:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 0, 0 ); pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.width() ), pixelgroup ), 0, 1 ); label = new TQLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 1, 0 ); pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.height() ), pixelgroup ), 1, 1 ); pixelgroupgrid->addRowSpacing( 2, KDialog::spacingHint() ); label = new TQLabel( i18n( "New width:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 3, 0 ); label = new TQLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 4, 0 ); TQSpinBox * newwidth = new TQSpinBox( 1, 100000, 1, pixelgroup ); pixelgroupgrid->addWidget( newwidth, 3, 1 ); @@ -98,15 +98,15 @@ void KViewScale::slotScaleDlg() KComboBox * newsizeunit = new KComboBox( pixelgroup ); newsizeunit->insertItem( i18n( "px" ) ); newsizeunit->insertItem( i18n( "%" ) ); - pixelgroupgrid->addMultiCellWidget( newsizeunit, 3, 4, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( newsizeunit, 3, 4, 2, 2, TQt::AlignVCenter ); pixelgroupgrid->addRowSpacing( 5, KDialog::spacingHint() ); label = new TQLabel( i18n( "Ratio X:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 6, 0 ); label = new TQLabel( i18n( "Y:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 7, 0 ); TQSpinBox * ratiox = new TQSpinBox( pixelgroup ); ratiox->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratiox ) ); @@ -114,18 +114,18 @@ void KViewScale::slotScaleDlg() TQSpinBox * ratioy = new TQSpinBox( pixelgroup ); ratioy->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratioy ) ); pixelgroupgrid->addWidget( ratioy, 7, 1 ); - pixelgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, TQt::AlignVCenter ); - TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), layout ); + TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), tqlayout ); TQGridLayout * printgroupgrid = new TQGridLayout( printgroup, 1, 1, 0, KDialog::spacingHint() ); printgroupgrid->setSpacing( KDialog::spacingHint() ); printgroupgrid->setMargin( KDialog::marginHint() ); label = new TQLabel( i18n( "New width:" ), printgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 0, 0 ); label = new TQLabel( i18n( "Height:" ), printgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 1, 0 ); TQSpinBox * newwidth2 = new TQSpinBox( printgroup ); printgroupgrid->addWidget( newwidth2, 0, 1 ); @@ -134,25 +134,25 @@ void KViewScale::slotScaleDlg() KComboBox * newsizeunit2 = new KComboBox( printgroup ); newsizeunit2->insertItem( i18n( "in" ) ); newsizeunit2->insertItem( i18n( "mm" ) ); - printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, TQt::AlignVCenter ); printgroupgrid->addRowSpacing( 2, KDialog::spacingHint() ); label = new TQLabel( i18n( "Resolution X:" ), printgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 3, 0 ); label = new TQLabel( i18n( "Y:" ), printgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 4, 0 ); TQSpinBox * resx = new TQSpinBox( printgroup ); printgroupgrid->addWidget( resx, 3, 1 ); TQSpinBox * resy = new TQSpinBox( printgroup ); printgroupgrid->addWidget( resy, 4, 1 ); - printgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, TQt::AlignVCenter ); //KComboBox * newsizeunit2 = new KComboBox( printgroup ); //newsizeunit2->insertItem( i18n( "in" ) ); //newsizeunit2->insertItem( i18n( "mm" ) ); - //printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, Qt::AlignVCenter ); + //printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, TQt::AlignVCenter ); #endif dlg.exec(); diff --git a/kview/modules/scale/kview_scale.h b/kview/modules/scale/kview_scale.h index 3ac45257..99417425 100644 --- a/kview/modules/scale/kview_scale.h +++ b/kview/modules/scale/kview_scale.h @@ -31,8 +31,9 @@ namespace KImageViewer { class KViewScale : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewScale( TQObject* parent, const char* name, const TQStringList & ); + KViewScale( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewScale(); private slots: diff --git a/kview/modules/scale/scaledlg.cpp b/kview/modules/scale/scaledlg.cpp index 929aafcd..8483f763 100644 --- a/kview/modules/scale/scaledlg.cpp +++ b/kview/modules/scale/scaledlg.cpp @@ -37,8 +37,8 @@ #define ONEINCHINMM 2.54 -ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name ) - : TQObject( parent, name ) +ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * tqparent, const char * name ) + : TQObject( tqparent, name ) , m_origsize( origsize ) , m_newsizeunit( 0 ) , m_newsizeunit2( 0 ) @@ -48,8 +48,8 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name , m_resx( 72 ) , m_resy( 72 ) { - TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), parent ); - TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), parent ); + TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), tqparent ); + TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), tqparent ); TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); @@ -61,53 +61,53 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name pixelgroupgrid->addRowSpacing( 0, KDialog::spacingHint() ); label = new TQLabel( i18n( "Original width:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 1, 0 ); label = new TQLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 2, 0 ); pixelgroupgrid->addRowSpacing( 3, KDialog::spacingHint() ); label = new TQLabel( i18n( "New width:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 4, 0 ); label = new TQLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 5, 0 ); pixelgroupgrid->addRowSpacing( 6, KDialog::spacingHint() ); label = new TQLabel( i18n( "Ratio X:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 7, 0 ); label = new TQLabel( i18n( "Y:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 8, 0 ); printgroupgrid->addRowSpacing( 0, KDialog::spacingHint() ); label = new TQLabel( i18n( "New width:" ), printgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 1, 0 ); label = new TQLabel( i18n( "Height:" ), printgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 2, 0 ); printgroupgrid->addRowSpacing( 3, KDialog::spacingHint() ); label = new TQLabel( i18n( "Resolution X:" ), printgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 4, 0 ); label = new TQLabel( i18n( "Y:" ), printgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 5, 0 ); m_pOldWidth = new TQLabel( TQString::number( origsize.width() ), pixelgroup ); - m_pOldWidth->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + m_pOldWidth->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( m_pOldWidth, 1, 1 ); m_pOldHeight = new TQLabel( TQString::number( origsize.height() ), pixelgroup ); - m_pOldHeight->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + m_pOldHeight->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( m_pOldHeight, 2, 1 ); m_pNewWidth = new KFloatSpinBox( 1.0, 100000.0, 10.0, 0, pixelgroup ); @@ -118,7 +118,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name m_pNewSizeUnit = new KComboBox( pixelgroup ); m_pNewSizeUnit->insertItem( i18n( "px" ) ); m_pNewSizeUnit->insertItem( i18n( "%" ) ); - pixelgroupgrid->addMultiCellWidget( m_pNewSizeUnit, 4, 5, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( m_pNewSizeUnit, 4, 5, 2, 2, TQt::AlignVCenter ); m_pRatioX = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, pixelgroup ); pixelgroupgrid->addWidget( m_pRatioX, 7, 1 ); @@ -126,7 +126,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name pixelgroupgrid->addWidget( m_pRatioY, 8, 1 ); m_pLinkRatio = new TQCheckBox( i18n( "Link" ), pixelgroup ); - pixelgroupgrid->addMultiCellWidget( m_pLinkRatio, 7, 8, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( m_pLinkRatio, 7, 8, 2, 2, TQt::AlignVCenter ); m_pNewWidth2 = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, printgroup ); printgroupgrid->addWidget( m_pNewWidth2, 1, 1 ); @@ -136,7 +136,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name m_pNewSizeUnit2 = new KComboBox( printgroup ); m_pNewSizeUnit2->insertItem( i18n( "in" ) ); m_pNewSizeUnit2->insertItem( i18n( "mm" ) ); - printgroupgrid->addMultiCellWidget( m_pNewSizeUnit2, 1, 2, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( m_pNewSizeUnit2, 1, 2, 2, 2, TQt::AlignVCenter ); m_pResolutionX = new KFloatSpinBox( 0.0001, 6000.0, 1.0, 4, printgroup ); printgroupgrid->addWidget( m_pResolutionX, 4, 1 ); @@ -144,11 +144,11 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name printgroupgrid->addWidget( m_pResolutionY, 5, 1 ); m_pLinkResolution = new TQCheckBox( i18n( "Link" ), printgroup ); - printgroupgrid->addMultiCellWidget( m_pLinkResolution, 4, 5, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( m_pLinkResolution, 4, 5, 2, 2, TQt::AlignVCenter ); m_pResolutionUnit = new KComboBox( printgroup ); m_pResolutionUnit->insertItem( i18n( "pixels/in" ) ); m_pResolutionUnit->insertItem( i18n( "pixels/mm" ) ); - printgroupgrid->addMultiCellWidget( m_pResolutionUnit, 6, 6, 1, 2, Qt::AlignLeft ); + printgroupgrid->addMultiCellWidget( m_pResolutionUnit, 6, 6, 1, 2, TQt::AlignLeft ); m_pNewWidth->setValue( m_origsize.width() ); m_pNewHeight->setValue( m_origsize.height() ); diff --git a/kview/modules/scale/scaledlg.h b/kview/modules/scale/scaledlg.h index 71fa23d5..9c039d8c 100644 --- a/kview/modules/scale/scaledlg.h +++ b/kview/modules/scale/scaledlg.h @@ -30,11 +30,12 @@ class TQCheckBox; class TQVBox; class TQSize; -class ScaleDlg : public QObject +class ScaleDlg : public TQObject { Q_OBJECT + TQ_OBJECT public: - ScaleDlg( const TQSize & originalsize, TQVBox * parent, const char * name = 0 ); + ScaleDlg( const TQSize & originalsize, TQVBox * tqparent, const char * name = 0 ); ~ScaleDlg(); private slots: diff --git a/kview/modules/scanner/kviewscanner.cpp b/kview/modules/scanner/kviewscanner.cpp index bf99e282..9f8b370c 100644 --- a/kview/modules/scanner/kviewscanner.cpp +++ b/kview/modules/scanner/kviewscanner.cpp @@ -35,13 +35,13 @@ typedef KGenericFactory<KViewScanner> KViewScannerFactory; K_EXPORT_COMPONENT_FACTORY( kview_scannerplugin, KViewScannerFactory( "kviewscannerplugin" ) ) -KViewScanner::KViewScanner( TQObject* parent, const char* name, +KViewScanner::KViewScanner( TQObject* tqparent, const char* name, const TQStringList & ) - : Plugin( parent, name ), + : Plugin( tqparent, name ), m_pScandlg( 0 ), m_pViewer( 0 ) { - TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) diff --git a/kview/modules/scanner/kviewscanner.h b/kview/modules/scanner/kviewscanner.h index 56b59472..2c5abc77 100644 --- a/kview/modules/scanner/kviewscanner.h +++ b/kview/modules/scanner/kviewscanner.h @@ -31,8 +31,9 @@ namespace KImageViewer { class Viewer; } class KViewScanner : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewScanner( TQObject* parent, const char* name, const TQStringList & ); + KViewScanner( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewScanner(); //public slots: diff --git a/kview/modules/template/kviewtemplate.cpp b/kview/modules/template/kviewtemplate.cpp index f8277162..54869912 100644 --- a/kview/modules/template/kviewtemplate.cpp +++ b/kview/modules/template/kviewtemplate.cpp @@ -15,10 +15,10 @@ typedef KGenericFactory<KViewTemplate> KViewTemplateFactory; K_EXPORT_COMPONENT_FACTORY( kview_templateplugin, KViewTemplateFactory( "kviewtemplateplugin" ) ) -KViewTemplate::KViewTemplate( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewTemplate::KViewTemplate( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) { - TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) diff --git a/kview/modules/template/kviewtemplate.h b/kview/modules/template/kviewtemplate.h index 5d49890e..03470b3d 100644 --- a/kview/modules/template/kviewtemplate.h +++ b/kview/modules/template/kviewtemplate.h @@ -12,8 +12,9 @@ namespace KImageViewer { class Viewer; } class KViewTemplate : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewTemplate( TQObject* parent, const char* name, const TQStringList & ); + KViewTemplate( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewTemplate(); private slots: diff --git a/kview/photobook/photobook.cpp b/kview/photobook/photobook.cpp index 2558279a..ce6c5d1e 100644 --- a/kview/photobook/photobook.cpp +++ b/kview/photobook/photobook.cpp @@ -4,7 +4,7 @@ Copyright (c) 2004,2005 Charles Samuels <charles@kde.org> This file is hereby licensed under the GNU General Public License version 2 or later at your option. - This file is licensed under the Qt Public License version 1 with the + This file is licensed under the TQt Public License version 1 with the condition that the licensed will be governed under the Laws of California (USA) instead of Norway. Disputes will be settled in Santa Clara county courts. @@ -44,10 +44,10 @@ Copyright (c) 2004,2005 Charles Samuels <charles@kde.org> #include <kstdaccel.h> #include <kstandarddirs.h> -Previews::Previews(PhotoBook *parent, const TQStringList &mimetypes) - : KFileIconView(parent, 0) +Previews::Previews(PhotoBook *tqparent, const TQStringList &mimetypes) + : KFileIconView(tqparent, 0) { - mPhotoBook = parent; + mPhotoBook = tqparent; mMimeTypes = mimetypes; connect(&mDirLister, TQT_SIGNAL(clear()), TQT_SLOT(slotClearView())); @@ -149,15 +149,15 @@ void Previews::goToFirst() -PhotoBook::PhotoBook(TQWidget *parent, PhotoBookPart *part, const char *name) - : TQSplitter(parent, name) +PhotoBook::PhotoBook(TQWidget *tqparent, PhotoBookPart *part, const char *name) + : TQSplitter(tqparent, name) { TQStringList mimetypes; KTrader::OfferList offers = KTrader::self()->query( "KImageViewer/Viewer", "KParts/ReadOnlyPart", - "DesktopEntryName == 'kviewviewer'", TQString::null + "DesktopEntryName == 'kviewviewer'", TQString() ); for ( @@ -167,7 +167,7 @@ PhotoBook::PhotoBook(TQWidget *parent, PhotoBookPart *part, const char *name) { KService::Ptr service = *i; mViewer = KParts::ComponentFactory:: - createPartInstanceFromService<KParts::ReadOnlyPart>( service, this, 0, this ); + createPartInstanceFromService<KParts::ReadOnlyPart>( service, this, 0, TQT_TQOBJECT(this) ); // is this the correct way to get the supported mimetypes? if (mViewer) @@ -220,24 +220,24 @@ void PhotoBook::updateButton( bool nextExist, bool previousExit) K_EXPORT_COMPONENT_FACTORY(libphotobook, PhotoBookFactory ) PhotoBookPart::PhotoBookPart( - TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, + TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList& ) - : KParts::ReadOnlyPart(parent, name) + : KParts::ReadOnlyPart(tqparent, name) { setInstance(PhotoBookFactory::instance()); new PhotoBookBrowserExtension(this); - bv = new PhotoBook(parentWidget, this, widgetName); + bv = new PhotoBook(tqparentWidget, this, widgetName); setWidget(bv); connect( bv, TQT_SIGNAL(emitUpdateButton(bool, bool)), this, TQT_SLOT(slotUpdateButton(bool, bool)) ); - m_pNextAction = KStdAction::next(bv, TQT_SLOT(next()), actionCollection(), "next"); - m_pPreviousAction = KStdAction::prior(bv, TQT_SLOT(previous()), actionCollection(), "previous"); + m_pNextAction = KStdAction::next(TQT_TQOBJECT(bv), TQT_SLOT(next()), actionCollection(), "next"); + m_pPreviousAction = KStdAction::prior(TQT_TQOBJECT(bv), TQT_SLOT(previous()), actionCollection(), "previous"); setXMLFile( "photobookui.rc" ); diff --git a/kview/photobook/photobook.h b/kview/photobook/photobook.h index adae0e23..51065027 100644 --- a/kview/photobook/photobook.h +++ b/kview/photobook/photobook.h @@ -4,7 +4,7 @@ Copyright (c) 2004 Charles Samuels <charles@kde.org> This file is hereby licensed under the GNU General Public License version 2 or later at your option. - This file is licensed under the Qt Public License version 1 with the + This file is licensed under the TQt Public License version 1 with the condition that the licensed will be governed under the Laws of California (USA) instead of Norway. Disputes will be settled in Santa Clara county courts. @@ -50,15 +50,15 @@ Copyright (c) 2004 Charles Samuels <charles@kde.org> class Previews; class PhotoBookPart; -class PhotoBook : public QSplitter +class PhotoBook : public TQSplitter { -Q_OBJECT +TQ_OBJECT Previews *mList; KAction *mFit; KParts::ReadOnlyPart *mViewer; public: - PhotoBook(TQWidget *parent, PhotoBookPart *part, const char *name=0); + PhotoBook(TQWidget *tqparent, PhotoBookPart *part, const char *name=0); void openURL(const KURL &url); void updateButton(bool, bool ); @@ -73,13 +73,14 @@ signals: class Previews : public KFileIconView { Q_OBJECT + TQ_OBJECT KDirLister mDirLister; PhotoBook *mPhotoBook; TQStringList mMimeTypes; public: - Previews(PhotoBook *parent, const TQStringList &mimetypes); + Previews(PhotoBook *tqparent, const TQStringList &mimetypes); ~Previews(); void openURL(const KURL &url); @@ -106,14 +107,15 @@ private slots: class PhotoBookPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT PhotoBook *bv; KAction *m_pPreviousAction; KAction *m_pNextAction; public: PhotoBookPart( - TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name=0, + TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name=0, const TQStringList& args = TQStringList() ); ~PhotoBookPart(); @@ -131,6 +133,7 @@ typedef KParts::GenericFactory<PhotoBookPart> PhotoBookFactory; class PhotoBookBrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: PhotoBookBrowserExtension(PhotoBookPart *p); }; diff --git a/kviewshell/anchor.h b/kviewshell/anchor.h index f3faf13e..cee42b31 100644 --- a/kviewshell/anchor.h +++ b/kviewshell/anchor.h @@ -20,7 +20,7 @@ This very simple class contains a page number and a vertical position in physical coordiantes. The vertical position is given by the distance from the top of the page. Anchors are completely independent -of documents, there is no need for a document to exists that contains +of documents, there is no need for a document to exists that tqcontains the given page, nor does the page number need to be valid. @author Stefan Kebekus <kebekus@kde.org> diff --git a/kviewshell/documentPageCache.cpp b/kviewshell/documentPageCache.cpp index b2322321..9fd55d59 100644 --- a/kviewshell/documentPageCache.cpp +++ b/kviewshell/documentPageCache.cpp @@ -119,7 +119,7 @@ bool DocumentPageCache::isPageCached(const PageNumber& pageNumber, const TQSize& // Check if the page that we are looking for is in the cache. // We are not accessing the page, so we don't want it to be moved into the front. - RenderedDocumentPagePixmap* page = LRUCache.find(key, false); + RenderedDocumentPagePixmap* page = LRUCache.tqfind(key, false); if (page) return true; @@ -191,7 +191,7 @@ RenderedDocumentPagePixmap* DocumentPageCache::getPage(const PageNumber& pageNr) // First check if the page that we are looking for is in the cache RenderedDocumentPagePixmap* page; - page = LRUCache.find(createKey(pageNr)); + page = LRUCache.tqfind(createKey(pageNr)); if (page) return page; @@ -220,7 +220,7 @@ RenderedDocumentPagePixmap* DocumentPageCache::getPage(const PageNumber& pageNr) // We always set the cache capacity to be at least n times the cost of the page we want to insert. // Where n is the number of pages that can be visible at the same time at very high zoomlevels. - // n depends on the layout mode. + // n depends on the tqlayout mode. // If these pages are not all in the cache, scrolling the view becomes very slow, because for each // paint event the pages need to be rerendered. // We set n for each viewmode differently so that the user is able to reduce memory consuption by @@ -237,7 +237,7 @@ RenderedDocumentPagePixmap* DocumentPageCache::getPage(const PageNumber& pageNr) default: n = 4; } - LRUCache.setMaxCost(QMAX(page->memory() * n, maxMemory)); + LRUCache.setMaxCost(TQMAX(page->memory() * n, maxMemory)); if (!LRUCache.insert(createKey(pageNr), page, page->memory())) { diff --git a/kviewshell/documentPageCache.h b/kviewshell/documentPageCache.h index 8477d152..35f8e084 100644 --- a/kviewshell/documentPageCache.h +++ b/kviewshell/documentPageCache.h @@ -24,9 +24,10 @@ class TQPixmap; class RenderedDocumentPage; -class DocumentPageCache: public QObject +class DocumentPageCache: public TQObject { Q_OBJECT + TQ_OBJECT public: DocumentPageCache(); @@ -113,7 +114,7 @@ class DocumentPageCache: public QObject private: /** The maximum of memory used by the cache. (32MB) TODO: make this configurable, or detact an appropriate value at startup. */ - Q_UINT32 maxMemory; + TQ_UINT32 maxMemory; /** This field contains resolution of the display device. In principle. In fact, kviewshell implements zooming by calling the diff --git a/kviewshell/documentRenderer.cpp b/kviewshell/documentRenderer.cpp index 34bf59ac..947bd10d 100644 --- a/kviewshell/documentRenderer.cpp +++ b/kviewshell/documentRenderer.cpp @@ -17,7 +17,7 @@ DocumentRenderer::DocumentRenderer(TQWidget* par) - : mutex(true), parentWidget(par), accessibilityBackground(false), + : mutex(true), tqparentWidget(par), accessibilityBackground(false), accessibilityBackgroundColor(TQColor(255,255,255)) { numPages = 0; @@ -122,7 +122,7 @@ Anchor DocumentRenderer::findAnchor(const TQString &locallink) // Wait for all access to this DocumentRenderer to finish TQMutexLocker locker(&mutex); - TQMap<TQString,Anchor>::Iterator it = anchorList.find(locallink); + TQMap<TQString,Anchor>::Iterator it = anchorList.tqfind(locallink); if (it != anchorList.end()) return *it; else diff --git a/kviewshell/documentRenderer.h b/kviewshell/documentRenderer.h index 9282d005..2329137a 100644 --- a/kviewshell/documentRenderer.h +++ b/kviewshell/documentRenderer.h @@ -48,13 +48,14 @@ thread-safe. @author Wilfried Huss, Stefan Kebekus */ -class DocumentRenderer : public QObject +class DocumentRenderer : public TQObject { Q_OBJECT + TQ_OBJECT public: /** \brief default constructor */ - DocumentRenderer(TQWidget* parent); + DocumentRenderer(TQWidget* tqparent); virtual ~DocumentRenderer(); @@ -151,7 +152,7 @@ public: virtual void clear(); - /* Returns true if the current document contains 0 pages. */ + /* Returns true if the current document tqcontains 0 pages. */ bool isEmpty() const {return numPages == 0;} /* Tells if the document was modified after is was loaded. */ @@ -261,7 +262,7 @@ public: display device. In principle. In fact, kviewshell implements zooming by using values that are not exactly the resolution of the display, but multiplied with the zoom factor. Bottom line: the - DocumentRenderer should act as if this field indeed contains + DocumentRenderer should act as if this field indeed tqcontains resolution of the display device. @param page pointer to a documentPage structure that this method @@ -361,7 +362,7 @@ signals: This signal can be emitted if the document or status of this class changed internally so that all associated widgets should be - repainted. This could be emitted, e.g. if pages are removed from a + tqrepainted. This could be emitted, e.g. if pages are removed from a document, or if some preferences change that have some direct influence on the way the document is rendered. @@ -400,7 +401,7 @@ protected: @warning Only the constructor and the methods setFile() and clear() may write to this member. */ - Q_UINT16 numPages; + TQ_UINT16 numPages; /** page sizes @@ -441,12 +442,12 @@ protected: */ TQMap<TQString, Anchor> anchorList; - /** pointer to the parent widget + /** pointer to the tqparent widget This pointer can be used by implementations e.g. to display error messages. This pointer can well be zero. */ - TQGuardedPtr<TQWidget> parentWidget; + TQGuardedPtr<TQWidget> tqparentWidget; /** specifies if accessibilityBackgroundColor should be used diff --git a/kviewshell/documentWidget.cpp b/kviewshell/documentWidget.cpp index 59316d7a..07897488 100644 --- a/kviewshell/documentWidget.cpp +++ b/kviewshell/documentWidget.cpp @@ -65,8 +65,8 @@ TQPixmap* BLShadow = 0; } // namespace anon -DocumentWidget::DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache *cache, const char *name ) - : TQWidget( parent, name ), indexOfUnderlinedLink(-1) +DocumentWidget::DocumentWidget(TQWidget *tqparent, PageView *sv, DocumentPageCache *cache, const char *name ) + : TQWidget( tqparent, name ), indexOfUnderlinedLink(-1) { moveTool = true; @@ -83,10 +83,10 @@ DocumentWidget::DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache scrollGuide = -1; setMouseTracking(true); - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); connect(&clearStatusBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(clearStatusBar())); - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); if (!busyIcon) { @@ -103,7 +103,7 @@ DocumentWidget::DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache } -void DocumentWidget::setPageNumber(Q_UINT16 nr) +void DocumentWidget::setPageNumber(TQ_UINT16 nr) { pageNr = nr; @@ -147,7 +147,7 @@ void DocumentWidget::timerEvent( TQTimerEvent *e ) animationCounter = 0; } - repaint(flashRect, false); + tqrepaint(flashRect, false); } @@ -160,7 +160,7 @@ void DocumentWidget::flash(int fo) animationCounter = 10; TQRect flashRect = linkFlashRect(); flashRect.addCoords(-1, -1, 1, 1); - repaint(flashRect, false); + tqrepaint(flashRect, false); } animationCounter = 0; flashOffset = fo; @@ -195,15 +195,15 @@ void DocumentWidget::paintEvent(TQPaintEvent *e) p.setClipRegion(e->region()); // Paint a black border around the widget - p.setRasterOp(Qt::CopyROP); + p.setRasterOp(TQt::CopyROP); p.setBrush(NoBrush); - p.setPen(Qt::black); + p.setPen(TQt::black); TQRect outlineRect = pageRect(); outlineRect.addCoords(-1, -1, 1, 1); p.drawRect(outlineRect); // Paint page shadow - TQColor backgroundColor = colorGroup().mid(); + TQColor backgroundColor = tqcolorGroup().mid(); // (Re-)generate the Pixmaps for the shadow corners, if necessary if (backgroundColor != backgroundColorForCorners) @@ -247,7 +247,7 @@ void DocumentWidget::paintEvent(TQPaintEvent *e) if (KVSPrefs::changeColors() && KVSPrefs::renderMode() == KVSPrefs::EnumRenderMode::Paper) p.fillRect(destRect, KVSPrefs::paperColor()); else - p.fillRect(destRect, Qt::white); + p.fillRect(destRect, TQt::white); // Draw busy indicator. // Im not really sure if this is a good idea. @@ -273,7 +273,7 @@ void DocumentWidget::paintEvent(TQPaintEvent *e) return; } - TQMemArray<TQRect> damagedRects = e->region().rects(); + TQMemArray<TQRect> damagedRects = TQRegion(e->region()).tqrects(); for (unsigned int i = 0; i < damagedRects.count(); i++) { // Paint the page where it intersects with the damaged area. @@ -342,9 +342,9 @@ void DocumentWidget::paintEvent(TQPaintEvent *e) p.setPen(NoPen); p.setBrush(white); - p.setRasterOp(Qt::XorROP); + p.setRasterOp(TQt::XorROP); - TQMemArray<TQRect> selectionRects = selectedRegion.rects(); + TQMemArray<TQRect> selectionRects = selectedRegion.tqrects(); for (unsigned int i = 0; i < selectionRects.count(); i++) p.drawRect(selectionRects[i]); @@ -355,8 +355,8 @@ void DocumentWidget::paintEvent(TQPaintEvent *e) { // Don't draw over the page shadow p.setClipRegion(e->region().intersect(pageRect())); - p.setRasterOp(Qt::CopyROP); - p.setPen(Qt::red); + p.setRasterOp(TQt::CopyROP); + p.setPen(TQt::red); p.drawLine(1, scrollGuide, pageSize().width(), scrollGuide); } } @@ -449,23 +449,23 @@ void DocumentWidget::mousePressEvent ( TQMouseEvent * e ) } // Check if the mouse is pressed on a regular hyperlink - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { if (pageData->hyperLinkList.size() > 0) for(unsigned int i = 0; i < pageData->hyperLinkList.size(); i++) { - if (pageData->hyperLinkList[i].box.contains(e->pos())) { + if (pageData->hyperLinkList[i].box.tqcontains(e->pos())) { emit(localLink(pageData->hyperLinkList[i].linkText)); return; } } if (moveTool) - setCursor(Qt::SizeAllCursor); + setCursor(TQt::SizeAllCursor); else - setCursor(Qt::IbeamCursor); + setCursor(TQt::IbeamCursor); } - if (e->button() == RightButton || (!moveTool && e->button() == LeftButton)) + if (e->button() == Qt::RightButton || (!moveTool && e->button() == Qt::LeftButton)) { - setCursor(Qt::IbeamCursor); + setCursor(TQt::IbeamCursor); // If Shift is not pressed clear the current selection, // otherwise modify the existing selection. if (!(e->state() & ShiftButton)) @@ -485,7 +485,7 @@ void DocumentWidget::mouseReleaseEvent ( TQMouseEvent *e ) // otherwise the mouse cursor in the centeringScrollview is wrong e->ignore(); - if (e->button() == RightButton || (!moveTool && e->button() == LeftButton)) + if (e->button() == Qt::RightButton || (!moveTool && e->button() == Qt::LeftButton)) { // If the selectedRectangle is empty then there was only a single right click. if (firstSelectedPoint == e->pos()) @@ -537,14 +537,14 @@ void DocumentWidget::mouseMoveEvent ( TQMouseEvent * e ) int lastUnderlinedLink = indexOfUnderlinedLink; // go through hyperlinks for(unsigned int i = 0; i < pageData->hyperLinkList.size(); i++) { - if (pageData->hyperLinkList[i].box.contains(e->pos())) { + if (pageData->hyperLinkList[i].box.tqcontains(e->pos())) { clearStatusBarTimer.stop(); setCursor(pointingHandCursor); TQString link = pageData->hyperLinkList[i].linkText; if ( link.startsWith("#") ) link = link.remove(0,1); - emit setStatusBarText( i18n("Link to %1").arg(link) ); + emit setStatusBarText( i18n("Link to %1").tqarg(link) ); indexOfUnderlinedLink = i; if (KVSPrefs::underlineLinks() == KVSPrefs::EnumUnderlineLinks::OnlyOnHover && @@ -588,7 +588,7 @@ void DocumentWidget::mouseMoveEvent ( TQMouseEvent * e ) clearStatusBarTimer.start(200, true); // clear the statusbar after 200 msec. // Left mouse button pressed -> Text scroll function - if ((e->state() & LeftButton) != 0 && moveTool) + if ((e->state() & Qt::LeftButton) != 0 && moveTool) { // Pass the mouse event on to the owner of this widget ---under // normal circumstances that is the centeringScrollView which will @@ -597,7 +597,7 @@ void DocumentWidget::mouseMoveEvent ( TQMouseEvent * e ) } // Right mouse button pressed -> Text copy function - if ((e->state() & RightButton) != 0 || (!moveTool && (e->state() & LeftButton != 0))) + if ((e->state() & Qt::RightButton) != 0 || (!moveTool && (e->state() & Qt::LeftButton != 0))) { if (selectedRectangle.isEmpty()) { firstSelectedPoint = e->pos(); @@ -660,10 +660,10 @@ void DocumentWidget::updateSelection(const TextSelection& newTextSelection) selectedRegion = newlySelectedRegion; - TQMemArray<TQRect> rectangles = updateRegion.rects(); + TQMemArray<TQRect> rectangles = updateRegion.tqrects(); for (unsigned int i = 0; i < rectangles.count(); i++) { - repaint(rectangles[i]); + tqrepaint(rectangles[i]); } } } @@ -672,7 +672,7 @@ void DocumentWidget::updateSelection(const TextSelection& newTextSelection) void DocumentWidget::clearStatusBar() { - emit setStatusBarText( TQString::null ); + emit setStatusBarText( TQString() ); } @@ -745,11 +745,11 @@ void DocumentWidget::setStandardCursor() { if (moveTool) { - setCursor(Qt::arrowCursor); + setCursor(TQt::arrowCursor); } else { - setCursor(Qt::IbeamCursor); + setCursor(TQt::IbeamCursor); } } diff --git a/kviewshell/documentWidget.h b/kviewshell/documentWidget.h index c568d11c..29a20b79 100644 --- a/kviewshell/documentWidget.h +++ b/kviewshell/documentWidget.h @@ -27,15 +27,16 @@ class TQPaintEvent; /* DocumentWidget */ -class DocumentWidget : public QWidget +class DocumentWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache *cache, const char *name); + DocumentWidget(TQWidget *tqparent, PageView *sv, DocumentPageCache *cache, const char *name); - void setPageNumber(Q_UINT16 pageNr); - Q_UINT16 getPageNumber() const {return pageNr;} + void setPageNumber(TQ_UINT16 pageNr); + TQ_UINT16 getPageNumber() const {return pageNr;} /** Returns the size of the widget without the page shadow. */ TQSize pageSize() const; @@ -121,7 +122,7 @@ protected: int animationCounter; int flashOffset; - Q_UINT16 pageNr; + TQ_UINT16 pageNr; /* This timer is used to delay clearing of the statusbar. Clearing the statusbar is delayed to avoid awful flickering when the mouse @@ -156,7 +157,7 @@ protected: virtual void setStandardCursor(); private slots: - /** This slot emits the signal setStatusBarText(TQString::null) to + /** This slot emits the signal setStatusBarText(TQString()) to clear the status bar. It is connected to the timeout slot of the clearStatusBarTimer. */ void clearStatusBar(); diff --git a/kviewshell/emptyRenderer.cpp b/kviewshell/emptyRenderer.cpp index deeef488..876f1995 100644 --- a/kviewshell/emptyRenderer.cpp +++ b/kviewshell/emptyRenderer.cpp @@ -21,8 +21,8 @@ #include "emptyRenderer.h" -EmptyRenderer::EmptyRenderer(TQWidget* parent) - : DocumentRenderer(parent) +EmptyRenderer::EmptyRenderer(TQWidget* tqparent) + : DocumentRenderer(tqparent) { } diff --git a/kviewshell/emptyRenderer.h b/kviewshell/emptyRenderer.h index 71cf30aa..4496a36b 100644 --- a/kviewshell/emptyRenderer.h +++ b/kviewshell/emptyRenderer.h @@ -29,9 +29,10 @@ class RenderedDocumentPage; class EmptyRenderer : public DocumentRenderer { Q_OBJECT + TQ_OBJECT public: - EmptyRenderer(TQWidget* parent); + EmptyRenderer(TQWidget* tqparent); virtual bool setFile(const TQString &, const KURL &) { return false; } diff --git a/kviewshell/empty_multipage.cpp b/kviewshell/empty_multipage.cpp index 8fc1a0f8..9ba61627 100644 --- a/kviewshell/empty_multipage.cpp +++ b/kviewshell/empty_multipage.cpp @@ -26,9 +26,9 @@ K_EXPORT_COMPONENT_FACTORY(emptymultipagepart, EmptyMultiPageFactory) -EmptyMultiPage::EmptyMultiPage(TQWidget* parentWidget, const char* widgetName, TQObject* parent, const char* name, +EmptyMultiPage::EmptyMultiPage(TQWidget* tqparentWidget, const char* widgetName, TQObject* tqparent, const char* name, const TQStringList& args) - : KMultiPage(parentWidget, widgetName, parent, name), emptyRenderer(parentWidget) + : KMultiPage(tqparentWidget, widgetName, tqparent, name), emptyRenderer(tqparentWidget) { Q_UNUSED(args); setInstance(EmptyMultiPageFactory::instance()); diff --git a/kviewshell/empty_multipage.h b/kviewshell/empty_multipage.h index 455474f1..5722e3e9 100644 --- a/kviewshell/empty_multipage.h +++ b/kviewshell/empty_multipage.h @@ -30,12 +30,13 @@ class EmptyMultiPage : public KMultiPage { Q_OBJECT + TQ_OBJECT public: - EmptyMultiPage(TQWidget* parentWidget, const char* widgetName, TQObject* parent, const char* name, + EmptyMultiPage(TQWidget* tqparentWidget, const char* widgetName, TQObject* tqparent, const char* name, const TQStringList& args = TQStringList()); - virtual TQStringList fileFormats() const { return TQString::null; } + virtual TQStringList fileFormats() const { return TQString(); } /// opens a file virtual bool openFile() { return false; } diff --git a/kviewshell/history.cpp b/kviewshell/history.cpp index 0452efc1..4aade99d 100644 --- a/kviewshell/history.cpp +++ b/kviewshell/history.cpp @@ -9,7 +9,7 @@ #include "history.h" -HistoryItem::HistoryItem(Q_UINT32 p, Q_UINT32 y) +HistoryItem::HistoryItem(TQ_UINT32 p, TQ_UINT32 y) : page(p), ypos(y) { } @@ -23,7 +23,7 @@ History::History() { } -void History::add(Q_UINT32 page, Q_UINT32 ypos) +void History::add(TQ_UINT32 page, TQ_UINT32 ypos) { HistoryItem item(page, ypos); diff --git a/kviewshell/history.h b/kviewshell/history.h index 822e31d7..6b4c2ccf 100644 --- a/kviewshell/history.h +++ b/kviewshell/history.h @@ -15,13 +15,13 @@ class HistoryItem { public: - HistoryItem(Q_UINT32, Q_UINT32); + HistoryItem(TQ_UINT32, TQ_UINT32); HistoryItem() {} bool operator== (const HistoryItem& item) const; - Q_UINT32 page; - Q_UINT32 ypos; + TQ_UINT32 page; + TQ_UINT32 ypos; }; inline @@ -31,14 +31,15 @@ bool operator!=(const HistoryItem& lhs, const HistoryItem& rhs) } -class History : public QObject +class History : public TQObject { Q_OBJECT + TQ_OBJECT public: History(); - void add(Q_UINT32 page, Q_UINT32 ypos); + void add(TQ_UINT32 page, TQ_UINT32 ypos); void clear(); HistoryItem* forward(); diff --git a/kviewshell/hyperlink.h b/kviewshell/hyperlink.h index 66de5c6f..d57843b8 100644 --- a/kviewshell/hyperlink.h +++ b/kviewshell/hyperlink.h @@ -39,7 +39,7 @@ public: @param re value for the box @param lT valus for the text field */ - Hyperlink(Q_UINT32 bl, const TQRect& re, const TQString& lT): baseline(bl), box(re), linkText(lT) {} + Hyperlink(TQ_UINT32 bl, const TQRect& re, const TQString& lT): baseline(bl), box(re), linkText(lT) {} /** \brief Base line of a hyperlink @@ -52,7 +52,7 @@ public: in the box contains characters with underlengths, such as 'y', 'j' or 'g'. */ - Q_UINT32 baseline; + TQ_UINT32 baseline; /** \brief Bounding box of the text or hyperlink diff --git a/kviewshell/kmultipage.cpp b/kviewshell/kmultipage.cpp index 679b0dcf..f927c62c 100644 --- a/kviewshell/kmultipage.cpp +++ b/kviewshell/kmultipage.cpp @@ -34,8 +34,8 @@ //#define DEBUG_KMULTIPAGE -KMultiPage::KMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name) - : DCOPObject("kmultipage"), KParts::ReadOnlyPart(parent, name) +KMultiPage::KMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name) + : DCOPObject("kmultipage"), KParts::ReadOnlyPart(tqparent, name) { // For reasons which I don't understand, the initialization of the // DCOPObject above does not work properly, the name is ignored. It @@ -43,18 +43,18 @@ KMultiPage::KMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject // This is because of the virtual inheritance. Get rid of it (but it's BC, and this is a lib...) -- DF setObjId("kmultipage"); - parentWdg = parentWidget; + tqparentWdg = tqparentWidget; lastCurrentPage = 0; timer_id = -1; searchInProgress = false; - TQVBox* verticalBox = new TQVBox(parentWidget); - verticalBox->setFocusPolicy(TQWidget::StrongFocus); + TQVBox* verticalBox = new TQVBox(tqparentWidget); + verticalBox->setFocusPolicy(TQ_StrongFocus); setWidget(verticalBox); splitterWidget = new TQSplitter(verticalBox, widgetName); splitterWidget->setOpaqueResize(false); - splitterWidget->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); + splitterWidget->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); // Create SideBar sideBar = new TQToolBox(splitterWidget, "sidebar"); @@ -117,7 +117,7 @@ void KMultiPage::readSettings() void KMultiPage::writeSettings() { - // Save TOC layout + // Save TOC tqlayout tableOfContents->writeSettings(); KVSPrefs::setGuiLayout(splitterWidget->sizes()); @@ -146,27 +146,27 @@ void KMultiPage::slotSave() // Try to guess the proper ending... TQString formats; TQString ending; - int rindex = m_file.findRev("."); + int rindex = m_file.tqfindRev("."); if (rindex == -1) { - ending = TQString::null; - formats = TQString::null; + ending = TQString(); + formats = TQString(); } else { ending = m_file.mid(rindex); // e.g. ".dvi" formats = fileFormats().grep(ending).join("\n"); } - TQString fileName = KFileDialog::getSaveFileName(TQString::null, formats, 0, i18n("Save File As")); + TQString fileName = KFileDialog::getSaveFileName(TQString(), formats, 0, i18n("Save File As")); if (fileName.isEmpty()) return; // Add the ending to the filename. I hope the user likes it that // way. - if (!ending.isEmpty() && fileName.find(ending) == -1) + if (!ending.isEmpty() && fileName.tqfind(ending) == -1) fileName = fileName+ending; if (TQFile(fileName).exists()) { - int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Shall I overwrite that file?").arg(fileName), + int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Shall I overwrite that file?").tqarg(fileName), i18n("Overwrite File"), i18n("Overwrite")); if (r == KMessageBox::Cancel) return; @@ -198,7 +198,7 @@ bool KMultiPage::closeURL() document_history.clear(); // Close the file. - renderer->setFile(TQString::null, KURL()); + renderer->setFile(TQString(), KURL()); renderer->clear(); // Delete Page Widgets. @@ -207,7 +207,7 @@ bool KMultiPage::closeURL() widgetList.setAutoDelete(false); // Update ScrollView. - scrollView()->layoutPages(); + scrollView()->tqlayoutPages(); enableActions(false); // Clear Thumbnail List. @@ -216,8 +216,8 @@ bool KMultiPage::closeURL() // Clear Table of Contents tableOfContents->clear(); - // Clear Status Bar - emit setStatusBarText(TQString::null); + // Clear tqStatus Bar + emit setStatusBarText(TQString()); return true; } @@ -389,7 +389,7 @@ void KMultiPage::generateDocumentWidgets(const PageNumber& _startPage) // Find out how many widgets are needed, and resize the widgetList accordingly. widgetList.setAutoDelete(true); - Q_UINT16 oldwidgetListSize = widgetList.size(); + TQ_UINT16 oldwidgetListSize = widgetList.size(); if (numberOfPages() == 0) widgetList.resize(0); else @@ -406,7 +406,7 @@ void KMultiPage::generateDocumentWidgets(const PageNumber& _startPage) // Calculate the number of the first page in the tableau. tableauStartPage = startPage - ((startPage - 1) % visiblePages); // We cannot have more widgets then pages in the document. - visiblePages = QMIN(visiblePages, numberOfPages() - tableauStartPage + 1); + visiblePages = TQMIN(visiblePages, numberOfPages() - tableauStartPage + 1); if (widgetList.size() != visiblePages) widgetList.resize(visiblePages); break; @@ -428,7 +428,7 @@ void KMultiPage::generateDocumentWidgets(const PageNumber& _startPage) // Allocate DocumentWidget structures so that all entries of // widgetList point to a valid DocumentWidget. DocumentWidget *documentWidget; - for(Q_UINT16 i=0; i<widgetList.size(); i++) { + for(TQ_UINT16 i=0; i<widgetList.size(); i++) { documentWidget = widgetList[i]; if (documentWidget == 0) { documentWidget = createDocumentWidget(); @@ -456,7 +456,7 @@ void KMultiPage::generateDocumentWidgets(const PageNumber& _startPage) } else { // In all other modes, the widgets will be numbered continuously, // starting from firstShownPage. - for(Q_UINT16 i=0; i<widgetList.size(); i++) { + for(TQ_UINT16 i=0; i<widgetList.size(); i++) { documentWidget = widgetList[i]; if (documentWidget != 0) // Paranoia safety check { @@ -536,13 +536,13 @@ bool KMultiPage::gotoPage(const PageNumber& page, int y, bool isLink) if (pageWidget != 0) pageWidget->setPageNumber(tableauStartPage + i); } - scrollView()->layoutPages(); + scrollView()->tqlayoutPages(); } } // move scrollview to "page". // Make the widget pageWidget visible in the scrollview. Somehow this // doesn't seem to trigger the signal contentsMoved in the - // QScrollview, so that we better call setCurrentPage() ourselves. + // TQScrollview, so that we better call setCurrentPage() ourselves. pageWidget = (DocumentWidget*)(widgetList[page % visiblePages]); scrollView()->moveViewportToWidget(pageWidget, y); @@ -575,7 +575,7 @@ bool KMultiPage::gotoPage(const PageNumber& page, int y, bool isLink) } pageWidget->setPageNumber(page); - scrollView()->layoutPages(); + scrollView()->tqlayoutPages(); scrollView()->moveViewportToWidget(pageWidget, y); } else { // There are multiple widgets, then we are either in the @@ -689,9 +689,9 @@ void KMultiPage::renderModeChanged() pageCache->clear(); generateDocumentWidgets(); - scrollView()->layoutPages(); + scrollView()->tqlayoutPages(); - for (Q_UINT16 i=0; i < widgetList.size(); i++) + for (TQ_UINT16 i=0; i < widgetList.size(); i++) { DocumentWidget* documentWidget = widgetList[i]; if (documentWidget == 0) @@ -700,20 +700,20 @@ void KMultiPage::renderModeChanged() documentWidget->update(); } - markList()->repaintThumbnails(); + markList()->tqrepaintThumbnails(); } -void KMultiPage::repaintAllVisibleWidgets() +void KMultiPage::tqrepaintAllVisibleWidgets() { #ifdef DEBUG_KMULTIPAGE - kdDebug(1233) << "KMultiPage::repaintAllVisibleWidgets()" << endl; + kdDebug(1233) << "KMultiPage::tqrepaintAllVisibleWidgets()" << endl; #endif bool everResized = false; // Go through the list of widgets and resize them, if necessary - for(Q_UINT16 i=0; i<widgetList.size(); i++) + for(TQ_UINT16 i=0; i<widgetList.size(); i++) { DocumentWidget* documentWidget = widgetList[i]; if (documentWidget == 0) @@ -732,7 +732,7 @@ void KMultiPage::repaintAllVisibleWidgets() // re-aligned. This will automatically update all necessary // widgets. if (everResized == true) - scrollView()->layoutPages(true); + scrollView()->tqlayoutPages(true); } @@ -767,7 +767,7 @@ void KMultiPage::print() return; // initialize the printer using the print dialog - if ( printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1))) ) { + if ( printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1))) ) { // Now do the printing. TQValueList<int> pageList = printer->pageList(); if (pageList.isEmpty()) @@ -790,7 +790,7 @@ void KMultiPage::print() // Printing usually takes a while. This is to keep the GUI // updated. - qApp->processEvents(); + tqApp->processEvents(); TQPainter *paint = rdpp.getPainter(); if (paint != 0) { @@ -872,13 +872,13 @@ void KMultiPage::setRenderer(DocumentRenderer* _renderer) connect(pageCache, TQT_SIGNAL(paperSizeChanged()), this, TQT_SLOT(renderModeChanged())); connect(pageCache, TQT_SIGNAL(textSelected(bool)), this, TQT_SIGNAL(textSelected(bool))); connect(renderer, TQT_SIGNAL(documentIsChanged()), this, TQT_SLOT(renderModeChanged())); - connect(this, TQT_SIGNAL(zoomChanged()), this, TQT_SLOT(repaintAllVisibleWidgets())); + connect(this, TQT_SIGNAL(zoomChanged()), this, TQT_SLOT(tqrepaintAllVisibleWidgets())); } void KMultiPage::updateWidgetSize(const PageNumber& pageNumber) { - for(Q_UINT16 i=0; i<widgetList.size(); i++) + for(TQ_UINT16 i=0; i<widgetList.size(); i++) { DocumentWidget* documentWidget = widgetList[i]; if (documentWidget == 0) @@ -891,7 +891,7 @@ void KMultiPage::updateWidgetSize(const PageNumber& pageNumber) if (pageSize != documentWidget->pageSize()) { documentWidget->setPageSize(pageSize); - scrollView()->layoutPages(); + scrollView()->tqlayoutPages(); } // We have just one widget per page. break; @@ -1041,7 +1041,7 @@ double KMultiPage::calculateFitToWidthZoomValue() // of the viewport and scale the contents by a factor x so that it // fits the viewport exactly, then, depending on chosen papersize // (landscape, etc.), the contents may be higher than the viewport - // and the QScrollview may or may not insert a scrollbar at the + // and the TQScrollview may or may not insert a scrollbar at the // right. If the scrollbar appears, then the usable width of the // viewport becomes smaller, and scaling by x does not really fit // the (now smaller page) anymore. @@ -1081,8 +1081,8 @@ double KMultiPage::calculateFitToWidthZoomValue() void KMultiPage::prevPage() { - Q_UINT8 cols = scrollView()->getNrColumns(); - Q_UINT8 rows = scrollView()->getNrRows(); + TQ_UINT8 cols = scrollView()->getNrColumns(); + TQ_UINT8 rows = scrollView()->getNrRows(); PageNumber np = 1; if (cols*rows < currentPageNumber()) @@ -1096,10 +1096,10 @@ void KMultiPage::prevPage() void KMultiPage::nextPage() { - Q_UINT8 cols = scrollView()->getNrColumns(); - Q_UINT8 rows = scrollView()->getNrRows(); + TQ_UINT8 cols = scrollView()->getNrColumns(); + TQ_UINT8 rows = scrollView()->getNrRows(); - PageNumber np = QMIN(currentPageNumber() + cols*rows, (Q_UINT16)numberOfPages()); + PageNumber np = TQMIN(currentPageNumber() + cols*rows, (TQ_UINT16)numberOfPages()); gotoPage(np); } @@ -1117,7 +1117,7 @@ void KMultiPage::lastPage() } -void KMultiPage::scroll(Q_INT32 deltaInPixel) +void KMultiPage::scroll(TQ_INT32 deltaInPixel) { TQScrollBar* scrollBar = scrollView()->verticalScrollBar(); if (scrollBar == 0) { @@ -1393,8 +1393,8 @@ void KMultiPage::findNextText() // start. If nothing is selected, we start at the beginning of the // current page. Otherwise, start after the selected text. TODO: // Optimize this to get a better 'user feeling' - Q_UINT16 startingPage; - Q_UINT16 startingTextItem; + TQ_UINT16 startingPage; + TQ_UINT16 startingTextItem; TextSelection userSelection = pageCache->selectedText(); if (userSelection.isEmpty()) @@ -1427,7 +1427,7 @@ void KMultiPage::findNextText() if (i != 0) { - setStatusBarText(i18n("Search page %1 of %2").arg(pageNumber).arg(numberOfPages())); + setStatusBarText(i18n("Search page %1 of %2").tqarg(pageNumber).tqarg(numberOfPages())); kapp->processEvents(); } @@ -1461,7 +1461,7 @@ void KMultiPage::findNextText() if (searchPage->textBoxList.size() == 0) continue; - foundSelection = searchPage->find(searchText, startingTextItem, case_sensitive); + foundSelection = searchPage->tqfind(searchText, startingTextItem, case_sensitive); if (foundSelection.isEmpty()) { @@ -1474,12 +1474,12 @@ void KMultiPage::findNextText() int answ = KMessageBox::questionYesNo(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found by the " "end of the document. Should the search be restarted from the beginning " - "of the document?</qt>").arg(searchText), + "of the document?</qt>").tqarg(searchText), i18n("Text Not Found"), KStdGuiItem::cont(), KStdGuiItem::cancel()); if (answ != KMessageBox::Yes) { - setStatusBarText(TQString::null); + setStatusBarText(TQString()); searchInProgress = false; if (!cachedPage) delete searchPage; @@ -1491,7 +1491,7 @@ void KMultiPage::findNextText() { pageCache->selectText(foundSelection); gotoPage(pageCache->selectedText()); - setStatusBarText(TQString::null); + setStatusBarText(TQString()); searchInProgress = false; if (!cachedPage) delete searchPage; @@ -1499,8 +1499,8 @@ void KMultiPage::findNextText() } } - KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").arg(searchText)); - setStatusBarText(TQString::null); + KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").tqarg(searchText)); + setStatusBarText(TQString()); searchInProgress = false; if (!cachedPage) delete searchPage; @@ -1569,7 +1569,7 @@ void KMultiPage::findPrevText() if (i != 0) { - setStatusBarText(i18n("Search page %1 of %2").arg(pageNumber).arg(numberOfPages())); + setStatusBarText(i18n("Search page %1 of %2").tqarg(pageNumber).tqarg(numberOfPages())); kapp->processEvents(); } @@ -1603,7 +1603,7 @@ void KMultiPage::findPrevText() if (searchPage->textBoxList.size() == 0) continue; - foundSelection = searchPage->findRev(searchText, startingTextItem, case_sensitive); + foundSelection = searchPage->tqfindRev(searchText, startingTextItem, case_sensitive); if (foundSelection.isEmpty()) { @@ -1616,12 +1616,12 @@ void KMultiPage::findPrevText() int answ = KMessageBox::questionYesNo(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found by the " "beginning of the document. Should the search be restarted from the end " - "of the document?</qt>").arg(searchText), + "of the document?</qt>").tqarg(searchText), i18n("Text Not Found"), KStdGuiItem::cont(), KStdGuiItem::cancel()); if (answ != KMessageBox::Yes) { - setStatusBarText(TQString::null); + setStatusBarText(TQString()); searchInProgress = false; if (!cachedPage) delete searchPage; @@ -1633,7 +1633,7 @@ void KMultiPage::findPrevText() { pageCache->selectText(foundSelection); gotoPage(pageCache->selectedText()); - setStatusBarText(TQString::null); + setStatusBarText(TQString()); searchInProgress = false; if (!cachedPage) delete searchPage; @@ -1641,8 +1641,8 @@ void KMultiPage::findPrevText() } } - KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").arg(searchText)); - setStatusBarText(TQString::null); + KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").tqarg(searchText)); + setStatusBarText(TQString()); searchInProgress = false; if (!cachedPage) delete searchPage; @@ -1710,8 +1710,8 @@ void KMultiPage::reload() pageCache->clear(); pageCache->deselectText(); document_history.clear(); - emit setStatusBarText(i18n("Reloading file %1").arg(m_file)); - Q_INT32 pg = currentPageNumber(); + emit setStatusBarText(i18n("Reloading file %1").tqarg(m_file)); + TQ_INT32 pg = currentPageNumber(); killTimer(timer_id); timer_id = -1; @@ -1728,7 +1728,7 @@ void KMultiPage::reload() setCurrentPageNumber(pg); setFile(r); - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); } else { if (timer_id == -1) timer_id = startTimer(1000); @@ -1746,7 +1746,7 @@ bool KMultiPage::openFile() pageCache->deselectText(); document_history.clear(); pageCache->clear(); - emit setStatusBarText(i18n("Loading file %1").arg(m_file)); + emit setStatusBarText(i18n("Loading file %1").tqarg(m_file)); bool r = renderer->setFile(m_file, m_url); @@ -1765,13 +1765,13 @@ bool KMultiPage::openFile() // Set Table of Contents tableOfContents->setContents(renderer->getBookmarks()); } else - m_file = TQString::null; + m_file = TQString(); setFile(r); // Clear Statusbar - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); return r; } @@ -1810,7 +1810,7 @@ void KMultiPage::wheelEvent(TQWheelEvent *e) return; } - Q_INT32 pxl = -(e->delta()*sb->lineStep())/60; + TQ_INT32 pxl = -(e->delta()*sb->lineStep())/60; if (pxl == 0) { if (e->delta() > 0) @@ -1887,9 +1887,9 @@ KPrinter *KMultiPage::getPrinter(bool enablePageSizeFeatures) } else it++; if (endval == val) - range += TQString("%1").arg(val); + range += TQString("%1").tqarg(val); else - range += TQString("%1-%2").arg(val).arg(endval); + range += TQString("%1-%2").tqarg(val).tqarg(endval); } while (it != selectedPageNo.end() ); printer->setOption( "kde-range", range ); } @@ -1901,7 +1901,7 @@ void KMultiPage::doExportText() { // Generate a suggestion for a reasonable file name TQString suggestedName = url().filename(); - suggestedName = suggestedName.left(suggestedName.find(".")) + ".txt"; + suggestedName = suggestedName.left(suggestedName.tqfind(".")) + ".txt"; TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.txt|Plain Text (Latin 1) (*.txt)"), scrollView(), i18n("Export File As")); @@ -1912,7 +1912,7 @@ void KMultiPage::doExportText() if (finfo.exists()) { int r = KMessageBox::warningContinueCancel (scrollView(), - i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName), + i18n("The file %1\nexists. Do you want to overwrite that file?").tqarg(fileName), i18n("Overwrite File"), i18n("Overwrite")); if (r == KMessageBox::Cancel) @@ -1933,7 +1933,7 @@ void KMultiPage::doExportText() for(unsigned int page = 1; page <= renderer->totalPages(); page++) { progress.setProgress(page); - qApp->processEvents(); + tqApp->processEvents(); if (progress.wasCancelled()) break; diff --git a/kviewshell/kmultipage.h b/kviewshell/kmultipage.h index 285031ca..dc05200a 100644 --- a/kviewshell/kmultipage.h +++ b/kviewshell/kmultipage.h @@ -37,9 +37,10 @@ class SearchWidget; class KMultiPage : public KParts::ReadOnlyPart, virtual public kmultipageInterface { Q_OBJECT + TQ_OBJECT public: - KMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name); + KMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name); virtual ~KMultiPage(); /* returns the scrollview used for the display */ @@ -91,7 +92,7 @@ public: should) therefore be re-implemented if you have good code to convert your document to PostScript. - Example: If your document consists of a single A4 page that contains + Example: If your document consists of a single A4 page that tqcontains a DJVU image of 30KB, then the default implementation would render the image in 600dpi, i.e. in about 7000x5000 pixel, and then send this huge graphics uncompressed to the printer. A smart @@ -120,7 +121,7 @@ public: // Show the printer options dialog. Return immediately if the user // aborts. - if (!printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1)) )) { + if (!printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) )) { delete printer; return; } @@ -154,7 +155,7 @@ public: // Show the printer options dialog. Return immediately if the user // aborts. - if (!printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1)) )) { + if (!printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1)) )) { delete printer; return; } @@ -291,8 +292,8 @@ public: virtual double calculateFitToHeightZoomValue(); /* Returns the number of columns into which the widgets are aligned. */ - virtual Q_UINT8 getNrColumns() const { return _scrollView->getNrColumns(); } - virtual Q_UINT8 getNrRows() const { return _scrollView->getNrRows(); } + virtual TQ_UINT8 getNrColumns() const { return _scrollView->getNrColumns(); } + virtual TQ_UINT8 getNrRows() const { return _scrollView->getNrRows(); } virtual bool overviewMode() const { return _scrollView->overviewMode(); } @@ -425,9 +426,9 @@ public slots: */ void renderModeChanged(); - /* Empties the page cache and --as the name suggests-- repaints all + /* Empties the page cache and --as the name suggests-- tqrepaints all visible widgets. */ - void repaintAllVisibleWidgets(); + void tqrepaintAllVisibleWidgets(); /* Tells the multipage if scrollbars should be used. */ virtual void slotShowScrollbars(bool); @@ -485,7 +486,7 @@ public slots: makes it a little easier for the user to scroll with the mouse wheel or the keyboard without involuntarily moving to another page. */ - virtual void scroll(Q_INT32 deltaInPixel); + virtual void scroll(TQ_INT32 deltaInPixel); virtual void slotEnableMoveTool(bool enable); @@ -564,11 +565,11 @@ protected: KPrinter *getPrinter(bool enablePageSizeFeatures=true); - /** Pointer to the parent widget + /** Pointer to the tqparent widget This pointer is automatically set by the constructor. */ - TQGuardedPtr<TQWidget> parentWdg; + TQGuardedPtr<TQWidget> tqparentWdg; TQPtrVector<DocumentWidget> widgetList; diff --git a/kviewshell/kprintDialogPage_pageoptions.cpp b/kviewshell/kprintDialogPage_pageoptions.cpp index c0c4b15e..77ff0949 100644 --- a/kviewshell/kprintDialogPage_pageoptions.cpp +++ b/kviewshell/kprintDialogPage_pageoptions.cpp @@ -20,8 +20,8 @@ #include "kprintDialogPage_pageoptions.h" -KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( TQWidget *parent, const char *name ) - : KPrintDialogPage( parent, name ) +KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( TQWidget *tqparent, const char *name ) + : KPrintDialogPage( tqparent, name ) { setTitle( i18n("Page Size & Placement") ); @@ -33,7 +33,7 @@ KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( TQWidget *parent, co kprintDialogPage_pageoptions_baseLayout = new TQVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout"); if (kprintDialogPage_pageoptions_baseLayout == 0) { - kdError(1223) << "KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions() cannot create layout" << endl; + kdError(1223) << "KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions() cannot create tqlayout" << endl; return; } @@ -91,7 +91,7 @@ KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( TQWidget *parent, co } - resize( TQSize(319, 166).expandedTo(minimumSizeHint()) ); + resize( TQSize(319, 166).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); } diff --git a/kviewshell/kprintDialogPage_pageoptions.h b/kviewshell/kprintDialogPage_pageoptions.h index 8fea375f..4ae81eb8 100644 --- a/kviewshell/kprintDialogPage_pageoptions.h +++ b/kviewshell/kprintDialogPage_pageoptions.h @@ -24,7 +24,7 @@ class TQVBoxLayout; class KPrintDialogPage_PageOptions : public KPrintDialogPage { public: - KPrintDialogPage_PageOptions( TQWidget *parent = 0, const char *name = 0 ); + KPrintDialogPage_PageOptions( TQWidget *tqparent = 0, const char *name = 0 ); void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false ); void setOptions( const TQMap<TQString,TQString>& opts ); diff --git a/kviewshell/kviewpart.cpp b/kviewshell/kviewpart.cpp index 56e13b64..eb981335 100644 --- a/kviewshell/kviewpart.cpp +++ b/kviewshell/kviewpart.cpp @@ -56,10 +56,10 @@ typedef KParts::GenericFactory<KViewPart> KViewPartFactory; K_EXPORT_COMPONENT_FACTORY(kviewerpart, KViewPartFactory) -KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent, +KViewPart::KViewPart(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args) - : KViewPart_Iface(parent, name), showSidebar(0), saveAction(0), partManager(0), - multiPageLibrary(TQString::null), aboutDialog(0) + : KViewPart_Iface(tqparent, name), showSidebar(0), saveAction(0), partManager(0), + multiPageLibrary(TQString()), aboutDialog(0) { KGlobal::locale()->insertCatalogue("kviewshell"); @@ -71,12 +71,12 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p connect(watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(fileChanged(const TQString&))); watch->startScan(); - mainWidget = new TQHBox(parentWidget, widgetName); - mainWidget->setFocusPolicy(TQWidget::StrongFocus); + mainWidget = new TQHBox(tqparentWidget, widgetName); + mainWidget->setFocusPolicy(TQ_StrongFocus); setWidget(mainWidget); // Setup part manager - partManager = new KParts::PartManager(parentWidget, "PartManager for kviewpart"); + partManager = new KParts::PartManager(tqparentWidget, "PartManager for kviewpart"); setManager(partManager); // Don't switch to another part when pressing a mouse button partManager->setActivationButtonMask(0); @@ -96,24 +96,24 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p // If a default MimeType is specified try to load a MultiPage supporting it. TQString defaultMimeType = args.first(); offers = KTrader::self()->query( - TQString::fromLatin1("KViewShell/MultiPage" ), + TQString::tqfromLatin1("KViewShell/MultiPage" ), TQString("([X-KDE-MultiPageVersion] == %1) and " - "([X-KDE-MimeTypes] == '%2')").arg(MULTIPAGE_VERSION).arg(defaultMimeType)); + "([X-KDE-MimeTypes] == '%2')").tqarg(MULTIPAGE_VERSION).tqarg(defaultMimeType)); } // If no default MimeType is given or no MultiPage has been found, try to load the Empty MultiPage. if (offers.isEmpty()) { offers = KTrader::self()->query( - TQString::fromLatin1("KViewShell/MultiPage" ), + TQString::tqfromLatin1("KViewShell/MultiPage" ), TQString("([X-KDE-MultiPageVersion] == %1) and " - "([X-KDE-EmptyMultiPage] == 1)").arg(MULTIPAGE_VERSION)); + "([X-KDE-EmptyMultiPage] == 1)").tqarg(MULTIPAGE_VERSION)); } // If still no MultiPage has been found, report an error and abort. if (offers.isEmpty()) { - KMessageBox::error(parentWidget, i18n("<qt>No MultiPage found.</qt>")); + KMessageBox::error(tqparentWidget, i18n("<qt>No MultiPage found.</qt>")); // return; } @@ -122,7 +122,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p // Try to load the multiPage int error; - multiPage = static_cast<KMultiPage*>(KParts::ComponentFactory::createInstanceFromService<KParts::ReadOnlyPart>(service, mainWidget, + multiPage = static_cast<KMultiPage*>(KParts::ComponentFactory::createInstanceFromService<KParts::ReadOnlyPart>(service, TQT_TQOBJECT(mainWidget), service->name().utf8(), TQStringList(), &error )); // If the loading of the MultiPage failed report and error and abort. @@ -137,7 +137,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p break; case KParts::ComponentFactory::ErrNoLibrary: reason = i18n("<qt><p>The specified library <b>%1</b> could not be loaded. The error message returned was:</p>" - "<p><b>%2</b></p></qt>").arg(service->library()).arg(KLibLoader::self()->lastErrorMessage()); + "<p><b>%2</b></p></qt>").tqarg(service->library()).tqarg(KLibLoader::self()->lastErrorMessage()); break; case KParts::ComponentFactory::ErrNoFactory: reason = i18n("<qt>The library does not export a factory for creating components.</qt>"); @@ -155,13 +155,13 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p "question. If that does not help, you could file an error report, either to the " "provider of your software (e.g. the vendor of your Linux distribution), or " "directly to the authors of the software. The entry <b>Report Bug...</b> in the " - "<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").arg(m_file).arg(service->library()); + "<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").tqarg(m_file).tqarg(service->library()); TQString caption = i18n("Error Initializing Software Component"); KMessageBox::detailedError(mainWidget, text, reason, caption); - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); return; } - // Make the KViewPart the parent of the MultiPage. + // Make the KViewPart the tqparent of the MultiPage. // So the Partmanager treats it as a nested KPart. insertChild(multiPage); @@ -173,7 +173,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p exportTextAction = new KAction(i18n("Text..."), 0, this, TQT_SLOT(mp_exportText()), actionCollection(), "export_text"); // edit menu - findTextAction = KStdAction::find(this, TQT_SLOT(mp_showFindTextDialog()), actionCollection(), "find"); + findTextAction = KStdAction::find(this, TQT_SLOT(mp_showFindTextDialog()), actionCollection(), "tqfind"); findNextAction = KStdAction::findNext(this, TQT_SLOT(mp_findNextText()), actionCollection(), "findnext"); findNextAction->setEnabled(false); findPrevAction = KStdAction::findPrev(this, TQT_SLOT(mp_findPrevText()), actionCollection(), "findprev"); @@ -206,11 +206,11 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p viewModeAction = new KSelectAction (i18n("View Mode"), 0, 0, 0, actionCollection(), "viewmode"); viewModeAction->setItems(viewModes); - // Orientation menu + // Qt::Orientation menu TQStringList orientations; orientations.append(i18n("Portrait")); orientations.append(i18n("Landscape")); - orientation = new KSelectAction (i18n("Preferred &Orientation"), 0, 0, 0, actionCollection(), "view_orientation"); + orientation = new KSelectAction (i18n("Preferred &Qt::Orientation"), 0, 0, 0, actionCollection(), "view_orientation"); orientation->setItems(orientations); connect(orientation, TQT_SIGNAL(activated (int)), &userRequestedPaperSize, TQT_SLOT(setOrientation(int))); @@ -411,18 +411,18 @@ TQString KViewPart::pageSizeDescription() { PageNumber nr = multiPage->currentPageNumber(); if (!nr.isValid()) - return TQString::null; + return TQString(); SimplePageSize ss = multiPage->sizeOfPage(nr); if (!ss.isValid()) - return TQString::null; + return TQString(); pageSize s(ss); TQString size = " "; if (s.formatNumber() == -1) { if (KGlobal::locale()-> measureSystem() == KLocale::Metric) - size += TQString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0); + size += TQString("%1x%2 mm").tqarg(s.width().getLength_in_mm(), 0, 'f', 0).tqarg(s.height().getLength_in_mm(), 0, 'f', 0); else - size += TQString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2); + size += TQString("%1x%2 in").tqarg(s.width().getLength_in_inch(), 0, 'g', 2).tqarg(s.height().getLength_in_inch(), 0, 'g', 2); } else { size += s.formatName() + "/"; if (s.getOrientation() == 0) @@ -459,7 +459,7 @@ void KViewPart::slotFileOpen() return; } - KURL url = KFileDialog::getOpenURL(TQString::null, supportedMimeTypes().join(" ")); + KURL url = KFileDialog::getOpenURL(TQString(), supportedMimeTypes().join(" ")); if (!url.isEmpty()) openURL(url); @@ -471,8 +471,8 @@ TQStringList KViewPart::supportedMimeTypes() // Search for service KTrader::OfferList offers = KTrader::self()->query( - TQString::fromLatin1("KViewShell/MultiPage"), - TQString("([X-KDE-MultiPageVersion] == %1)").arg(MULTIPAGE_VERSION) + TQString::tqfromLatin1("KViewShell/MultiPage"), + TQString("([X-KDE-MultiPageVersion] == %1)").tqarg(MULTIPAGE_VERSION) ); if (!offers.isEmpty()) @@ -516,8 +516,8 @@ TQStringList KViewPart::fileFormats() const // Search for service KTrader::OfferList offers = KTrader::self()->query( - TQString::fromLatin1("KViewShell/MultiPage"), - TQString("([X-KDE-MultiPageVersion] == %1)").arg(MULTIPAGE_VERSION) + TQString::tqfromLatin1("KViewShell/MultiPage"), + TQString("([X-KDE-MultiPageVersion] == %1)").tqarg(MULTIPAGE_VERSION) ); if (!offers.isEmpty()) @@ -553,10 +553,10 @@ TQStringList KViewPart::fileFormats() const for(TQStringList::Iterator it = supportedPattern.begin(); it != supportedPattern.end(); ++it ) { - if ((*it).find(".gz", -3) == -1) // Paranoia safety check + if ((*it).tqfind(".gz", -3) == -1) // Paranoia safety check compressedPattern.append(*it + ".gz"); - if ((bzip2Available) && ((*it).find(".bz2", -4) == -1)) // Paranoia safety check + if ((bzip2Available) && ((*it).tqfind(".bz2", -4) == -1)) // Paranoia safety check compressedPattern.append(*it + ".bz2"); } @@ -613,7 +613,7 @@ bool KViewPart::openFile() for (TQStringList::Iterator it = supportedPatterns.begin(); it != supportedPatterns.end(); ++it) { // Only consider patterns starting with "*." - if ((*it).find("*.") == 0) + if ((*it).tqfind("*.") == 0) { // Remove first Letter from string endings.append((*it).mid(2).stripWhiteSpace()); @@ -642,8 +642,8 @@ bool KViewPart::openFile() // If we still have not found a file. Show an error message and return. if (!fi.exists()) { - KMessageBox::error(mainWidget, i18n("<qt>File <nobr><strong>%1</strong></nobr> does not exist.</qt>").arg(m_file)); - emit setStatusBarText(TQString::null); + KMessageBox::error(mainWidget, i18n("<qt>File <nobr><strong>%1</strong></nobr> does not exist.</qt>").tqarg(m_file)); + emit setStatusBarText(TQString()); return false; } m_url.setPath(TQFileInfo(m_file).absFilePath()); @@ -651,7 +651,7 @@ bool KViewPart::openFile() // Set the window caption now, before we do any uncompression and generation of temporary files. tmpFileURL.setPath(m_file); - emit setStatusBarText(i18n("Loading '%1'...").arg(tmpFileURL.prettyURL())); + emit setStatusBarText(i18n("Loading '%1'...").tqarg(tmpFileURL.prettyURL())); emit setWindowCaption( tmpFileURL.prettyURL() ); // set Window caption WITHOUT the reference part! // Check if the file is compressed @@ -670,17 +670,17 @@ bool KViewPart::openFile() { KMessageBox::error(mainWidget, i18n("<qt><strong>File Error!</strong> Could not create " "temporary file.</qt>")); - emit setWindowCaption(TQString::null); - emit setStatusBarText(TQString::null); + emit setWindowCaption(TQString()); + emit setStatusBarText(TQString()); return false; } tmpUnzipped->setAutoDelete(true); if(tmpUnzipped->status() != 0) { KMessageBox::error(mainWidget, i18n("<qt><strong>File Error!</strong> Could not create temporary file " - "<nobr><strong>%1</strong></nobr>.</qt>").arg(strerror(tmpUnzipped->status()))); - emit setWindowCaption(TQString::null); - emit setStatusBarText(TQString::null); + "<nobr><strong>%1</strong></nobr>.</qt>").tqarg(strerror(tmpUnzipped->status()))); + emit setWindowCaption(TQString()); + emit setStatusBarText(TQString()); return false; } @@ -692,27 +692,27 @@ bool KViewPart::openFile() filterDev = KFilterDev::deviceForFile(m_file); if (filterDev == 0L) { - emit setWindowCaption(TQString::null); - emit setStatusBarText(TQString::null); + emit setWindowCaption(TQString()); + emit setStatusBarText(TQString()); return false; } if(!filterDev->open(IO_ReadOnly)) { KMessageBox::detailedError(mainWidget, i18n("<qt><strong>File Error!</strong> Could not open the file " "<nobr><strong>%1</strong></nobr> for uncompression. " - "The file will not be loaded.</qt>").arg(m_file), + "The file will not be loaded.</qt>").tqarg(m_file), i18n("<qt>This error typically occurs if you do not have enough permissions to read the file. " "You can check ownership and permissions if you right-click on the file in the Konqueror " "file manager and then choose the 'Properties' menu.</qt>")); - emit setWindowCaption(TQString::null); + emit setWindowCaption(TQString()); delete filterDev; - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); return false; } KProgressDialog* prog = new KProgressDialog(0L, "uncompress-progress", i18n("Uncompressing..."), - i18n("<qt>Uncompressing the file <nobr><strong>%1</strong></nobr>. Please wait.</qt>").arg(m_file)); + i18n("<qt>Uncompressing the file <nobr><strong>%1</strong></nobr>. Please wait.</qt>").tqarg(m_file)); prog->progressBar()->setTotalSteps((int) fi.size()/1024); prog->progressBar()->setProgress(0); @@ -739,18 +739,18 @@ bool KViewPart::openFile() tmpUnzipped->sync(); if (progress_dialog_was_cancelled) { - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); return false; } if ((read != 0) || (tmpUnzipped->file()->size() == 0)) { KMessageBox::detailedError(mainWidget, i18n("<qt><strong>File Error!</strong> Could not uncompress " - "the file <nobr><strong>%1</strong></nobr>. The file will not be loaded.</qt>").arg( m_file ), + "the file <nobr><strong>%1</strong></nobr>. The file will not be loaded.</qt>").tqarg( m_file ), i18n("<qt>This error typically occurs if the file is corrupt. " "If you want to be sure, try to decompress the file manually using command-line tools.</qt>")); - emit setWindowCaption(TQString::null); - emit setStatusBarText(TQString::null); + emit setWindowCaption(TQString()); + emit setStatusBarText(TQString()); return false; } tmpUnzipped->close(); @@ -768,17 +768,17 @@ bool KViewPart::openFile() // Search for service KTrader::OfferList offers = KTrader::self()->query( - TQString::fromLatin1("KViewShell/MultiPage" ), + TQString::tqfromLatin1("KViewShell/MultiPage" ), TQString("([X-KDE-MultiPageVersion] == %1) and " - "([X-KDE-MimeTypes] == '%2')").arg(MULTIPAGE_VERSION).arg(mimetype->name())); + "([X-KDE-MimeTypes] == '%2')").tqarg(MULTIPAGE_VERSION).tqarg(mimetype->name())); if (offers.isEmpty()) { KMessageBox::detailedError(mainWidget, i18n("<qt>The document <b>%1</b> cannot be shown because " - "its file type is not supported.</qt>").arg(m_file), + "its file type is not supported.</qt>").tqarg(m_file), i18n("<qt>The file has mime type <b>%1</b> which is not supported by " - "any of the installed KViewShell plugins.</qt>").arg(mimetype->name())); - emit setWindowCaption(TQString::null); - emit setStatusBarText(TQString::null); + "any of the installed KViewShell plugins.</qt>").tqarg(mimetype->name())); + emit setWindowCaption(TQString()); + emit setStatusBarText(TQString()); return false; } @@ -800,7 +800,7 @@ bool KViewPart::openFile() // Try to load the multiPage int error; - multiPage = static_cast<KMultiPage*>(KParts::ComponentFactory::createInstanceFromService<KParts::ReadOnlyPart>(service, mainWidget, + multiPage = static_cast<KMultiPage*>(KParts::ComponentFactory::createInstanceFromService<KParts::ReadOnlyPart>(service, TQT_TQOBJECT(mainWidget), service->name().utf8(), TQStringList(), &error )); if (multiPage.isNull()) { @@ -813,7 +813,7 @@ bool KViewPart::openFile() reason = i18n("<qt>The specified service provides no shared library.</qt>"); break; case KParts::ComponentFactory::ErrNoLibrary: - reason = i18n("<qt><p>The specified library <b>%1</b> could not be loaded. The error message returned was:</p> <p><b>%2</b></p></qt>").arg(service->library()).arg(KLibLoader::self()->lastErrorMessage()); + reason = i18n("<qt><p>The specified library <b>%1</b> could not be loaded. The error message returned was:</p> <p><b>%2</b></p></qt>").tqarg(service->library()).tqarg(KLibLoader::self()->lastErrorMessage()); break; case KParts::ComponentFactory::ErrNoFactory: reason = i18n("<qt>The library does not export a factory for creating components.</qt>"); @@ -832,13 +832,13 @@ bool KViewPart::openFile() "question. If that does not help, you could file an error report, either to the " "provider of your software (e.g. the vendor of your Linux distribution), or " "directly to the authors of the software. The entry <b>Report Bug...</b> in the " - "<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").arg(m_file).arg(service->library()).arg(mimetype->name()); + "<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").tqarg(m_file).tqarg(service->library()).tqarg(mimetype->name()); TQString caption = i18n("Error Initializing Software Component"); if (reason.isEmpty()) KMessageBox::error(mainWidget, text, caption); else KMessageBox::detailedError(mainWidget, text, reason, caption); - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); return false; } @@ -895,13 +895,13 @@ bool KViewPart::openFile() // Notify the ViewShell about the newly opened file. emit fileOpened(); } else { - m_url = TQString::null; - emit setWindowCaption(TQString::null); + m_url = TQString(); + emit setWindowCaption(TQString()); } checkActions(); - emit zoomChanged(TQString("%1%").arg((int)(_zoomVal.value()*100.0+0.5))); - emit setStatusBarText(TQString::null); + emit zoomChanged(TQString("%1%").tqarg((int)(_zoomVal.value()*100.0+0.5))); + emit setStatusBarText(TQString()); return r; } @@ -946,7 +946,7 @@ bool KViewPart::closeURL() KParts::ReadOnlyPart::closeURL(); multiPage->closeURL(); - m_url = TQString::null; + m_url = TQString(); checkActions(); emit setWindowCaption(""); @@ -994,7 +994,7 @@ void KViewPart::pageInfo(int numpages, int currentpage) updateZoomLevel(); // ATTN: The string here must be the same as in setPage() below - TQString pageString = i18n("Page %1 of %2").arg(currentpage).arg(numpages); + TQString pageString = i18n("Page %1 of %2").tqarg(currentpage).tqarg(numpages); if (pageChangeIsConnected) { emit pageChanged(pageString); emit sizeChanged(pageSizeDescription()); @@ -1132,7 +1132,7 @@ void KViewPart::enableFitToHeight(bool enable) void KViewPart::fitToPage() { - double z = QMIN(multiPage->calculateFitToHeightZoomValue(), + double z = TQMIN(multiPage->calculateFitToHeightZoomValue(), multiPage->calculateFitToWidthZoomValue()); // Check if the methods returned usable values. Values that are not @@ -1382,7 +1382,7 @@ void KViewPart::writeSettings() void KViewPart::connectNotify ( const char *sig ) { - if (TQString(sig).contains("pageChanged")) + if (TQString(sig).tqcontains("pageChanged")) pageChangeIsConnected = true; } @@ -1392,12 +1392,12 @@ void KViewPart::setStatusBarTextFromMultiPage( const TQString &msg ) if (msg.isEmpty()) { if (pageChangeIsConnected) - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); else { int currentPage = multiPage->currentPageNumber(); int numberOfPages = multiPage->numberOfPages(); - emit setStatusBarText(i18n("Page %1 of %2").arg(currentPage).arg(numberOfPages)); + emit setStatusBarText(i18n("Page %1 of %2").tqarg(currentPage).tqarg(numberOfPages)); } } else @@ -1420,26 +1420,26 @@ void KViewPart::aboutKViewShell() aboutDialog = new KAboutDialog(mainWidget, "about_kviewshell"); aboutDialog->setTitle(I18N_NOOP("KViewShell")); aboutDialog->setVersion("0.6"); - aboutDialog->setAuthor("Matthias Hoelzer-Kluepfel", TQString::null, TQString::null, + aboutDialog->setAuthor("Matthias Hoelzer-Kluepfel", TQString(), TQString(), I18N_NOOP("Original Author")); - aboutDialog->addContributor("Matthias Hoelzer-Kluepfel", "mhk@caldera.de", TQString::null, + aboutDialog->addContributor("Matthias Hoelzer-Kluepfel", "mhk@caldera.de", TQString(), I18N_NOOP("Framework")); aboutDialog->addContributor("David Sweet", "dsweet@kde.org", "http://www.chaos.umd.edu/~dsweet", I18N_NOOP("Former KGhostView Maintainer")); - aboutDialog->addContributor("Mark Donohoe", TQString::null, TQString::null, + aboutDialog->addContributor("Mark Donohoe", TQString(), TQString(), I18N_NOOP("KGhostView Author")); - aboutDialog->addContributor("Markku Hihnala", TQString::null, TQString::null, + aboutDialog->addContributor("Markku Hihnala", TQString(), TQString(), I18N_NOOP("Navigation widgets")); - aboutDialog->addContributor("David Faure", TQString::null, TQString::null, + aboutDialog->addContributor("David Faure", TQString(), TQString(), I18N_NOOP("Basis for shell")); - aboutDialog->addContributor("Daniel Duley", TQString::null, TQString::null, + aboutDialog->addContributor("Daniel Duley", TQString(), TQString(), I18N_NOOP("Port to KParts")); - aboutDialog->addContributor("Espen Sand", TQString::null, TQString::null, + aboutDialog->addContributor("Espen Sand", TQString(), TQString(), I18N_NOOP("Dialog boxes")); - aboutDialog->addContributor("Stefan Kebekus", "kebekus@kde.org", TQString::null, + aboutDialog->addContributor("Stefan Kebekus", "kebekus@kde.org", TQString(), I18N_NOOP("DCOP-Interface, major improvements")); - aboutDialog->addContributor("Wilfried Huss", "Wilfried.Huss@gmx.at", TQString::null, + aboutDialog->addContributor("Wilfried Huss", "Wilfried.Huss@gmx.at", TQString(), I18N_NOOP("Interface enhancements")); } aboutDialog->show(); @@ -1491,8 +1491,8 @@ void KViewPart::slotEnableMoveTool(bool enable) } -KViewPartExtension::KViewPartExtension(KViewPart *parent) - : KParts::BrowserExtension( parent, "KViewPartExtension") +KViewPartExtension::KViewPartExtension(KViewPart *tqparent) + : KParts::BrowserExtension( tqparent, "KViewPartExtension") { } diff --git a/kviewshell/kviewpart.h b/kviewshell/kviewpart.h index 446fe47f..bbd6f72c 100644 --- a/kviewshell/kviewpart.h +++ b/kviewshell/kviewpart.h @@ -31,9 +31,10 @@ class TQSize; class KViewPart : public KViewPart_Iface { Q_OBJECT + TQ_OBJECT public: - KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + KViewPart(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args); virtual ~KViewPart(); @@ -239,11 +240,12 @@ private: class KViewPartExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT friend class KViewPart; public: - KViewPartExtension(KViewPart *parent); + KViewPartExtension(KViewPart *tqparent); virtual ~KViewPartExtension() {} }; diff --git a/kviewshell/kviewpart_iface.h b/kviewshell/kviewpart_iface.h index d5603b01..ac7869de 100644 --- a/kviewshell/kviewpart_iface.h +++ b/kviewshell/kviewpart_iface.h @@ -10,9 +10,10 @@ class TQStringList; class KViewPart_Iface : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - KViewPart_Iface(TQObject *parent, const char *name) - : KParts::ReadOnlyPart(parent, name) {} + KViewPart_Iface(TQObject *tqparent, const char *name) + : KParts::ReadOnlyPart(tqparent, name) {} virtual ~KViewPart_Iface() {} diff --git a/kviewshell/kviewshell.cpp b/kviewshell/kviewshell.cpp index 968fd365..e3bde285 100644 --- a/kviewshell/kviewshell.cpp +++ b/kviewshell/kviewshell.cpp @@ -53,15 +53,15 @@ KViewShell::KViewShell(const TQString& defaultMimeType) // Try to load KLibFactory *factory = KLibLoader::self()->factory("kviewerpart"); if (factory) { - if (defaultMimeType == TQString::null) + if (defaultMimeType == TQString()) { - view = (KViewPart_Iface*) factory->create(this, "kviewerpart", "KViewPart"); + view = (KViewPart_Iface*) factory->create(TQT_TQOBJECT(this), "kviewerpart", "KViewPart"); } else { TQStringList args; args << defaultMimeType; - view = (KViewPart_Iface*) factory->create(this, "kviewerpart", "KViewPart", args); + view = (KViewPart_Iface*) factory->create(TQT_TQOBJECT(this), "kviewerpart", "KViewPart", args); } if (!view) ::exit(-1); @@ -73,24 +73,24 @@ KViewShell::KViewShell(const TQString& defaultMimeType) setCentralWidget(view->widget()); // file menu - KStdAction::open(view, TQT_SLOT(slotFileOpen()), actionCollection()); - recent = KStdAction::openRecent (this, TQT_SLOT(openURL(const KURL &)), actionCollection()); + KStdAction::open(TQT_TQOBJECT(view), TQT_SLOT(slotFileOpen()), actionCollection()); + recent = KStdAction::openRecent (TQT_TQOBJECT(this), TQT_SLOT(openURL(const KURL &)), actionCollection()); reloadAction = new KAction(i18n("Reload"), "reload", CTRL + Key_R, view, TQT_SLOT(reload()), actionCollection(), "reload"); - closeAction = KStdAction::close(this, TQT_SLOT(slotFileClose()), actionCollection()); - KStdAction::quit (this, TQT_SLOT(slotQuit()), actionCollection()); + closeAction = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotFileClose()), actionCollection()); + KStdAction::quit (TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); connect(view, TQT_SIGNAL(fileOpened()), this, TQT_SLOT(addRecentFile())); // view menu - fullScreenAction = KStdAction::fullScreen(this, TQT_SLOT(slotFullScreen()), actionCollection(), this, "fullscreen" ); + fullScreenAction = KStdAction::fullScreen(TQT_TQOBJECT(this), TQT_SLOT(slotFullScreen()), actionCollection(), this, "fullscreen" ); // settings menu createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); - KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbar()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotEditToolbar()), actionCollection()); // statusbar connects connect( view, TQT_SIGNAL( zoomChanged(const TQString &) ), this,TQT_SLOT( slotChangeZoomText(const TQString &) ) ); @@ -229,7 +229,7 @@ void KViewShell::addRecentFile() KURL actualURL = view->url(); // To store the URL in the list of recent files, we remove the // reference part. - actualURL.setRef(TQString::null); + actualURL.setRef(TQString()); recent->addURL(actualURL); checkActions(); } @@ -357,7 +357,7 @@ void KViewShell::keyPressEvent(TQKeyEvent *event) { // The Escape Key is used to return to normal mode from fullscreen // mode - if ((event->key() == Qt::Key_Escape) && (fullScreenAction->isChecked())) { + if ((event->key() == TQt::Key_Escape) && (fullScreenAction->isChecked())) { showNormal(); return; } diff --git a/kviewshell/kviewshell.h b/kviewshell/kviewshell.h index 89131db8..1da78c20 100644 --- a/kviewshell/kviewshell.h +++ b/kviewshell/kviewshell.h @@ -16,12 +16,13 @@ class TQLabel; class KViewShell : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: KStatusBar *statusbar; KStatusBar *action; - KViewShell(const TQString& defaultMimeType = TQString::null); + KViewShell(const TQString& defaultMimeType = TQString()); virtual ~KViewShell(); public slots: diff --git a/kviewshell/main.cpp b/kviewshell/main.cpp index 1a858049..8c62efdd 100644 --- a/kviewshell/main.cpp +++ b/kviewshell/main.cpp @@ -88,13 +88,13 @@ int main(int argc, char **argv) KURL url(args->url(0)); if (!args->url(0).isValid()) { - kdError(1223) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl; + kdError(1223) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).tqarg(args->arg(0)) << endl; return -1; } if (!args->url(0).isLocalFile()) { kdError(1223) << TQString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local " - "files if you are using the '--unique' option.")).arg(args->arg(0)) << endl; + "files if you are using the '--unique' option.")).tqarg(args->arg(0)) << endl; return -1; } @@ -107,7 +107,7 @@ int main(int argc, char **argv) QCStringList apps = app.dcopClient()->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - if ((*it).find("kviewshell") == 0) + if ((*it).tqfind("kviewshell") == 0) { TQByteArray data, replyData; TQCString replyType; diff --git a/kviewshell/marklist.cpp b/kviewshell/marklist.cpp index a9c7518a..041997f1 100644 --- a/kviewshell/marklist.cpp +++ b/kviewshell/marklist.cpp @@ -55,9 +55,9 @@ TQPixmap* waitIcon = 0; /****** ThumbnailWidget ******/ ThumbnailWidget::ThumbnailWidget(MarkListWidget* _parent, const PageNumber& _pageNumber, DocumentPageCache* _pageCache) - : TQWidget(_parent), pageNumber(_pageNumber), pageCache(_pageCache), parent(_parent) + : TQWidget(_parent), pageNumber(_pageNumber), pageCache(_pageCache), tqparent(_parent) { - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); needsUpdating = true; @@ -69,11 +69,11 @@ ThumbnailWidget::ThumbnailWidget(MarkListWidget* _parent, const PageNumber& _pag void ThumbnailWidget::paintEvent(TQPaintEvent* e) { - // Only repaint if the widget is really visible. We need to check this because Qt + // Only tqrepaint if the widget is really visible. We need to check this because TQt // sends paintEvents to all widgets that have ever been visible in the Scrollview // whenever the ScrollView is resized. This also increases the percieved performance // only thumbnails that are really needed are rendered. - if (!parent->isVisible()) + if (!tqparent->isVisible()) { //kdDebug() << "Abort Thumbnail drawing for page " << pageNumber << endl; return; @@ -83,9 +83,9 @@ void ThumbnailWidget::paintEvent(TQPaintEvent* e) p.setClipRect(e->rect()); // Paint a black border around the widget - p.setRasterOp(Qt::CopyROP); + p.setRasterOp(TQt::CopyROP); p.setBrush(NoBrush); - p.setPen(Qt::black); + p.setPen(TQt::black); p.drawRect(rect()); // Remove 1 pixel from all sides of the rectangle, to eliminate overdraw with @@ -99,7 +99,7 @@ void ThumbnailWidget::paintEvent(TQPaintEvent* e) if (KVSPrefs::changeColors() && KVSPrefs::renderMode() == KVSPrefs::EnumRenderMode::Paper) p.fillRect(thumbRect, KVSPrefs::paperColor()); else - p.fillRect(thumbRect, Qt::white); + p.fillRect(thumbRect, TQt::white); // Draw busy indicator. // Im not really sure if this is a good idea. @@ -138,7 +138,7 @@ void ThumbnailWidget::resizeEvent(TQResizeEvent*) void ThumbnailWidget::setThumbnail() { - if (!parent->isVisible()) + if (!tqparent->isVisible()) { // We only want to calculate the thumbnail for widgets that are currently visible. // When we are fast scrolling thru the document. Many paint events are created, that @@ -169,23 +169,23 @@ MarkListWidget::MarkListWidget(TQWidget* _parent, MarkList* _markList, const Pag : TQWidget(_parent), showThumbnail(_showThumbnail), pageNumber(_pageNumber), pageCache(_pageCache), markList(_markList) { - TQBoxLayout* layout = new TQVBoxLayout(this, margin); + TQBoxLayout* tqlayout = new TQVBoxLayout(this, margin); thumbnailWidget = 0; if (showThumbnail) { thumbnailWidget = new ThumbnailWidget(this, pageNumber, pageCache); - layout->addWidget(thumbnailWidget, 1, Qt::AlignTop); + tqlayout->addWidget(thumbnailWidget, 1, TQt::AlignTop); } - TQBoxLayout* bottomLayout = new TQHBoxLayout(layout); + TQBoxLayout* bottomLayout = new TQHBoxLayout(tqlayout); - checkBox = new TQCheckBox(TQString::null, this ); - checkBox->setFocusPolicy(TQWidget::NoFocus); + checkBox = new TQCheckBox(TQString(), this ); + checkBox->setFocusPolicy(TQ_NoFocus); TQToolTip::add(checkBox, i18n("Select for printing")); - bottomLayout->addWidget(checkBox, 0, Qt::AlignAuto); + bottomLayout->addWidget(checkBox, 0, TQt::AlignAuto); - pageLabel = new TQLabel(TQString("%1").arg(pageNumber), this); + pageLabel = new TQLabel(TQString("%1").tqarg(pageNumber), this); bottomLayout->addWidget(pageLabel, 1); _backgroundColor = KGlobalSettings::baseColor(); @@ -217,18 +217,18 @@ void MarkListWidget::setChecked( bool checked ) void MarkListWidget::setSelected( bool selected ) { if (selected) - setPaletteBackgroundColor( TQApplication::palette().active().highlight() ); + setPaletteBackgroundColor( TQApplication::tqpalette().active().highlight() ); else setPaletteBackgroundColor( _backgroundColor ); } int MarkListWidget::setNewWidth(int width) { - int height = QMAX(checkBox->height(), pageLabel->height()) + 2*margin; + int height = TQMAX(checkBox->height(), pageLabel->height()) + 2*margin; if (showThumbnail) { // Calculate size of Thumbnail - int thumbnailWidth = QMIN(width, KVSPrefs::maxThumbnailWidth()); + int thumbnailWidth = TQMIN(width, KVSPrefs::maxThumbnailWidth()); int thumbnailHeight = (int)((thumbnailWidth - 2*margin - 2) / pageCache->sizeOfPage(pageNumber).aspectRatio() + 0.5) + 2; // Resize Thumbnail if necessary @@ -258,11 +258,11 @@ bool MarkListWidget::isVisible() void MarkListWidget::mousePressEvent(TQMouseEvent* e) { // Select Page - if (e->button() == LeftButton) + if (e->button() == Qt::LeftButton) { emit selected(pageNumber); } - else if (e->button() == RightButton) + else if (e->button() == Qt::RightButton) { emit showPopupMenu(pageNumber, e->globalPos()); } @@ -272,21 +272,21 @@ void MarkListWidget::mousePressEvent(TQMouseEvent* e) /****** MarkList ******/ -MarkList::MarkList(TQWidget* parent, const char* name) - : TQScrollView(parent, name), clickedThumbnail(0), showThumbnails(true), contextMenu(0) +MarkList::MarkList(TQWidget* tqparent, const char* name) + : TQScrollView(tqparent, name), clickedThumbnail(0), showThumbnails(true), contextMenu(0) { currentPage = PageNumber::invalidPage; widgetList.setAutoDelete(true); - setFocusPolicy( TQWidget::StrongFocus ); - //viewport()->setFocusPolicy( TQWidget::WheelFocus ); + setFocusPolicy( TQ_StrongFocus ); + //viewport()->setFocusPolicy( TQ_WheelFocus ); setResizePolicy(TQScrollView::Manual); setVScrollBarMode(TQScrollView::AlwaysOn); setHScrollBarMode(TQScrollView::AlwaysOff); - setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); + tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); - viewport()->setBackgroundMode(Qt::PaletteBase); + viewport()->setBackgroundMode(TQt::PaletteBase); enableClipper(true); } @@ -502,7 +502,7 @@ void MarkList::updateWidgetSize(const PageNumber& pageNumber) void MarkList::mousePressEvent(TQMouseEvent* e) { - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) { // We call showPopupMenu with an invalid pageNumber to indicate that // the mouse does not point at a thumbnailWidget. @@ -542,7 +542,7 @@ void MarkList::slotShowThumbnails(bool show) } -void MarkList::repaintThumbnails() +void MarkList::tqrepaintThumbnails() { bool show = showThumbnails; int numOfPages = widgetList.count(); diff --git a/kviewshell/marklist.h b/kviewshell/marklist.h index dd8c07a4..5e51d694 100644 --- a/kviewshell/marklist.h +++ b/kviewshell/marklist.h @@ -40,12 +40,13 @@ class MarkListWidget; /****** ThumbnailWidget ******/ -class ThumbnailWidget : public QWidget +class ThumbnailWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ThumbnailWidget(MarkListWidget* parent_, const PageNumber& _pageNumber, DocumentPageCache*); + ThumbnailWidget(MarkListWidget* tqparent_, const PageNumber& _pageNumber, DocumentPageCache*); private: virtual void paintEvent(TQPaintEvent*); @@ -61,7 +62,7 @@ private: DocumentPageCache* pageCache; - MarkListWidget* parent; + MarkListWidget* tqparent; TQPixmap thumbnail; }; @@ -70,9 +71,10 @@ private: /****** MarkListWidget ******/ -class MarkListWidget : public QWidget +class MarkListWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: MarkListWidget(TQWidget* _parent, MarkList*, const PageNumber& _pageNumber, DocumentPageCache*, bool _showThumbnail = true); @@ -121,12 +123,13 @@ private: /****** MarkList ******/ -class MarkList: public QScrollView +class MarkList: public TQScrollView { Q_OBJECT + TQ_OBJECT public: - MarkList(TQWidget* parent = 0, const char* name = 0); + MarkList(TQWidget* tqparent = 0, const char* name = 0); virtual ~MarkList(); void setPageCache(DocumentPageCache*); @@ -137,7 +140,7 @@ public: PageNumber numberOfPages() { return widgetList.count(); } - virtual TQSize sizeHint() const { return TQSize(); } + virtual TQSize tqsizeHint() const { return TQSize(); } public slots: void setNumberOfPages(int numberOfPages, bool showThumbnails = true); @@ -148,7 +151,7 @@ public slots: void clear(); void slotShowThumbnails(bool); - void repaintThumbnails(); + void tqrepaintThumbnails(); void updateWidgetSize(const PageNumber&); diff --git a/kviewshell/optionDialogAccessibilityWidget.ui b/kviewshell/optionDialogAccessibilityWidget.ui index 43490028..aec982e2 100644 --- a/kviewshell/optionDialogAccessibilityWidget.ui +++ b/kviewshell/optionDialogAccessibilityWidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>optionDialogAccessibilityWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>optionDialogAccessibilityWidget</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>kcfg_ChangeColors</cstring> </property> @@ -44,7 +44,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>warn</cstring> </property> @@ -70,7 +70,7 @@ <enum>PlainText</enum> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_RenderMode</cstring> </property> @@ -101,7 +101,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioInverted</cstring> </property> @@ -112,7 +112,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioNormal</cstring> </property> @@ -120,9 +120,9 @@ <string>Change &paper color</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -138,14 +138,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -180,7 +180,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -189,7 +189,7 @@ </spacer> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioRecolor</cstring> </property> @@ -197,9 +197,9 @@ <string>&Change dark and light colors</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> @@ -218,7 +218,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> @@ -246,7 +246,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -274,14 +274,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -302,14 +302,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -322,7 +322,7 @@ </widget> </grid> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioContrast</cstring> </property> @@ -330,15 +330,15 @@ <string>Convert to &black and white</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -359,7 +359,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -376,14 +376,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QSlider" row="1" column="2"> + <widget class="TQSlider" row="1" column="2"> <property name="name"> <cstring>kcfg_BWContrast</cstring> </property> @@ -405,7 +405,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QSlider" row="0" column="2"> + <widget class="TQSlider" row="0" column="2"> <property name="name"> <cstring>kcfg_BWThreshold</cstring> </property> @@ -427,7 +427,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -519,7 +519,7 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="5" margin="11"/> +<tqlayoutdefaults spacing="5" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/kviewshell/optionDialogGUIWidget_base.ui b/kviewshell/optionDialogGUIWidget_base.ui index cd8fba19..1d37dd34 100644 --- a/kviewshell/optionDialogGUIWidget_base.ui +++ b/kviewshell/optionDialogGUIWidget_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>optionDialogGUIWidget_base</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>optionDialogGUIWidget_base</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>Enabled</string> @@ -47,7 +47,7 @@ </ul></qt></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -63,7 +63,7 @@ <string>Underline links:</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_ShowThumbnails</cstring> </property> @@ -71,7 +71,7 @@ <string>Show &thumbnail previews</string> </property> </widget> - <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -82,7 +82,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>rowLabel</cstring> </property> @@ -98,7 +98,7 @@ <string>Rows:</string> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>kcfg_OverviewModeColumns</cstring> </property> @@ -109,7 +109,7 @@ <number>3</number> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>kcfg_OverviewModeRows</cstring> </property> @@ -120,7 +120,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>columnLabel</cstring> </property> @@ -144,5 +144,5 @@ <tabstop>kcfg_OverviewModeRows</tabstop> <tabstop>kcfg_OverviewModeColumns</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kviewshell/pageNumber.h b/kviewshell/pageNumber.h index 161760fc..9fd48dc6 100644 --- a/kviewshell/pageNumber.h +++ b/kviewshell/pageNumber.h @@ -17,8 +17,8 @@ /** \brief Class to represent a page number -The class PageNumber is really nothing but an alias for Q_UINT16, and -can be casted to and from Q_UINT16. It is used in kviewshell to remind +The class PageNumber is really nothing but an alias for TQ_UINT16, and +can be casted to and from TQ_UINT16. It is used in kviewshell to remind the programmer of the convention that page numbers start at '1' (for 'first page'), and that the value '0' means 'illegal page number' or 'no page number'. Accordingly, the value '0' is also named @@ -43,13 +43,13 @@ class PageNumber @param num page number that is set initially */ - PageNumber(Q_UINT16 num) {pgNum = num;} + PageNumber(TQ_UINT16 num) {pgNum = num;} - /** \brief this method implements typecasts from Q_UINT16 */ - PageNumber &operator=(const Q_UINT16 p) { pgNum = p; return *this; } + /** \brief this method implements typecasts from TQ_UINT16 */ + PageNumber &operator=(const TQ_UINT16 p) { pgNum = p; return *this; } - /** \brief This method implements typecasts to Q_UINT16 */ - operator Q_UINT16() const { return pgNum; } + /** \brief This method implements typecasts to TQ_UINT16 */ + operator TQ_UINT16() const { return pgNum; } /** \brief Checks if the page number is invalid @@ -59,7 +59,7 @@ class PageNumber private: /** \brief Single number that represents the page number */ - Q_UINT16 pgNum; + TQ_UINT16 pgNum; }; #endif diff --git a/kviewshell/pageSize.cpp b/kviewshell/pageSize.cpp index 43e21f74..a3e65459 100644 --- a/kviewshell/pageSize.cpp +++ b/kviewshell/pageSize.cpp @@ -77,10 +77,10 @@ bool pageSize::setPageSize(const TQString& name) } } - // Check if the string contains 'x'. If yes, we assume it is of type + // Check if the string tqcontains 'x'. If yes, we assume it is of type // "<number>x<number>". If yes, the first number is interpreted as // the width in mm, the second as the height in mm - if (name.find('x') >= 0) { + if (name.tqfind('x') >= 0) { bool wok, hok; float pageWidth_tmp = name.section('x',0,0).toFloat(&wok); float pageHeight_tmp = name.section('x',1,1).toFloat(&hok); @@ -95,10 +95,10 @@ bool pageSize::setPageSize(const TQString& name) } } - // Check if the string contains ','. If yes, we assume it is of type + // Check if the string tqcontains ','. If yes, we assume it is of type // "<number><unit>,<number><uni>". The first number is supposed to // be the width, the second the height. - if (name.find(',') >= 0) { + if (name.tqfind(',') >= 0) { bool wok, hok; float pageWidth_tmp = distance::convertToMM(name.section(',',0,0), &wok); float pageHeight_tmp = distance::convertToMM(name.section(',',1,1), &hok); @@ -263,7 +263,7 @@ TQString pageSize::formatName() const if (currentSize >= 0) return staticList[currentSize].name; else - return TQString::null; + return TQString(); } @@ -304,7 +304,7 @@ TQString pageSize::serialize() const if ((currentSize >= 0) && (fabs(staticList[currentSize].height-pageHeight.getLength_in_mm()) <= 0.5)) return staticList[currentSize].name; else - return TQString("%1x%2").arg(pageWidth.getLength_in_mm()).arg(pageHeight.getLength_in_mm()); + return TQString("%1x%2").tqarg(pageWidth.getLength_in_mm()).tqarg(pageHeight.getLength_in_mm()); } diff --git a/kviewshell/pageSize.h b/kviewshell/pageSize.h index 27b30501..fe0f8c62 100644 --- a/kviewshell/pageSize.h +++ b/kviewshell/pageSize.h @@ -41,6 +41,7 @@ The main difference to the SimplePageSize class are the following. class pageSize : public TQObject, public SimplePageSize { Q_OBJECT + TQ_OBJECT public: /** \brief Default constructor, initializes the pageSize with a @@ -64,7 +65,7 @@ public: call pageSizeNames() more than once, it is guaranteed that the same list of strings will be returned. - @returns TQStringList that contains + @returns TQStringList that tqcontains */ TQStringList pageSizeNames(); @@ -188,8 +189,8 @@ public: 297x210. @returns A name for the current page size, if the format has a - name, or TQString::null otherwise. If the result is not - TQString::null, it is guaranteed to be one of the strings + name, or TQString() otherwise. If the result is not + TQString(), it is guaranteed to be one of the strings returned by the pageSizeNames() method. */ TQString formatName() const; diff --git a/kviewshell/pageSizeDialog.cpp b/kviewshell/pageSizeDialog.cpp index 75c4409d..a059804a 100644 --- a/kviewshell/pageSizeDialog.cpp +++ b/kviewshell/pageSizeDialog.cpp @@ -25,13 +25,13 @@ #include "pageSizeWidget.h" -pageSizeDialog::pageSizeDialog( TQWidget *parent, pageSize *userPrefdPageSize, const char *name, bool modal) - :KDialogBase( parent, name, modal, i18n("Page Size"), Ok|Apply|Cancel, Ok, +pageSizeDialog::pageSizeDialog( TQWidget *tqparent, pageSize *userPrefdPageSize, const char *name, bool modal) + :KDialogBase( tqparent, name, modal, i18n("Page Size"), Ok|Apply|Cancel, Ok, true ) { userPreferredPageSize = userPrefdPageSize; pageSizeW = new pageSizeWidget(this, "PageSizeWidget"); - pageSizeW->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, + pageSizeW->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, pageSizeW->sizePolicy().hasHeightForWidth() ) ); setMainWidget(pageSizeW); } diff --git a/kviewshell/pageSizeDialog.h b/kviewshell/pageSizeDialog.h index 50e8c0b6..f1b45a56 100644 --- a/kviewshell/pageSizeDialog.h +++ b/kviewshell/pageSizeDialog.h @@ -29,6 +29,7 @@ class pageSize; class pageSizeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: // Constructs the page size Dialog. The pointer userPrefdPageSize @@ -36,7 +37,7 @@ public: // value whenever the user clicks on 'accept' or 'ok'. Programmers // can then connect to the signal sizeChanged() of the object to be // informed about the changes. - pageSizeDialog( TQWidget *parent=0, pageSize *userPrefdPageSize=0, const char *name=0, bool modal=true); + pageSizeDialog( TQWidget *tqparent=0, pageSize *userPrefdPageSize=0, const char *name=0, bool modal=true); void setPageSize(const TQString&); protected slots: diff --git a/kviewshell/pageSizeWidget.cpp b/kviewshell/pageSizeWidget.cpp index a745d1ef..5446fd53 100644 --- a/kviewshell/pageSizeWidget.cpp +++ b/kviewshell/pageSizeWidget.cpp @@ -21,18 +21,18 @@ -// Constructs a pageSizeWidget_base which is a child of 'parent', with +// Constructs a pageSizeWidget_base which is a child of 'tqparent', with // the name 'name' and widget flags set to 'f'. -pageSizeWidget::pageSizeWidget( TQWidget* parent, const char* name, WFlags fl ) - : pageSizeWidget_base( parent, name, fl ) +pageSizeWidget::pageSizeWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : pageSizeWidget_base( tqparent, name, fl ) { connect(&chosenSize, TQT_SIGNAL(sizeChanged(const SimplePageSize&)), previewer, TQT_SLOT(setSize(const SimplePageSize&))); - // Set up the formatChoice QComboBox + // Set up the formatChoice TQComboBox formatChoice->insertItem(i18n("Custom Size")); formatChoice->insertStringList(chosenSize.pageSizeNames()); - // Activate the proper entry in the QComboBox + // Activate the proper entry in the TQComboBox if (chosenSize.formatName().isNull()) { orientationChoice->setEnabled(false); formatChoice->setCurrentItem(0); @@ -57,8 +57,8 @@ pageSizeWidget::pageSizeWidget( TQWidget* parent, const char* name, WFlags fl ) // Allow entries between 0 and 1200. More filtering is done by the // pageSize class, which silently ignores values which are out of // range. - widthInput->setValidator(new TQDoubleValidator(0.0, 1200.0, 1, this, "widthValidator")); - heightInput->setValidator(new TQDoubleValidator(0.0, 1200.0, 1, this, "heightValidator")); + widthInput->setValidator(new TQDoubleValidator(0.0, 1200.0, 1, TQT_TQOBJECT(this), "widthValidator")); + heightInput->setValidator(new TQDoubleValidator(0.0, 1200.0, 1, TQT_TQOBJECT(this), "heightValidator")); } @@ -120,7 +120,7 @@ void pageSizeWidget::unitsChanged(int) if (formatChoice->currentItem() != 0) fillTextFields(); else - input(TQString::null); + input(TQString()); } diff --git a/kviewshell/pageSizeWidget.h b/kviewshell/pageSizeWidget.h index ac95dd4e..987dd3d3 100644 --- a/kviewshell/pageSizeWidget.h +++ b/kviewshell/pageSizeWidget.h @@ -19,9 +19,10 @@ class TQDoubleValidator; class pageSizeWidget : public pageSizeWidget_base { Q_OBJECT + TQ_OBJECT public: - pageSizeWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + pageSizeWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); // Sets the page size. If the dialog is already shown, updates all // the GUI. Accepts the same strings as input as the setPageSize() diff --git a/kviewshell/pageSizeWidget_base.ui b/kviewshell/pageSizeWidget_base.ui index 25cdc648..c5ca5981 100644 --- a/kviewshell/pageSizeWidget_base.ui +++ b/kviewshell/pageSizeWidget_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>pageSizeWidget_base</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>pageSizeWidget_base</cstring> </property> @@ -33,7 +33,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox5</cstring> </property> @@ -56,7 +56,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -64,7 +64,7 @@ <string>Format:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -72,7 +72,7 @@ <string>Width:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -80,7 +80,7 @@ <string>Height:</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>widthInput</cstring> </property> @@ -88,7 +88,7 @@ <string>Width of the chosen paper size in portrait orientation</string> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>heightInput</cstring> </property> @@ -136,12 +136,12 @@ <cstring>widthUnits</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> <property name="text"> - <string>Orientation:</string> + <string>Qt::Orientation:</string> </property> </widget> <widget class="KComboBox" row="0" column="1" rowspan="1" colspan="2"> @@ -166,7 +166,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox6</cstring> </property> @@ -209,7 +209,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>250</width> <height>50</height> @@ -250,7 +250,7 @@ <tabstop>widthUnits</tabstop> <tabstop>heightInput</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/kviewshell/pageView.cpp b/kviewshell/pageView.cpp index 884d7288..81e3ed9b 100644 --- a/kviewshell/pageView.cpp +++ b/kviewshell/pageView.cpp @@ -30,20 +30,20 @@ #include "pageView.h" #include "pageNumber.h" -PageView::PageView( TQWidget* parent, const char* name ) - : TQScrollView( parent, name, WStaticContents | WNoAutoErase) +PageView::PageView( TQWidget* tqparent, const char* name ) + : TQScrollView( tqparent, name, WStaticContents | WNoAutoErase) { moveTool = true; widgetList = 0; - viewport()->setFocusPolicy(TQWidget::StrongFocus); + viewport()->setFocusPolicy(TQ_StrongFocus); setResizePolicy(TQScrollView::Manual); setVScrollBarMode(TQScrollView::Auto); setHScrollBarMode(TQScrollView::Auto); - viewport()->setBackgroundMode(Qt::NoBackground); + viewport()->setBackgroundMode(TQt::NoBackground); setResizePolicy(Manual); setDragAutoScroll(false); @@ -66,7 +66,7 @@ void PageView::addChild( TQPtrVector<DocumentWidget> *wdgList ) } widgetList = wdgList; - layoutPages(); + tqlayoutPages(); } @@ -93,7 +93,7 @@ bool PageView::readUp() DocumentWidget* widget = 0; // Find the widget(s) that intersect the top of the viewport // TODO: It would be better to use a binary search. - for(Q_UINT16 i=0; i<widgetList->size(); i++) + for(TQ_UINT16 i=0; i<widgetList->size(); i++) { widget = widgetList->at(i); if (childY(widget) < top && childY(widget) + widget->height() > top) @@ -103,7 +103,7 @@ bool PageView::readUp() } } - int newValue = QMAX( verticalScrollBar()->value() - (int)(height() * 0.9), + int newValue = TQMAX( verticalScrollBar()->value() - (int)(height() * 0.9), verticalScrollBar()->minValue() ); verticalScrollBar()->setValue( newValue ); return true; @@ -122,7 +122,7 @@ bool PageView::readDown() DocumentWidget* widget = 0; // Find the widget(s) that intersect the bottom of the viewport // TODO: It would be better to use a binary search. - for(Q_UINT16 i=0; i<widgetList->size(); i++) + for(TQ_UINT16 i=0; i<widgetList->size(); i++) { widget = widgetList->at(i); if (childY(widget) < bottom && childY(widget) + widget->height() > bottom) @@ -132,7 +132,7 @@ bool PageView::readDown() } } - int newValue = QMIN( verticalScrollBar()->value() + (int)(height() * 0.9), + int newValue = TQMIN( verticalScrollBar()->value() + (int)(height() * 0.9), verticalScrollBar()->maxValue() ); verticalScrollBar()->setValue( newValue ); @@ -195,11 +195,11 @@ void PageView::keyPressEvent( TQKeyEvent* e ) void PageView::contentsMousePressEvent( TQMouseEvent* e ) { - if (e->button() == LeftButton) + if (e->button() == Qt::LeftButton) { if (moveTool) { - setCursor(Qt::SizeAllCursor); + setCursor(TQt::SizeAllCursor); dragGrabPos = e->globalPos(); } else @@ -209,20 +209,20 @@ void PageView::contentsMousePressEvent( TQMouseEvent* e ) } else { - setCursor(Qt::arrowCursor); + setCursor(TQt::arrowCursor); } } void PageView::contentsMouseReleaseEvent( TQMouseEvent* ) { - setCursor(Qt::arrowCursor); + setCursor(TQt::arrowCursor); } void PageView::contentsMouseMoveEvent( TQMouseEvent* e ) { TQPoint newPos = e->globalPos(); - if (e->state() == LeftButton && moveTool) + if (e->state() == Qt::LeftButton && moveTool) { TQPoint delta = dragGrabPos - newPos; scrollBy(delta.x(), delta.y()); @@ -237,17 +237,17 @@ void PageView::viewportResizeEvent( TQResizeEvent* e ) if (!widgetList) return; - layoutPages(); + tqlayoutPages(); emit viewSizeChanged( viewport()->size() ); } -void PageView::setNrColumns( Q_UINT8 cols ) +void PageView::setNrColumns( TQ_UINT8 cols ) { nrCols = cols; } -void PageView::setNrRows( Q_UINT8 rows ) +void PageView::setNrRows( TQ_UINT8 rows ) { nrRows = rows; } @@ -285,7 +285,7 @@ void PageView::setFullScreenMode(bool fullScreen) backgroundColor = viewport()->paletteBackgroundColor(); if (singlePageFullScreenMode()) { - viewport()->setPaletteBackgroundColor( Qt::black ) ; + viewport()->setPaletteBackgroundColor( TQt::black ) ; } } else @@ -295,7 +295,7 @@ void PageView::setFullScreenMode(bool fullScreen) } } -void PageView::layoutPages(bool zoomChanged) +void PageView::tqlayoutPages(bool zoomChanged) { // Paranoid safety check if (widgetList == 0) @@ -321,29 +321,29 @@ void PageView::layoutPages(bool zoomChanged) distance = 0; } - TQMemArray<Q_UINT32> colWidth(nrCols); - for(Q_UINT8 i=0; i<colWidth.size(); i++) + TQMemArray<TQ_UINT32> colWidth(nrCols); + for(TQ_UINT8 i=0; i<colWidth.size(); i++) colWidth[i] = 0; - Q_UINT16 numRows; + TQ_UINT16 numRows; if(nrCols <= 2) { numRows = (widgetList->size()+2*nrCols-2) / nrCols; } else { - numRows = (Q_INT16)ceil(((double)widgetList->size()) / nrCols); + numRows = (TQ_INT16)ceil(((double)widgetList->size()) / nrCols); } - TQMemArray<Q_UINT32> rowHeight(numRows); - for(Q_UINT16 i=0; i<rowHeight.size(); i++) + TQMemArray<TQ_UINT32> rowHeight(numRows); + for(TQ_UINT16 i=0; i<rowHeight.size(); i++) rowHeight[i] = 0; // Now find the widths and heights of the columns - for(Q_UINT16 i=0; i<widgetList->size(); i++) + for(TQ_UINT16 i=0; i<widgetList->size(); i++) { - Q_UINT8 col; - Q_UINT16 row; + TQ_UINT8 col; + TQ_UINT16 row; if (nrCols == 2) { // In two-column display, start with the right column @@ -354,31 +354,31 @@ void PageView::layoutPages(bool zoomChanged) row = (i+nrCols) / nrCols - 1; } - colWidth[col] = QMAX(colWidth[col], (Q_UINT32)widgetList->at(i)->pageSize().width()); - rowHeight[row] = QMAX(rowHeight[row], (Q_UINT32)widgetList->at(i)->pageSize().height()); + colWidth[col] = TQMAX(colWidth[col], (TQ_UINT32)widgetList->at(i)->pageSize().width()); + rowHeight[row] = TQMAX(rowHeight[row], (TQ_UINT32)widgetList->at(i)->pageSize().height()); } // Calculate the total width and height of the display - Q_UINT32 totalHeight = 0; - for(Q_UINT16 i=0; i<rowHeight.size(); i++) + TQ_UINT32 totalHeight = 0; + for(TQ_UINT16 i=0; i<rowHeight.size(); i++) totalHeight += rowHeight[i]; totalHeight += (numRows+1)*distance; - Q_UINT32 totalWidth = 0; - for(Q_UINT8 i=0; i<colWidth.size(); i++) + TQ_UINT32 totalWidth = 0; + for(TQ_UINT8 i=0; i<colWidth.size(); i++) totalWidth += colWidth[i]; totalWidth += (nrCols+1)*distance; TQSize newViewportSize = viewportSize( totalWidth, totalHeight ); - Q_UINT32 centeringLeft = 0; - if( (Q_UINT32)newViewportSize.width() > totalWidth ) + TQ_UINT32 centeringLeft = 0; + if( (TQ_UINT32)newViewportSize.width() > totalWidth ) centeringLeft = ( newViewportSize.width() - totalWidth )/2; - Q_UINT32 centeringTop = 0; - if( (Q_UINT32)newViewportSize.height() > totalHeight ) + TQ_UINT32 centeringTop = 0; + if( (TQ_UINT32)newViewportSize.height() > totalHeight ) centeringTop = ( newViewportSize.height() - totalHeight)/2; // Resize the viewport - if (((Q_UINT32)contentsWidth() != totalWidth) || ((Q_UINT32)contentsHeight() != totalHeight)) + if (((TQ_UINT32)contentsWidth() != totalWidth) || ((TQ_UINT32)contentsHeight() != totalHeight)) { // Calculate the point in the coordinates of the contents which is currently at the center of the viewport. TQPoint midPoint = TQPoint(visibleWidth() / 2 + contentsX(), visibleHeight() / 2 + contentsY()); @@ -394,20 +394,20 @@ void PageView::layoutPages(bool zoomChanged) // Finally, calculate the left and top coordinates of each row and // column, respectively - TQMemArray<Q_UINT32> colLeft(nrCols); + TQMemArray<TQ_UINT32> colLeft(nrCols); colLeft[0] = distance; - for(Q_UINT8 i=1; i<colLeft.size(); i++) + for(TQ_UINT8 i=1; i<colLeft.size(); i++) colLeft[i] = colLeft[i-1]+colWidth[i-1]+distance; - TQMemArray<Q_UINT32> rowTop(numRows); + TQMemArray<TQ_UINT32> rowTop(numRows); rowTop[0] = distance; - for(Q_UINT16 i=1; i<rowTop.size(); i++) + for(TQ_UINT16 i=1; i<rowTop.size(); i++) rowTop[i] = rowTop[i-1]+rowHeight[i-1]+distance; - for(Q_UINT16 i=0; i<widgetList->size(); i++) + for(TQ_UINT16 i=0; i<widgetList->size(); i++) { - Q_UINT8 col; - Q_UINT16 row; + TQ_UINT8 col; + TQ_UINT16 row; if (nrCols == 2) { // In two column-mode start with the right column. @@ -499,10 +499,10 @@ void PageView::viewportPaintEvent(TQPaintEvent* e) DocumentWidget* item = widgetList->at(i); // Check if the Widget needs to be updated. - if (!item->geometry().intersects(e->rect())) + if (!item->tqgeometry().intersects(e->rect())) continue; - TQRect widgetGeometry = item->geometry(); + TQRect widgetGeometry = item->tqgeometry(); // Draw the widget. if (e->rect().intersects(widgetGeometry)) @@ -521,10 +521,10 @@ void PageView::viewportPaintEvent(TQPaintEvent* e) // Paint the background. TQPainter p(viewport()); - TQMemArray<TQRect> backgroundRects = backgroundArea.rects(); + TQMemArray<TQRect> backgroundRects = backgroundArea.tqrects(); for (unsigned int i = 0; i < backgroundRects.count(); i++) - p.fillRect(backgroundRects[i], colorGroup().mid()); + p.fillRect(backgroundRects[i], tqcolorGroup().mid()); } @@ -542,7 +542,7 @@ void PageView::calculateCurrentPageNumber(int x, int y) int maxVisiblePixels = 0; DocumentWidget* _currentWidget = 0; - for (Q_UINT16 i = 0; i < widgetList->size(); i++) + for (TQ_UINT16 i = 0; i < widgetList->size(); i++) { DocumentWidget* documentWidget = widgetList->at(i); // Safety check diff --git a/kviewshell/pageView.h b/kviewshell/pageView.h index e2dfd59e..a7d2ad15 100644 --- a/kviewshell/pageView.h +++ b/kviewshell/pageView.h @@ -34,20 +34,21 @@ class PageNumber; * PageView is a customized TQScrollView, which can hold one * page. This page will be centered on the viewport. */ -class PageView : public QScrollView +class PageView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - PageView( TQWidget* parent = 0, const char* name = 0 ); + PageView( TQWidget* tqparent = 0, const char* name = 0 ); ~PageView() {} void addChild( TQPtrVector<DocumentWidget> *wdgList ); /** Sets the number of columns into which the widgets are aligned. If nothing is set, '2' is the default. */ - void setNrColumns( Q_UINT8 cols ); - void setNrRows( Q_UINT8 rows ); + void setNrColumns( TQ_UINT8 cols ); + void setNrRows( TQ_UINT8 rows ); void setContinuousViewMode(bool continuous); bool fullScreenMode() { return fullScreen; } @@ -71,9 +72,9 @@ public: widgets. The number i returned always satisfies 1 <= i <= nrCols, where nrCols is the private variable of the same nane. */ - Q_UINT8 getNrColumns() const { return (widgetList==0) ? 1 : QMIN(nrCols, QMAX(1, widgetList->size())); } + TQ_UINT8 getNrColumns() const { return (widgetList==0) ? 1 : TQMIN(nrCols, TQMAX(1, widgetList->size())); } - Q_UINT8 getNrRows() const { return nrRows; } + TQ_UINT8 getNrRows() const { return nrRows; } bool isContinuous() const { return continuousViewmode; } /** Return true if the top resp. bottom of the page is visible. */ @@ -105,9 +106,9 @@ public slots: /** Turn the scrollbars on/off. */ void slotShowScrollbars(bool); - /** Set layout of the page widgets according to the current viewmode and zoomlevel. - Set zoomChanged = true if the the layout needs updateing because the zoomlevel has changed. */ - void layoutPages(bool zoomChanged = false); + /** Set tqlayout of the page widgets according to the current viewmode and zoomlevel. + Set zoomChanged = true if the the tqlayout needs updateing because the zoomlevel has changed. */ + void tqlayoutPages(bool zoomChanged = false); void slotEnableMoveTool(bool enable); @@ -150,8 +151,8 @@ private: /** Used internally by the centerContents()-method. Set with the setNrColumns() method */ - Q_UINT8 nrCols; - Q_UINT8 nrRows; + TQ_UINT8 nrCols; + TQ_UINT8 nrRows; bool continuousViewmode; bool fullScreen; diff --git a/kviewshell/plugins/djvu/djvumultipage.cpp b/kviewshell/plugins/djvu/djvumultipage.cpp index 0f0c7074..dbe68aaa 100644 --- a/kviewshell/plugins/djvu/djvumultipage.cpp +++ b/kviewshell/plugins/djvu/djvumultipage.cpp @@ -47,9 +47,9 @@ typedef KParts::GenericFactory<DjVuMultiPage> DjVuMultiPageFactory; K_EXPORT_COMPONENT_FACTORY(djvuviewpart, DjVuMultiPageFactory) -DjVuMultiPage::DjVuMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, +DjVuMultiPage::DjVuMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList&) - : KMultiPage(parentWidget, widgetName, parent, name), djvuRenderer(parentWidget) + : KMultiPage(tqparentWidget, widgetName, tqparent, name), djvuRenderer(tqparentWidget) { /* This is kparts wizardry that cannot be understood by man. Simply change the names to match your implementation. */ @@ -162,7 +162,7 @@ void DjVuMultiPage::slotDeletePages() if (numberOfPages() == 0) return; - KDialogBase dialog( parentWdg, "urldialog", true, i18n("Delete Pages"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); + KDialogBase dialog( tqparentWdg, "urldialog", true, i18n("Delete Pages"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); PageRangeWidget range( 1, numberOfPages(), currentPageNumber(), &dialog, "range widget" ); TQToolTip::add( &range, i18n( "Select the pages you wish to delete." ) ); dialog.setButtonOK(i18n("Delete Pages")); @@ -188,7 +188,7 @@ void DjVuMultiPage::slotDeletePages() //@@@@@@@@@@ tableOfContents->setContents(renderer->getBookmarks()); // Clear Statusbar - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); } @@ -220,7 +220,7 @@ void DjVuMultiPage::print() printer->addDialogPage( conversionOptions ); // initialize the printer using the print dialog - if ( printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1))) ) { + if ( printer->setup(tqparentWdg, i18n("Print %1").tqarg(m_file.section('/', -1))) ) { // Now do the printing. TQValueList<int> pageList = printer->pageList(); if (pageList.isEmpty()) @@ -228,7 +228,7 @@ void DjVuMultiPage::print() else { // Printing usually takes a while. This is to keep the GUI // updated. - qApp->processEvents(); + tqApp->processEvents(); // Printing... DjVuToPS converter; @@ -279,7 +279,7 @@ void DjVuMultiPage::print() else options.set_zoom(100); - KTempFile tmpPSFile(TQString::null, "ps"); + KTempFile tmpPSFile(TQString(), "ps"); tmpPSFile.close(); tmpPSFile.setAutoDelete(true); @@ -314,27 +314,27 @@ void DjVuMultiPage::slotSave() // Try to guess the proper ending... TQString formats; TQString ending; - int rindex = m_file.findRev("."); + int rindex = m_file.tqfindRev("."); if (rindex == -1) { - ending = TQString::null; - formats = TQString::null; + ending = TQString(); + formats = TQString(); } else { ending = m_file.mid(rindex); // e.g. ".dvi" formats = fileFormats().grep(ending).join("\n"); } - TQString fileName = KFileDialog::getSaveFileName(TQString::null, formats, 0, i18n("Save File As")); + TQString fileName = KFileDialog::getSaveFileName(TQString(), formats, 0, i18n("Save File As")); if (fileName.isEmpty()) return; // Add the ending to the filename. I hope the user likes it that // way. - if (!ending.isEmpty() && fileName.find(ending) == -1) + if (!ending.isEmpty() && fileName.tqfind(ending) == -1) fileName = fileName+ending; if (TQFile(fileName).exists()) { - int r = KMessageBox::warningContinueCancel(parentWdg, i18n("The file %1\nalready exists. Do you want to overwrite it?").arg(fileName), + int r = KMessageBox::warningContinueCancel(tqparentWdg, i18n("The file %1\nalready exists. Do you want to overwrite it?").tqarg(fileName), i18n("Overwrite File"), i18n("Overwrite")); if (r == KMessageBox::Cancel) return; @@ -344,8 +344,8 @@ void DjVuMultiPage::slotSave() /* if (!djvuRenderer.save(fileName) == false) - KMessageBox::error( parentWdg, - i18n("<qt><strong>File error.</strong> Unable to write to the specified file '%1'. The document is <strong>not</strong> saved.</qt>").arg(fileName), + KMessageBox::error( tqparentWdg, + i18n("<qt><strong>File error.</strong> Unable to write to the specified file '%1'. The document is <strong>not</strong> saved.</qt>").tqarg(fileName), i18n("File Error")); */ diff --git a/kviewshell/plugins/djvu/djvumultipage.h b/kviewshell/plugins/djvu/djvumultipage.h index c460e6b3..83e94e40 100644 --- a/kviewshell/plugins/djvu/djvumultipage.h +++ b/kviewshell/plugins/djvu/djvumultipage.h @@ -87,6 +87,7 @@ required. class DjVuMultiPage : public KMultiPage { Q_OBJECT + TQ_OBJECT public: /** Constructor @@ -95,7 +96,7 @@ public: kmultipage. Please have a look at the constructor's source code to see how to adjust this for your implementation. */ - DjVuMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, + DjVuMultiPage(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList& args = TQStringList()); /** Destructor diff --git a/kviewshell/plugins/djvu/djvurenderer.cpp b/kviewshell/plugins/djvu/djvurenderer.cpp index 49413818..e1cbd044 100644 --- a/kviewshell/plugins/djvu/djvurenderer.cpp +++ b/kviewshell/plugins/djvu/djvurenderer.cpp @@ -44,14 +44,14 @@ //#define KF_DEBUG -inline GUTF8String GStringFromQString(const TQString& x) +inline GUTF8String GStringFromTQString(const TQString& x) { GUTF8String retval=(const char*)x.utf8(); return retval; } -inline TQString QStringFromGString(const GUTF8String& x) +inline TQString TQStringFromGString(const GUTF8String& x) { TQString retval=TQString::fromUtf8((const char*)x); return retval; @@ -62,7 +62,7 @@ DjVuRenderer::DjVuRenderer(TQWidget* par) : DocumentRenderer(par) { #ifdef KF_DEBUG - kdError() << "DjVuRenderer( parent=" << par << " )" << endl; + kdError() << "DjVuRenderer( tqparent=" << par << " )" << endl; #endif PPMstream = ByteStream::create(); @@ -168,7 +168,7 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page) { kdError() << "loading failed" << endl; //draw an empty page - foreGroundPaint->fillRect(0, 0, pageWidth, pageHeight, Qt::white); + foreGroundPaint->fillRect(0, 0, pageWidth, pageHeight, TQt::white); } foreGroundPaint->drawPixmap(0, 0, pixmap); delete[] buf; @@ -206,7 +206,7 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page) { kdError() << "loading failed" << endl; //draw an empty page - foreGroundPaint->fillRect(0, 0, pageWidth, pageHeight, Qt::white); + foreGroundPaint->fillRect(0, 0, pageWidth, pageHeight, TQt::white); } foreGroundPaint->drawPixmap(0, 0, pixmap); delete[] buf; @@ -225,7 +225,7 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page) else { //draw an empty page - foreGroundPaint->fillRect(0, 0, pageWidth, pageHeight, Qt::white); + foreGroundPaint->fillRect(0, 0, pageWidth, pageHeight, TQt::white); } } @@ -270,8 +270,8 @@ bool DjVuRenderer::setFile(const TQString &fname, const KURL &) TQFileInfo fi(fname); TQString filename = fi.absFilePath(); if (!fi.exists() || fi.isDir()) { - KMessageBox::error( parentWidget, - i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").arg(filename), + KMessageBox::error( tqparentWidget, + i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").tqarg(filename), i18n("File Error")); // the return value 'false' indicates that this operation was not successful. return false; @@ -282,7 +282,7 @@ bool DjVuRenderer::setFile(const TQString &fname, const KURL &) // Now we assume that the file is fine and load the file. G_TRY { - document = DjVuDocEditor::create_wait(GURL::Filename::UTF8(GStringFromQString(filename))); + document = DjVuDocEditor::create_wait(GURL::Filename::UTF8(GStringFromTQString(filename))); } G_CATCH(ex) { ; @@ -292,8 +292,8 @@ bool DjVuRenderer::setFile(const TQString &fname, const KURL &) // If the above assumption was false. if (!document) { - KMessageBox::error( parentWidget, - i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").arg(filename), + KMessageBox::error( tqparentWidget, + i18n("<qt><strong>File error.</strong> The specified file '%1' could not be loaded.</qt>").tqarg(filename), i18n("File Error")); clear(); @@ -348,7 +348,7 @@ void DjVuRenderer::getAnnotations(RenderedDocumentPage* page, GP<DjVuImage> djvu for (GPosition pos = map; pos; ++pos) { // Currently we only support rectangular links - if (!map[pos]->get_shape_type() == GMapArea::RECT) + if (!map[pos]->get_tqshape_type() == GMapArea::RECT) continue; GRect rect = map[pos]->get_bound_rect(); @@ -361,7 +361,7 @@ void DjVuRenderer::getAnnotations(RenderedDocumentPage* page, GP<DjVuImage> djvu TQString comment((const char*)map[pos]->comment); // Create an anchor for this link. - if (!anchorList.contains(url)) + if (!anchorList.tqcontains(url)) { // For now we only accept links to pages in the same document. if(url[0] == '#' && target == "_self") @@ -400,7 +400,7 @@ bool DjVuRenderer::initializeDocument() // very long documents if (numPages > 100) emit setStatusBarText(i18n("Loading file. Computing page sizes...")); - for(Q_UINT16 i=0; i<numPages; i++) { + for(TQ_UINT16 i=0; i<numPages; i++) { // Keep the GUI updated if (i%100 == 0) kapp->processEvents(); @@ -418,7 +418,7 @@ bool DjVuRenderer::initializeDocument() pageSizes[i].setPageSize(w, h); } } - emit setStatusBarText(TQString::null); + emit setStatusBarText(TQString()); // We will also generate a list of hyperlink-anchors in the document. // So declare the existing lists empty. @@ -461,7 +461,7 @@ GP<DjVuTXT> DjVuRenderer::getText(PageNumber pageNumber) void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& text, DjVuTXT::Zone& zone, TQSize& djvuPageSize) { - if (zone.children.isempty()) + if (zone.tqchildren.isempty()) { int pageWidth = page->width(); int pageHeight = page->height(); @@ -469,7 +469,7 @@ void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& tex double scaleX = pageWidth / (double)djvuPageSize.width(); double scaleY = pageHeight / (double)djvuPageSize.height(); - TQString zoneString = QStringFromGString(text->textUTF8.substr(zone.text_start, zone.text_length)); + TQString zoneString = TQStringFromGString(text->textUTF8.substr(zone.text_start, zone.text_length)); //kdDebug() << "zone text: " << zoneString << endl; @@ -481,9 +481,9 @@ void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& tex } else { - for (GPosition pos=zone.children; pos; ++pos) + for (GPosition pos=zone.tqchildren; pos; ++pos) { - fillInText(page, text, zone.children[pos], djvuPageSize); + fillInText(page, text, zone.tqchildren[pos], djvuPageSize); } } } @@ -577,14 +577,14 @@ bool DjVuRenderer::convertToPSFile( DjVuToPS &converter, TQString filename, TQVa TQMutexLocker locker( &mutex ); // Set up progress dialog - KProgressDialog *pdialog = new KProgressDialog(parentWidget, "Printing-ProgressDialog", i18n("Printing..."), i18n("Preparing pages for printing..."), true); + KProgressDialog *pdialog = new KProgressDialog(tqparentWidget, "Printing-ProgressDialog", i18n("Printing..."), i18n("Preparing pages for printing..."), true); pdialog->setButtonText(i18n("Abort")); pdialog->showCancelButton(true); pdialog->progressBar()->setTotalSteps(pageList.size()); - pdialog->progressBar()->setFormat(TQString::null); + pdialog->progressBar()->setFormat(TQString()); // Open output file - GURL outname = GURL::Filename::UTF8(GStringFromQString(filename)); + GURL outname = GURL::Filename::UTF8(GStringFromTQString(filename)); GP<ByteStream> obs = ByteStream::create(outname, "w"); TQString pagename; @@ -596,7 +596,7 @@ bool DjVuRenderer::convertToPSFile( DjVuToPS &converter, TQString filename, TQVa break; pagename += ","; } - GUTF8String pages = GStringFromQString(pagename); + GUTF8String pages = GStringFromTQString(pagename); converter.set_info_cb(printerInfoCallBack, (void*)pdialog); bool iscancelled = false; @@ -618,7 +618,7 @@ bool DjVuRenderer::convertToPSFile( DjVuToPS &converter, TQString filename, TQVa } -void DjVuRenderer::deletePages(Q_UINT16 from, Q_UINT16 to) +void DjVuRenderer::deletePages(TQ_UINT16 from, TQ_UINT16 to) { // Paranoia security checks if (document == 0) { @@ -634,10 +634,10 @@ void DjVuRenderer::deletePages(Q_UINT16 from, Q_UINT16 to) KProgressDialog *pdialog = 0; if (to-from > 9) { - pdialog = new KProgressDialog(parentWidget, "Printing-ProgressDialog", i18n("Deleting pages..."), i18n("Please wait while pages are removed..."), true); + pdialog = new KProgressDialog(tqparentWidget, "Printing-ProgressDialog", i18n("Deleting pages..."), i18n("Please wait while pages are removed..."), true); pdialog->showCancelButton(false); pdialog->progressBar()->setTotalSteps(to-from+1); - pdialog->progressBar()->setFormat(TQString::null); + pdialog->progressBar()->setFormat(TQString()); pdialog->show(); kapp->processEvents(); } @@ -650,14 +650,14 @@ void DjVuRenderer::deletePages(Q_UINT16 from, Q_UINT16 to) // Delete pages if (pdialog == 0) { GList<int> pageList; - for(Q_UINT16 i=from; i<= to; i++) + for(TQ_UINT16 i=from; i<= to; i++) pageList.append(i-1); document_new->remove_pages(pageList); } else { - for(Q_UINT16 i=from; i<=to; i++) { + for(TQ_UINT16 i=from; i<=to; i++) { document_new->remove_page(from-1); pdialog->progressBar()->setProgress(i-from); - pdialog->progressBar()->setFormat(i18n("deleting page %1").arg(i)); + pdialog->progressBar()->setFormat(i18n("deleting page %1").tqarg(i)); kapp->processEvents(); } delete pdialog; @@ -679,7 +679,7 @@ bool DjVuRenderer::save(const TQString &filename) TQMutexLocker locker( &mutex ); G_TRY { - document->save_as(GURL::Filename::UTF8(GStringFromQString(filename)), true); + document->save_as(GURL::Filename::UTF8(GStringFromTQString(filename)), true); } G_CATCH(ex) { return false; @@ -705,7 +705,7 @@ void DjVuRenderer::printerInfoCallBack(int page_num, int page_count, int, DjVuTo KProgressDialog *pdialog = (KProgressDialog *)pd; pdialog->progressBar()->setProgress(page_count); - pdialog->progressBar()->setFormat(i18n("processing page %1").arg(page_num+1)); + pdialog->progressBar()->setFormat(i18n("processing page %1").tqarg(page_num+1)); pdialog->show(); if (pdialog->wasCancelled()) diff --git a/kviewshell/plugins/djvu/djvurenderer.h b/kviewshell/plugins/djvu/djvurenderer.h index 85b40626..31d69e83 100644 --- a/kviewshell/plugins/djvu/djvurenderer.h +++ b/kviewshell/plugins/djvu/djvurenderer.h @@ -51,13 +51,14 @@ with 10 empty pages of A4 size and a few anchors and bookmarks. class DjVuRenderer : public DocumentRenderer { Q_OBJECT + TQ_OBJECT public: /** Default constructor This constructor simply prints a message and calls the default constructor. */ - DjVuRenderer(TQWidget* parent); + DjVuRenderer(TQWidget* tqparent); /** Destructor @@ -113,7 +114,7 @@ public: bool convertToPSFile( DjVuToPS &converter, TQString filename, TQValueList<int> &pageList ); /** Deletes pages from the document */ - void deletePages(Q_UINT16 from, Q_UINT16 to); + void deletePages(TQ_UINT16 from, TQ_UINT16 to); /** Saves the file */ bool save(const TQString &filename); diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp index 24b7dfbb..0a32ed95 100644 --- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp +++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp @@ -29,14 +29,14 @@ #include "kprintDialogPage_DJVUconversionoptions.h" #include "kprintDialogPage_DJVUconversionoptions_basewidget.h" -KPrintDialogPage_DJVUConversionOptions::KPrintDialogPage_DJVUConversionOptions( TQWidget *parent, const char *name ) - : KPrintDialogPage( parent, name ) +KPrintDialogPage_DJVUConversionOptions::KPrintDialogPage_DJVUConversionOptions( TQWidget *tqparent, const char *name ) + : KPrintDialogPage( tqparent, name ) { setTitle( i18n("DJVU to PS Conversion") ); kprintDialogPage_pageoptions_baseLayout = new TQVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout"); if (kprintDialogPage_pageoptions_baseLayout == 0) { - kdError(1223) << "KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions() cannot create layout" << endl; + kdError(1223) << "KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions() cannot create tqlayout" << endl; return; } diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h index c1ec4b3c..f9ff0c14 100644 --- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h +++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h @@ -34,7 +34,7 @@ class kprintDialogPage_DJVUconversionoptions_basewidget; class KPrintDialogPage_DJVUConversionOptions : public KPrintDialogPage { public: - KPrintDialogPage_DJVUConversionOptions( TQWidget *parent = 0, const char *name = 0 ); + KPrintDialogPage_DJVUConversionOptions( TQWidget *tqparent = 0, const char *name = 0 ); void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false ); void setOptions( const TQMap<TQString,TQString>& opts ); diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions_basewidget.ui b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions_basewidget.ui index fbc48750..416b7b36 100644 --- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions_basewidget.ui +++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions_basewidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>kprintDialogPage_DJVUconversionoptions_basewidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kprintDialogPage_DJVUconversionoptions_basewidget</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -32,7 +32,7 @@ <string>PostScript language level:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -48,7 +48,7 @@ <string>Render mode:</string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>Level 1 (almost obsolete)</string> @@ -82,7 +82,7 @@ <p><b>Level 3:</b> Level 3 PostScript files are much smaller and print even faster than Level 2 files. However, Level 3 files are supported only by some modern printers. If Level 3 works for you, this is the best option.</p></string> </property> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <item> <property name="text"> <string>Print Full Page (default)</string> @@ -132,7 +132,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -141,5 +141,5 @@ </spacer> </grid> </widget> -<layoutdefaults spacing="6" margin="0"/> +<tqlayoutdefaults spacing="6" margin="0"/> </UI> diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp b/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp index e6872648..f93d6b0f 100644 --- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp +++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp @@ -28,8 +28,8 @@ #include "kprintDialogPage_DJVUpageoptions.h" -KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( TQWidget *parent, const char *name ) - : KPrintDialogPage( parent, name ) +KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( TQWidget *tqparent, const char *name ) + : KPrintDialogPage( tqparent, name ) { setTitle( i18n("Page Size & Placement") ); @@ -40,7 +40,7 @@ KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( TQWidget *pa kprintDialogPage_pageoptions_baseLayout = new TQVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout"); if (kprintDialogPage_pageoptions_baseLayout == 0) { - kdError(1223) << "KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions() cannot create layout" << endl; + kdError(1223) << "KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions() cannot create tqlayout" << endl; return; } @@ -70,7 +70,7 @@ KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( TQWidget *pa kprintDialogPage_pageoptions_baseLayout->addStretch(); - resize( TQSize(319, 166).expandedTo(minimumSizeHint()) ); + resize( TQSize(319, 166).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); } diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h b/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h index 5bb5833e..fb6493e9 100644 --- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h +++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h @@ -25,7 +25,7 @@ class TQCheckBox; class KPrintDialogPage_DJVUPageOptions : public KPrintDialogPage { public: - KPrintDialogPage_DJVUPageOptions( TQWidget *parent = 0, const char *name = 0 ); + KPrintDialogPage_DJVUPageOptions( TQWidget *tqparent = 0, const char *name = 0 ); void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false ); void setOptions( const TQMap<TQString,TQString>& opts ); diff --git a/kviewshell/plugins/djvu/libdjvu/Arrays.cpp b/kviewshell/plugins/djvu/libdjvu/Arrays.cpp index 5cb7b04c..30038734 100644 --- a/kviewshell/plugins/djvu/libdjvu/Arrays.cpp +++ b/kviewshell/plugins/djvu/libdjvu/Arrays.cpp @@ -190,7 +190,7 @@ ArrayRep::resize(int lo, int hi) init1(ndata, hibound+1-nminlo, hi-nminlo); destroy(data, lobound-minlo, hibound-minlo); - // free and replace + // free and tqreplace void *tmp=data; data = ndata; ndata=tmp; diff --git a/kviewshell/plugins/djvu/libdjvu/Arrays.h b/kviewshell/plugins/djvu/libdjvu/Arrays.h index b2676d5a..c0bc75a3 100644 --- a/kviewshell/plugins/djvu/libdjvu/Arrays.h +++ b/kviewshell/plugins/djvu/libdjvu/Arrays.h @@ -319,7 +319,7 @@ public: /** Erases the array contents. All elements in the array are destroyed. The valid subscript range is set to the empty range. */ void empty(); - /** Extends the subscript range so that is contains #n#. + /** Extends the subscript range so that is tqcontains #n#. This function does nothing if #n# is already int the valid subscript range. If the valid range was empty, both the lower bound and the upper bound are set to #n#. Otherwise the valid subscript range is extended diff --git a/kviewshell/plugins/djvu/libdjvu/BSEncodeByteStream.cpp b/kviewshell/plugins/djvu/libdjvu/BSEncodeByteStream.cpp index 9d5b726d..350d792d 100644 --- a/kviewshell/plugins/djvu/libdjvu/BSEncodeByteStream.cpp +++ b/kviewshell/plugins/djvu/libdjvu/BSEncodeByteStream.cpp @@ -104,7 +104,7 @@ static const int OVERFLOW=32; // Sorting tresholds static const int RANKSORT_THRESH=10; -static const int QUICKSORT_STACK=512; +static const int TQUICKSORT_STACK=512; static const int PRESORT_THRESH=10; static const int PRESORT_DEPTH=8; static const int RADIX_THRESH=32768; @@ -283,8 +283,8 @@ void _BSort::quicksort3r(int lo, int hi, int depth) { /* Initialize stack */ - int slo[QUICKSORT_STACK]; - int shi[QUICKSORT_STACK]; + int slo[TQUICKSORT_STACK]; + int shi[TQUICKSORT_STACK]; int sp = 1; slo[0] = lo; shi[0] = hi; @@ -342,7 +342,7 @@ _BSort::quicksort3r(int lo, int hi, int depth) vswap(hi-tmp+1, h+1, tmp, posn); h1 = hi - (h1-h); // -- process segments - ASSERT(sp+2<QUICKSORT_STACK); + ASSERT(sp+2<TQUICKSORT_STACK); // ----- middle segment (=?) [l1, h1] for(int i=l1;i<=h1;i++) rank[posn[i]] = h1; @@ -437,9 +437,9 @@ void _BSort::quicksort3d(int lo, int hi, int depth) { /* Initialize stack */ - int slo[QUICKSORT_STACK]; - int shi[QUICKSORT_STACK]; - int sd[QUICKSORT_STACK]; + int slo[TQUICKSORT_STACK]; + int shi[TQUICKSORT_STACK]; + int sd[TQUICKSORT_STACK]; int sp = 1; slo[0] = lo; shi[0] = hi; @@ -518,7 +518,7 @@ _BSort::quicksort3d(int lo, int hi, int depth) vswap(hi-tmp+1, h+1, tmp, posn); h1 = hi - (h1-h); // -- process segments - ASSERT(sp+3<QUICKSORT_STACK); + ASSERT(sp+3<TQUICKSORT_STACK); // ----- middle segment (=?) [l1, h1] l = l1; h = h1; if (med==0) // special case for marker [slow] diff --git a/kviewshell/plugins/djvu/libdjvu/DataPool.cpp b/kviewshell/plugins/djvu/libdjvu/DataPool.cpp index 1190292e..176d3915 100644 --- a/kviewshell/plugins/djvu/libdjvu/DataPool.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DataPool.cpp @@ -187,7 +187,7 @@ DataPool::OpenFiles_File::add_pool(GP<DataPool> &pool) DEBUG_MSG("DataPool::OpenFiles_File::add_pool: pool=" << (void *) pool << "\n"); DEBUG_MAKE_INDENT(3); GCriticalSectionLock lock(&pools_lock); - if (!pools_list.contains(pool)) + if (!pools_list.tqcontains(pool)) pools_list.append(pool); return pools_list.size(); } @@ -381,14 +381,14 @@ FCPools::add_pool(const GURL &url, GP<DataPool> pool) if (url.is_local_file_url()) { GPList<DataPool> list; - GPosition pos(map.contains(url)); + GPosition pos(map.tqcontains(url)); if (! pos) { map[url]=list; - pos=map.contains(url); + pos=map.tqcontains(url); } GPList<DataPool> &plist=map[pos]; - if (!plist.contains(pool)) + if (!plist.tqcontains(pool)) plist.append(pool); } clean(); @@ -403,7 +403,7 @@ FCPools::get_pool(const GURL &url, int start, int length) if (url.is_local_file_url()) { GCriticalSectionLock lock(&map_lock); - GPosition pos(map.contains(url)); + GPosition pos(map.tqcontains(url)); if (pos) { GPList<DataPool> &plist=map[pos]; @@ -433,7 +433,7 @@ FCPools::del_pool(const GURL &url, GP<DataPool> pool) if (url.is_local_file_url()) { GPosition pos; - if (map.contains(url, pos)) + if (map.tqcontains(url, pos)) { GPList<DataPool> &list=map[pos]; GPosition list_pos; @@ -458,7 +458,7 @@ FCPools::load_file(const GURL &url) if (url.is_local_file_url()) { GPosition pos; - if (map.contains(url, pos)) + if (map.tqcontains(url, pos)) { // We make here a copy of the list because DataPool::load_file() // will call FCPools::del_pool(), which will modify the list diff --git a/kviewshell/plugins/djvu/libdjvu/DataPool.h b/kviewshell/plugins/djvu/libdjvu/DataPool.h index fb4bea4e..4202ef7d 100644 --- a/kviewshell/plugins/djvu/libdjvu/DataPool.h +++ b/kviewshell/plugins/djvu/libdjvu/DataPool.h @@ -116,7 +116,7 @@ class ByteStream; Access to data in a #DataPool# may be direct (Using \Ref{get_data}() function) or sequential (See \Ref{get_stream}() function). - If the #DataPool# is not connected to anything, that is it contains + If the #DataPool# is not connected to anything, that is it tqcontains some real data, this data can be added to it by means of two \Ref{add_data}() functions. One of them adds data sequentially maintaining the offset of the last block of data added by it. The other can store diff --git a/kviewshell/plugins/djvu/libdjvu/DjVmDir.cpp b/kviewshell/plugins/djvu/libdjvu/DjVmDir.cpp index 83f9df78..2d8d2467 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVmDir.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVmDir.cpp @@ -363,7 +363,7 @@ DjVmDir::decode(const GP<ByteStream> &gstr) for(pos=files_list;pos;++pos) { GP<File> file=files_list[pos]; - if (name2file.contains(file->name)) + if (name2file.tqcontains(file->name)) G_THROW( ERR_MSG("DjVmDir.dupl_name") "\t" + file->name ); name2file[file->name]=file; } @@ -372,7 +372,7 @@ DjVmDir::decode(const GP<ByteStream> &gstr) for(pos=files_list;pos;++pos) { GP<File> file=files_list[pos]; - if (id2file.contains(file->id)) + if (id2file.tqcontains(file->id)) G_THROW( ERR_MSG("DjVmDir.dupl_id") "\t" + file->id); id2file[file->id]=file; } @@ -383,7 +383,7 @@ DjVmDir::decode(const GP<ByteStream> &gstr) GP<File> file=files_list[pos]; if (file->title.length()) { - if (title2file.contains(file->title)) + if (title2file.tqcontains(file->title)) G_THROW( ERR_MSG("DjVmDir.dupl_title") "\t" + file->title); title2file[file->title]=file; } @@ -542,7 +542,7 @@ DjVmDir::name_to_file(const GUTF8String & name) const GCriticalSectionLock lock((GCriticalSection *) &class_lock); GPosition pos; - return (name2file.contains(name, pos))?name2file[pos]:(GP<DjVmDir::File>(0)); + return (name2file.tqcontains(name, pos))?name2file[pos]:(GP<DjVmDir::File>(0)); } GP<DjVmDir::File> @@ -551,7 +551,7 @@ DjVmDir::id_to_file(const GUTF8String &id) const GCriticalSectionLock lock((GCriticalSection *) &class_lock); GPosition pos; - return (id2file.contains(id, pos))?id2file[pos]:(GP<DjVmDir::File>(0)); + return (id2file.tqcontains(id, pos))?id2file[pos]:(GP<DjVmDir::File>(0)); } GP<DjVmDir::File> @@ -560,7 +560,7 @@ DjVmDir::title_to_file(const GUTF8String &title) const GCriticalSectionLock lock((GCriticalSection *) &class_lock); GPosition pos; - return (title2file.contains(title, pos))?title2file[pos]:(GP<DjVmDir::File>(0)); + return (title2file.tqcontains(title, pos))?title2file[pos]:(GP<DjVmDir::File>(0)); } GPList<DjVmDir::File> @@ -636,15 +636,15 @@ DjVmDir::insert_file(const GP<File> & file, int pos_num) // Modify maps // if (! File::is_legal_id(file->id)) // G_THROW( ERR_MSG("DjVmDir.bad_file") "\t" + file->id); - if (id2file.contains(file->id)) + if (id2file.tqcontains(file->id)) G_THROW( ERR_MSG("DjVmDir.dupl_id2") "\t" + file->id); - if (name2file.contains(file->name)) + if (name2file.tqcontains(file->name)) G_THROW( ERR_MSG("DjVmDir.dupl_name2") "\t" + file->name); name2file[file->name]=file; id2file[file->id]=file; if (file->title.length()) { - if (title2file.contains(file->title)) // duplicate titles may become ok some day + if (title2file.tqcontains(file->title)) // duplicate titles may become ok some day G_THROW( ERR_MSG("DjVmDir.dupl_title2") "\t" + file->title); title2file[file->title]=file; } @@ -749,7 +749,7 @@ DjVmDir::set_file_name(const GUTF8String &id, const GUTF8String &name) } // Check if ID is valid - if (!id2file.contains(id, pos)) + if (!id2file.tqcontains(id, pos)) G_THROW( ERR_MSG("DjVmDir.no_info") "\t" + GUTF8String(id)); GP<File> file=id2file[pos]; name2file.del(file->name); @@ -776,7 +776,7 @@ DjVmDir::set_file_title(const GUTF8String &id, const GUTF8String &title) } // Check if ID is valid - if (!id2file.contains(id, pos)) + if (!id2file.tqcontains(id, pos)) G_THROW( ERR_MSG("DjVmDir.no_info") "\t" + GUTF8String(id)); GP<File> file=id2file[pos]; title2file.del(file->title); @@ -795,7 +795,7 @@ DjVmDir::resolve_duplicates(const bool save_as_bundled) for(pos=files_list;pos;++pos) { const GUTF8String save_name=files_list[pos]->check_save_name(save_as_bundled).downcase(); - if(save_map.contains(save_name)) + if(save_map.tqcontains(save_name)) { conflicts[save_name].append(files_list[pos]); }else @@ -813,7 +813,7 @@ DjVmDir::resolve_duplicates(const bool save_as_bundled) { GUTF8String new_name=cfiles[qpos]->get_load_name(); if((new_name != GUTF8String(GNativeString(new_name))) - ||conflicts.contains(new_name)) + ||conflicts.tqcontains(new_name)) { do { @@ -821,7 +821,7 @@ DjVmDir::resolve_duplicates(const bool save_as_bundled) ?(save_name+"-"+GUTF8String(count++)) :(save_name.substr(0,dot)+"-"+GUTF8String(count++)+ save_name.substr(dot,(unsigned int)(-1))); - } while(save_map.contains(new_name.downcase())); + } while(save_map.tqcontains(new_name.downcase())); } cfiles[qpos]->set_save_name(new_name); save_map[new_name]=0; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVmDir0.cpp b/kviewshell/plugins/djvu/libdjvu/DjVmDir0.cpp index 62694098..ca255ea5 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVmDir0.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVmDir0.cpp @@ -132,7 +132,7 @@ DjVmDir0::decode(ByteStream & bs) GP<DjVmDir0::FileRec> DjVmDir0::get_file(const GUTF8String &name) { - if (name2file.contains(name)) + if (name2file.tqcontains(name)) return name2file[name]; return 0; } diff --git a/kviewshell/plugins/djvu/libdjvu/DjVmDoc.cpp b/kviewshell/plugins/djvu/libdjvu/DjVmDoc.cpp index 5b851d6e..b24b43b1 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVmDoc.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVmDoc.cpp @@ -109,7 +109,7 @@ save_file( { incl_str.setat(incl_str.length()-1, 0); } - GPosition pos=incl.contains(incl_str); + GPosition pos=incl.tqcontains(incl_str); if(pos) { iff_out.get_bytestream()->writestring(incl[pos]); @@ -174,7 +174,7 @@ DjVmDoc::insert_file(const GP<DjVmDir::File> & f, if (!f) G_THROW( ERR_MSG("DjVmDoc.no_zero_file") ); - if (data.contains(f->get_load_name())) + if (data.tqcontains(f->get_load_name())) G_THROW( ERR_MSG("DjVmDoc.no_duplicate") ); char buffer[4]; @@ -224,7 +224,7 @@ DjVmDoc::delete_file(const GUTF8String &id) DEBUG_MSG("DjVmDoc::delete_file(): deleting file '" << id << "'\n"); DEBUG_MAKE_INDENT(3); - if (!data.contains(id)) + if (!data.tqcontains(id)) G_THROW(GUTF8String( ERR_MSG("DjVmDoc.cant_delete") "\t") + id); data.del(id); @@ -243,8 +243,8 @@ GP<DataPool> DjVmDoc::get_data(const GUTF8String &id) const { GPosition pos; - if (!data.contains(id, pos)) - G_THROW(GUTF8String( ERR_MSG("DjVmDoc.cant_find") "\t") + id); + if (!data.tqcontains(id, pos)) + G_THROW(GUTF8String( ERR_MSG("DjVmDoc.cant_tqfind") "\t") + id); const GP<DataPool> pool(data[pos]); // First check that the file is in IFF format G_TRY @@ -298,8 +298,8 @@ DjVmDoc::write(const GP<ByteStream> &gstr, for(pos=files_list;pos;++pos) { GP<DjVmDir::File> file=files_list[pos]; - if((do_rename=(reserved.contains(file->get_load_name())?true:false)) - ||(do_rename=(reserved.contains(file->get_save_name())?true:false))) + if((do_rename=(reserved.tqcontains(file->get_load_name())?true:false)) + ||(do_rename=(reserved.tqcontains(file->get_save_name())?true:false))) { break; } @@ -322,7 +322,7 @@ DjVmDoc::write(const GP<ByteStream> &gstr, { GP<DjVmDir::File> file=files_list[pos]; const GUTF8String name(::get_name(*file)); - if(reserved.contains(name)) + if(reserved.tqcontains(name)) { GUTF8String new_name; int series=0; @@ -337,7 +337,7 @@ DjVmDoc::write(const GP<ByteStream> &gstr, { new_name=name+"_"+GUTF8String(++series); } - } while(reserved.contains(new_name)||this_doc.contains(new_name)); + } while(reserved.tqcontains(new_name)||this_doc.tqcontains(new_name)); dir->set_file_name(file->get_load_name(),new_name); need_new_list=true; } @@ -353,7 +353,7 @@ DjVmDoc::write(const GP<ByteStream> &gstr, { GP<DjVmDir::File> file=files_list[pos]; file->offset=0xffffffff; - GPosition data_pos=data.contains(file->get_load_name()); + GPosition data_pos=data.tqcontains(file->get_load_name()); if (!data_pos) G_THROW( ERR_MSG("DjVmDoc.no_data") "\t" + file->get_load_name()); if(do_rename) @@ -541,7 +541,7 @@ DjVmDoc::write_index(const GP<ByteStream> &str) GP<DjVmDir::File> file=files_list[pos]; file->offset=0; - GPosition data_pos=data.contains(file->get_load_name()); + GPosition data_pos=data.tqcontains(file->get_load_name()); if (!data_pos) G_THROW( ERR_MSG("DjVmDoc.no_data") "\t" + file->get_load_name()); file->size=data[data_pos]->get_length(); @@ -609,7 +609,7 @@ DjVmDoc::save_file( GMap<GUTF8String,GUTF8String> *incl) const { const GUTF8String load_name=file.get_load_name(); - if(!incl || !incl->contains(load_name)) + if(!incl || !incl->tqcontains(load_name)) { GMap<GUTF8String,GUTF8String> new_incl; const GUTF8String save_name( diff --git a/kviewshell/plugins/djvu/libdjvu/DjVmNav.cpp b/kviewshell/plugins/djvu/libdjvu/DjVmNav.cpp index 9e8b5fd7..d6f5555c 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVmNav.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVmNav.cpp @@ -147,13 +147,13 @@ DjVmNav::DjVuBookMark::encode(const GP<ByteStream> &gstr) ByteStream &bs=*gstr; #ifdef DJVMNAV_WITH_256LIMIT if (count>255) - G_THROW("Excessive number of children in bookmark tree"); + G_THROW("Excessive number of tqchildren in bookmark tree"); bs.write8(count); textsize = displayname.length(); bs.write24( textsize ); #else if (count>65535) - G_THROW("Excessive number of children in bookmark tree"); + G_THROW("Excessive number of tqchildren in bookmark tree"); bs.write8( count & 0xff ); bs.write8( (count>>8) & 0xff ); textsize = displayname.length(); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVmNav.h b/kviewshell/plugins/djvu/libdjvu/DjVmNav.h index 46c5d57f..612cd100 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVmNav.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVmNav.h @@ -115,7 +115,7 @@ private: /** The DjVuBookMark. Each entry in the Navigation chunk (NAVM) is a bookmark. A bookmark - contains a count of immediate children, a display string and a url. + contains a count of immediate tqchildren, a display string and a url. **/ class DjVmNav::DjVuBookMark : public GPEnabled @@ -131,7 +131,7 @@ public: void encode(const GP<ByteStream> &stream); void dump(const GP<ByteStream> &stream); void decode(const GP<ByteStream> &stream); - int count; // count of immediate children. + int count; // count of immediate tqchildren. GUTF8String displayname; // example: "Section 3.5 - Encryption" GUTF8String url; // url, may be blank or relative. }; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp index 7cece60b..f3a53bf7 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp @@ -978,16 +978,16 @@ DjVuANT::get_mode(GLParser & parser) return retval; } -static inline DjVuANT::alignment +static inline DjVuANT::tqalignment legal_halign(const int i) { - DjVuANT::alignment retval; - switch((DjVuANT::alignment)i) + DjVuANT::tqalignment retval; + switch((DjVuANT::tqalignment)i) { case DjVuANT::ALIGN_LEFT: case DjVuANT::ALIGN_CENTER: case DjVuANT::ALIGN_RIGHT: - retval=(DjVuANT::alignment)i; + retval=(DjVuANT::tqalignment)i; break; default: retval=DjVuANT::ALIGN_UNSPEC; @@ -996,16 +996,16 @@ legal_halign(const int i) return retval; } -static inline DjVuANT::alignment +static inline DjVuANT::tqalignment legal_valign(const int i) { - DjVuANT::alignment retval; - switch((DjVuANT::alignment)i) + DjVuANT::tqalignment retval; + switch((DjVuANT::tqalignment)i) { case DjVuANT::ALIGN_CENTER: case DjVuANT::ALIGN_TOP: case DjVuANT::ALIGN_BOTTOM: - retval=(DjVuANT::alignment)i; + retval=(DjVuANT::tqalignment)i; break; default: retval=DjVuANT::ALIGN_UNSPEC; @@ -1014,12 +1014,12 @@ legal_valign(const int i) return retval; } -DjVuANT::alignment +DjVuANT::tqalignment DjVuANT::get_hor_align(GLParser & parser) { DEBUG_MSG("DjVuAnt::get_hor_align(): getting hor page alignemnt ...\n"); DEBUG_MAKE_INDENT(3); - alignment retval=ALIGN_UNSPEC; + tqalignment retval=ALIGN_UNSPEC; G_TRY { GP<GLObject> obj=parser.get_object(ALIGN_TAG); @@ -1030,7 +1030,7 @@ DjVuANT::get_hor_align(GLParser & parser) for(int i=(int)ALIGN_UNSPEC;(i<align_strings_size);++i) { - const alignment j=legal_halign(i); + const tqalignment j=legal_halign(i); if((i == (int)j)&&(align == align_strings[i])) { retval=j; @@ -1048,18 +1048,18 @@ DjVuANT::get_hor_align(GLParser & parser) #ifndef NDEBUG if(retval == ALIGN_UNSPEC) { - DEBUG_MSG("resetting alignment to ALIGN_UNSPEC\n"); + DEBUG_MSG("resetting tqalignment to ALIGN_UNSPEC\n"); } #endif // NDEBUG return retval; } -DjVuANT::alignment +DjVuANT::tqalignment DjVuANT::get_ver_align(GLParser & parser) { DEBUG_MSG("DjVuAnt::get_ver_align(): getting vert page alignemnt ...\n"); DEBUG_MAKE_INDENT(3); - alignment retval=ALIGN_UNSPEC; + tqalignment retval=ALIGN_UNSPEC; G_TRY { GP<GLObject> obj=parser.get_object(ALIGN_TAG); @@ -1069,7 +1069,7 @@ DjVuANT::get_ver_align(GLParser & parser) DEBUG_MSG("ver_align='" << align << "'\n"); for(int i=(int)ALIGN_UNSPEC;(i<align_strings_size);++i) { - const alignment j=legal_valign(i); + const tqalignment j=legal_valign(i); if((i == (int)j)&&(align == align_strings[i])) { retval=j; @@ -1087,7 +1087,7 @@ DjVuANT::get_ver_align(GLParser & parser) #ifndef NDEBUG if(retval == ALIGN_UNSPEC) { - DEBUG_MSG("resetting alignment to ALIGN_UNSPEC\n"); + DEBUG_MSG("resetting tqalignment to ALIGN_UNSPEC\n"); } #endif // NDEBUG return retval; @@ -1166,38 +1166,38 @@ DjVuANT::get_map_areas(GLParser & parser) DEBUG_MSG("found maparea '" << comment << "' (" << url << ":" << target << ")\n"); - GLObject * shape=obj[2]; + GLObject * tqshape=obj[2]; GP<GMapArea> map_area; - if (shape->get_type()==GLObject::LIST) + if (tqshape->get_type()==GLObject::LIST) { - if (shape->get_name()==GMapArea::RECT_TAG) + if (tqshape->get_name()==GMapArea::RECT_TAG) { DEBUG_MSG("it's a rectangle.\n"); - GRect grect((*shape)[0]->get_number(), - (*shape)[1]->get_number(), - (*shape)[2]->get_number(), - (*shape)[3]->get_number()); + GRect grect((*tqshape)[0]->get_number(), + (*tqshape)[1]->get_number(), + (*tqshape)[2]->get_number(), + (*tqshape)[3]->get_number()); GP<GMapRect> map_rect=GMapRect::create(grect); map_area=(GMapRect *)map_rect; - } else if (shape->get_name()==GMapArea::POLY_TAG) + } else if (tqshape->get_name()==GMapArea::POLY_TAG) { DEBUG_MSG("it's a polygon.\n"); - int points=shape->get_list().size()/2; + int points=tqshape->get_list().size()/2; GTArray<int> xx(points-1), yy(points-1); for(int i=0;i<points;i++) { - xx[i]=(*shape)[2*i]->get_number(); - yy[i]=(*shape)[2*i+1]->get_number(); + xx[i]=(*tqshape)[2*i]->get_number(); + yy[i]=(*tqshape)[2*i+1]->get_number(); } GP<GMapPoly> map_poly=GMapPoly::create(xx,yy,points); map_area=(GMapPoly *)map_poly; - } else if (shape->get_name()==GMapArea::OVAL_TAG) + } else if (tqshape->get_name()==GMapArea::OVAL_TAG) { DEBUG_MSG("it's an ellipse.\n"); - GRect grect((*shape)[0]->get_number(), - (*shape)[1]->get_number(), - (*shape)[2]->get_number(), - (*shape)[3]->get_number()); + GRect grect((*tqshape)[0]->get_number(), + (*tqshape)[1]->get_number(), + (*tqshape)[2]->get_number(), + (*tqshape)[3]->get_number()); GP<GMapOval> map_oval=GMapOval::create(grect); map_area=(GMapOval *)map_oval; } diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuAnno.h b/kviewshell/plugins/djvu/libdjvu/DjVuAnno.h index 964c6c44..b59fe37d 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuAnno.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuAnno.h @@ -104,7 +104,7 @@ class ByteStream; // -------- DJVUANT -------- /** This class contains some trivial annotations of the page or of the - document such as page border color, page alignment, initial zoom and + document such as page border color, page tqalignment, initial zoom and display mode, hyperlinks and highlighted areas. All this information is put inside a textual chunk #ANTa# in pseudo-lisp format. Decoding and encoding are normally done by \Ref{DjVuANT::decode}() and @@ -120,7 +120,7 @@ public: enum { MODE_UNSPEC=0, MODE_COLOR, MODE_FORE, MODE_BACK, MODE_BW }; enum { ZOOM_STRETCH=-4, ZOOM_ONE2ONE=-3, ZOOM_WIDTH=-2, ZOOM_PAGE=-1, ZOOM_UNSPEC=0 }; - enum alignment { ALIGN_UNSPEC=0, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, + enum tqalignment { ALIGN_UNSPEC=0, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, ALIGN_TOP, ALIGN_BOTTOM }; /// Creates an empty annotation object. @@ -152,12 +152,12 @@ public: special cases. \end{description} */ int mode; - /** Horizontal page alignment. Possible values are #ALIGN_LEFT#, + /**Qt::Horizontal page tqalignment. Possible values are #ALIGN_LEFT#, #ALIGN_CENTER#, #ALIGN_RIGHT# and #ALIGN_UNSPEC#. */ - alignment hor_align; - /** Vertical page alignment. Possible values are #ALIGN_TOP#, + tqalignment hor_align; + /**Qt::Vertical page tqalignment. Possible values are #ALIGN_TOP#, #ALIGN_CENTER#, #ALIGN_BOTTOM# and #ALIGN_UNSPEC#. */ - alignment ver_align; + tqalignment ver_align; /** List of defined map areas. They may be just areas of highlighting or hyperlink. Please refer to \Ref{GMapArea}, \Ref{GMapRect}, \Ref{GMapPoly} and \Ref{GMapOval} for details. */ @@ -213,8 +213,8 @@ private: static unsigned long int get_bg_color(class GLParser & parser); static int get_zoom(class GLParser & parser); static int get_mode(class GLParser & parser); - static alignment get_hor_align(class GLParser & parser); - static alignment get_ver_align(class GLParser & parser); + static tqalignment get_hor_align(class GLParser & parser); + static tqalignment get_ver_align(class GLParser & parser); static GPList<GMapArea> get_map_areas(class GLParser & parser); #ifndef NO_METADATA_IN_ANT_CHUNK static GMap<GUTF8String, GUTF8String>get_metadata(GLParser & parser); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.cpp index 542faa7a..fa6ad375 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.cpp @@ -243,7 +243,7 @@ DjVuDocEditor::request_data(const DjVuPort * source, const GURL & url) { GCriticalSectionLock lock(&files_lock); GPosition pos; - if (files_map.contains(frec->get_load_name(), pos)) + if (files_map.tqcontains(frec->get_load_name(), pos)) { const GP<File> f(files_map[pos]); if (f->file && f->file->get_init_data_pool()) @@ -315,7 +315,7 @@ DjVuDocEditor::url_to_file(const GURL & url, bool dont_create) const { GCriticalSectionLock lock(&(const_cast<DjVuDocEditor *>(this)->files_lock)); GPosition pos; - if (files_map.contains(frec->get_load_name(), pos)) + if (files_map.tqcontains(frec->get_load_name(), pos)) { const GP<File> f(files_map[pos]); if (f->file) @@ -333,7 +333,7 @@ DjVuDocEditor::url_to_file(const GURL & url, bool dont_create) const { GCriticalSectionLock lock(&(const_cast<DjVuDocEditor *>(this)->files_lock)); GPosition pos; - if (files_map.contains(frec->get_load_name(), pos)) + if (files_map.tqcontains(frec->get_load_name(), pos)) { files_map[frec->get_load_name()]->file=file; }else @@ -433,15 +433,15 @@ DjVuDocEditor::strip_incl_chunks(const GP<DataPool> & pool_in) } GUTF8String -DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &parent_id, +DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &tqparent_id, int chunk_num, DjVuPort *source) // Will open the 'file_name' and insert it into an existing DjVuFile - // with ID 'parent_id'. Will insert the INCL chunk at position chunk_num + // with ID 'tqparent_id'. Will insert the INCL chunk at position chunk_num // Will NOT process ANY files included into the file being inserted. // Moreover it will strip out any INCL chunks in that file... { DEBUG_MSG("DjVuDocEditor::insert_file(): fname='" << file_url << - "', parent_id='" << parent_id << "'\n"); + "', tqparent_id='" << tqparent_id << "'\n"); DEBUG_MAKE_INDENT(3); const GP<DjVmDir> dir(get_djvm_dir()); @@ -468,17 +468,17 @@ DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &parent_id, // Strip any INCL chunks file_pool=strip_incl_chunks(file_pool); - // Check if parent ID is valid - GP<DjVmDir::File> parent_frec(dir->id_to_file(parent_id)); - if (!parent_frec) - parent_frec=dir->name_to_file(parent_id); - if (!parent_frec) - parent_frec=dir->title_to_file(parent_id); - if (!parent_frec) - G_THROW( ERR_MSG("DjVuDocEditor.no_file") "\t" +parent_id); - const GP<DjVuFile> parent_file(get_djvu_file(parent_id)); - if (!parent_file) - G_THROW( ERR_MSG("DjVuDocEditor.create_fail") "\t"+parent_id); + // Check if tqparent ID is valid + GP<DjVmDir::File> tqparent_frec(dir->id_to_file(tqparent_id)); + if (!tqparent_frec) + tqparent_frec=dir->name_to_file(tqparent_id); + if (!tqparent_frec) + tqparent_frec=dir->title_to_file(tqparent_id); + if (!tqparent_frec) + G_THROW( ERR_MSG("DjVuDocEditor.no_file") "\t" +tqparent_id); + const GP<DjVuFile> tqparent_file(get_djvu_file(tqparent_id)); + if (!tqparent_file) + G_THROW( ERR_MSG("DjVuDocEditor.create_fail") "\t"+tqparent_id); // Now obtain ID for the new file const GUTF8String id(find_unique_id(file_url.fname())); @@ -486,7 +486,7 @@ DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &parent_id, // Add it into the directory const GP<DjVmDir::File> frec( DjVmDir::File::create(id, id, id, DjVmDir::File::INCLUDE)); - int pos=dir->get_file_pos(parent_frec); + int pos=dir->get_file_pos(tqparent_frec); if (pos>=0) ++pos; dir->insert_file(frec, pos); @@ -499,8 +499,8 @@ DjVuDocEditor::insert_file(const GURL &file_url, const GUTF8String &parent_id, files_map[id]=f; } - // And insert it into the parent DjVuFile - parent_file->insert_file(id, chunk_num); + // And insert it into the tqparent DjVuFile + tqparent_file->insert_file(id, chunk_num); return id; } @@ -538,7 +538,7 @@ DjVuDocEditor::insert_file(const GURL &file_url, bool is_page, // We do not want to insert the same file twice (important when // we insert a group of files at the same time using insert_group()) // So we check if we already did that and return if so. - if (name2id.contains(file_url.fname())) + if (name2id.tqcontains(file_url.fname())) return true; if(!source) @@ -606,7 +606,7 @@ DjVuDocEditor::insert_file(const GP<DataPool> &file_pool, // Check the name2id first... const GUTF8String name=file_url.fname(); GUTF8String id; - if (name2id.contains(name)) + if (name2id.tqcontains(name)) { id=name2id[name]; }else @@ -651,7 +651,7 @@ DjVuDocEditor::insert_file(const GP<DataPool> &file_pool, // Good. Before we continue with the included files we want to // complete insertion of this one. Notice, that insertion of - // children may fail, in which case we will have to modify + // tqchildren may fail, in which case we will have to modify // data for this file to get rid of invalid INCL // Create a file record with the chosen ID @@ -821,7 +821,7 @@ DjVuDocEditor::insert_group(const GList<GURL> & file_urls, int page_num, } GUTF8String chkid; IFFByteStream::create(xdata_pool->get_stream())->get_chunk(chkid); - if (name2id.contains(furl.fname())||(chkid=="FORM:DJVM")) + if (name2id.tqcontains(furl.fname())||(chkid=="FORM:DJVM")) { GMap<GUTF8String,void *> map; map_ids(map); @@ -930,13 +930,13 @@ DjVuDocEditor::generate_ref_map(const GP<DjVuFile> & file, GMap<GUTF8String, void *> & ref_map, GMap<GURL, void *> & visit_map) // This private function is used to generate a list (implemented as map) - // of files referencing the given file. To get list of all parents + // of files referencing the given file. To get list of all tqparents // for file with ID 'id' iterate map obtained as // *((GMap<GUTF8String, void *> *) ref_map[id]) { const GURL url=file->get_url(); const GUTF8String id(djvm_dir->name_to_file(url.fname())->get_load_name()); - if (!visit_map.contains(url)) + if (!visit_map.tqcontains(url)) { visit_map[url]=0; @@ -944,17 +944,17 @@ DjVuDocEditor::generate_ref_map(const GP<DjVuFile> & file, for(GPosition pos=files_list;pos;++pos) { GP<DjVuFile> child_file=files_list[pos]; - // First: add the current file to the list of parents for + // First: add the current file to the list of tqparents for // the child being processed GURL child_url=child_file->get_url(); const GUTF8String child_id( djvm_dir->name_to_file(child_url.fname())->get_load_name()); - GMap<GUTF8String, void *> * parents=0; - if (ref_map.contains(child_id)) - parents=(GMap<GUTF8String, void *> *) ref_map[child_id]; + GMap<GUTF8String, void *> * tqparents=0; + if (ref_map.tqcontains(child_id)) + tqparents=(GMap<GUTF8String, void *> *) ref_map[child_id]; else - ref_map[child_id]=parents=new GMap<GUTF8String, void *>(); - (*parents)[id]=0; + ref_map[child_id]=tqparents=new GMap<GUTF8String, void *>(); + (*tqparents)[id]=0; // Second: go recursively generate_ref_map(child_file, ref_map, visit_map); } @@ -966,35 +966,35 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref, GMap<GUTF8String, void *> & ref_map) // Private function, which will remove file with ID id. // - // If will also remove all INCL chunks in parent files pointing + // If will also remove all INCL chunks in tqparent files pointing // to this one // // Finally, if remove_unref is TRUE, we will go down the files // hierarchy removing every file, which becomes unreferenced. // - // ref_map will be used to find out list of parents referencing + // ref_map will be used to find out list of tqparents referencing // this file (required when removing INCL chunks) { - // First get rid of INCL chunks in parents - GMap<GUTF8String, void *> * parents=(GMap<GUTF8String, void *> *) ref_map[id]; - if (parents) + // First get rid of INCL chunks in tqparents + GMap<GUTF8String, void *> * tqparents=(GMap<GUTF8String, void *> *) ref_map[id]; + if (tqparents) { - for(GPosition pos=*parents;pos;++pos) + for(GPosition pos=*tqparents;pos;++pos) { - const GUTF8String parent_id((*parents).key(pos)); - const GP<DjVuFile> parent(get_djvu_file(parent_id)); - if (parent) - parent->unlink_file(id); + const GUTF8String tqparent_id((*tqparents).key(pos)); + const GP<DjVuFile> tqparent(get_djvu_file(tqparent_id)); + if (tqparent) + tqparent->unlink_file(id); } - delete parents; - parents=0; + delete tqparents; + tqparents=0; ref_map.del(id); } // We will accumulate errors here. GUTF8String errors; - // Now modify the ref_map and process children if necessary + // Now modify the ref_map and process tqchildren if necessary GP<DjVuFile> file=get_djvu_file(id); if (file) { @@ -1006,10 +1006,10 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref, GURL child_url=child_file->get_url(); const GUTF8String child_id( djvm_dir->name_to_file(child_url.fname())->get_load_name()); - GMap<GUTF8String, void *> * parents=(GMap<GUTF8String, void *> *) ref_map[child_id]; - if (parents) parents->del(id); + GMap<GUTF8String, void *> * tqparents=(GMap<GUTF8String, void *> *) ref_map[child_id]; + if (tqparents) tqparents->del(id); - if (remove_unref && (!parents || !parents->size())) + if (remove_unref && (!tqparents || !tqparents->size())) remove_file(child_id, remove_unref, ref_map); } } G_CATCH(exc) { @@ -1023,7 +1023,7 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref, // And get rid of its thumbnail, if any GCriticalSectionLock lock(&thumb_lock); - GPosition pos(thumb_map.contains(id)); + GPosition pos(thumb_map.tqcontains(id)); if (pos) { thumb_map.del(pos); @@ -1041,7 +1041,7 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref) if (!djvm_dir->id_to_file(id)) G_THROW( ERR_MSG("DjVuDocEditor.no_file") "\t"+id); - // First generate a map of references (containing the list of parents + // First generate a map of references (containing the list of tqparents // including this particular file. This will speed things up // significatly. GMap<GUTF8String, void *> ref_map; // GMap<GUTF8String, GMap<GUTF8String, void *> *> in fact @@ -1058,8 +1058,8 @@ DjVuDocEditor::remove_file(const GUTF8String &id, bool remove_unref) GPosition pos; while((pos=ref_map)) { - GMap<GUTF8String, void *> * parents=(GMap<GUTF8String, void *> *) ref_map[pos]; - delete parents; + GMap<GUTF8String, void *> * tqparents=(GMap<GUTF8String, void *> *) ref_map[pos]; + delete tqparents; ref_map.del(pos); } } @@ -1114,7 +1114,7 @@ DjVuDocEditor::move_file(const GUTF8String &id, int & file_pos, // NOTE! file_pos here is the desired position in DjVmDir *after* // the record with ID 'id' is removed. { - if (!map.contains(id)) + if (!map.tqcontains(id)) { map[id]=0; @@ -1291,7 +1291,7 @@ DjVuDocEditor::set_file_name(const GUTF8String &id, const GUTF8String &name) // Now find DjVuFile (if any) and rename it GPosition pos; - if (files_map.contains(id, pos)) + if (files_map.tqcontains(id, pos)) { GP<File> file=files_map[pos]; GP<DataPool> pool=file->pool; @@ -1503,7 +1503,7 @@ DjVuDocEditor::get_thumbnail(int page_num, bool dont_decode) const GUTF8String id(page_to_id(page_num)); GCriticalSectionLock lock(&thumb_lock); - const GPosition pos(thumb_map.contains(id)); + const GPosition pos(thumb_map.tqcontains(id)); if (pos) { // Get the image from the map @@ -1524,7 +1524,7 @@ DjVuDocEditor::get_thumbnails_num(void) const int pages_num=get_pages_num(); for(int page_num=0;page_num<pages_num;page_num++) { - if (thumb_map.contains(page_to_id(page_num))) + if (thumb_map.tqcontains(page_to_id(page_num))) cnt++; } return cnt; @@ -1541,7 +1541,7 @@ DjVuDocEditor::get_thumbnails_size(void) const int pages_num=get_pages_num(); for(int page_num=0;page_num<pages_num;page_num++) { - const GPosition pos(thumb_map.contains(page_to_id(page_num))); + const GPosition pos(thumb_map.tqcontains(page_to_id(page_num))); if (pos) { const GP<ByteStream> gstr(thumb_map[pos]->get_stream()); @@ -1629,7 +1629,7 @@ DjVuDocEditor::file_thumbnails(void) for(;;) { GUTF8String id(page_to_id(page_num)); - const GPosition pos(thumb_map.contains(id)); + const GPosition pos(thumb_map.tqcontains(id)); if (! pos) { G_THROW( ERR_MSG("DjVuDocEditor.no_thumb") "\t"+GUTF8String(page_num)); @@ -1695,7 +1695,7 @@ DjVuDocEditor::generate_thumbnails(int thumb_size, int page_num) if(page_num<(djvm_dir->get_pages_num())) { const GUTF8String id(page_to_id(page_num)); - if (!thumb_map.contains(id)) + if (!thumb_map.tqcontains(id)) { const GP<DjVuImage> dimg(get_page(page_num, true)); @@ -1747,7 +1747,7 @@ store_file(const GP<DjVmDir> & src_djvm_dir, const GP<DjVmDoc> & djvm_doc, GP<DjVuFile> & djvu_file, GMap<GURL, void *> & map) { GURL url=djvu_file->get_url(); - if (!map.contains(url)) + if (!map.tqcontains(url)) { map[url]=0; @@ -1821,12 +1821,12 @@ DjVuDocEditor::save_file( DEBUG_MSG("DjVuDocEditor::save_file(): ID='" << file_id << "'\n"); DEBUG_MAKE_INDENT(3); - if (!map.contains(file_id)) + if (!map.tqcontains(file_id)) { const GP<DjVmDir::File> file(djvm_dir->id_to_file(file_id)); GP<DataPool> file_pool; - const GPosition pos(files_map.contains(file_id)); + const GPosition pos(files_map.tqcontains(file_id)); if (pos) { const GP<File> file_rec(files_map[pos]); @@ -1974,7 +1974,7 @@ DjVuDocEditor::save_as(const GURL &where, bool bundled) GURL file_url=page_to_url(0); const GUTF8String file_id(djvm_dir->page_to_file(0)->get_load_name()); GP<DataPool> file_pool; - GPosition pos=files_map.contains(file_id); + GPosition pos=files_map.tqcontains(file_id); if (pos) { const GP<File> file_rec(files_map[pos]); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.h b/kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.h index 7bf6124a..96b18a06 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuDocEditor.h @@ -199,7 +199,7 @@ public: an exception is thrown. */ GUTF8String page_to_id(int page_num) const; - GUTF8String insert_file(const GURL &url, const GUTF8String &parent_id, + GUTF8String insert_file(const GURL &url, const GUTF8String &tqparent_id, int chunk_num=1, DjVuPort *source=0); /** Inserts the referenced file into this DjVu document. diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuDocument.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuDocument.cpp index 3b33d943..0ba922b3 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuDocument.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuDocument.cpp @@ -1328,7 +1328,7 @@ DjVuDocument::get_thumbnail(int page_num, bool dont_decode) } } - // Apparently we're out of luck and need to decode the requested + // Aptqparently we're out of luck and need to decode the requested // page (unless it's already done and if it's allowed) and render // it into the thumbnail. If dont_decode is true, do not attempt // to create this file (because this will result in a request for data) @@ -1368,7 +1368,7 @@ add_to_cache(const GP<DjVuFile> & f, GMap<GURL, void *> & map, DEBUG_MSG("DjVuDocument::add_to_cache(): url='" << url << "'\n"); DEBUG_MAKE_INDENT(3); - if (!map.contains(url)) + if (!map.tqcontains(url)) { map[url]=0; cache->add_file(f); @@ -1391,12 +1391,12 @@ DjVuDocument::add_to_cache(const GP<DjVuFile> & f) void DjVuDocument::notify_file_flags_changed(const DjVuFile * source, - long set_mask, long clr_mask) + long set_tqmask, long clr_tqmask) { // Don't check here if the document is initialized or not. // This function may be called when it's not. // check(); - if (set_mask & DjVuFile::DECODE_OK) + if (set_tqmask & DjVuFile::DECODE_OK) { set_file_aliases(source); if (cache) add_to_cache((DjVuFile *) source); @@ -1414,7 +1414,7 @@ DjVuDocument::notify_file_flags_changed(const DjVuFile * source, process_threqs(); } - if (set_mask & DjVuFile::DATA_PRESENT) + if (set_tqmask & DjVuFile::DATA_PRESENT) process_threqs(); // May be we can extract thumbnails now } @@ -1530,7 +1530,7 @@ add_file_to_djvm(const GP<DjVuFile> & file, bool page, { GURL url=file->get_url(); - if (!map.contains(url)) + if (!map.tqcontains(url)) { map[url]=0; @@ -1586,7 +1586,7 @@ static void local_get_url_names(DjVuFile * f,const GMap<GURL, void *> & map,GMap<GURL,void *> &tmpmap) { GURL url=f->get_url(); - if (!map.contains(url) && !tmpmap.contains(url)) + if (!map.tqcontains(url) && !tmpmap.tqcontains(url)) { tmpmap[url]=0; f->process_incl_chunks(); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuDocument.h b/kviewshell/plugins/djvu/libdjvu/DjVuDocument.h index 418d0814..91ab849b 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuDocument.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuDocument.h @@ -800,7 +800,7 @@ public: virtual GP<DjVuFile> id_to_file(const DjVuPort * source, const GUTF8String &id); virtual GP<DataPool> request_data(const DjVuPort * source, const GURL & url); virtual void notify_file_flags_changed(const DjVuFile * source, - long set_mask, long clr_mask); + long set_tqmask, long clr_tqmask); virtual GList<GURL> get_url_names(void); virtual void set_recover_errors(ErrorRecoveryAction=ABORT); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuDumpHelper.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuDumpHelper.cpp index 2d977be1..87a77c79 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuDumpHelper.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuDumpHelper.cpp @@ -293,7 +293,7 @@ display_chunks(ByteStream & out_str, IFFByteStream &iff, while ((size = iff.get_chunk(id, &rawoffset))) { - if (!counters.contains(id)) counters[id]=0; + if (!counters.tqcontains(id)) counters[id]=0; else counters[id]++; GUTF8String msg; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuErrorList.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuErrorList.cpp index e7c74b84..c765fdd0 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuErrorList.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuErrorList.cpp @@ -102,7 +102,7 @@ DjVuErrorList::notify_error(const DjVuPort * source, const GUTF8String & msg) bool DjVuErrorList::notify_status(const DjVuPort * source, const GUTF8String &msg) { - Status.append(msg); + tqStatus.append(msg); return 1; } @@ -120,16 +120,16 @@ DjVuErrorList::GetError(void) } GUTF8String -DjVuErrorList::GetStatus(void) +DjVuErrorList::GettqStatus(void) { - GUTF8String PrevStatus; + GUTF8String PrevtqStatus; GPosition pos; - if((pos=Status)) + if((pos=tqStatus)) { - PrevStatus=Status[pos]; - Status.del(pos); + PrevtqStatus=tqStatus[pos]; + tqStatus.del(pos); } - return PrevStatus; + return PrevtqStatus; } GP<DataPool> diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuErrorList.h b/kviewshell/plugins/djvu/libdjvu/DjVuErrorList.h index 885e76aa..c42e96e2 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuErrorList.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuErrorList.h @@ -126,13 +126,13 @@ public: inline GList<GUTF8String> GetStatusList(void); /// Just clear the list. - inline void ClearStatus(void); + inline void CleartqStatus(void); /// Get one status message and clear that message from the list. - GUTF8String GetStatus(void); + GUTF8String GettqStatus(void); /// Check if there are any more status messages. - inline bool HasStatus(void) const; + inline bool HastqStatus(void) const; /** This gets the data. We can't use the simple port's request data since we want to allow the user to specify the ByteStream. */ @@ -143,7 +143,7 @@ private: GURL pool_url; GP<DataPool> pool; GList<GUTF8String> Errors; - GList<GUTF8String> Status; + GList<GUTF8String> tqStatus; private: //dummy stuff static GURL set_stream(ByteStream *); }; @@ -167,22 +167,22 @@ DjVuErrorList::ClearError(void) inline GList<GUTF8String> DjVuErrorList::GetStatusList(void) { - GList<GUTF8String> retval=(const GList<GUTF8String>)Status; - Status.empty(); + GList<GUTF8String> retval=(const GList<GUTF8String>)tqStatus; + tqStatus.empty(); return retval; } inline void -DjVuErrorList::ClearStatus(void) -{ Status.empty(); } +DjVuErrorList::CleartqStatus(void) +{ tqStatus.empty(); } inline bool DjVuErrorList::HasError(void) const { return !Errors.isempty(); } inline bool -DjVuErrorList::HasStatus(void) const -{ return !Status.isempty(); } +DjVuErrorList::HastqStatus(void) const +{ return !tqStatus.isempty(); } #ifdef HAVE_NAMESPACES diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuFile.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuFile.cpp index 73e3a9c2..88dc90c0 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuFile.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuFile.cpp @@ -398,10 +398,10 @@ DjVuFile::notify_chunk_done(const DjVuPort *, const GUTF8String &) void DjVuFile::notify_file_flags_changed(const DjVuFile * src, - long set_mask, long clr_mask) + long set_tqmask, long clr_tqmask) { check(); - if (set_mask & (DECODE_OK | DECODE_FAILED | DECODE_STOPPED)) + if (set_tqmask & (DECODE_OK | DECODE_FAILED | DECODE_STOPPED)) { // Signal threads waiting for file termination finish_mon.enter(); @@ -414,12 +414,12 @@ DjVuFile::notify_file_flags_changed(const DjVuFile * src, chunk_mon.leave(); } - if ((set_mask & ALL_DATA_PRESENT) && src!=this && + if ((set_tqmask & ALL_DATA_PRESENT) && src!=this && are_incl_files_created() && is_data_present()) { if (src!=this && are_incl_files_created() && is_data_present()) { - // Check if all children have data + // Check if all tqchildren have data bool all=true; { GCriticalSectionLock lock(&inc_files_lock); @@ -488,7 +488,7 @@ DjVuFile::decode_func(void) while(wait_for_finish(0)) continue; - DEBUG_MSG("waiting for children termination\n"); + DEBUG_MSG("waiting for tqchildren termination\n"); // Check for termination status GCriticalSectionLock lock(&inc_files_lock); for(GPosition pos=inc_files_list;pos;++pos) @@ -928,10 +928,10 @@ DjVuFile::decode_chunk( const GUTF8String &id, const GP<ByteStream> &gbs, GP<JB2Dict> fgjd = JB2Dict::create(); fgjd->decode(gbs); this->fgjd = fgjd; - desc.format( ERR_MSG("DjVuFile.shape_dict") "\t%d", fgjd->get_shape_count() ); + desc.format( ERR_MSG("DjVuFile.tqshape_dict") "\t%d", fgjd->get_tqshape_count() ); } - // Sjbz (JB2 encoded mask) + // Sjbz (JB2 encoded tqmask) else if (chkid=="Sjbz" && (djvu || djvi)) { if (this->fgjb) @@ -943,19 +943,19 @@ DjVuFile::decode_chunk( const GUTF8String &id, const GP<ByteStream> &gbs, // ---- end hack fgjb->decode(gbs, static_get_fgjd, (void*)this); this->fgjb = fgjb; - desc.format( ERR_MSG("DjVuFile.fg_mask") "\t%d\t%d\t%d", + desc.format( ERR_MSG("DjVuFile.fg_tqmask") "\t%d\t%d\t%d", fgjb->get_width(), fgjb->get_height(), get_dpi(fgjb->get_width(), fgjb->get_height())); } - // Smmr (MMR-G4 encoded mask) + // Smmr (MMR-G4 encoded tqmask) else if (chkid=="Smmr" && (djvu || djvi)) { if (this->fgjb) G_THROW( ERR_MSG("DjVuFile.dupl_Sxxx") ); set_can_compress(true); this->fgjb = MMRDecoder::decode(gbs); - desc.format( ERR_MSG("DjVuFile.G4_mask") "\t%d\t%d\t%d", + desc.format( ERR_MSG("DjVuFile.G4_tqmask") "\t%d\t%d\t%d", fgjb->get_width(), fgjb->get_height(), get_dpi(fgjb->get_width(), fgjb->get_height())); } @@ -1465,7 +1465,7 @@ DjVuFile::find_ndir(GMap<GURL, void *> & map) if (dir) return dir; - if (!map.contains(url)) + if (!map.tqcontains(url)) { map[url]=0; @@ -1496,7 +1496,7 @@ DjVuFile::decode_ndir(GMap<GURL, void *> & map) if (dir) return dir; - if (!map.contains(url)) + if (!map.tqcontains(url)) { map[url]=0; @@ -1570,7 +1570,7 @@ DjVuFile::get_merged_anno(const GP<DjVuFile> & file, { DEBUG_MSG("DjVuFile::get_merged_anno()\n"); GURL url=file->get_url(); - if (!map.contains(url)) + if (!map.tqcontains(url)) { ByteStream &str_out=*gstr_out; map[url]=0; @@ -1585,7 +1585,7 @@ DjVuFile::get_merged_anno(const GP<DjVuFile> & file, get_merged_anno(list[pos], gstr_out, ignore_list, level+1, max_level, map); // Now process the DjVuFile's own annotations - if (!ignore_list.contains(file->get_url())) + if (!ignore_list.tqcontains(file->get_url())) { if (!file->is_data_present() || file->is_modified() && file->anno) @@ -1966,7 +1966,7 @@ void DjVuFile::move(GMap<GURL, void *> & map, const GURL & dir_url) // This function may block for data. { - if (!map.contains(url)) + if (!map.tqcontains(url)) { map[url]=0; @@ -2095,7 +2095,7 @@ DjVuFile::contains_chunk(const GUTF8String &chunk_name) chunk_name << "'\n"); DEBUG_MAKE_INDENT(3); - bool contains=0; + bool tqcontains=0; const GP<ByteStream> str(data_pool->get_stream()); GUTF8String chkid; const GP<IFFByteStream> giff(IFFByteStream::create(str)); @@ -2112,10 +2112,10 @@ DjVuFile::contains_chunk(const GUTF8String &chunk_name) for(;(chunks_left--)&&(chksize=iff.get_chunk(chkid));last_chunk=chunks) { chunks++; - if (chkid==chunk_name) { contains=1; break; } + if (chkid==chunk_name) { tqcontains=1; break; } iff.seek_close_chunk(); } - if (!contains &&(chunks_number < 0)) chunks_number=last_chunk; + if (!tqcontains &&(chunks_number < 0)) chunks_number=last_chunk; } G_CATCH(ex) { @@ -2125,7 +2125,7 @@ DjVuFile::contains_chunk(const GUTF8String &chunk_name) } G_ENDCATCH; data_pool->clear_stream(); - return contains; + return tqcontains; } bool @@ -2225,7 +2225,7 @@ DjVuFile::add_djvu_data(IFFByteStream & ostr, GMap<GURL, void *> & map, const bool included_too, const bool no_ndir) { check(); - if (map.contains(url)) return; + if (map.tqcontains(url)) return; bool top_level = !map.size(); map[url]=0; bool processed_annotation = false; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuFile.h b/kviewshell/plugins/djvu/libdjvu/DjVuFile.h index ea0e6db3..9d83f5ae 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuFile.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuFile.h @@ -134,7 +134,7 @@ class DjVuNavDir; {\bf Inclusion} is also a new feature specifically designed for a multipage document. Indeed, inside a given document there can be a lot of things shared between its pages. Examples can be the document - annotation (\Ref{DjVuAnno}) and other things like shared shapes and + annotation (\Ref{DjVuAnno}) and other things like shared tqshapes and dictionary (to be implemented). To avoid putting these chunks into every page, we have invented new chunk called #INCL# which purpose is to make the decoder open the specified file and decode it. @@ -215,9 +215,9 @@ public: GP<IW44Image> bg44; /// Pointer to the background component of DjVu image (Raw). GP<GPixmap> bgpm; - /// Pointer to the mask of foreground component of DjVu image (JB2 encoded). + /// Pointer to the tqmask of foreground component of DjVu image (JB2 encoded). GP<JB2Image> fgjb; - /// Pointer to the optional shape dictionary for the mask (JB2 encoded). + /// Pointer to the optional tqshape dictionary for the tqmask (JB2 encoded). GP<JB2Dict> fgjd; /// Pointer to a colors layer for the foreground component of DjVu image. GP<GPixmap> fgpm; @@ -442,7 +442,7 @@ public: {\bf Warning.} Included files are normally created during decoding. Before that they do not exist. If you call this function at that time and set #only_created# to #FALSE# then it will have to - read all the data from this file in order to find #INCL# chunks, + read all the data from this file in order to tqfind #INCL# chunks, which may block your application, if not all data is available. @param only_created If #TRUE#, the file will not try to process @@ -610,7 +610,7 @@ public: virtual bool inherits(const GUTF8String &class_name) const; virtual void notify_chunk_done(const DjVuPort * source, const GUTF8String &name); virtual void notify_file_flags_changed(const DjVuFile * source, - long set_mask, long clr_mask); + long set_tqmask, long clr_tqmask); virtual void set_recover_errors(const ErrorRecoveryAction=ABORT); virtual void set_verbose_eof(const bool verbose_eof=true); virtual void report_error(const GException &ex,const bool=true); @@ -648,7 +648,7 @@ private: const GP<ByteStream> &str, bool djvi, bool djvu, bool iw44); int get_dpi(int w, int h); - // Functions dealing with the shape directory (fgjd) + // Functions dealing with the tqshape directory (fgjd) static GP<JB2Dict> static_get_fgjd(void *); GP<JB2Dict> get_fgjd(int block=0); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp index b31b04bf..85454b4c 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp @@ -111,7 +111,7 @@ DjVuProgressTask::set_callback(djvu_progress_callback *_callback) { GMap<void *,GP<DjVuProgressTask::Data> > &map=get_map(); void *threadID=GThread::current(); - if(map.contains(threadID)) + if(map.tqcontains(threadID)) { DjVuProgressTask::Data &data=*(map[threadID]); retval=data.callback; @@ -127,7 +127,7 @@ DjVuProgressTask::set_callback(djvu_progress_callback *_callback) { GMap<void *,GP<DjVuProgressTask::Data> > &map=get_map(); void *threadID=GThread::current(); - if(map.contains(threadID)) + if(map.tqcontains(threadID)) { DjVuProgressTask::Data &data=*(map[threadID]); retval=data.callback; @@ -142,13 +142,13 @@ DjVuProgressTask::set_callback(djvu_progress_callback *_callback) } DjVuProgressTask::DjVuProgressTask(const char *xtask,int nsteps) - : task(xtask),parent(0), nsteps(nsteps), runtostep(0), gdata(0), data(0) + : task(xtask),tqparent(0), nsteps(nsteps), runtostep(0), gdata(0), data(0) { // gtask=task; { GMap<void *,GP<DjVuProgressTask::Data> > &map=get_map(); void *threadID=GThread::current(); - if(map.contains(threadID)) + if(map.tqcontains(threadID)) { gdata=new GP<Data>; Data &d=*(data=((*(GP<Data> *)gdata)=map[threadID])); @@ -158,7 +158,7 @@ DjVuProgressTask::DjVuProgressTask(const char *xtask,int nsteps) startdate = curdate; if (!d.head) d.lastsigdate = curdate + INITIAL; - parent = d.head; + tqparent = d.head; d.head = this; } } @@ -171,8 +171,8 @@ DjVuProgressTask::~DjVuProgressTask() { if (data->head != this) G_THROW( ERR_MSG("DjVuGlobal.not_compatible") ); - data->head = parent; - if (!parent) + data->head = tqparent; + if (!tqparent) { unsigned long curdate = GOS::ticks(); if((*(data->callback))(data->gtask?data->gtask:"",curdate-startdate, curdate-startdate)) @@ -210,9 +210,9 @@ DjVuProgressTask::signal(unsigned long curdate, unsigned long estdate) { const unsigned long enddate = startdate+ (unsigned long)(((float)(estdate-startdate) * (float)nsteps) / (float)inprogress); - if (parent) + if (tqparent) { - parent->signal(curdate, enddate); + tqparent->signal(curdate, enddate); } else if (data && data->callback && curdate<enddate) { diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.h b/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.h index 3d26c8cf..1e52d698 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.h @@ -268,7 +268,7 @@ public: const char *task; static djvu_progress_callback *set_callback(djvu_progress_callback *ptr=0); private: - DjVuProgressTask *parent; + DjVuProgressTask *tqparent; int nsteps; int runtostep; unsigned long startdate; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp index f384ce97..acba10f2 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuImage.cpp @@ -91,7 +91,7 @@ namespace DJVU { //// DJVUIMAGE: CONSTRUCTION DjVuImage::DjVuImage(void) -: rotate_count(-1),relayout_sent(false) +: rotate_count(-1),retqlayout_sent(false) { } @@ -423,13 +423,13 @@ DjVuImage::get_long_description() const void DjVuImage::notify_chunk_done(const DjVuPort *, const GUTF8String & name) { - if (!relayout_sent && + if (!retqlayout_sent && ( !name.cmp("INFO", 4) || !name.cmp("PMxx", 2) || !name.cmp("BMxx", 2) ) ) { - DjVuPort::get_portcaster()->notify_relayout(this); - relayout_sent=true; + DjVuPort::get_portcaster()->notify_retqlayout(this); + retqlayout_sent=true; } else if (!name.cmp("Sxxx", 1) || !name.cmp("BGxx", 2) || @@ -461,7 +461,7 @@ public: GP<DataPool> request_data(const DjVuPort *src, const GURL & url); void notify_chunk_done(const DjVuPort *, const GUTF8String &name); void notify_redisplay(const class DjVuImage * source); - void notify_relayout(const class DjVuImage * source); + void notify_retqlayout(const class DjVuImage * source); }; DjVuImageNotifier::DjVuImageNotifier(DjVuInterface *notifier) @@ -485,10 +485,10 @@ DjVuImageNotifier::notify_redisplay(const class DjVuImage * source) } void -DjVuImageNotifier::notify_relayout(const class DjVuImage * source) +DjVuImageNotifier::notify_retqlayout(const class DjVuImage * source) { if (notifier) - notifier->notify_relayout(); + notifier->notify_retqlayout(); } void @@ -848,17 +848,17 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect, for (int blitno = 0; blitno < jimg->get_blit_count(); blitno++) { const JB2Blit *pblit = jimg->get_blit(blitno); - const JB2Shape &pshape = jimg->get_shape(pblit->shapeno); - if (pshape.bits && + const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno); + if (ptqshape.bits && pblit->left <= rect.xmax * subsample && pblit->bottom <= rect.ymax * subsample && - pblit->left + (int)pshape.bits->columns() >= rect.xmin * subsample && - pblit->bottom + (int)pshape.bits->rows() >= rect.ymin * subsample ) + pblit->left + (int)ptqshape.bits->columns() >= rect.xmin * subsample && + pblit->bottom + (int)ptqshape.bits->rows() >= rect.ymin * subsample ) { // Record component list if (fgbc) components.append(blitno); // Blit - bm->blit(pshape.bits, + bm->blit(ptqshape.bits, pblit->left - rxmin, pblit->bottom - rymin, subsample); } @@ -902,9 +902,9 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect, lastx = pblit->left; if (fg->colordata[blitno] == colorindex) { - const JB2Shape &pshape = jimg->get_shape(pblit->shapeno); + const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno); GRect rect(pblit->left, pblit->bottom, - pshape.bits->columns(), pshape.bits->rows()); + ptqshape.bits->columns(), ptqshape.bits->rows()); comprect.recthull(comprect, rect); compset.insert_before(nullpos, components, pos); continue; @@ -927,8 +927,8 @@ DjVuImage::stencil(GPixmap *pm, const GRect &rect, { int blitno = compset[pos]; const JB2Blit *pblit = jimg->get_blit(blitno); - const JB2Shape &pshape = jimg->get_shape(pblit->shapeno); - bm->blit(pshape.bits, + const JB2Shape &ptqshape = jimg->get_tqshape(pblit->tqshapeno); + bm->blit(ptqshape.bits, pblit->left - rxmin, pblit->bottom - rymin, subsample); } @@ -1085,8 +1085,8 @@ do_bitmap(const DjVuImage &dimg, BImager get, ///* rotate code ends // Sanity - if (! ( all.contains(rect.xmin, rect.ymin) && - all.contains(rect.xmax-1, rect.ymax-1) )) + if (! ( all.tqcontains(rect.xmin, rect.ymin) && + all.tqcontains(rect.xmax-1, rect.ymax-1) )) G_THROW( ERR_MSG("DjVuImage.bad_rect") ); // Check for integral reduction int red; @@ -1151,8 +1151,8 @@ do_pixmap(const DjVuImage &dimg, PImager get, ///* rotate code ends // Sanity - if (! ( all.contains(rect.xmin, rect.ymin) && - all.contains(rect.xmax-1, rect.ymax-1) )) + if (! ( all.tqcontains(rect.xmin, rect.ymin) && + all.tqcontains(rect.xmax-1, rect.ymax-1) )) G_THROW( ERR_MSG("DjVuImage.bad_rect2") ); // Check for integral reduction int red, w=0, h=0, rw=0, rh=0; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuImage.h b/kviewshell/plugins/djvu/libdjvu/DjVuImage.h index 57b40938..7f2e836a 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuImage.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuImage.h @@ -123,7 +123,7 @@ class DjVuInterface public: virtual ~DjVuInterface(); virtual void notify_chunk(const char *chkid, const char *msg) = 0; - virtual void notify_relayout(void) = 0; + virtual void notify_retqlayout(void) = 0; virtual void notify_redisplay(void) = 0; }; @@ -185,13 +185,13 @@ public: function returns a null pointer until the decoder actually processes an #"BGjp"# chunk. */ GP<GPixmap> get_bgpm() const; - /** Returns a pointer to the mask of the foreground component of a DjVu - image. The mask of the foreground component is always a JB2 image in + /** Returns a pointer to the tqmask of the foreground component of a DjVu + image. The tqmask of the foreground component is always a JB2 image in this implementation. This function returns a null pointer until the decoder actually processes an #"Sjbz"# chunk. */ GP<JB2Image> get_fgjb() const; /** Returns a pointer to the colors of the foreground component of a DjVu - image. The mask of the foreground component is always a small pixmap in + image. The tqmask of the foreground component is always a small pixmap in this implementation. This function returns a null pointer until the decoder actually processes an #"FG44"# chunk. */ GP<GPixmap> get_fgpm() const; @@ -284,7 +284,7 @@ public: \begin{verbatim} DJVU Image (2325x3156) version 17: 0.0 Kb 'INFO' Page information. - 17.3 Kb 'Sjbz' JB2 foreground mask (2325x3156) + 17.3 Kb 'Sjbz' JB2 foreground tqmask (2325x3156) 2.5 Kb 'BG44' IW44 background (775x1052) 1.0 Kb 'FG44' IW44 foreground colors (194x263) 3.0 Kb 'BG44' IW44 background (part 2). @@ -318,7 +318,7 @@ public: /** This function returns true if this object contains a well formed {\em Bilevel DjVu Image}. Calling function #get_bitmap# on a well formed bilevel image should always return a non zero value. Note that function - #get_bitmap# works as soon as a foreground mask component is present, + #get_bitmap# works as soon as a foreground tqmask component is present, regardless of the fact that the image follows the rules or not. */ int is_legal_bilevel() const; /** This function returns true if this object contains a well formed {\em @@ -351,9 +351,9 @@ public: This function returns a null pointer if there is not enough information in the DjVu image to properly render the desired image. */ GP<GPixmap> get_pixmap(const GRect &rect, const GRect &all, double gamma=0) const; - /** Renders the mask of the foreground layer of the DjVu image. This + /** Renders the tqmask of the foreground layer of the DjVu image. This functions is a wrapper for \Ref{JB2Image::get_bitmap}. Argument #align# - specified the alignment of the rows of the returned images. Setting + specified the tqalignment of the rows of the returned images. Setting #align# to #4#, for instance, will adjust the bitmap border in order to make sure that each row of the returned image starts on a word (four byte) boundary. This function returns a null pointer if there is not @@ -414,7 +414,7 @@ public: private: GP<DjVuFile> file; int rotate_count; - bool relayout_sent; + bool retqlayout_sent; // HELPERS int stencil(GPixmap *pm, const GRect &rect, int subs, double gcorr) const; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuMessage.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuMessage.cpp index e92b7570..f20c1106 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuMessage.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuMessage.cpp @@ -240,7 +240,7 @@ GetModulePath( void ) { retval=GURL::UTF8(xprogramname,paths[pos]); const GUTF8String path(retval.get_string()); - if(!pathMAP.contains(path)) + if(!pathMAP.tqcontains(path)) { if(retval.is_file()) break; @@ -263,7 +263,7 @@ appendPath(const GURL &url, GList<GURL> &list) { if( !url.is_empty() - && !map.contains(url.get_string()) && url.is_dir() ) + && !map.tqcontains(url.get_string()) && url.is_dir() ) { map[url.get_string()]=0; list.append(url); @@ -375,14 +375,14 @@ DjVuMessage::GetProfilePaths(void) for(pos=localemaps;pos;++pos) { const GMap<GUTF8String,GP<lt_XMLTags> > &localemap=localemaps[pos]; - GPosition pos=localemap.contains(sublocale); + GPosition pos=localemap.tqcontains(sublocale); if(!pos) - pos=localemap.contains(downcasesublocale); + pos=localemap.tqcontains(downcasesublocale); if(pos) { const GMap<GUTF8String,GUTF8String>&args = localemap[pos]->get_args(); - pos = args.contains(srcstring); + pos = args.tqcontains(srcstring); if (pos) { const GUTF8String src(args[pos]); @@ -496,7 +496,7 @@ getbodies( for(GPosition pos=includes;pos;++pos) { const GUTF8String file=includes.key(pos); - if(! map.contains(file)) + if(! map.tqcontains(file)) { GList<GURL> xpaths; xpaths.append(url.base()); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuMessageLite.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuMessageLite.cpp index 258b0649..70b2b541 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuMessageLite.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuMessageLite.cpp @@ -238,7 +238,7 @@ DjVuMessageLite::LookUpSingle( const GUTF8String &Single_Message ) const return Single_Message; #endif // Isolate the message ID and get the corresponding message text - int ending_posn = Single_Message.contains("\t\v"); + int ending_posn = Single_Message.tqcontains("\t\v"); if( ending_posn < 0 ) ending_posn = Single_Message.length(); GUTF8String msg_text; @@ -276,7 +276,7 @@ DjVuMessageLite::LookUpSingle( const GUTF8String &Single_Message ) const arg=LookUpSingle(Single_Message.substr(start_posn,ending_posn)); }else { - ending_posn = Single_Message.contains("\v\t",start_posn); + ending_posn = Single_Message.tqcontains("\v\t",start_posn); if( ending_posn < 0 ) ending_posn = Single_Message.length(); arg=Single_Message.substr(start_posn, ending_posn-start_posn); @@ -308,11 +308,11 @@ DjVuMessageLite::LookUpID( const GUTF8String &xmsgID, if (start > 0) msgID = msgID.substr(start, msgID.length() - start); #endif - GPosition pos=Map.contains(msgID); + GPosition pos=Map.tqcontains(msgID); if(pos) { const GP<lt_XMLTags> tag=Map[pos]; - GPosition valuepos=tag->get_args().contains(valuestring); + GPosition valuepos=tag->get_args().tqcontains(valuestring); if(valuepos) { message_text=tag->get_args()[valuepos]; @@ -331,7 +331,7 @@ DjVuMessageLite::LookUpID( const GUTF8String &xmsgID, message_text=raw.substr(start_line+1,end_text-start_line-1).fromEscaped(); } } - GPosition numberpos=tag->get_args().contains(numberstring); + GPosition numberpos=tag->get_args().tqcontains(numberstring); if(numberpos) { message_number=tag->get_args()[numberpos]; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuNavDir.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuNavDir.cpp index 615041b0..49a2d31e 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuNavDir.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuNavDir.cpp @@ -112,7 +112,7 @@ DjVuNavDir::decode(ByteStream & str) *ptr=0; if (!strlen(buffer)) continue; - if (!tmp_page2name.contains(buffer)) + if (!tmp_page2name.tqcontains(buffer)) tmp_page2name.append(buffer); }; @@ -161,7 +161,7 @@ DjVuNavDir::name_to_page(const char * name) const { GCriticalSectionLock lk((GCriticalSection *)&lock); - if (!name2page.contains(name)) return -1; + if (!name2page.tqcontains(name)) return -1; return name2page[name]; } @@ -170,7 +170,7 @@ DjVuNavDir::url_to_page(const GURL & url) const { GCriticalSectionLock lk((GCriticalSection *)&lock); - if (!url2page.contains(url)) return -1; + if (!url2page.tqcontains(url)) return -1; return url2page[url]; } diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuPalette.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuPalette.cpp index 4e49fe12..a3f11bd0 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuPalette.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuPalette.cpp @@ -107,7 +107,7 @@ fmin(float a, float b) DjVuPalette::DjVuPalette() - : mask(0), hist(0), pmap(0) + : tqmask(0), hist(0), pmap(0) { } @@ -124,7 +124,7 @@ DjVuPalette::operator=(const DjVuPalette &ref) { delete hist; delete pmap; - mask = 0; + tqmask = 0; palette = ref.palette; colordata = ref.colordata; } @@ -132,7 +132,7 @@ DjVuPalette::operator=(const DjVuPalette &ref) } DjVuPalette::DjVuPalette(const DjVuPalette &ref) - : mask(0), hist(0), pmap(0) + : tqmask(0), hist(0), pmap(0) { this->operator=(ref); } @@ -147,18 +147,18 @@ DjVuPalette::allocate_hist() if (! hist) { hist = new GMap<int,int>; - mask = 0; + tqmask = 0; } else { GMap<int,int> *old = hist; hist = new GMap<int,int>; - mask = (mask<<1)|(0x010101); + tqmask = (tqmask<<1)|(0x010101); for (GPosition p = *old; p; ++p) { int k = old->key(p); int w = (*old)[p]; - (*hist)[k | mask] += w; + (*hist)[k | tqmask] += w; } delete old; } @@ -540,7 +540,7 @@ DjVuPalette::decode(GP<ByteStream> gbs) delete pmap; hist = 0; pmap = 0; - mask = 0; + tqmask = 0; // Code version int version = bs.read8(); if ( (version & 0x7f) != DJVUPALETTEVERSION) diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuPalette.h b/kviewshell/plugins/djvu/libdjvu/DjVuPalette.h index 7f9884f1..e44aab6d 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuPalette.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuPalette.h @@ -104,7 +104,7 @@ namespace DJVU { \Ref{index_to_color}. There are also functions for computing a palette and quantizing a complete pixmap. - {\bf Sequences of color indices} -- The DjVuPalette object also contains + {\bf Sequences of color indices} -- The DjVuPalette object also tqcontains an array \Ref{colordata} optionally containing a sequence of color indices. This array will be encoded and decoded by functions \Ref{encode} and \Ref{decode}. This feature simplifies the implementation of the ``one @@ -210,7 +210,7 @@ public: private: // Histogram - int mask; + int tqmask; GMap<int,int> *hist; // Quantization data struct PColor { unsigned char p[4]; }; @@ -240,7 +240,7 @@ DjVuPalette::histogram_clear() { delete hist; hist = 0; - mask = 0; + tqmask = 0; } inline void @@ -250,7 +250,7 @@ DjVuPalette::histogram_add(const unsigned char *bgr, int weight) { if (!hist || hist->size()>=0x4000) allocate_hist(); - int key = (bgr[0]<<16)|(bgr[1]<<8)|(bgr[2])|(mask); + int key = (bgr[0]<<16)|(bgr[1]<<8)|(bgr[2])|(tqmask); (*hist)[key] += weight; } } @@ -271,7 +271,7 @@ DjVuPalette::histogram_norm_and_add(const int *bgr, int weight) int p2 = bgr[2]/weight; if (p2>255) p2=255; if (!hist || hist->size()>=0x4000) allocate_hist(); - int key = (p0<<16)|(p1<<8)|(p2)|(mask); + int key = (p0<<16)|(p1<<8)|(p2)|(tqmask); (*hist)[key] += weight; } } @@ -288,7 +288,7 @@ DjVuPalette::color_to_index(const unsigned char *bgr) if (! pmap) allocate_pmap(); int key = (bgr[0]<<16)|(bgr[1]<<8)|(bgr[2]); - GPosition p = pmap->contains(key); + GPosition p = pmap->tqcontains(key); if ( p) return (*pmap)[p]; return color_to_index_slow(bgr); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuPort.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuPort.cpp index 5e8a25c9..02890407 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuPort.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuPort.cpp @@ -208,7 +208,7 @@ DjVuPort::DjVuPort() { DjVuPortcaster *pcaster = get_portcaster(); GCriticalSectionLock lock(& pcaster->map_lock ); - GPosition p = pcaster->cont_map.contains(this); + GPosition p = pcaster->cont_map.tqcontains(this); if (!p) G_THROW( ERR_MSG("DjVuPort.not_alloc") ); pcaster->cont_map[p] = (void*)this; } @@ -217,7 +217,7 @@ DjVuPort::DjVuPort(const DjVuPort & port) { DjVuPortcaster *pcaster = get_portcaster(); GCriticalSectionLock lock(& pcaster->map_lock ); - GPosition p = pcaster->cont_map.contains(this); + GPosition p = pcaster->cont_map.tqcontains(this); if (!p) G_THROW( ERR_MSG("DjVuPort.not_alloc") ); pcaster->cont_map[p] = (void*)this; pcaster->copy_routes(this, &port); @@ -259,7 +259,7 @@ DjVuPortcaster::is_port_alive(DjVuPort *port) { GP<DjVuPort> gp_port; GCriticalSectionLock lock(&map_lock); - GPosition pos=cont_map.contains(port); + GPosition pos=cont_map.tqcontains(port); if (pos && cont_map[pos] && ((DjVuPort *) port)->get_count()>0) gp_port=port; return gp_port; @@ -302,7 +302,7 @@ DjVuPortcaster::alias_to_port(const GUTF8String &alias) { GCriticalSectionLock lock(&map_lock); GPosition pos; - if (a2p_map.contains(alias, pos)) + if (a2p_map.tqcontains(alias, pos)) { DjVuPort * port=(DjVuPort *) a2p_map[pos]; GP<DjVuPort> gp_port=is_port_alive(port); @@ -344,10 +344,10 @@ DjVuPortcaster::del_port(const DjVuPort * port) clear_aliases(port); // Update "contents map" - if (cont_map.contains(port, pos)) cont_map.del(pos); + if (cont_map.tqcontains(port, pos)) cont_map.del(pos); // Update "route map" - if (route_map.contains(port, pos)) + if (route_map.tqcontains(port, pos)) { delete (GList<void *> *) route_map[pos]; route_map.del(pos); @@ -372,12 +372,12 @@ DjVuPortcaster::add_route(const DjVuPort * src, DjVuPort * dst) // Adds route src->dst { GCriticalSectionLock lock(&map_lock); - if (cont_map.contains(src) && src->get_count()>0 && - cont_map.contains(dst) && dst->get_count()>0) + if (cont_map.tqcontains(src) && src->get_count()>0 && + cont_map.tqcontains(dst) && dst->get_count()>0) { - if (!route_map.contains(src)) route_map[src]=new GList<void *>(); + if (!route_map.tqcontains(src)) route_map[src]=new GList<void *>(); GList<void *> & list=*(GList<void *> *) route_map[src]; - if (!list.contains(dst)) list.append(dst); + if (!list.tqcontains(dst)) list.append(dst); } } @@ -387,7 +387,7 @@ DjVuPortcaster::del_route(const DjVuPort * src, DjVuPort * dst) { GCriticalSectionLock lock(&map_lock); - if (route_map.contains(src)) + if (route_map.tqcontains(src)) { GList<void *> & list=*(GList<void *> *) route_map[src]; GPosition pos; @@ -408,8 +408,8 @@ DjVuPortcaster::copy_routes(DjVuPort * dst, const DjVuPort * src) { GCriticalSectionLock lock(&map_lock); - if (!cont_map.contains(src) || src->get_count()<=0 || - !cont_map.contains(dst) || dst->get_count()<=0) return; + if (!cont_map.tqcontains(src) || src->get_count()<=0 || + !cont_map.tqcontains(dst) || dst->get_count()<=0) return; for(GPosition pos=route_map;pos;++pos) { @@ -430,13 +430,13 @@ DjVuPortcaster::add_to_closure(GMap<const void *, void *> & set, // Assuming that the map's already locked // GCriticalSectionLock lock(&map_lock); set[dst]= (void*) (unsigned long) distance; - if (route_map.contains(dst)) + if (route_map.tqcontains(dst)) { GList<void *> & list=*(GList<void *> *) route_map[dst]; for(GPosition pos=list;pos;++pos) { DjVuPort * new_dst=(DjVuPort *) list[pos]; - if (!set.contains(new_dst)) + if (!set.tqcontains(new_dst)) add_to_closure(set, new_dst, distance+1); } } @@ -447,7 +447,7 @@ DjVuPortcaster::compute_closure(const DjVuPort * src, GPList<DjVuPort> &list, bo { GCriticalSectionLock lock(&map_lock); GMap<const void*, void*> set; - if (route_map.contains(src)) + if (route_map.tqcontains(src)) { GList<void *> & list=*(GList<void *> *) route_map[src]; for(GPosition pos=list;pos;++pos) @@ -557,12 +557,12 @@ DjVuPortcaster::notify_redisplay(const DjVuImage * source) } void -DjVuPortcaster::notify_relayout(const DjVuImage * source) +DjVuPortcaster::notify_retqlayout(const DjVuImage * source) { GPList<DjVuPort> list; compute_closure(source, list); for(GPosition pos=list; pos; ++pos) - list[pos]->notify_relayout(source); + list[pos]->notify_retqlayout(source); } void @@ -576,22 +576,22 @@ DjVuPortcaster::notify_chunk_done(const DjVuPort * source, const GUTF8String &na void DjVuPortcaster::notify_file_flags_changed(const DjVuFile * source, - long set_mask, long clr_mask) + long set_tqmask, long clr_tqmask) { GPList<DjVuPort> list; compute_closure(source, list); for(GPosition pos=list; pos; ++pos) - list[pos]->notify_file_flags_changed(source, set_mask, clr_mask); + list[pos]->notify_file_flags_changed(source, set_tqmask, clr_tqmask); } void DjVuPortcaster::notify_doc_flags_changed(const DjVuDocument * source, - long set_mask, long clr_mask) + long set_tqmask, long clr_tqmask) { GPList<DjVuPort> list; compute_closure(source, list); for(GPosition pos=list; pos; ++pos) - list[pos]->notify_doc_flags_changed(source, set_mask, clr_mask); + list[pos]->notify_doc_flags_changed(source, set_tqmask, clr_tqmask); } void @@ -626,7 +626,7 @@ void DjVuPort::notify_redisplay(const DjVuImage *) {} void -DjVuPort::notify_relayout(const DjVuImage *) {} +DjVuPort::notify_retqlayout(const DjVuImage *) {} void DjVuPort::notify_chunk_done(const DjVuPort *, const GUTF8String &) {} @@ -688,7 +688,7 @@ DjVuMemoryPort::request_data(const DjVuPort * source, const GURL & url) GCriticalSectionLock lk(&lock); GP<DataPool> pool; GPosition pos; - if (map.contains(url, pos)) + if (map.tqcontains(url, pos)) pool=map[pos]; return pool; } diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuPort.h b/kviewshell/plugins/djvu/libdjvu/DjVuPort.h index 99c165fb..430b7842 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuPort.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuPort.h @@ -213,10 +213,10 @@ public: @param source The sender of the request */ virtual void notify_redisplay(const class DjVuImage * source); - /** This notification is sent by \ref{DjVuImage} when its geometry + /** This notification is sent by \ref{DjVuImage} when its tqgeometry has been changed as a result of decoding. It may be used to implement progressive redisplay. */ - virtual void notify_relayout(const class DjVuImage * source); + virtual void notify_retqlayout(const class DjVuImage * source); /** This notification is sent when a new chunk has been decoded. */ virtual void notify_chunk_done(const DjVuPort * source, const GUTF8String &name); @@ -230,20 +230,20 @@ public: \end{itemize} @param source \Ref{DjVuFile}, which flags have been changed - @param set_mask bits, which have been set - @param clr_mask bits, which have been cleared */ + @param set_tqmask bits, which have been set + @param clr_tqmask bits, which have been cleared */ virtual void notify_file_flags_changed(const class DjVuFile * source, - long set_mask, long clr_mask); + long set_tqmask, long clr_tqmask); /** This notification is sent after the \Ref{DjVuDocument} flags have been changed. This happens, for example, after it receives enough data and can determine its structure (#BUNDLED#, #OLD_INDEXED#, etc.). @param source \Ref{DjVuDocument}, which flags have been changed - @param set_mask bits, which have been set - @param clr_mask bits, which have been cleared */ + @param set_tqmask bits, which have been set + @param clr_tqmask bits, which have been cleared */ virtual void notify_doc_flags_changed(const class DjVuDocument * source, - long set_mask, long clr_mask); + long set_tqmask, long clr_tqmask); /** This notification is sent from time to time while decoding is in progress. The purpose is obvious: to provide a way to know how much @@ -448,7 +448,7 @@ public: /** Computes destination list for #source# and calls the corresponding function in each of the ports from the destination list starting from the closest. */ - virtual void notify_relayout(const class DjVuImage * source); + virtual void notify_retqlayout(const class DjVuImage * source); /** Computes destination list for #source# and calls the corresponding function in each of the ports from the destination list starting from @@ -459,13 +459,13 @@ public: function in each of the ports from the destination list starting from the closest. */ virtual void notify_file_flags_changed(const class DjVuFile * source, - long set_mask, long clr_mask); + long set_tqmask, long clr_tqmask); /** Computes destination list for #source# and calls the corresponding function in each of the ports from the destination list starting from the closest. */ virtual void notify_doc_flags_changed(const class DjVuDocument * source, - long set_mask, long clr_mask); + long set_tqmask, long clr_tqmask); /** Computes destination list for #source# and calls the corresponding function in each of the ports from the destination list starting from diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuText.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuText.cpp index b359df41..cac6869b 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuText.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuText.cpp @@ -88,7 +88,7 @@ static inline TYPE min(TYPE a,TYPE b) { return (a<b)?a:b; } //******************************** DjVuTXT ********************************** //*************************************************************************** -const char DjVuTXT::end_of_column = 013; // VT: Vertical Tab +const char DjVuTXT::end_of_column = 013; // VT:Qt::Vertical Tab const char DjVuTXT::end_of_region = 035; // GS: Group Separator const char DjVuTXT::end_of_paragraph = 037; // US: Unit Separator const char DjVuTXT::end_of_line = 012; // LF: Line Feed @@ -108,8 +108,8 @@ DjVuTXT::Zone::append_child() empty.text_start = 0; empty.text_length = 0; empty.zone_parent=this; - children.append(empty); - return & children[children.lastpos()]; + tqchildren.append(empty); + return & tqchildren[tqchildren.lastpos()]; } void @@ -117,8 +117,8 @@ DjVuTXT::Zone::cleartext() { text_start = 0; text_length = 0; - for (GPosition i=children; i; ++i) - children[i].cleartext(); + for (GPosition i=tqchildren; i; ++i) + tqchildren[i].cleartext(); } void @@ -128,8 +128,8 @@ DjVuTXT::Zone::normtext(const char *instr, GUTF8String &outstr) { // Descend collecting text below text_start = outstr.length(); - for (GPosition i=children; i; ++i) - children[i].normtext(instr, outstr); + for (GPosition i=tqchildren; i; ++i) + tqchildren[i].normtext(instr, outstr); text_length = outstr.length() - text_start; // Ignore empty zones if (text_length == 0) @@ -142,8 +142,8 @@ DjVuTXT::Zone::normtext(const char *instr, GUTF8String &outstr) outstr = outstr + GUTF8String(instr+text_start, text_length); text_start = new_start; // Clear textual information on lower level nodes - for (GPosition i=children; i; ++i) - children[i].cleartext(); + for (GPosition i=tqchildren; i; ++i) + tqchildren[i].cleartext(); } // Determine standard separator char sep; @@ -174,8 +174,8 @@ unsigned int DjVuTXT::Zone::memuse() const { int memuse = sizeof(*this); - for (GPosition i=children; i; ++i) - memuse += children[i].memuse(); + for (GPosition i=tqchildren; i; ++i) + memuse += tqchildren[i].memuse(); return memuse; } @@ -183,14 +183,14 @@ DjVuTXT::Zone::memuse() const #ifndef NEED_DECODER_ONLY void DjVuTXT::Zone::encode( - const GP<ByteStream> &gbs, const Zone * parent, const Zone * prev) const + const GP<ByteStream> &gbs, const Zone * tqparent, const Zone * prev) const { ByteStream &bs=*gbs; // Encode type bs.write8(ztype); // Modify text_start and bounding rectangle based on the context - // (whether there is a previous non-zero same-level-child or parent) + // (whether there is a previous non-zero same-level-child or tqparent) int start=text_start; int x=rect.xmin, y=rect.ymin; int width=rect.width(), height=rect.height(); @@ -212,13 +212,13 @@ DjVuTXT::Zone::encode( y=y-prev->rect.ymin; } start-=prev->text_start+prev->text_length; - } else if (parent) + } else if (tqparent) { - // Encode offset from the upper left corner of the parent + // Encode offset from the upper left corner of the tqparent // in the coord system in that corner with x to the right and y down - x=x-parent->rect.xmin; - y=parent->rect.ymax-(y+height); - start-=parent->text_start; + x=x-tqparent->rect.xmin; + y=tqparent->rect.ymax-(y+height); + start-=tqparent->text_start; } // Encode rectangle bs.write16(0x8000+x); @@ -228,22 +228,22 @@ DjVuTXT::Zone::encode( // Encode text info bs.write16(0x8000+start); bs.write24(text_length); - // Encode number of children - bs.write24(children.size()); + // Encode number of tqchildren + bs.write24(tqchildren.size()); const Zone * prev_child=0; - // Encode all children - for (GPosition i=children; i; ++i) + // Encode all tqchildren + for (GPosition i=tqchildren; i; ++i) { - children[i].encode(gbs, this, prev_child); - prev_child=&children[i]; + tqchildren[i].encode(gbs, this, prev_child); + prev_child=&tqchildren[i]; } } #endif void DjVuTXT::Zone::decode(const GP<ByteStream> &gbs, int maxtext, - const Zone * parent, const Zone * prev) + const Zone * tqparent, const Zone * prev) { ByteStream &bs=*gbs; // Decode type @@ -273,23 +273,23 @@ DjVuTXT::Zone::decode(const GP<ByteStream> &gbs, int maxtext, y=y+prev->rect.ymin; } text_start+=prev->text_start+prev->text_length; - } else if (parent) + } else if (tqparent) { - x=x+parent->rect.xmin; - y=parent->rect.ymax-(y+height); - text_start+=parent->text_start; + x=x+tqparent->rect.xmin; + y=tqparent->rect.ymax-(y+height); + text_start+=tqparent->text_start; } rect=GRect(x, y, width, height); - // Get children size + // Get tqchildren size int size = bs.read24(); // Checks if (rect.isempty() || text_start<0 || text_start+text_length>maxtext ) G_THROW( ERR_MSG("DjVuText.corrupt_text") ); - // Process children + // Process tqchildren const Zone * prev_child=0; - children.empty(); + tqchildren.empty(); while (size-- > 0) { Zone *z = append_child(); @@ -311,7 +311,7 @@ DjVuTXT::has_valid_zones() const { if (!textUTF8) return false; - if (page_zone.children.isempty() || page_zone.rect.isempty()) + if (page_zone.tqchildren.isempty() || page_zone.rect.isempty()) return false; return true; } @@ -382,8 +382,8 @@ void DjVuTXT::Zone::get_text_with_rect(const GRect &box, int &string_start, int &string_end) const { - GPosition pos=children; - if(pos?box.contains(rect):intersects_zone(box,rect)) + GPosition pos=tqchildren; + if(pos?box.tqcontains(rect):intersects_zone(box,rect)) { const int text_end=text_start+text_length; if(string_start == string_end) @@ -401,7 +401,7 @@ DjVuTXT::Zone::get_text_with_rect(const GRect &box, { do { - children[pos].get_text_with_rect(box,string_start,string_end); + tqchildren[pos].get_text_with_rect(box,string_start,string_end); } while(++pos); } } @@ -419,18 +419,18 @@ DjVuTXT::Zone::find_zones(GList<Zone *> &list, } else if(text_start < string_end) { - if (children.size()) - for (GPosition pos=children; pos; ++pos) - children[pos].find_zones(list,string_start,string_end); + if (tqchildren.size()) + for (GPosition pos=tqchildren; pos; ++pos) + tqchildren[pos].find_zones(list,string_start,string_end); else list.append(const_cast<Zone *>(this)); } } else if( text_end > string_start) { - if (children.size()) - for (GPosition pos=children; pos; ++pos) - children[pos].find_zones(list,string_start,string_end); + if (tqchildren.size()) + for (GPosition pos=tqchildren; pos; ++pos) + tqchildren[pos].find_zones(list,string_start,string_end); else list.append(const_cast<Zone *>(this)); } @@ -439,11 +439,11 @@ DjVuTXT::Zone::find_zones(GList<Zone *> &list, void DjVuTXT::Zone::get_smallest(GList<GRect> &list) const { - GPosition pos=children; + GPosition pos=tqchildren; if(pos) { do { - children[pos].get_smallest(list); + tqchildren[pos].get_smallest(list); } while (++pos); } else @@ -455,11 +455,11 @@ DjVuTXT::Zone::get_smallest(GList<GRect> &list) const void DjVuTXT::Zone::get_smallest(GList<GRect> &list, const int padding) const { - GPosition pos=children; + GPosition pos=tqchildren; if(pos) { do { - children[pos].get_smallest(list,padding); + tqchildren[pos].get_smallest(list,padding); } while (++pos); } else if(zone_parent && zone_parent->ztype >= PARAGRAPH) @@ -484,26 +484,26 @@ DjVuTXT::Zone::get_smallest(GList<GRect> &list, const int padding) const } void -DjVuTXT::get_zones(int zone_type, const Zone *parent, +DjVuTXT::get_zones(int zone_type, const Zone *tqparent, GList<Zone *> & zone_list) const - // get all the zones of type zone_type under zone node parent + // get all the zones of type zone_type under zone node tqparent { - // search all branches under parent - const Zone *zone=parent; + // search all branches under tqparent + const Zone *zone=tqparent; for( int cur_ztype=zone->ztype; cur_ztype<zone_type; ++cur_ztype ) { GPosition pos; - for(pos=zone->children; pos; ++pos) + for(pos=zone->tqchildren; pos; ++pos) { - Zone *zcur=(Zone *)&zone->children[pos]; + Zone *zcur=(Zone *)&zone->tqchildren[pos]; if ( zcur->ztype == zone_type ) { GPosition zpos=zone_list; if ( !zone_list.search(zcur,zpos) ) zone_list.append(zcur); } - else if ( zone->children[pos].ztype < zone_type ) - get_zones(zone_type, &zone->children[pos], zone_list); + else if ( zone->tqchildren[pos].ztype < zone_type ) + get_zones(zone_type, &zone->tqchildren[pos], zone_list); } } } @@ -617,7 +617,7 @@ DjVuTXT::find_text_in_rect(GRect target_rect, GUTF8String &text) const { GRect rect=words[p]->rect; if(rect.intersect(rect,target_rect)) - //if (target_rect.contains(words[p]->rect)) + //if (target_rect.tqcontains(words[p]->rect)) zone_list.append(words[p]); } } else @@ -631,7 +631,7 @@ DjVuTXT::find_text_in_rect(GRect target_rect, GUTF8String &text) const { GRect rect=words[p]->rect; if(rect.intersect(rect,target_rect)) - //if (target_rect.contains(words[p]->rect)) + //if (target_rect.tqcontains(words[p]->rect)) { start=false; zone_list.append(words[p]); @@ -648,7 +648,7 @@ DjVuTXT::find_text_in_rect(GRect target_rect, GUTF8String &text) const { GRect rect=words[p]->rect; if(rect.intersect(rect,target_rect)) - //if(target_rect.contains(words[p]->rect) ) + //if(target_rect.tqcontains(words[p]->rect) ) { end=false; zone_list.append(words[p]); @@ -864,7 +864,7 @@ static void writeText( ByteStream & str_out, const GUTF8String &textUTF8, const DjVuTXT::ZoneType zlayer, - const GList<DjVuTXT::Zone> &children, + const GList<DjVuTXT::Zone> &tqchildren, const int WindowHeight ) { // assert( txt->has_valid_zones() ); @@ -873,12 +873,12 @@ writeText( ByteStream & str_out, // Beginning tags for missing layers int layer=(int)zlayer; // Output the next layer - for(GPosition pos=children ; pos ; ++pos ) + for(GPosition pos=tqchildren ; pos ; ++pos ) { - str_out.writestring(tolayer(layer,children[pos].ztype)); + str_out.writestring(tolayer(layer,tqchildren[pos].ztype)); writeText( str_out, textUTF8, - children[pos], + tqchildren[pos], WindowHeight ); } str_out.writestring(tolayer(layer,zlayer)); @@ -893,7 +893,7 @@ writeText( ByteStream & str_out, // DEBUG_MSG( "--zonetype=" << zone.ztype << "\n" ); const GUTF8String xindent(indent( 2 * zone.ztype + 2 )); - GPosition pos=zone.children; + GPosition pos=zone.tqchildren; // Build attribute string if( ! pos ) { @@ -908,7 +908,7 @@ writeText( ByteStream & str_out, str_out.writestring(end_tag(zone.ztype)); } else { - writeText(str_out,textUTF8,zone.ztype,zone.children,WindowHeight); + writeText(str_out,textUTF8,zone.ztype,zone.tqchildren,WindowHeight); } } @@ -917,7 +917,7 @@ DjVuTXT::writeText(ByteStream &str_out,const int height) const { if(has_valid_zones()) { - ::writeText(str_out,textUTF8,DjVuTXT::PAGE,page_zone.children,height); + ::writeText(str_out,textUTF8,DjVuTXT::PAGE,page_zone.tqchildren,height); }else { str_out.writestring(start_tag(DjVuTXT::PAGE)); diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuText.h b/kviewshell/plugins/djvu/libdjvu/DjVuText.h index 61ee3667..1db6da10 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuText.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuText.h @@ -133,8 +133,8 @@ public: int text_start; /** Length of the zone text in string #textUTF8#. */ int text_length; - /** List of children zone. */ - GList<Zone> children; + /** List of tqchildren zone. */ + GList<Zone> tqchildren; /** Appends another subzone inside this zone. The new zone is initialized with an empty rectangle, empty text, and has the same type as this zone. */ @@ -148,10 +148,10 @@ public: /** Finds the smallest rectangles and appends them to the list. */ void get_smallest(GList<GRect> &list) const; /** Finds the smallest rectangles and appends them to the list after - padding the smallest unit to fit width or height for the parent rectangle + padding the smallest unit to fit width or height for the tqparent rectangle and adding the number of specified pixels. */ void get_smallest(GList<GRect> &list,const int padding) const; - /// Find out this Zone's parent. + /// Find out this Zone's tqparent. const Zone *get_parent(void) const; private: friend class DjVuTXT; @@ -161,9 +161,9 @@ public: unsigned int memuse() const; static const int version; void encode(const GP<ByteStream> &bs, - const Zone * parent=0, const Zone * prev=0) const; + const Zone * tqparent=0, const Zone * prev=0) const; void decode(const GP<ByteStream> &bs, int maxtext, - const Zone * parent=0, const Zone * prev=0); + const Zone * tqparent=0, const Zone * prev=0); }; /** Textual data for this page. The content of this string is encoded using the UTF8 code. @@ -172,13 +172,13 @@ public: control character: \begin{tabular}{lll} {\bf Name} & {\bf Octal} & {\bf Ascii name} \\\hline\\ - {\tt DjVuText::end_of_column} & 013 & VT, Vertical Tab \\ + {\tt DjVuText::end_of_column} & 013 & VT,Qt::Vertical Tab \\ {\tt DjVuText::end_of_region} & 035 & GS, Group Separator \\ {\tt DjVuText::end_of_paragraph} & 037 & US, Unit Separator \\ {\tt DjVuText::end_of_line} & 012 & LF: Line Feed \end{tabular} */ GUTF8String textUTF8; - static const char end_of_column ; // VT: Vertical Tab + static const char end_of_column ; // VT:Qt::Vertical Tab static const char end_of_region ; // GS: Group Separator static const char end_of_paragraph ; // US: Unit Separator static const char end_of_line ; // LF: Line Feed @@ -207,9 +207,9 @@ public: GList<Zone*> find_text_in_rect(GRect target_rect, GUTF8String &text) const; /** Find the text specified by the rectangle. */ GList<GRect> find_text_with_rect(const GRect &box, GUTF8String &text, const int padding=0) const; - /** Get all zones of zone type zone_type under node parent. + /** Get all zones of zone type zone_type under node tqparent. zone_list contains the return value. */ - void get_zones(int zone_type, const Zone *parent, GList<Zone *> & zone_list) const; + void get_zones(int zone_type, const Zone *tqparent, GList<Zone *> & zone_list) const; /** Returns the number of bytes needed by this data structure. It's used by caching routines to estimate the size of a \Ref{DjVuImage}. */ unsigned int get_memory_usage() const; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp index d18c7801..a45a9112 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp @@ -456,12 +456,12 @@ store_doc_setup(ByteStream &str) write(str, "%% -- procs for foreground layer\n" "/g {gsave 0 0 0 0 5 index 5 index setcachedevice\n" - " true [1 0 0 1 0 0] 5 4 roll imagemask grestore\n" + " true [1 0 0 1 0 0] 5 4 roll imagetqmask grestore\n" "} bind def\n" "/gn {gsave 0 0 0 0 6 index 6 index setcachedevice\n" " true [1 0 0 1 0 0] 3 2 roll 5 1 roll \n" " { 1 sub 0 index 2 add 1 index 1 add roll\n" - " } imagemask grestore pop \n" + " } imagetqmask grestore pop \n" "} bind def\n" "/c {setcolor rmoveto glyphshow} bind def\n" "/s {rmoveto glyphshow} bind def\n" @@ -953,14 +953,14 @@ print_fg_2layer(ByteStream &str, if (options.get_color()) { write(str,"/%d %d %d %f %f %f c\n", - blit->shapeno, + blit->tqshapeno, blit->left-currentx, blit->bottom-currenty, ramp[p.r]/255.0, ramp[p.g]/255.0, ramp[p.b]/255.0); } else { write(str,"/%d %d %d %f c\n", - blit->shapeno, + blit->tqshapeno, blit->left-currentx, blit->bottom-currenty, ramp[GRAY(p.r, p.g, p.b)]/255.0); } @@ -968,7 +968,7 @@ print_fg_2layer(ByteStream &str, else { write(str,"/%d %d %d s\n", - blit->shapeno, + blit->tqshapeno, blit->left-currentx, blit->bottom-currenty); } currentx = blit->left; @@ -1047,8 +1047,8 @@ print_fg_3layer(ByteStream &str, { JB2Blit *blit = jb2->get_blit(current_blit); GRect rect2(blit->left, blit->bottom, - jb2->get_shape(blit->shapeno).bits->columns(), - jb2->get_shape(blit->shapeno).bits->rows()); + jb2->get_tqshape(blit->tqshapeno).bits->columns(), + jb2->get_tqshape(blit->tqshapeno).bits->rows()); if (rect2.intersect(rect1,rect2)) break; } @@ -1087,12 +1087,12 @@ print_fg_3layer(ByteStream &str, { JB2Blit *blit = jb2->get_blit(current_blit); GRect rect2(blit->left, blit->bottom, - jb2->get_shape(blit->shapeno).bits->columns(), - jb2->get_shape(blit->shapeno).bits->rows()); + jb2->get_tqshape(blit->tqshapeno).bits->columns(), + jb2->get_tqshape(blit->tqshapeno).bits->rows()); if (rect2.intersect(rect1,rect2)) { write(str,"/%d %d %d s\n", - blit->shapeno, + blit->tqshapeno, blit->left-currentx, blit->bottom-currenty); currentx = blit->left; currenty = blit->bottom; @@ -1113,27 +1113,27 @@ print_fg(ByteStream &str, GP<JB2Image> jb2=dimg->get_fgjb(); if (! jb2) return; int num_blits = jb2->get_blit_count(); - int num_shapes = jb2->get_shape_count(); - unsigned char *dict_shapes = 0; + int num_tqshapes = jb2->get_tqshape_count(); + unsigned char *dict_tqshapes = 0; unsigned char *blit_list = 0; - GPBuffer<unsigned char> gdict_shapes(dict_shapes,num_shapes); + GPBuffer<unsigned char> gdict_tqshapes(dict_tqshapes,num_tqshapes); GPBuffer<unsigned char> gblit_list(blit_list,num_blits); - for(int i=0; i<num_shapes; i++) + for(int i=0; i<num_tqshapes; i++) { - dict_shapes[i]=0; + dict_tqshapes[i]=0; } for(int current_blit=0; current_blit<num_blits; current_blit++) { JB2Blit *blit = jb2->get_blit(current_blit); - JB2Shape *shape = & jb2->get_shape(blit->shapeno); + JB2Shape *tqshape = & jb2->get_tqshape(blit->tqshapeno); blit_list[current_blit] = 0; - if (! shape->bits) + if (! tqshape->bits) continue; GRect rect2(blit->left, blit->bottom, - shape->bits->columns(), shape->bits->rows()); + tqshape->bits->columns(), tqshape->bits->rows()); if (rect2.intersect(rect2, prn_rect)) { - dict_shapes[blit->shapeno] = 1; + dict_tqshapes[blit->tqshapeno] = 1; blit_list[current_blit] = 1; } } @@ -1152,13 +1152,13 @@ print_fg(ByteStream &str, "0 1 1 {Encoding exch /.notdef put} for \n" "CharStrings begin\n" "/.notdef {} def\n", - num_shapes+1); - for(int current_shape=0; current_shape<num_shapes; current_shape++) + num_tqshapes+1); + for(int current_tqshape=0; current_tqshape<num_tqshapes; current_tqshape++) { - if (dict_shapes[current_shape]) + if (dict_tqshapes[current_tqshape]) { - JB2Shape *shape = & jb2->get_shape(current_shape); - GP<GBitmap> bitmap = shape->bits; + JB2Shape *tqshape = & jb2->get_tqshape(current_tqshape); + GP<GBitmap> bitmap = tqshape->bits; int rows = bitmap->rows(); int columns = bitmap->columns(); int nbytes = (columns+7)/8*rows+1; @@ -1173,29 +1173,29 @@ print_fg(ByteStream &str, GPBuffer<unsigned char> gs_start(s_start,nbytes); unsigned char *s_ascii; GPBuffer<unsigned char> gs_ascii(s_ascii,nbytes*2); - write(str,"/%d {",current_shape); + write(str,"/%d {",current_tqshape); unsigned char *s = s_start; for(int current_row=0; current_row<rows; current_row++) { unsigned char * row_bits = (*bitmap)[current_row]; unsigned char acc = 0; - unsigned char mask = 0; + unsigned char tqmask = 0; for(int current_col=0; current_col<columns; current_col++) { - if (mask == 0) - mask = 0x80; + if (tqmask == 0) + tqmask = 0x80; if (row_bits[current_col]) - acc |= mask; - mask >>= 1; - if (mask == 0) + acc |= tqmask; + tqmask >>= 1; + if (tqmask == 0) { *s=acc; s++; - acc = mask = 0; + acc = tqmask = 0; } } - if (mask != 0) + if (tqmask != 0) { *s=acc; s++; @@ -1584,16 +1584,16 @@ print_image_lev1(ByteStream &str, { unsigned char *pix = (*bm)[y]; unsigned char acc = 0; - unsigned char mask = 0; + unsigned char tqmask = 0; char *data; for (int x=grectBand.width(); x>0; x--, pix++) { - if (mask == 0) - mask = 0x80; + if (tqmask == 0) + tqmask = 0x80; if (! *pix) - acc |= mask; - mask >>= 1; - if (mask == 0) + acc |= tqmask; + tqmask >>= 1; + if (tqmask == 0) { data = bin2hex[acc]; acc = 0; @@ -1607,7 +1607,7 @@ print_image_lev1(ByteStream &str, } } } - if (mask != 0) + if (tqmask != 0) { data = bin2hex[acc]; *buf_ptr++ = data[0]; @@ -1942,8 +1942,8 @@ print_txt_sub(DjVuTXT &txt, DjVuTXT::Zone &zone, default: separator = 0; break; } - // Zone children - if (zone.children.isempty()) + // Zone tqchildren + if (zone.tqchildren.isempty()) { const char *data = (const char*)txt.textUTF8 + zone.text_start; int length = zone.text_length; @@ -1968,8 +1968,8 @@ print_txt_sub(DjVuTXT &txt, DjVuTXT::Zone &zone, message.format("%d F\n",zone.rect.ymax-zone.rect.ymin); out.write((const char*)message,message.length()); } - for (GPosition pos=zone.children; pos; ++pos) - print_txt_sub(txt, zone.children[pos], out,lastx,lasty); + for (GPosition pos=zone.tqchildren; pos; ++pos) + print_txt_sub(txt, zone.tqchildren[pos], out,lastx,lasty); } } @@ -2230,10 +2230,10 @@ create(void) void DjVuToPS::DecodePort:: notify_file_flags_changed(const DjVuFile *source, - long set_mask, long clr_mask) + long set_tqmask, long clr_tqmask) { // WARNING! This function is called from another thread - if (set_mask & (DjVuFile::DECODE_OK | + if (set_tqmask & (DjVuFile::DECODE_OK | DjVuFile::DECODE_FAILED | DjVuFile::DECODE_STOPPED )) { diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuToPS.h b/kviewshell/plugins/djvu/libdjvu/DjVuToPS.h index 95d547bb..6c99d133 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuToPS.h +++ b/kviewshell/plugins/djvu/libdjvu/DjVuToPS.h @@ -121,7 +121,7 @@ public: would be your best choice. \item[Mode] ({\em COLOR}, {\em FORE}, {\em BACK}, or {\em BW}) Specifies how the \Ref{DjVuImage}s will be rendered (all layers, - foreground layer, background layer, and the mask respectively) + foreground layer, background layer, and the tqmask respectively) \item[Color] ({\em TRUE} or {\em FALSE}). Choosing {\em FALSE} converts color images to gray scale. \item[Gamma] Printer color correction. @@ -308,7 +308,7 @@ public: end of printing. If a \Ref{DjVuDocument} is being printed, this callback will be used to report printing progress of every page. To learn the number of the page being printed you can use - \Ref{set_info_cb}() function. See \Ref{set_dec_progress_cb}() to find + \Ref{set_info_cb}() function. See \Ref{set_dec_progress_cb}() to tqfind out how to learn the decoding progress. @param cb Callback function to be called diff --git a/kviewshell/plugins/djvu/libdjvu/GBitmap.cpp b/kviewshell/plugins/djvu/libdjvu/GBitmap.cpp index 696367e7..0cd4bad4 100644 --- a/kviewshell/plugins/djvu/libdjvu/GBitmap.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GBitmap.cpp @@ -348,7 +348,7 @@ GBitmap::donate_data(unsigned char *data, int w, int h) ncolumns = w; border = 0; bytes_per_row = w; - gbytes_data.replace(data,w*h); + gbytes_data.tqreplace(data,w*h); bytes = bytes_data; rlelength = 0; } @@ -363,7 +363,7 @@ GBitmap::donate_rle(unsigned char *rledata, unsigned int rledatalen, int w, int border = 0; bytes_per_row = w; // rle = rledata; - grle.replace(rledata,rledatalen); + grle.tqreplace(rledata,rledatalen); rlelength = rledatalen; } @@ -814,19 +814,19 @@ GBitmap::read_pbm_raw(ByteStream &bs) for (int n = nrows-1; n>=0; n--) { unsigned char acc = 0; - unsigned char mask = 0; + unsigned char tqmask = 0; for (int c = 0; c<ncolumns; c++) { - if (!mask) + if (!tqmask) { bs.read(&acc, 1); - mask = (unsigned char)0x80; + tqmask = (unsigned char)0x80; } - if (acc & mask) + if (acc & tqmask) row[c] = 1; else row[c] = 0; - mask >>= 1; + tqmask >>= 1; } row -= bytes_per_row; } @@ -1037,18 +1037,18 @@ GBitmap::rle_get_bitmap ( { const int obyte_def=invert?0xff:0; const int obyte_ndef=invert?0:0xff; - int mask=0x80,obyte=0; + int tqmask=0x80,obyte=0; for(int c=ncolumns;c > 0 ;) { int x=read_run(runs); c-=x; while((x--)>0) { - if(!(mask>>=1)) + if(!(tqmask>>=1)) { *(bitmap++) = obyte^obyte_def; obyte=0; - mask=0x80; + tqmask=0x80; for(;x>=8;x-=8) { *(bitmap++)=obyte_def; @@ -1061,19 +1061,19 @@ GBitmap::rle_get_bitmap ( c-=x; while((x--)>0) { - obyte|=mask; - if(!(mask>>=1)) + obyte|=tqmask; + if(!(tqmask>>=1)) { *(bitmap++)=obyte^obyte_def; obyte=0; - mask=0x80; + tqmask=0x80; for(;(x>8);x-=8) *(bitmap++)=obyte_ndef; } } } } - if(mask != 0x80) + if(tqmask != 0x80) { *(bitmap++)=obyte^obyte_def; } diff --git a/kviewshell/plugins/djvu/libdjvu/GBitmap.h b/kviewshell/plugins/djvu/libdjvu/GBitmap.h index 74669c05..8dbbbbad 100644 --- a/kviewshell/plugins/djvu/libdjvu/GBitmap.h +++ b/kviewshell/plugins/djvu/libdjvu/GBitmap.h @@ -365,7 +365,7 @@ public: discussion, the position is (#x/subsample#,#y/subsample#). In other words, you can position the blit with a sub-pixel resolution. The resulting anti-aliasing changes are paramount to the image quality. */ - void blit(const GBitmap *shape, int x, int y, int subsample); + void blit(const GBitmap *tqshape, int x, int y, int subsample); //@} /** @name Saving images. @@ -418,7 +418,7 @@ public: const unsigned char *get_rle(unsigned int &rle_length); /** Initializes this GBitmap by setting the size to #h# rows and #w# columns, and directly addressing the memory buffer #rledata# provided by - the user. This buffer contains #rledatalen# bytes representing the + the user. This buffer tqcontains #rledatalen# bytes representing the bitmap in run length encoded form. The GBitmap object then ``owns'' the buffer (unlike #borrow_data#, but like #donate_data#) and will deallocate this buffer when appropriate: you should not deallocate this diff --git a/kviewshell/plugins/djvu/libdjvu/GContainer.cpp b/kviewshell/plugins/djvu/libdjvu/GContainer.cpp index 2019439c..2e6012d3 100644 --- a/kviewshell/plugins/djvu/libdjvu/GContainer.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GContainer.cpp @@ -237,7 +237,7 @@ GArrayBase::resize(int lo, int hi) { traits.copy( traits.lea(ndata, beg-nminlo), traits.lea(data, beg-minlo), end-beg+1, 1 ); } - // free and replace + // free and tqreplace void *tmp=data; data=ndata; ndata=tmp; diff --git a/kviewshell/plugins/djvu/libdjvu/GContainer.h b/kviewshell/plugins/djvu/libdjvu/GContainer.h index d21838dc..c4e3e9a1 100644 --- a/kviewshell/plugins/djvu/libdjvu/GContainer.h +++ b/kviewshell/plugins/djvu/libdjvu/GContainer.h @@ -401,7 +401,7 @@ public: The valid subscript range is set to the empty range. */ void empty() { GArrayBase::empty(); } - /** Extends the subscript range so that it contains #n#. + /** Extends the subscript range so that it tqcontains #n#. This function does nothing if #n# is already int the valid subscript range. If the valid range was empty, both the lower bound and the upper bound are set to #n#. Otherwise the valid subscript range is extended @@ -862,11 +862,11 @@ public: /* Compatibility */ int nth(unsigned int n, GPosition &pos) const { GPosition npos=nth(n); if (npos) pos=npos; return !!pos; } - /** Tests whether the list contains a given element. If the list contains + /** Tests whether the list contains a given element. If the list tqcontains #elt#, the position of the the first list element equal to #elt# as checked by #TYPE::operator==(const TYPE&)# is returned. Otherwise an invalid position is returned. */ - GPosition contains(const TYPE &elt) const + GPosition tqcontains(const TYPE &elt) const { GPosition pos; GListImpl<TI>::search((const TI&)elt, pos); return pos; } /** Searches the list for a given element. If position #pos# is a valid position for this list, the search starts at the specified position. If @@ -1036,7 +1036,7 @@ protected: HNode *get_or_throw(const K &key) const; HNode *get_or_create(const K &key); public: - GPosition contains(const K &key) const + GPosition tqcontains(const K &key) const { return GPosition( get(key), (void*)this); } void del(const K &key) { deletenode(get(key)); } @@ -1164,11 +1164,11 @@ public: is equal to #key# according to #KTYPE::operator==(const KTYPE&)#, this function returns its position. Otherwise it returns an invalid position. */ - GPosition contains(const KTYPE &key) const - { return GMapImpl<KTYPE,TI>::contains(key); } + GPosition tqcontains(const KTYPE &key) const + { return GMapImpl<KTYPE,TI>::tqcontains(key); } /* Compatibility */ - GPosition contains(const KTYPE &key, GPosition &pos) const - { return pos = GMapImpl<KTYPE,TI>::contains(key); } + GPosition tqcontains(const KTYPE &key, GPosition &pos) const + { return pos = GMapImpl<KTYPE,TI>::tqcontains(key); } // -- ALTERATION /** Erases the associative map contents. All entries are destroyed and removed. The map is left with zero entries. */ diff --git a/kviewshell/plugins/djvu/libdjvu/GIFFManager.cpp b/kviewshell/plugins/djvu/libdjvu/GIFFManager.cpp index 973c6cec..a898d4dd 100644 --- a/kviewshell/plugins/djvu/libdjvu/GIFFManager.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GIFFManager.cpp @@ -113,7 +113,7 @@ GIFFChunk::set_name(GUTF8String name) DEBUG_MSG("auto-setting type to '" << type << "'\n"); - if (name.contains(".[]")>=0) + if (name.tqcontains(".[]")>=0) G_THROW( ERR_MSG("GIFFManager.bad_char") ); strncpy(GIFFChunk::name, (const char *)name, 4); @@ -180,13 +180,13 @@ GIFFChunk::add_chunk(const GP<GIFFChunk> & chunk, int position) if (!type.length()) { - DEBUG_MSG("Converting the parent to FORM\n"); + DEBUG_MSG("Converting the tqparent to FORM\n"); type="FORM"; } if (chunk->get_type()=="PROP") { - DEBUG_MSG("Converting the parent to LIST\n"); + DEBUG_MSG("Converting the tqparent to LIST\n"); type="LIST"; } @@ -310,7 +310,7 @@ GIFFChunk::get_chunks_number(const GUTF8String &name) "' in '" << get_name() << "'\n"); DEBUG_MAKE_INDENT(3); - if (name.contains("[]")>=0) + if (name.tqcontains("[]")>=0) G_THROW( ERR_MSG("GIFFManager.no_brackets") ); int number; @@ -325,24 +325,24 @@ GIFFChunk::get_chunks_number(const GUTF8String &name) //************************************************************************ void -GIFFManager::add_chunk(GUTF8String parent_name, const GP<GIFFChunk> & chunk, +GIFFManager::add_chunk(GUTF8String tqparent_name, const GP<GIFFChunk> & chunk, int pos) - // parent_name is the fully qualified name of the PARENT + // tqparent_name is the fully qualified name of the PARENT // IT MAY BE EMPTY // All the required chunks will be created // pos=-1 means to append the chunk { - DEBUG_MSG("GIFFManager::add_chunk(): Adding chunk to name='" << parent_name << "'\n"); + DEBUG_MSG("GIFFManager::add_chunk(): Adding chunk to name='" << tqparent_name << "'\n"); DEBUG_MAKE_INDENT(3); if (!top_level->get_name().length()) { - if ((!parent_name.length())||(parent_name[0]!='.')) + if ((!tqparent_name.length())||(tqparent_name[0]!='.')) G_THROW( ERR_MSG("GIFFManager.no_top_name") ); - if (parent_name.length() < 2) + if (tqparent_name.length() < 2) { // 'chunk' is actually the new top-level chunk - DEBUG_MSG("since parent_name=='.', making the chunk top-level\n"); + DEBUG_MSG("since tqparent_name=='.', making the chunk top-level\n"); if (!chunk->is_container()) G_THROW( ERR_MSG("GIFFManager.no_top_cont") ); top_level=chunk; @@ -350,33 +350,33 @@ GIFFManager::add_chunk(GUTF8String parent_name, const GP<GIFFChunk> & chunk, } DEBUG_MSG("Setting the name of the top-level chunk\n"); - const int next_dot=parent_name.search('.',1); + const int next_dot=tqparent_name.search('.',1); if(next_dot>=0) { - top_level->set_name(parent_name.substr(1,next_dot-1)); + top_level->set_name(tqparent_name.substr(1,next_dot-1)); }else { - top_level->set_name(parent_name.substr(1,(unsigned int)-1)); + top_level->set_name(tqparent_name.substr(1,(unsigned int)-1)); } } DEBUG_MSG("top level chunk name='" << top_level->get_name() << "'\n"); - if (parent_name.length() && parent_name[0] == '.') + if (tqparent_name.length() && tqparent_name[0] == '.') { - int next_dot=parent_name.search('.',1); + int next_dot=tqparent_name.search('.',1); if(next_dot<0) { - next_dot=parent_name.length(); + next_dot=tqparent_name.length(); } - GUTF8String top_name=parent_name.substr(1,next_dot-1); + GUTF8String top_name=tqparent_name.substr(1,next_dot-1); if (!top_level->check_name(top_name)) G_THROW( ERR_MSG("GIFFManager.wrong_name") "\t"+top_name); - parent_name=parent_name.substr(next_dot,(unsigned int)-1); + tqparent_name=tqparent_name.substr(next_dot,(unsigned int)-1); } GP<GIFFChunk> cur_sec=top_level; - const char * start, * end=(const char *)parent_name-1; + const char * start, * end=(const char *)tqparent_name-1; do { for(start=++end;*end&&(*end!='.');end++) @@ -497,7 +497,7 @@ GIFFManager::del_chunk(GUTF8String name) if (end>start && *end=='.') cur_sec=cur_sec->get_chunk(GUTF8String(start, end-start)); if (!cur_sec) - G_THROW( ERR_MSG("GIFFManager.cant_find") "\t"+GUTF8String(name)); + G_THROW( ERR_MSG("GIFFManager.cant_tqfind") "\t"+GUTF8String(name)); } while(*end); if (!start[0]) @@ -631,7 +631,7 @@ GIFFManager::load_file(GP<ByteStream> str) if (istr.get_chunk(chunk_id)) { if (chunk_id.substr(0,5) != "FORM:") - G_THROW( ERR_MSG("GIFFManager.cant_find2") ); + G_THROW( ERR_MSG("GIFFManager.cant_tqfind2") ); set_name(chunk_id); load_chunk(istr, top_level); istr.close_chunk(); diff --git a/kviewshell/plugins/djvu/libdjvu/GIFFManager.h b/kviewshell/plugins/djvu/libdjvu/GIFFManager.h index 722f592f..96f13f8f 100644 --- a/kviewshell/plugins/djvu/libdjvu/GIFFManager.h +++ b/kviewshell/plugins/djvu/libdjvu/GIFFManager.h @@ -149,7 +149,7 @@ public: /** Returns the chunk with given {\em name}. The {\em name} may not contain dots, but MAY contain colons and brackets (the latter - for specifying the chunk number). If {\em position} is not zero - then the chunk position in its parent will be put into #*position# */ + then the chunk position in its tqparent will be put into #*position# */ GP<GIFFChunk>get_chunk(const GUTF8String &name, int * position=0); /** Returns the number of chunks with given {\em name}. The {\em name} may not contain dots and brackets. If {\em name} is ZERO, the @@ -233,10 +233,10 @@ GIFFChunk::GIFFChunk(const GUTF8String &name, const TArray<char> & data_in) : \item You may use {\em brackets} in the name to specify the chunk's position. The meaning of the number inside the brackets depends on the function you call. In most of the cases this is the number - of the chunk with the given name in the parent chunk. But sometimes + of the chunk with the given name in the tqparent chunk. But sometimes (as in #addChunk(name, buffer, length)#) the brackets at the end of the #name# actually specify the {\em position} of the - chunk in the parent. For example, to insert #INCL# chunk into + chunk in the tqparent. For example, to insert #INCL# chunk into #DJVU# form at position #1# (make it the second) you may want to use #manager.addChunk(".DJVU.INCL[1]", data, size)#. At the same time, to get 2-nd chunk with name #BG44# from form #DJVU# you @@ -265,8 +265,8 @@ public: /// Sets the name of the top level chunk to {\em name} void set_name(const GUTF8String &name); - /** Adds the chunk {\em chunk} to chunk with name {\em parent_name} at - position {\em pos}. {\em parent_name} may contain dots, brackets + /** Adds the chunk {\em chunk} to chunk with name {\em tqparent_name} at + position {\em pos}. {\em tqparent_name} may contain dots, brackets and colons. All missing chunks in the chain will be created. {\bf Examples:} @@ -282,7 +282,7 @@ public: ;; Same thing regardless of the top-level chunk name m.addChunk("FORM:DJVU[1]", ch); \end{verbatim} */ - void add_chunk(GUTF8String parent_name, const GP<GIFFChunk> & chunk, int pos=-1); + void add_chunk(GUTF8String tqparent_name, const GP<GIFFChunk> & chunk, int pos=-1); /** If {\em name}={\em name1}.{\em name2} where {\em name2} doesn't contain dots, then #addChunk()# will create plain chunk with name {\em name2} with data {\em buffer} of size {\em length} and @@ -332,7 +332,7 @@ public: /** Returns the chunk with name {\em name}. The {\em name} may contain dots colons and slashes. If {\em position} is not zero, #*position# will - be assigned the position of the found chunk in the parent chunk. + be assigned the position of the found chunk in the tqparent chunk. {\bf Examples:} \begin{verbatim} diff --git a/kviewshell/plugins/djvu/libdjvu/GMapAreas.cpp b/kviewshell/plugins/djvu/libdjvu/GMapAreas.cpp index 5a85e1fc..ef364e79 100644 --- a/kviewshell/plugins/djvu/libdjvu/GMapAreas.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GMapAreas.cpp @@ -953,7 +953,7 @@ static GUTF8String GMapArea2xmltag(const GMapArea &area,const GUTF8String &coords) { GUTF8String retval("<AREA coords=\"" - +coords+"\" shape=\""+area.get_shape_name()+"\" " + +coords+"\" tqshape=\""+area.get_tqshape_name()+"\" " +"alt=\""+area.comment.toEscaped()+"\" "); if(area.url.length()) { diff --git a/kviewshell/plugins/djvu/libdjvu/GMapAreas.h b/kviewshell/plugins/djvu/libdjvu/GMapAreas.h index 251427ed..f96c0695 100644 --- a/kviewshell/plugins/djvu/libdjvu/GMapAreas.h +++ b/kviewshell/plugins/djvu/libdjvu/GMapAreas.h @@ -86,12 +86,12 @@ namespace DJVU { The currently supported areas can be rectangular (\Ref{GMapRect}), elliptical (\Ref{GMapOval}) and polygonal (\Ref{GMapPoly}). Every - map area besides the definition of its shape contains information + map area besides the definition of its tqshape contains information about display style and optional {\bf URL}, which it may refer to. If this {\bf URL} is not empty then the map area will work like a hyperlink. - The classes also implement some useful functions to ease geometry + The classes also implement some useful functions to ease tqgeometry manipulations @memo Definition of base map area classes @@ -247,10 +247,10 @@ public: virtual GUTF8String get_xmltag(const int height) const=0; - /// Virtual function returning the shape type. - virtual MapAreaType const get_shape_type( void ) const { return UNKNOWN; }; - /// Virtual function returning the shape name. - virtual char const * const get_shape_name(void) const=0; + /// Virtual function returning the tqshape type. + virtual MapAreaType const get_tqshape_type( void ) const { return UNKNOWN; }; + /// Virtual function returning the tqshape name. + virtual char const * const get_tqshape_name(void) const=0; /// Virtual function generating a copy of this object virtual GP<GMapArea> get_copy(void) const=0; /// Virtual function generating a list of defining coordinates @@ -305,7 +305,7 @@ public: /// Returns the height of the rectangle int get_height(void) const { return ymax-ymin; } - /// Changes the #GMapRect#'s geometry + /// Changes the #GMapRect#'s tqgeometry GMapRect & operator=(const GRect & rect); /// Returns \Ref{GRect} describing the map area's rectangle @@ -313,9 +313,9 @@ public: virtual GUTF8String get_xmltag(const int height) const; /// Returns MapRect - virtual MapAreaType const get_shape_type( void ) const { return RECT; }; + virtual MapAreaType const get_tqshape_type( void ) const { return RECT; }; /// Returns #"rect"# - virtual char const * const get_shape_name(void) const; + virtual char const * const get_tqshape_name(void) const; /// Returns a copy of the rectangle virtual GP<GMapArea> get_copy(void) const; /// Virtual function maps rectangle from one area to another using mapper @@ -392,9 +392,9 @@ public: virtual GUTF8String get_xmltag(const int height) const; /// Returns MapPoly - virtual MapAreaType const get_shape_type( void ) const { return POLY; }; + virtual MapAreaType const get_tqshape_type( void ) const { return POLY; }; /// Returns #"poly"# all the time - virtual char const * const get_shape_name(void) const; + virtual char const * const get_tqshape_name(void) const; /// Returns a copy of the polygon virtual GP<GMapArea> get_copy(void) const; /// Virtual function generating a list of defining coordinates @@ -458,9 +458,9 @@ public: virtual GUTF8String get_xmltag(const int height) const; /// Returns MapOval - virtual MapAreaType const get_shape_type( void ) const { return OVAL; }; + virtual MapAreaType const get_tqshape_type( void ) const { return OVAL; }; /// Returns #"oval"# - virtual char const * const get_shape_name(void) const; + virtual char const * const get_tqshape_name(void) const; /// Returns a copy of the oval virtual GP<GMapArea> get_copy(void) const; /// Virtual function maps oval from one area to another using mapper @@ -509,7 +509,7 @@ inline char const * const GMapRect::gma_check_object(void) const{ return ""; } inline char const * const -GMapRect::get_shape_name(void) const { return RECT_TAG; } +GMapRect::get_tqshape_name(void) const { return RECT_TAG; } inline int GMapPoly::get_points_num(void) const { return points; } @@ -524,7 +524,7 @@ inline int GMapPoly::get_y(int i) const { return yy[i]; } inline char const * const -GMapPoly::get_shape_name(void) const { return POLY_TAG; } +GMapPoly::get_tqshape_name(void) const { return POLY_TAG; } inline int GMapOval::get_a(void) const { return a; } @@ -551,7 +551,7 @@ inline int GMapOval::gma_get_ymax(void) const { return ymax; } inline char const * const -GMapOval::get_shape_name(void) const { return OVAL_TAG; } +GMapOval::get_tqshape_name(void) const { return OVAL_TAG; } //@} diff --git a/kviewshell/plugins/djvu/libdjvu/GOS.cpp b/kviewshell/plugins/djvu/libdjvu/GOS.cpp index 94449512..716c49c9 100644 --- a/kviewshell/plugins/djvu/libdjvu/GOS.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GOS.cpp @@ -167,9 +167,9 @@ finddirsep(const GUTF8String &fname) #if defined(UNIX) return fname.rsearch('/',0); #elif defined(WIN32) || defined(OS2) - return fname.rcontains("\\/",0); + return fname.rtqcontains("\\/",0); #elif defined(macintosh) - return fname.rcontains(":/",0); + return fname.rtqcontains(":/",0); #else #error "Define something here for your operating system" #endif @@ -272,7 +272,7 @@ GOS::ticks() return (unsigned long)clk; #elif defined(OS2) ULONG clk = 0; - DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, (PVOID)&clk, sizeof(ULONG)); + DosQuerySysInfo(TQSV_MS_COUNT, TQSV_MS_COUNT, (PVOID)&clk, sizeof(ULONG)); return clk; #elif defined(macintosh) return (unsigned long)((double)TickCount()*16.66); diff --git a/kviewshell/plugins/djvu/libdjvu/GPixmap.h b/kviewshell/plugins/djvu/libdjvu/GPixmap.h index 32d51c7e..afbd3512 100644 --- a/kviewshell/plugins/djvu/libdjvu/GPixmap.h +++ b/kviewshell/plugins/djvu/libdjvu/GPixmap.h @@ -306,13 +306,13 @@ public: #Alpha# denotes the gray value, in range #[0,1]#, represented by the corresponding pixel of bitmap #bm#. */ void attenuate(const GBitmap *bm, int x, int y); - /** Blits solid color #color# through transparency mask #bm#. + /** Blits solid color #color# through transparency tqmask #bm#. Bitmap #bm# is positionned at location #x#,#y# over this color image. The matching color image pixels are then modified by adding color #color# multiplied by #Alpha#, where #Alpha# denotes the gray value, in range #[0,1]#, represented by the corresponding pixel of bitmap #bm#. */ void blit(const GBitmap *bm, int x, int y, const GPixel *color); - /** Blits pixmap #color# through transparency mask #bm#. + /** Blits pixmap #color# through transparency tqmask #bm#. Bitmap #bm# is positionned at location #x#,#y# over this color image. The matching color image pixels are then modified by adding the corresponding pixel color in pixmap #color#, multiplied by #Alpha#, diff --git a/kviewshell/plugins/djvu/libdjvu/GRect.cpp b/kviewshell/plugins/djvu/libdjvu/GRect.cpp index 1ac0a87c..1cc49e8f 100644 --- a/kviewshell/plugins/djvu/libdjvu/GRect.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GRect.cpp @@ -184,7 +184,7 @@ GRect::recthull(const GRect &rect1, const GRect &rect2) } int -GRect::contains(const GRect & rect) const +GRect::tqcontains(const GRect & rect) const { GRect tmp_rect; tmp_rect.intersect(*this, rect); diff --git a/kviewshell/plugins/djvu/libdjvu/GRect.h b/kviewshell/plugins/djvu/libdjvu/GRect.h index 1a86f80d..f3e031e1 100644 --- a/kviewshell/plugins/djvu/libdjvu/GRect.h +++ b/kviewshell/plugins/djvu/libdjvu/GRect.h @@ -132,7 +132,7 @@ namespace DJVU { class GRect { public: - /** #OrientationBits# defines 3 mutually exclusive + /** #Qt::OrientationBits# defines 3 mutually exclusive bits to indicate the image orientation. There are four possible rotation values for an image @@ -150,7 +150,7 @@ public: }; /** #Orientations# defines all 8 possible orientations, using - the three \Ref{OrientationBits}. + the three \Ref{Qt::OrientationBits}. \begin{itemize} \item {\em TDLRNR} for Top Down, Left to Right, No Rotation. \item {\em BULRNR} for Bottom Up, Left to Right, No Rotation. @@ -209,11 +209,11 @@ public: contains all pixels with horizontal pixel coordinates in range #xmin# (inclusive) to #xmax# (exclusive) and vertical coordinates #ymin# (inclusive) to #ymax# (exclusive). */ - int contains(int x, int y) const; + int tqcontains(int x, int y) const; /** Returns true if this rectangle contains the passed rectangle #rect#. The function basically checks, that the intersection of this rectangle with #rect# is #rect#. */ - int contains(const GRect & rect) const; + int tqcontains(const GRect & rect) const; /** Returns true if rectangles #r1# and #r2# are equal. */ friend int operator==(const GRect & r1, const GRect & r2); /** Returns true if rectangles #r1# and #r2# are not equal. */ @@ -379,7 +379,7 @@ GRect::area() const } inline int -GRect::contains(int x, int y) const +GRect::tqcontains(int x, int y) const { return (x>=xmin && x<xmax && y>=ymin && y<ymax); } diff --git a/kviewshell/plugins/djvu/libdjvu/GSmartPointer.cpp b/kviewshell/plugins/djvu/libdjvu/GSmartPointer.cpp index 8c17755d..a55e8cdf 100644 --- a/kviewshell/plugins/djvu/libdjvu/GSmartPointer.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GSmartPointer.cpp @@ -187,7 +187,7 @@ GPBase::assign (const GPBase &sptr) void -GPBufferBase::replace(void *nptr,const size_t n) +GPBufferBase::tqreplace(void *nptr,const size_t n) { resize(0,0); ptr=nptr; diff --git a/kviewshell/plugins/djvu/libdjvu/GSmartPointer.h b/kviewshell/plugins/djvu/libdjvu/GSmartPointer.h index 04b79ecf..c12db5cb 100644 --- a/kviewshell/plugins/djvu/libdjvu/GSmartPointer.h +++ b/kviewshell/plugins/djvu/libdjvu/GSmartPointer.h @@ -117,7 +117,7 @@ public: GPBufferBase(void *&,const size_t n,const size_t t); void swap(GPBufferBase &p); void resize(const size_t n,const size_t t); - void replace(void *nptr,const size_t n); + void tqreplace(void *nptr,const size_t n); void set(const size_t t,const char c); ~GPBufferBase(); operator int(void) const { return ptr ? num : 0; } diff --git a/kviewshell/plugins/djvu/libdjvu/GString.cpp b/kviewshell/plugins/djvu/libdjvu/GString.cpp index a618055e..8242279a 100644 --- a/kviewshell/plugins/djvu/libdjvu/GString.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GString.cpp @@ -1538,14 +1538,14 @@ GUTF8String::fromEscaped( const GMap<GUTF8String,GUTF8String> ConvMap ) const } }else { - GPosition map_entry = ConvMap.contains( key ); + GPosition map_entry = ConvMap.tqcontains( key ); if( map_entry ) { // Found in the conversion map, substitute ret += ConvMap[map_entry]; } else { static const GMap<GUTF8String,GUTF8String> &Basic = BasicMap(); - GPosition map_entry = Basic.contains( key ); + GPosition map_entry = Basic.tqcontains( key ); if ( map_entry ) { ret += Basic[map_entry]; @@ -1799,7 +1799,7 @@ GStringRep::rsearch(char const *ptr, int from) const } int -GStringRep::contains(const char accept[],int from) const +GStringRep::tqcontains(const char accept[],int from) const { if(from<0) { @@ -1821,10 +1821,10 @@ GStringRep::contains(const char accept[],int from) const } int -GStringRep::rcontains(const char accept[],int from) const +GStringRep::rtqcontains(const char accept[],int from) const { int retval=(-1); - while((from=contains(accept,from)) >= 0) + while((from=tqcontains(accept,from)) >= 0) { retval=from++; } diff --git a/kviewshell/plugins/djvu/libdjvu/GString.h b/kviewshell/plugins/djvu/libdjvu/GString.h index 601db983..9614d328 100644 --- a/kviewshell/plugins/djvu/libdjvu/GString.h +++ b/kviewshell/plugins/djvu/libdjvu/GString.h @@ -306,9 +306,9 @@ public: int rsearch(char const *str, int from=0) const; - int contains(char const accept[], int from=0) const; + int tqcontains(char const accept[], int from=0) const; - int rcontains(char const accept[], int from=0) const; + int rtqcontains(char const accept[], int from=0) const; protected: // Return the next character and increment the source pointer. @@ -551,11 +551,11 @@ public: /** Searches for any of the specified characters in the accept string. It returns #-1# if the none of the characters and be found, otherwise the position of the first match. */ - int contains(const char accept[], const int from=0) const; + int tqcontains(const char accept[], const int from=0) const; /** Searches for any of the specified characters in the accept string. It returns #-1# if the none of the characters and be found, otherwise the position of the last match. */ - int rcontains(const char accept[], const int from=0) const; + int rtqcontains(const char accept[], const int from=0) const; /** Concatenates strings. Returns a string composed by concatenating the characters of strings #s1# and #s2#. */ @@ -1282,12 +1282,12 @@ GBaseString::rsearch(const char *str, const int from) const { return ptr?((*this)->rsearch(str,from)):(-1); } inline int -GBaseString::contains(const char accept[], const int from) const -{ return ptr?((*this)->contains(accept,from)):(-1); } +GBaseString::tqcontains(const char accept[], const int from) const +{ return ptr?((*this)->tqcontains(accept,from)):(-1); } inline int -GBaseString::rcontains(const char accept[], const int from) const -{ return ptr?((*this)->rcontains(accept,from)):(-1); } +GBaseString::rtqcontains(const char accept[], const int from) const +{ return ptr?((*this)->rtqcontains(accept,from)):(-1); } inline int GBaseString::cmp(const GBaseString &s2, const int len) const diff --git a/kviewshell/plugins/djvu/libdjvu/GThreads.cpp b/kviewshell/plugins/djvu/libdjvu/GThreads.cpp index ce88361e..3b52faca 100644 --- a/kviewshell/plugins/djvu/libdjvu/GThreads.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GThreads.cpp @@ -1397,7 +1397,7 @@ cotask_select(int nfds, } // reschedule cotask_yield(); - // call select to update masks + // call select to update tqmasks if (tm) { tm->tv_sec = maxwait/1000; @@ -1837,16 +1837,16 @@ GSafeFlags::operator long(void) const } bool -GSafeFlags::test_and_modify(long set_mask, long clr_mask, - long set_mask1, long clr_mask1) +GSafeFlags::test_and_modify(long set_tqmask, long clr_tqmask, + long set_tqmask1, long clr_tqmask1) { enter(); - if ((flags & set_mask)==set_mask && - (~flags & clr_mask)==clr_mask) + if ((flags & set_tqmask)==set_tqmask && + (~flags & clr_tqmask)==clr_tqmask) { long new_flags=flags; - new_flags|=set_mask1; - new_flags&=~clr_mask1; + new_flags|=set_tqmask1; + new_flags&=~clr_tqmask1; if (new_flags!=flags) { flags=new_flags; @@ -1860,15 +1860,15 @@ GSafeFlags::test_and_modify(long set_mask, long clr_mask, } void -GSafeFlags::wait_and_modify(long set_mask, long clr_mask, - long set_mask1, long clr_mask1) +GSafeFlags::wait_and_modify(long set_tqmask, long clr_tqmask, + long set_tqmask1, long clr_tqmask1) { enter(); - while((flags & set_mask)!=set_mask || - (~flags & clr_mask)!=clr_mask) wait(); + while((flags & set_tqmask)!=set_tqmask || + (~flags & clr_tqmask)!=clr_tqmask) wait(); long new_flags=flags; - new_flags|=set_mask1; - new_flags&=~clr_mask1; + new_flags|=set_tqmask1; + new_flags&=~clr_tqmask1; if (flags!=new_flags) { flags=new_flags; diff --git a/kviewshell/plugins/djvu/libdjvu/GThreads.h b/kviewshell/plugins/djvu/libdjvu/GThreads.h index 92691db4..2235e2b6 100644 --- a/kviewshell/plugins/djvu/libdjvu/GThreads.h +++ b/kviewshell/plugins/djvu/libdjvu/GThreads.h @@ -516,36 +516,36 @@ public: /** Returns the value of the flags */ operator long(void) const; - /** Modifies the flags by ORing them with the provided mask. A broadcast + /** Modifies the flags by ORing them with the provided tqmask. A broadcast will be sent after the modification is done. */ - GSafeFlags & operator|=(long mask); - /** Modifies the flags by ANDing them with the provided mask. A broadcast + GSafeFlags & operator|=(long tqmask); + /** Modifies the flags by ANDing them with the provided tqmask. A broadcast will be sent after the modification is done. */ - GSafeFlags & operator&=(long mask); + GSafeFlags & operator&=(long tqmask); - /** If all bits mentioned in #set_mask# are set in the flags and all - bits mentioned in #clr_mask# are cleared in the flags, it sets all - bits from #set_mask1# in the flags, clears all flags from - #clr_mask1# in the flags and returns #TRUE#. Otherwise returns + /** If all bits mentioned in #set_tqmask# are set in the flags and all + bits mentioned in #clr_tqmask# are cleared in the flags, it sets all + bits from #set_tqmask1# in the flags, clears all flags from + #clr_tqmask1# in the flags and returns #TRUE#. Otherwise returns #FALSE#. */ - bool test_and_modify(long set_mask, long clr_mask, - long set_mask1, long clr_mask1); + bool test_and_modify(long set_tqmask, long clr_tqmask, + long set_tqmask1, long clr_tqmask1); - /** Waits until all bits mentioned in #set_mask# are set in the flags + /** Waits until all bits mentioned in #set_tqmask# are set in the flags and all bits mentioned in #clr_flags# are cleared in the flags. - After that it sets bits from #set_mask1# and clears bits from - #clr_mask1# in the flags. */ - void wait_and_modify(long set_mask, long clr_mask, - long set_mask1, long clr_mask1); + After that it sets bits from #set_tqmask1# and clears bits from + #clr_tqmask1# in the flags. */ + void wait_and_modify(long set_tqmask, long clr_tqmask, + long set_tqmask1, long clr_tqmask1); - /** Waits until all bits set in #set_mask# are set in the flags and - all bits mentioned in #clr_mask# are cleared in the flags. */ - void wait_for_flags(long set_mask, long clr_mask=0) const; + /** Waits until all bits set in #set_tqmask# are set in the flags and + all bits mentioned in #clr_tqmask# are cleared in the flags. */ + void wait_for_flags(long set_tqmask, long clr_tqmask=0) const; - /** Modifies the flags by setting all bits mentioned in #set_mask# - and clearing all bits mentioned in #clr_mask#. If the flags have + /** Modifies the flags by setting all bits mentioned in #set_tqmask# + and clearing all bits mentioned in #clr_tqmask#. If the flags have actually been modified, a broadcast will be sent. */ - void modify(long set_mask, long clr_mask); + void modify(long set_tqmask, long clr_tqmask); }; inline @@ -555,28 +555,28 @@ GSafeFlags::GSafeFlags(long xflags) } inline void -GSafeFlags::wait_for_flags(long set_mask, long clr_mask) const +GSafeFlags::wait_for_flags(long set_tqmask, long clr_tqmask) const { - ((GSafeFlags *) this)->wait_and_modify(set_mask, clr_mask, 0, 0); + ((GSafeFlags *) this)->wait_and_modify(set_tqmask, clr_tqmask, 0, 0); } inline void -GSafeFlags::modify(long set_mask, long clr_mask) +GSafeFlags::modify(long set_tqmask, long clr_tqmask) { - test_and_modify(0, 0, set_mask, clr_mask); + test_and_modify(0, 0, set_tqmask, clr_tqmask); } inline GSafeFlags & -GSafeFlags::operator|=(long mask) +GSafeFlags::operator|=(long tqmask) { - test_and_modify(0, 0, mask, 0); + test_and_modify(0, 0, tqmask, 0); return *this; } inline GSafeFlags & -GSafeFlags::operator&=(long mask) +GSafeFlags::operator&=(long tqmask) { - test_and_modify(0, 0, 0, ~mask); + test_and_modify(0, 0, 0, ~tqmask); return *this; } diff --git a/kviewshell/plugins/djvu/libdjvu/GURL.h b/kviewshell/plugins/djvu/libdjvu/GURL.h index eb3ed4bc..b76d000b 100644 --- a/kviewshell/plugins/djvu/libdjvu/GURL.h +++ b/kviewshell/plugins/djvu/libdjvu/GURL.h @@ -106,7 +106,7 @@ namespace DJVU { to the same file name. Compare #file:/dir/file.djvu# and #file://localhost/dir/file.djvu#. - To simplify a developer's life we have created this class, which contains + To simplify a developer's life we have created this class, which tqcontains inside a canonical representation of URLs. File URLs are converted to internal format with the help of \Ref{GOS} class. diff --git a/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp b/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp index c8b79809..59f729b4 100644 --- a/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp +++ b/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp @@ -444,7 +444,7 @@ IFFByteStream::full_id(GUTF8String &chkid) short_id(chkid); if (ctx->bComposite) return; - // Search parent FORM or PROP chunk. + // Search tqparent FORM or PROP chunk. for (IFFContext *ct = ctx->next; ct; ct=ct->next) if (memcmp(ct->idOne, "FOR", 3)==0 || memcmp(ct->idOne, "PRO", 3)==0 ) diff --git a/kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp b/kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp index c63eda7d..eb429563 100644 --- a/kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp +++ b/kviewshell/plugins/djvu/libdjvu/IW44EncodeCodec.cpp @@ -160,9 +160,9 @@ public: Encode(void); /** Initializes an IWBitmap with image #bm#. This constructor performs the wavelet decomposition of image #bm# and records the - corresponding wavelet coefficient. Argument #mask# is an optional - bilevel image specifying the masked pixels (see \Ref{IW44Image.h}). */ - void init(const GBitmap &bm, const GP<GBitmap> mask=0); + corresponding wavelet coefficient. Argument #tqmask# is an optional + bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). */ + void init(const GBitmap &bm, const GP<GBitmap> tqmask=0); // CODER /** Encodes one data chunk into ByteStream #bs#. Parameter #parms# controls how much data is generated. The chunk data is written to ByteStream @@ -211,11 +211,11 @@ public: Encode(void); /** Initializes an IWPixmap with color image #bm#. This constructor performs the wavelet decomposition of image #bm# and records the - corresponding wavelet coefficient. Argument #mask# is an optional - bilevel image specifying the masked pixels (see \Ref{IW44Image.h}). + corresponding wavelet coefficient. Argument #tqmask# is an optional + bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). Argument #crcbmode# specifies how the chrominance information should be encoded (see \Ref{CRCBMode}). */ - void init(const GPixmap &bm, const GP<GBitmap> mask=0, CRCBMode crcbmode=CRCBnormal); + void init(const GPixmap &bm, const GP<GBitmap> tqmask=0, CRCBMode crcbmode=CRCBnormal); // CODER /** Encodes one data chunk into ByteStream #bs#. Parameter #parms# controls how much data is generated. The chunk data is written to ByteStream @@ -720,17 +720,17 @@ IW44Image::Transform::Encode::RGB_to_Cr(const GPixel *p, int w, int h, int rowsi static void -interpolate_mask(short *data16, int w, int h, int rowsize, - const signed char *mask8, int mskrowsize) +interpolate_tqmask(short *data16, int w, int h, int rowsize, + const signed char *tqmask8, int mskrowsize) { int i,j; - // count masked bits + // count tqmasked bits short *count; GPBuffer<short> gcount(count,w*h); short *cp = count; - for (i=0; i<h; i++, cp+=w, mask8+=mskrowsize) + for (i=0; i<h; i++, cp+=w, tqmask8+=mskrowsize) for (j=0; j<w; j++) - cp[j] = (mask8[j] ? 0 : 0x1000); + cp[j] = (tqmask8[j] ? 0 : 0x1000); // copy image short *sdata; GPBuffer<short> gsdata(sdata,w*h); @@ -820,8 +820,8 @@ interpolate_mask(short *data16, int w, int h, int rowsize, static void -forward_mask(short *data16, int w, int h, int rowsize, int begin, int end, - const signed char *mask8, int mskrowsize ) +forward_tqmask(short *data16, int w, int h, int rowsize, int begin, int end, + const signed char *tqmask8, int mskrowsize ) { int i,j; signed char *m; @@ -830,12 +830,12 @@ forward_mask(short *data16, int w, int h, int rowsize, int begin, int end, // Allocate buffers short *sdata; GPBuffer<short> gsdata(sdata,w*h); - signed char *smask; - GPBuffer<signed char> gsmask(smask,w*h); - // Copy mask - m = smask; - for (i=0; i<h; i+=1, m+=w, mask8+=mskrowsize) - memcpy((void*)m, (void*)mask8, w); + signed char *stqmask; + GPBuffer<signed char> gstqmask(stqmask,w*h); + // Copy tqmask + m = stqmask; + for (i=0; i<h; i+=1, m+=w, tqmask8+=mskrowsize) + memcpy((void*)m, (void*)tqmask8, w); // Loop over scale for (int scale=begin; scale<end; scale<<=1) { @@ -851,9 +851,9 @@ forward_mask(short *data16, int w, int h, int rowsize, int begin, int end, } // Decompose IW44Image::Transform::Encode::forward(sdata, w, h, w, scale, scale+scale); - // Cancel masked coefficients + // Cancel tqmasked coefficients d = sdata; - m = smask; + m = stqmask; for (i=0; i<h; i+=scale+scale) { for (j=scale; j<w; j+=scale+scale) @@ -875,7 +875,7 @@ forward_mask(short *data16, int w, int h, int rowsize, int begin, int end, // Correct visible pixels p = data16; d = sdata; - m = smask; + m = stqmask; for (i=0; i<h; i+=scale) { for (j=0; j<w; j+=scale) @@ -897,8 +897,8 @@ forward_mask(short *data16, int w, int h, int rowsize, int begin, int end, p += rowsize * scale; d += w * scale; } - // Compute new mask for next scale - m = smask; + // Compute new tqmask for next scale + m = stqmask; signed char *m0 = m; signed char *m1 = m; for (i=0; i<h; i+=scale+scale) @@ -941,15 +941,15 @@ IW44Image::Map::Encode::create(const signed char *img8, int imgrowsize, for (i=ih; i<bh; i++) for (j=0; j<bw; j++) *p++ = 0; - // Handle bitmask + // Handle bittqmask if (msk8) { - // Interpolate pixels below mask + // Interpolate pixels below tqmask DJVU_PROGRESS_RUN(transf, 1); - interpolate_mask(data16, iw, ih, bw, msk8, mskrowsize); - // Multiscale iterative masked decomposition + interpolate_tqmask(data16, iw, ih, bw, msk8, mskrowsize); + // Multiscale iterative tqmasked decomposition DJVU_PROGRESS_RUN(transf, 3); - forward_mask(data16, iw, ih, bw, 1, 32, msk8, mskrowsize); + forward_tqmask(data16, iw, ih, bw, 1, 32, msk8, mskrowsize); } else { @@ -1393,11 +1393,11 @@ IW44Image::create_encode(const ImageType itype) } GP<IW44Image> -IW44Image::create_encode(const GBitmap &bm, const GP<GBitmap> mask) +IW44Image::create_encode(const GBitmap &bm, const GP<GBitmap> tqmask) { IWBitmap::Encode *bit=new IWBitmap::Encode(); GP<IW44Image> retval=bit; - bit->init(bm, mask); + bit->init(bm, tqmask); return retval; } @@ -1412,7 +1412,7 @@ IWBitmap::Encode::~Encode() } void -IWBitmap::Encode::init(const GBitmap &bm, const GP<GBitmap> gmask) +IWBitmap::Encode::init(const GBitmap &bm, const GP<GBitmap> gtqmask) { // Free close_codec(); @@ -1430,14 +1430,14 @@ IWBitmap::Encode::init(const GBitmap &bm, const GP<GBitmap> gmask) for (i=0; i<256; i++) bconv[i] = max(0,min(255,i*255/g)) - 128; // Perform decomposition - // Prepare mask information + // Prepare tqmask information const signed char *msk8 = 0; int mskrowsize = 0; - GBitmap *mask=gmask; - if (gmask) + GBitmap *tqmask=gtqmask; + if (gtqmask) { - msk8 = (const signed char*)((*mask)[0]); - mskrowsize = mask->rowsize(); + msk8 = (const signed char*)((*tqmask)[0]); + mskrowsize = tqmask->rowsize(); } // Prepare a buffer of signed bytes for (i=0; i<h; i++) @@ -1556,11 +1556,11 @@ IWBitmap::Encode::encode_iff(IFFByteStream &iff, int nchunks, const IWEncoderPar GP<IW44Image> IW44Image::create_encode( - const GPixmap &pm, const GP<GBitmap> gmask, CRCBMode crcbmode) + const GPixmap &pm, const GP<GBitmap> gtqmask, CRCBMode crcbmode) { IWPixmap::Encode *pix=new IWPixmap::Encode(); GP<IW44Image> retval=pix; - pix->init(pm, gmask,(IWPixmap::Encode::CRCBMode)crcbmode); + pix->init(pm, gtqmask,(IWPixmap::Encode::CRCBMode)crcbmode); return retval; } @@ -1574,7 +1574,7 @@ IWPixmap::Encode::~Encode() } void -IWPixmap::Encode::init(const GPixmap &pm, const GP<GBitmap> gmask, CRCBMode crcbmode) +IWPixmap::Encode::init(const GPixmap &pm, const GP<GBitmap> gtqmask, CRCBMode crcbmode) { /* Free */ close_codec(); @@ -1598,14 +1598,14 @@ IWPixmap::Encode::init(const GPixmap &pm, const GP<GBitmap> gmask, CRCBMode crcb case CRCBnormal: crcb_half=0; crcb_delay=10; break; case CRCBfull: crcb_half=0; crcb_delay= 0; break; } - // Prepare mask information + // Prepare tqmask information const signed char *msk8 = 0; int mskrowsize = 0; - GBitmap *mask=gmask; - if (mask) + GBitmap *tqmask=gtqmask; + if (tqmask) { - msk8 = (signed char const *)((*mask)[0]); - mskrowsize = mask->rowsize(); + msk8 = (signed char const *)((*tqmask)[0]); + mskrowsize = tqmask->rowsize(); } // Fill buffer with luminance information DJVU_PROGRESS_TASK(create,"initialize pixmap",3); diff --git a/kviewshell/plugins/djvu/libdjvu/IW44Image.cpp b/kviewshell/plugins/djvu/libdjvu/IW44Image.cpp index 2cadf4f9..b4ca3405 100644 --- a/kviewshell/plugins/djvu/libdjvu/IW44Image.cpp +++ b/kviewshell/plugins/djvu/libdjvu/IW44Image.cpp @@ -638,7 +638,7 @@ IW44Image::Map::alloc(int n) short ** IW44Image::Map::allocp(int n) { - // Allocate enough room for pointers plus alignment + // Allocate enough room for pointers plus tqalignment short *p = alloc( (n+1) * sizeof(short*) / sizeof(short) ); // Align on pointer size while ( ((long)p) & (sizeof(short*)-1) ) @@ -934,7 +934,7 @@ IW44Image::Codec::Codec(IW44Image::Map &xmap) IW44Image::Codec::~Codec() {} // is_null_slice -// -- check if data can be produced for this band/mask +// -- check if data can be produced for this band/tqmask // -- also fills the sure_zero array int diff --git a/kviewshell/plugins/djvu/libdjvu/IW44Image.h b/kviewshell/plugins/djvu/libdjvu/IW44Image.h index 56cf00fa..954eee56 100644 --- a/kviewshell/plugins/djvu/libdjvu/IW44Image.h +++ b/kviewshell/plugins/djvu/libdjvu/IW44Image.h @@ -137,11 +137,11 @@ {\bf Masking} --- When we create a DjVu image, we often know that certain pixels of the background image are going to be covered by foreground objects like text or drawings. The DjVu IW44 wavelet decomposition - routine can use an optional bilevel image named the mask. Every non zero - pixel in the mask means the value of the corresponding pixel in the + routine can use an optional bilevel image named the tqmask. Every non zero + pixel in the tqmask means the value of the corresponding pixel in the background image is irrelevant. The wavelet decomposition code will - replace these masked pixels by a color value whose coding cost is minimal - (see \URL{http://www.research.att.com/~leonb/DJVU/mask}). + replace these tqmasked pixels by a color value whose coding cost is minimal + (see \URL{http://www.research.att.com/~leonb/DJVU/tqmask}). {\bf ToDo} --- There are many improvements to be made. Besides better quantization algorithms (such as trellis quantization and bitrate @@ -277,16 +277,16 @@ public: virtual ~IW44Image(); /** Initializes an IWBitmap with image #bm#. This constructor performs the wavelet decomposition of image #bm# and records the - corresponding wavelet coefficient. Argument #mask# is an optional - bilevel image specifying the masked pixels (see \Ref{IW44Image.h}). */ - static GP<IW44Image> create_encode(const GBitmap &bm, const GP<GBitmap> mask=0); + corresponding wavelet coefficient. Argument #tqmask# is an optional + bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). */ + static GP<IW44Image> create_encode(const GBitmap &bm, const GP<GBitmap> tqmask=0); /** Initializes an IWPixmap with color image #bm#. This constructor performs the wavelet decomposition of image #bm# and records the - corresponding wavelet coefficient. Argument #mask# is an optional - bilevel image specifying the masked pixels (see \Ref{IW44Image.h}). + corresponding wavelet coefficient. Argument #tqmask# is an optional + bilevel image specifying the tqmasked pixels (see \Ref{IW44Image.h}). Argument #crcbmode# specifies how the chrominance information should be encoded (see \Ref{CRCBMode}). */ - static GP<IW44Image> create_encode(const GPixmap &bm, const GP<GBitmap> mask=0, CRCBMode crcbmode=CRCBnormal); + static GP<IW44Image> create_encode(const GPixmap &bm, const GP<GBitmap> tqmask=0, CRCBMode crcbmode=CRCBnormal); // ACCESS /** Returns the width of the IWBitmap image. */ int get_width(void) const; @@ -618,7 +618,7 @@ public: int pixsep=1, int fast=0); // array of blocks IW44Image::Block *blocks; - // geometry + // tqgeometry int iw, ih; int bw, bh; int nb; diff --git a/kviewshell/plugins/djvu/libdjvu/JB2EncodeCodec.cpp b/kviewshell/plugins/djvu/libdjvu/JB2EncodeCodec.cpp index 5a8092a0..57dd5200 100644 --- a/kviewshell/plugins/djvu/libdjvu/JB2EncodeCodec.cpp +++ b/kviewshell/plugins/djvu/libdjvu/JB2EncodeCodec.cpp @@ -104,13 +104,13 @@ public: protected: void CodeNum(const int num, const int lo, const int hi, NumContext &ctx); - void encode_libonly_shape(const GP<JB2Image> &jim, int shapeno); + void encode_libonly_tqshape(const GP<JB2Image> &jim, int tqshapeno); // virtual bool CodeBit(const bool bit, BitContext &ctx); void code_comment(GUTF8String &comment); void code_record_type(int &rectype); int code_match_index(int &index, JB2Dict &jim); - void code_inherited_shape_count(JB2Dict &jim); + void code_inherited_tqshape_count(JB2Dict &jim); void code_image_size(JB2Dict &jim); void code_image_size(JB2Image &jim); void code_absolute_location(JB2Blit *jblt, int rows, int columns); @@ -166,7 +166,7 @@ JB2Image::encode(const GP<ByteStream> &gbs) const #define MATCHED_REFINE_IMAGE_ONLY (6) #define MATCHED_COPY (7) #define NON_MARK_DATA (8) -#define REQUIRED_DICT_OR_RESET (9) +#define RETQUIRED_DICT_OR_RESET (9) #define PRESERVED_COMMENT (10) #define END_OF_DATA (11) @@ -228,18 +228,18 @@ JB2Dict::JB2Codec::Encode::code_record_type(int &rectype) int JB2Dict::JB2Codec::Encode::code_match_index(int &index, JB2Dict &jim) { - int match=shape2lib[index]; - CodeNum(match, 0, lib2shape.hbound(), dist_match_index); + int match=tqshape2lib[index]; + CodeNum(match, 0, lib2tqshape.hbound(), dist_match_index); return match; } // CODE PAIRS void -JB2Dict::JB2Codec::Encode::code_inherited_shape_count(JB2Dict &jim) +JB2Dict::JB2Codec::Encode::code_inherited_tqshape_count(JB2Dict &jim) { - CodeNum(jim.get_inherited_shape_count(), - 0, BIGPOSITIVE, inherited_shape_count_dist); + CodeNum(jim.get_inherited_tqshape_count(), + 0, BIGPOSITIVE, inherited_tqshape_count_dist); } void @@ -360,12 +360,12 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Dict> &gjim) // ------------------------- // THIS IS THE ENCODING PART // ------------------------- - int firstshape = jim.get_inherited_shape_count(); - int nshape = jim.get_shape_count(); + int firsttqshape = jim.get_inherited_tqshape_count(); + int ntqshape = jim.get_tqshape_count(); init_library(jim); // Code headers. - int rectype = REQUIRED_DICT_OR_RESET; - if (jim.get_inherited_shape_count() > 0) + int rectype = RETQUIRED_DICT_OR_RESET; + if (jim.get_inherited_tqshape_count() > 0) code_record(rectype, gjim, 0); rectype = START_OF_DATA; code_record(rectype, gjim, 0); @@ -373,22 +373,22 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Dict> &gjim) rectype = PRESERVED_COMMENT; if (!! jim.comment) code_record(rectype, gjim, 0); - // Encode every shape - int shapeno; - DJVU_PROGRESS_TASK(jb2code,"jb2 encode", nshape-firstshape); - for (shapeno=firstshape; shapeno<nshape; shapeno++) + // Encode every tqshape + int tqshapeno; + DJVU_PROGRESS_TASK(jb2code,"jb2 encode", ntqshape-firsttqshape); + for (tqshapeno=firsttqshape; tqshapeno<ntqshape; tqshapeno++) { - DJVU_PROGRESS_RUN(jb2code, (shapeno-firstshape)|0xff); - // Code shape - JB2Shape &jshp = jim.get_shape(shapeno); - rectype=(jshp.parent >= 0) + DJVU_PROGRESS_RUN(jb2code, (tqshapeno-firsttqshape)|0xff); + // Code tqshape + JB2Shape &jshp = jim.get_tqshape(tqshapeno); + rectype=(jshp.tqparent >= 0) ?MATCHED_REFINE_LIBRARY_ONLY:NEW_MARK_LIBRARY_ONLY; code_record(rectype, gjim, &jshp); - add_library(shapeno, jshp); + add_library(tqshapeno, jshp); // Check numcoder status if (cur_ncell > CELLCHUNK) { - rectype = REQUIRED_DICT_OR_RESET; + rectype = RETQUIRED_DICT_OR_RESET; code_record(rectype, 0, 0); } } @@ -413,35 +413,35 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim) // ------------------------- int i; init_library(jim); - int firstshape = jim.get_inherited_shape_count(); - int nshape = jim.get_shape_count(); + int firsttqshape = jim.get_inherited_tqshape_count(); + int ntqshape = jim.get_tqshape_count(); int nblit = jim.get_blit_count(); - // Initialize shape2lib - shape2lib.resize(0,nshape-1); - for (i=firstshape; i<nshape; i++) - shape2lib[i] = -1; - // Determine shapes that go into library (shapeno>=firstshape) - // shape2lib is -2 if used by one blit - // shape2lib is -3 if used by more than one blit - // shape2lib is -4 if used as a parent + // Initialize tqshape2lib + tqshape2lib.resize(0,ntqshape-1); + for (i=firsttqshape; i<ntqshape; i++) + tqshape2lib[i] = -1; + // Determine tqshapes that go into library (tqshapeno>=firsttqshape) + // tqshape2lib is -2 if used by one blit + // tqshape2lib is -3 if used by more than one blit + // tqshape2lib is -4 if used as a tqparent for (i=0; i<nblit; i++) { JB2Blit *jblt = jim.get_blit(i); - int shapeno = jblt->shapeno; - if (shapeno < firstshape) + int tqshapeno = jblt->tqshapeno; + if (tqshapeno < firsttqshape) continue; - if (shape2lib[shapeno] >= -2) - shape2lib[shapeno] -= 1; - shapeno = jim.get_shape(shapeno).parent; - while (shapeno>=firstshape && shape2lib[shapeno]>=-3) + if (tqshape2lib[tqshapeno] >= -2) + tqshape2lib[tqshapeno] -= 1; + tqshapeno = jim.get_tqshape(tqshapeno).tqparent; + while (tqshapeno>=firsttqshape && tqshape2lib[tqshapeno]>=-3) { - shape2lib[shapeno] = -4; - shapeno = jim.get_shape(shapeno).parent; + tqshape2lib[tqshapeno] = -4; + tqshapeno = jim.get_tqshape(tqshapeno).tqparent; } } // Code headers. - int rectype = REQUIRED_DICT_OR_RESET; - if (jim.get_inherited_shape_count() > 0) + int rectype = RETQUIRED_DICT_OR_RESET; + if (jim.get_inherited_tqshape_count() > 0) code_record(rectype, gjim, 0, 0); rectype = START_OF_DATA; code_record(rectype, gjim, 0, 0); @@ -456,41 +456,41 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim) { DJVU_PROGRESS_RUN(jb2code, blitno|0xff); JB2Blit *jblt = jim.get_blit(blitno); - int shapeno = jblt->shapeno; - JB2Shape &jshp = jim.get_shape(shapeno); - // Tests if shape exists in library - if (shape2lib[shapeno] >= 0) + int tqshapeno = jblt->tqshapeno; + JB2Shape &jshp = jim.get_tqshape(tqshapeno); + // Tests if tqshape exists in library + if (tqshape2lib[tqshapeno] >= 0) { int rectype = MATCHED_COPY; code_record(rectype, gjim, 0, jblt); } - // Avoid coding null shapes/blits + // Avoid coding null tqshapes/blits else if (jshp.bits) { - // Make sure all parents have been coded - if (jshp.parent>=0 && shape2lib[jshp.parent]<0) - encode_libonly_shape(gjim, jshp.parent); + // Make sure all tqparents have been coded + if (jshp.tqparent>=0 && tqshape2lib[jshp.tqparent]<0) + encode_libonly_tqshape(gjim, jshp.tqparent); // Allocate library entry when needed #define LIBRARY_CONTAINS_ALL int libraryp = 0; #ifdef LIBRARY_CONTAINS_MARKS // baseline - if (jshp.parent >= -1) + if (jshp.tqparent >= -1) libraryp = 1; #endif #ifdef LIBRARY_CONTAINS_SHARED // worse - if (shape2lib[shapeno] <= -3) + if (tqshape2lib[tqshapeno] <= -3) libraryp = 1; #endif #ifdef LIBRARY_CONTAINS_ALL // better libraryp = 1; #endif // Test all blit cases - if (jshp.parent<-1 && !libraryp) + if (jshp.tqparent<-1 && !libraryp) { int rectype = NON_MARK_DATA; code_record(rectype, gjim, &jshp, jblt); } - else if (jshp.parent < 0) + else if (jshp.tqparent < 0) { int rectype = (libraryp ? NEW_MARK : NEW_MARK_IMAGE_ONLY); code_record(rectype, gjim, &jshp, jblt); @@ -500,14 +500,14 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim) int rectype = (libraryp ? MATCHED_REFINE : MATCHED_REFINE_IMAGE_ONLY); code_record(rectype, gjim, &jshp, jblt); } - // Add shape to library + // Add tqshape to library if (libraryp) - add_library(shapeno, jshp); + add_library(tqshapeno, jshp); } // Check numcoder status if (cur_ncell > CELLCHUNK) { - rectype = REQUIRED_DICT_OR_RESET; + rectype = RETQUIRED_DICT_OR_RESET; code_record(rectype, 0, 0); } } @@ -522,31 +522,31 @@ JB2Dict::JB2Codec::Encode::code(const GP<JB2Image> &gjim) //////////////////////////////////////// void -JB2Dict::JB2Codec::Encode::encode_libonly_shape( - const GP<JB2Image> &gjim, int shapeno ) +JB2Dict::JB2Codec::Encode::encode_libonly_tqshape( + const GP<JB2Image> &gjim, int tqshapeno ) { if(!gjim) { G_THROW( ERR_MSG("JB2Image.bad_number") ); } JB2Image &jim=*gjim; - // Recursively encode parent shape - JB2Shape &jshp = jim.get_shape(shapeno); - if (jshp.parent>=0 && shape2lib[jshp.parent]<0) - encode_libonly_shape(gjim, jshp.parent); - // Test that library shape must be encoded - if (shape2lib[shapeno] < 0) + // Recursively encode tqparent tqshape + JB2Shape &jshp = jim.get_tqshape(tqshapeno); + if (jshp.tqparent>=0 && tqshape2lib[jshp.tqparent]<0) + encode_libonly_tqshape(gjim, jshp.tqparent); + // Test that library tqshape must be encoded + if (tqshape2lib[tqshapeno] < 0) { // Code library entry - int rectype=(jshp.parent >= 0) + int rectype=(jshp.tqparent >= 0) ?NEW_MARK_LIBRARY_ONLY:MATCHED_REFINE_LIBRARY_ONLY; code_record(rectype, gjim, &jshp, 0); - // Add shape to library - add_library(shapeno, jshp); + // Add tqshape to library + add_library(tqshapeno, jshp); // Check numcoder status if (cur_ncell > CELLCHUNK) { - rectype = REQUIRED_DICT_OR_RESET; + rectype = RETQUIRED_DICT_OR_RESET; code_record(rectype, 0, 0); } } diff --git a/kviewshell/plugins/djvu/libdjvu/JB2Image.cpp b/kviewshell/plugins/djvu/libdjvu/JB2Image.cpp index 7aad9261..d6644cbc 100644 --- a/kviewshell/plugins/djvu/libdjvu/JB2Image.cpp +++ b/kviewshell/plugins/djvu/libdjvu/JB2Image.cpp @@ -110,7 +110,7 @@ protected: void code_comment(GUTF8String &comment); void code_record_type(int &rectype); int code_match_index(int &index, JB2Dict &jim); - void code_inherited_shape_count(JB2Dict &jim); + void code_inherited_tqshape_count(JB2Dict &jim); void code_image_size(JB2Dict &jim); void code_image_size(JB2Image &jim); void code_absolute_location(JB2Blit *jblt, int rows, int columns); @@ -136,28 +136,28 @@ private: JB2Dict::JB2Dict() - : inherited_shapes(0) + : inherited_tqshapes(0) { } void JB2Dict::init() { - inherited_shapes = 0; + inherited_tqshapes = 0; inherited_dict = 0; - shapes.empty(); + tqshapes.empty(); } JB2Shape & -JB2Dict::get_shape(const int shapeno) +JB2Dict::get_tqshape(const int tqshapeno) { JB2Shape *retval; - if(shapeno >= inherited_shapes) + if(tqshapeno >= inherited_tqshapes) { - retval=&shapes[shapeno - inherited_shapes]; + retval=&tqshapes[tqshapeno - inherited_tqshapes]; }else if(inherited_dict) { - retval=&(inherited_dict->get_shape(shapeno)); + retval=&(inherited_dict->get_tqshape(tqshapeno)); }else { G_THROW( ERR_MSG("JB2Image.bad_number") ); @@ -166,15 +166,15 @@ JB2Dict::get_shape(const int shapeno) } const JB2Shape & -JB2Dict::get_shape(const int shapeno) const +JB2Dict::get_tqshape(const int tqshapeno) const { const JB2Shape *retval; - if(shapeno >= inherited_shapes) + if(tqshapeno >= inherited_tqshapes) { - retval=&shapes[shapeno - inherited_shapes]; + retval=&tqshapes[tqshapeno - inherited_tqshapes]; }else if(inherited_dict) { - retval=&(inherited_dict->get_shape(shapeno)); + retval=&(inherited_dict->get_tqshape(tqshapeno)); }else { G_THROW( ERR_MSG("JB2Image.bad_number") ); @@ -185,16 +185,16 @@ JB2Dict::get_shape(const int shapeno) const void JB2Dict::set_inherited_dict(const GP<JB2Dict> &dict) { - if (shapes.size() > 0) + if (tqshapes.size() > 0) G_THROW( ERR_MSG("JB2Image.cant_set") ); if (inherited_dict) G_THROW( ERR_MSG("JB2Image.cant_change") ); inherited_dict = dict; - inherited_shapes = dict->get_shape_count(); + inherited_tqshapes = dict->get_tqshape_count(); // Make sure that inherited bitmaps are marked as shared - for (int i=0; i<inherited_shapes; i++) + for (int i=0; i<inherited_tqshapes; i++) { - JB2Shape &jshp = dict->get_shape(i); + JB2Shape &jshp = dict->get_tqshape(i); if (jshp.bits) jshp.bits->share(); } } @@ -202,30 +202,30 @@ JB2Dict::set_inherited_dict(const GP<JB2Dict> &dict) void JB2Dict::compress() { - for (int i=shapes.lbound(); i<=shapes.hbound(); i++) - shapes[i].bits->compress(); + for (int i=tqshapes.lbound(); i<=tqshapes.hbound(); i++) + tqshapes[i].bits->compress(); } unsigned int JB2Dict::get_memory_usage() const { unsigned int usage = sizeof(JB2Dict); - usage += sizeof(JB2Shape) * shapes.size(); - for (int i=shapes.lbound(); i<=shapes.hbound(); i++) - if (shapes[i].bits) - usage += shapes[i].bits->get_memory_usage(); + usage += sizeof(JB2Shape) * tqshapes.size(); + for (int i=tqshapes.lbound(); i<=tqshapes.hbound(); i++) + if (tqshapes[i].bits) + usage += tqshapes[i].bits->get_memory_usage(); return usage; } int -JB2Dict::add_shape(const JB2Shape &shape) +JB2Dict::add_tqshape(const JB2Shape &tqshape) { - if (shape.parent >= get_shape_count()) - G_THROW( ERR_MSG("JB2Image.bad_parent_shape") ); - int index = shapes.size(); - shapes.touch(index); - shapes[index] = shape; - return index + inherited_shapes; + if (tqshape.tqparent >= get_tqshape_count()) + G_THROW( ERR_MSG("JB2Image.bad_parent_tqshape") ); + int index = tqshapes.size(); + tqshapes.touch(index); + tqshapes[index] = tqshape; + return index + inherited_tqshapes; } void @@ -277,8 +277,8 @@ JB2Image::set_dimension(int awidth, int aheight) int JB2Image::add_blit(const JB2Blit &blit) { - if (blit.shapeno >= (unsigned int)get_shape_count()) - G_THROW( ERR_MSG("JB2Image.bad_shape") ); + if (blit.tqshapeno >= (unsigned int)get_tqshape_count()) + G_THROW( ERR_MSG("JB2Image.bad_tqshape") ); int index = blits.size(); blits.touch(index); blits[index] = blit; @@ -298,9 +298,9 @@ JB2Image::get_bitmap(int subsample, int align) const for (int blitno = 0; blitno < get_blit_count(); blitno++) { const JB2Blit *pblit = get_blit(blitno); - const JB2Shape &pshape = get_shape(pblit->shapeno); - if (pshape.bits) - bm->blit(pshape.bits, pblit->left, pblit->bottom, subsample); + const JB2Shape &ptqshape = get_tqshape(pblit->tqshapeno); + if (ptqshape.bits) + bm->blit(ptqshape.bits, pblit->left, pblit->bottom, subsample); } return bm; } @@ -320,9 +320,9 @@ JB2Image::get_bitmap(const GRect &rect, int subsample, int align, int dispy) con for (int blitno = 0; blitno < get_blit_count(); blitno++) { const JB2Blit *pblit = get_blit(blitno); - const JB2Shape &pshape = get_shape(pblit->shapeno); - if (pshape.bits) - bm->blit(pshape.bits, pblit->left-rxmin, pblit->bottom-rymin+dispy, subsample); + const JB2Shape &ptqshape = get_tqshape(pblit->tqshapeno); + if (ptqshape.bits) + bm->blit(ptqshape.bits, pblit->left-rxmin, pblit->bottom-rymin+dispy, subsample); } return bm; } @@ -354,7 +354,7 @@ JB2Image::decode(const GP<ByteStream> &gbs, JB2DecoderCallback *cb, void *arg) #define MATCHED_REFINE_IMAGE_ONLY (6) #define MATCHED_COPY (7) #define NON_MARK_DATA (8) -#define REQUIRED_DICT_OR_RESET (9) +#define RETQUIRED_DICT_OR_RESET (9) #define PRESERVED_COMMENT (10) #define END_OF_DATA (11) @@ -397,7 +397,7 @@ JB2Dict::JB2Codec::JB2Codec(const bool xencoding) abs_size_x(0), abs_size_y(0), image_size_dist(0), - inherited_shape_count_dist(0), + inherited_tqshape_count_dist(0), offset_type_dist(0), rel_loc_x_current(0), rel_loc_x_last(0), @@ -428,7 +428,7 @@ JB2Dict::JB2Codec::reset_numcoder() abs_size_x = 0; abs_size_y = 0; image_size_dist = 0; - inherited_shape_count_dist = 0; + inherited_tqshape_count_dist = 0; rel_loc_x_current = 0; rel_loc_x_last = 0; rel_loc_y_current = 0; @@ -573,27 +573,27 @@ JB2Dict::JB2Codec::Decode::code_comment(GUTF8String &comment) void JB2Dict::JB2Codec::init_library(JB2Dict &jim) { - int nshape = jim.get_inherited_shape_count(); - shape2lib.resize(0,nshape-1); - lib2shape.resize(0,nshape-1); - libinfo.resize(0,nshape-1); - for (int i=0; i<nshape; i++) + int ntqshape = jim.get_inherited_tqshape_count(); + tqshape2lib.resize(0,ntqshape-1); + lib2tqshape.resize(0,ntqshape-1); + libinfo.resize(0,ntqshape-1); + for (int i=0; i<ntqshape; i++) { - shape2lib[i] = i; - lib2shape[i] = i; - JB2Shape &jshp = jim.get_shape(i); + tqshape2lib[i] = i; + lib2tqshape[i] = i; + JB2Shape &jshp = jim.get_tqshape(i); libinfo[i].compute_bounding_box(*(jshp.bits)); } } int -JB2Dict::JB2Codec::add_library(const int shapeno, JB2Shape &jshp) +JB2Dict::JB2Codec::add_library(const int tqshapeno, JB2Shape &jshp) { - const int libno = lib2shape.hbound() + 1; - lib2shape.touch(libno); - lib2shape[libno] = shapeno; - shape2lib.touch(shapeno); - shape2lib[shapeno] = libno; + const int libno = lib2tqshape.hbound() + 1; + lib2tqshape.touch(libno); + lib2tqshape[libno] = tqshapeno; + tqshape2lib.touch(tqshapeno); + tqshape2lib[tqshapeno] = libno; libinfo.touch(libno); libinfo[libno].compute_bounding_box(*(jshp.bits)); return libno; @@ -611,8 +611,8 @@ JB2Dict::JB2Codec::Decode::code_record_type(int &rectype) int JB2Dict::JB2Codec::Decode::code_match_index(int &index, JB2Dict &) { - int match=CodeNum(0, lib2shape.hbound(), dist_match_index); - index = lib2shape[match]; + int match=CodeNum(0, lib2tqshape.hbound(), dist_match_index); + index = lib2tqshape[match]; return match; } @@ -638,9 +638,9 @@ JB2Dict::JB2Codec::update_short_list(const int v) void -JB2Dict::JB2Codec::Decode::code_inherited_shape_count(JB2Dict &jim) +JB2Dict::JB2Codec::Decode::code_inherited_tqshape_count(JB2Dict &jim) { - int size=CodeNum(0, BIGPOSITIVE, inherited_shape_count_dist); + int size=CodeNum(0, BIGPOSITIVE, inherited_tqshape_count_dist); { GP<JB2Dict> dict = jim.get_inherited_dict(); if (!dict && size>0) @@ -653,7 +653,7 @@ JB2Dict::JB2Codec::Decode::code_inherited_shape_count(JB2Dict &jim) } if (!dict && size>0) G_THROW( ERR_MSG("JB2Image.need_dict") ); - if (dict && size!=dict->get_shape_count()) + if (dict && size!=dict->get_tqshape_count()) G_THROW( ERR_MSG("JB2Image.bad_dict") ); } } @@ -927,7 +927,7 @@ JB2Dict::JB2Codec::code_record( { GP<GBitmap> cbm; GP<GBitmap> bm; - int shapeno = -1; + int tqshapeno = -1; // Code record type code_record_type(rectype); @@ -946,7 +946,7 @@ JB2Dict::JB2Codec::code_record( if (!encoding) { jshp.bits = GBitmap::create(); - jshp.parent = -1; + jshp.tqparent = -1; } bm = jshp.bits; break; @@ -982,11 +982,11 @@ JB2Dict::JB2Codec::code_record( } JB2Dict &jim=*gjim; JB2Shape &jshp=*xjshp; - int match = code_match_index (jshp.parent, jim); - cbm = jim.get_shape(jshp.parent).bits; + int match = code_match_index (jshp.tqparent, jim); + cbm = jim.get_tqshape(jshp.tqparent).bits; LibRect &l = libinfo[match]; code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4); - code_bitmap_by_cross_coding (*bm, cbm, jshp.parent); + code_bitmap_by_cross_coding (*bm, cbm, jshp.tqparent); break; } case PRESERVED_COMMENT: @@ -999,16 +999,16 @@ JB2Dict::JB2Codec::code_record( code_comment(jim.comment); break; } - case REQUIRED_DICT_OR_RESET: + case RETQUIRED_DICT_OR_RESET: { if (! gotstartrecordp) { - // Indicates need for a shape dictionary + // Indicates need for a tqshape dictionary if(!gjim) { G_THROW( ERR_MSG("JB2Image.bad_number") ); } - code_inherited_shape_count(*gjim); + code_inherited_tqshape_count(*gjim); }else // Reset all numerical contexts to zero reset_numcoder(); @@ -1026,7 +1026,7 @@ JB2Dict::JB2Codec::code_record( // Post-coding action if (!encoding) { - // add shape to dictionary + // add tqshape to dictionary switch(rectype) { case NEW_MARK_LIBRARY_ONLY: @@ -1037,8 +1037,8 @@ JB2Dict::JB2Codec::code_record( G_THROW( ERR_MSG("JB2Image.bad_number") ); } JB2Shape &jshp=*xjshp; - shapeno = gjim->add_shape(jshp); - add_library(shapeno, jshp); + tqshapeno = gjim->add_tqshape(jshp); + add_library(tqshapeno, jshp); break; } } @@ -1064,10 +1064,10 @@ JB2Dict::JB2Codec::Decode::code(const GP<JB2Dict> &gjim) // THIS IS THE DECODING PART // ------------------------- int rectype; - JB2Shape tmpshape; + JB2Shape tmptqshape; do { - code_record(rectype, gjim, &tmpshape); + code_record(rectype, gjim, &tmptqshape); } while(rectype != END_OF_DATA); if (!gotstartrecordp) @@ -1085,7 +1085,7 @@ JB2Dict::JB2Codec::code_record( { GP<GBitmap> bm; GP<GBitmap> cbm; - int shapeno = -1; + int tqshapeno = -1; int match; // Code record type @@ -1110,9 +1110,9 @@ JB2Dict::JB2Codec::code_record( if (!encoding) { jshp.bits = GBitmap::create(); - jshp.parent = -1; + jshp.tqparent = -1; if (rectype == NON_MARK_DATA) - jshp.parent = -2; + jshp.tqparent = -2; } bm = jshp.bits; break; @@ -1162,8 +1162,8 @@ JB2Dict::JB2Codec::code_record( } JB2Shape &jshp=*xjshp; JB2Image &jim=*gjim; - match = code_match_index (jshp.parent, jim); - cbm = jim.get_shape(jshp.parent).bits; + match = code_match_index (jshp.tqparent, jim); + cbm = jim.get_tqshape(jshp.tqparent).bits; LibRect &l = libinfo[match]; code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4); code_bitmap_by_cross_coding (*bm, cbm, match); @@ -1178,8 +1178,8 @@ JB2Dict::JB2Codec::code_record( } JB2Image &jim=*gjim; JB2Shape &jshp=*xjshp; - match = code_match_index (jshp.parent, jim); - cbm = jim.get_shape(jshp.parent).bits; + match = code_match_index (jshp.tqparent, jim); + cbm = jim.get_tqshape(jshp.tqparent).bits; LibRect &l = libinfo[match]; code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4); break; @@ -1192,8 +1192,8 @@ JB2Dict::JB2Codec::code_record( } JB2Image &jim=*gjim; JB2Shape &jshp=*xjshp; - match = code_match_index (jshp.parent, jim); - cbm = jim.get_shape(jshp.parent).bits; + match = code_match_index (jshp.tqparent, jim); + cbm = jim.get_tqshape(jshp.tqparent).bits; LibRect &l = libinfo[match]; code_relative_mark_size (*bm, l.right-l.left+1, l.top-l.bottom+1, 4); code_bitmap_by_cross_coding (*bm, cbm, match); @@ -1203,15 +1203,15 @@ JB2Dict::JB2Codec::code_record( case MATCHED_COPY: { int temp; - if (encoding) temp = jblt->shapeno; + if (encoding) temp = jblt->tqshapeno; if(!gjim) { G_THROW( ERR_MSG("JB2Image.bad_number") ); } JB2Image &jim=*gjim; match = code_match_index (temp, jim); - if (!encoding) jblt->shapeno = temp; - bm = jim.get_shape(jblt->shapeno).bits; + if (!encoding) jblt->tqshapeno = temp; + bm = jim.get_tqshape(jblt->tqshapeno).bits; LibRect &l = libinfo[match]; jblt->left += l.left; jblt->bottom += l.bottom; @@ -1240,7 +1240,7 @@ JB2Dict::JB2Codec::code_record( code_comment(jim.comment); break; } - case REQUIRED_DICT_OR_RESET: + case RETQUIRED_DICT_OR_RESET: { if(!gjim) { @@ -1248,8 +1248,8 @@ JB2Dict::JB2Codec::code_record( } JB2Image &jim=*gjim; if (! gotstartrecordp) - // Indicates need for a shape dictionary - code_inherited_shape_count(jim); + // Indicates need for a tqshape dictionary + code_inherited_tqshape_count(jim); else // Reset all numerical contexts to zero reset_numcoder(); @@ -1268,7 +1268,7 @@ JB2Dict::JB2Codec::code_record( // Post-coding action if (!encoding) { - // add shape to image + // add tqshape to image switch(rectype) { case NEW_MARK: @@ -1284,13 +1284,13 @@ JB2Dict::JB2Codec::code_record( G_THROW( ERR_MSG("JB2Image.bad_number") ); } JB2Shape &jshp=*xjshp; - shapeno = gjim->add_shape(jshp); - shape2lib.touch(shapeno); - shape2lib[shapeno] = -1; + tqshapeno = gjim->add_tqshape(jshp); + tqshape2lib.touch(tqshapeno); + tqshape2lib[tqshapeno] = -1; break; } } - // add shape to library + // add tqshape to library switch(rectype) { case NEW_MARK: @@ -1301,7 +1301,7 @@ JB2Dict::JB2Codec::code_record( { G_THROW( ERR_MSG("JB2Image.bad_number") ); } - add_library(shapeno, *xjshp); + add_library(tqshapeno, *xjshp); break; } // make sure everything is compacted @@ -1316,7 +1316,7 @@ JB2Dict::JB2Codec::code_record( case MATCHED_REFINE: case MATCHED_REFINE_IMAGE_ONLY: case NON_MARK_DATA: - jblt->shapeno = shapeno; + jblt->tqshapeno = tqshapeno; case MATCHED_COPY: if(!gjim) { @@ -1344,10 +1344,10 @@ JB2Dict::JB2Codec::Decode::code(const GP<JB2Image> &gjim) // ------------------------- int rectype; JB2Blit tmpblit; - JB2Shape tmpshape; + JB2Shape tmptqshape; do { - code_record(rectype, gjim, &tmpshape, &tmpblit); + code_record(rectype, gjim, &tmptqshape, &tmpblit); } while(rectype!=END_OF_DATA); if (!gotstartrecordp) diff --git a/kviewshell/plugins/djvu/libdjvu/JB2Image.h b/kviewshell/plugins/djvu/libdjvu/JB2Image.h index f55ae451..95b7bf26 100644 --- a/kviewshell/plugins/djvu/libdjvu/JB2Image.h +++ b/kviewshell/plugins/djvu/libdjvu/JB2Image.h @@ -83,47 +83,47 @@ be implemented in the future. {\bf JB2 Images} --- Class \Ref{JB2Image} is the central data structure - implemented here. A #JB2Image# is composed of an array of shapes - and an array of blits. Each shape contains a small bitmap representing an + implemented here. A #JB2Image# is composed of an array of tqshapes + and an array of blits. Each tqshape contains a small bitmap representing an elementary blob of ink, such as a character or a segment of line art. - Each blit instructs the decoder to render a particular shape at a + Each blit instructs the decoder to render a particular tqshape at a specified position in the image. Some compression is already achieved - because several blits can refer to the same shape. A shape can also - contain a pointer to a parent shape. Additional compression is achieved - when both shapes are similar because each shape is encoded using the - parent shape as a model. A #"O"# shape for instance could be a parent for - both a #"C"# shape and a #"Q"# shape. + because several blits can refer to the same tqshape. A tqshape can also + contain a pointer to a tqparent tqshape. Additional compression is achieved + when both tqshapes are similar because each tqshape is encoded using the + tqparent tqshape as a model. A #"O"# tqshape for instance could be a tqparent for + both a #"C"# tqshape and a #"Q"# tqshape. {\bf JB2 Dictionary} --- Class \Ref{JB2Dict} is a peculiar kind of - JB2Image which only contains an array of shapes. These shapes can be + JB2Image which only contains an array of tqshapes. These tqshapes can be referenced from another JB2Dict/JB2Image. This is arranged by setting the ``inherited dictionary'' of a JB2Dict/JB2Image using function - \Ref{JB2Dict::set_inherited_dict}. Several JB2Images can use shapes from a + \Ref{JB2Dict::set_inherited_dict}. Several JB2Images can use tqshapes from a same JB2Dict encoded separately. This is how several pages of a same document can share information. {\bf Decoding JB2 data} --- The first step for decoding JB2 data consists of creating an empty #JB2Image# object. Function \Ref{JB2Image::decode} then - reads the data and populates the #JB2Image# with the shapes and the blits. + reads the data and populates the #JB2Image# with the tqshapes and the blits. Function \Ref{JB2Image::get_bitmap} finally produces an anti-aliased image. {\bf Encoding JB2 data} --- The first step for decoding JB2 data also consists of creating an empty #JB2Image# object. You must then use - functions \Ref{JB2Image::add_shape} and \Ref{JB2Image::add_blit} to + functions \Ref{JB2Image::add_tqshape} and \Ref{JB2Image::add_blit} to populate the #JB2Image# object. Function \Ref{JB2Image::encode} finally produces the JB2 data. Function #encode# sequentially encodes the blits - and the necessary shapes. The compression ratio depends on several + and the necessary tqshapes. The compression ratio depends on several factors: \begin{itemize} - \item Blits should reuse shapes as often as possible. + \item Blits should reuse tqshapes as often as possible. \item Blits should be sorted in reading order because this facilitates the prediction of the blit coordinates. \item Shapes should be sorted according to the order of first appearance in the sequence of blits because this facilitates the prediction of the - shape indices. - \item Shapes should be compared to all previous shapes in the shape array. - The shape parent pointer should be set to a suitable parent shape if - such a parent shape exists. The parent shape should have almost the + tqshape indices. + \item Shapes should be compared to all previous tqshapes in the tqshape array. + The tqshape tqparent pointer should be set to a suitable tqparent tqshape if + such a tqparent tqshape exists. The tqparent tqshape should have almost the same size and the same pixels. \end{itemize} All this is quite easy to achieve in the case of an electronically @@ -131,16 +131,16 @@ characters are and where they are located. If you only have a scanned image however you must first locate the characters (connected component analysis) and cut the remaining pieces of ink into smaller blobs. - Ordering the blits and matching the shapes is then an essentially + Ordering the blits and matching the tqshapes is then an essentially heuristic process. Although the quality of the heuristics substantially - effects the file size, misordering blits or mismatching shapes never + effects the file size, misordering blits or mismatching tqshapes never effects the quality of the image. The last refinement consists in - smoothing the shapes in order to reduce the noise and maximize the - similarities between shapes. + smoothing the tqshapes in order to reduce the noise and maximize the + similarities between tqshapes. {\bf JB2 extensions} --- Two extensions of the JB2 encoding format have been introduced with DjVu files version 21. The first - extension addresses the shared shape dictionaries. The second extension + extension addresses the shared tqshape dictionaries. The second extension bounds the number of probability contexts used for coding numbers. Both extensions maintain backward compatibility with JB2 as described in the ICFDD proposal. A more complete discussion @@ -190,42 +190,42 @@ class ByteStream; /** Blit data structure. A #JB2Image# contains an array of #JB2Blit# data structures. Each array entry instructs the decoder to render a particular - shape at a particular location. Members #left# and #bottom# specify the - coordinates of the bottom left corner of the shape bitmap. All + tqshape at a particular location. Members #left# and #bottom# specify the + coordinates of the bottom left corner of the tqshape bitmap. All coordinates are relative to the bottom left corner of the image. Member - #shapeno# is the subscript of the shape to be rendered. */ + #tqshapeno# is the subscript of the tqshape to be rendered. */ class JB2Blit { public: - /** Horizontal coordinate of the blit. */ + /**Qt::Horizontal coordinate of the blit. */ unsigned short left; - /** Vertical coordinate of the blit. */ + /**Qt::Vertical coordinate of the blit. */ unsigned short bottom; - /** Index of the shape to blit. */ - unsigned int shapeno; + /** Index of the tqshape to blit. */ + unsigned int tqshapeno; }; /** Shape data structure. A #JB2Image# contains an array of #JB2Shape# data structures. Each array entry represents an elementary blob of ink such as a character or a segment of line art. Member #bits# points to a bilevel - image representing the shape pixels. Member #parent# is the subscript of - the parent shape. */ + image representing the tqshape pixels. Member #tqparent# is the subscript of + the tqparent tqshape. */ class JB2Shape { public: - /** Subscript of the parent shape. The parent shape must always be located - before the current shape in the shape array. A negative value indicates - that this shape has no parent. Any negative values smaller than #-1# - further indicates that this shape does not look like a character. This + /** Subscript of the tqparent tqshape. The tqparent tqshape must always be located + before the current tqshape in the tqshape array. A negative value indicates + that this shape.has no tqparent. Any negative values smaller than #-1# + further indicates that this tqshape does not look like a character. This is used to enable a few internal optimizations. This information is - saved into the JB2 file, but the actual value of the #parent# variable + saved into the JB2 file, but the actual value of the #tqparent# variable is not. */ - int parent; - /** Bilevel image of the shape pixels. This must be a pointer to a bilevel + int tqparent; + /** Bilevel image of the tqshape pixels. This must be a pointer to a bilevel #GBitmap# image. This pointer can also be null. The encoder will just - silently discard all blits referring to a shape containing a null + silently discard all blits referring to a tqshape containing a null bitmap. */ GP<GBitmap> bits; /** Private user data. This long word is provided as a convenience for users @@ -238,14 +238,14 @@ public: /** JB2 Dictionary callback. The decoding function call this callback function when they discover that - the current JB2Image or JB2Dict needs a pre-existing shape dictionary. + the current JB2Image or JB2Dict needs a pre-existing tqshape dictionary. The callback function must return a pointer to the dictionary or NULL if none is found. */ typedef GP<JB2Dict> JB2DecoderCallback ( void* ); -/** Dictionary of JB2 shapes. */ +/** Dictionary of JB2 tqshapes. */ class JB2Dict : public GPEnabled { @@ -257,43 +257,43 @@ public: // CONSTRUCTION /** Default creator. Constructs an empty #JB2Dict# object. You can then call the decoding function #decode#. You can also manually set the - image size using #add_shape#. */ + image size using #add_tqshape#. */ static GP<JB2Dict> create(void); // INITIALIZATION - /** Resets the #JB2Image# object. This function reinitializes both the shape + /** Resets the #JB2Image# object. This function reinitializes both the tqshape and the blit arrays. All allocated memory is freed. */ void init(void); // INHERITED /** Returns the inherited dictionary. */ GP<JB2Dict> get_inherited_dict(void) const; - /** Returns the number of inherited shapes. */ - int get_inherited_shape_count(void) const; + /** Returns the number of inherited tqshapes. */ + int get_inherited_tqshape_count(void) const; /** Sets the inherited dictionary. */ void set_inherited_dict(const GP<JB2Dict> &dict); // ACCESSING THE SHAPE LIBRARY - /** Returns the total number of shapes. - Shape indices range from #0# to #get_shape_count()-1#. */ - int get_shape_count(void) const; - /** Returns a pointer to shape #shapeno#. - The returned pointer directly points into the shape array. - This pointer can be used for reading or writing the shape data. */ - JB2Shape &get_shape(const int shapeno); - /** Returns a constant pointer to shape #shapeno#. - The returned pointer directly points into the shape array. - This pointer can only be used for reading the shape data. */ - const JB2Shape &get_shape(const int shapeno) const; - /** Appends a shape to the shape array. This function appends a copy of - shape #shape# to the shape array and returns the subscript of the new - shape. The subscript of the parent shape #shape.parent# must - actually designate an already existing shape. */ - int add_shape(const JB2Shape &shape); + /** Returns the total number of tqshapes. + Shape indices range from #0# to #get_tqshape_count()-1#. */ + int get_tqshape_count(void) const; + /** Returns a pointer to tqshape #tqshapeno#. + The returned pointer directly points into the tqshape array. + This pointer can be used for reading or writing the tqshape data. */ + JB2Shape &get_tqshape(const int tqshapeno); + /** Returns a constant pointer to tqshape #tqshapeno#. + The returned pointer directly points into the tqshape array. + This pointer can only be used for reading the tqshape data. */ + const JB2Shape &get_tqshape(const int tqshapeno) const; + /** Appends a tqshape to the tqshape array. This function appends a copy of + tqshape #tqshape# to the tqshape array and returns the subscript of the new + tqshape. The subscript of the tqparent tqshape #tqshape.tqparent# must + actually designate an already existing tqshape. */ + int add_tqshape(const JB2Shape &tqshape); // MEMORY OPTIMIZATION - /** Compresses all shape bitmaps. This function reduces the memory required - by the #JB2Image# by calling \Ref{GBitmap::compress} on all shapes + /** Compresses all tqshape bitmaps. This function reduces the memory required + by the #JB2Image# by calling \Ref{GBitmap::compress} on all tqshapes bitmaps. This function is best called after decoding a #JB2Image#, because function \Ref{get_bitmap} can directly use the compressed bitmaps. */ @@ -307,9 +307,9 @@ public: This function generates the JB2 data stream without any header. */ void encode(const GP<ByteStream> &gbs) const; /** Decodes JB2 data from ByteStream #bs#. This function decodes the image - size and populates the shape and blit arrays. The callback function + size and populates the tqshape and blit arrays. The callback function #cb# is called when the decoder determines that the ByteStream data - requires a shape dictionary which has not been set with + requires a tqshape dictionary which has not been set with \Ref{JB2Dict::set_inherited_dict}. The callback receives argument #arg# and must return a suitable dictionary which will be installed as the inherited dictionary. The callback should return null if no such @@ -322,15 +322,15 @@ public: GUTF8String comment; private: - int inherited_shapes; + int inherited_tqshapes; GP<JB2Dict> inherited_dict; - GArray<JB2Shape> shapes; + GArray<JB2Shape> tqshapes; }; -/** Main JB2 data structure. Each #JB2Image# consists of an array of shapes +/** Main JB2 data structure. Each #JB2Image# consists of an array of tqshapes and an array of blits. These arrays can be populated by hand using - functions \Ref{add_shape} and \Ref{add_blit}, or by decoding JB2 data + functions \Ref{add_tqshape} and \Ref{add_blit}, or by decoding JB2 data using function \Ref{decode}. You can then use function \Ref{get_bitmap} to render anti-aliased images, or use function \Ref{encode} to generate JB2 data. */ @@ -343,12 +343,12 @@ public: /** Creates an empty #JB2Image# object. You can then call the decoding function #decode#. You can also manually set the - image size using #set_dimension# and populate the shape and blit arrays - using #add_shape# and #add_blit#. */ + image size using #set_dimension# and populate the tqshape and blit arrays + using #add_tqshape# and #add_blit#. */ static GP<JB2Image> create(void) { return new JB2Image(); } // INITIALIZATION - /** Resets the #JB2Image# object. This function reinitializes both the shape + /** Resets the #JB2Image# object. This function reinitializes both the tqshape and the blit arrays. All allocated memory is freed. */ void init(void); @@ -370,7 +370,7 @@ public: JB2Image as a bilevel or gray level image. Argument #subsample# specifies the desired subsampling ratio in range #1# to #15#. The returned image uses #1+subsample^2# gray levels for representing - anti-aliased edges. Argument #align# specified the alignment of the + anti-aliased edges. Argument #align# specified the tqalignment of the rows of the returned images. Setting #align# to #4#, for instance, will adjust the bitmap border in order to make sure that each row of the returned image starts on a word (four byte) boundary. */ @@ -380,7 +380,7 @@ public: this function first renders the full JB2Image with subsampling ratio #subsample# and then extracts rectangle #rect# in the subsampled image. Both operations of course are efficiently performed simultaneously. - Argument #align# specified the alignment of the rows of the returned + Argument #align# specified the tqalignment of the rows of the returned images, as explained above. Argument #dispy# should remain null. */ GP<GBitmap> get_bitmap(const GRect &rect, int subsample=1, int align=1, int dispy=0) const; @@ -393,13 +393,13 @@ public: This pointer can be used for reading or writing the blit data. */ JB2Blit *get_blit(int blitno); /** Returns a constant pointer to blit #blitno#. - The returned pointer directly points into the shape array. - This pointer can only be used for reading the shape data. */ + The returned pointer directly points into the tqshape array. + This pointer can only be used for reading the tqshape data. */ const JB2Blit *get_blit(int blitno) const; /** Appends a blit to the blit array. This function appends a copy of blit #blit# to the blit array and returns the subscript of the new blit. The - shape subscript #blit.shapeno# must actually designate an already - existing shape. */ + tqshape subscript #blit.tqshapeno# must actually designate an already + existing tqshape. */ int add_blit(const JB2Blit &blit); // MEMORY OPTIMIZATION @@ -412,9 +412,9 @@ public: This function generates the JB2 data stream without any header. */ void encode(const GP<ByteStream> &gbs) const; /** Decodes JB2 data from ByteStream #bs#. This function decodes the image - size and populates the shape and blit arrays. The callback function + size and populates the tqshape and blit arrays. The callback function #cb# is called when the decoder determines that the ByteStream data - requires a shape dictionary which has not been set with + requires a tqshape dictionary which has not been set with \Ref{JB2Dict::set_inherited_dict}. The callback receives argument #arg# and must return a suitable dictionary which will be installed as the inherited dictionary. The callback should return null if no such @@ -438,15 +438,15 @@ public: // JB2DICT INLINE FUNCTIONS inline int -JB2Dict::get_shape_count(void) const +JB2Dict::get_tqshape_count(void) const { - return inherited_shapes + shapes.size(); + return inherited_tqshapes + tqshapes.size(); } inline int -JB2Dict::get_inherited_shape_count(void) const +JB2Dict::get_inherited_tqshape_count(void) const { - return inherited_shapes; + return inherited_tqshapes; } inline GP<JB2Dict> @@ -501,7 +501,7 @@ JB2Image::get_blit(int blitno) const These extensions are described below by reference to the ICFDD proposal dated August 1999. Both extension make use of the unused record type value #9# (cf. ICFDD page 24) which has been renamed - #REQUIRED_DICT_OR_RESET#. + #RETQUIRED_DICT_OR_RESET#. {\bf Shared Shape Dictionaries} --- This extension provides support for sharing symbol definitions between the pages of a @@ -515,7 +515,7 @@ JB2Image::get_blit(int blitno) const by the following records. The first record usually is a ``Start Of Image'' record describing the size of the image. - Starting with version 21, a #REQUIRED_DICT_OR_RESET# (9) record + Starting with version 21, a #RETQUIRED_DICT_OR_RESET# (9) record type can appear {\em before} the #START_OF_DATA# (0) record. The record type field is followed by a single number arithmetically encoded (cf. ICFDD page 26) using a sixteenth context (cf. ICFDD @@ -548,7 +548,7 @@ JB2Image::get_blit(int blitno) const contexts. These contexts are normally allocated when they are used for the first time (cf. ICFDD informative note, page 27). - Starting with version 21, a #REQUIRED_DICT_OR_RESET# (9) record + Starting with version 21, a #RETQUIRED_DICT_OR_RESET# (9) record type can appear {\em after} the #START_OF_DATA# (0) record. The decoder should proceed with the next record after {\em clearing all binary contexts used for coding numbers}. This operation @@ -556,7 +556,7 @@ JB2Image::get_blit(int blitno) const numbers can be deallocated. Starting with version 21, the JB2 encoder should insert a - #REQUIRED_DICT_OR_RESET# record type whenever the number of these + #RETQUIRED_DICT_OR_RESET# record type whenever the number of these allocated binary contexts exceeds #20000#. Only very large documents ever reach such a large number of allocated binary contexts (e.g large maps). Hardware implementation however can @@ -612,7 +612,7 @@ protected: void reset_numcoder(void); inline void code_eventual_lossless_refinement(void); void init_library(JB2Dict &jim); - int add_library(const int shapeno, JB2Shape &jshp); + int add_library(const int tqshapeno, JB2Shape &jshp); void code_relative_location(JB2Blit *jblt, int rows, int columns); void code_bitmap_directly (GBitmap &bm); void code_bitmap_by_cross_coding (GBitmap &bm, GP<GBitmap> &cbm, const int libno); @@ -640,7 +640,7 @@ protected: virtual void code_comment(GUTF8String &comment) = 0; virtual void code_record_type(int &rectype) = 0; virtual int code_match_index(int &index, JB2Dict &jim)=0; - virtual void code_inherited_shape_count(JB2Dict &jim)=0; + virtual void code_inherited_tqshape_count(JB2Dict &jim)=0; virtual void code_image_size(JB2Dict &jim); virtual void code_image_size(JB2Image &jim); virtual void code_absolute_location(JB2Blit *jblt, int rows, int columns)=0; @@ -678,8 +678,8 @@ protected: NumContext dist_match_index; BitContext dist_refinement_flag; // Library - GTArray<int> shape2lib; - GTArray<int> lib2shape; + GTArray<int> tqshape2lib; + GTArray<int> lib2tqshape; GTArray<LibRect> libinfo; // Code pairs NumContext abs_loc_x; @@ -687,7 +687,7 @@ protected: NumContext abs_size_x; NumContext abs_size_y; NumContext image_size_dist; - NumContext inherited_shape_count_dist; + NumContext inherited_tqshape_count_dist; BitContext offset_type_dist; NumContext rel_loc_x_current; NumContext rel_loc_x_last; diff --git a/kviewshell/plugins/djvu/libdjvu/MMRDecoder.cpp b/kviewshell/plugins/djvu/libdjvu/MMRDecoder.cpp index b14220d1..eace389e 100644 --- a/kviewshell/plugins/djvu/libdjvu/MMRDecoder.cpp +++ b/kviewshell/plugins/djvu/libdjvu/MMRDecoder.cpp @@ -603,7 +603,7 @@ MMRDecoder::scanruns(const unsigned short **endptr) b1 += *pr++; break; } - /* Horizontal Mode */ + /*Qt::Horizontal Mode */ case H: { // First run @@ -617,7 +617,7 @@ MMRDecoder::scanruns(const unsigned short **endptr) *xr = rle; xr++; rle = 0; break; } - /* Vertical Modes */ + /*Qt::Vertical Modes */ case V0: case VR3: case VR2: @@ -933,16 +933,16 @@ MMRDecoder::decode(GP<ByteStream> gbs) // Insert blocks into JB2Image for (int b=0; b<blocksperline; b++) { - JB2Shape shape; - shape.bits = blocks[b]; - if (shape.bits) + JB2Shape tqshape; + tqshape.bits = blocks[b]; + if (tqshape.bits) { - shape.parent = -1; - shape.bits->compress(); + tqshape.tqparent = -1; + tqshape.bits->compress(); JB2Blit blit; blit.left = b*blocksize; blit.bottom = line+1; - blit.shapeno = jimg->add_shape(shape); + blit.tqshapeno = jimg->add_tqshape(tqshape); jimg->add_blit(blit); } } diff --git a/kviewshell/plugins/djvu/libdjvu/MMRDecoder.h b/kviewshell/plugins/djvu/libdjvu/MMRDecoder.h index 6516b4cd..7340bfea 100644 --- a/kviewshell/plugins/djvu/libdjvu/MMRDecoder.h +++ b/kviewshell/plugins/djvu/libdjvu/MMRDecoder.h @@ -81,9 +81,9 @@ class JB2Image; CCITT-G4/MMR decoder suitable for use in DjVu. The main entry point is function \Ref{MMRDecoder::decode}. - The foreground mask layer of a DjVu file is usually encoded with a + The foreground tqmask layer of a DjVu file is usually encoded with a #"Sjbz"# chunk containing JB2 encoded data (cf. \Ref{JB2Image.h}). - Alternatively, the qmask layer may be encoded with a #"Smmr"# + Alternatively, the qtqmask layer may be encoded with a #"Smmr"# chunk containing a small header followed by MMR encoded data. This encoding scheme produces significantly larger files. On the other hand, many scanners a printers talk MMR using very efficient diff --git a/kviewshell/plugins/djvu/libdjvu/XMLParser.cpp b/kviewshell/plugins/djvu/libdjvu/XMLParser.cpp index b1d9f469..b936affb 100644 --- a/kviewshell/plugins/djvu/libdjvu/XMLParser.cpp +++ b/kviewshell/plugins/djvu/libdjvu/XMLParser.cpp @@ -301,7 +301,7 @@ lt_XMLParser::Impl::ChangeAnno( const GP<DjVuAnno> ganno(DjVuAnno::create()); DjVuAnno &anno=*ganno; GPosition map_pos; - map_pos=map.contains(areatag); + map_pos=map.tqcontains(areatag); if(dfile.contains_anno()) { GP<ByteStream> annobs=dfile.get_merged_anno(); @@ -350,7 +350,7 @@ lt_XMLParser::Impl::ChangeAnno( // with no matching y). // ****************************************************** { - GPosition coords_pos=args.contains("coords"); + GPosition coords_pos=args.tqcontains("coords"); if(coords_pos) { GList<int> raw_coords; @@ -373,20 +373,20 @@ lt_XMLParser::Impl::ChangeAnno( } } } - GUTF8String shape; + GUTF8String tqshape; { - GPosition shape_pos=args.contains("shape"); - if(shape_pos) + GPosition tqshape_pos=args.tqcontains("tqshape"); + if(tqshape_pos) { - shape=args[shape_pos]; + tqshape=args[tqshape_pos]; } } GP<GMapArea> a; - if(shape == "default") + if(tqshape == "default") { GRect rect(0,0,w,h); a=GMapRect::create(rect); - }else if(!shape.length() || shape == "rect") + }else if(!tqshape.length() || tqshape == "rect") { int xx[4]; int i=0; @@ -420,7 +420,7 @@ lt_XMLParser::Impl::ChangeAnno( } GRect rect(xmin,ymin,xmax-xmin,ymax-ymin); a=GMapRect::create(rect); - }else if(shape == "circle") + }else if(tqshape == "circle") { int xx[4]; int i=0; @@ -440,7 +440,7 @@ lt_XMLParser::Impl::ChangeAnno( int x=xx[0],y=xx[1],rx=xx[2],ry=(h-xx[3])-1; GRect rect(x-rx,y-ry,2*rx,2*ry); a=GMapOval::create(rect); - }else if(shape == "oval") + }else if(tqshape == "oval") { int xx[4]; int i=0; @@ -474,7 +474,7 @@ lt_XMLParser::Impl::ChangeAnno( } GRect rect(xmin,ymin,xmax-xmin,ymax-ymin); a=GMapOval::create(rect); - }else if(shape == "poly") + }else if(tqshape == "poly") { GP<GMapPoly> p=GMapPoly::create(); for(GPosition poly_pos=coords;poly_pos;++poly_pos) @@ -489,28 +489,28 @@ lt_XMLParser::Impl::ChangeAnno( a=p; }else { - G_THROW( ( ERR_MSG("XMLAnno.unknown_shape") "\t")+shape ); + G_THROW( ( ERR_MSG("XMLAnno.unknown_tqshape") "\t")+tqshape ); } if(a) { GPosition pos; - if((pos=args.contains("href"))) + if((pos=args.tqcontains("href"))) { a->url=args[pos]; } - if((pos=args.contains("target"))) + if((pos=args.tqcontains("target"))) { a->target=args[pos]; } - if((pos=args.contains("alt"))) + if((pos=args.tqcontains("alt"))) { a->comment=args[pos]; } - if((pos=args.contains("bordertype"))) + if((pos=args.tqcontains("bordertype"))) { GUTF8String b=args[pos]; static const GMap<GUTF8String,GMapArea::BorderType> typeMap=BorderTypeMap(); - if((pos=typeMap.contains(b))) + if((pos=typeMap.tqcontains(b))) { a->border_type=typeMap[pos]; }else @@ -518,16 +518,16 @@ lt_XMLParser::Impl::ChangeAnno( G_THROW( (ERR_MSG("XMLAnno.unknown_border") "\t")+b ); } } - a->border_always_visible=!!args.contains("visible"); - if((pos=args.contains("bordercolor"))) + a->border_always_visible=!!args.tqcontains("visible"); + if((pos=args.tqcontains("bordercolor"))) { a->border_color=convertToColor(args[pos]); } - if((pos=args.contains("highlight"))) + if((pos=args.tqcontains("highlight"))) { a->hilite_color=convertToColor(args[pos]); } - if((pos=args.contains("border"))) + if((pos=args.tqcontains("border"))) { a->border_width=args[pos].toInt(); //atoi(args[pos]); } @@ -548,7 +548,7 @@ lt_XMLParser::Impl::get_file(const GURL &url,GUTF8String id) GP<DjVuDocument> doc; GCriticalSectionLock lock(&xmlparser_lock); { - GPosition pos=m_docs.contains(url.get_string()); + GPosition pos=m_docs.tqcontains(url.get_string()); if(pos) { doc=m_docs[pos]; @@ -572,10 +572,10 @@ lt_XMLParser::Impl::get_file(const GURL &url,GUTF8String id) } } const GURL fileurl(doc->id_to_url(id)); - GPosition dpos(m_files.contains(fileurl.get_string())); + GPosition dpos(m_files.tqcontains(fileurl.get_string())); if(!dpos) { - if(!doc->get_id_list().contains(id)) + if(!doc->get_id_list().tqcontains(id)) { G_THROW( ERR_MSG("XMLAnno.bad_page") ); } @@ -622,7 +622,7 @@ lt_XMLParser::Impl::parse(const lt_XMLTags &tags) GURL codebase; { DEBUG_MSG("Setting up codebase... m_codebase = " << m_codebase << "\n"); - GPosition codebasePos=args.contains("codebase"); + GPosition codebasePos=args.tqcontains("codebase"); // If user specified a codebase attribute, assume it is correct (absolute URL): // the GURL constructor will throw an exception if it isn't if(codebasePos) @@ -642,11 +642,11 @@ lt_XMLParser::Impl::parse(const lt_XMLTags &tags) // URL (for now, just a path and file name). If it's absolute, // our GURL will adequately wrap it. If it's relative, we need // to use the codebase attribute to form an absolute URL first. - GPosition datapos=args.contains("data"); + GPosition datapos=args.tqcontains("data"); if(datapos) { bool isDjVuType=false; - GPosition typePos(args.contains("type")); + GPosition typePos(args.tqcontains("type")); if(typePos) { if(args[typePos] != mimetype) @@ -659,12 +659,12 @@ lt_XMLParser::Impl::parse(const lt_XMLTags &tags) const GURL url=GURL::UTF8(args[datapos],(args[datapos][0] == '/')?codebase.base():codebase); int width; { - GPosition widthPos=args.contains("width"); + GPosition widthPos=args.tqcontains("width"); width=(widthPos)?args[widthPos].toInt():0; } int height; { - GPosition heightPos=args.contains("height"); + GPosition heightPos=args.tqcontains("height"); height=(heightPos)?args[heightPos].toInt():0; } GUTF8String gamma; @@ -672,17 +672,17 @@ lt_XMLParser::Impl::parse(const lt_XMLTags &tags) GUTF8String page; GUTF8String do_ocr; { - GPosition paramPos(GObject.contains(paramtag)); + GPosition paramPos(GObject.tqcontains(paramtag)); if(paramPos) { const GPList<lt_XMLTags> Params(GObject[paramPos]); for(GPosition loc=Params;loc;++loc) { const GMap<GUTF8String,GUTF8String> &pargs=Params[loc]->get_args(); - GPosition namepos=pargs.contains("name"); + GPosition namepos=pargs.tqcontains("name"); if(namepos) { - GPosition valuepos=pargs.contains("value"); + GPosition valuepos=pargs.tqcontains("value"); if(valuepos) { const GUTF8String name=pargs[namepos].downcase(); @@ -691,19 +691,19 @@ lt_XMLParser::Impl::parse(const lt_XMLTags &tags) { GMap<GUTF8String,GUTF8String> args; lt_XMLTags::ParseValues(value,args,true); - if(args.contains("page")) + if(args.tqcontains("page")) { page=args["page"]; } - if(args.contains("dpi")) + if(args.tqcontains("dpi")) { dpi=args["dpi"]; } - if(args.contains("gamma")) + if(args.tqcontains("gamma")) { gamma=args["gamma"]; } - if(args.contains("ocr")) + if(args.tqcontains("ocr")) { do_ocr=args["ocr"]; } @@ -749,14 +749,14 @@ lt_XMLParser::Impl::parse_anno( { GP<lt_XMLTags> map; { - GPosition usemappos=GObject.get_args().contains("usemap"); + GPosition usemappos=GObject.get_args().tqcontains("usemap"); if(usemappos) { const GUTF8String mapname(GObject.get_args()[usemappos]); - GPosition mappos=Maps.contains(mapname); + GPosition mappos=Maps.tqcontains(mapname); if(!mappos) { - G_THROW((ERR_MSG("XMLAnno.map_find") "\t")+mapname ); + G_THROW((ERR_MSG("XMLAnno.map_tqfind") "\t")+mapname ); }else { map=Maps[mappos]; @@ -782,10 +782,10 @@ static inline TYPE min(TYPE a,TYPE b) { return (a<b)?a:b; } // used to build the zone tree // true is returned if the GRect is known for this object, -// and false, if the rectangle's size is just the parent size. +// and false, if the rectangle's size is just the tqparent size. static bool make_child_layer( - DjVuTXT::Zone &parent, + DjVuTXT::Zone &tqparent, const lt_XMLTags &tag, ByteStream &bs, const int height, const double ws, const double hs) { @@ -799,32 +799,32 @@ make_child_layer( const GUTF8String name(tag.get_name()); if(name == wordtag) { - self_ptr=parent.append_child(); + self_ptr=tqparent.append_child(); self_ptr->ztype = DjVuTXT::WORD; sepchar=' '; }else if(name == linetag) { - self_ptr=parent.append_child(); + self_ptr=tqparent.append_child(); self_ptr->ztype = DjVuTXT::LINE; sepchar=DjVuTXT::end_of_line; }else if(name == paragraphtag) { - self_ptr=parent.append_child(); + self_ptr=tqparent.append_child(); self_ptr->ztype = DjVuTXT::PARAGRAPH; sepchar=DjVuTXT::end_of_paragraph; }else if(name == regiontag) { - self_ptr=parent.append_child(); + self_ptr=tqparent.append_child(); self_ptr->ztype = DjVuTXT::REGION; sepchar=DjVuTXT::end_of_region; }else if(name == pagecolumntag) { - self_ptr=parent.append_child(); + self_ptr=tqparent.append_child(); self_ptr->ztype = DjVuTXT::COLUMN; sepchar=DjVuTXT::end_of_column; }else { - self_ptr = &parent; + self_ptr = &tqparent; self_ptr->ztype = DjVuTXT::PAGE; sepchar=0; } @@ -833,12 +833,12 @@ make_child_layer( int &xmin=self.rect.xmin, &ymin=self.rect.ymin, &xmax=self.rect.xmax, &ymax=self.rect.ymax; GRect default_rect; - default_rect.xmin=max(parent.rect.xmax,parent.rect.xmin); - default_rect.xmax=min(parent.rect.xmax,parent.rect.xmin); - default_rect.ymin=max(parent.rect.ymax,parent.rect.ymin); - default_rect.ymax=min(parent.rect.ymax,parent.rect.ymin); + default_rect.xmin=max(tqparent.rect.xmax,tqparent.rect.xmin); + default_rect.xmax=min(tqparent.rect.xmax,tqparent.rect.xmin); + default_rect.ymin=max(tqparent.rect.ymax,tqparent.rect.ymin); + default_rect.ymax=min(tqparent.rect.ymax,tqparent.rect.ymin); // Now if there are coordinates, use those. - GPosition pos(tag.get_args().contains("coords")); + GPosition pos(tag.get_args().tqcontains("coords")); if(pos) { GList<int> rectArgs; @@ -926,7 +926,7 @@ make_child_layer( }else { // If the child doesn't have coordinates, we need to use a box - // at least as big as the parent's coordinates. + // at least as big as the tqparent's coordinates. xmin=min(save_rect.xmin,default_rect.xmax); xmax=max(save_rect.xmax,default_rect.xmin); ymin=min(save_rect.ymin,default_rect.ymax); @@ -952,10 +952,10 @@ make_child_layer( self.text_length = bs.tell() - self.text_start; } } - parent.rect.xmin=min(xmin,parent.rect.xmin); - parent.rect.ymin=min(ymin,parent.rect.ymin); - parent.rect.xmax=max(xmax,parent.rect.xmax); - parent.rect.ymax=max(ymax,parent.rect.ymax); + tqparent.rect.xmin=min(xmin,tqparent.rect.xmin); + tqparent.rect.ymin=min(ymin,tqparent.rect.ymin); + tqparent.rect.xmax=max(xmax,tqparent.rect.xmax); + tqparent.rect.ymax=max(ymax,tqparent.rect.ymax); if(xmin>xmax) { const int t=xmin; @@ -1029,11 +1029,11 @@ lt_XMLParser::Impl::ChangeText( const int h=info->height; const int w=info->width; txt->page_zone.text_start = 0; - DjVuTXT::Zone &parent=txt->page_zone; - parent.rect.xmin=0; - parent.rect.ymin=0; - parent.rect.ymax=h; - parent.rect.xmax=w; + DjVuTXT::Zone &tqparent=txt->page_zone; + tqparent.rect.xmin=0; + tqparent.rect.ymin=0; + tqparent.rect.ymax=h; + tqparent.rect.xmax=w; double ws=1.0; if(width && width != w) { @@ -1044,7 +1044,7 @@ lt_XMLParser::Impl::ChangeText( { hs=((double)h)/((double)height); } - make_child_layer(parent, tags, *textbs, h, ws,hs); + make_child_layer(tqparent, tags, *textbs, h, ws,hs); textbs->write8(0); long len = textbs->tell(); txt->page_zone.text_length = len; @@ -1062,7 +1062,7 @@ lt_XMLParser::Impl::parse_text( const lt_XMLTags &GObject, DjVuFile &dfile ) { - GPosition textPos = GObject.contains(hiddentexttag); + GPosition textPos = GObject.tqcontains(hiddentexttag); if(textPos) { // loop through the hidden text - there should only be one @@ -1078,7 +1078,7 @@ lt_XMLParser::Impl::parse_meta( const lt_XMLTags &GObject, DjVuFile &dfile ) { - GPosition metaPos = GObject.contains(metadatatag); + GPosition metaPos = GObject.tqcontains(metadatatag); if(metaPos) { // loop through the hidden text - there should only be one diff --git a/kviewshell/plugins/djvu/libdjvu/XMLTags.cpp b/kviewshell/plugins/djvu/libdjvu/XMLTags.cpp index 2511a585..9c1ad58a 100644 --- a/kviewshell/plugins/djvu/libdjvu/XMLTags.cpp +++ b/kviewshell/plugins/djvu/libdjvu/XMLTags.cpp @@ -321,7 +321,7 @@ lt_XMLTags::init(XMLByteStream &xmlbs) GPList<lt_XMLTags> lt_XMLTags::get_Tags(char const tagname[]) const { - GPosition pos=allTags.contains(tagname); + GPosition pos=allTags.tqcontains(tagname); GPList<lt_XMLTags> retval; return (pos?allTags[pos]:retval); } @@ -338,7 +338,7 @@ lt_XMLTags::get_Maps(char const tagname[], if(tag) { GPosition loc; - if((loc=tag->contains(tagname))) + if((loc=tag->tqcontains(tagname))) { GPList<lt_XMLTags> maps=(GPList<lt_XMLTags> &)((*tag)[loc]); for(GPosition mloc=maps;mloc;++mloc) @@ -348,7 +348,7 @@ lt_XMLTags::get_Maps(char const tagname[], { GMap<GUTF8String,GUTF8String> &args=gtag->args; GPosition gpos; - if((gpos=args.contains(argn))) + if((gpos=args.tqcontains(argn))) { map[args[gpos]]=gtag; } diff --git a/kviewshell/plugins/djvu/libdjvu/XMLTags.h b/kviewshell/plugins/djvu/libdjvu/XMLTags.h index 027e629b..df5974d0 100644 --- a/kviewshell/plugins/djvu/libdjvu/XMLTags.h +++ b/kviewshell/plugins/djvu/libdjvu/XMLTags.h @@ -121,7 +121,7 @@ public: inline void addtag(GP<lt_XMLTags> x); inline void addraw(GUTF8String raw); - inline GPosition contains(GUTF8String name) const; + inline GPosition tqcontains(GUTF8String name) const; inline const GPList<lt_XMLTags> & operator [] (const GUTF8String name) const; inline const GPList<lt_XMLTags> & operator [] (const GPosition &pos) const; static void ParseValues(char const *t, GMap<GUTF8String,GUTF8String> &args,bool downcase=true); @@ -213,9 +213,9 @@ inline const GMap<GUTF8String,GPList<lt_XMLTags> > & lt_XMLTags::get_allTags(void) const { return allTags; } inline GPosition -lt_XMLTags::contains(GUTF8String name) const +lt_XMLTags::tqcontains(GUTF8String name) const { - return allTags.contains(name); + return allTags.tqcontains(name); } inline const GPList<lt_XMLTags> & diff --git a/kviewshell/plugins/djvu/libdjvu/ZPCodec.h b/kviewshell/plugins/djvu/libdjvu/ZPCodec.h index 4eba6901..1483b93e 100644 --- a/kviewshell/plugins/djvu/libdjvu/ZPCodec.h +++ b/kviewshell/plugins/djvu/libdjvu/ZPCodec.h @@ -615,7 +615,7 @@ ZPCodec::IWencoder(const bool bit) numbers are much more probable than large numbers. We will first group our numbers into several sets. Each number is coded by first coding which set contains the number and then coding a position within the set. Each - set contains #2^n# numbers that we consider roughly equiprobable. Since + set tqcontains #2^n# numbers that we consider roughly equiprobable. Since the most probable values occur much more often, we want to model their probability more precisely. Therefore we use small sets for the most probable values and large sets for the least probable values, as @@ -716,7 +716,7 @@ ZPCodec::IWencoder(const bool bit) Adaptation on the other hand is a great simplification. A good data compression program must (a) represent the data in order to make its - predictability apparent, and (b) perform the predictions and generate the + predictability aptqparent, and (b) perform the predictions and generate the code bits. The ZP-Coder is an efficient and effortless solution for implementing task (b). diff --git a/kviewshell/plugins/djvu/libdjvu/configure.in.in b/kviewshell/plugins/djvu/libdjvu/configure.in.in index c2a1d2b6..9af3757d 100644 --- a/kviewshell/plugins/djvu/libdjvu/configure.in.in +++ b/kviewshell/plugins/djvu/libdjvu/configure.in.in @@ -217,7 +217,7 @@ AC_REQUIRE([AC_CANONICAL_HOST]) acx_pthread_ok=no # First, check if the POSIX threads header, pthread.h, is available. # If it isn't, don't bother looking for the threads libraries. -AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader) +KDE_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader) # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the @@ -378,10 +378,13 @@ fi if test x$acx_cothread != xno ; then AC_MSG_CHECKING([whether libgcc contains the cothread patch]) AC_LANG_PUSH([C++]) + kde_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $qt_includes" AC_TRY_LINK([extern "C" { void *(*__get_eh_context_ptr)(); void *__new_eh_context(void); }], [ __get_eh_context_ptr = &__new_eh_context;], [acx_cothread_patch=yes], [acx_cothread_patch=no]) + CXXFLAGS="$kde_save_CXXFLAGS" AC_LANG_POP([C++]) AC_MSG_RESULT($acx_cothread_patch) if test x$acx_cothread_patch = xno ; then @@ -560,8 +563,8 @@ AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_TIME AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(wchar.h wctype.h sys/mman.h iconv.h) -AC_CHECK_HEADERS(stdint.h sys/ipc.h sys/shm.h) +KDE_CHECK_HEADERS(wchar.h wctype.h sys/mman.h iconv.h) +KDE_CHECK_HEADERS(stdint.h sys/ipc.h sys/shm.h) # ---------------------------------------- # Types diff --git a/kviewshell/plugins/djvu/pageRangeWidget.cpp b/kviewshell/plugins/djvu/pageRangeWidget.cpp index ddff8299..1c1cb6fd 100644 --- a/kviewshell/plugins/djvu/pageRangeWidget.cpp +++ b/kviewshell/plugins/djvu/pageRangeWidget.cpp @@ -23,7 +23,7 @@ #include "pageRangeWidget.h" -PageRangeWidget::PageRangeWidget( Q_UINT16 _from, Q_UINT16 _to, Q_UINT16 _current, TQWidget *parent, const char *name) : PageRangeWidget_base(parent, name) +PageRangeWidget::PageRangeWidget( TQ_UINT16 _from, TQ_UINT16 _to, TQ_UINT16 _current, TQWidget *tqparent, const char *name) : PageRangeWidget_base(tqparent, name) { // Paranoid security checks if ((from == 0) || (to == 0)) diff --git a/kviewshell/plugins/djvu/pageRangeWidget.h b/kviewshell/plugins/djvu/pageRangeWidget.h index 3ddb497b..a1d2ec58 100644 --- a/kviewshell/plugins/djvu/pageRangeWidget.h +++ b/kviewshell/plugins/djvu/pageRangeWidget.h @@ -29,12 +29,13 @@ class PageRangeWidget : public PageRangeWidget_base { Q_OBJECT + TQ_OBJECT public: - PageRangeWidget( Q_UINT16 _from, Q_UINT16 _to, Q_UINT16 _current, TQWidget *parent = 0, const char *name = 0 ); + PageRangeWidget( TQ_UINT16 _from, TQ_UINT16 _to, TQ_UINT16 _current, TQWidget *tqparent = 0, const char *name = 0 ); - Q_UINT16 getFrom() const {return (from == 0) ? 0 : from->value(); } - Q_UINT16 getTo() const {return (to == 0) ? 0 : to->value(); } + TQ_UINT16 getFrom() const {return (from == 0) ? 0 : from->value(); } + TQ_UINT16 getTo() const {return (to == 0) ? 0 : to->value(); } private slots: void toValueChanged(int val); diff --git a/kviewshell/plugins/djvu/pageRangeWidget_base.ui b/kviewshell/plugins/djvu/pageRangeWidget_base.ui index 29784c3a..90f85b5a 100644 --- a/kviewshell/plugins/djvu/pageRangeWidget_base.ui +++ b/kviewshell/plugins/djvu/pageRangeWidget_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PageRangeWidget_base</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PageRangeWidget_base</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -40,7 +40,7 @@ <cstring>from</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -65,7 +65,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kviewshell/renderedDocumentPage.cpp b/kviewshell/renderedDocumentPage.cpp index 1d535bc5..990f1de6 100644 --- a/kviewshell/renderedDocumentPage.cpp +++ b/kviewshell/renderedDocumentPage.cpp @@ -21,7 +21,7 @@ RenderedDocumentPage::RenderedDocumentPage() textBoxList.reserve(250); pageNr = 0; isEmpty = true; - pageText = TQString::null; + pageText = TQString(); } @@ -46,7 +46,7 @@ void RenderedDocumentPage::clear() textBoxList.clear(); hyperLinkList.clear(); - pageText = TQString::null; + pageText = TQString(); isEmpty = true; } @@ -194,7 +194,7 @@ TextSelection RenderedDocumentPage::select(const TQPoint& point) for (unsigned int i=0; i<textBoxList.size(); i++) { - if (textBoxList[i].box.contains(point)) + if (textBoxList[i].box.tqcontains(point)) { selectedTextStart = i; selectedTextEnd = i; @@ -216,7 +216,7 @@ TextSelection RenderedDocumentPage::select(const TQPoint& point) return selection; } -TextSelection RenderedDocumentPage::find(const TQString& str, int index, bool caseSensitive) +TextSelection RenderedDocumentPage::tqfind(const TQString& str, int index, bool caseSensitive) { if (pageText.isNull()) { @@ -241,7 +241,7 @@ TextSelection RenderedDocumentPage::find(const TQString& str, int index, bool ca subIndex += textBoxList[i].text.length(); } - int textIndex = pageText.find(str, subIndex, caseSensitive); + int textIndex = pageText.tqfind(str, subIndex, caseSensitive); if (textIndex == -1) return selection; @@ -291,7 +291,7 @@ TextSelection RenderedDocumentPage::find(const TQString& str, int index, bool ca } -TextSelection RenderedDocumentPage::findRev(const TQString& str, int index, bool caseSensitive) +TextSelection RenderedDocumentPage::tqfindRev(const TQString& str, int index, bool caseSensitive) { // Negative index means we start the search at the end of the text. if (index < 0) @@ -322,7 +322,7 @@ TextSelection RenderedDocumentPage::findRev(const TQString& str, int index, bool subIndex += textBoxList[i].text.length(); } - int textIndex = pageText.findRev(str, subIndex, caseSensitive); + int textIndex = pageText.tqfindRev(str, subIndex, caseSensitive); if (textIndex == -1) return selection; diff --git a/kviewshell/renderedDocumentPage.h b/kviewshell/renderedDocumentPage.h index 979f46e8..143259e7 100644 --- a/kviewshell/renderedDocumentPage.h +++ b/kviewshell/renderedDocumentPage.h @@ -64,9 +64,10 @@ class TextSelection; @version 1.0.0 */ -class RenderedDocumentPage : public QObject +class RenderedDocumentPage : public TQObject { Q_OBJECT + TQ_OBJECT public: /** \brief Default constructor @@ -196,13 +197,13 @@ class RenderedDocumentPage : public QObject /** Finds the first occurence of str starting by the current index. If the text is found a corresponding TextSelection is returned. If the text is not found a empty selection is returned. */ - TextSelection find(const TQString& str, int index = 0, bool caseSensitive = true); + TextSelection tqfind(const TQString& str, int index = 0, bool caseSensitive = true); /** Finds the first occurence of str starting by the current index searching backwards. If the text is found a corresponding TextSelection is returned. If the text is not found a empty selection is returned. If index < 0 start the search at the end of the page. */ - TextSelection findRev(const TQString& str, int index = 0, bool cs = true); + TextSelection tqfindRev(const TQString& str, int index = 0, bool cs = true); /** \brief Hyperlinks on the document page @@ -221,7 +222,7 @@ class RenderedDocumentPage : public QObject Clears the contents of the class, but leaves pageNumber intact. For performance reasons, it does not free the memory for the - QValueVectors so that lengthy re-allocations won't be necessary + TQValueVectors so that lengthy re-allocations won't be necessary later. */ virtual void clear(); diff --git a/kviewshell/renderedDocumentPagePixmap.cpp b/kviewshell/renderedDocumentPagePixmap.cpp index f7f91ed9..fc8edade 100644 --- a/kviewshell/renderedDocumentPagePixmap.cpp +++ b/kviewshell/renderedDocumentPagePixmap.cpp @@ -71,7 +71,7 @@ TQPixmap RenderedDocumentPagePixmap::accessiblePixmap() { case KVSPrefs::EnumRenderMode::Inverted: // Invert image pixels using TQImage internal function - backImage.invertPixels(false); + backImage.tqinvertPixels(false); break; case KVSPrefs::EnumRenderMode::Recolor: // Recolor image using KImageEffect::flatten with dither:0 @@ -87,7 +87,7 @@ TQPixmap RenderedDocumentPagePixmap::accessiblePixmap() for( int i = 0; i < pixels; ++i ) { - val = qGray(data[i]); + val = tqGray(data[i]); if (val > thr) val = 128 + (127 * (val - thr)) / (255 - thr); else if ( val < thr ) @@ -100,7 +100,7 @@ TQPixmap RenderedDocumentPagePixmap::accessiblePixmap() else if (val < 0) val = 0; } - data[i] = qRgba(val, val, val, 255); + data[i] = tqRgba(val, val, val, 255); } break; } diff --git a/kviewshell/renderedDocumentPagePixmap.h b/kviewshell/renderedDocumentPagePixmap.h index 5e6e79fb..00a21dfa 100644 --- a/kviewshell/renderedDocumentPagePixmap.h +++ b/kviewshell/renderedDocumentPagePixmap.h @@ -19,9 +19,10 @@ // This class contains everything documentRenderer needs to know // about a certain page. -class RenderedDocumentPagePixmap: public RenderedDocumentPage, public QPixmap +class RenderedDocumentPagePixmap: public RenderedDocumentPage, public TQPixmap { Q_OBJECT + TQ_OBJECT public: RenderedDocumentPagePixmap(); diff --git a/kviewshell/searchWidget.cpp b/kviewshell/searchWidget.cpp index 27ca42f8..95d06295 100644 --- a/kviewshell/searchWidget.cpp +++ b/kviewshell/searchWidget.cpp @@ -36,41 +36,41 @@ #include "searchWidget.h" -SearchWidget::SearchWidget(TQWidget* parent, const char* name, WFlags fl) - : TQWidget(parent, name, fl) +SearchWidget::SearchWidget(TQWidget* tqparent, const char* name, WFlags fl) + : TQWidget(tqparent, name, fl) { setName("SearchWidget"); - setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed); + tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed); - layout = new TQHBoxLayout(this, 4, 6, "SearchWidgetLayout"); + tqlayout = new TQHBoxLayout(this, 4, 6, "SearchWidgetLayout"); stopButton = new TQPushButton(this, "stopButton"); stopButton->setPixmap(KGlobal::iconLoader()->loadIcon("stop", KIcon::Small, KIcon::SizeSmall)); - layout->addWidget(stopButton); + tqlayout->addWidget(stopButton); searchLabel = new TQLabel(this, "searchLabel"); searchLabel->setText(i18n("Search:")); - layout->addWidget(searchLabel); + tqlayout->addWidget(searchLabel); searchText = new KLineEdit(this, "searchText"); - layout->addWidget(searchText); + tqlayout->addWidget(searchText); searchLabel->setBuddy(searchText); findPrevButton = new TQPushButton(this, "findPrevButton"); findPrevButton->setPixmap(KGlobal::iconLoader()->loadIcon("back", KIcon::NoGroup, KIcon::SizeSmall)); TQToolTip::add(findPrevButton, i18n("Find previous")); - layout->addWidget(findPrevButton); + tqlayout->addWidget(findPrevButton); findNextButton = new TQPushButton(this, "findNextButton"); findNextButton->setPixmap(KGlobal::iconLoader()->loadIcon("forward", KIcon::NoGroup, KIcon::SizeSmall)); TQToolTip::add(findNextButton, i18n("Find next")); - layout->addWidget(findNextButton); + tqlayout->addWidget(findNextButton); caseSensitiveCheckBox = new TQCheckBox(this, "caseSensitiveCheckBox"); caseSensitiveCheckBox->setText(i18n("Case sensitive")); - layout->addWidget(caseSensitiveCheckBox); + tqlayout->addWidget(caseSensitiveCheckBox); connect(stopButton, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(stopSearch())); @@ -126,12 +126,12 @@ void SearchWidget::setFocus() void SearchWidget::keyPressEvent(TQKeyEvent* e) { - if (e->key() == Qt::Key_Escape) + if (e->key() == TQt::Key_Escape) emit stopSearch(); - if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) + if (e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter) { - if (e->state() == Qt::ShiftButton) + if (e->state() == TQt::ShiftButton) emit findPrevText(); else emit findNextText(); diff --git a/kviewshell/searchWidget.h b/kviewshell/searchWidget.h index 8875597d..189970ee 100644 --- a/kviewshell/searchWidget.h +++ b/kviewshell/searchWidget.h @@ -31,12 +31,13 @@ class TQPushButton; class TQCheckBox; class TQString; -class SearchWidget : public QWidget +class SearchWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SearchWidget(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0); + SearchWidget(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0); ~SearchWidget(); TQString getText() const; @@ -67,7 +68,7 @@ private: TQPushButton* findPrevButton; TQCheckBox* caseSensitiveCheckBox; - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; }; #endif diff --git a/kviewshell/selection.cpp b/kviewshell/selection.cpp index 83b9b5db..50edb80f 100644 --- a/kviewshell/selection.cpp +++ b/kviewshell/selection.cpp @@ -15,11 +15,11 @@ TextSelection::TextSelection() : page(PageNumber::invalidPage), - selectedText(TQString::null) + selectedText(TQString()) {} -void TextSelection::set(const PageNumber& pageNr, Q_INT32 start, Q_INT32 end, const TQString& text) +void TextSelection::set(const PageNumber& pageNr, TQ_INT32 start, TQ_INT32 end, const TQString& text) { page = pageNr; selectedTextStart = start; @@ -27,11 +27,11 @@ void TextSelection::set(const PageNumber& pageNr, Q_INT32 start, Q_INT32 end, co if (page != 0) selectedText = text; else - selectedText = TQString::null; + selectedText = TQString(); if (page != 0) { - TQApplication::clipboard()->setSelectionMode(true); - TQApplication::clipboard()->setText(selectedText); + TQApplication::tqclipboard()->setSelectionMode(true); + TQApplication::tqclipboard()->setText(selectedText); } } @@ -53,14 +53,14 @@ bool TextSelection::operator!= (const TextSelection& s) const void TextSelection::copyText() const { if (!isEmpty()) { - TQApplication::clipboard()->setSelectionMode(false); - TQApplication::clipboard()->setText(selectedText); + TQApplication::tqclipboard()->setSelectionMode(false); + TQApplication::tqclipboard()->setText(selectedText); } } void TextSelection::clear() { - set(0, -1, -1, TQString::null); + set(0, -1, -1, TQString()); } diff --git a/kviewshell/selection.h b/kviewshell/selection.h index 30fe415d..0f58fe5b 100644 --- a/kviewshell/selection.h +++ b/kviewshell/selection.h @@ -18,7 +18,7 @@ the page number, - two Q_INT32 numbers, 'selectedTextStart' and 'selectedTextEnd' that + two TQ_INT32 numbers, 'selectedTextStart' and 'selectedTextEnd' that should hold indiced referring to the start and the end of the selected text in the appropriate documentPage's textLinkList @@ -47,17 +47,17 @@ public: // values; it is not even checked if selectedTextStart <= // selectedTextEnd! The signals pageChanged() and // selectionIsNotEmpty() are emitted if appropriate. - void set(const PageNumber& pageNr, Q_INT32 selectedTextStart, Q_INT32 selectedTextEnd, const TQString& text); + void set(const PageNumber& pageNr, TQ_INT32 selectedTextStart, TQ_INT32 selectedTextEnd, const TQString& text); // This method can be used to find out if the selection is empty, // i.e. if the page number is invalid or the selected text is empty. bool isEmpty() const {return (!page.isValid() || selectedText.isEmpty());} // Method used to retrieve the data described above - Q_INT32 getSelectedTextStart() const {return selectedTextStart;} + TQ_INT32 getSelectedTextStart() const {return selectedTextStart;} // Method used to retrieve the data described above - Q_INT32 getSelectedTextEnd() const {return selectedTextEnd;} + TQ_INT32 getSelectedTextEnd() const {return selectedTextEnd;} // Method used to retrieve the data described above const TQString &getSelectedText() const {return selectedText;} @@ -77,7 +77,7 @@ public: PageNumber page; // Described above - Q_INT32 selectedTextStart, selectedTextEnd; + TQ_INT32 selectedTextStart, selectedTextEnd; // Described above TQString selectedText; diff --git a/kviewshell/simplePageSize.cpp b/kviewshell/simplePageSize.cpp index 9f222105..358f6798 100644 --- a/kviewshell/simplePageSize.cpp +++ b/kviewshell/simplePageSize.cpp @@ -15,7 +15,7 @@ #include "simplePageSize.h" -double SimplePageSize::zoomForHeight(Q_UINT32 height) const +double SimplePageSize::zoomForHeight(TQ_UINT32 height) const { if (!isValid()) { kdError(1223) << "SimplePageSize::zoomForHeight() called when paper height was invalid" << endl; @@ -25,7 +25,7 @@ double SimplePageSize::zoomForHeight(Q_UINT32 height) const } -double SimplePageSize::zoomForWidth(Q_UINT32 width) const +double SimplePageSize::zoomForWidth(TQ_UINT32 width) const { if (!isValid()) { kdError(1223) << "SimplePageSize::zoomForWidth() called when paper width was invalid" << endl; @@ -45,5 +45,5 @@ double SimplePageSize::zoomToFitInto(const SimplePageSize &target) const double z1 = target.width() / pageWidth; double z2 = target.height() / pageHeight; - return QMIN(z1,z2); + return TQMIN(z1,z2); } diff --git a/kviewshell/simplePageSize.h b/kviewshell/simplePageSize.h index 523eb62b..46972e88 100644 --- a/kviewshell/simplePageSize.h +++ b/kviewshell/simplePageSize.h @@ -93,7 +93,7 @@ class SimplePageSize 'height' pixels. If the pageSize is invalid, an undefined value is returned. */ - double zoomForHeight(Q_UINT32 height) const; + double zoomForHeight(TQ_UINT32 height) const; /** \brief Zoom value required to scale to a certain height @@ -109,7 +109,7 @@ class SimplePageSize 'width' pixels. If the pageSize is invalid, an undefined value is returned. */ - double zoomForWidth(Q_UINT32 width) const; + double zoomForWidth(TQ_UINT32 width) const; /** \brief Returns a zoom to fit into a certain page size diff --git a/kviewshell/sizePreview.cpp b/kviewshell/sizePreview.cpp index 37f7bb66..e3ba44df 100644 --- a/kviewshell/sizePreview.cpp +++ b/kviewshell/sizePreview.cpp @@ -18,8 +18,8 @@ #include "simplePageSize.h" -SizePreview::SizePreview( TQWidget *parent, const char *name, WFlags) - : TQWidget( parent, name, WStaticContents | WNoAutoErase ) +SizePreview::SizePreview( TQWidget *tqparent, const char *name, WFlags) + : TQWidget( tqparent, name, WStaticContents | WNoAutoErase ) { // Set a sane default _width = _height = 50.0; @@ -74,15 +74,15 @@ void SizePreview::paintEvent( TQPaintEvent * ) pixmap.resize(width(), height()); TQPainter p(&pixmap); - p.fillRect(rect(), colorGroup().background()); - p.setPen(Qt::black); - p.setBrush(Qt::white); + p.fillRect(rect(), tqcolorGroup().background()); + p.setPen(TQt::black); + p.setBrush(TQt::white); p.drawRect(hOffset, vOffset, displayedWidth, displayedHeight); // mark the textbox; we assume 25mm margin int margin = (int)(25.0*displayedWidth/_width + 0.5); TQRect textBox(hOffset+margin, vOffset+margin, displayedWidth-2*margin, displayedHeight-2*margin); - p.setPen(Qt::lightGray); + p.setPen(TQt::lightGray); p.drawRect(textBox); // Draw some dummy "text", represented by black lines @@ -96,7 +96,7 @@ void SizePreview::paintEvent( TQPaintEvent * ) KRandomSequence rnd(1); // to generate word widths p.setClipRect(textBox); - p.setPen(Qt::black); + p.setPen(TQt::black); int count = 1; // Counts lines for (int y = vOffset+margin+lineSpacing; y <= vOffset+displayedHeight-margin; y += lineSpacing) { // We start each line with its own seed. diff --git a/kviewshell/sizePreview.h b/kviewshell/sizePreview.h index 96e37a04..aeaf264f 100644 --- a/kviewshell/sizePreview.h +++ b/kviewshell/sizePreview.h @@ -16,12 +16,13 @@ class SimplePageSize; -class SizePreview : public QWidget +class SizePreview : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SizePreview( TQWidget *parent, const char* name=0, WFlags f=0 ); + SizePreview( TQWidget *tqparent, const char* name=0, WFlags f=0 ); public slots: // Sets the size. diff --git a/kviewshell/tableOfContents.cpp b/kviewshell/tableOfContents.cpp index 51618d9a..7003de53 100644 --- a/kviewshell/tableOfContents.cpp +++ b/kviewshell/tableOfContents.cpp @@ -28,19 +28,19 @@ #include "kvsprefs.h" -TocItem::TocItem(TocItem* parent) - : KListViewItem(parent) +TocItem::TocItem(TocItem* tqparent) + : KListViewItem(tqparent) { } -TocItem::TocItem(TQListView* parent) - : KListViewItem(parent) +TocItem::TocItem(TQListView* tqparent) + : KListViewItem(tqparent) { } -TableOfContents::TableOfContents(TQWidget* parent) - : KListView(parent) +TableOfContents::TableOfContents(TQWidget* tqparent) + : KListView(tqparent) { addColumn(i18n("Topic")); addColumn(i18n("Page")); @@ -79,7 +79,7 @@ void TableOfContents::setContents(const TQPtrList<Bookmark>& bookmarks) addItems(bookmarks); } -void TableOfContents::addItems(const TQPtrList<Bookmark>& _bookmarks, TocItem* parent) +void TableOfContents::addItems(const TQPtrList<Bookmark>& _bookmarks, TocItem* tqparent) { kdDebug(1223) << "TableOfContents::setContents()" << endl; if (_bookmarks.isEmpty()) @@ -90,10 +90,10 @@ void TableOfContents::addItems(const TQPtrList<Bookmark>& _bookmarks, TocItem* p TQPtrList<Bookmark> bookmarks = _bookmarks; for (Bookmark* current = bookmarks.last(); current; current = bookmarks.prev() ) { TocItem* item; - if (!parent) + if (!tqparent) item = new TocItem(this); else - item = new TocItem(parent); + item = new TocItem(tqparent); item->setText(0, current->bookmarkText); if (current->position.page != 0) diff --git a/kviewshell/tableOfContents.h b/kviewshell/tableOfContents.h index de5885ac..a6d4f311 100644 --- a/kviewshell/tableOfContents.h +++ b/kviewshell/tableOfContents.h @@ -32,8 +32,8 @@ class Bookmark; class TocItem : public KListViewItem { public: - TocItem(TocItem* parent); - TocItem(TQListView* parent); + TocItem(TocItem* tqparent); + TocItem(TQListView* tqparent); void setAnchor(const Anchor & _anchor) { anchor = _anchor; } Anchor getAnchor() { return anchor; } @@ -46,9 +46,10 @@ private: class TableOfContents : public KListView { Q_OBJECT + TQ_OBJECT public: - TableOfContents(TQWidget* parent); + TableOfContents(TQWidget* tqparent); virtual ~TableOfContents(); void setContents(const TQPtrList<Bookmark>& bookmarks); @@ -60,7 +61,7 @@ signals: void gotoPage(const Anchor&); private: - void addItems(const TQPtrList<Bookmark>& bookmarks, TocItem* parent = 0); + void addItems(const TQPtrList<Bookmark>& bookmarks, TocItem* tqparent = 0); private slots: void itemClicked(TQListViewItem*); diff --git a/kviewshell/units.cpp b/kviewshell/units.cpp index 99dc2da9..0e465198 100644 --- a/kviewshell/units.cpp +++ b/kviewshell/units.cpp @@ -64,7 +64,7 @@ float distance::convertToMM(const TQString &distance, bool *ok) // of the unit in 'unitPos', so that distance[0..unitPos] will hold // the value. Store the number of mm per unit in 'MMperUnit'. for(int i=0; MMperUnit==0.0 && distanceUnitTable[i].name != 0; i++) { - unitPos = distance.findRev(distanceUnitTable[i].name); + unitPos = distance.tqfindRev(distanceUnitTable[i].name); if (unitPos != -1) MMperUnit = distanceUnitTable[i].mmPerUnit; } diff --git a/kviewshell/zoom.cpp b/kviewshell/zoom.cpp index 1c3ee6f6..595f4982 100644 --- a/kviewshell/zoom.cpp +++ b/kviewshell/zoom.cpp @@ -28,7 +28,7 @@ Zoom::Zoom() _zoomValue = 1.0; valNo = 6; // 1.0 is 6rd entry in the list for(int i=0; zoomVals[i] != 0; i++) - valueNames << TQString("%1%").arg(zoomVals[i]); + valueNames << TQString("%1%").tqarg(zoomVals[i]); } @@ -49,7 +49,7 @@ void Zoom::setZoomValue(const TQString &cval) else { emit(zoomNamesChanged(valueNames)); emit(valNoChanged(valNo)); - emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5)))); + emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); } } @@ -64,7 +64,7 @@ void Zoom::setZoomFitWidth(float zoom) valNo = 0; emit(valNoChanged(valNo)); - emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5)))); + emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); } void Zoom::setZoomFitHeight(float zoom) @@ -78,7 +78,7 @@ void Zoom::setZoomFitHeight(float zoom) valNo = 1; emit(valNoChanged(valNo)); - emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5)))); + emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); } void Zoom::setZoomFitPage(float zoom) @@ -92,7 +92,7 @@ void Zoom::setZoomFitPage(float zoom) valNo = 2; emit(valNoChanged(valNo)); - emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5)))); + emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); } void Zoom::setZoomValue(float f) @@ -117,19 +117,19 @@ void Zoom::setZoomValue(float f) flag = true; valNo = i + 3; if (fabs(_zoomValue-zoomVals[i]) > 0.01) - valueNames << TQString("%1%").arg((int)(_zoomValue*100.0+0.5)); + valueNames << TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)); } - valueNames << TQString("%1%").arg((int)(zoomVals[i]*100.0+0.5)); + valueNames << TQString("%1%").tqarg((int)(zoomVals[i]*100.0+0.5)); } if (flag == false) { valNo = valueNames.size(); - valueNames << TQString("%1%").arg((int)(_zoomValue*100.0+0.5)); + valueNames << TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)); } emit(zoomNamesChanged(valueNames)); emit(valNoChanged(valNo)); - emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5)))); + emit(zoomNameChanged(TQString("%1%").tqarg((int)(_zoomValue*100.0+0.5)))); } float Zoom::zoomIn() diff --git a/kviewshell/zoom.h b/kviewshell/zoom.h index b6108d05..21b182f0 100644 --- a/kviewshell/zoom.h +++ b/kviewshell/zoom.h @@ -15,9 +15,10 @@ #include <tqstringlist.h> -class Zoom : public QObject +class Zoom : public TQObject { Q_OBJECT + TQ_OBJECT public: /** Initializs the zoom with a default of 100% */ diff --git a/libkscan/COPYING.LIB b/libkscan/COPYING.LIB index 01148ab6..e8dcd1e0 100644 --- a/libkscan/COPYING.LIB +++ b/libkscan/COPYING.LIB @@ -128,7 +128,7 @@ included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated +all the source code for all modules it tqcontains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. @@ -250,7 +250,7 @@ linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline +structure tqlayouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the diff --git a/libkscan/devselector.cpp b/libkscan/devselector.cpp index b30316c9..011e7469 100644 --- a/libkscan/devselector.cpp +++ b/libkscan/devselector.cpp @@ -41,9 +41,9 @@ #include "devselector.h" -DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList, +DeviceSelector::DeviceSelector( TQWidget *tqparent, TQStrList& devList, const TQStringList& hrdevList ) - : KDialogBase( parent, "DeviceSel", true, i18n("Welcome to Kooka"), + : KDialogBase( tqparent, "DeviceSel", true, i18n("Welcome to Kooka"), Ok|Cancel, Ok, true ) { kdDebug(29000) << "Starting DevSelector!" << endl; @@ -55,11 +55,11 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList, TQVBoxLayout *topLayout = new TQVBoxLayout( page, marginHint(), spacingHint() ); TQLabel *label = new TQLabel( page, "captionImage" ); Q_CHECK_PTR( label ); - label->setPixmap( TQPixmap( "kookalogo.png" )); + label->setPixmap( TQPixmap( TQString("kookalogo.png") )); label->resize( 100, 350 ); topLayout->addWidget( label ); - selectBox = new TQButtonGroup( 1, Horizontal, i18n( "Select Scan Device" ), + selectBox = new TQButtonGroup( 1,Qt::Horizontal, i18n( "Select Scan Device" ), page, "ButtonBox"); Q_CHECK_PTR( selectBox ); selectBox->setExclusive( true ); @@ -70,7 +70,7 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList, page, "CBOX_SKIP_ON_START" ); KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); cbSkipDialog->setChecked( skipDialog ); @@ -81,7 +81,7 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList, TQCString DeviceSelector::getDeviceFromConfig( void ) const { KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); TQCString result; @@ -95,7 +95,7 @@ TQCString DeviceSelector::getDeviceFromConfig( void ) const /* Now check if the scanner read from the config file is available ! * if not, ask the user ! */ - if( skipDialog && devices.find( result ) > -1 ) + if( skipDialog && devices.tqfind( result ) > -1 ) { kdDebug(29000) << "Scanner from Config file is available - fine." << endl; } @@ -126,7 +126,7 @@ TQCString DeviceSelector::getSelectedDevice( void ) const /* Store scanner selection settings */ KConfig *c = KGlobal::config(); - c->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + c->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); /* Write both the scan device and the skip-start-dialog flag global. */ c->writeEntry( STARTUP_SCANDEV, dev, true, true ); c->writeEntry( STARTUP_SKIP_ASK, getShouldSkip(), true, true ); @@ -141,7 +141,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources, { bool default_ok = false; KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); TQCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit(); /* Selector-Stuff*/ @@ -152,7 +152,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources, TQStringList::ConstIterator it2 = hrSources.begin(); for ( ; it.current(); ++it, ++it2 ) { - TQString text = TQString::fromLatin1("&%1. %2\n%3").arg(1+nr).arg( TQString::fromLocal8Bit(*it) ).arg( *it2 ); + TQString text = TQString::tqfromLatin1("&%1. %2\n%3").tqarg(1+nr).tqarg( TQString::fromLocal8Bit(*it) ).tqarg( *it2 ); TQRadioButton *rb = new TQRadioButton( text, selectBox ); selectBox->insert( rb ); @@ -168,7 +168,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources, if( ! default_ok ) { /* if no default found, set the first */ - TQRadioButton *rb = (TQRadioButton*) selectBox->find( checkDefNo ); + TQRadioButton *rb = (TQRadioButton*) selectBox->tqfind( checkDefNo ); if ( rb ) rb->setChecked( true ); } diff --git a/libkscan/devselector.h b/libkscan/devselector.h index 011c4a4e..ec74f343 100644 --- a/libkscan/devselector.h +++ b/libkscan/devselector.h @@ -54,14 +54,15 @@ class TQCheckBox; class DeviceSelector: public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * constructs the dialog class - * @param TQWidget *parent - the parent + * @param TQWidget *tqparent - the tqparent * @param TQStrList backends - a list of device names retrieved from the scan device * @param TQStrList scannerNames - a list of corresponding human readable sanner names. */ - DeviceSelector( TQWidget *parent, TQStrList&, const TQStringList& ); + DeviceSelector( TQWidget *tqparent, TQStrList&, const TQStringList& ); ~DeviceSelector(); /** diff --git a/libkscan/dispgamma.cpp b/libkscan/dispgamma.cpp index 478096e9..a2815276 100644 --- a/libkscan/dispgamma.cpp +++ b/libkscan/dispgamma.cpp @@ -22,7 +22,7 @@ #include "dispgamma.h" -DispGamma::DispGamma( TQWidget *parent ) : TQWidget( parent ) +DispGamma::DispGamma( TQWidget *tqparent ) : TQWidget( tqparent ) { vals = 0; margin = 10; @@ -35,7 +35,7 @@ DispGamma::~DispGamma() void DispGamma::resizeEvent (TQResizeEvent* ) { - repaint(); + tqrepaint(); } void DispGamma::paintEvent( TQPaintEvent *ev ) @@ -49,11 +49,11 @@ void DispGamma::paintEvent( TQPaintEvent *ev ) p.setClipRect( ev->rect()); - p.setPen( colorGroup().highlight() ); - p.setBrush( colorGroup().base() ); + p.setPen( tqcolorGroup().highlight() ); + p.setBrush( tqcolorGroup().base() ); // Backgrond p.drawRect( 0,0, w, 256 ); - p.setPen( TQPen(colorGroup().midlight(), 1, DotLine)); + p.setPen( TQPen(tqcolorGroup().midlight(), 1, DotLine)); // horizontal Grid for( int l = 1; l < 5; l++ ) p.drawLine( 1, l*51, 255, l*51 ); @@ -63,7 +63,7 @@ void DispGamma::paintEvent( TQPaintEvent *ev ) p.drawLine( l*51, 2, l*51, 255 ); // draw gamma-Line - p.setPen( colorGroup().highlight() ); + p.setPen( tqcolorGroup().highlight() ); p.moveTo( 1, vals->at(1) ); for( int i = 2; i < w-1; i++ ) { @@ -73,7 +73,7 @@ void DispGamma::paintEvent( TQPaintEvent *ev ) } -TQSize DispGamma::sizeHint( void ) +TQSize DispGamma::tqsizeHint( void ) { return TQSize( 256 + 2*margin,256 + 2 * margin ); } diff --git a/libkscan/dispgamma.h b/libkscan/dispgamma.h index 8e917d83..dca8840d 100644 --- a/libkscan/dispgamma.h +++ b/libkscan/dispgamma.h @@ -35,11 +35,12 @@ extern "C"{ class DispGamma : public TQWidget { Q_OBJECT + TQ_OBJECT public: - DispGamma( TQWidget *parent ); + DispGamma( TQWidget *tqparent ); ~DispGamma(); - TQSize sizeHint( void ); + TQSize tqsizeHint( void ); TQSizePolicy sizePolicy( void ); void setValueRef( TQMemArray<SANE_Word> *newVals ) diff --git a/libkscan/gammadialog.cpp b/libkscan/gammadialog.cpp index ef8a87a2..b61a3388 100644 --- a/libkscan/gammadialog.cpp +++ b/libkscan/gammadialog.cpp @@ -29,8 +29,8 @@ #include "gammadialog.h" -GammaDialog::GammaDialog( TQWidget *parent ) : - KDialogBase( parent, "GammaDialog", true, i18n("Custom Gamma Tables"), +GammaDialog::GammaDialog( TQWidget *tqparent ) : + KDialogBase( tqparent, "GammaDialog", true, i18n("Custom Gamma Tables"), Ok|Cancel|Apply, Ok, true ) { gt = new KGammaTable(); @@ -47,7 +47,7 @@ GammaDialog::GammaDialog( TQWidget *parent ) : gtDisp->setValueRef( gt->getArrayPtr() ); gtDisp->resize( 280, 280 ); - connect( gt, TQT_SIGNAL(tableChanged()), gtDisp, TQT_SLOT( repaint())); + connect( gt, TQT_SIGNAL(tableChanged()), gtDisp, TQT_SLOT( tqrepaint())); // setCaption( i18n( "Gamma Table" )); diff --git a/libkscan/gammadialog.h b/libkscan/gammadialog.h index 0c63a967..a4edea12 100644 --- a/libkscan/gammadialog.h +++ b/libkscan/gammadialog.h @@ -41,11 +41,12 @@ class KGammaTable; class GammaDialog : public KDialogBase { Q_OBJECT -// FIXME: Doesn't compile with Qt 3 (malte) -// Q_PROPERTY( KGammaTable *gt READ getGt WRITE setGt ) + TQ_OBJECT +// FIXME: Doesn't compile with TQt 3 (malte) +// TQ_PROPERTY( KGammaTable *gt READ getGt WRITE setGt ) public: - GammaDialog ( TQWidget *parent ); + GammaDialog ( TQWidget *tqparent ); ~GammaDialog( ); KGammaTable *getGt( ) const { return gt; } diff --git a/libkscan/img_canvas.cpp b/libkscan/img_canvas.cpp index 18c1f606..2037cb01 100644 --- a/libkscan/img_canvas.cpp +++ b/libkscan/img_canvas.cpp @@ -72,10 +72,10 @@ public: TQValueList<TQRect> highlightRects; }; -ImageCanvas::ImageCanvas(TQWidget *parent, +ImageCanvas::ImageCanvas(TQWidget *tqparent, const TQImage *start_image, const char *name ): - TQScrollView( parent, name ), + TQScrollView( tqparent, name ), m_contextMenu(0) { d = new ImageCanvasPrivate(); @@ -226,12 +226,12 @@ void ImageCanvas::newImage( TQImage *new_image ) } - kdDebug(29000) << "going to repaint!" << endl; - repaint( true ); - kdDebug(29000) << "repaint ok" << endl; + kdDebug(29000) << "going to tqrepaint!" << endl; + tqrepaint( true ); + kdDebug(29000) << "tqrepaint ok" << endl; } -TQSize ImageCanvas::sizeHint() const +TQSize ImageCanvas::tqsizeHint() const { return( TQSize( 2, 2 )); } @@ -295,7 +295,7 @@ void ImageCanvas::handle_popup( int item ) default: break; } update_scaled_pixmap(); - repaint(); + tqrepaint(); } @@ -379,7 +379,7 @@ void ImageCanvas::drawContents( TQPainter * p, int clipx, int clipy, int clipw, // p->scale( used_xscaler, used_yscaler ); // p->scale( used_xscaler, used_yscaler ); if ( x2 >= x1 && y2 >= y1 ) { - p->drawPixmap( x1, y1, *pmScaled, x1, y1 ); //, clipw, cliph); + p->tqdrawPixmap( x1, y1, *pmScaled, x1, y1 ); //, clipw, cliph); // p->setBrush( red ); // p->drawRect( x1, y1, clipw, cliph ); } @@ -457,7 +457,7 @@ void ImageCanvas::viewportMousePressEvent(TQMouseEvent *ev) { if( ! acquired || ! image ) return; - if(ev->button()==LeftButton ) + if(ev->button()==Qt::LeftButton ) { int cx = contentsX(), cy = contentsY(); @@ -486,7 +486,7 @@ void ImageCanvas::viewportMousePressEvent(TQMouseEvent *ev) void ImageCanvas::viewportMouseReleaseEvent(TQMouseEvent *ev) { - if(ev->button()!=LeftButton || !acquired ) return; + if(ev->button()!=Qt::LeftButton || !acquired ) return; //// debug( "Mouse Release at %d/%d", ev->x(), ev->y()); if(moving!=MOVE_NONE) { @@ -675,7 +675,7 @@ void ImageCanvas::update_scaled_pixmap( void ) if( scaleKind() == DYNAMIC ) kdDebug(28000) << "Scaling DYNAMIC" << endl; TQSize noSBSize( visibleWidth(), visibleHeight()); - const int sbWidth = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent ); + const int sbWidth = kapp->tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent ); // if( verticalScrollBar()->visible() ) noSBSize.width()+=sbWidth; // if( horizontalScrollBar()->visible() ) noSBSize.height()+=sbWidth; @@ -783,7 +783,7 @@ void ImageCanvas::drawHAreaBorder(TQPainter &p,int x1,int x2,int y,int r) } else if(!acquired) p.setPen(TQPen(TQColor(150,150,150))); for(;;) { - if(rect().contains(TQPoint(x1,y))) { + if(TQT_TQRECT_OBJECT(rect()).tqcontains(TQPoint(x1,y))) { if( r && acquired ) { int re_x1, re_y; inv_scale_matrix.map( x1+cx, y+cy, &re_x1, &re_y ); @@ -826,7 +826,7 @@ void ImageCanvas::drawVAreaBorder(TQPainter &p, int x, int y1, int y2, int r ) if( !acquired ) p.setPen( TQPen( TQColor(150,150,150) ) ); for(;;) { - if(rect().contains( TQPoint(x,y1) )) { + if(TQT_TQRECT_OBJECT(rect()).tqcontains( TQPoint(x,y1) )) { if( r && acquired ) { int re_y1, re_x; inv_scale_matrix.map( x+cx, y1+cy, &re_x, &re_y1 ); @@ -921,7 +921,7 @@ preview_state ImageCanvas::classifyPoint(int x,int y) if(x>=a.left()&&x<=a.right()) { if(top) return MOVE_TOP; if(bottom) return MOVE_BOTTOM; - if(selected->contains(TQPoint(x,y))) return MOVE_WHOLE; + if(selected->tqcontains(TQPoint(x,y))) return MOVE_WHOLE; } return MOVE_NONE; } @@ -1022,7 +1022,7 @@ const TQString ImageCanvas::imageInfoString( int w, int h, int d ) else return TQString("-"); } - return i18n("%1x%2 pixel, %3 bit").arg(w).arg(h).arg(d); + return i18n("%1x%2 pixel, %3 bit").tqarg(w).tqarg(h).tqarg(d); } @@ -1043,7 +1043,7 @@ const TQString ImageCanvas::scaleKindString() return i18n("Fit Height"); break; case ZOOM: - return i18n("Zoom to %1 %%").arg( TQString::number(getScaleFactor())); + return i18n("Zoom to %1 %%").tqarg( TQString::number(getScaleFactor())); break; default: return i18n("Unknown scaling!"); @@ -1058,7 +1058,7 @@ int ImageCanvas::highlight( const TQRect& rect, const TQPen& pen, const TQBrush& saveRect.setRect( rect.x()-2, rect.y()-2, rect.width()+4, rect.height()+4 ); d->highlightRects.append( saveRect ); - int idx = d->highlightRects.findIndex(saveRect); + int idx = d->highlightRects.tqfindIndex(saveRect); TQRect targetRect = scale_matrix.map( rect ); diff --git a/libkscan/img_canvas.h b/libkscan/img_canvas.h index 958fecbb..b99cb630 100644 --- a/libkscan/img_canvas.h +++ b/libkscan/img_canvas.h @@ -71,17 +71,18 @@ extern int max_dpi; -class ImageCanvas: public QScrollView +class ImageCanvas: public TQScrollView { Q_OBJECT + TQ_OBJECT Q_ENUMS( PopupIDs ) - Q_PROPERTY( int brightness READ getBrightness WRITE setBrightness ) - Q_PROPERTY( int contrast READ getContrast WRITE setContrast ) - Q_PROPERTY( int gamma READ getGamma WRITE setGamma ) - Q_PROPERTY( int scale_factor READ getScaleFactor WRITE setScaleFactor ) + TQ_PROPERTY( int brightness READ getBrightness WRITE setBrightness ) + TQ_PROPERTY( int contrast READ getContrast WRITE setContrast ) + TQ_PROPERTY( int gamma READ getGamma WRITE setGamma ) + TQ_PROPERTY( int scale_factor READ getScaleFactor WRITE setScaleFactor ) public: - ImageCanvas( TQWidget *parent = 0, + ImageCanvas( TQWidget *tqparent = 0, const TQImage *start_image = 0, const char *name = 0); ~ImageCanvas( ); @@ -120,9 +121,9 @@ public slots: void toggleAspect( int aspect_in_mind ) { maintain_aspect = aspect_in_mind; - repaint(); + tqrepaint(); } - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; void newImage( TQImage* ); void newImageHoldZoom( TQImage* ); void deleteView( TQImage *); @@ -191,8 +192,8 @@ private: KPixmapIO pixIO; #endif - QWMatrix scale_matrix; - QWMatrix inv_scale_matrix; + TQWMatrix scale_matrix; + TQWMatrix inv_scale_matrix; TQPixmap *pmScaled; float used_yscaler; float used_xscaler; diff --git a/libkscan/imgscaledialog.cpp b/libkscan/imgscaledialog.cpp index 2deb4544..85c793e3 100644 --- a/libkscan/imgscaledialog.cpp +++ b/libkscan/imgscaledialog.cpp @@ -27,9 +27,9 @@ /* ############################################################################## */ -ImgScaleDialog::ImgScaleDialog( TQWidget *parent, int curr_sel, +ImgScaleDialog::ImgScaleDialog( TQWidget *tqparent, int curr_sel, const char *name ) - :KDialogBase( parent, name , true, i18n("Zoom"), + :KDialogBase( tqparent, name , true, i18n("Zoom"), Ok|Cancel, Ok, true ) { // setCaption (i18n ("Image Zoom")); @@ -134,7 +134,7 @@ void ImgScaleDialog::customChanged( const TQString& s ) // in the button group. The value val is the index of the active // button which is translated to the Scale-Size in percent. // If custom size is selected, the ScaleSize is read from the -// QLineedit. +// TQLineedit. // void ImgScaleDialog::setSelValue( int val ) { diff --git a/libkscan/imgscaledialog.h b/libkscan/imgscaledialog.h index 6ab4cb78..78c62b43 100644 --- a/libkscan/imgscaledialog.h +++ b/libkscan/imgscaledialog.h @@ -32,10 +32,11 @@ class ImgScaleDialog : public KDialogBase { Q_OBJECT - Q_PROPERTY( int selected READ getSelected WRITE setSelValue ) + TQ_OBJECT + TQ_PROPERTY( int selected READ getSelected WRITE setSelValue ) public: - ImgScaleDialog( TQWidget *parent, int curr_sel = 100, + ImgScaleDialog( TQWidget *tqparent, int curr_sel = 100, const char *name = 0 ); public slots: diff --git a/libkscan/kgammatable.h b/libkscan/kgammatable.h index 49540a82..7d949d45 100644 --- a/libkscan/kgammatable.h +++ b/libkscan/kgammatable.h @@ -27,13 +27,14 @@ extern "C" { #include <sane/sane.h> } -class KGammaTable: public QObject +class KGammaTable: public TQObject { Q_OBJECT + TQ_OBJECT - Q_PROPERTY( int g READ getGamma WRITE setGamma ) - Q_PROPERTY( int c READ getContrast WRITE setContrast ) - Q_PROPERTY( int b READ getBrightness WRITE setBrightness ) + TQ_PROPERTY( int g READ getGamma WRITE setGamma ) + TQ_PROPERTY( int c READ getContrast WRITE setContrast ) + TQ_PROPERTY( int b READ getBrightness WRITE setBrightness ) public: KGammaTable ( int gamma = 100, int brightness = 0, diff --git a/libkscan/kscandevice.cpp b/libkscan/kscandevice.cpp index c5237eb4..b603f15f 100644 --- a/libkscan/kscandevice.cpp +++ b/libkscan/kscandevice.cpp @@ -97,7 +97,7 @@ KScanOption *KScanDevice::getExistingGuiElement( const TQCString& name ) TQCString alias = aliasName( name ); - /* gui_elements is a QList<KScanOption> */ + /* gui_elements is a TQList<KScanOption> */ for( ret = gui_elements.first(); ret != 0; ret = gui_elements.next()) { if( ret->getName() == alias ) break; @@ -109,7 +109,7 @@ KScanOption *KScanDevice::getExistingGuiElement( const TQCString& name ) ------------------------------------------------------------------------- */ -KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *parent, +KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *tqparent, const TQString& desc, const TQString& tooltip ) { @@ -132,7 +132,7 @@ KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *parent /** store new gui-elem in list of all gui-elements */ gui_elements.append( so ); - w = so->createWidget( parent, desc, tooltip ); + w = so->createWidget( tqparent, desc, tooltip ); if( w ) { connect( so, TQT_SIGNAL( optionChanged( KScanOption* ) ), @@ -163,8 +163,8 @@ KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *parent // --------------------------------------------------------------------------- -KScanDevice::KScanDevice( TQObject *parent ) - : TQObject( parent ) +KScanDevice::KScanDevice( TQObject *tqparent ) + : TQObject( tqparent ) { SANE_Status sane_stat = sane_init(NULL, NULL ); @@ -175,7 +175,7 @@ KScanDevice::KScanDevice( TQObject *parent ) gui_elements.setAutoDelete( true ); scanner_initialised = false; /* stays false until openDevice. */ - scanStatus = SSTAT_SILENT; + scantqStatus = SSTAT_SILENT; data = 0; /* temporary image data buffer while scanning */ sn = 0; /* socket notifier for async scanning */ @@ -240,7 +240,7 @@ KScanStat KScanDevice::openDevice( const TQCString& backend ) if( backend.isEmpty() ) return KSCAN_ERR_PARAM; // search for scanner - int indx = scanner_avail.find( backend ); + int indx = scanner_avail.tqfind( backend ); if( indx < 0 ) { stat = KSCAN_ERR_NO_DEVICE; @@ -282,7 +282,7 @@ void KScanDevice::slCloseDevice( ) scanner_name = UNDEF_SCANNERNAME; if( scanner_handle ) { - if( scanStatus != SSTAT_SILENT ) + if( scantqStatus != SSTAT_SILENT ) { kdDebug(29000) << "Scanner is still active, calling cancel !" << endl; sane_cancel( scanner_handle ); @@ -304,14 +304,14 @@ TQString KScanDevice::getScannerName(const TQCString& name) const TQString ret = i18n("No scanner selected"); SANE_Device *scanner = 0L; - if( scanner_name && scanner_initialised && name.isEmpty()) + if( !scanner_name.isNull() && scanner_initialised && name.isEmpty()) { scanner = scannerDevices[ scanner_name ]; } else if ( ! name.isEmpty() ) { scanner = scannerDevices[ name ]; - ret = TQString::null; + ret = TQString(); } if( scanner ) { @@ -533,7 +533,7 @@ KScanStat KScanDevice::apply( KScanOption *opt, bool isGammaTable ) } else { - kdDebug(29000) << "Status of sane is bad: " << sane_strstatus( sane_stat ) + kdDebug(29000) << "tqStatus of sane is bad: " << sane_strstatus( sane_stat ) << " for option " << oname << endl; } @@ -570,7 +570,7 @@ void KScanDevice::slSetDirty( const TQCString& name ) { if( optionExists( name ) ) { - if( dirtyList.find( name ) == -1 ) + if( dirtyList.tqfind( name ) == -1 ) { kdDebug(29000)<< "Setting dirty <" << name << ">" << endl; /* item not found */ @@ -659,11 +659,11 @@ void KScanDevice::slReloadAll( ) void KScanDevice::slStopScanning( void ) { kdDebug(29000) << "Attempt to stop scanning" << endl; - if( scanStatus == SSTAT_IN_PROGRESS ) + if( scantqStatus == SSTAT_IN_PROGRESS ) { emit( sigScanFinished( KSCAN_CANCELLED )); } - scanStatus = SSTAT_STOP_NOW; + scantqStatus = SSTAT_STOP_NOW; } @@ -673,9 +673,9 @@ const TQString KScanDevice::previewFile() if( !dir.endsWith("/") ) dir += "/"; - TQString fname = dir + TQString::fromLatin1(".previews/"); + TQString fname = dir + TQString::tqfromLatin1(".previews/"); TQString sname( getScannerName(shortScannerName()) ); - sname.replace( '/', "_"); + sname.tqreplace( '/', "_"); return fname+sname; } @@ -901,7 +901,7 @@ void KScanDevice::prepareScan( void ) /** Starts scanning * depending on if a filename is given or not, the function tries to open - * the file using the Qt-Image-IO or really scans the image. + * the file using the TQt-Image-IO or really scans the image. **/ KScanStat KScanDevice::acquire( const TQString& filename ) { @@ -982,8 +982,8 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p ) if( img ) { img->setNumColors( 2 ); - img->setColor( 0, qRgb( 0,0,0)); - img->setColor( 1, qRgb( 255,255,255) ); + img->setColor( 0, tqRgb( 0,0,0)); + img->setColor( 1, tqRgb( 255,255,255) ); } } else if( p->depth == 8 ) @@ -998,7 +998,7 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p ) img->setNumColors( 256 ); for(int i = 0; i<256; i++) - img->setColor(i, qRgb(i,i,i)); + img->setColor(i, tqRgb(i,i,i)); } } else @@ -1084,13 +1084,13 @@ KScanStat KScanDevice::acquire_data( bool isPreview ) if( stat == KSCAN_OK ) { /* initiates Redraw of the Progress-Window */ - qApp->processEvents(); + tqApp->processEvents(); } if( stat == KSCAN_OK ) { overall_bytes = 0; - scanStatus = SSTAT_IN_PROGRESS; + scantqStatus = SSTAT_IN_PROGRESS; pixel_x = 0; pixel_y = 0; overall_bytes = 0; @@ -1115,7 +1115,7 @@ KScanStat KScanDevice::acquire_data( bool isPreview ) do { doProcessABlock(); - if( scanStatus != SSTAT_SILENT ) + if( scantqStatus != SSTAT_SILENT ) { sane_stat = sane_get_parameters( scanner_handle, &sane_scan_param ); kdDebug(29000) << "--ProcessABlock-Loop" << endl; @@ -1126,7 +1126,7 @@ KScanStat KScanDevice::acquire_data( bool isPreview ) kdDebug(29000) << "pixels_per_line : " << sane_scan_param.pixels_per_line << endl; kdDebug(29000) << "bytes_per_line : " << sane_scan_param.bytes_per_line << endl; } - } while ( scanStatus != SSTAT_SILENT ); + } while ( scantqStatus != SSTAT_SILENT ); } } @@ -1247,7 +1247,7 @@ void KScanDevice::slScanFinished( KScanStat status ) void KScanDevice::doProcessABlock( void ) { int val,i; - QRgb col, newCol; + TQRgb col, newCol; SANE_Byte *rptr = 0; SANE_Int bytes_written = 0; @@ -1289,7 +1289,7 @@ void KScanDevice::doProcessABlock( void ) { case SANE_FRAME_RGB: if( sane_scan_param.lines < 1 ) break; - bytes_written += rest_bytes; // die übergebliebenen Bytes dazu + bytes_written += rest_bytes; // die �bergebliebenen Bytes dazu rest_bytes = bytes_written % 3; for( val = 0; val < ((bytes_written-rest_bytes) / 3); val++ ) @@ -1302,7 +1302,7 @@ void KScanDevice::doProcessABlock( void ) if( pixel_x == sane_scan_param.pixels_per_line ) { pixel_x = 0; pixel_y++; } if( pixel_y < img->height()) - img->setPixel( pixel_x, pixel_y, qRgb( red, green,blue )); + img->setPixel( pixel_x, pixel_y, tqRgb( red, green,blue )); pixel_x++; } @@ -1363,25 +1363,25 @@ void KScanDevice::doProcessABlock( void ) col = img->pixel( pixel_x, pixel_y ); - red = qRed( col ); - green = qGreen( col ); - blue = qBlue( col ); + red = tqRed( col ); + green = tqGreen( col ); + blue = tqBlue( col ); chan = *rptr++; switch( sane_scan_param.format ) { case SANE_FRAME_RED : - newCol = qRgba( chan, green, blue, 0xFF ); + newCol = tqRgba( chan, green, blue, 0xFF ); break; case SANE_FRAME_GREEN : - newCol = qRgba( red, chan, blue, 0xFF ); + newCol = tqRgba( red, chan, blue, 0xFF ); break; case SANE_FRAME_BLUE : - newCol = qRgba( red , green, chan, 0xFF ); + newCol = tqRgba( red , green, chan, 0xFF ); break; default: kdDebug(29000) << "Undefined format !" << endl; - newCol = qRgba( 0xFF, 0xFF, 0xFF, 0xFF ); + newCol = tqRgba( 0xFF, 0xFF, 0xFF, 0xFF ); break; } img->setPixel( pixel_x, pixel_y, newCol ); @@ -1410,18 +1410,18 @@ void KScanDevice::doProcessABlock( void ) } } - if( goOn && scanStatus == SSTAT_STOP_NOW ) + if( goOn && scantqStatus == SSTAT_STOP_NOW ) { - /* scanStatus is set to SSTAT_STOP_NOW due to hitting slStopScanning */ + /* scantqStatus is set to SSTAT_STOP_NOW due to hitting slStopScanning */ /* Mostly that one is fired by the STOP-Button in the progress dialog. */ /* This is also hit after the normal finish of the scan. Most probably, - * the QSocketnotifier fires for a few times after the scan has been + * the TQSocketnotifier fires for a few times after the scan has been * cancelled. Does it matter ? To see it, just uncomment the qDebug msg. */ kdDebug(29000) << "Stopping the scan progress !" << endl; goOn = false; - scanStatus = SSTAT_SILENT; + scantqStatus = SSTAT_SILENT; emit( sigScanFinished( KSCAN_OK )); } @@ -1435,13 +1435,13 @@ void KScanDevice::doProcessABlock( void ) { /** Everythings okay, the picture is ready **/ kdDebug(29000) << "last frame reached - scan successful" << endl; - scanStatus = SSTAT_SILENT; + scantqStatus = SSTAT_SILENT; emit( sigScanFinished( KSCAN_OK )); } else { /** EOF und nicht letzter Frame -> Parameter neu belegen und neu starten **/ - scanStatus = SSTAT_NEXT_FRAME; + scantqStatus = SSTAT_NEXT_FRAME; kdDebug(29000) << "EOF, but another frame to scan" << endl; } @@ -1449,7 +1449,7 @@ void KScanDevice::doProcessABlock( void ) if( sane_stat == SANE_STATUS_CANCELLED ) { - scanStatus = SSTAT_STOP_NOW; + scantqStatus = SSTAT_STOP_NOW; kdDebug(29000) << "Scan was cancelled" << endl; // stat = KSCAN_CANCELLED; diff --git a/libkscan/kscandevice.h b/libkscan/kscandevice.h index f52af74d..06a28cfa 100644 --- a/libkscan/kscandevice.h +++ b/libkscan/kscandevice.h @@ -61,11 +61,12 @@ typedef enum { **/ -class KScanDevice : public QObject +class KScanDevice : public TQObject { Q_OBJECT + TQ_OBJECT - /* Hmmm - No Q_PROPS ? */ + /* Hmmm - No TQ_PROPS ? */ public: /** * KScanDevice - the KDE Scanner Device @@ -75,7 +76,7 @@ public: * */ - KScanDevice( TQObject *parent = 0 ); + KScanDevice( TQObject *tqparent = 0 ); /** * Destructor @@ -147,7 +148,7 @@ public: * @param TQImage *image - Pointer to a reserved image * @return the state of the operation in KScanStat */ - KScanStat acquire( const TQString& filename = TQString::null ); + KScanStat acquire( const TQString& filename = TQString() ); /** * returns the default filename of the preview image of this scanner. @@ -157,7 +158,7 @@ public: /** * loads the last saved previewed image on this device from the default file - * @return a bitmap as QImage + * @return a bitmap as TQImage **/ TQImage loadPreviewImage(); @@ -245,13 +246,13 @@ public: * KScanOption. It is internally connected to the scan device, every * change to the widget is automaticly considered by the scan device. * @param name: Name of the SANE Option - * @param parent: pointer to the parent widget + * @param tqparent: pointer to the tqparent widget * @param desc: pointer to the text appearing as widget text * @param tooltip: tooltip text. If zero, the SANE text will be used. **/ - KScanOption *getGuiElement( const TQCString& name, TQWidget *parent, - const TQString& desc = TQString::null, - const TQString& tooltip = TQString::null ); + KScanOption *getGuiElement( const TQCString& name, TQWidget *tqparent, + const TQString& desc = TQString(), + const TQString& tooltip = TQString() ); /** * returns the pointer to an already created Scanoption from the @@ -422,12 +423,12 @@ private: KScanStat createNewImage( SANE_Parameters *p ); // not implemented -// QWidget *entryField( TQWidget *parent, const TQString& text, +// TQWidget *entryField( TQWidget *tqparent, const TQString& text, // const TQString& tooltip ); KScanStat find_options(); // help fct. to process options KScanStat acquire_data( bool isPreview = false ); TQStrList scanner_avail; // list of names of all scan dev. - QStrList option_list; // list of names of all options + TQStrList option_list; // list of names of all options TQStrList dirtyList; // option changes inline TQString optionNotifyString(int) const; @@ -437,7 +438,7 @@ private: TQSocketNotifier *sn; - SCANSTATUS scanStatus; + SCANSTATUS scantqStatus; /* Data for the scan process */ /* This could/should go to a small help object */ diff --git a/libkscan/kscandoc.h b/libkscan/kscandoc.h index 14f1f2c8..ca57150a 100644 --- a/libkscan/kscandoc.h +++ b/libkscan/kscandoc.h @@ -95,7 +95,7 @@ Small dialog which enables scanning source selection, e.g. Flatbed, automatic do - ScanParams\n The ScanParams class is the actual core of the - KScan Library in terms of interface layout. The ScanParams class provides a ready-to-use interface for the selected scanner.\n + KScan Library in terms of interface tqlayout. The ScanParams class provides a ready-to-use interface for the selected scanner.\n \n The scanner device is analyzed in this class and dynamically generates an interface, according to the device's properties, containing the most important operational elements. These are currently diff --git a/libkscan/kscanoption.cpp b/libkscan/kscanoption.cpp index 2bf20d48..108d1c79 100644 --- a/libkscan/kscanoption.cpp +++ b/libkscan/kscanoption.cpp @@ -177,7 +177,7 @@ KScanOption::KScanOption( const KScanOption &so ) : /* the widget is not copied ! */ internal_widget = 0; - if( ! ( desc && name ) ) + if ( ! ( desc && !name.isNull() ) ) { kdWarning( 29000) << "Trying to copy a not healthy option (no name nor desc)" << endl; return; @@ -317,15 +317,15 @@ void KScanOption::slRedrawWidget( KScanOption *so ) break; case GAMMA_TABLE: /* Widget Type is GammaTable */ - // w = new TQSlider( parent, "AUTO_GAMMA" ); + // w = new TQSlider( tqparent, "AUTO_GAMMA" ); break; case STR_LIST: - // w = comboBox( parent, text ); + // w = comboBox( tqparent, text ); ((KScanCombo*)w)->slSetEntry( so->get() ); /* Widget Type is Selection Box */ break; case STRING: - // w = entryField( parent, text ); + // w = entryField( tqparent, text ); ((KScanEntry*)w)->slSetEntry( so->get() ); /* Widget Type is Selection Box */ break; @@ -732,7 +732,7 @@ bool KScanOption::set( const TQCString& c_string ) TQRegExp re( "\\d+, \\d+, \\d+" ); re.setMinimal(true); - if( TQString(c_string).contains( re )) + if( TQString(c_string).tqcontains( re )) { TQStringList relist = TQStringList::split( ", ", TQString(c_string) ); @@ -1059,7 +1059,7 @@ bool KScanOption::getRange( double *min, double *max, double *q ) const return( ret ); } -TQWidget *KScanOption::createWidget( TQWidget *parent, const TQString& w_desc, +TQWidget *KScanOption::createWidget( TQWidget *tqparent, const TQString& w_desc, const TQString& tooltip ) { TQStrList list; @@ -1084,31 +1084,31 @@ TQWidget *KScanOption::createWidget( TQWidget *parent, const TQString& w_desc, { case BOOL: /* Widget Type is ToggleButton */ - w = new TQCheckBox( text, parent, "AUTO_TOGGLE_BUTTON" ); + w = new TQCheckBox( text, tqparent, "AUTO_TOGGLE_BUTTON" ); connect( w, TQT_SIGNAL(clicked()), this, TQT_SLOT(slWidgetChange())); break; case SINGLE_VAL: /* Widget Type is Entry-Field */ - w = 0; // new QEntryField( + w = 0; // new TQEntryField( kdDebug(29000) << "can not create widget for SINGLE_VAL!" << endl; break; case RANGE: /* Widget Type is Slider */ - w = KSaneSlider( parent, text ); + w = KSaneSlider( tqparent, text ); break; case GAMMA_TABLE: /* Widget Type is Slider */ - // w = KSaneSlider( parent, text ); + // w = KSaneSlider( tqparent, text ); kdDebug(29000) << "can not create widget for GAMMA_TABLE!" << endl; w = 0; // No widget, needs to be a set ! break; case STR_LIST: - w = comboBox( parent, text ); + w = comboBox( tqparent, text ); /* Widget Type is Selection Box */ break; case STRING: - w = entryField( parent, text ); + w = entryField( tqparent, text ); /* Widget Type is Selection Box */ break; default: @@ -1137,11 +1137,11 @@ TQWidget *KScanOption::createWidget( TQWidget *parent, const TQString& w_desc, } -TQWidget *KScanOption::comboBox( TQWidget *parent, const TQString& text ) +TQWidget *KScanOption::comboBox( TQWidget *tqparent, const TQString& text ) { TQStrList list = getList(); - KScanCombo *cb = new KScanCombo( parent, text, list); + KScanCombo *cb = new KScanCombo( tqparent, text, list); connect( cb, TQT_SIGNAL( valueChanged( const TQCString& )), this, TQT_SLOT( slWidgetChange( const TQCString& ))); @@ -1150,9 +1150,9 @@ TQWidget *KScanOption::comboBox( TQWidget *parent, const TQString& text ) } -TQWidget *KScanOption::entryField( TQWidget *parent, const TQString& text ) +TQWidget *KScanOption::entryField( TQWidget *tqparent, const TQString& text ) { - KScanEntry *ent = new KScanEntry( parent, text ); + KScanEntry *ent = new KScanEntry( tqparent, text ); connect( ent, TQT_SIGNAL( valueChanged( TQCString )), this, TQT_SLOT( slWidgetChange( TQCString ))); @@ -1160,12 +1160,12 @@ TQWidget *KScanOption::entryField( TQWidget *parent, const TQString& text ) } -TQWidget *KScanOption::KSaneSlider( TQWidget *parent, const TQString& text ) +TQWidget *KScanOption::KSaneSlider( TQWidget *tqparent, const TQString& text ) { double min, max, quant; getRange( &min, &max, &quant ); - KScanSlider *slider = new KScanSlider( parent, text, min, max ); + KScanSlider *slider = new KScanSlider( tqparent, text, min, max ); /* Connect to the options change Slot */ connect( slider, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT( slWidgetChange(int))); diff --git a/libkscan/kscanoption.h b/libkscan/kscanoption.h index fc1e8a0a..d26ddd10 100644 --- a/libkscan/kscanoption.h +++ b/libkscan/kscanoption.h @@ -57,9 +57,10 @@ class KGammaTable; **/ -class KScanOption : public QObject +class KScanOption : public TQObject { Q_OBJECT + TQ_OBJECT public: /** @@ -148,9 +149,9 @@ public: * **/ - TQWidget *createWidget( TQWidget *parent, - const TQString& w_desc = TQString::null, - const TQString& tooltip = TQString::null ); + TQWidget *createWidget( TQWidget *tqparent, + const TQString& w_desc = TQString(), + const TQString& tooltip = TQString() ); /* Operators */ const KScanOption& operator= (const KScanOption& so ); @@ -237,9 +238,9 @@ private: bool initOption( const TQCString& new_name ); void *allocBuffer( long ); - TQWidget *entryField ( TQWidget *parent, const TQString& text ); - TQWidget *KSaneSlider( TQWidget *parent, const TQString& text ); - TQWidget *comboBox ( TQWidget *parent, const TQString& text ); + TQWidget *entryField ( TQWidget *tqparent, const TQString& text ); + TQWidget *KSaneSlider( TQWidget *tqparent, const TQString& text ); + TQWidget *comboBox ( TQWidget *tqparent, const TQString& text ); const SANE_Option_Descriptor *desc; TQCString name; diff --git a/libkscan/kscanoptset.cpp b/libkscan/kscanoptset.cpp index eac44987..91b6e196 100644 --- a/libkscan/kscanoptset.cpp +++ b/libkscan/kscanoptset.cpp @@ -81,12 +81,12 @@ bool KScanOptSet::backupOption( const KScanOption& opt ) /** Allocate a new option and store it **/ const TQCString& optName = opt.getName(); - if( !optName ) + if( optName.isNull() ) retval = false; if( retval ) { - KScanOption *newopt = find( optName ); + KScanOption *newopt = tqfind( optName ); if( newopt ) { diff --git a/libkscan/kscanslider.cpp b/libkscan/kscanslider.cpp index e79634bd..4e04f095 100644 --- a/libkscan/kscanslider.cpp +++ b/libkscan/kscanslider.cpp @@ -31,10 +31,10 @@ #include <kdebug.h> #include "kscanslider.h" -KScanSlider::KScanSlider( TQWidget *parent, const TQString& text, +KScanSlider::KScanSlider( TQWidget *tqparent, const TQString& text, double min, double max, bool haveStdButt, int stdValue ) - : TQFrame( parent ), + : TQFrame( tqparent ), m_stdValue( stdValue ), m_stdButt(0) { @@ -53,15 +53,15 @@ KScanSlider::KScanSlider( TQWidget *parent, const TQString& text, this, TQT_SLOT(slRevertValue())); TQToolTip::add( m_stdButt, - i18n( "Revert value back to its standard value %1" ).arg( stdValue )); + i18n( "Revert value back to its standard value %1" ).tqarg( stdValue )); hb->addWidget( m_stdButt, 0 ); hb->addSpacing( 4 ); } - slider = new TQSlider( (int) min, (int)max, 1, (int)min, TQSlider::Horizontal, this, "AUTO_SLIDER_" ); + slider = new TQSlider( (int) min, (int)max, 1, (int)min, Qt::Horizontal, this, "AUTO_SLIDER_" ); slider->setTickmarks( TQSlider::Below ); - slider->setTickInterval( int(QMAX( (max-min)/10, 1 )) ); - slider->setSteps( int(QMAX( (max-min)/20, 1) ), int(QMAX( (max-min)/10, 1) ) ); + slider->setTickInterval( int(TQMAX( (max-min)/10, 1 )) ); + slider->setSteps( int(TQMAX( (max-min)/20, 1) ), int(TQMAX( (max-min)/10, 1) ) ); slider->setMinimumWidth( 140 ); /* set a buddy */ l1->setBuddy( slider ); @@ -82,7 +82,7 @@ KScanSlider::KScanSlider( TQWidget *parent, const TQString& text, /* set Value 0 to the widget */ slider->setValue( (int) min -1 ); - /* Add to layout widget and activate */ + /* Add to tqlayout widget and activate */ hb->addWidget( slider, 36 ); hb->addSpacing( 4 ); hb->addWidget( m_spin, 0 ); @@ -149,8 +149,8 @@ KScanSlider::~KScanSlider() /* ====================================================================== */ -KScanEntry::KScanEntry( TQWidget *parent, const TQString& text ) - : TQFrame( parent ) +KScanEntry::KScanEntry( TQWidget *tqparent, const TQString& text ) + : TQFrame( tqparent ) { TQHBoxLayout *hb = new TQHBoxLayout( this ); @@ -170,7 +170,7 @@ KScanEntry::KScanEntry( TQWidget *parent, const TQString& text ) TQString KScanEntry::text( void ) const { - TQString str = TQString::null; + TQString str = TQString(); // kdDebug(29000) << "entry is "<< entry << endl; if(entry) { @@ -213,9 +213,9 @@ void KScanEntry::slReturnPressed( void ) -KScanCombo::KScanCombo( TQWidget *parent, const TQString& text, +KScanCombo::KScanCombo( TQWidget *tqparent, const TQString& text, const TQStrList& list ) - : TQHBox( parent ), + : TQHBox( tqparent ), combo(0) { createCombo( text ); @@ -224,9 +224,9 @@ KScanCombo::KScanCombo( TQWidget *parent, const TQString& text, combolist = list; } -KScanCombo::KScanCombo( TQWidget *parent, const TQString& text, +KScanCombo::KScanCombo( TQWidget *tqparent, const TQString& text, const TQStringList& list ) - : TQHBox( parent ), + : TQHBox( tqparent ), combo(0) { createCombo( text ); @@ -260,7 +260,7 @@ void KScanCombo::createCombo( const TQString& text ) void KScanCombo::slSetEntry( const TQString &t ) { if( t.isNull() ) return; - int i = combolist.find( t.local8Bit() ); + int i = combolist.tqfind( t.local8Bit() ); /* Important to check value to avoid recursive signals ;) */ if( i == combo->currentItem() ) diff --git a/libkscan/kscanslider.h b/libkscan/kscanslider.h index 9d95bd7c..30fc6464 100644 --- a/libkscan/kscanslider.h +++ b/libkscan/kscanslider.h @@ -42,16 +42,17 @@ class TQLabel; * * @author Klaas Freitag <freitag@suse.de> */ -class KScanSlider : public QFrame +class KScanSlider : public TQFrame { Q_OBJECT - Q_PROPERTY( int slider_val READ value WRITE slSetSlider ) + TQ_OBJECT + TQ_PROPERTY( int slider_val READ value WRITE slSetSlider ) public: /** * Create the slider. * - * @param parent parent widget + * @param tqparent tqparent widget * @param text is the text describing the the slider value. If the text * contains a '&', a buddy for the slider will be created. * @param min minimum slider value @@ -60,7 +61,7 @@ public: * appears on the left of the slider. * @param stdValue the value to which the standard button resets the slider. */ - KScanSlider( TQWidget *parent, const TQString& text, + KScanSlider( TQWidget *tqparent, const TQString& text, double min, double max, bool haveStdButt=false, int stdValue=0); /** @@ -101,8 +102,8 @@ private slots: void slSliderChange( int ); private: - QSlider *slider; - QLabel *l1, *numdisp; + TQSlider *slider; + TQLabel *l1, *numdisp; TQSpinBox *m_spin; int m_stdValue; TQPushButton *m_stdButt; @@ -114,18 +115,19 @@ private: /** * a entry field with a prefix text for description. */ -class KScanEntry : public QFrame +class KScanEntry : public TQFrame { Q_OBJECT - Q_PROPERTY( TQString text READ text WRITE slSetEntry ) + TQ_OBJECT + TQ_PROPERTY( TQString text READ text WRITE slSetEntry ) public: /** * create a new entry field prepended by text. - * @param parent the parent widget + * @param tqparent the tqparent widget * @text the prefix text */ - KScanEntry( TQWidget *parent, const TQString& text ); + KScanEntry( TQWidget *tqparent, const TQString& text ); // ~KScanEntry(); /** @@ -167,21 +169,22 @@ private: /** * a combobox filled with a decriptional text. */ -class KScanCombo : public QHBox +class KScanCombo : public TQHBox { Q_OBJECT - Q_PROPERTY( TQString cbEntry READ currentText WRITE slSetEntry ) + TQ_OBJECT + TQ_PROPERTY( TQString cbEntry READ currentText WRITE slSetEntry ) public: /** * create a combobox with prepended text. * - * @param parent parent widget + * @param tqparent tqparent widget * @param text the text the combobox is prepended by * @param list a stringlist with values the list should contain. */ - KScanCombo( TQWidget *parent, const TQString& text, const TQStrList& list ); - KScanCombo( TQWidget *parent, const TQString& text, const TQStringList& list ); + KScanCombo( TQWidget *tqparent, const TQString& text, const TQStrList& list ); + KScanCombo( TQWidget *tqparent, const TQString& text, const TQStringList& list ); // ~KScanCombo(); /** @@ -234,8 +237,8 @@ signals: private: void createCombo( const TQString& text ); - QComboBox *combo; - QStrList combolist; + TQComboBox *combo; + TQStrList combolist; class KScanComboPrivate; KScanComboPrivate *d; diff --git a/libkscan/massscandialog.cpp b/libkscan/massscandialog.cpp index 9d4a5f91..372d2a7c 100644 --- a/libkscan/massscandialog.cpp +++ b/libkscan/massscandialog.cpp @@ -30,8 +30,8 @@ #include "massscandialog.h" -MassScanDialog::MassScanDialog( TQWidget *parent ) - :TQDialog( parent, "MASS_SCAN", true ) +MassScanDialog::MassScanDialog( TQWidget *tqparent ) + :TQDialog( tqparent, "MASS_SCAN", true ) { setCaption( i18n( "ADF Scanning" )); kdDebug(29000) << "Starting MassScanDialog!" << endl; diff --git a/libkscan/massscandialog.h b/libkscan/massscandialog.h index dc1120b5..1cd68153 100644 --- a/libkscan/massscandialog.h +++ b/libkscan/massscandialog.h @@ -30,11 +30,12 @@ class TQLabel; *@author Klaas Freitag */ -class MassScanDialog : public QDialog +class MassScanDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - MassScanDialog( TQWidget *parent); + MassScanDialog( TQWidget *tqparent); ~MassScanDialog(); public slots: diff --git a/libkscan/previewer.cpp b/libkscan/previewer.cpp index ec1f9065..5fde3f06 100644 --- a/libkscan/previewer.cpp +++ b/libkscan/previewer.cpp @@ -106,8 +106,8 @@ public: TQMemArray<long> m_widthSum; }; -Previewer::Previewer(TQWidget *parent, const char *name ) - : TQWidget(parent,name) +Previewer::Previewer(TQWidget *tqparent, const char *name ) + : TQWidget(tqparent,name) { d = new PreviewerPrivate(); @@ -119,10 +119,10 @@ Previewer::Previewer(TQWidget *parent, const char *name ) htop->addWidget( frame ); TQVBoxLayout *top = new TQVBoxLayout( frame, KDialog::marginHint(), KDialog::spacingHint() ); - layout = new TQHBoxLayout( KDialog::spacingHint() ); - top->addLayout( layout, 9 ); + tqlayout = new TQHBoxLayout( KDialog::spacingHint() ); + top->addLayout( tqlayout, 9 ); TQVBoxLayout *left = new TQVBoxLayout( KDialog::spacingHint() ); - layout->addLayout( left, 2 ); + tqlayout->addLayout( left, 2 ); /* Load autoselection values from Config file */ KConfig *cfg = KGlobal::config(); @@ -141,17 +141,17 @@ Previewer::Previewer(TQWidget *parent, const char *name ) img_canvas->setDefaultScaleKind( ImageCanvas::DYNAMIC ); img_canvas->enableContextMenu(true); - img_canvas->repaint(); - layout->addWidget( img_canvas, 6 ); + img_canvas->tqrepaint(); + tqlayout->addWidget( img_canvas, 6 ); /* Actions for the previewer zoom */ KAction *act; act = new KAction(i18n("Scale to W&idth"), "scaletowidth", CTRL+Key_I, - this, TQT_SLOT( slScaleToWidth()), this, "preview_scaletowidth" ); + TQT_TQOBJECT(this), TQT_SLOT( slScaleToWidth()), TQT_TQOBJECT(this), "preview_scaletowidth" ); act->plug( img_canvas->contextMenu()); act = new KAction(i18n("Scale to &Height"), "scaletoheight", CTRL+Key_H, - this, TQT_SLOT( slScaleToHeight()), this, "preview_scaletoheight" ); + TQT_TQOBJECT(this), TQT_SLOT( slScaleToHeight()), TQT_TQOBJECT(this), "preview_scaletoheight" ); act->plug( img_canvas->contextMenu()); /*Signals: Control the custom-field and show size of selection */ @@ -200,7 +200,7 @@ Previewer::Previewer(TQWidget *parent, const char *name ) /** Autoselection Box **/ - d->m_autoSelGroup = new TQGroupBox( 1, Horizontal, i18n("Auto-Selection"), frame); + d->m_autoSelGroup = new TQGroupBox( 1,Qt::Horizontal, i18n("Auto-Selection"), frame); TQHBox *hbox = new TQHBox(d->m_autoSelGroup); d->m_cbAutoSel = new TQCheckBox( i18n("Active on"), hbox ); @@ -246,7 +246,7 @@ Previewer::Previewer(TQWidget *parent, const char *name ) left->addWidget(d->m_autoSelGroup); /* Labels for the dimension */ - TQGroupBox *gbox = new TQGroupBox( 1, Horizontal, i18n("Selection"), frame, "GROUPBOX" ); + TQGroupBox *gbox = new TQGroupBox( 1,Qt::Horizontal, i18n("Selection"), frame, "GROUPBOX" ); TQLabel *l2 = new TQLabel( i18n("width - mm" ), gbox ); TQLabel *l3 = new TQLabel( i18n("height - mm" ), gbox ); @@ -477,11 +477,11 @@ void Previewer::slNewDimen(TQRect r) selectionHeightMm = (overallHeight / 1000 * r.height()); TQString s; - s = i18n("width %1 mm").arg( int(selectionWidthMm)); + s = i18n("width %1 mm").tqarg( int(selectionWidthMm)); emit(setScanWidth(s)); kdDebug(29000) << "Setting new Dimension " << s << endl; - s = i18n("height %1 mm").arg(int(selectionHeightMm)); + s = i18n("height %1 mm").tqarg(int(selectionHeightMm)); emit(setScanHeight(s)); recalcFileSize( ); @@ -727,7 +727,7 @@ void Previewer::findSelection( ) for( x = 0; x < iWidth; x++ ) { - int gray = qGray( img->pixel( x, line )); + int gray = tqGray( img->pixel( x, line )); // kdDebug(29000) << "Gray-Value at line " << gray << endl; Q_ASSERT( line < iHeight ); Q_ASSERT( x < iWidth ); diff --git a/libkscan/previewer.h b/libkscan/previewer.h index 6d9a7b10..45a270ea 100644 --- a/libkscan/previewer.h +++ b/libkscan/previewer.h @@ -40,11 +40,12 @@ class TQComboBox; class TQRadioButton; class TQHBoxLayout; -class Previewer : public QWidget +class Previewer : public TQWidget { Q_OBJECT + TQ_OBJECT public: - Previewer(TQWidget *parent=0, const char *name=0); + Previewer(TQWidget *tqparent=0, const char *name=0); ~Previewer(); ImageCanvas *getImageCanvas( void ){ return( img_canvas ); } @@ -88,7 +89,7 @@ private: TQPoint calcPercent( int, int ); - TQHBoxLayout *layout; + TQHBoxLayout *tqlayout; ImageCanvas *img_canvas; TQComboBox *pre_format_combo; TQMemArray<TQCString> format_ids; diff --git a/libkscan/scandialog.cpp b/libkscan/scandialog.cpp index 2e3db229..bc9a7854 100644 --- a/libkscan/scandialog.cpp +++ b/libkscan/scandialog.cpp @@ -51,34 +51,34 @@ extern "C" { } } -ScanDialogFactory::ScanDialogFactory( TQObject *parent, const char *name ) - : KScanDialogFactory( parent, name ) +ScanDialogFactory::ScanDialogFactory( TQObject *tqparent, const char *name ) + : KScanDialogFactory( tqparent, name ) { setName( "ScanDialogFactory" ); - KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkscan") ); + KGlobal::locale()->insertCatalogue( TQString::tqfromLatin1("libkscan") ); } -KScanDialog * ScanDialogFactory::createDialog( TQWidget *parent, +KScanDialog * ScanDialogFactory::createDialog( TQWidget *tqparent, const char *name, bool modal) { - return new ScanDialog( parent, name, modal ); + return new ScanDialog( tqparent, name, modal ); } /////////////////////////////////////////////////////////////////// -ScanDialog::ScanDialog( TQWidget *parent, const char *name, bool modal ) - : KScanDialog( Tabbed, Close|Help, parent, name, modal ), +ScanDialog::ScanDialog( TQWidget *tqparent, const char *name, bool modal ) + : KScanDialog( Tabbed, Close|Help, tqparent, name, modal ), good_scan_connect(false) { TQVBox *page = addVBoxPage( i18n("&Scanning") ); - splitter = new TQSplitter( Horizontal, page, "splitter" ); + splitter = new TQSplitter(Qt::Horizontal, page, "splitter" ); Q_CHECK_PTR( splitter ); m_scanParams = 0; - m_device = new KScanDevice( this ); + m_device = new KScanDevice( TQT_TQOBJECT(this) ); connect(m_device, TQT_SIGNAL(sigNewImage(TQImage *, ImgScanInfo*)), this, TQT_SLOT(slotFinalImage(TQImage *, ImgScanInfo *))); @@ -113,7 +113,7 @@ void ScanDialog::createOptionsTab( void ) TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Startup Options"), page, "GB_STARTUP" ); TQLabel *label = new TQLabel( i18n( "Note: changing these options will affect the scan plugin on next start." ), gb ); - label->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); + label->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); /* Checkbox for asking for scanner on startup */ cb_askOnStart = new TQCheckBox( i18n( "&Ask for the scan device on plugin startup"), gb ); @@ -130,7 +130,7 @@ void ScanDialog::createOptionsTab( void ) /* Read settings for startup behavior */ KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); bool onlyLocal = gcfg->readBoolEntry( STARTUP_ONLY_LOCAL, false ); @@ -144,7 +144,7 @@ void ScanDialog::createOptionsTab( void ) TQWidget *spaceEater = new TQWidget( page ); Q_CHECK_PTR( spaceEater ); - spaceEater->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding) ); + spaceEater->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding) ); } @@ -154,7 +154,7 @@ void ScanDialog::slotNetworkToggle( bool state) kdDebug(29000) << "slotNetworkToggle: Writing state " << writestate << endl; KConfig *c = KGlobal::config(); - c->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + c->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); c->writeEntry( STARTUP_ONLY_LOCAL, writestate, true, true ); } @@ -164,7 +164,7 @@ void ScanDialog::slotAskOnStartToggle(bool state) kdDebug(29000) << "slotAskOnStartToggle: Writing state " << writestate << endl; KConfig *c = KGlobal::config(); - c->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + c->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); c->writeEntry( STARTUP_SKIP_ASK, writestate, true, true ); } @@ -176,7 +176,7 @@ void ScanDialog::slotScanStart( ) KLed *led = m_scanParams->operationLED(); if( led ) { - led->setColor( Qt::red ); + led->setColor( TQt::red ); led->setState( KLed::On ); } @@ -190,7 +190,7 @@ void ScanDialog::slotAcquireStart( ) KLed *led = m_scanParams->operationLED(); if( led ) { - led->setColor( Qt::green ); + led->setColor( TQt::green ); } } @@ -205,7 +205,7 @@ void ScanDialog::slotScanFinished( KScanStat status ) KLed *led = m_scanParams->operationLED(); if( led ) { - led->setColor( Qt::green ); + led->setColor( TQt::green ); led->setState( KLed::Off ); } @@ -314,7 +314,7 @@ bool ScanDialog::setup() kfg->setGroup( GROUP_STARTUP ); /* Since this is a vertical splitter, only the width is important */ - TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width()); + TQString key = TQString::tqfromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width()); kdDebug(29000) << "Read Splitter-Sizes " << key << endl; splitter->setSizes( kfg->readIntListEntry( key )); } @@ -336,7 +336,7 @@ void ScanDialog::slotClose() kfg->setGroup( GROUP_STARTUP ); /* Since this is a vertical splitter, only the width is important */ - TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width()); + TQString key = TQString::tqfromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width()); kfg->writeEntry( key, splitter->sizes(), true, true); } } diff --git a/libkscan/scandialog.h b/libkscan/scandialog.h index 71667326..5077f050 100644 --- a/libkscan/scandialog.h +++ b/libkscan/scandialog.h @@ -32,9 +32,10 @@ class TQSplitter; class ScanDialog : public KScanDialog { Q_OBJECT + TQ_OBJECT public: - ScanDialog( TQWidget *parent=0, const char *name=0, bool modal=false ); + ScanDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false ); ~ScanDialog(); virtual bool setup(); @@ -71,10 +72,10 @@ private: class ScanDialogFactory : public KScanDialogFactory { public: - ScanDialogFactory( TQObject *parent=0, const char *name=0 ); + ScanDialogFactory( TQObject *tqparent=0, const char *name=0 ); protected: - virtual KScanDialog * createDialog( TQWidget *parent=0, const char *name=0, + virtual KScanDialog * createDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false ); diff --git a/libkscan/scanparams.cpp b/libkscan/scanparams.cpp index b121c77d..f8d21121 100644 --- a/libkscan/scanparams.cpp +++ b/libkscan/scanparams.cpp @@ -53,8 +53,8 @@ -ScanParams::ScanParams( TQWidget *parent, const char *name ) - : TQVBox( parent, name ), +ScanParams::ScanParams( TQWidget *tqparent, const char *name ) + : TQVBox( tqparent, name ), m_firstGTEdit( true ) { /* first some initialisation and debug messages */ @@ -111,7 +111,7 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice ) /* initialise own widgets */ cb_gray_preview = 0; - /* A top layout box */ + /* A top tqlayout box */ // TQVBoxLayout *top = new TQVBoxLayout(this, 6); TQHBox *hb = new TQHBox( this ); hb->setSpacing( KDialog::spacingHint() ); @@ -120,7 +120,7 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice ) (void ) new TQLabel( cap, hb ); m_led = new KLed( hb ); m_led->setState( KLed::Off ); - m_led->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed )); + m_led->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed )); (void) new KSeparator( KSeparator::HLine, this); @@ -160,7 +160,7 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice ) connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slStartScan()) ); pb = kbb->addButton( i18n( "&Preview Scan" )); connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slAcquirePreview()) ); - kbb->layout(); + kbb->tqlayout(); /* Initialise the progress dialog */ progressDialog = new TQProgressDialog( i18n("Scanning in progress"), @@ -501,9 +501,9 @@ TQScrollView *ScanParams::scannerParams( ) } TQWidget *spacer = new TQWidget( pbox ); - spacer->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); + spacer->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); - pbox->setMinimumWidth( pbox->sizeHint().width() ); + pbox->setMinimumWidth( pbox->tqsizeHint().width() ); sv->setMinimumWidth( pbox->minimumWidth() ); sv->addChild( pbox ); @@ -547,7 +547,7 @@ void ScanParams::slSourceSelect( void ) sources = so.getList(); #undef CHEAT_FOR_DEBUGGING #ifdef CHEAT_FOR_DEBUGGING - if( sources.find( "Automatic Document Feeder" ) == -1) + if( sources.tqfind( "Automatic Document Feeder" ) == -1) sources.append( "Automatic Document Feeder" ); #endif @@ -575,7 +575,7 @@ void ScanParams::slSourceSelect( void ) * images, if a single file is selected, the virt Scanner just reads * one file. * If SANE Debug Mode is selected, only pnm can be loaded. - * on Qt mode, all available Qt-Formats are ok. + * on TQt mode, all available TQt-Formats are ok. */ void ScanParams::slFileSelect( void ) { @@ -583,7 +583,7 @@ void ScanParams::slFileSelect( void ) TQString filter; TQCString prefix = "\n*."; - if( scan_mode == ID_QT_IMGIO ) + if( scan_mode == ID_TQT_IMGIO ) { TQStrList filterList = TQImage::inputFormats(); filter = i18n( "*|All Files (*)"); @@ -591,7 +591,7 @@ void ScanParams::slFileSelect( void ) fi_item = filterList.next() ) { - filter.append( TQString::fromLatin1( prefix + fi_item.lower()) ); + filter.append( TQString::tqfromLatin1( prefix + fi_item.lower()) ); } } else @@ -616,7 +616,7 @@ void ScanParams::slFileSelect( void ) if ( !fileName.isNull() && virt_filename ) { // got a file name kdDebug(29000) << "Got fileName: " << fileName << endl; // write Value to SANEOption, it updates itself. - virt_filename->set( TQFile::encodeName( fileName ) ); + virt_filename->set( TQFile::encodeName( fileName ).data() ); } } @@ -626,7 +626,7 @@ void ScanParams::slFileSelect( void ) void ScanParams::slVirtScanModeSelect( int id ) { if( id == 0 ) { - scan_mode = ID_SANE_DEBUG; /* , ID_QT_IMGIO */ + scan_mode = ID_SANE_DEBUG; /* , ID_TQT_IMGIO */ sane_device->guiSetEnabled( "three-pass", true ); sane_device->guiSetEnabled( "grayify", true ); sane_device->guiSetEnabled( SANE_NAME_CONTRAST, true ); @@ -638,11 +638,11 @@ void ScanParams::slVirtScanModeSelect( int id ) kdDebug(29000) << "Found File in Filename-Option: " << vf << endl; TQFileInfo fi( vf ); - if( fi.extension() != TQString::fromLatin1("pnm") ) + if( fi.extension() != TQString::tqfromLatin1("pnm") ) virt_filename->set(TQCString("")); } } else { - scan_mode = ID_QT_IMGIO; + scan_mode = ID_TQT_IMGIO; sane_device->guiSetEnabled( "three-pass", false ); sane_device->guiSetEnabled( "grayify", false ); sane_device->guiSetEnabled( SANE_NAME_CONTRAST, false ); @@ -672,13 +672,13 @@ void ScanParams::virtualScannerParams( void ) - TQRadioButton *rb2 = new TQRadioButton( i18n("virt. Scan (all Qt modes)"), - bg_virt_scan_mode, "VirtScanQtModes" ); + TQRadioButton *rb2 = new TQRadioButton( i18n("virt. Scan (all TQt modes)"), + bg_virt_scan_mode, "VirtScanTQtModes" ); rb1->setChecked( true ); rb2->setChecked( false ); - if( scan_mode == ID_QT_IMGIO ) + if( scan_mode == ID_TQT_IMGIO ) { rb2->setChecked( true ); rb1->setChecked( false ); @@ -695,7 +695,7 @@ void ScanParams::virtualScannerParams( void ) TQHBoxLayout *hb = new TQHBoxLayout(); top->addLayout( hb ); w = virt_filename->widget(); - w->setMinimumHeight( (w->sizeHint()).height()); + w->setMinimumHeight( (w->tqsizeHint()).height()); connect( w, TQT_SIGNAL(returnPressed()), this, TQT_SLOT( slCheckGlob())); @@ -766,7 +766,7 @@ void ScanParams::slStartScan( void ) kdDebug(29000) << "Called start-scan-Slot!" << endl; TQString q; - if( scan_mode == ID_SANE_DEBUG || scan_mode == ID_QT_IMGIO ) + if( scan_mode == ID_SANE_DEBUG || scan_mode == ID_TQT_IMGIO ) { if( virt_filename ) q = virt_filename->get(); @@ -798,7 +798,7 @@ void ScanParams::slStartScan( void ) // stat = performADFScan(); } } else { - kdDebug(29000) << "Reading dir by Qt-internal imagereading file " << q << endl; + kdDebug(29000) << "Reading dir by TQt-internal imagereading file " << q << endl; sane_device->acquire( q ); } } diff --git a/libkscan/scanparams.h b/libkscan/scanparams.h index 7508cdb9..d3536e42 100644 --- a/libkscan/scanparams.h +++ b/libkscan/scanparams.h @@ -42,16 +42,17 @@ class TQPushButton; class TQCheckBox; class TQButtonGroup; -typedef enum { ID_SANE_DEBUG, ID_QT_IMGIO, ID_SCAN } ScanMode; +typedef enum { ID_SANE_DEBUG, ID_TQT_IMGIO, ID_SCAN } ScanMode; -class ScanParams : public QVBox +class ScanParams : public TQVBox { Q_OBJECT + TQ_OBJECT public: - ScanParams( TQWidget *parent, const char *name = 0); + ScanParams( TQWidget *tqparent, const char *name = 0); ~ScanParams(); #if 0 - TQSize sizeHint( ); + TQSize tqsizeHint( ); #endif bool connectDevice( KScanDevice* ); @@ -60,7 +61,7 @@ public: public slots: /** * In this slot, a custom scan window can be set, e.g. through a preview - * image with a area selector. The QRect-param needs to contain values + * image with a area selector. The TQRect-param needs to contain values * between 0 and 1000, which are interpreted as tenth of percent of the * whole image dimensions. **/ diff --git a/libkscan/scansourcedialog.cpp b/libkscan/scansourcedialog.cpp index fcb3fc25..2edac6f8 100644 --- a/libkscan/scansourcedialog.cpp +++ b/libkscan/scansourcedialog.cpp @@ -45,8 +45,8 @@ extern "C"{ #endif -ScanSourceDialog::ScanSourceDialog( TQWidget *parent, const TQStrList list, ADF_BEHAVE adfBehave ) - : KDialogBase( parent, "SOURCE_DIALOG", true, i18n("Scan Source Selection"), +ScanSourceDialog::ScanSourceDialog( TQWidget *tqparent, const TQStrList list, ADF_BEHAVE adfBehave ) + : KDialogBase( tqparent, "SOURCE_DIALOG", true, i18n("Scan Source Selection"), Ok|Cancel,Ok, true) { TQVBox *vbox = makeVBoxMainWidget(); diff --git a/libkscan/scansourcedialog.h b/libkscan/scansourcedialog.h index 61ae4a6e..3b0662d8 100644 --- a/libkscan/scansourcedialog.h +++ b/libkscan/scansourcedialog.h @@ -37,8 +37,9 @@ class TQButtonGroup; class ScanSourceDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ScanSourceDialog( TQWidget *parent, const TQStrList, ADF_BEHAVE ); + ScanSourceDialog( TQWidget *tqparent, const TQStrList, ADF_BEHAVE ); ~ScanSourceDialog(); // void fillWithSources( TQStrList *list ); diff --git a/libkscan/sizeindicator.cpp b/libkscan/sizeindicator.cpp index bd259bd3..3b0a2a18 100644 --- a/libkscan/sizeindicator.cpp +++ b/libkscan/sizeindicator.cpp @@ -29,12 +29,12 @@ -SizeIndicator::SizeIndicator( TQWidget *parent, long thres, long crit ) - :TQLabel( parent ) +SizeIndicator::SizeIndicator( TQWidget *tqparent, long thres, long crit ) + :TQLabel( tqparent ) { sizeInByte = -1; setFrameStyle( TQFrame::Box | TQFrame::Sunken ); - setMinimumWidth( fontMetrics().width( TQString::fromLatin1("MMM.MM MB") )); + setMinimumWidth( fontMetrics().width( TQString::tqfromLatin1("MMM.MM MB") )); setCritical( crit ); threshold = thres; @@ -79,7 +79,7 @@ void SizeIndicator::setSizeInByte( long newSize ) fwidth = 2; } - t = unit.arg( sizer, fwidth, 'f', precision); + t = unit.tqarg( sizer, fwidth, 'f', precision); setText(t); } @@ -100,7 +100,7 @@ void SizeIndicator::drawContents( TQPainter *p ) warnColor.setHsv( 0, c, c ); p->drawImage( 0,0, - KImageEffect::unbalancedGradient( s, colorGroup().background(), + KImageEffect::unbalancedGradient( s, tqcolorGroup().background(), warnColor, KImageEffect::CrossDiagonalGradient, 200,200 )); } /* Displaying the text */ diff --git a/libkscan/sizeindicator.h b/libkscan/sizeindicator.h index d49c60b5..0d248fec 100644 --- a/libkscan/sizeindicator.h +++ b/libkscan/sizeindicator.h @@ -37,10 +37,11 @@ class TQPainter; * user that he is doing something obvious. */ -class SizeIndicator: public QLabel +class SizeIndicator: public TQLabel { Q_OBJECT - // Q_PROPERTY( KGammaTable *gt READ getGt WRITE setGt ) + TQ_OBJECT + // TQ_PROPERTY( KGammaTable *gt READ getGt WRITE setGt ) public: /** @@ -49,7 +50,7 @@ public: * @param crit: Critical value, not yet used. */ - SizeIndicator( TQWidget *parent, long thres = DEFAULT_THRESHOLD, + SizeIndicator( TQWidget *tqparent, long thres = DEFAULT_THRESHOLD, long crit = DEFAULT_CRITICAL ); /** * destructor does not really do much yet. |