diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-16 02:40:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-16 02:40:35 +0000 |
commit | bab40890696ec68c337dc290880423a0602b83c7 (patch) | |
tree | 6ba03f720b1fa88235ba339e7aedb4455430357e /kdeprint/management | |
parent | f7e71d47719ab6094cf4a9fafffa5ea351973522 (diff) | |
download | tdelibs-bab40890696ec68c337dc290880423a0602b83c7.tar.gz tdelibs-bab40890696ec68c337dc290880423a0602b83c7.zip |
Finished remaining porting to new TQt API
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214736 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/management')
75 files changed, 541 insertions, 541 deletions
diff --git a/kdeprint/management/cjanuswidget.cpp b/kdeprint/management/cjanuswidget.cpp index d9d3ea126..856ab8a62 100644 --- a/kdeprint/management/cjanuswidget.cpp +++ b/kdeprint/management/cjanuswidget.cpp @@ -29,16 +29,16 @@ class CJanusWidget::CPage { public: - QWidget *m_widget; - QString m_text; - QString m_header; - QPixmap m_pixmap; + TQWidget *m_widget; + TQString m_text; + TQString m_header; + TQPixmap m_pixmap; CListBoxItem *m_item; }; //*********************************************************************************** -class CJanusWidget::CListBoxItem : public QListBoxItem +class CJanusWidget::CListBoxItem : public TQListBoxItem { public: CListBoxItem(TQListBox *lb, TQListBoxItem *after, const TQPixmap& pix, const TQString& text); @@ -49,7 +49,7 @@ protected: void paint(TQPainter*); private: - QPixmap m_pix; + TQPixmap m_pix; }; CJanusWidget::CListBoxItem::CListBoxItem(TQListBox *lb, TQListBoxItem *after, const TQPixmap& pix, const TQString& text) @@ -65,7 +65,7 @@ int CJanusWidget::CListBoxItem::height(const TQListBox *lb) const int CJanusWidget::CListBoxItem::width(const TQListBox *lb) const { - int w = QMAX(lb->fontMetrics().width(text()),m_pix.width()); + int w = TQMAX(lb->fontMetrics().width(text()),m_pix.width()); return (w + 10); } @@ -110,11 +110,11 @@ bool CJanusWidget::CListBox::eventFilter(TQObject *o, TQEvent *e) void CJanusWidget::CListBox::computeWidth() { - QListBoxItem *item = firstItem(); + TQListBoxItem *item = firstItem(); int w(40); while (item) { - w = QMAX(w,item->width(this)); + w = TQMAX(w,item->width(this)); item = item->next(); } if (verticalScrollBar()->isVisible()) @@ -132,7 +132,7 @@ CJanusWidget::CJanusWidget(TQWidget *parent, const char *name) m_stack = new TQWidgetStack(this); m_header = new TQLabel(this); - QFont f(m_header->font()); + TQFont f(m_header->font()); f.setBold(true); m_header->setFont(f); @@ -148,8 +148,8 @@ CJanusWidget::CJanusWidget(TQWidget *parent, const char *name) m_empty = new TQWidget(this, "Empty"); m_stack->addWidget(m_empty,0); - QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 10); - QVBoxLayout *sub_ = new TQVBoxLayout(0, 0, 5); + TQHBoxLayout *main_ = new TQHBoxLayout(this, 0, 10); + TQVBoxLayout *sub_ = new TQVBoxLayout(0, 0, 5); main_->addWidget(m_iconlist,0); main_->addLayout(sub_,1); sub_->addWidget(m_header,0); @@ -241,7 +241,7 @@ CJanusWidget::CPage* CJanusWidget::findPage(TQListBoxItem *i) TQListBoxItem* CJanusWidget::findPrevItem(CPage *p) { - if (m_pages.findRef(p) == -1) + if (m_pages.tqfindRef(p) == -1) m_pages.last(); else m_pages.prev(); diff --git a/kdeprint/management/cjanuswidget.h b/kdeprint/management/cjanuswidget.h index d73cafd31..6deec3149 100644 --- a/kdeprint/management/cjanuswidget.h +++ b/kdeprint/management/cjanuswidget.h @@ -54,11 +54,11 @@ private: TQListBoxItem* findPrevItem(CPage*); private: - TQPtrList<CPage> m_pages; + TQPtrList<CPage> m_pages; CListBox *m_iconlist; - QLabel *m_header; - QWidgetStack *m_stack; - QWidget *m_empty; + TQLabel *m_header; + TQWidgetStack *m_stack; + TQWidget *m_empty; }; #endif diff --git a/kdeprint/management/kiconselectaction.cpp b/kdeprint/management/kiconselectaction.cpp index d2c4c873f..eb7d1a82a 100644 --- a/kdeprint/management/kiconselectaction.cpp +++ b/kdeprint/management/kiconselectaction.cpp @@ -32,7 +32,7 @@ public: { m_menu = 0; } - QStringList m_iconlst; + TQStringList m_iconlst; TQPopupMenu* m_menu; }; @@ -51,7 +51,7 @@ void KIconSelectAction::updateIcons() { if (d->m_menu) { - QStringList lst = items(); + TQStringList lst = items(); for (uint id=0; id<lst.count(); ++id) d->m_menu->changeItem(id, SmallIconSet(d->m_iconlst[id]), lst[id]); } @@ -87,7 +87,7 @@ int KIconSelectAction::plug(TQWidget* widget, int index) int id = KAction::getToolButtonID(); // To have a correct layout in the toolbar, a non // empty icon has to be used. Use "unknown" by default. - QString iconName = (currentItem() != -1 ? d->m_iconlst[currentItem()] : "unknown"); + TQString iconName = (currentItem() != -1 ? d->m_iconlst[currentItem()] : "unknown"); createPopupMenu(); bar->insertButton(iconName, id, true, plainText(), index); diff --git a/kdeprint/management/kmconfigcommand.cpp b/kdeprint/management/kmconfigcommand.cpp index 21a1a330b..65d4d34f4 100644 --- a/kdeprint/management/kmconfigcommand.cpp +++ b/kdeprint/management/kmconfigcommand.cpp @@ -34,8 +34,8 @@ KMConfigCommand::KMConfigCommand(TQWidget *parent, const char *name) setPageHeader(i18n("Command Settings")); setPagePixmap("exec"); - QGroupBox *gb = new TQGroupBox(0, Qt::Horizontal, i18n("Edit/Create Commands"), this); - QLabel *lab = new TQLabel(i18n( + TQGroupBox *gb = new TQGroupBox(0, Qt::Horizontal, i18n("Edit/Create Commands"), this); + TQLabel *lab = new TQLabel(i18n( "<p>Command objects perform a conversion from input to output.<br>" "They are used as the basis to build both print filters " "and special printers. They are described by a command string, a " @@ -44,10 +44,10 @@ KMConfigCommand::KMConfigCommand(TQWidget *parent, const char *name) "changes will only be effective for you."), gb); KXmlCommandSelector *sel = new KXmlCommandSelector(false, gb); - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l0->addWidget(gb); l0->addStretch(1); - QVBoxLayout *l2 = new TQVBoxLayout(gb->layout(), KDialog::spacingHint()); + TQVBoxLayout *l2 = new TQVBoxLayout(TQT_TQLAYOUT(gb->layout()), KDialog::spacingHint()); l2->addWidget(lab); l2->addWidget(sel); } diff --git a/kdeprint/management/kmconfigdialog.cpp b/kdeprint/management/kmconfigdialog.cpp index 9bd20e494..f2ddf7b57 100644 --- a/kdeprint/management/kmconfigdialog.cpp +++ b/kdeprint/management/kmconfigdialog.cpp @@ -66,9 +66,9 @@ void KMConfigDialog::addConfigPage(KMConfigPage *page) KIcon::SizeMedium ); - QFrame *frame = addPage(page->pageName(),page->pageHeader(),icon); + TQFrame *frame = addPage(page->pageName(),page->pageHeader(),icon); page->reparent(frame,TQPoint(0,0)); - QVBoxLayout *lay = new TQVBoxLayout(frame, 0, 0); + TQVBoxLayout *lay = new TQVBoxLayout(frame, 0, 0); lay->addWidget(page); m_pages.append(page); } diff --git a/kdeprint/management/kmconfigfilter.cpp b/kdeprint/management/kmconfigfilter.cpp index 4b0d81e46..ab643c341 100644 --- a/kdeprint/management/kmconfigfilter.cpp +++ b/kdeprint/management/kmconfigfilter.cpp @@ -41,7 +41,7 @@ KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name) setPageHeader(i18n("Printer Filtering Settings")); setPagePixmap("filter"); - QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this); + TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Printer Filter"), this); m_list1 = new KListBox(box); m_list1->setSelectionMode(KListBox::Extended); @@ -52,21 +52,21 @@ KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name) m_remove = new TQToolButton( box ); m_remove->setIconSet(TQApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" )); m_locationre = new TQLineEdit(box); - QLabel *lab = new TQLabel(box); + TQLabel *lab = new TQLabel(box); lab->setText(i18n("The printer filtering allows you to view only a specific set of " "printers instead of all of them. This may be useful when there are a " "lot of printers available but you only use a few ones. Select the " "printers you want to see from the list on the left or enter a <b>Location</b> " "filter (ex: Group_1*). Both are cumulative and ignored if empty.")); - lab->setTextFormat(Qt::RichText); - QLabel *lab1 = new TQLabel(i18n("Location filter:"), box); + lab->setTextFormat(TQt::RichText); + TQLabel *lab1 = new TQLabel(i18n("Location filter:"), box); - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l0->addWidget(box, 1); - QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint()); + TQVBoxLayout *l1 = new TQVBoxLayout(TQT_TQLAYOUT(box->layout()), KDialog::spacingHint()); l1->addWidget(lab); - QGridLayout *l2 = new TQGridLayout(0, 4, 3, 0, KDialog::spacingHint()); - l1->addLayout(l2); + TQGridLayout *l2 = new TQGridLayout(0, 4, 3, 0, KDialog::spacingHint()); + l1->addLayout(TQT_TQLAYOUT(l2)); l2->setRowStretch(0, 1); l2->setRowStretch(3, 1); l2->setColStretch(0, 1); @@ -75,7 +75,7 @@ KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name) l2->addMultiCellWidget(m_list2, 0, 3, 2, 2); l2->addWidget(m_add, 1, 1); l2->addWidget(m_remove, 2, 1); - QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); + TQHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); l1->addLayout(l3, 0); l3->addWidget(lab1, 0); l3->addWidget(m_locationre, 1); @@ -91,7 +91,7 @@ KMConfigFilter::KMConfigFilter(TQWidget *parent, const char *name) void KMConfigFilter::loadConfig(KConfig *conf) { conf->setGroup("Filter"); - QStringList m_plist = conf->readListEntry("Printers"); + TQStringList m_plist = conf->readListEntry("Printers"); TQPtrListIterator<KMPrinter> it(*(KMManager::self()->printerListComplete(false))); for (; it.current(); ++it) { @@ -109,7 +109,7 @@ void KMConfigFilter::loadConfig(KConfig *conf) void KMConfigFilter::saveConfig(KConfig *conf) { conf->setGroup("Filter"); - QStringList plist; + TQStringList plist; for (uint i=0; i<m_list2->count(); i++) plist << m_list2->text(i); conf->writeEntry("Printers", plist); @@ -146,7 +146,7 @@ void KMConfigFilter::slotSelectionChanged() const KListBox *lb = static_cast<const KListBox*>(sender()); if (!lb) return; - QToolButton *pb = (lb == m_list1 ? m_add : m_remove); + TQToolButton *pb = (lb == m_list1 ? m_add : m_remove); for (uint i=0; i<lb->count(); i++) if (lb->isSelected(i)) { diff --git a/kdeprint/management/kmconfigfilter.h b/kdeprint/management/kmconfigfilter.h index 78fc6b568..b69f10c08 100644 --- a/kdeprint/management/kmconfigfilter.h +++ b/kdeprint/management/kmconfigfilter.h @@ -45,8 +45,8 @@ protected: private: KListBox *m_list1, *m_list2; - QToolButton *m_add, *m_remove; - QLineEdit *m_locationre; + TQToolButton *m_add, *m_remove; + TQLineEdit *m_locationre; }; #endif diff --git a/kdeprint/management/kmconfigfonts.cpp b/kdeprint/management/kmconfigfonts.cpp index e59f75728..e5f47de3b 100644 --- a/kdeprint/management/kmconfigfonts.cpp +++ b/kdeprint/management/kmconfigfonts.cpp @@ -43,8 +43,8 @@ KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name) setPageHeader(i18n("Font Settings")); setPagePixmap("fonts"); - QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Embedding"), this); - QGroupBox *box2 = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this); + TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Embedding"), this); + TQGroupBox *box2 = new TQGroupBox(0, Qt::Vertical, i18n("Fonts Path"), this); m_embedfonts = new TQCheckBox(i18n("&Embed fonts in PostScript data when printing"), box); m_fontpath = new KListView(box2); @@ -58,14 +58,14 @@ KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name) m_down = new KPushButton(KGuiItem(i18n("&Down"), "down"), box2); m_add = new KPushButton(KGuiItem(i18n("&Add"), "add"), box2); m_remove = new KPushButton(KGuiItem(i18n("&Remove"), "editdelete"), box2); - QLabel *lab0 = new TQLabel(i18n("Additional director&y:"), box2); + TQLabel *lab0 = new TQLabel(i18n("Additional director&y:"), box2); lab0->setBuddy(m_addpath); - QVBoxLayout *l0 = new TQVBoxLayout(box->layout(), KDialog::spacingHint()); + TQVBoxLayout *l0 = new TQVBoxLayout(TQT_TQLAYOUT(box->layout()), KDialog::spacingHint()); l0->addWidget(m_embedfonts); - QVBoxLayout *l1 = new TQVBoxLayout(box2->layout(), KDialog::spacingHint()); + TQVBoxLayout *l1 = new TQVBoxLayout(TQT_TQLAYOUT(box2->layout()), KDialog::spacingHint()); l1->addWidget(m_fontpath); - QHBoxLayout *l2 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); + TQHBoxLayout *l2 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); l1->addLayout(l2); l2->addWidget(m_up); l2->addWidget(m_down); @@ -73,11 +73,11 @@ KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name) l1->addSpacing(10); l1->addWidget(lab0); l1->addWidget(m_addpath); - QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); + TQHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); l1->addLayout(l3); l3->addStretch(1); l3->addWidget(m_add); - QVBoxLayout *l4 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *l4 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l4->addWidget(box); l4->addWidget(box2); @@ -105,20 +105,20 @@ KMConfigFonts::KMConfigFonts(TQWidget *parent, const char *name) void KMConfigFonts::loadConfig(KConfig *) { - QSettings settings; + TQSettings settings; m_embedfonts->setChecked(settings.readBoolEntry("/qt/embedFonts", true)); - QStringList paths = settings.readListEntry("/qt/fontPath", ':'); - QListViewItem *item(0); + TQStringList paths = settings.readListEntry("/qt/fontPath", ':'); + TQListViewItem *item(0); for (TQStringList::ConstIterator it=paths.begin(); it!=paths.end(); ++it) item = new TQListViewItem(m_fontpath, item, *it); } void KMConfigFonts::saveConfig(KConfig *) { - QSettings settings; + TQSettings settings; settings.writeEntry("/qt/embedFonts", m_embedfonts->isChecked()); - QStringList l; - QListViewItem *item = m_fontpath->firstChild(); + TQStringList l; + TQListViewItem *item = m_fontpath->firstChild(); while (item) { l << item->text(0); @@ -129,7 +129,7 @@ void KMConfigFonts::saveConfig(KConfig *) void KMConfigFonts::slotSelected() { - QListViewItem *item = m_fontpath->selectedItem(); + TQListViewItem *item = m_fontpath->selectedItem(); m_remove->setEnabled(item); m_up->setEnabled(item && item->itemAbove()); m_down->setEnabled(item && item->itemBelow()); @@ -139,10 +139,10 @@ void KMConfigFonts::slotAdd() { if (m_addpath->url().isEmpty()) return; - QListViewItem *lastItem(m_fontpath->firstChild()); + TQListViewItem *lastItem(m_fontpath->firstChild()); while (lastItem && lastItem->nextSibling()) lastItem = lastItem->nextSibling(); - QListViewItem *item = new TQListViewItem(m_fontpath, lastItem, m_addpath->url()); + TQListViewItem *item = new TQListViewItem(m_fontpath, lastItem, m_addpath->url()); m_fontpath->setSelected(item, true); } @@ -156,7 +156,7 @@ void KMConfigFonts::slotRemove() void KMConfigFonts::slotUp() { - QListViewItem *citem = m_fontpath->selectedItem(), *nitem = 0; + TQListViewItem *citem = m_fontpath->selectedItem(), *nitem = 0; if (!citem || !citem->itemAbove()) return; nitem = new TQListViewItem(m_fontpath, citem->itemAbove()->itemAbove(), citem->text(0)); @@ -166,7 +166,7 @@ void KMConfigFonts::slotUp() void KMConfigFonts::slotDown() { - QListViewItem *citem = m_fontpath->selectedItem(), *nitem = 0; + TQListViewItem *citem = m_fontpath->selectedItem(), *nitem = 0; if (!citem || !citem->itemBelow()) return; nitem = new TQListViewItem(m_fontpath, citem->itemBelow(), citem->text(0)); diff --git a/kdeprint/management/kmconfigfonts.h b/kdeprint/management/kmconfigfonts.h index 7fa9e9de3..1d1483ed7 100644 --- a/kdeprint/management/kmconfigfonts.h +++ b/kdeprint/management/kmconfigfonts.h @@ -45,10 +45,10 @@ protected slots: void slotTextChanged(const TQString&); private: - QCheckBox *m_embedfonts; + TQCheckBox *m_embedfonts; KListView *m_fontpath; KURLRequester *m_addpath; - QPushButton *m_up, *m_down, *m_add, *m_remove; + TQPushButton *m_up, *m_down, *m_add, *m_remove; }; #endif diff --git a/kdeprint/management/kmconfiggeneral.cpp b/kdeprint/management/kmconfiggeneral.cpp index c729c6516..96e8668de 100644 --- a/kdeprint/management/kmconfiggeneral.cpp +++ b/kdeprint/management/kmconfiggeneral.cpp @@ -45,7 +45,7 @@ KMConfigGeneral::KMConfigGeneral(TQWidget *parent) setPageHeader(i18n("General Settings")); setPagePixmap("fileprint"); - QGroupBox *m_timerbox = new TQGroupBox(0, Qt::Vertical, i18n("Refresh Interval"), this); + TQGroupBox *m_timerbox = new TQGroupBox(0, Qt::Vertical, i18n("Refresh Interval"), this); m_timer = new KIntNumInput(m_timerbox,"Timer"); m_timer->setRange(0,30); m_timer->setSuffix( i18n( " sec" ) ); @@ -54,7 +54,7 @@ KMConfigGeneral::KMConfigGeneral(TQWidget *parent) "<b>KDE Print</b> components like the print manager " "and the job viewer.")); - QGroupBox *m_testpagebox = new TQGroupBox(0, Qt::Vertical, i18n("Test Page"), this); + TQGroupBox *m_testpagebox = new TQGroupBox(0, Qt::Vertical, i18n("Test Page"), this); m_defaulttestpage = new TQCheckBox(i18n("&Specify personal test page"), m_testpagebox, "TestPageCheck"); m_testpage = new KURLRequester(m_testpagebox,"TestPage"); m_preview = new KPushButton(KGuiItem(i18n("Preview..."), "filefind"), m_testpagebox); @@ -66,28 +66,28 @@ KMConfigGeneral::KMConfigGeneral(TQWidget *parent) m_preview->setDisabled(true); m_defaulttestpage->setCursor(KCursor::handCursor()); - QGroupBox *m_statusbox = new TQGroupBox(0, Qt::Vertical, i18n("Miscellaneous"), this); + TQGroupBox *m_statusbox = new TQGroupBox(0, Qt::Vertical, i18n("Miscellaneous"), this); m_statusmsg = new TQCheckBox(i18n("Sho&w printing status message box"), m_statusbox); m_uselast = new TQCheckBox(i18n("De&faults to the last printer used in the application"), m_statusbox); //layout - QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); lay0->addWidget(m_timerbox); lay0->addWidget(m_testpagebox); lay0->addWidget(m_statusbox); lay0->addStretch(1); - QVBoxLayout *lay1 = new TQVBoxLayout(m_timerbox->layout(), + TQVBoxLayout *lay1 = new TQVBoxLayout(TQT_TQLAYOUT(m_timerbox->layout()), KDialog::spacingHint()); lay1->addWidget(m_timer); - QVBoxLayout *lay2 = new TQVBoxLayout(m_testpagebox->layout(), + TQVBoxLayout *lay2 = new TQVBoxLayout(TQT_TQLAYOUT(m_testpagebox->layout()), KDialog::spacingHint()); - QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 0); + TQHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 0); lay2->addWidget(m_defaulttestpage); lay2->addWidget(m_testpage); lay2->addLayout(lay3); lay3->addStretch(1); lay3->addWidget(m_preview); - QVBoxLayout *lay4 = new TQVBoxLayout(m_statusbox->layout(), + TQVBoxLayout *lay4 = new TQVBoxLayout(TQT_TQLAYOUT(m_statusbox->layout()), KDialog::spacingHint()); lay4->addWidget(m_statusmsg); lay4->addWidget(m_uselast); @@ -108,7 +108,7 @@ void KMConfigGeneral::loadConfig(KConfig *conf) { conf->setGroup("General"); m_timer->setValue(conf->readNumEntry("TimerDelay",5)); - QString tpage = conf->readPathEntry("TestPage"); + TQString tpage = conf->readPathEntry("TestPage"); if (!tpage.isEmpty()) { m_defaulttestpage->setChecked(true); @@ -132,7 +132,7 @@ void KMConfigGeneral::saveConfig(KConfig *conf) void KMConfigGeneral::slotTestPagePreview() { - QString tpage = m_testpage->url(); + TQString tpage = m_testpage->url(); if (tpage.isEmpty()) KMessageBox::error(this, i18n("Empty file name.")); else diff --git a/kdeprint/management/kmconfiggeneral.h b/kdeprint/management/kmconfiggeneral.h index a2cf7f81d..23739a152 100644 --- a/kdeprint/management/kmconfiggeneral.h +++ b/kdeprint/management/kmconfiggeneral.h @@ -42,9 +42,9 @@ protected slots: private: KIntNumInput *m_timer; KURLRequester *m_testpage; - QCheckBox *m_defaulttestpage; - QPushButton *m_preview; - QCheckBox *m_statusmsg, *m_uselast; + TQCheckBox *m_defaulttestpage; + TQPushButton *m_preview; + TQCheckBox *m_statusmsg, *m_uselast; }; #endif diff --git a/kdeprint/management/kmconfigjobs.cpp b/kdeprint/management/kmconfigjobs.cpp index 1aaf0ec26..f70b1a33f 100644 --- a/kdeprint/management/kmconfigjobs.cpp +++ b/kdeprint/management/kmconfigjobs.cpp @@ -34,17 +34,17 @@ KMConfigJobs::KMConfigJobs(TQWidget *parent, const char *name) setPageHeader(i18n("Print Job Settings")); setPagePixmap("exec"); - QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Jobs Shown"), this); + TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("Jobs Shown"), this); m_limit = new KIntNumInput(box); m_limit->setRange(0, 9999, 1, true); m_limit->setSpecialValueText(i18n("Unlimited")); m_limit->setLabel(i18n("Maximum number of jobs shown:")); - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l0->addWidget(box, 0); l0->addStretch(1); - QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint()); + TQVBoxLayout *l1 = new TQVBoxLayout(TQT_TQLAYOUT(box->layout()), KDialog::spacingHint()); l1->addWidget(m_limit); } diff --git a/kdeprint/management/kmconfigpreview.cpp b/kdeprint/management/kmconfigpreview.cpp index 1bd9f46e5..aa030019b 100644 --- a/kdeprint/management/kmconfigpreview.cpp +++ b/kdeprint/management/kmconfigpreview.cpp @@ -40,17 +40,17 @@ KMConfigPreview::KMConfigPreview(TQWidget *parent, const char *name) m_useext = new TQCheckBox(i18n("&Use external preview program"), box); m_program = new KURLRequester(box); - QLabel *lab = new TQLabel(box); + TQLabel *lab = new TQLabel(box); lab->setText(i18n("You can use an external preview program (PS viewer) instead of the " "KDE built-in preview system. Note that if the KDE default PS viewer " "(KGhostView) cannot be found, KDE tries automatically to find another " "external PostScript viewer")); - lab->setTextFormat(Qt::RichText); + lab->setTextFormat(TQt::RichText); - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l0->addWidget(box); l0->addStretch(1); - QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), KDialog::spacingHint()); + TQVBoxLayout *l1 = new TQVBoxLayout(TQT_TQLAYOUT(box->layout()), KDialog::spacingHint()); l1->addWidget(lab); l1->addWidget(m_useext); l1->addWidget(m_program); diff --git a/kdeprint/management/kmconfigpreview.h b/kdeprint/management/kmconfigpreview.h index 72916a510..359fcb227 100644 --- a/kdeprint/management/kmconfigpreview.h +++ b/kdeprint/management/kmconfigpreview.h @@ -34,7 +34,7 @@ public: void saveConfig(KConfig*); private: - QCheckBox *m_useext; + TQCheckBox *m_useext; KURLRequester *m_program; }; diff --git a/kdeprint/management/kmdbcreator.cpp b/kdeprint/management/kmdbcreator.cpp index cce83605d..fb76b5baf 100644 --- a/kdeprint/management/kmdbcreator.cpp +++ b/kdeprint/management/kmdbcreator.cpp @@ -54,18 +54,18 @@ bool KMDBCreator::checkDriverDB(const TQString& dirname, const TQDateTime& d) kapp->processEvents(); // first check current directory - QFileInfo dfi(dirname); + TQFileInfo dfi(dirname); if (dfi.lastModified() > d) return false; // then check most recent file in current directory - QDir dir(dirname); - const QFileInfoList *list = dir.entryInfoList(TQDir::Files,TQDir::Time); + TQDir dir(dirname); + const TQFileInfoList *list = dir.entryInfoList(TQDir::Files,TQDir::Time); if (list && list->count() > 0 && list->getFirst()->lastModified() > d) return false; // then loop into subdirs - QStringList slist = dir.entryList(TQDir::Dirs,TQDir::Time); + TQStringList slist = dir.entryList(TQDir::Dirs,TQDir::Time); for (TQStringList::ConstIterator it=slist.begin(); it!=slist.end(); ++it) if ((*it) != "." && (*it) != ".." && !checkDriverDB(dir.absFilePath(*it),d)) return false; @@ -84,10 +84,10 @@ bool KMDBCreator::createDriverDB(const TQString& dirname, const TQString& filena // start the child process m_proc.clearArguments(); - QString exestr = KMFactory::self()->manager()->driverDbCreationProgram(); + TQString exestr = KMFactory::self()->manager()->driverDbCreationProgram(); m_proc << exestr << dirname << filename; kdDebug() << "executing : " << exestr << " " << dirname << " " << filename << endl; - QString msg; + TQString msg; if (exestr.isEmpty()) msg = i18n("No executable defined for the creation of the " "driver database. This operation is not implemented."); @@ -127,7 +127,7 @@ bool KMDBCreator::createDriverDB(const TQString& dirname, const TQString& filena void KMDBCreator::slotReceivedStdout(KProcess*, char *buf, int len) { // save buffer - QString str( TQCString(buf, len) ); + TQString str( TQCString(buf, len) ); // get the number, cut the string at the first '\n' otherwise // the toInt() will return 0. If that occurs for the first number, diff --git a/kdeprint/management/kmdbcreator.h b/kdeprint/management/kmdbcreator.h index d4281a51d..8b076e517 100644 --- a/kdeprint/management/kmdbcreator.h +++ b/kdeprint/management/kmdbcreator.h @@ -50,7 +50,7 @@ signals: private: KProcess m_proc; - QProgressDialog *m_dlg; + TQProgressDialog *m_dlg; bool m_status; bool m_firstflag; }; diff --git a/kdeprint/management/kmdriverdb.cpp b/kdeprint/management/kmdriverdb.cpp index ca872da43..ec5f8c42b 100644 --- a/kdeprint/management/kmdriverdb.cpp +++ b/kdeprint/management/kmdriverdb.cpp @@ -60,15 +60,15 @@ KMDriverDB::~KMDriverDB() TQString KMDriverDB::dbFile() { // this calls insure missing directories creation - QString filename = locateLocal("data",TQString::tqfromLatin1("kdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem())); + TQString filename = locateLocal("data",TQString::tqfromLatin1("kdeprint/printerdb_%1.txt").arg(KMFactory::self()->printSystem())); return filename; } void KMDriverDB::init(TQWidget *parent) { - QFileInfo dbfi(dbFile()); - QString dirname = KMFactory::self()->manager()->driverDirectory(); - QStringList dbDirs = TQStringList::split(':', dirname, false); + TQFileInfo dbfi(dbFile()); + TQString dirname = KMFactory::self()->manager()->driverDirectory(); + TQStringList dbDirs = TQStringList::split(':', dirname, false); bool createflag(false); for (TQStringList::ConstIterator it=dbDirs.begin(); it!=dbDirs.end() && !createflag; ++it) @@ -112,7 +112,7 @@ KMDBEntryList* KMDriverDB::findEntry(const TQString& manu, const TQString& model { TQDict<KMDBEntryList> *models = m_entries.tqfind(manu); if (models) - return models->find(model); + return models->tqfind(model); return 0; } @@ -120,7 +120,7 @@ KMDBEntryList* KMDriverDB::findPnpEntry(const TQString& manu, const TQString& mo { TQDict<KMDBEntryList> *models = m_pnpentries.tqfind(manu); if (models) - return models->find(model); + return models->tqfind(model); return 0; } @@ -147,7 +147,7 @@ void KMDriverDB::insertEntry(KMDBEntry *entry) models->setAutoDelete(true); m_entries.insert(entry->manufacturer,models); } - KMDBEntryList *list = models->find(entry->model); + KMDBEntryList *list = models->tqfind(entry->model); if (!list) { list = new KMDBEntryList; @@ -166,7 +166,7 @@ void KMDriverDB::insertEntry(KMDBEntry *entry) models->setAutoDelete(true); m_pnpentries.insert(entry->manufacturer,models); } - list = models->find(entry->model); + list = models->tqfind(entry->model); if (!list) { list = new KMDBEntryList; @@ -196,12 +196,12 @@ void KMDriverDB::loadDbFile() m_entries.clear(); m_pnpentries.clear(); - QFile f(dbFile()); + TQFile f(dbFile()); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line; - QStringList words; + TQTextStream t(&f); + TQString line; + TQStringList words; KMDBEntry *entry(0); while (!t.eof()) diff --git a/kdeprint/management/kmdriverdbwidget.cpp b/kdeprint/management/kmdriverdbwidget.cpp index 95175cb07..d67377485 100644 --- a/kdeprint/management/kmdriverdbwidget.cpp +++ b/kdeprint/management/kmdriverdbwidget.cpp @@ -53,16 +53,16 @@ KMDriverDbWidget::KMDriverDbWidget(TQWidget *parent, const char *name) m_postscript->setCursor(KCursor::handCursor()); m_raw->setCursor(KCursor::handCursor()); m_other = new KPushButton(KGuiItem(i18n("&Other..."), "fileopen"), this); - QLabel *l1 = new TQLabel(i18n("&Manufacturer:"), this); - QLabel *l2 = new TQLabel(i18n("Mo&del:"), this); + TQLabel *l1 = new TQLabel(i18n("&Manufacturer:"), this); + TQLabel *l2 = new TQLabel(i18n("Mo&del:"), this); l1->setBuddy(m_manu); l2->setBuddy(m_model); // build layout - QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); - QGridLayout *sub1_ = new TQGridLayout(0, 2, 3, 0, 0); - QHBoxLayout *sub2_ = new TQHBoxLayout(0, 0, 10); - main_->addLayout(sub1_); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); + TQGridLayout *sub1_ = new TQGridLayout(0, 2, 3, 0, 0); + TQHBoxLayout *sub2_ = new TQHBoxLayout(0, 0, 10); + main_->addLayout(TQT_TQLAYOUT(sub1_)); main_->addLayout(sub2_); main_->addWidget(m_raw); sub1_->addWidget(l1,0,0); @@ -95,17 +95,17 @@ KMDriverDbWidget::~KMDriverDbWidget() void KMDriverDbWidget::setDriver(const TQString& manu, const TQString& model) { - QListBoxItem *item = m_manu->findItem(manu); - QString model_(model); + TQListBoxItem *item = m_manu->tqfindItem(manu); + TQString model_(model); if (item) { m_manu->setCurrentItem(item); - item = m_model->findItem(model_); + item = m_model->tqfindItem(model_); if (!item) // try by stripping the manufacturer name from // the beginning of the model string. This is // often the case with PPD files - item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::tqfromLatin1(""))); + item = m_model->tqfindItem(model_.replace(0,manu.length()+1,TQString::tqfromLatin1(""))); if (item) m_model->setCurrentItem(item); } @@ -189,7 +189,7 @@ void KMDriverDbWidget::slotManufacturerSelected(const TQString& name) TQDict<KMDBEntryList> *models = KMDriverDB::self()->findModels(name); if (models) { - QStrIList ilist(true); + TQStrIList ilist(true); TQDictIterator<KMDBEntryList> it(*models); for (;it.current();++it) ilist.append(it.currentKey().latin1()); @@ -203,11 +203,11 @@ void KMDriverDbWidget::slotPostscriptToggled(bool on) { if (on) { - QListBoxItem *item = m_manu->findItem("GENERIC"); + TQListBoxItem *item = m_manu->tqfindItem("GENERIC"); if (item) { m_manu->setCurrentItem(item); - item = m_model->findItem( "POSTSCRIPT PRINTER" ); + item = m_model->tqfindItem( "POSTSCRIPT PRINTER" ); if ( item ) { m_model->setCurrentItem( item ); @@ -243,7 +243,7 @@ void KMDriverDbWidget::slotOtherClicked() disconnect(m_manu,TQT_SIGNAL(highlighted(const TQString&)),this,TQT_SLOT(slotManufacturerSelected(const TQString&))); m_manu->clear(); m_model->clear(); - QString s = driver->get("manufacturer"); + TQString s = driver->get("manufacturer"); m_manu->insertItem((s.isEmpty() ? i18n("<Unknown>") : s)); s = driver->get("model"); m_model->insertItem((s.isEmpty() ? i18n("<Unknown>") : s)); diff --git a/kdeprint/management/kmdriverdbwidget.h b/kdeprint/management/kmdriverdbwidget.h index 09298f3fa..27d8dcb6a 100644 --- a/kdeprint/management/kmdriverdbwidget.h +++ b/kdeprint/management/kmdriverdbwidget.h @@ -55,13 +55,13 @@ protected slots: void slotError(const TQString&); private: - QListBox *m_manu; - QListBox *m_model; - QCheckBox *m_postscript; - QCheckBox *m_raw; - QPushButton *m_other; - QString m_external; - QString m_desc; + TQListBox *m_manu; + TQListBox *m_model; + TQCheckBox *m_postscript; + TQCheckBox *m_raw; + TQPushButton *m_other; + TQString m_external; + TQString m_desc; bool m_valid; }; diff --git a/kdeprint/management/kmiconview.cpp b/kdeprint/management/kmiconview.cpp index c53cc8148..a7671c789 100644 --- a/kdeprint/management/kmiconview.cpp +++ b/kdeprint/management/kmiconview.cpp @@ -29,7 +29,7 @@ KMIconViewItem::KMIconViewItem(TQIconView *parent, KMPrinter *p) { m_state = 0; m_mode = parent->itemTextPos(); - m_pixmap = TQString::null; + m_pixmap = TQString(); m_isclass = false; updatePrinter(p, m_mode); } diff --git a/kdeprint/management/kminfopage.cpp b/kdeprint/management/kminfopage.cpp index 6f3503566..c8c80117c 100644 --- a/kdeprint/management/kminfopage.cpp +++ b/kdeprint/management/kminfopage.cpp @@ -41,23 +41,23 @@ KMInfoPage::KMInfoPage(TQWidget *parent, const char *name) m_model = new TQLabel(this); m_uri = new TQLabel(this); m_device = new TQLabel(this); - QLabel *m_loclabel = new TQLabel(i18n("Physical Location", "Location:"), this); + TQLabel *m_loclabel = new TQLabel(i18n("Physical Location", "Location:"), this); m_loclabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); - QLabel *m_desclabel = new TQLabel(i18n("Description:"), this); + TQLabel *m_desclabel = new TQLabel(i18n("Description:"), this); m_desclabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); - QLabel *m_typelabel = new TQLabel(i18n("Type:"), this); + TQLabel *m_typelabel = new TQLabel(i18n("Type:"), this); m_typelabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); - QLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), this); + TQLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), this); m_statelabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); - QLabel *m_urilabel = new TQLabel(i18n("URI:"), this); + TQLabel *m_urilabel = new TQLabel(i18n("URI:"), this); m_urilabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); m_devlabel = new TQLabel(i18n("Device:"), this); m_devlabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); - QLabel *m_modellabel = new TQLabel(i18n("Model:"), this); + TQLabel *m_modellabel = new TQLabel(i18n("Model:"), this); m_modellabel->tqsetAlignment(Qt::AlignRight|Qt::AlignVCenter); - QGridLayout *lay0 = new TQGridLayout(this, 11, 2, 0, 5); - QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10); + TQGridLayout *lay0 = new TQGridLayout(this, 11, 2, 0, 5); + TQHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10); lay0->addRowSpacing(7,20); lay0->setRowStretch(7,0); lay0->setRowStretch(10,1); diff --git a/kdeprint/management/kminfopage.h b/kdeprint/management/kminfopage.h index 257ac2328..b0dd3a935 100644 --- a/kdeprint/management/kminfopage.h +++ b/kdeprint/management/kminfopage.h @@ -34,9 +34,9 @@ public: void setPrinter(KMPrinter *p); protected: - QLabel *m_title, *m_titlepixmap; - QLabel *m_location, *m_description, *m_uri, *m_model, *m_type, *m_state, *m_device; - QLabel *m_devlabel; + TQLabel *m_title, *m_titlepixmap; + TQLabel *m_location, *m_description, *m_uri, *m_model, *m_type, *m_state, *m_device; + TQLabel *m_devlabel; }; #endif diff --git a/kdeprint/management/kminstancepage.cpp b/kdeprint/management/kminstancepage.cpp index d53c1eca7..47bae6132 100644 --- a/kdeprint/management/kminstancepage.cpp +++ b/kdeprint/management/kminstancepage.cpp @@ -46,9 +46,9 @@ KMInstancePage::KMInstancePage(TQWidget *parent, const char *name) initActions(); - QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 0); + TQHBoxLayout *main_ = new TQHBoxLayout(this, 0, 0); main_->addWidget(m_view); - QVBoxLayout *sub_ = new TQVBoxLayout(0, 0, 0); + TQVBoxLayout *sub_ = new TQVBoxLayout(0, 0, 0); main_->addLayout(sub_); for (TQValueList<TQButton*>::Iterator it=m_buttons.begin(); it!=m_buttons.end(); ++it) if (*it) @@ -74,7 +74,7 @@ KMInstancePage::~KMInstancePage() void KMInstancePage::addButton(const TQString& txt, const TQString& pixmap, const char *receiver) { - QPushButton *btn = new TQPushButton(this, 0L); + TQPushButton *btn = new TQPushButton(this, 0L); btn->setText(txt); btn->setIconSet(BarIconSet(pixmap)); btn->setFlat(true); @@ -96,7 +96,7 @@ void KMInstancePage::initActions() void KMInstancePage::setPrinter(KMPrinter *p) { - QString oldText = m_view->currentText(); + TQString oldText = m_view->currentText(); m_view->clear(); m_printer = p; @@ -109,7 +109,7 @@ void KMInstancePage::setPrinter(KMPrinter *p) TQPtrListIterator<KMPrinter> it(list); for (;it.current();++it) { - QStringList pair = TQStringList::split('/',it.current()->name(),false); + TQStringList pair = TQStringList::split('/',it.current()->name(),false); m_view->insertItem(SmallIcon((it.current()->isSoftDefault() ? "exec" : "fileprint")),(pair.count() > 1 ? pair[1] : i18n("(Default)"))); } m_view->sort(); @@ -121,9 +121,9 @@ void KMInstancePage::setPrinter(KMPrinter *p) //iif (!oldText.isEmpty()) //{ - QListBoxItem *item = m_view->findItem(oldText); + TQListBoxItem *item = m_view->tqfindItem(oldText); if (!item) - item = m_view->findItem(i18n("(Default)")); + item = m_view->tqfindItem(i18n("(Default)")); if (item) m_view->setSelected(item,true); //} @@ -134,7 +134,7 @@ void KMInstancePage::slotNew() KMTimer::self()->hold(); bool ok(false); - QString name = KInputDialog::getText(i18n("Instance Name"),i18n("Enter name for new instance (leave untouched for default):"), + TQString name = KInputDialog::getText(i18n("Instance Name"),i18n("Enter name for new instance (leave untouched for default):"), i18n("(Default)"),&ok,this); if (ok) { @@ -143,7 +143,7 @@ void KMInstancePage::slotNew() else { if (name == i18n("(Default)")) - name = TQString::null; + name = TQString(); KMFactory::self()->virtualManager()->create(m_printer,name); setPrinter(m_printer); } @@ -157,12 +157,12 @@ void KMInstancePage::slotRemove() KMTimer::self()->hold(); bool reload(false); - QString src = m_view->currentText(); + TQString src = m_view->currentText(); TQString msg = (src != i18n("(Default)") ? i18n("Do you really want to remove instance %1?") : i18n("You can't remove the default instance. However all settings of %1 will be discarded. Continue?")); - if (!src.isEmpty() && KMessageBox::warningContinueCancel(this,msg.arg(src),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue) + if (!src.isEmpty() && KMessageBox::warningContinueCancel(this,msg.arg(src),TQString(),KStdGuiItem::del()) == KMessageBox::Continue) { if (src == i18n("(Default)")) - src = TQString::null; + src = TQString(); reload = KMFactory::self()->virtualManager()->isDefault(m_printer,src); KMFactory::self()->virtualManager()->remove(m_printer,src); setPrinter(m_printer); @@ -175,11 +175,11 @@ void KMInstancePage::slotCopy() { KMTimer::self()->hold(); - QString src = m_view->currentText(); + TQString src = m_view->currentText(); if (!src.isEmpty()) { bool ok(false); - QString name = KInputDialog::getText(i18n("Instance Name"),i18n("Enter name for new instance (leave untouched for default):"), + TQString name = KInputDialog::getText(i18n("Instance Name"),i18n("Enter name for new instance (leave untouched for default):"), i18n("(Default)"),&ok,this); if (ok) { @@ -188,9 +188,9 @@ void KMInstancePage::slotCopy() else { if (src == i18n("(Default)")) - src = TQString::null; + src = TQString(); if (name == i18n("(Default)")) - name = TQString::null; + name = TQString(); KMFactory::self()->virtualManager()->copy(m_printer,src,name); setPrinter(m_printer); } @@ -204,10 +204,10 @@ void KMInstancePage::slotSettings() { KMTimer::self()->hold(); - QString src = m_view->currentText(); + TQString src = m_view->currentText(); if (!src.isEmpty()) { - if (src == i18n("(Default)")) src = TQString::null; + if (src == i18n("(Default)")) src = TQString(); KMPrinter *pr = KMFactory::self()->virtualManager()->findInstance(m_printer,src); if ( !pr ) KMessageBox::error( this, i18n( "Unable to find instance %1." ).arg( m_view->currentText() ) ); @@ -238,11 +238,11 @@ void KMInstancePage::slotDefault() { KMTimer::self()->hold(); - QString src = m_view->currentText(); + TQString src = m_view->currentText(); if (!src.isEmpty()) { if (src == i18n("(Default)")) - src = TQString::null; + src = TQString(); KMFactory::self()->virtualManager()->setAsDefault(m_printer,src); setPrinter(m_printer); } @@ -254,15 +254,15 @@ void KMInstancePage::slotTest() { KMTimer::self()->hold(); - QString src = m_view->currentText(); + TQString src = m_view->currentText(); if (!src.isEmpty()) { if (src == i18n("(Default)")) - src = TQString::null; + src = TQString(); KMPrinter *mpr = KMFactory::self()->virtualManager()->findInstance(m_printer,src); if (!mpr) KMessageBox::error(this,i18n("Internal error: printer not found.")); - else if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(mpr->printerName()), TQString::null, i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue) + else if (KMessageBox::warningContinueCancel(this, i18n("You are about to print a test page on %1. Do you want to continue?").arg(mpr->printerName()), TQString(), i18n("Print Test Page"), "printTestPage") == KMessageBox::Continue) { if (!KMFactory::self()->virtualManager()->testInstance(mpr)) KMessageBox::error(this, i18n("Unable to send test page to %1.").arg(mpr->printerName())); diff --git a/kdeprint/management/kmjobviewer.cpp b/kdeprint/management/kmjobviewer.cpp index e8c6efce0..d22bad860 100644 --- a/kdeprint/management/kmjobviewer.cpp +++ b/kdeprint/management/kmjobviewer.cpp @@ -145,7 +145,7 @@ void KMJobViewer::updateCaption() if (!m_standalone) return; - QString pixname("fileprint"); + TQString pixname("fileprint"); if (!m_prname.isEmpty()) { setCaption(i18n("Print Jobs for %1").arg(m_prname)); @@ -259,10 +259,10 @@ void KMJobViewer::init() void KMJobViewer::initActions() { // job actions - KAction *hact = new KAction(i18n("&Hold"),"stop",0,this,TQT_SLOT(slotHold()),actionCollection(),"job_hold"); - KAction *ract = new KAction(i18n("&Resume"),"run",0,this,TQT_SLOT(slotResume()),actionCollection(),"job_resume"); - KAction *dact = new KAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,this,TQT_SLOT(slotRemove()),actionCollection(),"job_remove"); - KAction *sact = new KAction(i18n("Res&tart"),"redo",0,this,TQT_SLOT(slotRestart()),actionCollection(),"job_restart"); + KAction *hact = new KAction(i18n("&Hold"),"stop",0,TQT_TQOBJECT(this),TQT_SLOT(slotHold()),actionCollection(),"job_hold"); + KAction *ract = new KAction(i18n("&Resume"),"run",0,TQT_TQOBJECT(this),TQT_SLOT(slotResume()),actionCollection(),"job_resume"); + KAction *dact = new KAction(i18n("Remo&ve"),"edittrash",Qt::Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),actionCollection(),"job_remove"); + KAction *sact = new KAction(i18n("Res&tart"),"redo",0,TQT_TQOBJECT(this),TQT_SLOT(slotRestart()),actionCollection(),"job_restart"); KActionMenu *mact = new KActionMenu(i18n("&Move to Printer"),"fileprint",actionCollection(),"job_move"); mact->setDelayed(false); connect(mact->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(slotMove(int))); @@ -322,12 +322,12 @@ void KMJobViewer::initActions() } else {// stand-alone application - KStdAction::quit(kapp,TQT_SLOT(quit()),actionCollection()); - KStdAction::close(this,TQT_SLOT(slotClose()),actionCollection()); - KStdAction::preferences(this, TQT_SLOT(slotConfigure()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp),TQT_SLOT(quit()),actionCollection()); + KStdAction::close(TQT_TQOBJECT(this),TQT_SLOT(slotClose()),actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection()); // refresh action - new KAction(i18n("Refresh"),"reload",0,this,TQT_SLOT(slotRefresh()),actionCollection(),"refresh"); + new KAction(i18n("Refresh"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotRefresh()),actionCollection(),"refresh"); // create status bar KStatusBar *statusbar = statusBar(); @@ -367,13 +367,13 @@ void KMJobViewer::buildPrinterMenu(TQPopupMenu *menu, bool use_all, bool use_spe void KMJobViewer::slotShowMoveMenu() { - QPopupMenu *menu = static_cast<KActionMenu*>(actionCollection()->action("job_move"))->popupMenu(); + TQPopupMenu *menu = static_cast<KActionMenu*>(actionCollection()->action("job_move"))->popupMenu(); buildPrinterMenu(menu, false, false); } void KMJobViewer::slotShowPrinterMenu() { - QPopupMenu *menu = static_cast<KActionMenu*>(actionCollection()->action("filter_modify"))->popupMenu(); + TQPopupMenu *menu = static_cast<KActionMenu*>(actionCollection()->action("filter_modify"))->popupMenu(); buildPrinterMenu(menu, true, true); } @@ -540,7 +540,7 @@ void KMJobViewer::slotPrinterSelected(int prID) { if (prID >= 0 && prID < (int)(m_printers.count()+1)) { - QString prname = (prID == 0 ? i18n("All Printers") : m_printers.at(prID-1)->printerName()); + TQString prname = (prID == 0 ? i18n("All Printers") : m_printers.at(prID-1)->printerName()); emit printerChanged(this, prname); } } @@ -578,7 +578,7 @@ void KMJobViewer::slotClose() void KMJobViewer::loadPluginActions() { int mpopindex(7), toolbarindex(!m_standalone?7:8), menuindex(7); - QMenuData *menu(0); + TQMenuData *menu(0); if (m_standalone) { @@ -586,7 +586,7 @@ void KMJobViewer::loadPluginActions() KAction *act = actionCollection()->action("job_restart"); for (int i=0;i<act->containerCount();i++) { - if (menuBar()->findItem(act->itemId(i), &menu)) + if (menuBar()->tqfindItem(act->itemId(i), &menu)) { menuindex = mpopindex = menu->indexOf(act->itemId(i))+1; break; diff --git a/kdeprint/management/kmjobviewer.h b/kdeprint/management/kmjobviewer.h index 98cd73656..a8ac7d0af 100644 --- a/kdeprint/management/kmjobviewer.h +++ b/kdeprint/management/kmjobviewer.h @@ -111,13 +111,13 @@ private: KListView *m_view; TQPtrList<KMJob> m_jobs; TQPtrList<JobItem> m_items; - QPopupMenu *m_pop; + TQPopupMenu *m_pop; TQPtrList<KMPrinter> m_printers; - QString m_prname; + TQString m_prname; int m_type; - QString m_username; - QLineEdit *m_userfield; - QCheckBox *m_stickybox; + TQString m_username; + TQLineEdit *m_userfield; + TQCheckBox *m_stickybox; bool m_standalone; }; diff --git a/kdeprint/management/kmlistview.cpp b/kdeprint/management/kmlistview.cpp index 4a35a230e..9bcaa44d3 100644 --- a/kdeprint/management/kmlistview.cpp +++ b/kdeprint/management/kmlistview.cpp @@ -157,7 +157,7 @@ KMListViewItem* KMListView::findItem(KMPrinter *p) if (isVirtual) { if (it.current()->depth() == 3 && it.current()->text(0) == p->instanceName() - && it.current()->parent()->text(0) == p->printerName()) + && it.current()->tqparent()->text(0) == p->printerName()) return it.current(); } else diff --git a/kdeprint/management/kmmainview.cpp b/kdeprint/management/kmmainview.cpp index f422832cc..a1a63d61f 100644 --- a/kdeprint/management/kmmainview.cpp +++ b/kdeprint/management/kmmainview.cpp @@ -100,7 +100,7 @@ KMMainView::KMMainView(TQWidget *parent, const char *name, KActionCollection *co m_menubar->setMovingEnabled( false ); // layout - QVBoxLayout *m_layout = new TQVBoxLayout(this, 0, 0); + TQVBoxLayout *m_layout = new TQVBoxLayout(this, 0, 0); m_layout->addWidget(m_toolbar); m_layout->addWidget( m_menubar ); m_boxlayout = new TQBoxLayout(TQBoxLayout::TopToBottom, 0, 0); @@ -175,7 +175,7 @@ void KMMainView::saveSettings() void KMMainView::initActions() { KIconSelectAction *vact = new KIconSelectAction(i18n("&View"),0,m_actions,"view_change"); - QStringList iconlst; + TQStringList iconlst; iconlst << "view_icon" << "view_detailed" << "view_tree"; vact->setItems(TQStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst); vact->setCurrentItem(0); @@ -183,23 +183,23 @@ void KMMainView::initActions() KActionMenu *stateAct = new KActionMenu(i18n("Start/Stop Printer"), "kdeprint_printstate", m_actions, "printer_state_change"); stateAct->setDelayed(false); - stateAct->insert(new KAction(i18n("&Start Printer"),"kdeprint_enableprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start")); - stateAct->insert(new KAction(i18n("Sto&p Printer"),"kdeprint_stopprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop")); + stateAct->insert(new KAction(i18n("&Start Printer"),"kdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start")); + stateAct->insert(new KAction(i18n("Sto&p Printer"),"kdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop")); stateAct = new KActionMenu(i18n("Enable/Disable Job Spooling"), "kdeprint_queuestate", m_actions, "printer_spool_change"); stateAct->setDelayed(false); - stateAct->insert(new KAction(i18n("&Enable Job Spooling"),"kdeprint_enableprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable")); - stateAct->insert(new KAction(i18n("&Disable Job Spooling"),"kdeprint_stopprinter",0,this,TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable")); - - new KAction(i18n("&Remove"),"edittrash",0,this,TQT_SLOT(slotRemove()),m_actions,"printer_remove"); - new KAction(i18n("&Configure..."),"configure",0,this,TQT_SLOT(slotConfigure()),m_actions,"printer_configure"); - new KAction(i18n("Add &Printer/Class..."),"kdeprint_addprinter",0,this,TQT_SLOT(slotAdd()),m_actions,"printer_add"); - new KAction(i18n("Add &Special (pseudo) Printer..."),"kdeprint_addpseudo",0,this,TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special"); - new KAction(i18n("Set as &Local Default"),"kdeprint_defaulthard",0,this,TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default"); - new KAction(i18n("Set as &User Default"),"kdeprint_defaultsoft",0,this,TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default"); - new KAction(i18n("&Test Printer..."),"kdeprint_testprinter",0,this,TQT_SLOT(slotTest()),m_actions,"printer_test"); - new KAction(i18n("Configure &Manager..."),"kdeprint_configmgr",0,this,TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure"); - new KAction(i18n("Initialize Manager/&View"),"reload",0,this,TQT_SLOT(slotInit()),m_actions,"view_refresh"); + stateAct->insert(new KAction(i18n("&Enable Job Spooling"),"kdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable")); + stateAct->insert(new KAction(i18n("&Disable Job Spooling"),"kdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable")); + + new KAction(i18n("&Remove"),"edittrash",0,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),m_actions,"printer_remove"); + new KAction(i18n("&Configure..."),"configure",0,TQT_TQOBJECT(this),TQT_SLOT(slotConfigure()),m_actions,"printer_configure"); + new KAction(i18n("Add &Printer/Class..."),"kdeprint_addprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotAdd()),m_actions,"printer_add"); + new KAction(i18n("Add &Special (pseudo) Printer..."),"kdeprint_addpseudo",0,TQT_TQOBJECT(this),TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special"); + new KAction(i18n("Set as &Local Default"),"kdeprint_defaulthard",0,TQT_TQOBJECT(this),TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default"); + new KAction(i18n("Set as &User Default"),"kdeprint_defaultsoft",0,TQT_TQOBJECT(this),TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default"); + new KAction(i18n("&Test Printer..."),"kdeprint_testprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotTest()),m_actions,"printer_test"); + new KAction(i18n("Configure &Manager..."),"kdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure"); + new KAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh"); KIconSelectAction *dact = new KIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change"); iconlst.clear(); @@ -208,9 +208,9 @@ void KMMainView::initActions() dact->setCurrentItem(0); connect(dact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeDirection(int))); - new KAction(i18n("R&estart Server"),"kdeprint_restartsrv",0,this,TQT_SLOT(slotServerRestart()),m_actions,"server_restart"); - new KAction(i18n("Configure &Server..."),"kdeprint_configsrv",0,this,TQT_SLOT(slotServerConfigure()),m_actions,"server_configure"); - new KAction(i18n("Configure Server Access..."),"kdeprint_configsrv",0,this,TQT_SLOT(slotServerAccessConfigure()),m_actions,"server_access_configure"); + new KAction(i18n("R&estart Server"),"kdeprint_restartsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerRestart()),m_actions,"server_restart"); + new KAction(i18n("Configure &Server..."),"kdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigure()),m_actions,"server_configure"); + new KAction(i18n("Configure Server Access..."),"kdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerAccessConfigure()),m_actions,"server_access_configure"); KToggleAction *tact = new KToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar"); tact->setCheckedState(i18n("Hide &Toolbar")); @@ -227,13 +227,13 @@ void KMMainView::initActions() tact->setChecked(KMManager::self()->isFilterEnabled()); connect(tact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool))); - new KAction( i18n( "%1 &Handbook" ).arg( "KDEPrint" ), "contents", 0, this, TQT_SLOT( slotHelp() ), m_actions, "invoke_help" ); - new KAction( i18n( "%1 &Web Site" ).arg( "KDEPrint" ), "network", 0, this, TQT_SLOT( slotHelp() ), m_actions, "invoke_web" ); + new KAction( i18n( "%1 &Handbook" ).arg( "KDEPrint" ), "contents", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_help" ); + new KAction( i18n( "%1 &Web Site" ).arg( "KDEPrint" ), "network", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_web" ); KActionMenu *mact = new KActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool"); mact->setDelayed(false); connect(mact->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotToolSelected(int))); - QStringList files = KGlobal::dirs()->findAllResources("data", "kdeprint/tools/*.desktop"); + TQStringList files = KGlobal::dirs()->findAllResources("data", "kdeprint/tools/*.desktop"); for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it) { KSimpleConfig conf(*it); @@ -501,7 +501,7 @@ void KMMainView::slotRightButtonClicked(const TQString& prname, const TQPoint& p void KMMainView::slotChangePrinterState() { - QString opname = sender()->name(); + TQString opname = TQT_TQOBJECT_CONST(sender())->name(); if (m_current && opname.startsWith("printer_")) { opname = opname.mid(8); @@ -647,7 +647,7 @@ void KMMainView::slotTest() void KMMainView::showErrorMsg(const TQString& msg, bool usemgr) { - QString s(msg); + TQString s(msg); if (usemgr) { s.prepend("<p>"); @@ -830,16 +830,16 @@ void KMMainView::slotToolSelected(int ID) { KMTimer::self()->hold(); - QString libname = m_toollist[ID]; + TQString libname = m_toollist[ID]; libname.prepend("kdeprint_tool_"); if (m_current && !m_current->device().isEmpty() && !libname.isEmpty()) { KLibFactory *factory = KLibLoader::self()->factory(libname.local8Bit()); if (factory) { - QStringList args; + TQStringList args; args << m_current->device() << m_current->printerName(); - KDialogBase *dlg = static_cast<KDialogBase*>(factory->create(this, "Tool", 0, args)); + KDialogBase *dlg = static_cast<KDialogBase*>(TQT_TQWIDGET(factory->create(TQT_TQOBJECT(this), "Tool", 0, args))); if (dlg) dlg->exec(); delete dlg; @@ -904,7 +904,7 @@ void KMMainView::reset( const TQString& msg, bool useDelay, bool holdTimer ) void KMMainView::slotHelp() { - TQString s = sender()->name(); + TQString s = TQT_TQOBJECT_CONST(sender())->name(); if ( s == "invoke_help" ) kapp->invokeHelp( TQString::null, "kdeprint" ); else if ( s == "invoke_web" ) diff --git a/kdeprint/management/kmmainview.h b/kdeprint/management/kmmainview.h index 8f60aec2d..c924b3e90 100644 --- a/kdeprint/management/kmmainview.h +++ b/kdeprint/management/kmmainview.h @@ -114,15 +114,15 @@ protected: private: KMPrinterView *m_printerview; KMPages *m_printerpages; - QPopupMenu *m_pop; + TQPopupMenu *m_pop; KActionCollection *m_actions; KMPrinter *m_current; KToolBar *m_toolbar; PluginComboBox *m_plugin; int m_pactionsindex; - QStringList m_toollist; + TQStringList m_toollist; bool m_first; - QBoxLayout *m_boxlayout; + TQBoxLayout *m_boxlayout; class KMainWindowPrivate; KMainWindowPrivate *d; KToolBar *m_menubar; diff --git a/kdeprint/management/kmprinterview.cpp b/kdeprint/management/kmprinterview.cpp index f43f8f62a..5eff6d946 100644 --- a/kdeprint/management/kmprinterview.cpp +++ b/kdeprint/management/kmprinterview.cpp @@ -36,7 +36,7 @@ KMPrinterView::KMPrinterView(TQWidget *parent, const char *name) addWidget(m_iconview,0); m_listview = new KMListView(this); addWidget(m_listview,1); - m_current = TQString::null; + m_current = TQString(); m_listset = false; connect(m_iconview,TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&))); diff --git a/kdeprint/management/kmpropbackend.cpp b/kdeprint/management/kmpropbackend.cpp index ea6434563..7dfdc500d 100644 --- a/kdeprint/management/kmpropbackend.cpp +++ b/kdeprint/management/kmpropbackend.cpp @@ -31,11 +31,11 @@ KMPropBackend::KMPropBackend(TQWidget *parent, const char *name) m_uri = new TQLabel("",this); m_type = new TQLabel("",this); - QLabel *l1 = new TQLabel(i18n("Printer type:"), this); - QLabel *l2 = new TQLabel(i18n("URI:"), this); + TQLabel *l1 = new TQLabel(i18n("Printer type:"), this); + TQLabel *l2 = new TQLabel(i18n("URI:"), this); // layout - QGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 7); + TQGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 7); main_->setColStretch(0,0); main_->setColStretch(1,1); main_->setRowStretch(2,1); @@ -58,7 +58,7 @@ void KMPropBackend::setPrinter(KMPrinter *p) if (p && p->isPrinter()) { m_uri->setText(KURL(p->device()).prettyURL()); - QString prot = p->deviceProtocol(); + TQString prot = p->deviceProtocol(); if (prot == "ipp" || prot == "http") m_type->setText(i18n("IPP Printer")); else if (prot == "usb") m_type->setText(i18n("Local USB Printer")); else if (prot == "parallel") m_type->setText(i18n("Local Parallel Printer")); diff --git a/kdeprint/management/kmpropbackend.h b/kdeprint/management/kmpropbackend.h index 5f0514408..adcabbdd2 100644 --- a/kdeprint/management/kmpropbackend.h +++ b/kdeprint/management/kmpropbackend.h @@ -38,8 +38,8 @@ protected: void configureWizard(KMWizard*); private: - QLabel *m_type; - QLabel *m_uri; + TQLabel *m_type; + TQLabel *m_uri; }; #endif diff --git a/kdeprint/management/kmpropcontainer.cpp b/kdeprint/management/kmpropcontainer.cpp index 90be6da19..20ab492e7 100644 --- a/kdeprint/management/kmpropcontainer.cpp +++ b/kdeprint/management/kmpropcontainer.cpp @@ -35,8 +35,8 @@ KMPropContainer::KMPropContainer(TQWidget *parent, const char *name) m_button = new KPushButton(KGuiItem(i18n("Change..."), "edit"), this); m_widget = 0; - QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); - QHBoxLayout *btn_ = new TQHBoxLayout(0, 0, 0); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); + TQHBoxLayout *btn_ = new TQHBoxLayout(0, 0, 0); main_->addWidget(sep,0); main_->addLayout(btn_,0); btn_->addStretch(1); @@ -56,7 +56,7 @@ void KMPropContainer::setWidget(KMPropWidget *w) connect(m_button,TQT_SIGNAL(clicked()),m_widget,TQT_SLOT(slotChange())); connect(m_widget,TQT_SIGNAL(enable(bool)),TQT_SIGNAL(enable(bool))); connect(m_widget,TQT_SIGNAL(enableChange(bool)),TQT_SLOT(slotEnableChange(bool))); - QVBoxLayout *lay = dynamic_cast<TQVBoxLayout*>(layout()); + TQVBoxLayout *lay = dynamic_cast<TQVBoxLayout*>(layout()); if (lay) { lay->insertWidget(0,m_widget,1); diff --git a/kdeprint/management/kmpropcontainer.h b/kdeprint/management/kmpropcontainer.h index 5d9ca5455..411bb7134 100644 --- a/kdeprint/management/kmpropcontainer.h +++ b/kdeprint/management/kmpropcontainer.h @@ -44,7 +44,7 @@ protected slots: private: KMPropWidget *m_widget; - QPushButton *m_button; + TQPushButton *m_button; }; #endif diff --git a/kdeprint/management/kmpropdriver.cpp b/kdeprint/management/kmpropdriver.cpp index 6b88f63ea..086ccacca 100644 --- a/kdeprint/management/kmpropdriver.cpp +++ b/kdeprint/management/kmpropdriver.cpp @@ -31,14 +31,14 @@ KMPropDriver::KMPropDriver(TQWidget *parent, const char *name) m_manufacturer = new TQLabel("",this); m_model = new TQLabel("",this); m_driverinfo = new TQLabel("",this); - m_driverinfo->setTextFormat(Qt::RichText); + m_driverinfo->setTextFormat(TQt::RichText); - QLabel *l1 = new TQLabel(i18n("Manufacturer:"), this); - QLabel *l2 = new TQLabel(i18n("Printer model:"), this); - QLabel *l3 = new TQLabel(i18n("Driver info:"), this); + TQLabel *l1 = new TQLabel(i18n("Manufacturer:"), this); + TQLabel *l2 = new TQLabel(i18n("Printer model:"), this); + TQLabel *l3 = new TQLabel(i18n("Driver info:"), this); // layout - QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7); + TQGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7); main_->setColStretch(0,0); main_->setColStretch(1,1); main_->setRowStretch(3,1); diff --git a/kdeprint/management/kmpropdriver.h b/kdeprint/management/kmpropdriver.h index c5bcde018..6eb8873bf 100644 --- a/kdeprint/management/kmpropdriver.h +++ b/kdeprint/management/kmpropdriver.h @@ -38,9 +38,9 @@ protected: void configureWizard(KMWizard*); private: - QLabel *m_manufacturer; - QLabel *m_model; - QLabel *m_driverinfo; + TQLabel *m_manufacturer; + TQLabel *m_model; + TQLabel *m_driverinfo; }; #endif diff --git a/kdeprint/management/kmpropertypage.cpp b/kdeprint/management/kmpropertypage.cpp index 19461e258..74341ad9b 100644 --- a/kdeprint/management/kmpropertypage.cpp +++ b/kdeprint/management/kmpropertypage.cpp @@ -68,7 +68,7 @@ void KMPropertyPage::addPropPage(KMPropWidget *w) void KMPropertyPage::slotEnable(bool on) { - QWidget *w = (TQWidget*)(sender()); + TQWidget *w = (TQWidget*)(sender()); if (on) enablePage(w); else diff --git a/kdeprint/management/kmpropgeneral.cpp b/kdeprint/management/kmpropgeneral.cpp index 1c9389941..f32817fb6 100644 --- a/kdeprint/management/kmpropgeneral.cpp +++ b/kdeprint/management/kmpropgeneral.cpp @@ -34,12 +34,12 @@ KMPropGeneral::KMPropGeneral(TQWidget *parent, const char *name) m_location = new TQLabel("",this); m_description = new TQLabel("",this); - QLabel *l1 = new TQLabel(i18n("Printer name:"), this); - QLabel *l2 = new TQLabel(i18n("Physical Location", "Location:"), this); - QLabel *l3 = new TQLabel(i18n("Description:"), this); + TQLabel *l1 = new TQLabel(i18n("Printer name:"), this); + TQLabel *l2 = new TQLabel(i18n("Physical Location", "Location:"), this); + TQLabel *l3 = new TQLabel(i18n("Description:"), this); // layout - QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7); + TQGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 7); main_->setColStretch(0,0); main_->setColStretch(1,1); main_->setRowStretch(3,1); diff --git a/kdeprint/management/kmpropgeneral.h b/kdeprint/management/kmpropgeneral.h index 21cdfe1a9..dd2c1cd43 100644 --- a/kdeprint/management/kmpropgeneral.h +++ b/kdeprint/management/kmpropgeneral.h @@ -36,9 +36,9 @@ protected: void configureWizard(KMWizard*); private: - QLabel *m_name; - QLabel *m_location; - QLabel *m_description; + TQLabel *m_name; + TQLabel *m_location; + TQLabel *m_description; }; #endif diff --git a/kdeprint/management/kmpropmembers.cpp b/kdeprint/management/kmpropmembers.cpp index 6fa76cba9..adc3ebbbe 100644 --- a/kdeprint/management/kmpropmembers.cpp +++ b/kdeprint/management/kmpropmembers.cpp @@ -32,7 +32,7 @@ KMPropMembers::KMPropMembers(TQWidget *parent, const char *name) m_members->setPaper(tqcolorGroup().background()); m_members->setFrameStyle(TQFrame::NoFrame); - QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 0); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 10, 0); main_->addWidget(m_members); m_pixmap = "kdeprint_printer_class"; @@ -48,8 +48,8 @@ void KMPropMembers::setPrinter(KMPrinter *p) { if (p && ((p->isClass(false) && p->isLocal()) || p->isImplicit())) { - QStringList l = p->members(); - QString txt("<ul>"); + TQStringList l = p->members(); + TQString txt("<ul>"); for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) txt.append("<li>" + (*it) + "</li>"); txt.append("</ul>"); diff --git a/kdeprint/management/kmpropmembers.h b/kdeprint/management/kmpropmembers.h index 70b9b2678..a8e90e6cd 100644 --- a/kdeprint/management/kmpropmembers.h +++ b/kdeprint/management/kmpropmembers.h @@ -36,7 +36,7 @@ protected: void configureWizard(KMWizard*); private: - QTextView *m_members; + TQTextView *m_members; }; #endif diff --git a/kdeprint/management/kmspecialprinterdlg.cpp b/kdeprint/management/kmspecialprinterdlg.cpp index 20d8d17b7..ce5741574 100644 --- a/kdeprint/management/kmspecialprinterdlg.cpp +++ b/kdeprint/management/kmspecialprinterdlg.cpp @@ -45,7 +45,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name) { setCaption(i18n("Add Special Printer")); - QWidget *dummy = new TQWidget(this); + TQWidget *dummy = new TQWidget(this); setMainWidget(dummy); // widget creation @@ -53,9 +53,9 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name) connect(m_name, TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(slotTextChanged(const TQString & ))); m_description = new TQLineEdit(dummy); m_location = new TQLineEdit(dummy); - QLabel *m_namelabel = new TQLabel(i18n("&Name:"), dummy); - QLabel *m_desclabel = new TQLabel(i18n("&Description:"), dummy); - QLabel *m_loclabel = new TQLabel(i18n("&Location:"), dummy); + TQLabel *m_namelabel = new TQLabel(i18n("&Name:"), dummy); + TQLabel *m_desclabel = new TQLabel(i18n("&Description:"), dummy); + TQLabel *m_loclabel = new TQLabel(i18n("&Location:"), dummy); m_namelabel->setBuddy(m_name); m_desclabel->setBuddy(m_description); m_loclabel->setBuddy(m_location); @@ -63,7 +63,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name) KSeparator* sep = new KSeparator( KSeparator::HLine, dummy); sep->setFixedHeight(10); - QGroupBox *m_gb = new TQGroupBox(1, Qt::Horizontal, i18n("Command &Settings"), dummy); + TQGroupBox *m_gb = new TQGroupBox(1, Qt::Horizontal, i18n("Command &Settings"), dummy); m_command = new KXmlCommandSelector(true, m_gb, "CommandSelector", this); TQGroupBox *m_outfile_gb = new TQGroupBox( 0, Qt::Horizontal, i18n( "Outp&ut File" ), dummy ); @@ -74,18 +74,18 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name) KMimeType::List list = KMimeType::allMimeTypes(); for (TQValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it) { - QString mimetype = (*it)->name(); + TQString mimetype = (*it)->name(); m_mimelist << mimetype; } m_mimelist.sort(); m_mimetype->insertStringList(m_mimelist); - QLabel *m_mimetypelabel = new TQLabel(i18n("&Format:"), m_outfile_gb); + TQLabel *m_mimetypelabel = new TQLabel(i18n("&Format:"), m_outfile_gb); m_mimetypelabel->setBuddy (m_mimetype); m_extension = new TQLineEdit(m_outfile_gb); - QLabel *m_extensionlabel = new TQLabel(i18n("Filename e&xtension:"), m_outfile_gb); + TQLabel *m_extensionlabel = new TQLabel(i18n("Filename e&xtension:"), m_outfile_gb); m_extensionlabel->setBuddy(m_extension); m_icon = new KIconButton(dummy); @@ -123,9 +123,9 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name) TQWhatsThis::add(m_extension, extensionWhatsThis); // layout creation - QVBoxLayout *l0 = new TQVBoxLayout(dummy, 0, 10); - QGridLayout *l1 = new TQGridLayout(0, 3, 3, 0, 5); - l0->addLayout(l1); + TQVBoxLayout *l0 = new TQVBoxLayout(dummy, 0, 10); + TQGridLayout *l1 = new TQGridLayout(0, 3, 3, 0, 5); + l0->addLayout(TQT_TQLAYOUT(l1)); l1->setColStretch(2,1); l1->addColSpacing(0,60); l1->addMultiCellWidget(m_icon, 0, 2, 0, 0, Qt::AlignCenter); @@ -138,7 +138,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name) l0->addWidget(sep); l0->addWidget(m_gb); l0->addWidget(m_outfile_gb); - QGridLayout *l6 = new TQGridLayout(m_outfile_gb->layout(), 3, 2, 10); + TQGridLayout *l6 = new TQGridLayout(m_outfile_gb->layout(), 3, 2, 10); l6->addMultiCellWidget( m_usefile, 0, 0, 0, 1 ); l6->addWidget(m_mimetypelabel, 1, 0); l6->addWidget(m_mimetype, 1, 1); @@ -165,7 +165,7 @@ void KMSpecialPrinterDlg::slotOk() bool KMSpecialPrinterDlg::checkSettings() { - QString msg; + TQString msg; if (m_name->text().isEmpty()) msg = i18n("You must provide a non-empty name."); else @@ -186,7 +186,7 @@ void KMSpecialPrinterDlg::setPrinter(KMPrinter *printer) { m_command->setCommand(printer->option("kde-special-command")); m_usefile->setChecked(printer->option("kde-special-file") == "1"); - int index = m_mimelist.findIndex(printer->option("kde-special-mimetype")); + int index = m_mimelist.tqfindIndex(printer->option("kde-special-mimetype")); m_mimetype->setCurrentItem(index == -1 ? 0 : index); m_extension->setText(printer->option("kde-special-extension")); m_name->setText(printer->name()); diff --git a/kdeprint/management/kmspecialprinterdlg.h b/kdeprint/management/kmspecialprinterdlg.h index 88b0e19f5..1ff688cf6 100644 --- a/kdeprint/management/kmspecialprinterdlg.h +++ b/kdeprint/management/kmspecialprinterdlg.h @@ -46,10 +46,10 @@ protected slots: void slotTextChanged(const TQString &); private: - QLineEdit *m_name, *m_description, *m_location, *m_extension; - QComboBox *m_mimetype; - QCheckBox *m_usefile; - QStringList m_mimelist; + TQLineEdit *m_name, *m_description, *m_location, *m_extension; + TQComboBox *m_mimetype; + TQCheckBox *m_usefile; + TQStringList m_mimelist; KIconButton *m_icon; KXmlCommandSelector *m_command; }; diff --git a/kdeprint/management/kmwbackend.cpp b/kdeprint/management/kmwbackend.cpp index 481651e87..0a2958737 100644 --- a/kdeprint/management/kmwbackend.cpp +++ b/kdeprint/management/kmwbackend.cpp @@ -33,7 +33,7 @@ #include <kdialog.h> #include <kdebug.h> -class KRadioButton : public QRadioButton +class KRadioButton : public TQRadioButton { public: KRadioButton(const TQString& txt, TQWidget *parent = 0, const char *name = 0); @@ -73,7 +73,7 @@ bool KMWBackend::isValid(TQString& msg) void KMWBackend::initPrinter(KMPrinter *p) { - QString s = p->option("kde-backend"); + TQString s = p->option("kde-backend"); int ID(-1); if (!s.isEmpty()) @@ -101,10 +101,10 @@ void KMWBackend::updatePrinter(KMPrinter *p) if (ID == KMWizard::Class) p->setType(KMPrinter::Class); else p->setType(KMPrinter::Printer); p->setOption("kde-backend",TQString::number(ID)); - QString s = m_buttons->selected()->text(); + TQString s = m_buttons->selected()->text(); s.replace(TQRegExp("&(?=\\w)"), TQString::tqfromLatin1("")); p->setOption("kde-backend-description",s); - setNextPage((m_map.contains(ID) ? m_map[ID] : KMWizard::Error)); + setNextPage((m_map.tqcontains(ID) ? m_map[ID] : KMWizard::Error)); } void KMWBackend::addBackend( int ID, bool on, int nextpage ) @@ -171,7 +171,7 @@ void KMWBackend::addBackend(int ID, const TQString& txt, bool on, const TQString void KMWBackend::enableBackend(int ID, bool on) { - QButton *btn = m_buttons->find(ID); + TQButton *btn = static_cast<TQButton*>(m_buttons->find(ID)); if (btn) btn->setEnabled(on); } diff --git a/kdeprint/management/kmwbackend.h b/kdeprint/management/kmwbackend.h index 2013b8035..98cf8e7ef 100644 --- a/kdeprint/management/kmwbackend.h +++ b/kdeprint/management/kmwbackend.h @@ -41,8 +41,8 @@ public: void enableBackend(int ID, bool on = true); private: - QButtonGroup *m_buttons; - QVBoxLayout *m_layout; + TQButtonGroup *m_buttons; + TQVBoxLayout *m_layout; // keep a map between button ID and the real next page to switch to. This enables // to have different backends switching to the same page (like backends requiring // a password). If the next page is not given when adding the backend, the ID is diff --git a/kdeprint/management/kmwclass.cpp b/kdeprint/management/kmwclass.cpp index d432af8e1..77544b08f 100644 --- a/kdeprint/management/kmwclass.cpp +++ b/kdeprint/management/kmwclass.cpp @@ -42,19 +42,19 @@ KMWClass::KMWClass(TQWidget *parent, const char *name) m_list2 = new KListBox(this); m_list2->setSelectionMode(TQListBox::Extended); - QToolButton *add = new TQToolButton(this); - QToolButton *remove = new TQToolButton(this); + TQToolButton *add = new TQToolButton(this); + TQToolButton *remove = new TQToolButton(this); add->setIconSet(BarIcon("forward")); remove->setIconSet(BarIcon("back")); connect(add,TQT_SIGNAL(clicked()),TQT_SLOT(slotAdd())); connect(remove,TQT_SIGNAL(clicked()),TQT_SLOT(slotRemove())); - QLabel *l1 = new TQLabel(i18n("Available printers:"), this); - QLabel *l2 = new TQLabel(i18n("Class printers:"), this); + TQLabel *l1 = new TQLabel(i18n("Available printers:"), this); + TQLabel *l2 = new TQLabel(i18n("Class printers:"), this); - QHBoxLayout *lay1 = new TQHBoxLayout(this, 0, 15); - QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 20); - QVBoxLayout *lay3 = new TQVBoxLayout(0, 0, 0), *lay4 = new TQVBoxLayout(0, 0, 0); + TQHBoxLayout *lay1 = new TQHBoxLayout(this, 0, 15); + TQVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 20); + TQVBoxLayout *lay3 = new TQVBoxLayout(0, 0, 0), *lay4 = new TQVBoxLayout(0, 0, 0); lay1->addLayout(lay3, 1); lay1->addLayout(lay2, 0); lay1->addLayout(lay4, 1); @@ -84,7 +84,7 @@ bool KMWClass::isValid(TQString& msg) void KMWClass::initPrinter(KMPrinter *p) { - QStringList members = p->members(); + TQStringList members = p->members(); KMManager *mgr = KMFactory::self()->manager(); // first load available printers @@ -94,7 +94,7 @@ void KMWClass::initPrinter(KMPrinter *p) { TQPtrListIterator<KMPrinter> it(*list); for (;it.current();++it) - if (it.current()->instanceName().isEmpty() && !it.current()->isClass(true) && !it.current()->isSpecial() && !members.contains(it.current()->name())) + if (it.current()->instanceName().isEmpty() && !it.current()->isClass(true) && !it.current()->isSpecial() && !members.tqcontains(it.current()->name())) m_list1->insertItem(SmallIcon(it.current()->pixmap()), it.current()->name()); m_list1->sort(); } @@ -111,7 +111,7 @@ void KMWClass::initPrinter(KMPrinter *p) void KMWClass::updatePrinter(KMPrinter *p) { - QStringList members; + TQStringList members; for (uint i=0; i<m_list2->count(); i++) members.append(m_list2->item(i)->text()); p->setMembers(members); diff --git a/kdeprint/management/kmwdriver.cpp b/kdeprint/management/kmwdriver.cpp index bf5ef9c4b..45ce3afe7 100644 --- a/kdeprint/management/kmwdriver.cpp +++ b/kdeprint/management/kmwdriver.cpp @@ -35,7 +35,7 @@ KMWDriver::KMWDriver(TQWidget *parent, const char *name) m_widget = new KMDriverDbWidget(this); - QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 0); + TQVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 0); lay1->addWidget(m_widget); } diff --git a/kdeprint/management/kmwdriverselect.cpp b/kdeprint/management/kmwdriverselect.cpp index 5ce70016d..93e37be7d 100644 --- a/kdeprint/management/kmwdriverselect.cpp +++ b/kdeprint/management/kmwdriverselect.cpp @@ -39,17 +39,17 @@ KMWDriverSelect::KMWDriverSelect(TQWidget *parent, const char *name) m_entries = NULL; m_list = new KListBox(this); - QLabel *l1 = new TQLabel(this); + TQLabel *l1 = new TQLabel(this); l1->setText(i18n("<p>Several drivers have been detected for this model. Select the driver " "you want to use. You will have the opportunity to test it as well as to " "change it if necessary.</p>")); m_drivercomment = new KPushButton(i18n("Driver Information"), this); connect(m_drivercomment, TQT_SIGNAL(clicked()), TQT_SLOT(slotDriverComment())); - QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); main_->addWidget(l1,0); main_->addWidget(m_list,1); - QHBoxLayout *lay0 = new TQHBoxLayout(0, 0, 0); + TQHBoxLayout *lay0 = new TQHBoxLayout(0, 0, 0); main_->addLayout(lay0,0); lay0->addStretch(1); lay0->addWidget(m_drivercomment); @@ -75,7 +75,7 @@ void KMWDriverSelect::initPrinter(KMPrinter *p) int recomm(0); for (;it.current();++it) { - QString s(it.current()->description); + TQString s(it.current()->description); if (it.current()->recommended) { recomm = m_list->count(); diff --git a/kdeprint/management/kmwdriverselect.h b/kdeprint/management/kmwdriverselect.h index 0f2569a72..281989074 100644 --- a/kdeprint/management/kmwdriverselect.h +++ b/kdeprint/management/kmwdriverselect.h @@ -42,7 +42,7 @@ protected slots: private: KListBox *m_list; KMDBEntryList *m_entries; - QPushButton *m_drivercomment; + TQPushButton *m_drivercomment; }; #endif diff --git a/kdeprint/management/kmwdrivertest.cpp b/kdeprint/management/kmwdrivertest.cpp index 4024f110d..f1b9bc48b 100644 --- a/kdeprint/management/kmwdrivertest.cpp +++ b/kdeprint/management/kmwdrivertest.cpp @@ -47,25 +47,25 @@ KMWDriverTest::KMWDriverTest(TQWidget *parent, const char *name) m_manufacturer = new TQLabel(this); m_model = new TQLabel(this); m_driverinfo = new TQLabel(this); - m_driverinfo->setTextFormat(Qt::RichText); - QLabel *l1 = new TQLabel(i18n("<b>Manufacturer:</b>"), this); - QLabel *l2 = new TQLabel(i18n("<b>Model:</b>"), this); - QLabel *l3 = new TQLabel(i18n("<b>Description:</b>"), this); + m_driverinfo->setTextFormat(TQt::RichText); + TQLabel *l1 = new TQLabel(i18n("<b>Manufacturer:</b>"), this); + TQLabel *l2 = new TQLabel(i18n("<b>Model:</b>"), this); + TQLabel *l3 = new TQLabel(i18n("<b>Description:</b>"), this); m_test = new KPushButton(KGuiItem(i18n("&Test"), "kdeprint_testprinter"), this); m_settings = new KPushButton(KGuiItem(i18n("&Settings"), "configure"), this); - QLabel *l0 = new TQLabel(this); + TQLabel *l0 = new TQLabel(this); l0->setText(i18n("<p>Now you can test the printer before finishing installation. " "Use the <b>Settings</b> button to configure the printer driver and " "the <b>Test</b> button to test your configuration. Use the <b>Back</b> " "button to change the driver (your current configuration will be discarded).</p>")); - QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 15); - QGridLayout *lay2 = new TQGridLayout(0, 3, 3, 0, 0); - QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 10); + TQVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 15); + TQGridLayout *lay2 = new TQGridLayout(0, 3, 3, 0, 0); + TQHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 10); lay1->addWidget(l0,0); - lay1->addLayout(lay2,0); + lay1->addLayout(TQT_TQLAYOUT(lay2),0); lay1->addLayout(lay3,0); lay1->addStretch(1); lay2->setColStretch(2,1); @@ -99,7 +99,7 @@ void KMWDriverTest::initPrinter(KMPrinter *p) delete m_driver; m_driver = 0; - QString drfile = p->option("kde-driver"); + TQString drfile = p->option("kde-driver"); bool checkDriver(true); if (!drfile.isEmpty() && drfile != "raw") { @@ -133,9 +133,9 @@ void KMWDriverTest::slotTest() { if (!m_printer) return; - QString name = "tmpprinter_"+KApplication::randomString(8); + TQString name = "tmpprinter_"+KApplication::randomString(8); // save printer name (can be non empty when modifying a printer) - QString oldname = m_printer->name(); + TQString oldname = m_printer->name(); m_printer->setName(name); m_printer->setPrinterName(name); diff --git a/kdeprint/management/kmwdrivertest.h b/kdeprint/management/kmwdrivertest.h index 64d779477..2689e7c22 100644 --- a/kdeprint/management/kmwdrivertest.h +++ b/kdeprint/management/kmwdrivertest.h @@ -41,11 +41,11 @@ protected slots: void slotSettings(); private: - QLabel *m_manufacturer; - QLabel *m_model; - QLabel *m_driverinfo; - QPushButton *m_test; - QPushButton *m_settings; + TQLabel *m_manufacturer; + TQLabel *m_model; + TQLabel *m_driverinfo; + TQPushButton *m_test; + TQPushButton *m_settings; DrMain *m_driver; KMPrinter *m_printer; }; diff --git a/kdeprint/management/kmwend.cpp b/kdeprint/management/kmwend.cpp index 0d638dfd9..9da4096c6 100644 --- a/kdeprint/management/kmwend.cpp +++ b/kdeprint/management/kmwend.cpp @@ -35,14 +35,14 @@ KMWEnd::KMWEnd(TQWidget *parent, const char *name) m_view = new TQTextView(this); - QVBoxLayout *lay = new TQVBoxLayout(this, 0, 0); + TQVBoxLayout *lay = new TQVBoxLayout(this, 0, 0); lay->addWidget(m_view,1); } void KMWEnd::initPrinter(KMPrinter *p) { - QString txt; - QString s(TQString::tqfromLatin1("<li><u>%1</u>: %2</li>")); + TQString txt; + TQString s(TQString::tqfromLatin1("<li><u>%1</u>: %2</li>")); int ID = p->option("kde-backend").toInt(); // general information @@ -57,8 +57,8 @@ void KMWEnd::initPrinter(KMPrinter *p) { // class members txt.append(TQString::tqfromLatin1("<b>%1</b><ul type=circle>").arg(i18n("Members"))); - QStringList m(p->members()); - QString s1(TQString::tqfromLatin1("<li>%1</li>")); + TQStringList m(p->members()); + TQString s1(TQString::tqfromLatin1("<li>%1</li>")); for (TQStringList::ConstIterator it=m.begin(); it!=m.end(); ++it) txt.append(s1.arg(*it)); txt.append("</ul><br>"); diff --git a/kdeprint/management/kmwend.h b/kdeprint/management/kmwend.h index 9ce9077f7..fa74a6553 100644 --- a/kdeprint/management/kmwend.h +++ b/kdeprint/management/kmwend.h @@ -32,7 +32,7 @@ public: void initPrinter(KMPrinter*); private: - QTextView *m_view; + TQTextView *m_view; }; #endif diff --git a/kdeprint/management/kmwfile.cpp b/kdeprint/management/kmwfile.cpp index 33deb0836..190868d03 100644 --- a/kdeprint/management/kmwfile.cpp +++ b/kdeprint/management/kmwfile.cpp @@ -37,14 +37,14 @@ KMWFile::KMWFile(TQWidget *parent, const char *name) m_url = new KURLRequester(this); m_url->setMode((KFile::Mode)(KFile::File|KFile::LocalOnly)); - QLabel *l1 = new TQLabel(this); + TQLabel *l1 = new TQLabel(this); l1->setText(i18n("<p>The printing will be redirected to a file. Enter here the path " "of the file you want to use for redirection. Use an absolute path or " "the browse button for graphical selection.</p>")); - QLabel *l2 = new TQLabel(i18n("Print to file:"), this); + TQLabel *l2 = new TQLabel(i18n("Print to file:"), this); - QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 30); - QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 5); + TQVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 30); + TQVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 5); lay1->addWidget(l1); lay1->addLayout(lay2); lay1->addStretch(1); @@ -54,7 +54,7 @@ KMWFile::KMWFile(TQWidget *parent, const char *name) bool KMWFile::isValid(TQString& msg) { - QFileInfo fi(m_url->url()); + TQFileInfo fi(m_url->url()); if (fi.fileName().isEmpty()) { msg = i18n("Empty file name."); @@ -72,6 +72,6 @@ bool KMWFile::isValid(TQString& msg) void KMWFile::updatePrinter(KMPrinter *p) { - QString dev = TQString::tqfromLatin1("file:%1").arg(m_url->url()); + TQString dev = TQString::tqfromLatin1("file:%1").arg(m_url->url()); p->setDevice(dev); } diff --git a/kdeprint/management/kmwinfobase.cpp b/kdeprint/management/kmwinfobase.cpp index aef26049f..0d6d4beae 100644 --- a/kdeprint/management/kmwinfobase.cpp +++ b/kdeprint/management/kmwinfobase.cpp @@ -30,13 +30,13 @@ KMWInfoBase::KMWInfoBase(int n, TQWidget *parent, const char *name) m_edits.setAutoDelete(false); m_nlines = n; - QGridLayout *lay1 = new TQGridLayout(this, m_nlines+3, 2, 0, 10); + TQGridLayout *lay1 = new TQGridLayout(this, m_nlines+3, 2, 0, 10); lay1->addRowSpacing(1,10); lay1->setRowStretch(m_nlines+2,1); lay1->setColStretch(1,1); m_info = new TQLabel(this); - m_info->setTextFormat(Qt::RichText); + m_info->setTextFormat(TQt::RichText); lay1->addMultiCellWidget(m_info,0,0,0,1); for (int i=0;i<m_nlines;i++) diff --git a/kdeprint/management/kmwinfobase.h b/kdeprint/management/kmwinfobase.h index 1c328826a..c33058fe0 100644 --- a/kdeprint/management/kmwinfobase.h +++ b/kdeprint/management/kmwinfobase.h @@ -44,7 +44,7 @@ protected: private: TQPtrList<TQLabel> m_labels; TQPtrList<TQLineEdit> m_edits; - QLabel *m_info; + TQLabel *m_info; int m_nlines; }; diff --git a/kdeprint/management/kmwinfopage.cpp b/kdeprint/management/kmwinfopage.cpp index 092a8669d..abfa2993c 100644 --- a/kdeprint/management/kmwinfopage.cpp +++ b/kdeprint/management/kmwinfopage.cpp @@ -32,7 +32,7 @@ KMWInfoPage::KMWInfoPage(TQWidget *parent, const char *name) m_title = i18n("Introduction"); m_nextpage = KMWizard::Backend; - //QLabel *m_label = new TQLabel(this); + //TQLabel *m_label = new TQLabel(this); KActiveLabel *m_label = new KActiveLabel(this); m_label->setText(i18n("<p>Welcome,</p><br>" "<p>This wizard will help to install a new printer on your computer. " @@ -43,6 +43,6 @@ KMWInfoPage::KMWInfoPage(TQWidget *parent, const char *name) "<p align=right><a href=\"http://printing.kde.org\"><i>" "The KDE printing team</i></a>.</p>")); - QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 0); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 0); main_->addWidget(m_label); } diff --git a/kdeprint/management/kmwizard.cpp b/kdeprint/management/kmwizard.cpp index 59bfa644d..2a3fca450 100644 --- a/kdeprint/management/kmwizard.cpp +++ b/kdeprint/management/kmwizard.cpp @@ -64,15 +64,15 @@ KMWizard::KMWizard(TQWidget *parent, const char *name) m_next = new KPushButton(i18n("&Next >"), this); m_next->setDefault(true); m_prev = new KPushButton(i18n("< &Back"), this); - QPushButton *m_cancel = new KPushButton(KStdGuiItem::cancel(), this); + TQPushButton *m_cancel = new KPushButton(KStdGuiItem::cancel(), this); m_title = new TQLabel(this); - QFont f(m_title->font()); + TQFont f(m_title->font()); f.setBold(true); m_title->setFont(f); KSeparator* sep = new KSeparator( KSeparator::HLine, this); sep->setFixedHeight(5); KSeparator* sep2 = new KSeparator( KSeparator::HLine, this); - QPushButton *m_help = new KPushButton(KStdGuiItem::help(), this); + TQPushButton *m_help = new KPushButton(KStdGuiItem::help(), this); connect(m_cancel,TQT_SIGNAL(clicked()),TQT_SLOT(reject())); connect(m_next,TQT_SIGNAL(clicked()),TQT_SLOT(slotNext())); @@ -88,9 +88,9 @@ KMWizard::KMWizard(TQWidget *parent, const char *name) // layout TQVBoxLayout *main0_ = new TQVBoxLayout(this, 10, 10); - QVBoxLayout *main_ = new TQVBoxLayout(0, 0, 0); + TQVBoxLayout *main_ = new TQVBoxLayout(0, 0, 0); TQHBoxLayout *main1_ = new TQHBoxLayout(0, 0, 10); - QHBoxLayout *btn_ = new TQHBoxLayout(0, 0, 10); + TQHBoxLayout *btn_ = new TQHBoxLayout(0, 0, 10); main0_->addLayout(main1_); if (m_side) main1_->addWidget(m_side); @@ -222,7 +222,7 @@ void KMWizard::slotNext() KMWizardPage *page = (KMWizardPage*)m_stack->visibleWidget(); if (page) { - QString msg; + TQString msg; if (!page->isValid(msg)) { if (!msg.isEmpty()) diff --git a/kdeprint/management/kmwizard.h b/kdeprint/management/kmwizard.h index 0c981967d..b23c7b1f3 100644 --- a/kdeprint/management/kmwizard.h +++ b/kdeprint/management/kmwizard.h @@ -84,9 +84,9 @@ private: TQIntDict<KMWizardPage> m_pagepool; TQValueStack<int> m_pagestack; - QWidgetStack *m_stack; - QLabel *m_title; - QPushButton *m_next, *m_prev; + TQWidgetStack *m_stack; + TQLabel *m_title; + TQPushButton *m_next, *m_prev; int m_start, m_end; bool m_inclusive; KMPrinter *m_printer; diff --git a/kdeprint/management/kmwlocal.cpp b/kdeprint/management/kmwlocal.cpp index 0340a5fe1..af283af7d 100644 --- a/kdeprint/management/kmwlocal.cpp +++ b/kdeprint/management/kmwlocal.cpp @@ -47,11 +47,11 @@ KMWLocal::KMWLocal(TQWidget *parent, const char *name) m_ports->header()->hide(); m_ports->addColumn(""); m_ports->setSorting(-1); - QListViewItem *root = new TQListViewItem(m_ports, i18n("Local System")); + TQListViewItem *root = new TQListViewItem(m_ports, i18n("Local System")); root->setPixmap(0, SmallIcon("kdeprint_computer")); root->setOpen(true); connect(m_ports, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(slotPortSelected(TQListViewItem*))); - QLabel *l1 = new TQLabel(i18n("URI:"), this); + TQLabel *l1 = new TQLabel(i18n("URI:"), this); m_localuri = new TQLineEdit(this); connect( m_localuri, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotTextChanged( const TQString& ) ) ); m_parents[0] = new TQListViewItem(root, i18n("Parallel")); @@ -60,10 +60,10 @@ KMWLocal::KMWLocal(TQWidget *parent, const char *name) m_parents[3] = new TQListViewItem(root, m_parents[2], i18n("Others")); for (int i=0;i<4;i++) m_parents[i]->setPixmap(0, SmallIcon("input_devices_settings")); - QLabel *l2 = new TQLabel(i18n("<p>Select a valid detected port, or enter directly the corresponding URI in the bottom edit field.</p>"), this); + TQLabel *l2 = new TQLabel(i18n("<p>Select a valid detected port, or enter directly the corresponding URI in the bottom edit field.</p>"), this); - QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10); - QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10); + TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10); + TQHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 10); lay0->addWidget(l2, 0); lay0->addWidget(m_ports, 1); lay0->addLayout(lay1, 0); @@ -78,7 +78,7 @@ bool KMWLocal::isValid(TQString& msg) msg = i18n("The URI is empty","Empty URI."); return false; } - else if (m_uris.findIndex(m_localuri->text()) == -1) + else if (m_uris.tqfindIndex(m_localuri->text()) == -1) { if (KMessageBox::warningContinueCancel(this, i18n("The local URI doesn't correspond to a detected port. Continue?")) == KMessageBox::Cancel) { @@ -98,7 +98,7 @@ void KMWLocal::slotPortSelected(TQListViewItem *item) if (!item || item->depth() <= 1 || item->depth() > 3) uri = TQString::null; else if (item->depth() == 3) - uri = item->parent()->text( 1 ); + uri = item->tqparent()->text( 1 ); else uri = item->text( 1 ); m_block = true; @@ -160,22 +160,22 @@ void KMWLocal::slotTextChanged( const TQString& txt ) void KMWLocal::initialize() { - QStringList list = KMFactory::self()->manager()->detectLocalPrinters(); + TQStringList list = KMFactory::self()->manager()->detectLocalPrinters(); if (list.isEmpty() || (list.count() % 4) != 0) { KMessageBox::error(this, i18n("Unable to detect local ports.")); return; } - QListViewItem *last[4] = {0, 0, 0, 0}; + TQListViewItem *last[4] = {0, 0, 0, 0}; for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it) { TQString cl = *it; ++it; - QString uri = *it; + TQString uri = *it; int p = uri.tqfind( ':' ); - QString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : TQString::null ); - QString printer = *(++it); + TQString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : TQString::null ); + TQString printer = *(++it); int index(-1); if (desc.isEmpty()) desc = uri; @@ -195,7 +195,7 @@ void KMWLocal::initialize() m_uris << uri; if (!printer.isEmpty()) { - QListViewItem *pItem = new TQListViewItem(last[index], printer); + TQListViewItem *pItem = new TQListViewItem(last[index], printer); last[index]->setOpen(true); pItem->setPixmap(0, SmallIcon("kdeprint_printer")); } diff --git a/kdeprint/management/kmwlocal.h b/kdeprint/management/kmwlocal.h index 9da6ed747..154984493 100644 --- a/kdeprint/management/kmwlocal.h +++ b/kdeprint/management/kmwlocal.h @@ -48,9 +48,9 @@ protected: protected: KListView *m_ports; - QLineEdit *m_localuri; - QStringList m_uris; - QListViewItem *m_parents[4]; + TQLineEdit *m_localuri; + TQStringList m_uris; + TQListViewItem *m_parents[4]; bool m_initialized; bool m_block; }; diff --git a/kdeprint/management/kmwpassword.cpp b/kdeprint/management/kmwpassword.cpp index f05fa2378..c8fb39c65 100644 --- a/kdeprint/management/kmwpassword.cpp +++ b/kdeprint/management/kmwpassword.cpp @@ -39,15 +39,15 @@ KMWPassword::KMWPassword(TQWidget *parent, const char *name) m_nextpage = KMWizard::SMB; // create widgets - QLabel *infotext_ = new TQLabel(this); + TQLabel *infotext_ = new TQLabel(this); infotext_->setText(i18n("<p>This backend may require a login/password to work properly. " "Select the type of access to use and fill in the login and password entries if needed.</p>")); m_login = new TQLineEdit(this); m_login->setText(TQString::fromLocal8Bit(getenv("USER"))); m_password = new TQLineEdit(this); m_password->setEchoMode(TQLineEdit::Password); - QLabel *loginlabel_ = new TQLabel(i18n("&Login:"),this); - QLabel *passwdlabel_ = new TQLabel(i18n("&Password:"),this); + TQLabel *loginlabel_ = new TQLabel(i18n("&Login:"),this); + TQLabel *passwdlabel_ = new TQLabel(i18n("&Password:"),this); m_btngroup = new TQVButtonGroup( this ); m_btngroup->setFrameStyle( TQFrame::NoFrame ); TQRadioButton *btn1 = new TQRadioButton( i18n( "&Anonymous (no login/password)" ), m_btngroup ); @@ -72,7 +72,7 @@ KMWPassword::KMWPassword(TQWidget *parent, const char *name) main_->addSpacing( 10 ); main_->addWidget( m_btngroup ); TQGridLayout *l1 = new TQGridLayout( 0, 2, 3 ); - main_->addLayout( l1 ); + main_->addLayout( TQT_TQLAYOUT(l1) ); main_->addStretch( 1 ); l1->setColSpacing( 0, 35 ); l1->setColStretch( 2, 1 ); @@ -109,7 +109,7 @@ void KMWPassword::initPrinter( KMPrinter* p ) void KMWPassword::updatePrinter(KMPrinter *p) { - QString s = p->option("kde-backend"); + TQString s = p->option("kde-backend"); if (!s.isEmpty()) setNextPage(s.toInt()); else diff --git a/kdeprint/management/kmwsmb.cpp b/kdeprint/management/kmwsmb.cpp index a4d82fba1..4c649d8a9 100644 --- a/kdeprint/management/kmwsmb.cpp +++ b/kdeprint/management/kmwsmb.cpp @@ -38,20 +38,20 @@ KMWSmb::KMWSmb(TQWidget *parent, const char *name) m_view = new SmbView(this,"SmbView"); m_loginlabel = new TQLabel( this ); - QPushButton *m_scan = new KPushButton(KGuiItem(i18n("Scan"), "viewmag"), this); - QPushButton *m_abort = new KPushButton(KGuiItem(i18n("Abort"), "stop"), this); + TQPushButton *m_scan = new KPushButton(KGuiItem(i18n("Scan"), "viewmag"), this); + TQPushButton *m_abort = new KPushButton(KGuiItem(i18n("Abort"), "stop"), this); m_abort->setEnabled(false); - QLabel *m_worklabel = new TQLabel(i18n("Workgroup:"), this); - QLabel *m_serverlabel = new TQLabel(i18n("Server:"), this); - QLabel *m_printerlabel = new TQLabel(i18n("Printer:"), this); + TQLabel *m_worklabel = new TQLabel(i18n("Workgroup:"), this); + TQLabel *m_serverlabel = new TQLabel(i18n("Server:"), this); + TQLabel *m_printerlabel = new TQLabel(i18n("Printer:"), this); m_work = new TQLineEdit(this); m_server = new TQLineEdit(this); m_printer = new TQLineEdit(this); - QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10); - QGridLayout *lay1 = new TQGridLayout(0, 3, 2, 0, 10); - QHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 10); - lay0->addLayout(lay1,0); + TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10); + TQGridLayout *lay1 = new TQGridLayout(0, 3, 2, 0, 10); + TQHBoxLayout *lay3 = new TQHBoxLayout(0, 0, 10); + lay0->addLayout(TQT_TQLAYOUT(lay1),0); lay0->addWidget(m_view,1); lay0->addLayout(lay3,0); lay0->addSpacing(10); diff --git a/kdeprint/management/kmwsmb.h b/kdeprint/management/kmwsmb.h index c56276206..da89b5d1f 100644 --- a/kdeprint/management/kmwsmb.h +++ b/kdeprint/management/kmwsmb.h @@ -43,7 +43,7 @@ protected slots: protected: SmbView *m_view; - QLineEdit *m_work, *m_server, *m_printer; + TQLineEdit *m_work, *m_server, *m_printer; TQLabel *m_loginlabel; }; diff --git a/kdeprint/management/kmwsocket.cpp b/kdeprint/management/kmwsocket.cpp index 59b7e9d72..5f2bf9742 100644 --- a/kdeprint/management/kmwsocket.cpp +++ b/kdeprint/management/kmwsocket.cpp @@ -45,8 +45,8 @@ KMWSocket::KMWSocket(TQWidget *parent, const char *name) m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_list->setLineWidth(1); - QLabel *l1 = new TQLabel(i18n("&Printer address:"),this); - QLabel *l2 = new TQLabel(i18n("P&ort:"),this); + TQLabel *l1 = new TQLabel(i18n("&Printer address:"),this); + TQLabel *l2 = new TQLabel(i18n("P&ort:"),this); m_printer = new TQLineEdit(this); m_port = new TQLineEdit(this); @@ -67,8 +67,8 @@ KMWSocket::KMWSocket(TQWidget *parent, const char *name) connect( m_scanner, TQT_SIGNAL( scanFinished() ), parent, TQT_SLOT( enableWizard() ) ); // layout - QHBoxLayout *lay3 = new TQHBoxLayout(this, 0, 10); - QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 0); + TQHBoxLayout *lay3 = new TQHBoxLayout(this, 0, 10); + TQVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 0); lay3->addWidget(m_list,1); lay3->addLayout(lay2,1); @@ -88,7 +88,7 @@ KMWSocket::~KMWSocket() void KMWSocket::updatePrinter(KMPrinter *p) { - QString dev = TQString::tqfromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text()); + TQString dev = TQString::tqfromLatin1("socket://%1:%2").arg(m_printer->text()).arg(m_port->text()); p->setDevice(dev); } @@ -99,7 +99,7 @@ bool KMWSocket::isValid(TQString& msg) msg = i18n("You must enter a printer address."); return false; } - QString port(m_port->text()); + TQString port(m_port->text()); int p(9100); if (!port.isEmpty()) { @@ -131,12 +131,12 @@ void KMWSocket::slotScanFinished() TQPtrListIterator<NetworkScanner::SocketInfo> it(*list); for (;it.current();++it) { - QString name; + TQString name; if (it.current()->Name.isEmpty()) name = i18n("Unknown host - 1 is the IP", "<Unknown> (%1)").arg(it.current()->IP); else name = it.current()->Name; - QListViewItem *item = new TQListViewItem(m_list,name,it.current()->IP,TQString::number(it.current()->Port)); + TQListViewItem *item = new TQListViewItem(m_list,name,it.current()->IP,TQString::number(it.current()->Port)); item->setPixmap(0,SmallIcon("kdeprint_printer")); } } diff --git a/kdeprint/management/kmwsocket.h b/kdeprint/management/kmwsocket.h index 4093a8766..07344e529 100644 --- a/kdeprint/management/kmwsocket.h +++ b/kdeprint/management/kmwsocket.h @@ -45,7 +45,7 @@ protected slots: private: KListView *m_list; NetworkScanner *m_scanner; - QLineEdit *m_printer, *m_port; + TQLineEdit *m_printer, *m_port; }; #endif diff --git a/kdeprint/management/kmwsocketutil.cpp b/kdeprint/management/kmwsocketutil.cpp index 6c1cce103..31dad2249 100644 --- a/kdeprint/management/kmwsocketutil.cpp +++ b/kdeprint/management/kmwsocketutil.cpp @@ -46,13 +46,13 @@ TQString localRootIP(); SocketConfig::SocketConfig(KMWSocketUtil *util, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true) { - QWidget *dummy = new TQWidget(this); + TQWidget *dummy = new TQWidget(this); setMainWidget(dummy); KIntValidator *val = new KIntValidator( this ); - QLabel *masklabel = new TQLabel(i18n("&Subnetwork:"),dummy); - QLabel *portlabel = new TQLabel(i18n("&Port:"),dummy); - QLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy); - QLineEdit *mm = new TQLineEdit(dummy); + TQLabel *masklabel = new TQLabel(i18n("&Subnetwork:"),dummy); + TQLabel *portlabel = new TQLabel(i18n("&Port:"),dummy); + TQLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy); + TQLineEdit *mm = new TQLineEdit(dummy); mm->setText(TQString::tqfromLatin1(".[0-255]")); mm->setReadOnly(true); mm->setFixedWidth(fontMetrics().width(mm->text())+10); @@ -77,8 +77,8 @@ SocketConfig::SocketConfig(KMWSocketUtil *util, TQWidget *parent, const char *na port_->setEditText(TQString::number(util->port_)); tout_->setText(TQString::number(util->timeout_)); - QGridLayout *main_ = new TQGridLayout(dummy, 3, 2, 0, 10); - QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 5); + TQGridLayout *main_ = new TQGridLayout(dummy, 3, 2, 0, 10); + TQHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 5); main_->addWidget(masklabel, 0, 0); main_->addWidget(portlabel, 1, 0); main_->addWidget(toutlabel, 2, 0); @@ -98,8 +98,8 @@ SocketConfig::~SocketConfig() void SocketConfig::slotOk() { - QString msg; - QRegExp re("(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})"); + TQString msg; + TQRegExp re("(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})"); if (!re.exactMatch(mask_->text())) msg = i18n("Wrong subnetwork specification."); else @@ -147,7 +147,7 @@ bool KMWSocketUtil::checkPrinter(const TQString& IPstr, int port, TQString* host { if (hostname) { - QString portname; + TQString portname; KExtendedSocket::resolve((KSocketAddress*)(sock.peerAddress()), *hostname, portname); } result = true; @@ -165,8 +165,8 @@ bool KMWSocketUtil::scanNetwork(TQProgressBar *bar) bar->setTotalSteps(n); for (int i=0; i<n; i++) { - QString IPstr = root_ + "." + TQString::number(i); - QString hostname; + TQString IPstr = root_ + "." + TQString::number(i); + TQString hostname; if (checkPrinter(IPstr, port_, &hostname)) { // we found a printer at this address, create SocketInfo entry in printer list SocketInfo *info = new SocketInfo; @@ -208,8 +208,8 @@ TQString localRootIP() infos.setAutoDelete(true); if (infos.count() > 0) { - QString IPstr = infos.first()->address()->nodeName(); - int p = IPstr.findRev('.'); + TQString IPstr = infos.first()->address()->nodeName(); + int p = IPstr.tqfindRev('.'); IPstr.truncate(p); return IPstr; } diff --git a/kdeprint/management/kmwsocketutil.h b/kdeprint/management/kmwsocketutil.h index ad17b8113..a7b9faee2 100644 --- a/kdeprint/management/kmwsocketutil.h +++ b/kdeprint/management/kmwsocketutil.h @@ -48,8 +48,8 @@ protected slots: void slotOk(); private: - QLineEdit *mask_, *tout_; - QComboBox *port_; + TQLineEdit *mask_, *tout_; + TQComboBox *port_; }; class KMWSocketUtil @@ -68,7 +68,7 @@ public: private: TQPtrList<SocketInfo> printerlist_; - QString root_; + TQString root_; int port_; int timeout_; // in milliseconds }; diff --git a/kdeprint/management/kxmlcommanddlg.cpp b/kdeprint/management/kxmlcommanddlg.cpp index 13778043e..3d92ad472 100644 --- a/kdeprint/management/kxmlcommanddlg.cpp +++ b/kdeprint/management/kxmlcommanddlg.cpp @@ -52,13 +52,13 @@ TQString generateId(const TQMap<TQString, DrBase*>& map) { int index(-1); - while (map.contains(TQString::tqfromLatin1("item%1").arg(++index))) ; + while (map.tqcontains(TQString::tqfromLatin1("item%1").arg(++index))) ; return TQString::tqfromLatin1("item%1").arg(index); } TQListViewItem* findPrev(TQListViewItem *item) { - QListViewItem *prev = item->itemAbove(); + TQListViewItem *prev = item->itemAbove(); while (prev && prev->depth() > item->depth()) prev = prev->itemAbove(); if (prev && prev->depth() == item->depth()) @@ -69,7 +69,7 @@ TQListViewItem* findPrev(TQListViewItem *item) TQListViewItem* findNext(TQListViewItem *item) { - QListViewItem *next = item->itemBelow(); + TQListViewItem *next = item->itemBelow(); while (next && next->depth() > item->depth()) next = next->itemBelow(); if (next && next->depth() == item->depth()) @@ -111,12 +111,12 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam m_type->insertItem(i18n("Boolean")); m_format = new TQLineEdit(m_dummy); m_default = new TQLineEdit(m_dummy); - QLabel *m_namelab = new TQLabel(i18n("&Name:"), m_dummy); - QLabel *m_desclab = new TQLabel(i18n("&Description:"), m_dummy); - QLabel *m_formatlab = new TQLabel(i18n("&Format:"), m_dummy); - QLabel *m_typelab = new TQLabel(i18n("&Type:"), m_dummy); - QLabel *m_defaultlab = new TQLabel(i18n("Default &value:"), m_dummy); - QLabel *m_commandlab = new TQLabel(i18n("Co&mmand:"), this); + TQLabel *m_namelab = new TQLabel(i18n("&Name:"), m_dummy); + TQLabel *m_desclab = new TQLabel(i18n("&Description:"), m_dummy); + TQLabel *m_formatlab = new TQLabel(i18n("&Format:"), m_dummy); + TQLabel *m_typelab = new TQLabel(i18n("&Type:"), m_dummy); + TQLabel *m_defaultlab = new TQLabel(i18n("Default &value:"), m_dummy); + TQLabel *m_commandlab = new TQLabel(i18n("Co&mmand:"), this); m_namelab->setBuddy(m_name); m_desclab->setBuddy(m_desc); m_formatlab->setBuddy(m_format); @@ -125,16 +125,16 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam m_commandlab->setBuddy(m_command); m_persistent = new TQCheckBox( i18n( "&Persistent option" ), m_dummy ); - QGroupBox *gb = new TQGroupBox(0, Qt::Horizontal, i18n("Va&lues"), m_dummy); + TQGroupBox *gb = new TQGroupBox(0, Qt::Horizontal, i18n("Va&lues"), m_dummy); m_stack = new TQWidgetStack(gb); - QWidget *w1 = new TQWidget(m_stack), *w2 = new TQWidget(m_stack), *w3 = new TQWidget(m_stack); + TQWidget *w1 = new TQWidget(m_stack), *w2 = new TQWidget(m_stack), *w3 = new TQWidget(m_stack); m_stack->addWidget(w1, 1); m_stack->addWidget(w2, 2); m_stack->addWidget(w3, 3); m_edit1 = new TQLineEdit(w1); m_edit2 = new TQLineEdit(w1); - QLabel *m_editlab1 = new TQLabel(i18n("Minimum v&alue:"), w1); - QLabel *m_editlab2 = new TQLabel(i18n("Ma&ximum value:"), w1); + TQLabel *m_editlab1 = new TQLabel(i18n("Minimum v&alue:"), w1); + TQLabel *m_editlab2 = new TQLabel(i18n("Ma&ximum value:"), w1); m_editlab1->setBuddy(m_edit1); m_editlab2->setBuddy(m_edit2); m_values = new KListView(w2); @@ -159,32 +159,32 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam KSeparator *sep1 = new KSeparator(KSeparator::HLine, m_dummy); - QGroupBox *gb_input = new TQGroupBox(0, Qt::Horizontal, i18n("&Input From"), this); - QGroupBox *gb_output = new TQGroupBox(0, Qt::Horizontal, i18n("O&utput To"), this); - QLabel *m_inputfilelab = new TQLabel(i18n("File:"), gb_input); - QLabel *m_inputpipelab = new TQLabel(i18n("Pipe:"), gb_input); - QLabel *m_outputfilelab = new TQLabel(i18n("File:"), gb_output); - QLabel *m_outputpipelab = new TQLabel(i18n("Pipe:"), gb_output); + TQGroupBox *gb_input = new TQGroupBox(0, Qt::Horizontal, i18n("&Input From"), this); + TQGroupBox *gb_output = new TQGroupBox(0, Qt::Horizontal, i18n("O&utput To"), this); + TQLabel *m_inputfilelab = new TQLabel(i18n("File:"), gb_input); + TQLabel *m_inputpipelab = new TQLabel(i18n("Pipe:"), gb_input); + TQLabel *m_outputfilelab = new TQLabel(i18n("File:"), gb_output); + TQLabel *m_outputpipelab = new TQLabel(i18n("Pipe:"), gb_output); m_inputfile = new TQLineEdit(gb_input); m_inputpipe = new TQLineEdit(gb_input); m_outputfile = new TQLineEdit(gb_output); m_outputpipe = new TQLineEdit(gb_output); m_comment = new KTextEdit( this ); - m_comment->setTextFormat(Qt::RichText ); + m_comment->setTextFormat(TQt::RichText ); m_comment->setReadOnly(true); TQLabel *m_commentlab = new TQLabel( i18n( "Comment:" ), this ); - QVBoxLayout *l2 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); - QHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); - QVBoxLayout *l7 = new TQVBoxLayout(0, 0, 0); + TQVBoxLayout *l2 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQHBoxLayout *l3 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); + TQVBoxLayout *l7 = new TQVBoxLayout(0, 0, 0); l2->addLayout(l3, 0); l3->addWidget(m_commandlab); l3->addWidget(m_command); - QHBoxLayout *l0 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); - QGridLayout *l10 = new TQGridLayout(0, 2, 2, 0, KDialog::spacingHint()); + TQHBoxLayout *l0 = new TQHBoxLayout(0, 0, KDialog::spacingHint()); + TQGridLayout *l10 = new TQGridLayout(0, 2, 2, 0, KDialog::spacingHint()); l2->addLayout(l0, 1); - l0->addLayout(l10); + l0->addLayout(TQT_TQLAYOUT(l10)); l10->addMultiCellWidget(m_view, 0, 0, 0, 1); l10->addWidget(gb_input, 1, 0); l10->addWidget(gb_output, 1, 1); @@ -200,7 +200,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam l7->addWidget(m_down); l7->addStretch(1); l0->addWidget(m_dummy, 1); - QGridLayout *l1 = new TQGridLayout(m_dummy, 9, 2, 0, KDialog::spacingHint()); + TQGridLayout *l1 = new TQGridLayout(m_dummy, 9, 2, 0, KDialog::spacingHint()); l1->addWidget(m_desclab, 0, 0, Qt::AlignRight|Qt::AlignVCenter); l1->addWidget(m_desc, 0, 1); l1->addMultiCellWidget(sep1, 1, 1, 0, 1); @@ -216,23 +216,23 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam l1->addMultiCellWidget(gb, 7, 7, 0, 1); l1->setRowStretch(8, 1); - QHBoxLayout *l4 = new TQHBoxLayout(w2, 0, KDialog::spacingHint()); + TQHBoxLayout *l4 = new TQHBoxLayout(w2, 0, KDialog::spacingHint()); l4->addWidget(m_values); - QVBoxLayout *l6 = new TQVBoxLayout(0, 0, 0); + TQVBoxLayout *l6 = new TQVBoxLayout(0, 0, 0); l4->addLayout(l6); l6->addWidget(m_addval); l6->addWidget(m_delval); l6->addStretch(1); - QGridLayout *l5 = new TQGridLayout(w1, 3, 2, 0, KDialog::spacingHint()); + TQGridLayout *l5 = new TQGridLayout(w1, 3, 2, 0, KDialog::spacingHint()); l5->setRowStretch(2, 1); l5->addWidget(m_editlab1, 0, 0, Qt::AlignRight|Qt::AlignVCenter); l5->addWidget(m_editlab2, 1, 0, Qt::AlignRight|Qt::AlignVCenter); l5->addWidget(m_edit1, 0, 1); l5->addWidget(m_edit2, 1, 1); - QGridLayout *l8 = new TQGridLayout(gb_input->layout(), 2, 2, + TQGridLayout *l8 = new TQGridLayout(gb_input->layout(), 2, 2, KDialog::spacingHint()); - QGridLayout *l9 = new TQGridLayout(gb_output->layout(), 2, 2, + TQGridLayout *l9 = new TQGridLayout(gb_output->layout(), 2, 2, KDialog::spacingHint()); l8->addWidget(m_inputfilelab, 0, 0); l8->addWidget(m_inputpipelab, 1, 0); @@ -243,7 +243,7 @@ KXmlCommandAdvancedDlg::KXmlCommandAdvancedDlg(TQWidget *parent, const char *nam l9->addWidget(m_outputfile, 0, 1); l9->addWidget(m_outputpipe, 1, 1); - QVBoxLayout *l11 = new TQVBoxLayout(gb->layout()); + TQVBoxLayout *l11 = new TQVBoxLayout(TQT_TQLAYOUT(gb->layout())); l11->addWidget(m_stack); TQVBoxLayout *l12 = new TQVBoxLayout( 0, 0, 0 ); @@ -367,7 +367,7 @@ void KXmlCommandAdvancedDlg::setCommand(KXmlCommand *xmlcmd) void KXmlCommandAdvancedDlg::parseXmlCommand(KXmlCommand *xmlcmd) { m_view->clear(); - QListViewItem *root = new TQListViewItem(m_view, xmlcmd->name(), xmlcmd->name()); + TQListViewItem *root = new TQListViewItem(m_view, xmlcmd->name(), xmlcmd->name()); DrMain *driver = xmlcmd->driver(); root->setPixmap(0, SmallIcon("fileprint")); @@ -395,12 +395,12 @@ void KXmlCommandAdvancedDlg::parseXmlCommand(KXmlCommand *xmlcmd) void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, TQListViewItem *parent) { - QListViewItem *item(0); + TQListViewItem *item(0); TQPtrListIterator<DrGroup> git(grp->groups()); for (; git.current(); ++git) { - QString namestr = git.current()->name(); + TQString namestr = git.current()->name(); if (namestr.isEmpty()) { namestr = "group_"+kapp->randomString(4); @@ -417,7 +417,7 @@ void KXmlCommandAdvancedDlg::parseGroupItem(DrGroup *grp, TQListViewItem *parent TQPtrListIterator<DrBase> oit(grp->options()); for (; oit.current(); ++oit) { - QString namestr = oit.current()->name().mid(m_xmlcmd->name().length()+6); + TQString namestr = oit.current()->name().mid(m_xmlcmd->name().length()+6); if (namestr.isEmpty()) { namestr = "option_"+kapp->randomString(4); @@ -454,7 +454,7 @@ void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item) m_name->setText(item->text(1)); m_desc->setText(item->text(0)); - DrBase *opt = (m_opts.contains(item->text(1)) ? m_opts[item->text(1)] : 0); + DrBase *opt = (m_opts.tqcontains(item->text(1)) ? m_opts[item->text(1)] : 0); if (opt) { bool isgroup = (opt->type() < DrBase::String); @@ -481,7 +481,7 @@ void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item) case DrBase::List: { TQPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices())); - QListViewItem *item(0); + TQListViewItem *item(0); for (; it.current(); ++it) { item = new TQListViewItem(m_values, item, it.current()->name(), it.current()->get("text")); @@ -497,9 +497,9 @@ void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item) m_addgrp->setEnabled(isgroup); m_addopt->setEnabled(isgroup); - QListViewItem *prevItem = findPrev(item), *nextItem = findNext(item); - DrBase *prevOpt = (prevItem && m_opts.contains(prevItem->text(1)) ? m_opts[prevItem->text(1)] : 0); - DrBase *nextOpt = (nextItem && m_opts.contains(nextItem->text(1)) ? m_opts[nextItem->text(1)] : 0); + TQListViewItem *prevItem = findPrev(item), *nextItem = findNext(item); + DrBase *prevOpt = (prevItem && m_opts.tqcontains(prevItem->text(1)) ? m_opts[prevItem->text(1)] : 0); + DrBase *nextOpt = (nextItem && m_opts.tqcontains(nextItem->text(1)) ? m_opts[nextItem->text(1)] : 0); m_up->setEnabled(prevOpt && !(prevOpt->type() < DrBase::String && opt->type() >= DrBase::String)); m_down->setEnabled(nextOpt && !(isgroup && nextOpt->type() >= DrBase::String)); @@ -542,7 +542,7 @@ void KXmlCommandAdvancedDlg::slotTypeChanged(int ID) void KXmlCommandAdvancedDlg::slotAddValue() { - QListViewItem *item = new TQListViewItem(m_values, m_values->lastItem(), i18n("Name"), i18n("Description")); + TQListViewItem *item = new TQListViewItem(m_values, m_values->lastItem(), i18n("Name"), i18n("Description")); item->setRenameEnabled(0, true); item->setRenameEnabled(1, true); m_values->ensureItemVisible(item); @@ -552,7 +552,7 @@ void KXmlCommandAdvancedDlg::slotAddValue() void KXmlCommandAdvancedDlg::slotRemoveValue() { - QListViewItem *item = m_values->currentItem(); + TQListViewItem *item = m_values->currentItem(); if (item) delete item; slotValueSelected(m_values->currentItem()); @@ -560,7 +560,7 @@ void KXmlCommandAdvancedDlg::slotRemoveValue() void KXmlCommandAdvancedDlg::slotApplyChanges() { - QListViewItem *item = m_view->currentItem(); + TQListViewItem *item = m_view->currentItem(); if (item) { if (m_name->text().isEmpty() || m_name->text() == "__root__") @@ -571,7 +571,7 @@ void KXmlCommandAdvancedDlg::slotApplyChanges() m_apply->setEnabled(false); - DrBase *opt = (m_opts.contains(item->text(1)) ? m_opts[item->text(1)] : 0); + DrBase *opt = (m_opts.tqcontains(item->text(1)) ? m_opts[item->text(1)] : 0); m_opts.remove(item->text(1)); delete opt; @@ -602,7 +602,7 @@ void KXmlCommandAdvancedDlg::slotApplyChanges() else opt = new DrBooleanOption; DrListOption *lopt = static_cast<DrListOption*>(opt); - QListViewItem *item = m_values->firstChild(); + TQListViewItem *item = m_values->firstChild(); while (item) { DrBase *choice = new DrBase; @@ -642,14 +642,14 @@ void KXmlCommandAdvancedDlg::slotAddGroup() { if (m_view->currentItem()) { - QString ID = generateId(m_opts); + TQString ID = generateId(m_opts); DrGroup *grp = new DrGroup; grp->setName(ID); grp->set("text", i18n("New Group")); m_opts[ID] = grp; - QListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Group"), ID); + TQListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Group"), ID); item->setRenameEnabled(0, true); item->setPixmap(0, SmallIcon("folder")); m_view->ensureItemVisible(item); @@ -661,14 +661,14 @@ void KXmlCommandAdvancedDlg::slotAddOption() { if (m_view->currentItem()) { - QString ID = generateId(m_opts); + TQString ID = generateId(m_opts); DrBase *opt = new DrStringOption; opt->setName(ID); opt->set("text", i18n("New Option")); m_opts[ID] = opt; - QListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Option"), ID); + TQListViewItem *item = new TQListViewItem(m_view->currentItem(), i18n("New Option"), ID); item->setRenameEnabled(0, true); item->setPixmap(0, SmallIcon("document")); m_view->ensureItemVisible(item); @@ -678,12 +678,12 @@ void KXmlCommandAdvancedDlg::slotAddOption() void KXmlCommandAdvancedDlg::slotRemoveItem() { - QListViewItem *item = m_view->currentItem(); + TQListViewItem *item = m_view->currentItem(); if (item) { - QListViewItem *newCurrent(item->nextSibling()); + TQListViewItem *newCurrent(item->nextSibling()); if (!newCurrent) - newCurrent = item->parent(); + newCurrent = item->tqparent(); removeItem(item); delete item; m_view->setSelected(newCurrent, true); @@ -694,7 +694,7 @@ void KXmlCommandAdvancedDlg::removeItem(TQListViewItem *item) { delete m_opts[item->text(1)]; m_opts.remove(item->text(1)); - QListViewItem *child = item->firstChild(); + TQListViewItem *child = item->firstChild(); while (child && item) { removeItem(child); @@ -705,15 +705,15 @@ void KXmlCommandAdvancedDlg::removeItem(TQListViewItem *item) void KXmlCommandAdvancedDlg::slotMoveUp() { - QListViewItem *item = m_view->currentItem(), *prev = 0; + TQListViewItem *item = m_view->currentItem(), *prev = 0; if (item && (prev=findPrev(item))) { - QListViewItem *after(0); + TQListViewItem *after(0); if ((after=findPrev(prev)) != 0) item->moveItem(after); else { - QListViewItem *parent = item->parent(); + TQListViewItem *parent = item->tqparent(); parent->takeItem(item); parent->insertItem(item); } @@ -724,7 +724,7 @@ void KXmlCommandAdvancedDlg::slotMoveUp() void KXmlCommandAdvancedDlg::slotMoveDown() { - QListViewItem *item = m_view->currentItem(), *next = 0; + TQListViewItem *item = m_view->currentItem(), *next = 0; if (item && (next=findNext(item))) { item->moveItem(next); @@ -751,7 +751,7 @@ void KXmlCommandAdvancedDlg::slotValueSelected(TQListViewItem *item) void KXmlCommandAdvancedDlg::slotOptionRenamed(TQListViewItem *item, int) { - if (item && m_opts.contains(item->text(1))) + if (item && m_opts.tqcontains(item->text(1))) { DrBase *opt = m_opts[item->text(1)]; opt->set("text", item->text(0)); @@ -764,10 +764,10 @@ void KXmlCommandAdvancedDlg::recreateGroup(TQListViewItem *item, DrGroup *grp) if (!item) return; - QListViewItem *child = item->firstChild(); + TQListViewItem *child = item->firstChild(); while (child) { - DrBase *opt = (m_opts.contains(child->text(1)) ? m_opts[child->text(1)] : 0); + DrBase *opt = (m_opts.tqcontains(child->text(1)) ? m_opts[child->text(1)] : 0); if (opt) { if (opt->type() == DrBase::Group) @@ -807,7 +807,7 @@ bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, TQWidget *parent) xmlcmd->setComment( xmldlg->m_comment->text().replace( TQRegExp( "\n" ), " " ) ); // need to recreate the driver tree structure - DrMain *driver = (xmldlg->m_opts.contains("__root__") ? static_cast<DrMain*>(xmldlg->m_opts["__root__"]) : 0); + DrMain *driver = (xmldlg->m_opts.tqcontains("__root__") ? static_cast<DrMain*>(xmldlg->m_opts["__root__"]) : 0); if (!driver && xmldlg->m_opts.count() > 0) { kdDebug() << "KXmlCommandAdvancedDlg: driver structure not found, creating one" << endl; @@ -833,11 +833,11 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name) setButtonText(Details, i18n("&Mime Type Settings")); m_cmd = 0; - QWidget *dummy = new TQWidget(this, "TopDetail"); - QWidget *topmain = new TQWidget(this, "TopMain"); + TQWidget *dummy = new TQWidget(this, "TopDetail"); + TQWidget *topmain = new TQWidget(this, "TopMain"); - QGroupBox *m_gb1 = new TQGroupBox(0, Qt::Horizontal, i18n("Supported &Input Formats"), dummy); - QGroupBox *m_gb2 = new TQGroupBox(0, Qt::Horizontal, i18n("Requirements"), topmain); + TQGroupBox *m_gb1 = new TQGroupBox(0, Qt::Horizontal, i18n("Supported &Input Formats"), dummy); + TQGroupBox *m_gb2 = new TQGroupBox(0, Qt::Horizontal, i18n("Requirements"), topmain); m_description = new TQLineEdit(topmain); m_idname = new TQLabel(topmain); @@ -848,7 +848,7 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name) m_addreq->setIconSet(SmallIconSet("filenew")); m_removereq = new TQToolButton(m_gb2); m_removereq->setIconSet(SmallIconSet("editdelete")); - QPushButton *m_edit = new KPushButton(KGuiItem(i18n("&Edit Command..."), "edit"), topmain); + TQPushButton *m_edit = new KPushButton(KGuiItem(i18n("&Edit Command..."), "edit"), topmain); m_mimetype = new TQComboBox(dummy); m_availablemime = new KListBox(m_gb1); m_selectedmime = new KListBox(m_gb1); @@ -863,48 +863,48 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name) m_addmime->setEnabled(false); m_removemime->setEnabled(false); - QLabel *m_desclab = new TQLabel(i18n("&Description:"), topmain); + TQLabel *m_desclab = new TQLabel(i18n("&Description:"), topmain); m_desclab->setBuddy(m_description); - QLabel *m_mimetypelab = new TQLabel(i18n("Output &format:"), dummy); + TQLabel *m_mimetypelab = new TQLabel(i18n("Output &format:"), dummy); m_mimetypelab->setBuddy(m_mimetype); - QLabel *m_idnamelab = new TQLabel(i18n("ID name:"), topmain); + TQLabel *m_idnamelab = new TQLabel(i18n("ID name:"), topmain); - QFont f(m_idname->font()); + TQFont f(m_idname->font()); f.setBold(true); m_idname->setFont(f); KSeparator *sep1 = new KSeparator(TQFrame::HLine, dummy); - QVBoxLayout *l0 = new TQVBoxLayout(topmain, 0, 10); - QGridLayout *l5 = new TQGridLayout(0, 2, 2, 0, 5); - l0->addLayout(l5); + TQVBoxLayout *l0 = new TQVBoxLayout(topmain, 0, 10); + TQGridLayout *l5 = new TQGridLayout(0, 2, 2, 0, 5); + l0->addLayout(TQT_TQLAYOUT(l5)); l5->addWidget(m_idnamelab, 0, 0); l5->addWidget(m_idname, 0, 1); l5->addWidget(m_desclab, 1, 0); l5->addWidget(m_description, 1, 1); l0->addWidget(m_gb2); - QHBoxLayout *l3 = new TQHBoxLayout(0, 0, 0); + TQHBoxLayout *l3 = new TQHBoxLayout(0, 0, 0); l0->addLayout(l3); l3->addWidget(m_edit); l3->addStretch(1); - QVBoxLayout *l7 = new TQVBoxLayout(dummy, 0, 10); - QHBoxLayout *l6 = new TQHBoxLayout(0, 0, 5); + TQVBoxLayout *l7 = new TQVBoxLayout(dummy, 0, 10); + TQHBoxLayout *l6 = new TQHBoxLayout(0, 0, 5); l7->addWidget(sep1); l7->addLayout(l6); l6->addWidget(m_mimetypelab, 0); l6->addWidget(m_mimetype, 1); l7->addWidget(m_gb1); - QGridLayout *l2 = new TQGridLayout(m_gb1->layout(), 4, 3, 10); + TQGridLayout *l2 = new TQGridLayout(TQT_TQLAYOUT(m_gb1->layout()), 4, 3, 10); l2->addMultiCellWidget(m_availablemime, 0, 3, 2, 2); l2->addMultiCellWidget(m_selectedmime, 0, 3, 0, 0); l2->addWidget(m_addmime, 1, 1); l2->addWidget(m_removemime, 2, 1); l2->setRowStretch(0, 1); l2->setRowStretch(3, 1); - QHBoxLayout *l4 = new TQHBoxLayout(m_gb2->layout(), 10); + TQHBoxLayout *l4 = new TQHBoxLayout(TQT_TQLAYOUT(m_gb2->layout()), 10); l4->addWidget(m_requirements); - QVBoxLayout *l8 = new TQVBoxLayout(0, 0, 0); + TQVBoxLayout *l8 = new TQVBoxLayout(0, 0, 0); l4->addLayout(l8); l8->addWidget(m_addreq); l8->addWidget(m_removereq); @@ -922,7 +922,7 @@ KXmlCommandDlg::KXmlCommandDlg(TQWidget *parent, const char *name) KMimeType::List list = KMimeType::allMimeTypes(); for (TQValueList<KMimeType::Ptr>::ConstIterator it=list.begin(); it!=list.end(); ++it) { - QString mimetype = (*it)->name(); + TQString mimetype = (*it)->name(); m_mimelist << mimetype; } @@ -943,15 +943,15 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd) m_idname->setText(xmlCmd->name()); m_requirements->clear(); - QStringList list = xmlCmd->requirements(); - QListViewItem *item(0); + TQStringList list = xmlCmd->requirements(); + TQListViewItem *item(0); for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it) { item = new TQListViewItem(m_requirements, item, *it); item->setRenameEnabled(0, true); } - int index = m_mimelist.findIndex(xmlCmd->mimeType()); + int index = m_mimelist.tqfindIndex(xmlCmd->mimeType()); if (index != -1) m_mimetype->setCurrentItem(index); else @@ -964,7 +964,7 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd) for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it) { m_selectedmime->insertItem(*it); - delete m_availablemime->findItem(*it, Qt::ExactMatch); + delete m_availablemime->tqfindItem(*it, TQt::ExactMatch); } } @@ -974,8 +974,8 @@ void KXmlCommandDlg::slotOk() { m_cmd->setMimeType((m_mimetype->currentText() == "all/all" ? TQString::null : m_mimetype->currentText())); m_cmd->setDescription(m_description->text()); - QStringList l; - QListViewItem *item = m_requirements->firstChild(); + TQStringList l; + TQListViewItem *item = m_requirements->firstChild(); while (item) { l << item->text(0); @@ -1030,7 +1030,7 @@ void KXmlCommandDlg::slotEditCommand() void KXmlCommandDlg::slotAddReq() { - QListViewItem *item = new TQListViewItem(m_requirements, m_requirements->lastItem(), i18n("exec:/")); + TQListViewItem *item = new TQListViewItem(m_requirements, m_requirements->lastItem(), i18n("exec:/")); item->setRenameEnabled(0, true); m_requirements->ensureItemVisible(item); item->startRename(0); diff --git a/kdeprint/management/kxmlcommanddlg.h b/kdeprint/management/kxmlcommanddlg.h index ccd52ba0b..7ccbc9e0e 100644 --- a/kdeprint/management/kxmlcommanddlg.h +++ b/kdeprint/management/kxmlcommanddlg.h @@ -75,15 +75,15 @@ protected slots: private: KListView *m_view; - QLineEdit *m_name, *m_desc, *m_format, *m_default, *m_command; - QComboBox *m_type; - QWidget *m_dummy; + TQLineEdit *m_name, *m_desc, *m_format, *m_default, *m_command; + TQComboBox *m_type; + TQWidget *m_dummy; KListView *m_values; - QLineEdit *m_edit1, *m_edit2; - QWidgetStack *m_stack; - QToolButton *m_apply, *m_addgrp, *m_addopt, *m_delopt, *m_up, *m_down; - QLineEdit *m_inputfile, *m_inputpipe, *m_outputfile, *m_outputpipe; - QToolButton *m_addval, *m_delval; + TQLineEdit *m_edit1, *m_edit2; + TQWidgetStack *m_stack; + TQToolButton *m_apply, *m_addgrp, *m_addopt, *m_delopt, *m_up, *m_down; + TQLineEdit *m_inputfile, *m_inputpipe, *m_outputfile, *m_outputpipe; + TQToolButton *m_addval, *m_delval; TQTextEdit *m_comment; TQCheckBox *m_persistent; @@ -112,15 +112,15 @@ protected slots: void slotOk(); private: - QLineEdit *m_description; - QLabel *m_idname; - QComboBox *m_mimetype; + TQLineEdit *m_description; + TQLabel *m_idname; + TQComboBox *m_mimetype; KListBox *m_availablemime, *m_selectedmime; - QToolButton *m_addmime, *m_removemime; + TQToolButton *m_addmime, *m_removemime; KListView *m_requirements; - QToolButton *m_removereq, *m_addreq; + TQToolButton *m_removereq, *m_addreq; - QStringList m_mimelist; + TQStringList m_mimelist; KXmlCommand *m_cmd; }; diff --git a/kdeprint/management/kxmlcommandselector.cpp b/kdeprint/management/kxmlcommandselector.cpp index ed7ff0150..8162c7b6c 100644 --- a/kdeprint/management/kxmlcommandselector.cpp +++ b/kdeprint/management/kxmlcommandselector.cpp @@ -45,8 +45,8 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, TQWidget *parent, const { m_cmd = new TQComboBox(this); connect(m_cmd, TQT_SIGNAL(activated(int)), TQT_SLOT(slotCommandSelected(int))); - QPushButton *m_add = new KPushButton(this); - QPushButton *m_edit = new KPushButton(this); + TQPushButton *m_add = new KPushButton(this); + TQPushButton *m_edit = new KPushButton(this); m_add->setPixmap(SmallIcon("filenew")); m_edit->setPixmap(SmallIcon("configure")); connect(m_add, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddCommand())); @@ -62,9 +62,9 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, TQWidget *parent, const m_line = 0; m_usefilter = 0; - QPushButton *m_browse = 0; + TQPushButton *m_browse = 0; - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10); if (canBeNull) { @@ -86,7 +86,7 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, TQWidget *parent, const setTabOrder(m_cmd, m_add); setTabOrder(m_add, m_edit); - QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10); + TQHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10); l0->addLayout(l1); l1->addWidget(m_line); l1->addWidget(m_browse); @@ -97,9 +97,9 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, TQWidget *parent, const else setFocusProxy(m_cmd); - QGridLayout *l2 = new TQGridLayout(0, 2, (m_usefilter?3:2), 0, 5); + TQGridLayout *l2 = new TQGridLayout(0, 2, (m_usefilter?3:2), 0, 5); int c(0); - l0->addLayout(l2); + l0->addLayout(TQT_TQLAYOUT(l2)); if (m_usefilter) { l2->addWidget(m_usefilter, 0, c++); @@ -109,7 +109,7 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, TQWidget *parent, const l2->addLayout( l4, 1, c ); l4->addWidget( m_helpbtn, 0 ); l4->addWidget( m_shortinfo, 1 ); - QHBoxLayout *l3 = new TQHBoxLayout(0, 0, 0); + TQHBoxLayout *l3 = new TQHBoxLayout(0, 0, 0); l2->addLayout(l3, 0, c+1); l3->addWidget(m_add); l3->addWidget(m_edit); @@ -122,13 +122,13 @@ KXmlCommandSelector::KXmlCommandSelector(bool canBeNull, TQWidget *parent, const void KXmlCommandSelector::loadCommands() { - QString thisCmd = (m_cmd->currentItem() != -1 ? m_cmdlist[m_cmd->currentItem()] : TQString::null); + TQString thisCmd = (m_cmd->currentItem() != -1 ? m_cmdlist[m_cmd->currentItem()] : TQString::null); m_cmd->clear(); m_cmdlist.clear(); - QStringList list = KXmlCommandManager::self()->commandListWithDescription(); - QStringList desclist; + TQStringList list = KXmlCommandManager::self()->commandListWithDescription(); + TQStringList desclist; for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it) { m_cmdlist << (*it); @@ -137,7 +137,7 @@ void KXmlCommandSelector::loadCommands() } m_cmd->insertStringList(desclist); - int index = m_cmdlist.findIndex(thisCmd); + int index = m_cmdlist.tqfindIndex(thisCmd); if (index != -1) m_cmd->setCurrentItem(index); if (m_cmd->currentItem() != -1 && m_cmd->isEnabled()) @@ -146,7 +146,7 @@ void KXmlCommandSelector::loadCommands() TQString KXmlCommandSelector::command() const { - QString cmd; + TQString cmd; if (m_line && !m_usefilter->isChecked()) cmd = m_line->text(); else @@ -156,7 +156,7 @@ TQString KXmlCommandSelector::command() const void KXmlCommandSelector::setCommand(const TQString& cmd) { - int index = m_cmdlist.findIndex(cmd); + int index = m_cmdlist.tqfindIndex(cmd); if (m_usefilter) m_usefilter->setChecked(index != -1); @@ -171,12 +171,12 @@ void KXmlCommandSelector::setCommand(const TQString& cmd) void KXmlCommandSelector::slotAddCommand() { bool ok(false); - QString cmdId = KInputDialog::getText(i18n("Command Name"), i18n("Enter an identification name for the new command:"), TQString::null, &ok, this); + TQString cmdId = KInputDialog::getText(i18n("Command Name"), i18n("Enter an identification name for the new command:"), TQString::null, &ok, this); if (ok) { bool added(true); - if (m_cmdlist.findIndex(cmdId) != -1) + if (m_cmdlist.tqfindIndex(cmdId) != -1) { if (KMessageBox::warningContinueCancel( this, @@ -202,7 +202,7 @@ void KXmlCommandSelector::slotAddCommand() void KXmlCommandSelector::slotEditCommand() { - QString xmlId = m_cmdlist[m_cmd->currentItem()]; + TQString xmlId = m_cmdlist[m_cmd->currentItem()]; KXmlCommand *xmlCmd = KXmlCommandManager::self()->loadCommand(xmlId); if (xmlCmd) { @@ -222,7 +222,7 @@ void KXmlCommandSelector::slotEditCommand() void KXmlCommandSelector::slotBrowse() { - QString filename = KFileDialog::getOpenFileName(TQString::null, TQString::null, this); + TQString filename = KFileDialog::getOpenFileName(TQString::null, TQString::null, this); if (!filename.isEmpty() && m_line) m_line->setText(filename); } diff --git a/kdeprint/management/kxmlcommandselector.h b/kdeprint/management/kxmlcommandselector.h index 0f1335174..7466b9ea5 100644 --- a/kdeprint/management/kxmlcommandselector.h +++ b/kdeprint/management/kxmlcommandselector.h @@ -56,11 +56,11 @@ signals: void commandValid( bool ); private: - QComboBox *m_cmd; - QLineEdit *m_line; - QCheckBox *m_usefilter; - QStringList m_cmdlist; - QLabel *m_shortinfo; + TQComboBox *m_cmd; + TQLineEdit *m_line; + TQCheckBox *m_usefilter; + TQStringList m_cmdlist; + TQLabel *m_shortinfo; TQPushButton *m_helpbtn; TQString m_help; }; diff --git a/kdeprint/management/networkscanner.cpp b/kdeprint/management/networkscanner.cpp index 576840760..307dbaeee 100644 --- a/kdeprint/management/networkscanner.cpp +++ b/kdeprint/management/networkscanner.cpp @@ -79,8 +79,8 @@ TQString NetworkScanner::NetworkScannerPrivate::localPrefix() infos.setAutoDelete(true); if (infos.count() > 0) { - QString IPstr = infos.first()->address()->nodeName(); - int p = IPstr.findRev('.'); + TQString IPstr = infos.first()->address()->nodeName(); + int p = IPstr.tqfindRev('.'); IPstr.truncate(p); return IPstr; } @@ -104,7 +104,7 @@ NetworkScanner::NetworkScanner( int port, TQWidget *parent, const char *name ) d->scan = new KPushButton( KGuiItem( i18n( "Sc&an" ), "viewmag" ), this ); d->timer = new TQTimer( this ); #ifdef USE_QSOCKET - d->socket = new TQSocket( this ); + d->socket = new TQSocket( TQT_TQOBJECT(this) ); #else d->socket = new KExtendedSocket(); #endif @@ -332,13 +332,13 @@ NetworkScannerConfig::NetworkScannerConfig(NetworkScanner *scanner, const char * : KDialogBase(scanner, name, true, TQString::null, Ok|Cancel, Ok, true) { scanner_ = scanner; - QWidget *dummy = new TQWidget(this); + TQWidget *dummy = new TQWidget(this); setMainWidget(dummy); KIntValidator *val = new KIntValidator( this ); - QLabel *masklabel = new TQLabel(i18n("&Subnetwork:"),dummy); - QLabel *portlabel = new TQLabel(i18n("&Port:"),dummy); - QLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy); - QLineEdit *mm = new TQLineEdit(dummy); + TQLabel *masklabel = new TQLabel(i18n("&Subnetwork:"),dummy); + TQLabel *portlabel = new TQLabel(i18n("&Port:"),dummy); + TQLabel *toutlabel = new TQLabel(i18n("&Timeout (ms):"),dummy); + TQLineEdit *mm = new TQLineEdit(dummy); mm->setText(TQString::tqfromLatin1(".[0-255]")); mm->setReadOnly(true); mm->setFixedWidth(fontMetrics().width(mm->text())+10); @@ -363,8 +363,8 @@ NetworkScannerConfig::NetworkScannerConfig(NetworkScanner *scanner, const char * port_->setEditText(TQString::number(scanner_->port())); tout_->setText(TQString::number(scanner_->timeout())); - QGridLayout *main_ = new TQGridLayout(dummy, 3, 2, 0, 10); - QHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 5); + TQGridLayout *main_ = new TQGridLayout(dummy, 3, 2, 0, 10); + TQHBoxLayout *lay1 = new TQHBoxLayout(0, 0, 5); main_->addWidget(masklabel, 0, 0); main_->addWidget(portlabel, 1, 0); main_->addWidget(toutlabel, 2, 0); @@ -384,8 +384,8 @@ NetworkScannerConfig::~NetworkScannerConfig() void NetworkScannerConfig::slotOk() { - QString msg; - QRegExp re("(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})"); + TQString msg; + TQRegExp re("(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})"); if (!re.exactMatch(mask_->text())) msg = i18n("Wrong subnetwork specification."); else diff --git a/kdeprint/management/networkscanner.h b/kdeprint/management/networkscanner.h index ea9602afa..97c69a2cc 100644 --- a/kdeprint/management/networkscanner.h +++ b/kdeprint/management/networkscanner.h @@ -87,8 +87,8 @@ protected slots: void slotOk(); private: - QLineEdit *mask_, *tout_; - QComboBox *port_; + TQLineEdit *mask_, *tout_; + TQComboBox *port_; NetworkScanner *scanner_; }; diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp index 987c3f6ae..bbe2a07f9 100644 --- a/kdeprint/management/smbview.cpp +++ b/kdeprint/management/smbview.cpp @@ -140,7 +140,7 @@ void SmbView::init() while (!smb_stream.atEnd ()) { TQString smb_line = smb_stream.readLine (); - if (smb_line.contains (wins_keyword, FALSE) > 0) + if (smb_line.tqcontains (wins_keyword, FALSE) > 0) { TQString key = smb_line.section ('=', 0, 0); key = key.stripWhiteSpace(); @@ -196,7 +196,7 @@ void SmbView::setOpen(TQListViewItem *item, bool on) } *m_proc << KProcess::quote (item->text (0)); *m_proc << " -W "; - *m_proc << KProcess::quote (item->parent ()-> + *m_proc << KProcess::quote (item->tqparent ()-> text (0)); if (!krb5ccname) { @@ -212,14 +212,14 @@ void SmbView::setOpen(TQListViewItem *item, bool on) void SmbView::processGroups() { - QStringList grps = TQStringList::split('\n',m_buffer,false); + TQStringList grps = TQStringList::split('\n',m_buffer,false); clear(); for (TQStringList::ConstIterator it=grps.begin(); it!=grps.end(); ++it) { int p = (*it).tqfind("<1d>"); if (p == -1) continue; - QListViewItem *item = new TQListViewItem(this,(*it).left(p).stripWhiteSpace()); + TQListViewItem *item = new TQListViewItem(this,(*it).left(p).stripWhiteSpace()); item->setExpandable(true); item->setPixmap(0,SmallIcon("network")); } @@ -227,18 +227,18 @@ void SmbView::processGroups() void SmbView::processServers() { - QStringList lines = TQStringList::split('\n',m_buffer,true); - QString line; + TQStringList lines = TQStringList::split('\n',m_buffer,true); + TQString line; uint index(0); while (index < lines.count()) { line = lines[index++].stripWhiteSpace(); if (line.isEmpty()) break; - QStringList words = TQStringList::split(' ',line,false); + TQStringList words = TQStringList::split(' ',line,false); if (words[1] != "<00>" || words[3] == "<GROUP>") continue; - QListViewItem *item = new TQListViewItem(m_current,words[0]); + TQListViewItem *item = new TQListViewItem(m_current,words[0]); item->setExpandable(true); item->setPixmap(0,SmallIcon("kdeprint_computer")); } @@ -246,8 +246,8 @@ void SmbView::processServers() void SmbView::processShares() { - QStringList lines = TQStringList::split('\n',m_buffer,true); - QString line; + TQStringList lines = TQStringList::split('\n',m_buffer,true); + TQString line; uint index(0); for (;index < lines.count();index++) if (lines[index].stripWhiteSpace().startsWith("Sharename")) @@ -263,16 +263,16 @@ void SmbView::processShares() KMessageBox::error( this, line ); break; } - QString typestr(line.mid(15, 10).stripWhiteSpace()); - //QStringList words = TQStringList::split(' ',line,false); + TQString typestr(line.mid(15, 10).stripWhiteSpace()); + //TQStringList words = TQStringList::split(' ',line,false); //if (words[1] == "Printer") if (typestr == "Printer") { - QString comm(line.mid(25).stripWhiteSpace()), sharen(line.mid(0, 15).stripWhiteSpace()); + TQString comm(line.mid(25).stripWhiteSpace()), sharen(line.mid(0, 15).stripWhiteSpace()); //for (uint i=2; i<words.count(); i++) // comm += (words[i]+" "); - //QListViewItem *item = new TQListViewItem(m_current,words[0],comm); - QListViewItem *item = new TQListViewItem(m_current,sharen,comm); + //TQListViewItem *item = new TQListViewItem(m_current,words[0],comm); + TQListViewItem *item = new TQListViewItem(m_current,sharen,comm); item->setPixmap(0,SmallIcon("kdeprint_printer")); } } @@ -281,7 +281,7 @@ void SmbView::processShares() void SmbView::slotSelectionChanged(TQListViewItem *item) { if (item && item->depth() == 2) - emit printerSelected(item->parent()->parent()->text(0),item->parent()->text(0),item->text(0)); + emit printerSelected(item->tqparent()->tqparent()->text(0),item->tqparent()->text(0),item->text(0)); } void SmbView::abort() diff --git a/kdeprint/management/smbview.h b/kdeprint/management/smbview.h index e86f3d5ec..57dc297f7 100644 --- a/kdeprint/management/smbview.h +++ b/kdeprint/management/smbview.h @@ -56,12 +56,12 @@ protected slots: private: enum State { GroupListing, ServerListing, ShareListing, Idle }; int m_state; - QListViewItem *m_current; + TQListViewItem *m_current; KProcess *m_proc; - QString m_buffer; - QString m_login, m_password; + TQString m_buffer; + TQString m_login, m_password; KTempFile *m_passwdFile; - QString m_wins_server; + TQString m_wins_server; }; #endif |