diff options
Diffstat (limited to 'kdeprint')
249 files changed, 1655 insertions, 1653 deletions
diff --git a/kdeprint/cups/cupsaddsmb2.cpp b/kdeprint/cups/cupsaddsmb2.cpp index 8a6d44d6e..2737cfd71 100644 --- a/kdeprint/cups/cupsaddsmb2.cpp +++ b/kdeprint/cups/cupsaddsmb2.cpp @@ -58,9 +58,9 @@ CupsAddSmb::CupsAddSmb(TQWidget *parent, const char *name) connect(m_doit, TQT_SIGNAL(clicked()), TQT_SLOT(slotActionClicked())); m_bar = new TQProgressBar(this); m_text = new KActiveLabel(this); - QLabel *m_title = new TQLabel(i18n("Export Printer Driver to Windows Clients"), this); + TQLabel *m_title = new TQLabel(i18n("Export Printer Driver to Windows Clients"), this); setCaption(m_title->text()); - QFont f(m_title->font()); + TQFont f(m_title->font()); f.setBold(true); m_title->setFont(f); KSeparator *m_sep = new KSeparator(Qt::Horizontal, this); @@ -100,15 +100,15 @@ CupsAddSmb::CupsAddSmb(TQWidget *parent, const char *name) TQWhatsThis::add( m_passwdlab, txt ); TQWhatsThis::add( m_passwded, txt ); - QHBoxLayout *l0 = new TQHBoxLayout(this, 10, 10); - QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 10); + TQHBoxLayout *l0 = new TQHBoxLayout(this, 10, 10); + TQVBoxLayout *l1 = new TQVBoxLayout(0, 0, 10); l0->addWidget(m_side); l0->addLayout(l1); l1->addWidget(m_title); l1->addWidget(m_sep); l1->addWidget(m_text); TQGridLayout *l3 = new TQGridLayout( 0, 3, 2, 0, 10 ); - l1->addLayout( l3 ); + l1->addLayout( TQT_TQLAYOUT(l3) ); l3->addWidget( m_loginlab, 1, 0 ); l3->addWidget( m_passwdlab, 2, 0 ); l3->addWidget( m_serverlab, 0, 0 ); @@ -120,7 +120,7 @@ CupsAddSmb::CupsAddSmb(TQWidget *parent, const char *name) l1->addWidget(m_bar); l1->addWidget( m_textinfo ); l1->addSpacing(30); - QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 10); + TQHBoxLayout *l2 = new TQHBoxLayout(0, 0, 10); l1->addLayout(l2); l2->addStretch(1); l2->addWidget(m_doit); @@ -147,7 +147,7 @@ void CupsAddSmb::slotActionClicked() void CupsAddSmb::slotReceived(KProcess*, char *buf, int buflen) { - QString line; + TQString line; int index(0); bool partial(false); static bool incomplete(false); @@ -160,7 +160,7 @@ void CupsAddSmb::slotReceived(KProcess*, char *buf, int buflen) partial = true; while (index < buflen) { - QChar c(buf[index++]); + TQChar c(buf[index++]); if (c == '\n') { partial = false; @@ -253,7 +253,7 @@ void CupsAddSmb::doNextAction() m_state = None; if (m_proc.isRunning()) { - QCString s = m_actions[m_actionindex++].latin1(); + TQCString s = m_actions[m_actionindex++].latin1(); m_bar->setProgress(m_bar->progress()+1); kdDebug(500) << "NEXT ACTION = " << s << endl; if (s == "quit") @@ -289,7 +289,7 @@ void CupsAddSmb::doNextAction() m_state = AddPrinter; //m_text->setText(i18n("Installing printer %1").arg(m_actions[m_actionindex])); m_textinfo->setText(i18n("Installing printer %1").arg(m_actions[m_actionindex])); - QCString dest = m_actions[m_actionindex].local8Bit(); + TQCString dest = m_actions[m_actionindex].local8Bit(); if (s == "addprinter") s.append(" ").append(dest).append(" ").append(dest).append(" \"").append(dest).append("\" \"\""); else diff --git a/kdeprint/cups/cupsaddsmb2.h b/kdeprint/cups/cupsaddsmb2.h index 1f396840f..266a50c6c 100644 --- a/kdeprint/cups/cupsaddsmb2.h +++ b/kdeprint/cups/cupsaddsmb2.h @@ -59,19 +59,19 @@ protected: private: KProcess m_proc; - QStringList m_buffer; + TQStringList m_buffer; int m_state; - QStringList m_actions; + TQStringList m_actions; int m_actionindex; bool m_status; - QProgressBar *m_bar; - QString m_dest; + TQProgressBar *m_bar; + TQString m_dest; SidePixmap *m_side; - QPushButton *m_doit, *m_cancel; + TQPushButton *m_doit, *m_cancel; KActiveLabel *m_text; TQLabel *m_textinfo; TQLineEdit *m_logined, *m_passwded, *m_servered; - QString m_datadir; + TQString m_datadir; }; #endif diff --git a/kdeprint/cups/cupsdconf2/addressdialog.cpp b/kdeprint/cups/cupsdconf2/addressdialog.cpp index d4f5b900f..325d3c7d5 100644 --- a/kdeprint/cups/cupsdconf2/addressdialog.cpp +++ b/kdeprint/cups/cupsdconf2/addressdialog.cpp @@ -36,10 +36,10 @@ AddressDialog::AddressDialog(TQWidget *parent, const char *name) type_->insertItem(i18n("Allow")); type_->insertItem(i18n("Deny")); - QLabel *l1 = new TQLabel(i18n("Type:"), w); - QLabel *l2 = new TQLabel(i18n("Address:"), w); + TQLabel *l1 = new TQLabel(i18n("Type:"), w); + TQLabel *l2 = new TQLabel(i18n("Address:"), w); - QGridLayout *m1 = new TQGridLayout(w, 2, 2, 0, 5); + TQGridLayout *m1 = new TQGridLayout(w, 2, 2, 0, 5); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); m1->addWidget(l2, 1, 0, Qt::AlignRight); diff --git a/kdeprint/cups/cupsdconf2/addressdialog.h b/kdeprint/cups/cupsdconf2/addressdialog.h index 5fb9125e6..7d241a080 100644 --- a/kdeprint/cups/cupsdconf2/addressdialog.h +++ b/kdeprint/cups/cupsdconf2/addressdialog.h @@ -35,8 +35,8 @@ public: static TQString editAddress(const TQString& s, TQWidget *parent = 0); private: - QComboBox *type_; - QLineEdit *address_; + TQComboBox *type_; + TQLineEdit *address_; }; #endif diff --git a/kdeprint/cups/cupsdconf2/browsedialog.cpp b/kdeprint/cups/cupsdconf2/browsedialog.cpp index 0856df11a..4cfc6099c 100644 --- a/kdeprint/cups/cupsdconf2/browsedialog.cpp +++ b/kdeprint/cups/cupsdconf2/browsedialog.cpp @@ -33,7 +33,7 @@ BrowseDialog::BrowseDialog(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); type_ = new TQComboBox(dummy); from_ = new TQLineEdit(dummy); @@ -44,11 +44,11 @@ BrowseDialog::BrowseDialog(TQWidget *parent, const char *name) type_->insertItem(i18n("Relay")); type_->insertItem(i18n("Poll")); - QLabel *l1 = new TQLabel(i18n("Type:"), dummy); - QLabel *l2 = new TQLabel(i18n("From:"), dummy); - QLabel *l3 = new TQLabel(i18n("To:"), dummy); + TQLabel *l1 = new TQLabel(i18n("Type:"), dummy); + TQLabel *l2 = new TQLabel(i18n("From:"), dummy); + TQLabel *l3 = new TQLabel(i18n("To:"), dummy); - QGridLayout *m1 = new TQGridLayout(dummy, 3, 2, 0, 5); + TQGridLayout *m1 = new TQGridLayout(dummy, 3, 2, 0, 5); m1->addWidget(l1, 0, 0, Qt::AlignRight); m1->addWidget(l2, 1, 0, Qt::AlignRight); m1->addWidget(l3, 2, 0, Qt::AlignRight); @@ -111,7 +111,7 @@ TQString BrowseDialog::editAddress(const TQString& s, TQWidget *parent, CupsdCon { BrowseDialog dlg(parent); dlg.setInfos(conf); - QStringList l = TQStringList::split(TQRegExp("\\s"), s, false); + TQStringList l = TQStringList::split(TQRegExp("\\s"), s, false); if (l.count() > 1) { if (l[0] == "Send") dlg.type_->setCurrentItem(0); diff --git a/kdeprint/cups/cupsdconf2/browsedialog.h b/kdeprint/cups/cupsdconf2/browsedialog.h index 97d71e6dd..e75357e1d 100644 --- a/kdeprint/cups/cupsdconf2/browsedialog.h +++ b/kdeprint/cups/cupsdconf2/browsedialog.h @@ -42,8 +42,8 @@ protected slots: void slotTypeChanged(int); private: - QComboBox *type_; - QLineEdit *from_, *to_; + TQComboBox *type_; + TQLineEdit *from_, *to_; }; #endif diff --git a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp index 7c2b6276a..edd55d30e 100644 --- a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp @@ -70,10 +70,10 @@ CupsdBrowsingPage::CupsdBrowsingPage(TQWidget *parent, const char *name) TQLabel *l5 = new TQLabel(i18n("Browse order:"), this); TQLabel *l6 = new TQLabel(i18n("Browse options:"), this); - QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7); + TQGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7); m1->setRowStretch(7, 1); m1->setColStretch(1, 1); - QHBoxLayout *m2 = new TQHBoxLayout(0, 0, 10); + TQHBoxLayout *m2 = new TQHBoxLayout(0, 0, 10); m1->addMultiCellLayout(m2, 0, 0, 0, 1); m2->addWidget(browsing_); m2->addWidget(cups_); @@ -90,7 +90,7 @@ CupsdBrowsingPage::CupsdBrowsingPage(TQWidget *parent, const char *name) m1->addWidget(browsetimeout_, 3, 1); m1->addWidget(browseaddresses_, 4, 1); m1->addWidget(browseorder_, 5, 1); - QGridLayout *m3 = new TQGridLayout(0, 2, 2, 0, 5); + TQGridLayout *m3 = new TQGridLayout(0, 2, 2, 0, 5); m1->addLayout(m3, 6, 1); m3->addWidget(useimplicitclasses_, 0, 0); m3->addWidget(useanyclasses_, 0, 1); @@ -127,8 +127,8 @@ bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, TQString&) { conf_ = conf; browsing_->setChecked(conf_->browsing_); - cups_->setChecked(conf_->browseprotocols_.findIndex("CUPS") != -1); - slp_->setChecked(conf_->browseprotocols_.findIndex("SLP") != -1); + cups_->setChecked(conf_->browseprotocols_.tqfindIndex("CUPS") != -1); + slp_->setChecked(conf_->browseprotocols_.tqfindIndex("SLP") != -1); browseport_->setValue(conf_->browseport_); browseinterval_->setValue(conf_->browseinterval_); browsetimeout_->setValue(conf_->browsetimeout_); @@ -145,7 +145,7 @@ bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, TQString&) bool CupsdBrowsingPage::saveConfig(CupsdConf *conf, TQString&) { conf->browsing_ = browsing_->isChecked(); - QStringList l; + TQStringList l; if (cups_->isChecked()) l << "CUPS"; if (slp_->isChecked()) l << "SLP"; conf->browseprotocols_ = l; @@ -196,7 +196,7 @@ void CupsdBrowsingPage::slotEdit(int index) void CupsdBrowsingPage::slotDefaultList() { browseaddresses_->clear(); - QStringList l; + TQStringList l; l << "Send 255.255.255.255"; browseaddresses_->insertItems(l); } diff --git a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h index 61bf8dd4f..6658e39cd 100644 --- a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h +++ b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.h @@ -47,9 +47,9 @@ protected slots: private: KIntNumInput *browseport_, *browseinterval_, *browsetimeout_; EditList *browseaddresses_; - QComboBox *browseorder_; - QCheckBox *browsing_, *cups_, *slp_; - QCheckBox *useimplicitclasses_, *hideimplicitmembers_, *useshortnames_, *useanyclasses_; + TQComboBox *browseorder_; + TQCheckBox *browsing_, *cups_, *slp_; + TQCheckBox *useimplicitclasses_, *hideimplicitmembers_, *useshortnames_, *useanyclasses_; }; #endif diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp index 62c9a0c6f..4813f504d 100644 --- a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp @@ -114,7 +114,7 @@ bool CupsdComment::loadComments() { comments_.setAutoDelete(true); comments_.clear(); - QFile f(locate("data", "kdeprint/cupsd.conf.template")); + TQFile f(locate("data", "kdeprint/cupsd.conf.template")); if (f.exists() && f.open(IO_ReadOnly)) { Comment *comm; diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp index 535866e4f..72e76edca 100644 --- a/kdeprint/cups/cupsdconf2/cupsdconf.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdconf.cpp @@ -100,7 +100,7 @@ CupsdConf::CupsdConf() maxrequestsize_ = "0"; clienttimeout_ = 300; // listenaddresses_ - QString logdir = findDir(TQStringList("/var/log/cups") + TQString logdir = findDir(TQStringList("/var/log/cups") << "/var/spool/cups/log" << "/var/cups/log"); accesslog_ = logdir+"/access_log"; @@ -139,12 +139,12 @@ CupsdConf::~CupsdConf() bool CupsdConf::loadFromFile(const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (!f.exists() || !f.open(IO_ReadOnly)) return false; else { - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; bool done(false), value(true); while (!done && value) { @@ -175,12 +175,12 @@ bool CupsdConf::loadFromFile(const TQString& filename) bool CupsdConf::saveToFile(const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (!f.open(IO_WriteOnly)) return false; else { - QTextStream t(&f); + TQTextStream t(&f); t << comments_["header"] << endl; t << "# Server" << endl << endl; @@ -448,7 +448,7 @@ bool CupsdConf::saveToFile(const TQString& filename) if (browsing_) t << "BrowseShortNames " << (useshortnames_ ? "Yes" : "No") << endl; t << endl << "# Unknown" << endl; - for (TQValueList< QPair<TQString,TQString> >::ConstIterator it=unknown_.begin(); it!=unknown_.end(); ++it) + for (TQValueList< TQPair<TQString,TQString> >::ConstIterator it=unknown_.begin(); it!=unknown_.end(); ++it) t << (*it).first << " " << (*it).second << endl; return true; @@ -457,7 +457,7 @@ bool CupsdConf::saveToFile(const TQString& filename) bool CupsdConf::parseLocation(CupsLocation *location, TQTextStream& file) { - QString line; + TQString line; bool done(false); bool value(true); while (!done && value) @@ -520,7 +520,7 @@ bool CupsdConf::parseOption(const TQString& line) else if (keyword == "browsing") browsing_ = (value.lower() != "off"); else if (keyword == "classification") { - QString cl = value.lower(); + TQString cl = value.lower(); if (cl == "none") classification_ = CLASS_NONE; else if (cl == "classified") classification_ = CLASS_CLASSIFIED; else if (cl == "confidential") classification_ = CLASS_CONFIDENTIAL; @@ -600,7 +600,7 @@ bool CupsdConf::parseOption(const TQString& line) else { // unrecognized option - unknown_ << QPair<TQString,TQString>(keyword, value); + unknown_ << TQPair<TQString,TQString>(keyword, value); } return true; } @@ -609,7 +609,7 @@ bool CupsdConf::loadAvailableResources() { KConfig conf("kdeprintrc"); conf.setGroup("CUPS"); - QString host = conf.readEntry("Host",cupsServer()); + TQString host = conf.readEntry("Host",cupsServer()); int port = conf.readNumEntry("Port",ippPort()); http_t *http_ = httpConnect(host.local8Bit(),port); @@ -633,7 +633,7 @@ bool CupsdConf::loadAvailableResources() request_ = cupsDoRequest(http_, request_, "/printers/"); if (request_) { - QString name; + TQString name; int type(0); ipp_attribute_t *attr = request_->attrs; while (attr) @@ -662,7 +662,7 @@ bool CupsdConf::loadAvailableResources() request_ = cupsDoRequest(http_, request_, "/classes/"); if (request_) { - QString name; + TQString name; int type(0); ipp_attribute_t *attr = request_->attrs; while (attr) @@ -717,7 +717,7 @@ CupsLocation::CupsLocation(const CupsLocation& loc) bool CupsLocation::parseResource(const TQString& line) { - QString str = line.simplifyWhiteSpace(); + TQString str = line.simplifyWhiteSpace(); int p1 = line.tqfind(' '), p2 = line.tqfind('>'); if (p1 != -1 && p2 != -1) { @@ -826,7 +826,7 @@ int CupsResource::typeFromPath(const TQString& path) TQString CupsResource::textToPath(const TQString& text) { - QString path("/"); + TQString path("/"); if (text == i18n("Administration")) path = "/admin"; else if (text == i18n("All printers")) path = "/printers"; else if (text == i18n("All classes")) path = "/classes"; @@ -847,7 +847,7 @@ TQString CupsResource::textToPath(const TQString& text) TQString CupsResource::pathToText(const TQString& path) { - QString text(i18n("Base", "Root")); + TQString text(i18n("Base", "Root")); if (path == "/admin") text = i18n("Administration"); else if (path == "/printers") text = i18n("All printers"); else if (path == "/classes") text = i18n("All classes"); diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.h b/kdeprint/cups/cupsdconf2/cupsdconf.h index e58e52b31..33a2ecd79 100644 --- a/kdeprint/cups/cupsdconf2/cupsdconf.h +++ b/kdeprint/cups/cupsdconf2/cupsdconf.h @@ -64,8 +64,8 @@ struct CupsdConf static CupsdConf *unique_; // Server - QString servername_; - QString serveradmin_; + TQString servername_; + TQString serveradmin_; int classification_; TQString otherclassname_; bool classoverride_; @@ -138,7 +138,7 @@ struct CupsdConf CupsdComment comments_; // unrecognized options - TQValueList< QPair<TQString,TQString> > unknown_; + TQValueList< TQPair<TQString,TQString> > unknown_; }; struct CupsLocation @@ -150,14 +150,14 @@ struct CupsLocation bool parseResource(const TQString& line); CupsResource *resource_; - QString resourcename_; + TQString resourcename_; int authtype_; int authclass_; - QString authname_; + TQString authname_; int encryption_; int satisfy_; int order_; - QStringList addresses_; + TQStringList addresses_; }; struct CupsResource @@ -168,8 +168,8 @@ struct CupsResource void setPath(const TQString& path); int type_; - QString path_; - QString text_; + TQString path_; + TQString text_; static TQString textToPath(const TQString& text); static TQString pathToText(const TQString& path); diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp index 50f8a3858..8dfa9c41a 100644 --- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -50,7 +50,7 @@ #include <cups/cups.h> static bool dynamically_loaded = false; -static QString pass_string; +static TQString pass_string; extern "C" { @@ -70,15 +70,15 @@ extern "C" int getServerPid() { - QDir dir("/proc",TQString::null,TQDir::Name,TQDir::Dirs); + TQDir dir("/proc",TQString::null,TQDir::Name,TQDir::Dirs); for (uint i=0;i<dir.count();i++) { if (dir[i] == "." || dir[i] == ".." || dir[i] == "self") continue; - QFile f("/proc/" + dir[i] + "/cmdline"); + TQFile f("/proc/" + dir[i] + "/cmdline"); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; t >> line; f.close(); if (line.right(5) == "cupsd" || @@ -92,8 +92,8 @@ int getServerPid() const char* getPassword(const char*) { - QString user(cupsUser()); - QString pass; + TQString user(cupsUser()); + TQString pass; if (KIO::PasswordDialog::getNameAndPassword(user, pass, NULL) == TQDialog::Accepted) { @@ -142,7 +142,7 @@ void CupsdDialog::addConfPage(CupsdPage *page) KIcon::SizeMedium ); - QVBox *box = addVBoxPage(page->pageLabel(), page->header(), icon); + TQVBox *box = addVBoxPage(page->pageLabel(), page->header(), icon); page->reparent(box, TQPoint(0,0)); pagelist_.append(page); } @@ -177,15 +177,15 @@ bool CupsdDialog::setConfigFile(const TQString& filename) if (conf_->unknown_.count() > 0) { // there were some unknown options, warn the user - QString msg; - for (TQValueList< QPair<TQString,TQString> >::ConstIterator it=conf_->unknown_.begin(); it!=conf_->unknown_.end(); ++it) + TQString msg; + for (TQValueList< TQPair<TQString,TQString> >::ConstIterator it=conf_->unknown_.begin(); it!=conf_->unknown_.end(); ++it) msg += ((*it).first + " = " + (*it).second + "<br>"); msg.prepend("<p>" + i18n("Some options were not recognized by this configuration tool. " "They will be left untouched and you won't be able to change them.") + "</p>"); KMessageBox::sorry(this, msg, i18n("Unrecognized Options")); } bool ok(true); - QString msg; + TQString msg; for (pagelist_.first();pagelist_.current() && ok;pagelist_.next()) ok = pagelist_.current()->loadConfig(conf_, msg); if (!ok) @@ -227,7 +227,7 @@ bool CupsdDialog::configure(const TQString& filename, TQWidget *parent, TQString cupsSetPasswordCB(getPassword); // load config file from server - QString fn(filename); + TQString fn(filename); if (fn.isEmpty()) { fn = cupsGetConf(); @@ -240,7 +240,7 @@ bool CupsdDialog::configure(const TQString& filename, TQWidget *parent, TQString // check read state (only if needed) if (!fn.isEmpty()) { - QFileInfo fi(fn); + TQFileInfo fi(fn); if (!fi.exists() || !fi.isReadable() || !fi.isWritable()) errormsg = i18n("Internal error: file '%1' not readable/writable!").arg(fn); // check file size @@ -260,7 +260,7 @@ bool CupsdDialog::configure(const TQString& filename, TQWidget *parent, TQString CupsdDialog dlg(parent); if (dlg.setConfigFile(fn) && dlg.exec()) { - QCString encodedFn = TQFile::encodeName(fn); + TQCString encodedFn = TQFile::encodeName(fn); if (!needUpload) KMessageBox::information(parent, i18n("The config file has not been uploaded to the " @@ -289,7 +289,7 @@ void CupsdDialog::slotOk() if (conf_ && !filename_.isEmpty()) { // try to save the file bool ok(true); - QString msg; + TQString msg; CupsdConf newconf_; for (pagelist_.first();pagelist_.current() && ok;pagelist_.next()) ok = pagelist_.current()->saveConfig(&newconf_, msg); @@ -328,18 +328,18 @@ int CupsdDialog::serverOwner() int pid = getServerPid(); if (pid > 0) { - QString str; + TQString str; str.sprintf("/proc/%d/status",pid); - QFile f(str); + TQFile f(str); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); + TQTextStream t(&f); while (!t.eof()) { str = t.readLine(); if (str.tqfind("Uid:",0,false) == 0) { - QStringList list = TQStringList::split('\t', str, false); + TQStringList list = TQStringList::split('\t', str, false); if (list.count() >= 2) { bool ok; diff --git a/kdeprint/cups/cupsdconf2/cupsddirpage.cpp b/kdeprint/cups/cupsdconf2/cupsddirpage.cpp index 75b979d3d..05d8314e5 100644 --- a/kdeprint/cups/cupsdconf2/cupsddirpage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsddirpage.cpp @@ -51,7 +51,7 @@ CupsdDirPage::CupsdDirPage(TQWidget *parent, const char *name) TQLabel *l6 = new TQLabel(i18n("Server files:"), this); TQLabel *l7 = new TQLabel(i18n("Temporary files:"), this); - QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7); + TQGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7); m1->setRowStretch(7, 1); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); diff --git a/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp b/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp index b8458c10c..a47fae05b 100644 --- a/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdfilterpage.cpp @@ -51,7 +51,7 @@ CupsdFilterPage::CupsdFilterPage(TQWidget *parent, const char *name) TQLabel *l3 = new TQLabel(i18n("RIP cache:"), this); TQLabel *l4 = new TQLabel(i18n("Filter limit:"), this); - QGridLayout *m1 = new TQGridLayout(this, 5, 2, 10, 7); + TQGridLayout *m1 = new TQGridLayout(this, 5, 2, 10, 7); m1->setRowStretch(4, 1); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); diff --git a/kdeprint/cups/cupsdconf2/cupsdfilterpage.h b/kdeprint/cups/cupsdconf2/cupsdfilterpage.h index 9e524897e..1e32e92bd 100644 --- a/kdeprint/cups/cupsdconf2/cupsdfilterpage.h +++ b/kdeprint/cups/cupsdconf2/cupsdfilterpage.h @@ -37,7 +37,7 @@ public: void setInfos(CupsdConf*); private: - QLineEdit *user_, *group_; + TQLineEdit *user_, *group_; KIntNumInput *filterlimit_; SizeWidget *ripcache_; }; diff --git a/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp b/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp index 52d9eaf15..8cb20679f 100644 --- a/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdjobspage.cpp @@ -56,7 +56,7 @@ CupsdJobsPage::CupsdJobsPage(TQWidget *parent, const char *name) TQLabel *l2 = new TQLabel(i18n("Max jobs per printer:"), this); TQLabel *l3 = new TQLabel(i18n("Max jobs per user:"), this); - QGridLayout *m1 = new TQGridLayout(this, 7, 2, 10, 7); + TQGridLayout *m1 = new TQGridLayout(this, 7, 2, 10, 7); m1->setRowStretch(6, 1); m1->setColStretch(1, 1); m1->addWidget(keepjobhistory_, 0, 1); diff --git a/kdeprint/cups/cupsdconf2/cupsdjobspage.h b/kdeprint/cups/cupsdconf2/cupsdjobspage.h index 0e5c38573..0b6f5dbf3 100644 --- a/kdeprint/cups/cupsdconf2/cupsdjobspage.h +++ b/kdeprint/cups/cupsdconf2/cupsdjobspage.h @@ -41,7 +41,7 @@ protected slots: private: KIntNumInput *maxjobs_, *maxjobsperprinter_, *maxjobsperuser_; - QCheckBox *keepjobhistory_, *keepjobfiles_, *autopurgejobs_; + TQCheckBox *keepjobhistory_, *keepjobfiles_, *autopurgejobs_; }; #endif diff --git a/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp b/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp index 032af5526..f7de36783 100644 --- a/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdlogpage.cpp @@ -63,7 +63,7 @@ CupsdLogPage::CupsdLogPage(TQWidget *parent, const char *name) loglevel_->setCurrentItem(2); - QGridLayout *m1 = new TQGridLayout(this, 6, 2, 10, 7); + TQGridLayout *m1 = new TQGridLayout(this, 6, 2, 10, 7); m1->setRowStretch(5, 1); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); diff --git a/kdeprint/cups/cupsdconf2/cupsdlogpage.h b/kdeprint/cups/cupsdconf2/cupsdlogpage.h index 068b4aa3d..bad889632 100644 --- a/kdeprint/cups/cupsdconf2/cupsdlogpage.h +++ b/kdeprint/cups/cupsdconf2/cupsdlogpage.h @@ -37,7 +37,7 @@ public: private: QDirLineEdit *accesslog_, *errorlog_, *pagelog_; - QComboBox *loglevel_; + TQComboBox *loglevel_; SizeWidget *maxlogsize_; }; diff --git a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp index 3cc360150..c56d5e145 100644 --- a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.cpp @@ -71,7 +71,7 @@ CupsdNetworkPage::CupsdNetworkPage(TQWidget *parent, const char *name) TQLabel *l5 = new TQLabel(i18n("Client timeout:"), this); TQLabel *l6 = new TQLabel(i18n("Listen to:"), this); - QGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7); + TQGridLayout *m1 = new TQGridLayout(this, 8, 2, 10, 7); m1->setRowStretch(7, 1); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); @@ -135,7 +135,7 @@ void CupsdNetworkPage::setInfos(CupsdConf *conf) void CupsdNetworkPage::slotAdd() { - QString s = PortDialog::newListen(this, conf_); + TQString s = PortDialog::newListen(this, conf_); if (!s.isEmpty()) listen_->insertItem(s); } @@ -151,7 +151,7 @@ void CupsdNetworkPage::slotEdit(int index) void CupsdNetworkPage::slotDefaultList() { listen_->clear(); - QStringList l; + TQStringList l; l << "Listen *:631"; listen_->insertItems(l); } diff --git a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h index f93248018..62ed56626 100644 --- a/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h +++ b/kdeprint/cups/cupsdconf2/cupsdnetworkpage.h @@ -46,8 +46,8 @@ protected slots: private: KIntNumInput *keepalivetimeout_, *maxclients_, *clienttimeout_; - QComboBox *hostnamelookup_; - QCheckBox *keepalive_; + TQComboBox *hostnamelookup_; + TQCheckBox *keepalive_; EditList *listen_; SizeWidget *maxrequestsize_; }; diff --git a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp index 0bf290fb9..39da4d383 100644 --- a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.cpp @@ -52,7 +52,7 @@ CupsdSecurityPage::CupsdSecurityPage(TQWidget *parent, const char *name) TQLabel *l4 = new TQLabel(i18n("Encryption key:"), this); TQLabel *l5 = new TQLabel(i18n("Locations:"), this); - QGridLayout *m1 = new TQGridLayout(this, 6, 2, 10, 7); + TQGridLayout *m1 = new TQGridLayout(this, 6, 2, 10, 7); m1->setRowStretch(5, 1); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); diff --git a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h index de3ff9b8a..5f20b2dcf 100644 --- a/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h +++ b/kdeprint/cups/cupsdconf2/cupsdsecuritypage.h @@ -46,7 +46,7 @@ protected slots: void slotDeleted(int); private: - QLineEdit *remoteroot_, *systemgroup_; + TQLineEdit *remoteroot_, *systemgroup_; QDirLineEdit *encryptcert_, *encryptkey_; EditList *locations_; diff --git a/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp b/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp index cc0804f5b..bd99546ae 100644 --- a/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdserverpage.cpp @@ -94,7 +94,7 @@ CupsdServerPage::CupsdServerPage(TQWidget *parent, const char *name) printcapformat_->setCurrentItem(0); classChanged(0); - QGridLayout *m1 = new TQGridLayout(this, 9, 2, 10, 7); + TQGridLayout *m1 = new TQGridLayout(this, 9, 2, 10, 7); m1->setRowStretch(8, 1); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); @@ -110,13 +110,13 @@ CupsdServerPage::CupsdServerPage(TQWidget *parent, const char *name) m1->addWidget(language_, 5, 1); m1->addWidget(printcap_, 6, 1); m1->addWidget(printcapformat_, 7, 1); - QHBoxLayout *m2 = new TQHBoxLayout(0, 0, 5); + TQHBoxLayout *m2 = new TQHBoxLayout(0, 0, 5); m1->addLayout(m2, 2, 1); m2->addWidget(classification_); m2->addWidget(otherclassname_); - QWidget *w = new TQWidget(this); + TQWidget *w = new TQWidget(this); w->setFixedWidth(20); - QHBoxLayout *m3 = new TQHBoxLayout(0, 0, 0); + TQHBoxLayout *m3 = new TQHBoxLayout(0, 0, 0); m1->addLayout(m3, 3, 1); m3->addWidget(w); m3->addWidget(classoverride_); diff --git a/kdeprint/cups/cupsdconf2/cupsdserverpage.h b/kdeprint/cups/cupsdconf2/cupsdserverpage.h index 212e6c5e5..50164f110 100644 --- a/kdeprint/cups/cupsdconf2/cupsdserverpage.h +++ b/kdeprint/cups/cupsdconf2/cupsdserverpage.h @@ -41,9 +41,9 @@ protected slots: void classChanged(int); private: - QLineEdit *servername_, *serveradmin_, *language_, *printcap_, *otherclassname_; - QComboBox *classification_, *charset_, *printcapformat_; - QCheckBox *classoverride_; + TQLineEdit *servername_, *serveradmin_, *language_, *printcap_, *otherclassname_; + TQComboBox *classification_, *charset_, *printcapformat_; + TQCheckBox *classoverride_; }; #endif diff --git a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp index 754e7cbd5..a0a34db84 100644 --- a/kdeprint/cups/cupsdconf2/cupsdsplash.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdsplash.cpp @@ -32,20 +32,20 @@ CupsdSplash::CupsdSplash(TQWidget *parent, const char *name) setPageLabel(i18n("Welcome")); setPixmap("go"); - QVBoxLayout *main_ = new TQVBoxLayout(this, 10, 10); - QHBoxLayout *sub_ = new TQHBoxLayout(0, 0, 10); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 10, 10); + TQHBoxLayout *sub_ = new TQHBoxLayout(0, 0, 10); main_->addLayout(sub_); - QLabel *cupslogo_ = new TQLabel(this); - QString logopath = locate("data", TQString("kdeprint/cups_logo.png")); + TQLabel *cupslogo_ = new TQLabel(this); + TQString logopath = locate("data", TQString("kdeprint/cups_logo.png")); cupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath)); cupslogo_->tqsetAlignment(Qt::AlignCenter); - QLabel *kupslogo_ = new TQLabel(this); + TQLabel *kupslogo_ = new TQLabel(this); logopath = locate("data", TQString("kdeprint/kde_logo.png")); kupslogo_->setPixmap(logopath.isEmpty() ? TQPixmap() : TQPixmap(logopath)); kupslogo_->tqsetAlignment(Qt::AlignCenter); - QLabel *helptxt_ = new TQLabel(this); + TQLabel *helptxt_ = new TQLabel(this); helptxt_->setText(i18n( "<p>This tool will help you to configure graphically the server of the CUPS printing system. " "The available options are grouped into sets of related topics and can be accessed " "quickly through the icon view located on the left. Each option has a default value that is " diff --git a/kdeprint/cups/cupsdconf2/editlist.cpp b/kdeprint/cups/cupsdconf2/editlist.cpp index a91fdc3d3..d0420be32 100644 --- a/kdeprint/cups/cupsdconf2/editlist.cpp +++ b/kdeprint/cups/cupsdconf2/editlist.cpp @@ -81,7 +81,7 @@ void EditList::setText(int index, const TQString& s) { if (list_->text(index) != s) { - QListBoxItem *it = list_->findItem(s, Qt::ExactMatch); + TQListBoxItem *it = list_->tqfindItem(s, TQt::ExactMatch); if (!it) list_->changeItem(s, index); else @@ -97,13 +97,13 @@ void EditList::clear() void EditList::insertItem(const TQString& s) { - if (!list_->findItem(s, Qt::ExactMatch)) + if (!list_->tqfindItem(s, TQt::ExactMatch)) list_->insertItem(s); } void EditList::insertItem(const TQPixmap& icon, const TQString& s) { - if (!list_->findItem(s, Qt::ExactMatch)) + if (!list_->tqfindItem(s, TQt::ExactMatch)) list_->insertItem(icon, s); } diff --git a/kdeprint/cups/cupsdconf2/editlist.h b/kdeprint/cups/cupsdconf2/editlist.h index 9f4800c15..177cddceb 100644 --- a/kdeprint/cups/cupsdconf2/editlist.h +++ b/kdeprint/cups/cupsdconf2/editlist.h @@ -54,7 +54,7 @@ protected slots: private: KListBox *list_; - QPushButton *addbtn_, *editbtn_, *delbtn_, *defbtn_; + TQPushButton *addbtn_, *editbtn_, *delbtn_, *defbtn_; }; #endif diff --git a/kdeprint/cups/cupsdconf2/locationdialog.cpp b/kdeprint/cups/cupsdconf2/locationdialog.cpp index d360d62e2..155d11388 100644 --- a/kdeprint/cups/cupsdconf2/locationdialog.cpp +++ b/kdeprint/cups/cupsdconf2/locationdialog.cpp @@ -35,7 +35,7 @@ LocationDialog::LocationDialog(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); resource_ = new TQComboBox(dummy); authtype_ = new TQComboBox(dummy); @@ -69,16 +69,16 @@ LocationDialog::LocationDialog(TQWidget *parent, const char *name) connect(authclass_, TQT_SIGNAL(activated(int)), TQT_SLOT(slotClassChanged(int))); connect(authtype_, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int))); - QLabel *l1 = new TQLabel(i18n("Resource:"), dummy); - QLabel *l2 = new TQLabel(i18n("Authentication:"), dummy); - QLabel *l3 = new TQLabel(i18n("Class:"), dummy); - QLabel *l4 = new TQLabel(i18n("Names:"), dummy); - QLabel *l5 = new TQLabel(i18n("Encryption:"), dummy); - QLabel *l6 = new TQLabel(i18n("Satisfy:"), dummy); - QLabel *l7 = new TQLabel(i18n("ACL order:"), dummy); - QLabel *l8 = new TQLabel(i18n("ACL addresses:"),dummy); + TQLabel *l1 = new TQLabel(i18n("Resource:"), dummy); + TQLabel *l2 = new TQLabel(i18n("Authentication:"), dummy); + TQLabel *l3 = new TQLabel(i18n("Class:"), dummy); + TQLabel *l4 = new TQLabel(i18n("Names:"), dummy); + TQLabel *l5 = new TQLabel(i18n("Encryption:"), dummy); + TQLabel *l6 = new TQLabel(i18n("Satisfy:"), dummy); + TQLabel *l7 = new TQLabel(i18n("ACL order:"), dummy); + TQLabel *l8 = new TQLabel(i18n("ACL addresses:"),dummy); - QGridLayout *m1 = new TQGridLayout(dummy, 8, 2, 0, 5); + TQGridLayout *m1 = new TQGridLayout(dummy, 8, 2, 0, 5); m1->setColStretch(1, 1); m1->addWidget(l1, 0, 0, Qt::AlignRight); m1->addWidget(l2, 1, 0, Qt::AlignRight); @@ -141,7 +141,7 @@ void LocationDialog::fillLocation(CupsLocation *loc) void LocationDialog::setLocation(CupsLocation *loc) { - int index = conf_->resources_.findRef(loc->resource_); + int index = conf_->resources_.tqfindRef(loc->resource_); resource_->setCurrentItem(index); authtype_->setCurrentItem(loc->authtype_); authclass_->setCurrentItem(loc->authclass_); diff --git a/kdeprint/cups/cupsdconf2/locationdialog.h b/kdeprint/cups/cupsdconf2/locationdialog.h index 03536adc8..26a4c43f8 100644 --- a/kdeprint/cups/cupsdconf2/locationdialog.h +++ b/kdeprint/cups/cupsdconf2/locationdialog.h @@ -49,8 +49,8 @@ protected slots: void slotDefaultList(); private: - QComboBox *resource_, *authtype_, *authclass_, *encryption_, *satisfy_, *order_; - QLineEdit *authname_; + TQComboBox *resource_, *authtype_, *authclass_, *encryption_, *satisfy_, *order_; + TQLineEdit *authname_; EditList *addresses_; CupsdConf *conf_; }; diff --git a/kdeprint/cups/cupsdconf2/portdialog.cpp b/kdeprint/cups/cupsdconf2/portdialog.cpp index 184005c13..d3dd2f0a5 100644 --- a/kdeprint/cups/cupsdconf2/portdialog.cpp +++ b/kdeprint/cups/cupsdconf2/portdialog.cpp @@ -33,19 +33,19 @@ PortDialog::PortDialog(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); address_ = new TQLineEdit(dummy); port_ = new TQSpinBox(0, 9999, 1, dummy); port_->setValue(631); usessl_ = new TQCheckBox(i18n("Use SSL encryption"), dummy); - QLabel *l1 = new TQLabel(i18n("Address:"), dummy); - QLabel *l2 = new TQLabel(i18n("Port:"), dummy); + TQLabel *l1 = new TQLabel(i18n("Address:"), dummy); + TQLabel *l2 = new TQLabel(i18n("Port:"), dummy); - QVBoxLayout *m1 = new TQVBoxLayout(dummy, 0, 10); - QGridLayout *m2 = new TQGridLayout(0, 3, 2, 0, 5); - m1->addLayout(m2); + TQVBoxLayout *m1 = new TQVBoxLayout(dummy, 0, 10); + TQGridLayout *m2 = new TQGridLayout(0, 3, 2, 0, 5); + m1->addLayout(TQT_TQLAYOUT(m2)); m2->addWidget(l1, 0, 0, Qt::AlignRight); m2->addWidget(l2, 1, 0, Qt::AlignRight); m2->addMultiCellWidget(usessl_, 2, 2, 0, 1); @@ -97,7 +97,7 @@ TQString PortDialog::editListen(const TQString& s, TQWidget *parent, CupsdConf * if (p != -1) { dlg.usessl_->setChecked(s.left(p).startsWith("SSL")); - QString addr = s.mid(p+1).stripWhiteSpace(); + TQString addr = s.mid(p+1).stripWhiteSpace(); int p1 = addr.tqfind(':'); if (p1 == -1) { diff --git a/kdeprint/cups/cupsdconf2/portdialog.h b/kdeprint/cups/cupsdconf2/portdialog.h index f57b4cd3d..44b91d134 100644 --- a/kdeprint/cups/cupsdconf2/portdialog.h +++ b/kdeprint/cups/cupsdconf2/portdialog.h @@ -38,9 +38,9 @@ public: static TQString editListen(const TQString& s, TQWidget *parent = 0, CupsdConf *conf = 0); private: - QLineEdit *address_; - QSpinBox *port_; - QCheckBox *usessl_; + TQLineEdit *address_; + TQSpinBox *port_; + TQCheckBox *usessl_; }; #endif diff --git a/kdeprint/cups/cupsdconf2/qdirlineedit.cpp b/kdeprint/cups/cupsdconf2/qdirlineedit.cpp index 66df30652..46e70a41f 100644 --- a/kdeprint/cups/cupsdconf2/qdirlineedit.cpp +++ b/kdeprint/cups/cupsdconf2/qdirlineedit.cpp @@ -33,7 +33,7 @@ QDirLineEdit::QDirLineEdit(bool file, TQWidget *parent, const char *name) button_->setPixmap(SmallIcon("fileopen")); connect(button_,TQT_SIGNAL(clicked()),TQT_SLOT(buttonClicked())); - QHBoxLayout *main_ = new TQHBoxLayout(this, 0, 3); + TQHBoxLayout *main_ = new TQHBoxLayout(this, 0, 3); main_->addWidget(edit_); main_->addWidget(button_); @@ -56,7 +56,7 @@ TQString QDirLineEdit::url() void QDirLineEdit::buttonClicked() { - QString dirname; + TQString dirname; if (!fileedit_) dirname = KFileDialog::getExistingDirectory(edit_->text(), this); else diff --git a/kdeprint/cups/cupsdconf2/qdirlineedit.h b/kdeprint/cups/cupsdconf2/qdirlineedit.h index 9d4a03b34..85e9603f8 100644 --- a/kdeprint/cups/cupsdconf2/qdirlineedit.h +++ b/kdeprint/cups/cupsdconf2/qdirlineedit.h @@ -41,8 +41,8 @@ private slots: void buttonClicked(); private: - QLineEdit *edit_; - QPushButton *button_; + TQLineEdit *edit_; + TQPushButton *button_; bool fileedit_; }; diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp index 7b96d4ef9..b473d2a61 100644 --- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp +++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.cpp @@ -44,10 +44,10 @@ QDirMultiLineEdit::QDirMultiLineEdit(TQWidget *parent, const char *name) connect(m_remove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveClicked())); m_remove->setEnabled(false); - m_view->setFixedHeight(QMAX(m_view->fontMetrics().lineSpacing()*3+m_view->lineWidth()*2, m_add->tqsizeHint().height()*2)); + m_view->setFixedHeight(TQMAX(m_view->fontMetrics().lineSpacing()*3+m_view->lineWidth()*2, m_add->tqsizeHint().height()*2)); - QHBoxLayout *l0 = new TQHBoxLayout(this, 0, 3); - QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 0); + TQHBoxLayout *l0 = new TQHBoxLayout(this, 0, 3); + TQVBoxLayout *l1 = new TQVBoxLayout(0, 0, 0); l0->addWidget(m_view); l0->addLayout(l1); l1->addWidget(m_add); @@ -68,8 +68,8 @@ void QDirMultiLineEdit::setURLs(const TQStringList& urls) TQStringList QDirMultiLineEdit::urls() { - QListViewItem *item = m_view->firstChild(); - QStringList l; + TQListViewItem *item = m_view->firstChild(); + TQStringList l; while (item) { l << item->text(0); @@ -80,20 +80,20 @@ TQStringList QDirMultiLineEdit::urls() void QDirMultiLineEdit::addURL(const TQString& url) { - QListViewItem *item = new TQListViewItem(m_view, url); + TQListViewItem *item = new TQListViewItem(m_view, url); item->setRenameEnabled(0, true); } void QDirMultiLineEdit::slotAddClicked() { - QString dirname = KFileDialog::getExistingDirectory(TQString::null, this); + TQString dirname = KFileDialog::getExistingDirectory(TQString::null, this); if (!dirname.isEmpty()) addURL(dirname); } void QDirMultiLineEdit::slotRemoveClicked() { - QListViewItem *item = m_view->currentItem(); + TQListViewItem *item = m_view->currentItem(); if (item) { delete item; diff --git a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h index 66586d37f..f39293665 100644 --- a/kdeprint/cups/cupsdconf2/qdirmultilineedit.h +++ b/kdeprint/cups/cupsdconf2/qdirmultilineedit.h @@ -47,7 +47,7 @@ private slots: private: KListView *m_view; - QPushButton *m_add, *m_remove; + TQPushButton *m_add, *m_remove; }; #endif diff --git a/kdeprint/cups/cupsinfos.cpp b/kdeprint/cups/cupsinfos.cpp index 78bbeb458..5c967d7b8 100644 --- a/kdeprint/cups/cupsinfos.cpp +++ b/kdeprint/cups/cupsinfos.cpp @@ -58,9 +58,9 @@ CupsInfos::CupsInfos() load(); /* host_ = cupsServer(); login_ = cupsUser(); - if (login_.isEmpty()) login_ = TQString::null; + if (login_.isEmpty()) login_ = TQString(); port_ = ippPort(); - password_ = TQString::null;*/ + password_ = TQString();*/ cupsSetPasswordCB(cupsGetPasswordCB); } @@ -106,7 +106,7 @@ void CupsInfos::setSavePassword( bool on ) const char* CupsInfos::getPasswordCB() { - QPair<TQString,TQString> pwd = KMFactory::self()->requestPassword( count_, login_, host_, port_ ); + TQPair<TQString,TQString> pwd = KMFactory::self()->requestPassword( count_, login_, host_, port_ ); if ( pwd.first.isEmpty() && pwd.second.isEmpty() ) return NULL; @@ -129,8 +129,8 @@ void CupsInfos::load() KMFactory::self()->initPassword( login_, password_, host_, port_ ); } else - password_ = TQString::null; - if (login_.isEmpty()) login_ = TQString::null; + password_ = TQString(); + if (login_.isEmpty()) login_ = TQString(); reallogin_ = cupsUser(); // synchronize with CUPS diff --git a/kdeprint/cups/cupsinfos.h b/kdeprint/cups/cupsinfos.h index b62329d4b..416e441cb 100644 --- a/kdeprint/cups/cupsinfos.h +++ b/kdeprint/cups/cupsinfos.h @@ -57,11 +57,11 @@ protected: private: static CupsInfos *unique_; - QString host_; + TQString host_; int port_; - QString login_; - QString password_; - QString reallogin_; + TQString login_; + TQString password_; + TQString reallogin_; bool savepwd_; int count_; diff --git a/kdeprint/cups/imageposition.cpp b/kdeprint/cups/imageposition.cpp index 9e0ab4941..5f08fcd61 100644 --- a/kdeprint/cups/imageposition.cpp +++ b/kdeprint/cups/imageposition.cpp @@ -114,7 +114,7 @@ void ImagePosition::paintEvent(TQPaintEvent*) ph = (pw * 4) / 3; py = (height() - ph) / 2; } - QRect page(px, py, pw, ph), img(0, 0, pix_.width(), pix_.height()); + TQRect page(px, py, pw, ph), img(0, 0, pix_.width(), pix_.height()); // compute img position horiz = position_%3; @@ -134,7 +134,7 @@ void ImagePosition::paintEvent(TQPaintEvent*) img.moveTopLeft(TQPoint(x,y)); // draw page - QPainter p(this); + TQPainter p(this); draw3DPage(&p,page); // draw img diff --git a/kdeprint/cups/imagepreview.cpp b/kdeprint/cups/imagepreview.cpp index 9272399e4..878c2fa43 100644 --- a/kdeprint/cups/imagepreview.cpp +++ b/kdeprint/cups/imagepreview.cpp @@ -64,7 +64,7 @@ void ImagePreview::paintEvent(TQPaintEvent*){ p.drawImage(x,y,tmpImage); p.end(); - bitBlt(this, TQPoint(0, 0), &buffer, buffer.rect(), Qt::CopyROP); + bitBlt(this, TQPoint(0, 0), &buffer, buffer.rect(), TQt::CopyROP); } void ImagePreview::setBlackAndWhite(bool on){ diff --git a/kdeprint/cups/ippreportdlg.cpp b/kdeprint/cups/ippreportdlg.cpp index 20882d8c4..b7ef270bd 100644 --- a/kdeprint/cups/ippreportdlg.cpp +++ b/kdeprint/cups/ippreportdlg.cpp @@ -48,20 +48,20 @@ void IppReportDlg::slotUser1() printer.setDocName(caption()); if (printer.setup(this)) { - QPainter painter(&printer); - QPaintDeviceMetrics metrics(&printer); + TQPainter painter(&printer); + TQPaintDeviceMetrics metrics(&printer); - // report is printed using QSimpleRichText - QSimpleRichText rich(m_edit->text(), font()); + // report is printed using TQSimpleRichText + TQSimpleRichText rich(m_edit->text(), font()); rich.setWidth(&painter, metrics.width()); int margin = (int)(1.5 / 2.54 * metrics.logicalDpiY()); // 1.5 cm - QRect r(margin, margin, metrics.width()-2*margin, metrics.height()-2*margin); + TQRect r(margin, margin, metrics.width()-2*margin, metrics.height()-2*margin); int hh = rich.height(), page(1); while (1) { rich.draw(&painter, margin, margin, r, tqcolorGroup()); - QString s = caption() + ": " + TQString::number(page); - QRect br = painter.fontMetrics().boundingRect(s); + TQString s = caption() + ": " + TQString::number(page); + TQRect br = painter.fontMetrics().boundingRect(s); painter.drawText(r.right()-br.width()-5, r.top()-br.height()-4, br.width()+5, br.height()+4, Qt::AlignRight|Qt::AlignTop, s); r.moveBy(0, r.height()-10); painter.translate(0, -(r.height()-10)); @@ -78,8 +78,8 @@ void IppReportDlg::slotUser1() void IppReportDlg::report(IppRequest *req, int group, const TQString& caption) { - QString str_report; - QTextStream t(&str_report, IO_WriteOnly); + TQString str_report; + TQTextStream t(&str_report, IO_WriteOnly); if (req->htmlReport(group, t)) { diff --git a/kdeprint/cups/ipprequest.cpp b/kdeprint/cups/ipprequest.cpp index 0f6c8cbc6..354d46cf6 100644 --- a/kdeprint/cups/ipprequest.cpp +++ b/kdeprint/cups/ipprequest.cpp @@ -103,7 +103,7 @@ void dumpRequest(ipp_t *req, bool answer = false, const TQString& s = TQString:: TQString errorString(int status) { - QString str; + TQString str; switch (status) { case IPP_FORBIDDEN: @@ -134,7 +134,7 @@ IppRequest::IppRequest() { request_ = 0; port_ = -1; - host_ = TQString::null; + host_ = TQString(); dump_ = 0; init(); } @@ -226,7 +226,7 @@ int IppRequest::status() TQString IppRequest::statusMessage() { - QString msg; + TQString msg; switch (status()) { case -2: @@ -294,7 +294,7 @@ bool IppRequest::boolean(const TQString& name, bool& value) bool IppRequest::doFileRequest(const TQString& res, const TQString& filename) { - QString myHost = host_; + TQString myHost = host_; int myPort = port_; if (myHost.isEmpty()) myHost = CupsInfos::self()->host(); if (myPort <= 0) myPort = CupsInfos::self()->port(); @@ -361,8 +361,8 @@ bool IppRequest::htmlReport(int group, TQTextStream& output) attr = attr->next; // print each attribute ipp_uchar_t *d; - QCString dateStr; - QDateTime dt; + TQCString dateStr; + TQDateTime dt; bool bg(false); while (attr && attr->group_tag == group) { @@ -443,7 +443,7 @@ TQMap<TQString,TQString> IppRequest::toMap(int group) attr = attr->next; continue; } - QString value; + TQString value; for (int i=0; i<attr->num_values; i++) { switch (attr->value_tag) @@ -496,14 +496,14 @@ void IppRequest::setMap(const TQMap<TQString,TQString>& opts) if (!request_) return; - QRegExp re("^\"|\"$"); + TQRegExp re("^\"|\"$"); cups_option_t *options = NULL; int n = 0; for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it) { if (it.key().startsWith("kde-") || it.key().startsWith("app-")) continue; - QString value = it.data().stripWhiteSpace(), lovalue; + TQString value = it.data().stripWhiteSpace(), lovalue; value.replace(re, ""); lovalue = value.lower(); diff --git a/kdeprint/cups/kcupsprinterimpl.cpp b/kdeprint/cups/kcupsprinterimpl.cpp index 7fa6da140..132ddc136 100644 --- a/kdeprint/cups/kcupsprinterimpl.cpp +++ b/kdeprint/cups/kcupsprinterimpl.cpp @@ -33,7 +33,7 @@ static void mapToCupsOptions(const TQMap<TQString,TQString>& opts, TQString& cmd TQSize rangeToSize(const TQString& s) { - QString range = s; + TQString range = s; int p(-1); int from, to; @@ -67,11 +67,11 @@ bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) // check printer object if (!printer) return false; - QString hoststr = TQString::tqfromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()); + TQString hoststr = TQString::tqfromLatin1("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()); cmd = TQString::tqfromLatin1("cupsdoprint -P %1 -J %3 -H %2").arg(quote(printer->printerName())).arg(quote(hoststr)).arg(quote(printer->docName())); if (!CupsInfos::self()->login().isEmpty()) { - QString userstr(CupsInfos::self()->login()); + TQString userstr(CupsInfos::self()->login()); //if (!CupsInfos::self()->password().isEmpty()) // userstr += (":" + CupsInfos::self()->password()); cmd.append(" -U ").append(quote(userstr)); @@ -83,9 +83,9 @@ bool KCupsPrinterImpl::setupCommand(TQString& cmd, KPrinter *printer) void KCupsPrinterImpl::preparePrinting(KPrinter *printer) { // process orientation - QString o = printer->option("orientation-requested"); + TQString o = printer->option("orientation-requested"); printer->setOption("kde-orientation",(o == "4" || o == "5" ? "Landscape" : "Portrait")); - // if it's a Qt application, then convert orientation as it will be handled by Qt directly + // if it's a TQt application, then convert orientation as it will be handled by TQt directly if (printer->applicationType() == KPrinter::Dialog) printer->setOption("orientation-requested",(o == "5" || o == "6" ? "6" : "3")); @@ -94,7 +94,7 @@ void KCupsPrinterImpl::preparePrinting(KPrinter *printer) // page ranges are handled by CUPS, so application should print all pages if (printer->pageSelection() == KPrinter::SystemSide) - { // Qt => CUPS + { // TQt => CUPS // translations if (!printer->option("kde-range").isEmpty()) printer->setOption("page-ranges",printer->option("kde-range")); @@ -110,7 +110,7 @@ void KCupsPrinterImpl::preparePrinting(KPrinter *printer) TQString range = printer->option("kde-range"); if (!range.isEmpty()) { - QSize s = rangeToSize(range); + TQSize s = rangeToSize(range); printer->setOption("kde-from",TQString::number(s.width())); printer->setOption("kde-to",TQString::number(s.height())); } @@ -127,7 +127,7 @@ void KCupsPrinterImpl::broadcastOption(const TQString& key, const TQString& valu KPrinterImpl::broadcastOption("orientation-requested",(value == "Landscape" ? "4" : "3")); else if (key == "kde-pagesize") { - QString pagename = TQString::tqfromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); + TQString pagename = TQString::tqfromLatin1(pageSizeToPageName((KPrinter::PageSize)value.toInt())); KPrinterImpl::broadcastOption("PageSize",pagename); // simple hack for classes KPrinterImpl::broadcastOption("media",pagename); @@ -138,7 +138,7 @@ void KCupsPrinterImpl::broadcastOption(const TQString& key, const TQString& valu static void mapToCupsOptions(const TQMap<TQString,TQString>& opts, TQString& cmd) { - QString optstr; + TQString optstr; for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it) { // only encode those options that doesn't start with "kde-" or "app-". diff --git a/kdeprint/cups/kmconfigcupsdir.cpp b/kdeprint/cups/kmconfigcupsdir.cpp index 5e6958565..fc1d7d399 100644 --- a/kdeprint/cups/kmconfigcupsdir.cpp +++ b/kdeprint/cups/kmconfigcupsdir.cpp @@ -44,7 +44,7 @@ KMConfigCupsDir::KMConfigCupsDir(TQWidget *parent) TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); lay0->addWidget(m_dirbox); lay0->addStretch(1); - TQVBoxLayout *lay1 = new TQVBoxLayout(m_dirbox->layout(), 10); + TQVBoxLayout *lay1 = new TQVBoxLayout(TQT_TQLAYOUT(m_dirbox->layout()), 10); lay1->addWidget(m_stddir); lay1->addWidget(m_installdir); diff --git a/kdeprint/cups/kmconfigcupsdir.h b/kdeprint/cups/kmconfigcupsdir.h index 14ba4ef5f..a6fe8d9ba 100644 --- a/kdeprint/cups/kmconfigcupsdir.h +++ b/kdeprint/cups/kmconfigcupsdir.h @@ -35,7 +35,7 @@ public: private: KURLRequester *m_installdir; - QCheckBox *m_stddir; + TQCheckBox *m_stddir; }; #endif diff --git a/kdeprint/cups/kmcupsconfigwidget.cpp b/kdeprint/cups/kmcupsconfigwidget.cpp index 684d8b850..cd3c3ab01 100644 --- a/kdeprint/cups/kmcupsconfigwidget.cpp +++ b/kdeprint/cups/kmcupsconfigwidget.cpp @@ -33,7 +33,7 @@ #include <kconfig.h> #include <kstringhandler.h> -class PortValidator : public QIntValidator +class PortValidator : public TQIntValidator { public: PortValidator(TQWidget *parent, const char *name = 0); @@ -41,7 +41,7 @@ public: }; PortValidator::PortValidator(TQWidget *parent, const char *name) -: TQIntValidator(1, 65535, parent, name) +: TQIntValidator(1, 65535, TQT_TQOBJECT(parent), name) { } @@ -62,18 +62,18 @@ KMCupsConfigWidget::KMCupsConfigWidget(TQWidget *parent, const char *name) : TQWidget(parent,name) { // widget creation - QGroupBox *m_hostbox = new TQGroupBox(0, Qt::Vertical, i18n("Server Information"), this); - QGroupBox *m_loginbox = new TQGroupBox(0, Qt::Vertical, i18n("Account Information"), this); - QLabel *m_hostlabel = new TQLabel(i18n("&Host:"), m_hostbox); - QLabel *m_portlabel = new TQLabel(i18n("&Port:"), m_hostbox); + TQGroupBox *m_hostbox = new TQGroupBox(0, Qt::Vertical, i18n("Server Information"), this); + TQGroupBox *m_loginbox = new TQGroupBox(0, Qt::Vertical, i18n("Account Information"), this); + TQLabel *m_hostlabel = new TQLabel(i18n("&Host:"), m_hostbox); + TQLabel *m_portlabel = new TQLabel(i18n("&Port:"), m_hostbox); m_host = new TQLineEdit(m_hostbox); m_port = new TQLineEdit(m_hostbox); m_hostlabel->setBuddy(m_host); m_portlabel->setBuddy(m_port); m_port->setValidator(new PortValidator(m_port)); m_login = new TQLineEdit(m_loginbox); - QLabel *m_loginlabel = new TQLabel(i18n("&User:"), m_loginbox); - QLabel *m_passwordlabel = new TQLabel(i18n("Pass&word:"), m_loginbox); + TQLabel *m_loginlabel = new TQLabel(i18n("&User:"), m_loginbox); + TQLabel *m_passwordlabel = new TQLabel(i18n("Pass&word:"), m_loginbox); m_password = new TQLineEdit(m_loginbox); m_password->setEchoMode(TQLineEdit::Password); m_savepwd = new TQCheckBox( i18n( "&Store password in configuration file" ), m_loginbox ); @@ -84,16 +84,16 @@ KMCupsConfigWidget::KMCupsConfigWidget(TQWidget *parent, const char *name) m_passwordlabel->setBuddy(m_password); // layout creation - QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10); + TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, 10); lay0->addWidget(m_hostbox,1); lay0->addWidget(m_loginbox,1); - QGridLayout *lay2 = new TQGridLayout(m_hostbox->layout(), 2, 2, 10); + TQGridLayout *lay2 = new TQGridLayout(m_hostbox->layout(), 2, 2, 10); lay2->setColStretch(1,1); lay2->addWidget(m_hostlabel,0,0); lay2->addWidget(m_portlabel,1,0); lay2->addWidget(m_host,0,1); lay2->addWidget(m_port,1,1); - QGridLayout *lay3 = new TQGridLayout(m_loginbox->layout(), 4, 2, 10); + TQGridLayout *lay3 = new TQGridLayout(m_loginbox->layout(), 4, 2, 10); lay3->setColStretch(1,1); lay3->addWidget(m_loginlabel,0,0); lay3->addWidget(m_passwordlabel,1,0); diff --git a/kdeprint/cups/kmcupsconfigwidget.h b/kdeprint/cups/kmcupsconfigwidget.h index 6f213af6c..804fc22f0 100644 --- a/kdeprint/cups/kmcupsconfigwidget.h +++ b/kdeprint/cups/kmcupsconfigwidget.h @@ -36,8 +36,8 @@ public: void saveConfig(KConfig*); protected: - QLineEdit *m_host, *m_port, *m_login, *m_password; - QCheckBox *m_anonymous, *m_savepwd; + TQLineEdit *m_host, *m_port, *m_login, *m_password; + TQCheckBox *m_anonymous, *m_savepwd; }; #endif diff --git a/kdeprint/cups/kmcupsjobmanager.cpp b/kdeprint/cups/kmcupsjobmanager.cpp index 35f2ea272..76bf2202f 100644 --- a/kdeprint/cups/kmcupsjobmanager.cpp +++ b/kdeprint/cups/kmcupsjobmanager.cpp @@ -53,7 +53,7 @@ int KMCupsJobManager::actions() bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& argstr) { IppRequest req; - QString uri; + TQString uri; bool value(true); TQPtrListIterator<KMJob> it(jobs); @@ -65,7 +65,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int ac req.addURI(IPP_TAG_OPERATION,"job-uri",it.current()->uri()); req.addName(IPP_TAG_OPERATION,"requesting-user-name",CupsInfos::self()->login()); /* - QString jobHost; + TQString jobHost; if (!it.current()->uri().isEmpty()) { KURL url(it.current()->uri()); @@ -111,7 +111,7 @@ bool KMCupsJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int ac bool KMCupsJobManager::listJobs(const TQString& prname, KMJobManager::JobType type, int limit) { IppRequest req; - QStringList keys; + TQStringList keys; CupsInfos *infos = CupsInfos::self(); // wanted attributes @@ -167,10 +167,10 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr) { ipp_attribute_t *attr = req.first(); KMJob *job = new KMJob(); - QString uri; + TQString uri; while (attr) { - QString name(attr->name); + TQString name(attr->name); if (name == "job-id") job->setId(attr->values[0].integer); else if (name == "job-uri") job->setUri(TQString::fromLocal8Bit(attr->values[0].string.text)); else if (name == "job-name") job->setName(TQString::fromLocal8Bit(attr->values[0].string.text)); @@ -211,8 +211,8 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr) else if (name == "job-media-sheets-completed") job->setProcessedPages(attr->values[0].integer); else if (name == "job-printer-uri" && !pr->isRemote()) { - QString str(attr->values[0].string.text); - int p = str.findRev('/'); + TQString str(attr->values[0].string.text); + int p = str.tqfindRev('/'); if (p != -1) job->setPrinter(str.mid(p+1)); } @@ -326,8 +326,8 @@ bool KMCupsJobManager::changePriority(const TQPtrList<KMJob>& jobs, bool up) for (; it.current() && result; ++it) { int value = it.current()->attribute(0).toInt(); - if (up) value = QMIN(value+10, 100); - else value = QMAX(value-10, 1); + if (up) value = TQMIN(value+10, 100); + else value = TQMAX(value-10, 1); IppRequest req; /* @@ -351,8 +351,8 @@ bool KMCupsJobManager::changePriority(const TQPtrList<KMJob>& jobs, bool up) static TQString processRange(const TQString& range) { - QStringList l = TQStringList::split(',', range, false); - QString s; + TQStringList l = TQStringList::split(',', range, false); + TQString s; for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { s.append(*it); @@ -387,15 +387,15 @@ bool KMCupsJobManager::editJobAttributes(KMJob *j) TQMap<TQString,TQString> opts = req.toMap(IPP_TAG_JOB); // translate the "Copies" option to non-CUPS syntax - if (opts.contains("copies")) + if (opts.tqcontains("copies")) opts["kde-copies"] = opts["copies"]; - if (opts.contains("page-set")) + if (opts.tqcontains("page-set")) opts["kde-pageset"] = (opts["page-set"] == "even" ? "2" : (opts["page-set"] == "odd" ? "1" : "0")); - if (opts.contains("OutputOrder")) + if (opts.tqcontains("OutputOrder")) opts["kde-pageorder"] = opts["OutputOrder"]; - if (opts.contains("multiple-document-handling")) + if (opts.tqcontains("multiple-document-handling")) opts["kde-collate"] = (opts["multiple-document-handling"] == "separate-documents-collated-copies" ? "Collate" : "Uncollate"); - if (opts.contains("page-ranges")) + if (opts.tqcontains("page-ranges")) opts["kde-range"] = opts["page-ranges"]; // find printer and construct dialog diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp index e4fe957e6..42ca37cf9 100644 --- a/kdeprint/cups/kmcupsmanager.cpp +++ b/kdeprint/cups/kmcupsmanager.cpp @@ -100,7 +100,7 @@ TQString KMCupsManager::driverDbCreationProgram() TQString KMCupsManager::driverDirectory() { - QString d = cupsInstallDir(); + TQString d = cupsInstallDir(); if (d.isEmpty()) d = "/usr"; d.append("/share/cups/model"); @@ -113,7 +113,7 @@ TQString KMCupsManager::cupsInstallDir() { KConfig *conf= KMFactory::self()->printConfig(); conf->setGroup("CUPS"); - QString dir = conf->readPathEntry("InstallDir"); + TQString dir = conf->readPathEntry("InstallDir"); return dir; } @@ -126,7 +126,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p) { bool isclass = p->isClass(false), result(false); IppRequest req; - QString uri; + TQString uri; uri = printerURI(p,false); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); @@ -136,8 +136,8 @@ bool KMCupsManager::createPrinter(KMPrinter *p) if (isclass) { req.setOperation(CUPS_ADD_CLASS); - QStringList members = p->members(), uris; - QString s; + TQStringList members = p->members(), uris; + TQString s; s = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); for (TQStringList::ConstIterator it=members.begin(); it!=members.end(); ++it) uris.append(s+(*it)); @@ -160,7 +160,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p) } if (!p->option("kde-banners").isEmpty()) { - QStringList bans = TQStringList::split(',',p->option("kde-banners"),false); + TQStringList bans = TQStringList::split(',',p->option("kde-banners"),false); while (bans.count() < 2) bans.append("none"); req.addName(IPP_TAG_PRINTER,"job-sheets-default",bans); @@ -215,7 +215,7 @@ bool KMCupsManager::setDefaultPrinter(KMPrinter *p) bool KMCupsManager::setPrinterState(KMPrinter *p, int state) { IppRequest req; - QString uri; + TQString uri; req.setOperation(state); uri = printerURI(p, true); @@ -231,7 +231,7 @@ bool KMCupsManager::completePrinter(KMPrinter *p) if (completePrinterShort(p)) { // driver informations - QString ppdname = downloadDriver(p); + TQString ppdname = downloadDriver(p); ppd_file_t *ppd = (ppdname.isEmpty() ? NULL : ppdOpenFile(ppdname.local8Bit())); if (ppd) { @@ -261,8 +261,8 @@ bool KMCupsManager::completePrinter(KMPrinter *p) bool KMCupsManager::completePrinterShort(KMPrinter *p) { IppRequest req; - QStringList keys; - QString uri; + TQStringList keys; + TQString uri; req.setOperation(IPP_GET_PRINTER_ATTRIBUTES); uri = printerURI(p, true); @@ -328,7 +328,7 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) if (req.doRequest("/printers/")) { - QString value; + TQString value; if (req.text("printer-info",value)) p->setDescription(value); // disabled location //if (req.text("printer-location",value)) p->setLocation(value); @@ -341,10 +341,10 @@ bool KMCupsManager::completePrinterShort(KMPrinter *p) */ p->setDevice( value ); } - QStringList values; + TQStringList values; /* if (req.uri("member-uris",values)) { - QStringList members; + TQStringList members; for (TQStringList::ConstIterator it=values.begin(); it!=values.end(); ++it) { int p = (*it).findRev('/'); @@ -390,7 +390,7 @@ bool KMCupsManager::testPrinter(KMPrinter *p) { return KMManager::testPrinter(p); /* - QString testpage = testPage(); + TQString testpage = testPage(); if (testpage.isEmpty()) { setErrorMsg(i18n("Unable to locate test page.")); @@ -398,7 +398,7 @@ bool KMCupsManager::testPrinter(KMPrinter *p) } IppRequest req; - QString uri; + TQString uri; req.setOperation(IPP_PRINT_JOB); uri = printerURI(p); @@ -421,7 +421,7 @@ void KMCupsManager::listPrinters() void KMCupsManager::loadServerPrinters() { IppRequest req; - QStringList keys; + TQStringList keys; // get printers req.setOperation(CUPS_GET_PRINTERS); @@ -456,7 +456,7 @@ void KMCupsManager::loadServerPrinters() req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",TQString::tqfromLatin1("printer-name")); if (req.doRequest("/printers/")) { - QString s = TQString::null; + TQString s = TQString::null; req.name("printer-name",s); setHardDefault(findPrinter(s)); } @@ -479,10 +479,10 @@ void KMCupsManager::processRequest(IppRequest* req) KMPrinter *printer = new KMPrinter(); while (attr) { - QString attrname(attr->name); + TQString attrname(attr->name); if (attrname == "printer-name") { - QString value = TQString::fromLocal8Bit(attr->values[0].string.text); + TQString value = TQString::fromLocal8Bit(attr->values[0].string.text); printer->setName(value); printer->setPrinterName(value); } @@ -550,7 +550,7 @@ DrMain* KMCupsManager::loadPrinterDriver(KMPrinter *p, bool) } } - QString fname = downloadDriver(p); + TQString fname = downloadDriver(p); DrMain *driver(0); if (!fname.isEmpty()) { @@ -574,10 +574,10 @@ DrMain* KMCupsManager::loadFileDriver(const TQString& filename) DrMain* KMCupsManager::loadMaticDriver(const TQString& drname) { - QStringList comps = TQStringList::split('/', drname, false); - QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); - QString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); - QString exe = KStandardDirs::findExe("foomatic-datafile", PATH); + TQStringList comps = TQStringList::split('/', drname, false); + TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); + TQString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { setErrorMsg(i18n("Unable to find the executable foomatic-datafile " @@ -586,7 +586,7 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname) } KPipeProcess in; - QFile out(tmpFile); + TQFile out(tmpFile); TQString cmd = KProcess::quote(exe); cmd += " -t cups -d "; cmd += KProcess::quote(comps[2]); @@ -594,8 +594,8 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname) cmd += KProcess::quote(comps[1]); if (in.open(cmd) && out.open(IO_WriteOnly)) { - QTextStream tin(&in), tout(&out); - QString line; + TQTextStream tin(&in), tout(&out); + TQString line; while (!tin.atEnd()) { line = tin.readLine(); @@ -641,11 +641,11 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) { kdDebug( 500 ) << "Saving PPD file with template=" << driver->get( "template" ) << endl; TQIODevice *in = KFilterDev::deviceForFile( driver->get( "template" ) ); - QFile out(filename); + TQFile out(filename); if (in && in->open(IO_ReadOnly) && out.open(IO_WriteOnly)) { - QTextStream tin(in), tout(&out); - QString line, keyword; + TQTextStream tin(in), tout(&out); + TQString line, keyword; bool isnumeric(false); DrBase *opt(0); @@ -676,7 +676,7 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) }*/ else if ((p=line.tqfind("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric) { - QString prefix = line.left(p+9); + TQString prefix = line.left(p+9); tout << prefix << " => '" << opt->valueText() << '\''; if (line.tqfind(',',p) != -1) tout << ','; @@ -735,14 +735,14 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) bool KMCupsManager::savePrinterDriver(KMPrinter *p, DrMain *d) { - QString tmpfilename = locateLocal("tmp","print_") + kapp->randomString(8); + TQString tmpfilename = locateLocal("tmp","print_") + kapp->randomString(8); // first save the driver in a temporary file saveDriverFile(d,tmpfilename); // then send a request IppRequest req; - QString uri; + TQString uri; bool result(false); req.setOperation(CUPS_ADD_PRINTER); @@ -786,7 +786,7 @@ void KMCupsManager::unloadCupsdConf() bool KMCupsManager::restartServer() { - QString msg; + TQString msg; bool (*f1)(TQString&) = (bool(*)(TQString&))loadCupsdConfFunction("restartServer"); bool result(false); if (f1) @@ -815,16 +815,16 @@ bool KMCupsManager::configureServer(TQWidget *parent) TQStringList KMCupsManager::detectLocalPrinters() { - QStringList list; + TQStringList list; IppRequest req; req.setOperation(CUPS_GET_DEVICES); if (req.doRequest("/")) { - QString desc, uri, printer, cl; + TQString desc, uri, printer, cl; ipp_attribute_t *attr = req.first(); while (attr) { - QString attrname(attr->name); + TQString attrname(attr->name); if (attrname == "device-info") desc = attr->values[0].string.text; else if (attrname == "device-make-and-model") printer = attr->values[0].string.text; else if (attrname == "device-uri") uri = attr->values[0].string.text; @@ -865,7 +865,7 @@ void KMCupsManager::exportDriver() if (m_currentprinter && m_currentprinter->isLocal() && !m_currentprinter->isClass(true) && !m_currentprinter->isSpecial()) { - QString path = cupsInstallDir(); + TQString path = cupsInstallDir(); if (path.isEmpty()) path = "/usr/share/cups"; else @@ -879,7 +879,7 @@ void KMCupsManager::printerIppReport() if (m_currentprinter && !m_currentprinter->isSpecial()) { IppRequest req; - QString uri; + TQString uri; req.setOperation(IPP_GET_PRINTER_ATTRIBUTES); uri = printerURI(m_currentprinter, true); @@ -913,7 +913,7 @@ TQString KMCupsManager::stateInformation() return TQString("%1: %2") .arg(i18n("Server")) .arg(CupsInfos::self()->host()[0] != '/' ? - TQString("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port()) + TQString(TQString("%1:%2").arg(CupsInfos::self()->host()).arg(CupsInfos::self()->port())) : CupsInfos::self()->host()); } @@ -1016,11 +1016,11 @@ void KMCupsManager::hostPingFailedSlot() { static void extractMaticData(TQString& buf, const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; while (!t.eof()) { line = t.readLine(); @@ -1032,7 +1032,7 @@ static void extractMaticData(TQString& buf, const TQString& filename) static TQString printerURI(KMPrinter *p, bool use) { - QString uri; + TQString uri; if (use && !p->uri().isEmpty()) uri = p->uri().prettyURL(); else @@ -1042,7 +1042,7 @@ static TQString printerURI(KMPrinter *p, bool use) static TQString downloadDriver(KMPrinter *p) { - QString driverfile, prname = p->printerName(); + TQString driverfile, prname = p->printerName(); bool changed(false); /* diff --git a/kdeprint/cups/kmpropbanners.cpp b/kdeprint/cups/kmpropbanners.cpp index 7be161f6d..4380e6507 100644 --- a/kdeprint/cups/kmpropbanners.cpp +++ b/kdeprint/cups/kmpropbanners.cpp @@ -32,13 +32,13 @@ KMPropBanners::KMPropBanners(TQWidget *parent, const char *name) m_startbanner = new TQLabel(this); m_stopbanner = new TQLabel(this); - QLabel *l1 = new TQLabel(i18n("&Starting banner:"), this); - QLabel *l2 = new TQLabel(i18n("&Ending banner:"), this); + TQLabel *l1 = new TQLabel(i18n("&Starting banner:"), this); + TQLabel *l2 = new TQLabel(i18n("&Ending banner:"), this); l1->setBuddy(m_startbanner); l2->setBuddy(m_stopbanner); - QGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 10); + TQGridLayout *main_ = new TQGridLayout(this, 3, 2, 10, 10); main_->setColStretch(1,1); main_->setRowStretch(2,1); main_->addWidget(l1,0,0); @@ -59,7 +59,7 @@ void KMPropBanners::setPrinter(KMPrinter *p) { if (p && p->isPrinter()) { - QStringList l = TQStringList::split(',',p->option("kde-banners"),false); + TQStringList l = TQStringList::split(',',p->option("kde-banners"),false); while ( l.count() < 2 ) l.append( "none" ); m_startbanner->setText(i18n(mapBanner(l[0]).utf8())); diff --git a/kdeprint/cups/kmpropbanners.h b/kdeprint/cups/kmpropbanners.h index b93b5709c..6756763e6 100644 --- a/kdeprint/cups/kmpropbanners.h +++ b/kdeprint/cups/kmpropbanners.h @@ -36,8 +36,8 @@ protected: void configureWizard(KMWizard*); private: - QLabel *m_startbanner; - QLabel *m_stopbanner; + TQLabel *m_startbanner; + TQLabel *m_stopbanner; }; #endif diff --git a/kdeprint/cups/kmpropquota.cpp b/kdeprint/cups/kmpropquota.cpp index 12e360746..9f5ff8444 100644 --- a/kdeprint/cups/kmpropquota.cpp +++ b/kdeprint/cups/kmpropquota.cpp @@ -36,15 +36,15 @@ KMPropQuota::KMPropQuota(TQWidget *parent, const char *name) m_sizelimit = new TQLabel(this); m_pagelimit = new TQLabel(this); - QLabel *l1 = new TQLabel(i18n("&Period:"), this); - QLabel *l2 = new TQLabel(i18n("&Size limit (KB):"), this); - QLabel *l3 = new TQLabel(i18n("&Page limit:"), this); + TQLabel *l1 = new TQLabel(i18n("&Period:"), this); + TQLabel *l2 = new TQLabel(i18n("&Size limit (KB):"), this); + TQLabel *l3 = new TQLabel(i18n("&Page limit:"), this); l1->setBuddy(m_period); l2->setBuddy(m_sizelimit); l3->setBuddy(m_pagelimit); - QGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 10); + TQGridLayout *main_ = new TQGridLayout(this, 4, 2, 10, 10); main_->setColStretch(1,1); main_->setRowStretch(3,1); main_->addWidget(l1,0,0); diff --git a/kdeprint/cups/kmpropquota.h b/kdeprint/cups/kmpropquota.h index d9b5b273b..4142c1179 100644 --- a/kdeprint/cups/kmpropquota.h +++ b/kdeprint/cups/kmpropquota.h @@ -36,9 +36,9 @@ protected: void configureWizard(KMWizard*); private: - QLabel *m_period; - QLabel *m_sizelimit; - QLabel *m_pagelimit; + TQLabel *m_period; + TQLabel *m_sizelimit; + TQLabel *m_pagelimit; }; #endif diff --git a/kdeprint/cups/kmpropusers.cpp b/kdeprint/cups/kmpropusers.cpp index 35d6f0fe1..173149047 100644 --- a/kdeprint/cups/kmpropusers.cpp +++ b/kdeprint/cups/kmpropusers.cpp @@ -32,7 +32,7 @@ KMPropUsers::KMPropUsers(TQWidget *parent, const char *name) m_text->setPaper(tqcolorGroup().background()); m_text->setFrameStyle(TQFrame::NoFrame); - QVBoxLayout *l0 = new TQVBoxLayout(this, 10, 0); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 10, 0); l0->addWidget(m_text, 1); m_title = i18n("Users"); @@ -48,8 +48,8 @@ void KMPropUsers::setPrinter(KMPrinter *p) { if (p && p->isPrinter()) { - QString txt("<p>%1:<ul>%1</ul></p>"); - QStringList users; + TQString txt("<p>%1:<ul>%1</ul></p>"); + TQStringList users; if (!p->option("requesting-user-name-denied").isEmpty()) { txt = txt.arg(i18n("Denied users")); @@ -66,7 +66,7 @@ void KMPropUsers::setPrinter(KMPrinter *p) } if (users.count() > 0) { - QString s; + TQString s; for (TQStringList::ConstIterator it=users.begin(); it!=users.end(); ++it) s.append("<li>").append(*it).append("</li>"); txt = txt.arg(s); diff --git a/kdeprint/cups/kmpropusers.h b/kdeprint/cups/kmpropusers.h index 24fbb5aff..4ab1fab9d 100644 --- a/kdeprint/cups/kmpropusers.h +++ b/kdeprint/cups/kmpropusers.h @@ -36,7 +36,7 @@ protected: void configureWizard(KMWizard*); private: - QTextView *m_text; + TQTextView *m_text; }; #endif diff --git a/kdeprint/cups/kmwbanners.cpp b/kdeprint/cups/kmwbanners.cpp index 7755e9774..72964c697 100644 --- a/kdeprint/cups/kmwbanners.cpp +++ b/kdeprint/cups/kmwbanners.cpp @@ -31,7 +31,7 @@ TQStringList defaultBanners() { - QStringList bans; + TQStringList bans; TQPtrList<KMPrinter> *list = KMFactory::self()->manager()->printerList(false); if (list && list->count() > 0) { @@ -39,7 +39,7 @@ TQStringList defaultBanners() for (;it.current() && !it.current()->isPrinter(); ++it) ; if (it.current() && KMFactory::self()->manager()->completePrinter(it.current())) { - QString s = list->getFirst()->option("kde-banners-supported"); + TQString s = list->getFirst()->option("kde-banners-supported"); bans = TQStringList::split(',',s,false); } } @@ -89,18 +89,18 @@ KMWBanners::KMWBanners(TQWidget *parent, const char *name) m_start = new TQComboBox(this); m_end = new TQComboBox(this); - QLabel *l1 = new TQLabel(i18n("&Starting banner:"),this); - QLabel *l2 = new TQLabel(i18n("&Ending banner:"),this); + TQLabel *l1 = new TQLabel(i18n("&Starting banner:"),this); + TQLabel *l2 = new TQLabel(i18n("&Ending banner:"),this); l1->setBuddy(m_start); l2->setBuddy(m_end); - QLabel *l0 = new TQLabel(this); + TQLabel *l0 = new TQLabel(this); l0->setText(i18n("<p>Select the default banners associated with this printer. These " "banners will be inserted before and/or after each print job sent " "to the printer. If you don't want to use banners, select <b>No Banner</b>.</p>")); - QGridLayout *lay = new TQGridLayout(this, 5, 2, 0, 10); + TQGridLayout *lay = new TQGridLayout(this, 5, 2, 0, 10); lay->setColStretch(1,1); lay->addRowSpacing(1,20); lay->setRowStretch(4,1); @@ -128,11 +128,11 @@ void KMWBanners::initPrinter(KMPrinter *p) m_end->insertItem( i18n( mapBanner(*it).utf8() ) ); } } - QStringList l = TQStringList::split(',',p->option("kde-banners"),false); + TQStringList l = TQStringList::split(',',p->option("kde-banners"),false); while (l.count() < 2) l.append("none"); - m_start->setCurrentItem(m_bans.findIndex(l[0])); - m_end->setCurrentItem(m_bans.findIndex(l[1])); + m_start->setCurrentItem(m_bans.tqfindIndex(l[0])); + m_end->setCurrentItem(m_bans.tqfindIndex(l[1])); } } diff --git a/kdeprint/cups/kmwbanners.h b/kdeprint/cups/kmwbanners.h index 95aaa1740..7340e5554 100644 --- a/kdeprint/cups/kmwbanners.h +++ b/kdeprint/cups/kmwbanners.h @@ -34,8 +34,8 @@ public: void updatePrinter(KMPrinter*); private: - QComboBox *m_start, *m_end; - QStringList m_bans; + TQComboBox *m_start, *m_end; + TQStringList m_bans; }; TQString mapBanner( const TQString& ); diff --git a/kdeprint/cups/kmwfax.cpp b/kdeprint/cups/kmwfax.cpp index 45cd502fd..127232d2e 100644 --- a/kdeprint/cups/kmwfax.cpp +++ b/kdeprint/cups/kmwfax.cpp @@ -37,18 +37,18 @@ KMWFax::KMWFax(TQWidget *parent, const char *name) m_title = i18n("Fax Serial Device"); m_nextpage = KMWizard::Driver; - QLabel *lab = new TQLabel(this); + TQLabel *lab = new TQLabel(this); lab->setText(i18n("<p>Select the device which your serial Fax/Modem is connected to.</p>")); m_list = new KListBox(this); - QVBoxLayout *l1 = new TQVBoxLayout(this,0,10); + TQVBoxLayout *l1 = new TQVBoxLayout(this,0,10); l1->addWidget(lab,0); l1->addWidget(m_list,1); // initialize IppRequest req; req.setOperation(CUPS_GET_DEVICES); - QString uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + TQString uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); if (req.doRequest("/")) { @@ -76,6 +76,6 @@ bool KMWFax::isValid(TQString& msg) void KMWFax::updatePrinter(KMPrinter *printer) { - QString uri = m_list->currentText(); + TQString uri = m_list->currentText(); printer->setDevice(uri); } diff --git a/kdeprint/cups/kmwipp.cpp b/kdeprint/cups/kmwipp.cpp index 81bcf584c..4d32ae2a1 100644 --- a/kdeprint/cups/kmwipp.cpp +++ b/kdeprint/cups/kmwipp.cpp @@ -34,7 +34,7 @@ KMWIpp::KMWIpp(TQWidget *parent, const char *name) m_ID = KMWizard::IPP; m_title = i18n("Remote IPP server"); m_nextpage = KMWizard::IPPSelect; - lineEdit( 1 )->setValidator( new TQIntValidator( this ) ); + lineEdit( 1 )->setValidator( new TQIntValidator( TQT_TQOBJECT(this) ) ); setInfo(i18n("<p>Enter the information concerning the remote IPP server " "owning the targeted printer. This wizard will poll the server " diff --git a/kdeprint/cups/kmwippprinter.cpp b/kdeprint/cups/kmwippprinter.cpp index b5f799fc5..90fad0e94 100644 --- a/kdeprint/cups/kmwippprinter.cpp +++ b/kdeprint/cups/kmwippprinter.cpp @@ -52,7 +52,7 @@ KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name) m_list->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); m_list->setLineWidth(1); - QLabel *l1 = new TQLabel(i18n("&Printer URI:"),this); + TQLabel *l1 = new TQLabel(i18n("&Printer URI:"),this); m_uri = new TQLineEdit(this); @@ -78,9 +78,9 @@ KMWIppPrinter::KMWIppPrinter(TQWidget *parent, const char *name) connect(m_ippreport, TQT_SIGNAL(clicked()), TQT_SLOT(slotIppReport())); // layout - QHBoxLayout *lay3 = new TQHBoxLayout(this, 0, 10); - QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 0); - QHBoxLayout *lay4 = new TQHBoxLayout(0, 0, 0); + TQHBoxLayout *lay3 = new TQHBoxLayout(this, 0, 10); + TQVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 0); + TQHBoxLayout *lay4 = new TQHBoxLayout(0, 0, 0); lay3->addWidget(m_list,1); lay3->addLayout(lay2,1); @@ -134,12 +134,12 @@ void KMWIppPrinter::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")); } } @@ -151,8 +151,8 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) // trying to get printer attributes IppRequest req; - QString uri; - QStringList keys; + TQString uri; + TQStringList keys; req.setOperation(IPP_GET_PRINTER_ATTRIBUTES); req.setHost(item->text(1)); @@ -168,7 +168,7 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) req.addKeyword(IPP_TAG_OPERATION,"requested-attributes",keys); if (req.doRequest("/ipp/") && (req.status() == IPP_OK || req.status() == IPP_OK_SUBST || req.status() == IPP_OK_CONFLICT)) { - QString value, txt; + TQString value, txt; int state; if (req.name("printer-name",value)) txt.append(i18n("<b>Name</b>: %1<br>").arg(value)); if (req.text("printer-location",value) && !value.isEmpty()) txt.append(i18n("<b>Location</b>: %1<br>").arg(value)); @@ -203,8 +203,8 @@ void KMWIppPrinter::slotPrinterSelected(TQListViewItem *item) void KMWIppPrinter::slotIppReport() { IppRequest req; - QString uri("ipp://%1:%2/ipp"); - QListViewItem *item = m_list->currentItem(); + TQString uri("ipp://%1:%2/ipp"); + TQListViewItem *item = m_list->currentItem(); if (item) { @@ -215,7 +215,7 @@ void KMWIppPrinter::slotIppReport() req.addURI(IPP_TAG_OPERATION, "printer-uri", uri); if (req.doRequest("/ipp/")) { - QString caption = i18n("IPP Report for %1").arg(item->text(0)); + TQString caption = i18n("IPP Report for %1").arg(item->text(0)); static_cast<KMCupsManager*>(KMManager::self())->ippReport(req, IPP_TAG_PRINTER, caption); } else diff --git a/kdeprint/cups/kmwippprinter.h b/kdeprint/cups/kmwippprinter.h index b2298ff68..aff29fdfb 100644 --- a/kdeprint/cups/kmwippprinter.h +++ b/kdeprint/cups/kmwippprinter.h @@ -48,9 +48,9 @@ protected slots: private: KListView *m_list; NetworkScanner *m_scanner; - QLineEdit *m_uri; - QTextView *m_info; - QPushButton *m_ippreport; + TQLineEdit *m_uri; + TQTextView *m_info; + TQPushButton *m_ippreport; }; #endif diff --git a/kdeprint/cups/kmwippselect.cpp b/kdeprint/cups/kmwippselect.cpp index 38fff88df..0d89e9112 100644 --- a/kdeprint/cups/kmwippselect.cpp +++ b/kdeprint/cups/kmwippselect.cpp @@ -38,7 +38,7 @@ KMWIppSelect::KMWIppSelect(TQWidget *parent, const char *name) m_list = new KListBox(this); - QVBoxLayout *lay = new TQVBoxLayout(this, 0, 0); + TQVBoxLayout *lay = new TQVBoxLayout(this, 0, 0); lay->addWidget(m_list); } @@ -55,7 +55,7 @@ bool KMWIppSelect::isValid(TQString& msg) void KMWIppSelect::initPrinter(KMPrinter *p) { // storage variables - QString host, login, password; + TQString host, login, password; int port; // save config @@ -73,7 +73,7 @@ void KMWIppSelect::initPrinter(KMPrinter *p) CupsInfos::self()->setPassword(url.pass()); CupsInfos::self()->setPort(url.port()); IppRequest req; - QString uri; + TQString uri; req.setOperation(CUPS_GET_PRINTERS); uri = TQString::tqfromLatin1("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); req.addURI(IPP_TAG_OPERATION,"printer-uri",uri); @@ -100,7 +100,7 @@ void KMWIppSelect::initPrinter(KMPrinter *p) void KMWIppSelect::updatePrinter(KMPrinter *p) { KURL url = p->device(); - QString path = m_list->currentText(); + TQString path = m_list->currentText(); path.prepend("/printers/"); url.setPath(path); p->setDevice(url.url()); diff --git a/kdeprint/cups/kmwother.cpp b/kdeprint/cups/kmwother.cpp index f7c91cca0..947b884d1 100644 --- a/kdeprint/cups/kmwother.cpp +++ b/kdeprint/cups/kmwother.cpp @@ -42,21 +42,21 @@ KMWOther::KMWOther(TQWidget *parent, const char *name) m_nextpage = KMWizard::Driver; m_uri = new TQLineEdit(this); - QLabel *l1 = new TQLabel(this); + TQLabel *l1 = new TQLabel(this); l1->setText(i18n("<p>Enter the URI corresponding to the printer to be installed. " "Examples:</p><ul>" "<li>smb://[login[:passwd]@]server/printer</li>" "<li>lpd://server/queue</li>" "<li>parallel:/dev/lp0</li></ul>")); - QLabel *l2 = new TQLabel(i18n("URI:"), this); + TQLabel *l2 = new TQLabel(i18n("URI:"), this); m_uriview = new KListView( this ); m_uriview->addColumn( "" ); m_uriview->header()->hide(); m_uriview->setSorting( -1 ); connect( m_uriview, TQT_SIGNAL( pressed( TQListViewItem* ) ), TQT_SLOT( slotPressed( TQListViewItem* ) ) ); - QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 15); - QVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 5); + TQVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 15); + TQVBoxLayout *lay2 = new TQVBoxLayout(0, 0, 5); lay1->addWidget(l1); lay1->addLayout(lay2); lay1->addWidget( m_uriview ); diff --git a/kdeprint/cups/kmwother.h b/kdeprint/cups/kmwother.h index a07ba31c6..e4bc72d5f 100644 --- a/kdeprint/cups/kmwother.h +++ b/kdeprint/cups/kmwother.h @@ -39,7 +39,7 @@ protected slots: void slotPressed( TQListViewItem* ); private: - QLineEdit *m_uri; + TQLineEdit *m_uri; KListView *m_uriview; }; diff --git a/kdeprint/cups/kmwquota.cpp b/kdeprint/cups/kmwquota.cpp index f9c34c04a..703a9510f 100644 --- a/kdeprint/cups/kmwquota.cpp +++ b/kdeprint/cups/kmwquota.cpp @@ -93,20 +93,20 @@ KMWQuota::KMWQuota(TQWidget *parent, const char *name) m_timeunit->insertItem(i18n(time_keywords[i])); m_timeunit->setCurrentItem(3); - QLabel *lab1 = new TQLabel(i18n("&Period:"), this); - QLabel *lab2 = new TQLabel(i18n("&Size limit (KB):"), this); - QLabel *lab3 = new TQLabel(i18n("&Page limit:"), this); + TQLabel *lab1 = new TQLabel(i18n("&Period:"), this); + TQLabel *lab2 = new TQLabel(i18n("&Size limit (KB):"), this); + TQLabel *lab3 = new TQLabel(i18n("&Page limit:"), this); lab1->setBuddy(m_period); lab2->setBuddy(m_sizelimit); lab3->setBuddy(m_pagelimit); - QLabel *lab4 = new TQLabel(i18n("<p>Set here the quota for this printer. Using limits of <b>0</b> means " + TQLabel *lab4 = new TQLabel(i18n("<p>Set here the quota for this printer. Using limits of <b>0</b> means " "that no quota will be used. This is equivalent to set quota period to " "<b><nobr>No quota</nobr></b> (-1). Quota limits are defined on a per-user base and " "applied to all users.</p>"), this); - QGridLayout *l0 = new TQGridLayout(this, 5, 3, 0, 10); + TQGridLayout *l0 = new TQGridLayout(this, 5, 3, 0, 10); l0->setRowStretch(4, 1); l0->setColStretch(1, 1); l0->addMultiCellWidget(lab4, 0, 0, 0, 2); diff --git a/kdeprint/cups/kmwquota.h b/kdeprint/cups/kmwquota.h index 4ab8ddc1c..6f1ce0660 100644 --- a/kdeprint/cups/kmwquota.h +++ b/kdeprint/cups/kmwquota.h @@ -37,10 +37,10 @@ public: void updatePrinter(KMPrinter*); private: - QSpinBox *m_period; - QSpinBox *m_sizelimit; - QSpinBox *m_pagelimit; - QComboBox *m_timeunit; + TQSpinBox *m_period; + TQSpinBox *m_sizelimit; + TQSpinBox *m_pagelimit; + TQComboBox *m_timeunit; }; #endif diff --git a/kdeprint/cups/kmwusers.cpp b/kdeprint/cups/kmwusers.cpp index 4466c4223..f42250d68 100644 --- a/kdeprint/cups/kmwusers.cpp +++ b/kdeprint/cups/kmwusers.cpp @@ -41,13 +41,13 @@ KMWUsers::KMWUsers(TQWidget *parent, const char *name) m_type->insertItem(i18n("Allowed Users")); m_type->insertItem(i18n("Denied Users")); - QLabel *lab1 = new TQLabel(i18n("Define here a group of allowed/denied users for this printer."), this); - QLabel *lab2 = new TQLabel(i18n("&Type:"), this); + TQLabel *lab1 = new TQLabel(i18n("Define here a group of allowed/denied users for this printer."), this); + TQLabel *lab2 = new TQLabel(i18n("&Type:"), this); lab2->setBuddy(m_type); - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10); - QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10); + TQHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10); l0->addWidget(lab1, 0); l0->addLayout(l1, 0); l1->addWidget(lab2, 0); @@ -61,7 +61,7 @@ KMWUsers::~KMWUsers() void KMWUsers::initPrinter(KMPrinter *p) { - QStringList l; + TQStringList l; int i(1); if (!p->option("requesting-user-name-denied").isEmpty()) { @@ -85,12 +85,12 @@ void KMWUsers::updatePrinter(KMPrinter *p) p->removeOption("requesting-user-name-denied"); p->removeOption("requesting-user-name-allowed"); - QString str; + TQString str; if (m_users->count() > 0) str = m_users->items().join(","); else str = (m_type->currentItem() == 0 ? "all" : "none"); - QString optname = (m_type->currentItem() == 0 ? "requesting-user-name-allowed" : "requesting-user-name-denied"); + TQString optname = (m_type->currentItem() == 0 ? "requesting-user-name-allowed" : "requesting-user-name-denied"); p->setOption(optname, str); } #include "kmwusers.moc" diff --git a/kdeprint/cups/kmwusers.h b/kdeprint/cups/kmwusers.h index af2dd9618..9b6faeb61 100644 --- a/kdeprint/cups/kmwusers.h +++ b/kdeprint/cups/kmwusers.h @@ -37,7 +37,7 @@ public: private: KEditListBox *m_users; - QComboBox *m_type; + TQComboBox *m_type; }; #endif diff --git a/kdeprint/cups/kphpgl2page.cpp b/kdeprint/cups/kphpgl2page.cpp index 7ec413e52..94816af1a 100644 --- a/kdeprint/cups/kphpgl2page.cpp +++ b/kdeprint/cups/kphpgl2page.cpp @@ -110,7 +110,7 @@ KPHpgl2Page::KPHpgl2Page(TQWidget *parent, const char *name) setTitle("HP-GL/2"); - QGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("HP-GL/2 Options"), this); + TQGroupBox *box = new TQGroupBox(0, Qt::Vertical, i18n("HP-GL/2 Options"), this); m_blackplot = new TQCheckBox(i18n("&Use only black pen"), box); TQWhatsThis::add(m_blackplot, whatsThisBlackplotHpgl2Page); @@ -124,11 +124,11 @@ KPHpgl2Page::KPHpgl2Page(TQWidget *parent, const char *name) m_penwidth->setRange(0, 10000, 100, true); TQWhatsThis::add(m_penwidth, whatsThisPenwidthHpgl2Page); - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10); l0->addWidget(box); l0->addStretch(1); - QVBoxLayout *l1 = new TQVBoxLayout(box->layout(), 10); + TQVBoxLayout *l1 = new TQVBoxLayout(TQT_TQLAYOUT(box->layout()), 10); l1->addWidget(m_blackplot); l1->addWidget(m_fitplot); l1->addWidget(m_penwidth); @@ -141,10 +141,10 @@ KPHpgl2Page::~KPHpgl2Page() void KPHpgl2Page::setOptions(const TQMap<TQString,TQString>& opts) { - QString value; - if (opts.contains("blackplot") && ((value=opts["blackplot"]).isEmpty() || value == "true")) + TQString value; + if (opts.tqcontains("blackplot") && ((value=opts["blackplot"]).isEmpty() || value == "true")) m_blackplot->setChecked(true); - if (opts.contains("fitplot") && ((value=opts["fitplot"]).isEmpty() || value == "true")) + if (opts.tqcontains("fitplot") && ((value=opts["fitplot"]).isEmpty() || value == "true")) m_fitplot->setChecked(true); if (!(value=opts["penwidth"]).isEmpty()) m_penwidth->setValue(value.toInt()); diff --git a/kdeprint/cups/kphpgl2page.h b/kdeprint/cups/kphpgl2page.h index 722cb949b..ecbc85c88 100644 --- a/kdeprint/cups/kphpgl2page.h +++ b/kdeprint/cups/kphpgl2page.h @@ -36,7 +36,7 @@ public: private: KIntNumInput *m_penwidth; - QCheckBox *m_blackplot, *m_fitplot; + TQCheckBox *m_blackplot, *m_fitplot; }; #endif diff --git a/kdeprint/cups/kpimagepage.cpp b/kdeprint/cups/kpimagepage.cpp index a1b519f59..4280ab40e 100644 --- a/kdeprint/cups/kpimagepage.cpp +++ b/kdeprint/cups/kpimagepage.cpp @@ -236,11 +236,11 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) setTitle(i18n("Image")); - QGroupBox *colorbox = new TQGroupBox(0, Qt::Vertical, i18n("Color Settings"), this); + TQGroupBox *colorbox = new TQGroupBox(0, Qt::Vertical, i18n("Color Settings"), this); TQWhatsThis::add(this, whatsThisImagePage); - QGroupBox *sizebox = new TQGroupBox(0, Qt::Vertical, i18n("Image Size"), this); + TQGroupBox *sizebox = new TQGroupBox(0, Qt::Vertical, i18n("Image Size"), this); TQWhatsThis::add(sizebox, whatsThisSizeImagePage); - QGroupBox *positionbox = new TQGroupBox(0, Qt::Vertical, i18n("Image Position"), this); + TQGroupBox *positionbox = new TQGroupBox(0, Qt::Vertical, i18n("Image Position"), this); TQWhatsThis::add(positionbox, whatsThisPositionImagePage); m_brightness = new KIntNumInput(100, colorbox); @@ -275,12 +275,12 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) m_hue->setEnabled(useColor); m_saturation->setEnabled(useColor); - QImage img(locate("data", "kdeprint/preview.png")); + TQImage img(locate("data", "kdeprint/preview.png")); m_preview->setImage(img); KSeparator *sep = new KSeparator(Qt::Horizontal, colorbox); - QPushButton *defbtn = new TQPushButton(i18n("&Default Settings"), colorbox); + TQPushButton *defbtn = new TQPushButton(i18n("&Default Settings"), colorbox); TQWhatsThis::add(defbtn, whatsThisResetButtonImagePage); connect(defbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefaultClicked())); slotDefaultClicked(); @@ -301,19 +301,19 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) m_sizetype->setCurrentItem(0); slotSizeTypeChanged(0); - QLabel *lab = new TQLabel(i18n("&Image size type:"), sizebox); + TQLabel *lab = new TQLabel(i18n("&Image size type:"), sizebox); lab->setBuddy(m_sizetype); m_position = new ImagePosition(positionbox); TQWhatsThis::add(m_position, whatsThisPreviewPositionImagePage); - QRadioButton *bottom = new TQRadioButton(positionbox); - QRadioButton *top = new TQRadioButton(positionbox); - QRadioButton *vcenter = new TQRadioButton(positionbox); - QRadioButton *left = new TQRadioButton(positionbox); - QRadioButton *right = new TQRadioButton(positionbox); - QRadioButton *hcenter = new TQRadioButton(positionbox); - QSize sz = bottom->tqsizeHint(); + TQRadioButton *bottom = new TQRadioButton(positionbox); + TQRadioButton *top = new TQRadioButton(positionbox); + TQRadioButton *vcenter = new TQRadioButton(positionbox); + TQRadioButton *left = new TQRadioButton(positionbox); + TQRadioButton *right = new TQRadioButton(positionbox); + TQRadioButton *hcenter = new TQRadioButton(positionbox); + TQSize sz = bottom->tqsizeHint(); bottom->setFixedSize(sz); vcenter->setFixedSize(sz); top->setFixedSize(sz); @@ -348,12 +348,12 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) m_horizgrp->setButton(1); slotPositionChanged(); - QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 10); + TQGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 10); l0->addMultiCellWidget(colorbox, 0, 0, 0, 1); l0->addWidget(sizebox, 1, 0); l0->addWidget(positionbox, 1, 1); l0->setColStretch(0, 1); - QGridLayout *l1 = new TQGridLayout(colorbox->layout(), 5, 2, 10); + TQGridLayout *l1 = new TQGridLayout(colorbox->layout(), 5, 2, 10); l1->addWidget(m_brightness, 0, 0); l1->addWidget(m_hue, 1, 0); l1->addWidget(m_saturation, 2, 0); @@ -361,16 +361,16 @@ KPImagePage::KPImagePage(DrMain *driver, TQWidget *parent, const char *name) l1->addWidget(m_gamma, 4, 0); l1->addMultiCellWidget(m_preview, 0, 3, 1, 1); l1->addWidget(defbtn, 4, 1); - QVBoxLayout *l2 = new TQVBoxLayout(sizebox->layout(), 3); + TQVBoxLayout *l2 = new TQVBoxLayout(TQT_TQLAYOUT(sizebox->layout()), 3); l2->addStretch(1); l2->addWidget(lab); l2->addWidget(m_sizetype); l2->addSpacing(10); l2->addWidget(m_size); l2->addStretch(1); - QGridLayout *l3 = new TQGridLayout(positionbox->layout(), 2, 2, 10); - QHBoxLayout *l4 = new TQHBoxLayout(0, 0, 10); - QVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10); + TQGridLayout *l3 = new TQGridLayout(positionbox->layout(), 2, 2, 10); + TQHBoxLayout *l4 = new TQHBoxLayout(0, 0, 10); + TQVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10); l3->addLayout(l4, 0, 1); l3->addLayout(l5, 1, 0); l3->addWidget(m_position, 1, 1); @@ -388,7 +388,7 @@ KPImagePage::~KPImagePage() void KPImagePage::setOptions(const TQMap<TQString,TQString>& opts) { - QString value; + TQString value; if (!(value=opts["brightness"]).isEmpty()) m_brightness->setValue(value.toInt()); if (!(value=opts["hue"]).isEmpty()) @@ -434,7 +434,7 @@ void KPImagePage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) if (incldef || m_gamma->value() != 1000) opts["gamma"] = TQString::number(m_gamma->value()); - QString name; + TQString name; if (incldef) { opts["ppi"] = "0"; diff --git a/kdeprint/cups/kpimagepage.h b/kdeprint/cups/kpimagepage.h index 5d9b20e7c..d0cfe094f 100644 --- a/kdeprint/cups/kpimagepage.h +++ b/kdeprint/cups/kpimagepage.h @@ -46,9 +46,9 @@ protected slots: private: KIntNumInput *m_brightness, *m_hue, *m_saturation, *m_gamma; - QComboBox *m_sizetype; + TQComboBox *m_sizetype; KIntNumInput *m_size; - QButtonGroup *m_vertgrp, *m_horizgrp; + TQButtonGroup *m_vertgrp, *m_horizgrp; ImagePreview *m_preview; ImagePosition *m_position; }; diff --git a/kdeprint/cups/kpschedulepage.cpp b/kdeprint/cups/kpschedulepage.cpp index 3c2edaf0f..a43fd04d3 100644 --- a/kdeprint/cups/kpschedulepage.cpp +++ b/kdeprint/cups/kpschedulepage.cpp @@ -144,7 +144,7 @@ KPSchedulePage::KPSchedulePage(TQWidget *parent, const char *name) m_time->insertItem(i18n("Third Shift (12 am - 8 am)")); m_time->insertItem(i18n("Specified Time")); TQWhatsThis::add(m_time, whatsThisScheduledPrinting); - m_tedit = new QTimeEdit(this); + m_tedit = new TQTimeEdit(this); m_tedit->setAutoAdvance(true); m_tedit->setTime(TQTime::currentTime()); m_tedit->setEnabled(false); @@ -157,13 +157,13 @@ KPSchedulePage::KPSchedulePage(TQWidget *parent, const char *name) TQWhatsThis::add(m_priority, whatsThisJobPriority); m_priority->setRange(1, 100, 10, true); - QLabel *lab = new TQLabel(i18n("&Scheduled printing:"), this); + TQLabel *lab = new TQLabel(i18n("&Scheduled printing:"), this); lab->setBuddy(m_time); TQWhatsThis::add(lab, whatsThisScheduledPrinting); - QLabel *lab1 = new TQLabel(i18n("&Billing information:"), this); + TQLabel *lab1 = new TQLabel(i18n("&Billing information:"), this); TQWhatsThis::add(lab1, whatsThisBillingInfo); lab1->setBuddy(m_billing); - QLabel *lab2 = new TQLabel(i18n("T&op/Bottom page label:"), this); + TQLabel *lab2 = new TQLabel(i18n("T&op/Bottom page label:"), this); TQWhatsThis::add(lab2, whatsThisPageLabel); lab2->setBuddy(m_pagelabel); m_priority->setLabel(i18n("&Job priority:"), Qt::AlignVCenter|Qt::AlignLeft); @@ -172,9 +172,9 @@ KPSchedulePage::KPSchedulePage(TQWidget *parent, const char *name) KSeparator *sep0 = new KSeparator(this); sep0->setFixedHeight(10); - QGridLayout *l0 = new TQGridLayout(this, 6, 2, 0, 7); + TQGridLayout *l0 = new TQGridLayout(this, 6, 2, 0, 7); l0->addWidget(lab, 0, 0); - QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 5); + TQHBoxLayout *l1 = new TQHBoxLayout(0, 0, 5); l0->addLayout(l1, 0, 1); l1->addWidget(m_time); l1->addWidget(m_tedit); @@ -205,7 +205,7 @@ bool KPSchedulePage::isValid(TQString& msg) void KPSchedulePage::setOptions(const TQMap<TQString,TQString>& opts) { - QString t = opts["job-hold-until"]; + TQString t = opts["job-hold-until"]; if (!t.isEmpty()) { int item(-1); @@ -220,8 +220,8 @@ void KPSchedulePage::setOptions(const TQMap<TQString,TQString>& opts) else if (t == "third-shift") item = 7; else { - QTime qt = TQTime::fromString(t); - m_tedit->setTime(qt.addSecs(-3600 * m_gmtdiff)); + TQTime qt = TQT_TQTIME_OBJECT(TQTime::fromString(t)); + m_tedit->setTime(TQT_TQTIME_OBJECT(qt.addSecs(-3600 * m_gmtdiff))); item = 8; } @@ -231,7 +231,7 @@ void KPSchedulePage::setOptions(const TQMap<TQString,TQString>& opts) slotTimeChanged(); } } - QRegExp re("^\"|\"$"); + TQRegExp re("^\"|\"$"); t = opts["job-billing"].stripWhiteSpace(); t.replace(re, ""); m_billing->setText(t); @@ -247,7 +247,7 @@ void KPSchedulePage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) { if (incldef || m_time->currentItem() != 0) { - QString t; + TQString t; switch (m_time->currentItem()) { case 0: t = "no-hold"; break; diff --git a/kdeprint/cups/kpschedulepage.h b/kdeprint/cups/kpschedulepage.h index 96e3eb6b8..eccfb570a 100644 --- a/kdeprint/cups/kpschedulepage.h +++ b/kdeprint/cups/kpschedulepage.h @@ -23,7 +23,7 @@ #include <kprintdialogpage.h> class TQComboBox; -class QTimeEdit; +class TQTimeEdit; class TQLineEdit; class KIntNumInput; @@ -42,9 +42,9 @@ protected slots: void slotTimeChanged(); private: - QComboBox *m_time; - QTimeEdit *m_tedit; - QLineEdit *m_billing, *m_pagelabel; + TQComboBox *m_time; + TQTimeEdit *m_tedit; + TQLineEdit *m_billing, *m_pagelabel; KIntNumInput *m_priority; int m_gmtdiff; }; diff --git a/kdeprint/cups/kptagspage.cpp b/kdeprint/cups/kptagspage.cpp index b03f42e75..d9f5a0686 100644 --- a/kdeprint/cups/kptagspage.cpp +++ b/kdeprint/cups/kptagspage.cpp @@ -84,13 +84,13 @@ KPTagsPage::KPTagsPage(bool ro, TQWidget *parent, const char *name) m_tags->setReadOnly(ro); TQWhatsThis::add(m_tags, whatsThisAdditionalTagsTable); - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 5); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, 5); l0->addWidget(m_tags); if (ro) { - QLabel *lab = new TQLabel(i18n("Read-Only"), this); - QFont f = lab->font(); + TQLabel *lab = new TQLabel(i18n("Read-Only"), this); + TQFont f = lab->font(); f.setBold(true); lab->setFont(f); lab->tqsetAlignment(AlignVCenter|AlignRight); @@ -104,10 +104,10 @@ KPTagsPage::~KPTagsPage() bool KPTagsPage::isValid(TQString& msg) { - QRegExp re("\\s"); + TQRegExp re("\\s"); for (int r=0; r<m_tags->numCols(); r++) { - QString tag(m_tags->text(r, 0)); + TQString tag(m_tags->text(r, 0)); if (tag.isEmpty()) continue; else if (tag.tqfind(re) != -1) @@ -122,13 +122,13 @@ bool KPTagsPage::isValid(TQString& msg) void KPTagsPage::setOptions(const TQMap<TQString,TQString>& opts) { int r(0); - QRegExp re("^\"|\"$"); + TQRegExp re("^\"|\"$"); for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end() && r<m_tags->numRows(); ++it) { if (it.key().startsWith("KDEPrint-")) { m_tags->setText(r, 0, it.key().mid(9)); - QString data = it.data(); + TQString data = it.data(); m_tags->setText(r, 1, data.replace(re, "")); r++; } @@ -144,7 +144,7 @@ void KPTagsPage::getOptions(TQMap<TQString,TQString>& opts, bool) { for (int r=0; r<m_tags->numRows(); r++) { - QString tag(m_tags->text(r, 0)), val(m_tags->text(r, 1)); + TQString tag(m_tags->text(r, 0)), val(m_tags->text(r, 1)); if (!tag.isEmpty()) { tag.prepend("KDEPrint-"); diff --git a/kdeprint/cups/kptagspage.h b/kdeprint/cups/kptagspage.h index fc5c88046..599ecebbf 100644 --- a/kdeprint/cups/kptagspage.h +++ b/kdeprint/cups/kptagspage.h @@ -38,7 +38,7 @@ public: TQSize tqminimumSizeHint() const; private: - QTable *m_tags; + TQTable *m_tags; }; #endif diff --git a/kdeprint/cups/kptextpage.cpp b/kdeprint/cups/kptextpage.cpp index 6aece51d2..25cfb888d 100644 --- a/kdeprint/cups/kptextpage.cpp +++ b/kdeprint/cups/kptextpage.cpp @@ -188,11 +188,11 @@ KPTextPage::KPTextPage(DrMain *driver, TQWidget *parent, const char *name) setTitle(i18n("Text")); m_block = false; - QGroupBox *formatbox = new TQGroupBox(0, Qt::Vertical, i18n("Text Format"), this); + TQGroupBox *formatbox = new TQGroupBox(0, Qt::Vertical, i18n("Text Format"), this); TQWhatsThis::add(formatbox, whatsThisFormatTextPage); - QGroupBox *prettybox = new TQGroupBox(0, Qt::Vertical, i18n("Syntax Highlighting"), this); + TQGroupBox *prettybox = new TQGroupBox(0, Qt::Vertical, i18n("Syntax Highlighting"), this); TQWhatsThis::add(prettybox, whatsThisPrettyprintFrameTextPage); - QGroupBox *marginbox = new TQGroupBox(0, Qt::Vertical, i18n("Margins"), this); + TQGroupBox *marginbox = new TQGroupBox(0, Qt::Vertical, i18n("Margins"), this); TQWhatsThis::add(marginbox, whatsThisMarginsTextPage); m_cpi = new KIntNumInput(10, formatbox); @@ -213,9 +213,9 @@ KPTextPage::KPTextPage(DrMain *driver, TQWidget *parent, const char *name) m_prettypix = new TQLabel(prettybox); TQWhatsThis::add(m_prettypix, whatsThisPrettyprintPreviewIconTextPage); m_prettypix->tqsetAlignment(Qt::AlignCenter); - QRadioButton *off = new TQRadioButton(i18n("&Disabled"), prettybox); + TQRadioButton *off = new TQRadioButton(i18n("&Disabled"), prettybox); TQWhatsThis::add(off, whatsThisPrettyprintButtonOffTextPage); - QRadioButton *on = new TQRadioButton(i18n("&Enabled"), prettybox); + TQRadioButton *on = new TQRadioButton(i18n("&Enabled"), prettybox); TQWhatsThis::add(on, whatsThisPrettyprintButtonOnTextPage); m_prettyprint = new TQButtonGroup(prettybox); m_prettyprint->hide(); @@ -229,20 +229,20 @@ KPTextPage::KPTextPage(DrMain *driver, TQWidget *parent, const char *name) TQWhatsThis::add(m_margin, whatsThisMarginsTextPage); m_margin->setPageSize(595, 842); - QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 10); + TQGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 10); l0->addWidget(formatbox, 0, 0); l0->addWidget(prettybox, 0, 1); l0->addMultiCellWidget(marginbox, 1, 1, 0, 1); - QVBoxLayout *l1 = new TQVBoxLayout(formatbox->layout(), 5); + TQVBoxLayout *l1 = new TQVBoxLayout(TQT_TQLAYOUT(formatbox->layout()), 5); l1->addWidget(m_cpi); l1->addWidget(m_lpi); l1->addWidget(sep); l1->addWidget(m_columns); - QGridLayout *l2 = new TQGridLayout(prettybox->layout(), 2, 2, 10); + TQGridLayout *l2 = new TQGridLayout(TQT_TQLAYOUT(prettybox->layout()), 2, 2, 10); l2->addWidget(off, 0, 0); l2->addWidget(on, 1, 0); l2->addMultiCellWidget(m_prettypix, 0, 1, 1, 1); - QVBoxLayout *l3 = new TQVBoxLayout(marginbox->layout(), 10); + TQVBoxLayout *l3 = new TQVBoxLayout(TQT_TQLAYOUT(marginbox->layout()), 10); l3->addWidget(m_margin); } @@ -252,7 +252,7 @@ KPTextPage::~KPTextPage() void KPTextPage::setOptions(const TQMap<TQString,TQString>& opts) { - QString value; + TQString value; if (!(value=opts["cpi"]).isEmpty()) m_cpi->setValue(value.toInt()); @@ -261,14 +261,14 @@ void KPTextPage::setOptions(const TQMap<TQString,TQString>& opts) if (!(value=opts["columns"]).isEmpty()) m_columns->setValue(value.toInt()); int ID(0); - if (opts.contains("prettyprint") && (opts["prettyprint"].isEmpty() || opts["prettyprint"] == "true")) + if (opts.tqcontains("prettyprint") && (opts["prettyprint"].isEmpty() || opts["prettyprint"] == "true")) ID = 1; m_prettyprint->setButton(ID); slotPrettyChanged(ID); // get default margins m_currentps = opts["PageSize"]; - QString orient = opts["orientation-requested"]; + TQString orient = opts["orientation-requested"]; bool landscape = (orient == "4" || orient == "5"); initPageSize(landscape); @@ -331,7 +331,7 @@ void KPTextPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) void KPTextPage::slotPrettyChanged(int ID) { - QString iconstr = (ID == 0 ? "kdeprint_nup1" : "kdeprint_prettyprint"); + TQString iconstr = (ID == 0 ? "kdeprint_nup1" : "kdeprint_prettyprint"); m_prettypix->setPixmap(UserIcon(iconstr)); } diff --git a/kdeprint/cups/kptextpage.h b/kdeprint/cups/kptextpage.h index d776d1e35..3289bf007 100644 --- a/kdeprint/cups/kptextpage.h +++ b/kdeprint/cups/kptextpage.h @@ -47,10 +47,10 @@ protected: private: KIntNumInput *m_cpi, *m_lpi, *m_columns; - QButtonGroup *m_prettyprint; + TQButtonGroup *m_prettyprint; MarginWidget *m_margin; - QLabel *m_prettypix; - QString m_currentps; + TQLabel *m_prettypix; + TQString m_currentps; bool m_block; }; diff --git a/kdeprint/driver.cpp b/kdeprint/driver.cpp index 4250b96e7..6cedb46b1 100644 --- a/kdeprint/driver.cpp +++ b/kdeprint/driver.cpp @@ -61,7 +61,7 @@ DriverItem* DrBase::createItem(DriverItem *parent, DriverItem *after) void DrBase::setOptions(const TQMap<TQString,TQString>& opts) { - if (opts.contains(name())) setValueText(opts[name()]); + if (opts.tqcontains(name())) setValueText(opts[name()]); } void DrBase::getOptions(TQMap<TQString,TQString>& opts, bool incldef) @@ -278,7 +278,7 @@ DrBase* DrGroup::findOption(const TQString& name, DrGroup **parentGroup) DrGroup* DrGroup::findGroup(DrGroup *grp, DrGroup ** parentGroup) { - DrGroup *group = (m_subgroups.findRef(grp) == -1 ? 0 : grp); + DrGroup *group = (m_subgroups.tqfindRef(grp) == -1 ? 0 : grp); if (!group) { TQPtrListIterator<DrGroup> it(m_subgroups); @@ -464,11 +464,11 @@ void DrIntegerOption::setValueText(const TQString& s) TQString DrIntegerOption::fixedVal() { - QStringList vals = TQStringList::split("|", get("fixedvals"), false); + TQStringList vals = TQStringList::split("|", get("fixedvals"), false); if (vals.count() == 0) return valueText(); int d(0); - QString val; + TQString val; for (TQStringList::Iterator it=vals.begin(); it!=vals.end(); ++it) { int thisVal = (*it).toInt(); @@ -514,11 +514,11 @@ void DrFloatOption::setValueText(const TQString& s) TQString DrFloatOption::fixedVal() { - QStringList vals = TQStringList::split("|", get("fixedvals"), false); + TQStringList vals = TQStringList::split("|", get("fixedvals"), false); if (vals.count() == 0) return valueText(); float d(0); - QString val; + TQString val; for (TQStringList::Iterator it=vals.begin(); it!=vals.end(); ++it) { float thisVal = (*it).toFloat(); diff --git a/kdeprint/driver.h b/kdeprint/driver.h index 2ffacd1c2..0d08675af 100644 --- a/kdeprint/driver.h +++ b/kdeprint/driver.h @@ -71,7 +71,7 @@ public: const TQString& get(const TQString& key) const { return m_map[key]; } void set(const TQString& key, const TQString& val) { m_map[key] = val; } - bool has(const TQString& key) const { return m_map.contains(key); } + bool has(const TQString& key) const { return m_map.tqcontains(key); } const TQString& name() const { return m_name; } void setName(const TQString& s) { m_name = s; } bool conflict() const { return m_conflict; } diff --git a/kdeprint/driverview.cpp b/kdeprint/driverview.cpp index 8b1ad67c7..1ede93388 100644 --- a/kdeprint/driverview.cpp +++ b/kdeprint/driverview.cpp @@ -94,8 +94,8 @@ DriverView::DriverView(TQWidget *parent, const char *name) m_driver = 0; - QSplitter *splitter = new TQSplitter(this); - splitter->setOrientation(TQSplitter::Vertical); + TQSplitter *splitter = new TQSplitter(this); + splitter->setOrientation(Qt::Vertical); TQVBoxLayout *vbox = new TQVBoxLayout(this, 0, 10); vbox->addWidget(splitter); diff --git a/kdeprint/droptionview.cpp b/kdeprint/droptionview.cpp index f4ccedca4..74d04bab9 100644 --- a/kdeprint/droptionview.cpp +++ b/kdeprint/droptionview.cpp @@ -58,15 +58,15 @@ OptionNumericView::OptionNumericView(TQWidget *parent, const char *name) m_edit = new TQLineEdit(this); m_slider = new TQSlider(Qt::Horizontal,this); m_slider->setTickmarks(TQSlider::Below); - QLabel *lab = new TQLabel(i18n("Value:"),this); + TQLabel *lab = new TQLabel(i18n("Value:"),this); m_minval = new TQLabel(this); m_maxval = new TQLabel(this); m_integer = true; - QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); - QHBoxLayout *sub_ = new TQHBoxLayout(0, 0, 10); - QHBoxLayout *sub2_ = new TQHBoxLayout(0, 0, 5); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); + TQHBoxLayout *sub_ = new TQHBoxLayout(0, 0, 10); + TQHBoxLayout *sub2_ = new TQHBoxLayout(0, 0, 5); main_->addStretch(1); main_->addLayout(sub_,0); main_->addLayout(sub2_,0); @@ -164,9 +164,9 @@ OptionStringView::OptionStringView(TQWidget *parent, const char *name) : OptionBaseView(parent,name) { m_edit = new TQLineEdit(this); - QLabel *lab = new TQLabel(i18n("String value:"),this); + TQLabel *lab = new TQLabel(i18n("String value:"),this); - QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 5); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 5); main_->addStretch(1); main_->addWidget(lab,0); main_->addWidget(m_edit,0); @@ -193,7 +193,7 @@ OptionListView::OptionListView(TQWidget *parent, const char *name) { m_list = new KListBox(this); - QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); main_->addWidget(m_list); connect(m_list,TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotSelectionChanged())); @@ -219,7 +219,7 @@ void OptionListView::setOption(DrBase *opt) void OptionListView::setValue(const TQString& val) { - m_list->setCurrentItem(m_choices.findIndex(val)); + m_list->setCurrentItem(m_choices.tqfindIndex(val)); } void OptionListView::slotSelectionChanged() @@ -238,12 +238,12 @@ OptionBooleanView::OptionBooleanView(TQWidget *parent, const char *name) m_group = new TQVButtonGroup(this); m_group->setFrameStyle(TQFrame::NoFrame); - QRadioButton *btn = new TQRadioButton(m_group); + TQRadioButton *btn = new TQRadioButton(m_group); btn->setCursor(KCursor::handCursor()); btn = new TQRadioButton(m_group); btn->setCursor(KCursor::handCursor()); - QVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); + TQVBoxLayout *main_ = new TQVBoxLayout(this, 0, 10); main_->addWidget(m_group); connect(m_group,TQT_SIGNAL(clicked(int)),TQT_SLOT(slotSelected(int))); @@ -255,9 +255,9 @@ void OptionBooleanView::setOption(DrBase *opt) { TQPtrListIterator<DrBase> it(*(((DrBooleanOption*)opt)->choices())); m_choices.clear(); - m_group->find(0)->setText(it.toFirst()->get("text")); + static_cast<TQButton*>(m_group->find(0))->setText(it.toFirst()->get("text")); m_choices.append(it.toFirst()->name()); - m_group->find(1)->setText(it.toLast()->get("text")); + static_cast<TQButton*>(m_group->find(1))->setText(it.toLast()->get("text")); m_choices.append(it.toLast()->name()); setValue(opt->valueText()); } @@ -265,13 +265,13 @@ void OptionBooleanView::setOption(DrBase *opt) void OptionBooleanView::setValue(const TQString& val) { - int ID = m_choices.findIndex(val); + int ID = m_choices.tqfindIndex(val); m_group->setButton(ID); } void OptionBooleanView::slotSelected(int ID) { - QString s = m_choices[ID]; + TQString s = m_choices[ID]; emit valueChanged(s); } @@ -308,7 +308,7 @@ DrOptionView::DrOptionView(TQWidget *parent, const char *name) setColumnLayout(0, Qt::Vertical ); layout()->setSpacing( KDialog::spacingHint() ); layout()->setMargin( KDialog::marginHint() ); - QVBoxLayout *main_ = new TQVBoxLayout(layout(), KDialog::marginHint()); + TQVBoxLayout *main_ = new TQVBoxLayout(TQT_TQLAYOUT(layout()), KDialog::marginHint()); main_->addWidget(m_stack); m_item = 0; diff --git a/kdeprint/droptionview.h b/kdeprint/droptionview.h index 0e2775d2f..a84724bd8 100644 --- a/kdeprint/droptionview.h +++ b/kdeprint/droptionview.h @@ -63,9 +63,9 @@ protected slots: void slotEditChanged(const TQString&); private: - QLineEdit *m_edit; - QSlider *m_slider; - QLabel *m_minval, *m_maxval; + TQLineEdit *m_edit; + TQSlider *m_slider; + TQLabel *m_minval, *m_maxval; bool m_integer; }; @@ -77,7 +77,7 @@ public: void setValue(const TQString& val); private: - QLineEdit *m_edit; + TQLineEdit *m_edit; }; class OptionListView : public OptionBaseView @@ -93,7 +93,7 @@ protected slots: private: KListBox *m_list; - QStringList m_choices; + TQStringList m_choices; }; class OptionBooleanView : public OptionBaseView @@ -108,8 +108,8 @@ protected slots: void slotSelected(int); private: - QVButtonGroup *m_group; - QStringList m_choices; + TQVButtonGroup *m_group; + TQStringList m_choices; }; class DrOptionView : public TQGroupBox @@ -127,7 +127,7 @@ public slots: void slotItemSelected(TQListViewItem*); private: - QWidgetStack *m_stack; + TQWidgetStack *m_stack; DriverItem *m_item; bool m_block; bool m_allowfixed; diff --git a/kdeprint/foomatic2loader.cpp b/kdeprint/foomatic2loader.cpp index ec26e5907..a258a8e4e 100644 --- a/kdeprint/foomatic2loader.cpp +++ b/kdeprint/foomatic2loader.cpp @@ -53,7 +53,7 @@ bool Foomatic2Loader::readFromFile( const TQString& filename ) TQFile f( filename ); m_foodata.clear(); if ( f.open( IO_ReadOnly ) ) - return read( &f ); + return read( TQT_TQIODEVICE(&f) ); return false; } @@ -63,7 +63,7 @@ bool Foomatic2Loader::readFromBuffer( const TQString& buffer ) TQBuffer d( buf ); m_foodata.clear(); if ( d.open( IO_ReadOnly ) ) - return read( &d ); + return read( TQT_TQIODEVICE(&d) ); return false; } @@ -151,7 +151,7 @@ DrMain* Foomatic2Loader::buildDriver() const driver->set( "matic_printer", v.mapFind( "id" ).data().toString() ); driver->set( "matic_driver", v.mapFind( "driver" ).data().toString() ); driver->set( "text", TQString( "%1 %2 (%3)" ).arg( driver->get( "manufacturer" ) ).arg( driver->get( "model" ) ).arg( driver->get( "matic_driver" ) ) ); - if ( m_foodata.contains( "POSTPIPE" ) ) + if ( m_foodata.tqcontains( "POSTPIPE" ) ) driver->set( "postpipe", m_foodata.tqfind( "POSTPIPE" ).data().toString() ); v = v.mapFind( "args" ).data(); if ( !v.isNull() && v.type() == TQVariant::List ) @@ -166,7 +166,7 @@ DrMain* Foomatic2Loader::buildDriver() const { TQString group = DrGroup::groupForOption( opt->name() ); DrGroup *grp = NULL; - if ( !groups.contains( group ) ) + if ( !groups.tqcontains( group ) ) { grp = new DrGroup; grp->set( "text", group ); diff --git a/kdeprint/foomatic2loader.h b/kdeprint/foomatic2loader.h index 3559bfd73..fe32ee8fa 100644 --- a/kdeprint/foomatic2loader.h +++ b/kdeprint/foomatic2loader.h @@ -20,6 +20,7 @@ #ifndef FOOMATIC2LOADER_H #define FOOMATIC2LOADER_H +#include <tqmap.h> #include <tqvariant.h> #include <kdelibs_export.h> diff --git a/kdeprint/fooparser.cpp b/kdeprint/fooparser.cpp index 329f80ca5..09ba34bf2 100644 --- a/kdeprint/fooparser.cpp +++ b/kdeprint/fooparser.cpp @@ -39,7 +39,7 @@ * Boston, MA 02110-1301, USA. **/ -#define YYSTYPE QVariant +#define YYSTYPE TQVariant #define YYPARSE_PARAM fooloader #define YYDEBUG 1 diff --git a/kdeprint/fooparser.y b/kdeprint/fooparser.y index a6a119ccb..1aaa4cf75 100644 --- a/kdeprint/fooparser.y +++ b/kdeprint/fooparser.y @@ -18,12 +18,12 @@ * Boston, MA 02110-1301, USA. **/ -#define YYSTYPE QVariant +#define YYSTYPE TQVariant #define YYPARSE_PARAM fooloader #define YYDEBUG 1 #include <stdlib.h> -#include <qvariant.h> +#include <tqvariant.h> #include "foomatic2loader.h" void yyerror(const char*) {} @@ -48,7 +48,7 @@ foodata: VAR '=' '{' fieldlist '}' ';' { static_cast<Foomatic2Loader*>(fooloa ; fieldlist: assignment { $$ = $1; } - | fieldlist ',' assignment { QMap<QString,QVariant>::ConstIterator it = $3.mapBegin(); $1.asMap().insert(it.key(), it.data()); $$ = $1; } + | fieldlist ',' assignment { TQMap<TQString,TQVariant>::ConstIterator it = $3.mapBegin(); $1.asMap().insert(it.key(), it.data()); $$ = $1; } ; assignment: STRING '=' '>' value { $$.asMap().insert($1.toString(), $4); } @@ -58,13 +58,13 @@ valuelist: value { $$.asList().append($1); } | valuelist ',' value { $1.asList().append($3); $$ = $1; } ; -value: UNDEF { $$ = QVariant(); } +value: UNDEF { $$ = TQVariant(); } | STRING { $$ = $1; } | NUMBER { $$ = $1; } | '[' valuelist ']' { $$ = $2; } | '{' fieldlist '}' { $$ = $2; } - | '[' ']' { $$ = QVariant(); } - | '{' '}' { $$ = QVariant(); } + | '[' ']' { $$ = TQVariant(); } + | '{' '}' { $$ = TQVariant(); } ; %% diff --git a/kdeprint/kdeprintcheck.cpp b/kdeprint/kdeprintcheck.cpp index 114477191..2cccde6de 100644 --- a/kdeprint/kdeprintcheck.cpp +++ b/kdeprint/kdeprintcheck.cpp @@ -57,7 +57,7 @@ bool KdeprintChecker::check(KConfig *conf, const TQString& group) { if (!group.isEmpty()) conf->setGroup(group); - QStringList uris = conf->readListEntry("Require"); + TQStringList uris = conf->readListEntry("Require"); return check(uris); } diff --git a/kdeprint/kdeprintd.cpp b/kdeprint/kdeprintd.cpp index 9a4964cac..e2a22e933 100644 --- a/kdeprint/kdeprintd.cpp +++ b/kdeprint/kdeprintd.cpp @@ -48,7 +48,7 @@ extern "C" } } -class StatusWindow : public QWidget +class StatusWindow : public TQWidget { public: StatusWindow(int pid = -1); @@ -56,14 +56,14 @@ public: int pid() const { return m_pid; } private: - QLabel *m_label; - QPushButton *m_button; + TQLabel *m_label; + TQPushButton *m_button; int m_pid; - QLabel *m_icon; + TQLabel *m_icon; }; StatusWindow::StatusWindow(int pid) -: TQWidget(NULL, "StatusWindow", WType_TopLevel|WStyle_DialogBorder|WStyle_StaysOnTop|WDestructiveClose), m_pid(pid) +: TQWidget(NULL, "StatusWindow", (WFlags)(WType_TopLevel|WStyle_DialogBorder|WStyle_StaysOnTop|WDestructiveClose)), m_pid(pid) { m_label = new TQLabel(this); m_label->tqsetAlignment(AlignCenter); @@ -72,7 +72,7 @@ StatusWindow::StatusWindow(int pid) m_icon->setPixmap(DesktopIcon("fileprint")); m_icon->tqsetAlignment(AlignCenter); KWin::setIcons(winId(), *(m_icon->pixmap()), SmallIcon("fileprint")); - QGridLayout *l0 = new TQGridLayout(this, 2, 3, 10, 10); + TQGridLayout *l0 = new TQGridLayout(this, 2, 3, 10, 10); l0->setRowStretch(0, 1); l0->setColStretch(1, 1); l0->addMultiCellWidget(m_label, 0, 0, 1, 2); @@ -112,7 +112,7 @@ KDEPrintd::~KDEPrintd() int KDEPrintd::print(const TQString& cmd, const TQStringList& files, bool remflag) { KPrintProcess *proc = new KPrintProcess; - QString command(cmd); + TQString command(cmd); TQRegExp re( "\\$out\\{([^}]*)\\}" ); connect(proc,TQT_SIGNAL(printTerminated(KPrintProcess*)),TQT_SLOT(slotPrintTerminated(KPrintProcess*))); @@ -161,7 +161,7 @@ void KDEPrintd::slotPrintError( KPrintProcess *proc, const TQString& msg ) TQString KDEPrintd::openPassDlg(const TQString& user) { - QString user_(user), pass_, result; + TQString user_(user), pass_, result; if (KIO::PasswordDialog::getNameAndPassword(user_, pass_, NULL) == KDialog::Accepted) result.append(user_).append(":").append(pass_); return result; @@ -263,7 +263,7 @@ void KDEPrintd::processRequest() info.comment = i18n( "Printing system" ); TQDataStream input( params, IO_WriteOnly ); - input << info << i18n( "Authentication failed (user name=%1)" ).arg( info.username ) << 0L << (long int) req->seqNbr; + input << info << TQString(i18n( "Authentication failed (user name=%1)" ).arg( info.username )) << 0L << (long int) req->seqNbr; if ( callingDcopClient()->call( "kded", "kpasswdserver", "queryAuthInfo(KIO::AuthInfo,TQString,long int,long int)", params, replyType, reply ) ) { diff --git a/kdeprint/kfilelist.cpp b/kdeprint/kfilelist.cpp index a8402e8ce..85117a922 100644 --- a/kdeprint/kfilelist.cpp +++ b/kdeprint/kfilelist.cpp @@ -149,8 +149,8 @@ KFileList::KFileList(TQWidget *parent, const char *name) "Drag file(s) here or use the button to open a file dialog. " "Leave empty for <b><STDIN></b>.")); - QHBoxLayout *l0 = new TQHBoxLayout(this, 0, KDialog::spacingHint()); - QVBoxLayout *l1 = new TQVBoxLayout(0, 0, 1); + TQHBoxLayout *l0 = new TQHBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *l1 = new TQVBoxLayout(0, 0, 1); l0->addWidget(m_files); l0->addLayout(l1); l1->addWidget(m_add); @@ -185,7 +185,7 @@ void KFileList::addFiles(const KURL::List& files) if (files.count() > 0) { // search last item in current list, to add new ones at the end - QListViewItem *item = m_files->firstChild(); + TQListViewItem *item = m_files->firstChild(); while (item && item->nextSibling()) item = item->nextSibling(); @@ -225,8 +225,8 @@ void KFileList::setFileList(const TQStringList& files) TQStringList KFileList::fileList() const { - QStringList l; - QListViewItem *item = m_files->firstChild(); + TQStringList l; + TQListViewItem *item = m_files->firstChild(); while (item) { l << item->text(2); @@ -255,7 +255,7 @@ void KFileList::slotRemoveFile() void KFileList::slotOpenFile() { - QListViewItem *item = m_files->currentItem(); + TQListViewItem *item = m_files->currentItem(); if (item) { KURL url( item->text( 2 ) ); @@ -271,7 +271,7 @@ TQSize KFileList::tqsizeHint() const void KFileList::selection(TQPtrList<TQListViewItem>& l) { l.setAutoDelete(false); - QListViewItem *item = m_files->firstChild(); + TQListViewItem *item = m_files->firstChild(); while (item) { if (item->isSelected()) @@ -299,7 +299,7 @@ void KFileList::slotUp() selection(l); if (l.count() == 1 && l.first()->itemAbove()) { - QListViewItem *item(l.first()), *clone; + TQListViewItem *item(l.first()), *clone; clone = new TQListViewItem(m_files, item->itemAbove()->itemAbove(), item->text(0), item->text(1), item->text(2)); clone->setPixmap(0, *(item->pixmap(0))); delete item; @@ -314,7 +314,7 @@ void KFileList::slotDown() selection(l); if (l.count() == 1 && l.first()->itemBelow()) { - QListViewItem *item(l.first()), *clone; + TQListViewItem *item(l.first()), *clone; clone = new TQListViewItem(m_files, item->itemBelow(), item->text(0), item->text(1), item->text(2)); clone->setPixmap(0, *(item->pixmap(0))); delete item; diff --git a/kdeprint/kfilelist.h b/kdeprint/kfilelist.h index 667938d29..8a7ecd50a 100644 --- a/kdeprint/kfilelist.h +++ b/kdeprint/kfilelist.h @@ -55,7 +55,7 @@ protected: private: KListView *m_files; - QToolButton *m_add, *m_remove, *m_open, *m_up, *m_down; + TQToolButton *m_add, *m_remove, *m_open, *m_up, *m_down; bool m_block; }; diff --git a/kdeprint/kmdbentry.h b/kdeprint/kmdbentry.h index 901980a34..6de72c5ba 100644 --- a/kdeprint/kmdbentry.h +++ b/kdeprint/kmdbentry.h @@ -28,19 +28,19 @@ struct KDEPRINT_EXPORT KMDBEntry { // the file location of the driver - QString file; + TQString file; // normal information - QString manufacturer; - QString model; - QString modelname; + TQString manufacturer; + TQString model; + TQString modelname; // information used for auto-detection - QString pnpmanufacturer; - QString pnpmodel; + TQString pnpmanufacturer; + TQString pnpmodel; // short driver description (if any) - QString description; + TQString description; // tell whether this is the recommended driver - bool recommended; - QString drivercomment; + bool recommended; + TQString drivercomment; KMDBEntry(); bool validate(bool checkIt = true); diff --git a/kdeprint/kmfactory.cpp b/kdeprint/kmfactory.cpp index aa696490f..bf0872986 100644 --- a/kdeprint/kmfactory.cpp +++ b/kdeprint/kmfactory.cpp @@ -209,11 +209,11 @@ void KMFactory::loadFactory(const TQString& syst) { if (!m_factory) { - QString sys(syst); + TQString sys(syst); if (sys.isEmpty()) // load default configured print plugin sys = printSystem(); - QString libname = TQString::tqfromLatin1("kdeprint_%1").arg(sys); + TQString libname = TQString::tqfromLatin1("kdeprint_%1").arg(sys); m_factory = KLibLoader::self()->factory(TQFile::encodeName(libname)); if (!m_factory) { @@ -240,7 +240,7 @@ TQString KMFactory::printSystem() { KConfig *conf = printConfig(); conf->setGroup("General"); - QString sys = conf->readEntry("PrintSystem"); + TQString sys = conf->readEntry("PrintSystem"); if (sys.isEmpty()) { // perform auto-detection (will at least return "lpdunix") @@ -295,7 +295,7 @@ void KMFactory::reload(const TQString& syst, bool saveSyst) TQValueList<KMFactory::PluginInfo> KMFactory::pluginList() { - QDir d(locate("data", "kdeprint/plugins/"), "*.print", TQDir::Name, TQDir::Files); + TQDir d(locate("data", "kdeprint/plugins/"), "*.print", TQDir::Name, TQDir::Files); TQValueList<PluginInfo> list; for (uint i=0; i<d.count(); i++) { @@ -309,7 +309,7 @@ TQValueList<KMFactory::PluginInfo> KMFactory::pluginList() KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name) { - QString path(name); + TQString path(name); if (path[0] != '/') path = locate("data", TQString::tqfromLatin1("kdeprint/plugins/%1.print").arg(name)); KSimpleConfig conf(path); @@ -333,7 +333,7 @@ KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name) void KMFactory::registerObject(KPReloadObject *obj, bool priority) { // check if object already registered, then add it - if (m_objects.findRef(obj) == -1) + if (m_objects.tqfindRef(obj) == -1) { if (priority) m_objects.prepend(obj); @@ -376,7 +376,7 @@ void KMFactory::slot_pluginChanged(pid_t pid) UNLOAD_OBJECT(m_printconfig); // Then reload everything and notified registered objects. // Do NOT re-save the new print system. - QString syst = printSystem(); + TQString syst = printSystem(); reload(syst, false); } } @@ -412,7 +412,7 @@ void KMFactory::saveConfig() // need to reload the config file. } -QPair<TQString,TQString> KMFactory::requestPassword( int& seqNbr, const TQString& user, const TQString& host, int port ) +TQPair<TQString,TQString> KMFactory::requestPassword( int& seqNbr, const TQString& user, const TQString& host, int port ) { DCOPRef kdeprintd( "kded", "kdeprintd" ); /** @@ -431,11 +431,11 @@ QPair<TQString,TQString> KMFactory::requestPassword( int& seqNbr, const TQString if ( l.count() == 3 ) { seqNbr = l[ 2 ].toInt(); - return QPair<TQString,TQString>( l[ 0 ], l[ 1 ] ); + return TQPair<TQString,TQString>( l[ 0 ], l[ 1 ] ); } } } - return QPair<TQString,TQString>( TQString::null, TQString::null ); + return TQPair<TQString,TQString>( TQString::null, TQString::null ); } void KMFactory::initPassword( const TQString& user, const TQString& password, const TQString& host, int port ) diff --git a/kdeprint/kmfactory.h b/kdeprint/kmfactory.h index 0e9ad8021..326e5ea8b 100644 --- a/kdeprint/kmfactory.h +++ b/kdeprint/kmfactory.h @@ -50,12 +50,12 @@ class KDEPRINT_EXPORT KMFactory : public TQObject, public DCOPObject public: struct PluginInfo { - QString name; - QString comment; - QStringList detectUris; - int detectPrecedence; - QStringList mimeTypes; - QString primaryMimeType; + TQString name; + TQString comment; + TQStringList detectUris; + int detectPrecedence; + TQStringList mimeTypes; + TQString primaryMimeType; }; static KMFactory* self(); @@ -92,7 +92,7 @@ public: }; Settings* settings() const { return m_settings; } - QPair<TQString,TQString> requestPassword( int& seqNbr, const TQString& user, const TQString& host = "localhost", int port = 0 ); + TQPair<TQString,TQString> requestPassword( int& seqNbr, const TQString& user, const TQString& host = "localhost", int port = 0 ); void initPassword( const TQString& user, const TQString& password, const TQString& host = "localhsot", int port = 0 ); k_dcop: diff --git a/kdeprint/kmmanager.cpp b/kdeprint/kmmanager.cpp index 675e31bf2..4299b3718 100644 --- a/kdeprint/kmmanager.cpp +++ b/kdeprint/kmmanager.cpp @@ -163,7 +163,7 @@ bool KMManager::setDefaultPrinter(const TQString& name) bool KMManager::testPrinter(KMPrinter *prt) { // standard Test mechanism - QString testpage = testPage(); + TQString testpage = testPage(); if (testpage.isEmpty()) { setErrorMsg(i18n("Unable to locate test page.")); @@ -352,7 +352,7 @@ bool KMManager::savePrinterDriver(KMPrinter*,DrMain*) bool KMManager::uncompressFile(const TQString& filename, TQString& destname) { - QFile f(filename); + TQFile f(filename); bool result(true); destname = TQString::null; if (f.exists() && f.open(IO_ReadOnly)) @@ -458,7 +458,7 @@ bool KMManager::createSpecialPrinter(KMPrinter *p) bool KMManager::removeSpecialPrinter(KMPrinter *p) { - if (p && p->isSpecial() && m_printers.findRef(p) != -1) + if (p && p->isSpecial() && m_printers.tqfindRef(p) != -1) { m_printers.removeRef(p); return m_specialmgr->savePrinters(); @@ -473,9 +473,9 @@ bool KMManager::removeSpecialPrinter(KMPrinter *p) */ TQStringList KMManager::detectLocalPrinters() { - QStringList list; + TQStringList list; for (int i=0; i<3; i++) - list << TQString::null << TQString::tqfromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << TQString::null; + list << TQString() << TQString::tqfromLatin1("parallel:/dev/lp%1").arg(i) << i18n("Parallel Port #%1").arg(i+1) << TQString(); return list; } diff --git a/kdeprint/kmprinter.cpp b/kdeprint/kmprinter.cpp index e612c2717..f08cf4109 100644 --- a/kdeprint/kmprinter.cpp +++ b/kdeprint/kmprinter.cpp @@ -165,7 +165,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, TQWidget *parent) fName = ( printer->docName() + "." + ext ); else { - int p = fName.findRev( '.' ); + int p = fName.tqfindRev( '.' ); if ( p == -1 ) fName.append( "." ).append( ext ); else diff --git a/kdeprint/kmprinter.h b/kdeprint/kmprinter.h index 8a43e7b13..3872800ed 100644 --- a/kdeprint/kmprinter.h +++ b/kdeprint/kmprinter.h @@ -147,7 +147,7 @@ public: void setOwnSoftDefault(bool on) { m_ownsoftdefault = on; } static int compare(KMPrinter *p1, KMPrinter *p2); const TQString& option(const TQString& key) const { return m_options[key]; } - bool hasOption(const TQString& key) const { return m_options.contains(key); } + bool hasOption(const TQString& key) const { return m_options.tqcontains(key); } void setOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_options[key] = value; } void removeOption(const TQString& key) { m_options.remove(key); } TQMap<TQString,TQString> options() const { return m_options; } @@ -176,33 +176,33 @@ public: protected: // mandantory information - QString m_name; // identification name - QString m_printername; // real printer name - QString m_instancename; // instance name (human-readable) - int m_type; // printer type (any PrinterType flag OR-ed together) - PrinterState m_state; // printer state + TQString m_name; // identification name + TQString m_printername; // real printer name + TQString m_instancename; // instance name (human-readable) + int m_type; // printer type (any PrinterType flag OR-ed together) + PrinterState m_state; // printer state /** * Represent the device as a string, to provide native * support for exotic devices. Conversion to URL is done * only when really needed */ - QString m_device; // printer device + TQString m_device; // printer device // class specific information - QStringList m_members; // members of the class + TQStringList m_members; // members of the class // other useful information that should be completed by manager on demand - QString m_description; // short description, comment - QString m_location; // printer location - KURL m_uri; // URI printer identification - QString m_manufacturer; // printer manufacturer (driver) - QString m_model; // printer model (driver) - QString m_driverinfo; // short driver info (ex: nick name in PPD) + TQString m_description; // short description, comment + TQString m_location; // printer location + KURL m_uri; // URI printer identification + TQString m_manufacturer; // printer manufacturer (driver) + TQString m_model; // printer model (driver) + TQString m_driverinfo; // short driver info (ex: nick name in PPD) // DB driver entry (used when creating a printer). Internal use only !!! - KMDBEntry *m_dbentry; - DrMain *m_driver; - QString m_pixmap; + KMDBEntry *m_dbentry; + DrMain *m_driver; + TQString m_pixmap; // default flags bool m_harddefault; diff --git a/kdeprint/kmspecialmanager.cpp b/kdeprint/kmspecialmanager.cpp index bb2caea24..ba742fc78 100644 --- a/kdeprint/kmspecialmanager.cpp +++ b/kdeprint/kmspecialmanager.cpp @@ -107,11 +107,11 @@ bool KMSpecialManager::loadPrinters() if (m_loaded) return true; bool result(true); - QString localDir = KGlobal::dirs()->localkdedir(); - QStringList files = KGlobal::dirs()->findAllResources("data", "kdeprint/specials.desktop"); + TQString localDir = KGlobal::dirs()->localkdedir(); + TQStringList files = KGlobal::dirs()->findAllResources("data", "kdeprint/specials.desktop"); // local files should processed last, so we need to reorder the list // and put local files at the end - QStringList orderedFiles; + TQStringList orderedFiles; for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it) { if ((*it).startsWith(localDir)) diff --git a/kdeprint/kmthreadjob.cpp b/kdeprint/kmthreadjob.cpp index 43dcda831..02c148d95 100644 --- a/kdeprint/kmthreadjob.cpp +++ b/kdeprint/kmthreadjob.cpp @@ -50,10 +50,10 @@ TQString KMThreadJob::jobFile() bool KMThreadJob::saveJobs() { - QFile f(jobFile()); + TQFile f(jobFile()); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + TQTextStream t(&f); TQIntDictIterator<KMJob> it(m_jobs); for (;it.current();++it) t << it.current()->id() << CHARSEP << it.current()->name() << CHARSEP << it.current()->printer() << CHARSEP << it.current()->owner() << CHARSEP << it.current()->size() << endl; @@ -64,11 +64,11 @@ bool KMThreadJob::saveJobs() bool KMThreadJob::loadJobs() { - QFile f(jobFile()); + TQFile f(jobFile()); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; m_jobs.clear(); while (!t.eof()) diff --git a/kdeprint/kmuimanager.cpp b/kdeprint/kmuimanager.cpp index 53921d39f..207877f8a 100644 --- a/kdeprint/kmuimanager.cpp +++ b/kdeprint/kmuimanager.cpp @@ -143,7 +143,7 @@ void KMUiManager::setupPropertyDialog(KPrinterPropertyDialog *dlg) // retrieve the KPrinter object KPrinter *prt(0); - if (dlg->parent() && dlg->parent()->isA("KPrintDialog")) + if (dlg->parent() && dlg->tqparent()->isA("KPrintDialog")) prt = static_cast<KPrintDialog*>(dlg->parent())->printer(); // add margin page diff --git a/kdeprint/kmvirtualmanager.cpp b/kdeprint/kmvirtualmanager.cpp index 268da3eac..b5cb808b5 100644 --- a/kdeprint/kmvirtualmanager.cpp +++ b/kdeprint/kmvirtualmanager.cpp @@ -179,8 +179,8 @@ void KMVirtualManager::setAsDefault(KMPrinter *p, const TQString& name, TQWidget void KMVirtualManager::refresh() { - QFileInfo fi(TQDir::homeDirPath() + TQFile::decodeName("/.cups/.lpoptions")); - QFileInfo fi2(TQFile::decodeName("/etc/cups/lpoptions")); + TQFileInfo fi(TQDir::homeDirPath() + TQFile::decodeName("/.cups/.lpoptions")); + TQFileInfo fi2(TQFile::decodeName("/etc/cups/lpoptions")); // if root, then only use global file: trick -> use twice the same file if (getuid() == 0) @@ -246,14 +246,14 @@ void KMVirtualManager::virtualList(TQPtrList<KMPrinter>& list, const TQString& p void KMVirtualManager::loadFile(const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); + TQTextStream t(&f); - QString line; - QStringList words; - QStringList pair; + TQString line; + TQStringList words; + TQStringList pair; KMPrinter *printer, *realprinter; while (!t.eof()) @@ -317,10 +317,10 @@ void KMVirtualManager::triggerSave() void KMVirtualManager::saveFile(const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + TQTextStream t(&f); TQPtrListIterator<KMPrinter> it(m_manager->m_printers); for (;it.current();++it) { @@ -347,7 +347,7 @@ void KMVirtualManager::saveFile(const TQString& filename) bool KMVirtualManager::testInstance(KMPrinter *p) { - QString testpage = KMManager::self()->testPage(); + TQString testpage = KMManager::self()->testPage(); if (testpage.isEmpty()) return false; else diff --git a/kdeprint/kpcopiespage.cpp b/kdeprint/kpcopiespage.cpp index 994e9ea61..2079bc0f1 100644 --- a/kdeprint/kpcopiespage.cpp +++ b/kdeprint/kpcopiespage.cpp @@ -164,7 +164,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name) setId(KPrinter::CopiesPage); // widget creation - QButtonGroup *m_pagebox = new TQButtonGroup(0, Qt::Vertical, i18n("Page Selection"), this); + TQButtonGroup *m_pagebox = new TQButtonGroup(0, Qt::Vertical, i18n("Page Selection"), this); TQWhatsThis::add(m_pagebox, whatsThisPageSelectionLabel); m_all = new TQRadioButton(i18n("&All"), m_pagebox); TQWhatsThis::add(m_all, whatsThisAllPagesLabel); @@ -177,9 +177,9 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name) connect(m_range, TQT_SIGNAL(clicked()), m_rangeedit, TQT_SLOT(setFocus())); TQToolTip::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>")); // TQWhatsThis::add(m_rangeedit, i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>")); - //QLabel *m_rangeexpl = new TQLabel(m_pagebox); + //TQLabel *m_rangeexpl = new TQLabel(m_pagebox); //m_rangeexpl->setText(i18n("<p>Enter pages or group of pages to print separated by commas (1,2-5,8).</p>")); - QGroupBox *m_copybox = new TQGroupBox(0, Qt::Vertical, i18n("Output Settings"), this); + TQGroupBox *m_copybox = new TQGroupBox(0, Qt::Vertical, i18n("Output Settings"), this); TQWhatsThis::add(m_copybox, whatsThisCopiesLabel); m_collate = new TQCheckBox(i18n("Co&llate"), m_copybox); TQWhatsThis::add(m_collate, whatsThisCollateLabel); @@ -188,7 +188,7 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name) m_collatepix = new TQLabel(m_copybox); m_collatepix->tqsetAlignment(Qt::AlignCenter); m_collatepix->setMinimumHeight(70); - QLabel *m_copieslabel = new TQLabel(i18n("Cop&ies:"), m_copybox); + TQLabel *m_copieslabel = new TQLabel(i18n("Cop&ies:"), m_copybox); m_copies = new TQSpinBox(m_copybox); m_copies->setRange(1,999); TQWhatsThis::add(m_copies, whatsThisNumberOfCopiesLabel); @@ -199,10 +199,10 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name) m_pageset->insertItem(i18n("Odd Pages")); m_pageset->insertItem(i18n("Even Pages")); TQWhatsThis::add(m_pageset, whatsThisPageSetLabel); - QLabel *m_pagesetlabel = new TQLabel(i18n("Page &set:"), m_pagebox); + TQLabel *m_pagesetlabel = new TQLabel(i18n("Page &set:"), m_pagebox); m_pagesetlabel->setBuddy(m_pageset); TQWhatsThis::add(m_pagesetlabel, whatsThisPageSetLabel); - KSeparator *sepline = new KSeparator(Horizontal, m_pagebox); + KSeparator *sepline = new KSeparator(Qt::Horizontal, m_pagebox); sepline->setMinimumHeight(10); TQWidget::setTabOrder( m_all, m_current ); @@ -214,26 +214,26 @@ KPCopiesPage::KPCopiesPage(KPrinter *prt, TQWidget *parent, const char *name) TQWidget::setTabOrder( m_collate, m_order ); // layout creation - QGridLayout *l1 = new TQGridLayout(this, 2, 2, 0, 5); + TQGridLayout *l1 = new TQGridLayout(this, 2, 2, 0, 5); l1->setRowStretch(1,1); l1->setColStretch(0,1); l1->setColStretch(1,1); l1->addWidget(m_pagebox,0,0); l1->addWidget(m_copybox,0,1); - QVBoxLayout *l3 = new TQVBoxLayout(m_pagebox->layout(), 5); + TQVBoxLayout *l3 = new TQVBoxLayout(TQT_TQLAYOUT(m_pagebox->layout()), 5); l3->addWidget(m_all); l3->addWidget(m_current); - QHBoxLayout *l4 = new TQHBoxLayout(0, 0, 5); + TQHBoxLayout *l4 = new TQHBoxLayout(0, 0, 5); l3->addLayout(l4); l4->addWidget(m_range,0); l4->addWidget(m_rangeedit,1); //l3->addWidget(m_rangeexpl); l3->addWidget(sepline); - QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 5); + TQHBoxLayout *l2 = new TQHBoxLayout(0, 0, 5); l3->addLayout(l2); l2->addWidget(m_pagesetlabel,0); l2->addWidget(m_pageset,1); - QGridLayout *l5 = new TQGridLayout(m_copybox->layout(), 4, 2, 10); + TQGridLayout *l5 = new TQGridLayout(m_copybox->layout(), 4, 2, 10); l5->setRowStretch(4,1); l5->addWidget(m_copieslabel,0,0); l5->addWidget(m_copies,0,1); @@ -270,7 +270,7 @@ void KPCopiesPage::slotRangeEntered() void KPCopiesPage::slotCollateClicked() { - QString s("kdeprint_"); + TQString s("kdeprint_"); s.append((m_collate->isChecked() ? "collate" : "uncollate")); if (m_order->isChecked()) s.append("_reverse"); m_collatepix->setPixmap(UserIcon(s)); @@ -295,7 +295,7 @@ void KPCopiesPage::initialize(bool usePlugin) void KPCopiesPage::setOptions(const TQMap<TQString,TQString>& options) { - QString value; + TQString value; // copies value = options["kde-copies"]; if (!value.isEmpty()) m_copies->setValue(value.toInt()); diff --git a/kdeprint/kpcopiespage.h b/kdeprint/kpcopiespage.h index 7dfaa5f3d..9aff7ef8d 100644 --- a/kdeprint/kpcopiespage.h +++ b/kdeprint/kpcopiespage.h @@ -50,12 +50,12 @@ protected: void reload(); protected: - QRadioButton *m_all, *m_current, *m_range; - QLineEdit *m_rangeedit; - QComboBox *m_pageset; - QCheckBox *m_collate, *m_order; - QSpinBox *m_copies; - QLabel *m_collatepix; + TQRadioButton *m_all, *m_current, *m_range; + TQLineEdit *m_rangeedit; + TQComboBox *m_pageset; + TQCheckBox *m_collate, *m_order; + TQSpinBox *m_copies; + TQLabel *m_collatepix; bool m_useplugin; KPrinter *m_printer; diff --git a/kdeprint/kpdriverpage.cpp b/kdeprint/kpdriverpage.cpp index e3d04c0a3..a7dd2b61d 100644 --- a/kdeprint/kpdriverpage.cpp +++ b/kdeprint/kpdriverpage.cpp @@ -33,7 +33,7 @@ KPDriverPage::KPDriverPage(KMPrinter *p, DrMain *d, TQWidget *parent, const char m_view->setAllowFixed(false); if (driver()) m_view->setDriver(driver()); - QVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 0); + TQVBoxLayout *lay1 = new TQVBoxLayout(this, 0, 0); lay1->addWidget(m_view); } diff --git a/kdeprint/kpfileselectpage.cpp b/kdeprint/kpfileselectpage.cpp index 5292c613f..54ccfdd6b 100644 --- a/kdeprint/kpfileselectpage.cpp +++ b/kdeprint/kpfileselectpage.cpp @@ -35,7 +35,7 @@ KPFileSelectPage::KPFileSelectPage(TQWidget *parent, const char *name) m_files = new KFileList(this); - QHBoxLayout *l0 = new TQHBoxLayout(this, 0, 10); + TQHBoxLayout *l0 = new TQHBoxLayout(this, 0, 10); l0->addWidget(m_files); resize(100, 100); @@ -47,7 +47,7 @@ void KPFileSelectPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) // and we want to do it only once if (!incldef) { - QStringList l = m_files->fileList(); + TQStringList l = m_files->fileList(); opts["kde-filelist"] = l.join("@@"); } } @@ -57,7 +57,7 @@ void KPFileSelectPage::setOptions(const TQMap<TQString,TQString>& opts) // do it only once as files will only be selected there if (m_first) { - QStringList l = TQStringList::split("@@", opts["kde-filelist"], false); + TQStringList l = TQStringList::split("@@", opts["kde-filelist"], false); m_files->setFileList(l); m_first = false; diff --git a/kdeprint/kpfilterpage.cpp b/kdeprint/kpfilterpage.cpp index 882a81923..3b3bc6164 100644 --- a/kdeprint/kpfilterpage.cpp +++ b/kdeprint/kpfilterpage.cpp @@ -174,9 +174,9 @@ KPFilterPage::KPFilterPage(TQWidget *parent, const char *name) m_info->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); m_info->setMinimumSize( TQSize( 240, 100 ) ); - QGridLayout *l1 = new TQGridLayout(this, 2, 2, 0, KDialog::spacingHint()); + TQGridLayout *l1 = new TQGridLayout(this, 2, 2, 0, KDialog::spacingHint()); l1->setColStretch(0, 1); - QVBoxLayout *l2 = new TQVBoxLayout(0, 0, 1); + TQVBoxLayout *l2 = new TQVBoxLayout(0, 0, 1); l1->addWidget(m_view, 0, 0); l1->addLayout(l2, 0, 1); l2->addWidget(m_add); @@ -199,7 +199,7 @@ KPFilterPage::~KPFilterPage() void KPFilterPage::updateButton() { -/* QListViewItem *item = m_view->currentItem(); +/* TQListViewItem *item = m_view->currentItem(); bool state=(item!=0); m_remove->setEnabled(state); m_up->setEnabled((state && item->itemAbove() != 0)); @@ -216,9 +216,9 @@ void KPFilterPage::slotAddClicked() { KXmlCommand *cmd = KXmlCommandManager::self()->loadCommand(choice); if (!cmd) return; // Error - QStringList filters = activeList(); + TQStringList filters = activeList(); int pos = KXmlCommandManager::self()->insertCommand(filters, cmd->name()); - QListViewItem *prev(0); + TQListViewItem *prev(0); if (pos > 0) { prev = m_view->firstChild(); @@ -226,7 +226,7 @@ void KPFilterPage::slotAddClicked() prev = prev->nextSibling(); } m_activefilters.insert(cmd->name(), cmd); - QListViewItem *item = new TQListViewItem(m_view, prev, cmd->description(), cmd->name()); + TQListViewItem *item = new TQListViewItem(m_view, prev, cmd->description(), cmd->name()); item->setPixmap(0, SmallIcon("filter")); checkFilterChain(); } @@ -236,7 +236,7 @@ void KPFilterPage::slotRemoveClicked() { if (m_view->selectedItem()) { - QString idname = m_view->selectedItem()->text(1); + TQString idname = m_view->selectedItem()->text(1); delete m_view->selectedItem(); m_activefilters.remove(idname); checkFilterChain(); @@ -248,10 +248,10 @@ void KPFilterPage::slotRemoveClicked() void KPFilterPage::slotUpClicked() { - QListViewItem *item = m_view->selectedItem(); + TQListViewItem *item = m_view->selectedItem(); if (item && item->itemAbove()) { - QListViewItem *clone = new TQListViewItem(m_view,item->itemAbove()->itemAbove(),item->text(0),item->text(1)); + TQListViewItem *clone = new TQListViewItem(m_view,item->itemAbove()->itemAbove(),item->text(0),item->text(1)); clone->setPixmap(0, SmallIcon("filter")); delete item; m_view->setSelected(clone, true); @@ -261,10 +261,10 @@ void KPFilterPage::slotUpClicked() void KPFilterPage::slotDownClicked() { - QListViewItem *item = m_view->selectedItem(); + TQListViewItem *item = m_view->selectedItem(); if (item && item->itemBelow()) { - QListViewItem *clone = new TQListViewItem(m_view,item->itemBelow(),item->text(0),item->text(1)); + TQListViewItem *clone = new TQListViewItem(m_view,item->itemBelow(),item->text(0),item->text(1)); clone->setPixmap(0, SmallIcon("filter")); delete item; m_view->setSelected(clone, true); @@ -290,7 +290,7 @@ void KPFilterPage::slotItemSelected(TQListViewItem *item) void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts) { - QStringList filters = TQStringList::split(',',opts["_kde-filters"],false); + TQStringList filters = TQStringList::split(',',opts["_kde-filters"],false); // remove unneeded filters TQDictIterator<KXmlCommand> dit(m_activefilters); for (;dit.current();) @@ -305,7 +305,7 @@ void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts) } // add needed filters m_view->clear(); - QListViewItem *item(0); + TQListViewItem *item(0); for (TQStringList::ConstIterator sit=filters.begin(); sit!=filters.end(); ++sit) { KXmlCommand *f(0); @@ -326,7 +326,7 @@ void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts) void KPFilterPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) { - QStringList filters = activeList(); + TQStringList filters = activeList(); for (TQStringList::ConstIterator it=filters.begin(); it!=filters.end(); ++it) { KXmlCommand *f = m_activefilters.tqfind(*it); @@ -341,8 +341,8 @@ void KPFilterPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) TQStringList KPFilterPage::activeList() { - QStringList list; - QListViewItem *item = m_view->firstChild(); + TQStringList list; + TQListViewItem *item = m_view->firstChild(); while (item) { list.append(item->text(1)); @@ -361,7 +361,7 @@ KXmlCommand* KPFilterPage::currentFilter() void KPFilterPage::checkFilterChain() { - QListViewItem *item = m_view->firstChild(); + TQListViewItem *item = m_view->firstChild(); bool ok(true); m_valid = true; while (item) @@ -398,11 +398,11 @@ bool KPFilterPage::isValid(TQString& msg) void KPFilterPage::updateInfo() { - QString txt; + TQString txt; KXmlCommand *f = currentFilter(); if (f) { - QString templ("<b>%1:</b> %2<br>"); + TQString templ("<b>%1:</b> %2<br>"); txt.append(templ.arg(i18n("Name")).arg(f->name())); txt.append(templ.arg(i18n("Requirements")).arg(f->requirements().join(", "))); txt.append(templ.arg(i18n("Input")).arg(f->inputMimeTypes().join(", "))); diff --git a/kdeprint/kpfilterpage.h b/kdeprint/kpfilterpage.h index ab8909f78..83368e1d4 100644 --- a/kdeprint/kpfilterpage.h +++ b/kdeprint/kpfilterpage.h @@ -58,11 +58,11 @@ protected: void updateButton(); private: KListView *m_view; - QStringList m_filters; // <idname,description> pairs + TQStringList m_filters; // <idname,description> pairs TQDict<KXmlCommand> m_activefilters; - QToolButton *m_add, *m_remove, *m_up, *m_down, *m_configure; + TQToolButton *m_add, *m_remove, *m_up, *m_down, *m_configure; bool m_valid; - QTextBrowser *m_info; + TQTextBrowser *m_info; }; #endif diff --git a/kdeprint/kpgeneralpage.cpp b/kdeprint/kpgeneralpage.cpp index bd7c42283..272d97119 100644 --- a/kdeprint/kpgeneralpage.cpp +++ b/kdeprint/kpgeneralpage.cpp @@ -24,6 +24,7 @@ #include <tqcombobox.h> #include <tqlabel.h> +#include <tqbutton.h> #include <tqbuttongroup.h> #include <tqlayout.h> #include <tqradiobutton.h> @@ -260,15 +261,15 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const setTitle(i18n("General")); // widget creation - QLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this); + TQLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this); m_pagesizelabel->tqsetAlignment(Qt::AlignVCenter|Qt::AlignRight); TQWhatsThis::add(m_pagesizelabel, whatsThisGeneralPageSizeLabel); - QLabel *m_papertypelabel = new TQLabel(i18n("Paper t&ype:"), this); + TQLabel *m_papertypelabel = new TQLabel(i18n("Paper t&ype:"), this); m_papertypelabel->tqsetAlignment(Qt::AlignVCenter|Qt::AlignRight); TQWhatsThis::add(m_papertypelabel, whatsThisGeneralPaperTypeLabel); - QLabel *m_inputslotlabel = new TQLabel(i18n("Paper so&urce:"), this); + TQLabel *m_inputslotlabel = new TQLabel(i18n("Paper so&urce:"), this); m_inputslotlabel->tqsetAlignment(Qt::AlignVCenter|Qt::AlignRight); TQWhatsThis::add(m_inputslotlabel, whatsThisGeneralPaperSourceLabel); @@ -297,42 +298,42 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const m_bannerbox = new TQGroupBox(0, Qt::Vertical, i18n("Banners"), this); TQWhatsThis::add(m_bannerbox, whatsThisGeneralBannersLabel); - QRadioButton *m_portrait = new TQRadioButton(i18n("&Portrait"), m_orientbox); - QRadioButton *m_landscape = new TQRadioButton(i18n("&Landscape"), m_orientbox); - QRadioButton *m_revland = new TQRadioButton(i18n("&Reverse landscape"), m_orientbox); - QRadioButton *m_revport = new TQRadioButton(i18n("R&everse portrait"), m_orientbox); + TQRadioButton *m_portrait = new TQRadioButton(i18n("&Portrait"), m_orientbox); + TQRadioButton *m_landscape = new TQRadioButton(i18n("&Landscape"), m_orientbox); + TQRadioButton *m_revland = new TQRadioButton(i18n("&Reverse landscape"), m_orientbox); + TQRadioButton *m_revport = new TQRadioButton(i18n("R&everse portrait"), m_orientbox); m_portrait->setChecked(true); m_orientpix = new TQLabel(m_orientbox); m_orientpix->tqsetAlignment(Qt::AlignCenter); - QRadioButton *m_dupnone = new TQRadioButton(i18n("duplex orientation", "&None"), m_duplexbox); - QRadioButton *m_duplong = new TQRadioButton(i18n("duplex orientation", "Lon&g side"), m_duplexbox); - QRadioButton *m_dupshort = new TQRadioButton(i18n("duplex orientation", "S&hort side"), m_duplexbox); + TQRadioButton *m_dupnone = new TQRadioButton(i18n("duplex orientation", "&None"), m_duplexbox); + TQRadioButton *m_duplong = new TQRadioButton(i18n("duplex orientation", "Lon&g side"), m_duplexbox); + TQRadioButton *m_dupshort = new TQRadioButton(i18n("duplex orientation", "S&hort side"), m_duplexbox); m_dupnone->setChecked(true); m_duplexpix = new TQLabel(m_duplexbox); m_duplexpix->tqsetAlignment(Qt::AlignCenter); - QRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox); - QRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox); - QRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox); + TQRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox); + TQRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox); + TQRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox); m_nup1->setChecked(true); m_nuppix = new TQLabel(m_nupbox); m_nuppix->tqsetAlignment(Qt::AlignCenter); m_startbanner = new TQComboBox(m_bannerbox); m_endbanner = new TQComboBox(m_bannerbox); - QLabel *m_startbannerlabel = new TQLabel(i18n("S&tart:"), m_bannerbox); - QLabel *m_endbannerlabel = new TQLabel(i18n("En&d:"), m_bannerbox); + TQLabel *m_startbannerlabel = new TQLabel(i18n("S&tart:"), m_bannerbox); + TQLabel *m_endbannerlabel = new TQLabel(i18n("En&d:"), m_bannerbox); m_startbannerlabel->setBuddy(m_startbanner); m_endbannerlabel->setBuddy(m_endbanner); // layout creation - QVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *lay0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); TQWhatsThis::add(this, whatsThisPrintPropertiesGeneralPage); - QGridLayout *lay1 = new TQGridLayout(0, 3, 2, 0, KDialog::spacingHint()); - QGridLayout *lay2 = new TQGridLayout(0, 2, 2, 0, KDialog::spacingHint()); + TQGridLayout *lay1 = new TQGridLayout(0, 3, 2, 0, KDialog::spacingHint()); + TQGridLayout *lay2 = new TQGridLayout(0, 2, 2, 0, KDialog::spacingHint()); lay0->addStretch(1); - lay0->addLayout(lay1); + lay0->addLayout(TQT_TQLAYOUT(lay1)); lay0->addStretch(1); - lay0->addLayout(lay2); + lay0->addLayout(TQT_TQLAYOUT(lay2)); lay0->addStretch(2); lay1->addWidget(m_pagesizelabel, 0, 0); lay1->addWidget(m_papertypelabel, 1, 0); @@ -346,27 +347,27 @@ KPGeneralPage::KPGeneralPage(KMPrinter *pr, DrMain *dr, TQWidget *parent, const lay2->addWidget(m_nupbox, 1, 1); lay2->setColStretch(0, 1); lay2->setColStretch(1, 1); - QGridLayout *lay3 = new TQGridLayout(m_orientbox->layout(), 4, 2, + TQGridLayout *lay3 = new TQGridLayout(m_orientbox->layout(), 4, 2, KDialog::spacingHint()); lay3->addWidget(m_portrait, 0, 0); lay3->addWidget(m_landscape, 1, 0); lay3->addWidget(m_revland, 2, 0); lay3->addWidget(m_revport, 3, 0); lay3->addMultiCellWidget(m_orientpix, 0, 3, 1, 1); - QGridLayout *lay4 = new TQGridLayout(m_duplexbox->layout(), 3, 2, + TQGridLayout *lay4 = new TQGridLayout(m_duplexbox->layout(), 3, 2, KDialog::spacingHint()); lay4->addWidget(m_dupnone, 0, 0); lay4->addWidget(m_duplong, 1, 0); lay4->addWidget(m_dupshort, 2, 0); lay4->addMultiCellWidget(m_duplexpix, 0, 2, 1, 1); lay4->setRowStretch( 0, 1 ); - QGridLayout *lay5 = new TQGridLayout(m_nupbox->layout(), 3, 2, + TQGridLayout *lay5 = new TQGridLayout(m_nupbox->layout(), 3, 2, KDialog::spacingHint()); lay5->addWidget(m_nup1, 0, 0); lay5->addWidget(m_nup2, 1, 0); lay5->addWidget(m_nup4, 2, 0); lay5->addMultiCellWidget(m_nuppix, 0, 2, 1, 1); - QGridLayout *lay6 = new TQGridLayout(m_bannerbox->layout(), 2, 2, + TQGridLayout *lay6 = new TQGridLayout(m_bannerbox->layout(), 2, 2, KDialog::spacingHint()); lay6->addWidget(m_startbannerlabel, 0, 0); lay6->addWidget(m_endbannerlabel, 1, 0); @@ -408,12 +409,12 @@ void KPGeneralPage::initialize() if ( opt->choices()->count() == 2 ) { // probably a On/Off option instead of the standard PS one - TQButton *btn = m_duplexbox->find( DUPLEX_SHORT_ID ); + TQButton *btn = static_cast<TQButton*>(m_duplexbox->find( DUPLEX_SHORT_ID )); m_duplexbox->remove( btn ); btn->hide(); //delete btn; - m_duplexbox->find( DUPLEX_NONE_ID )->setText( i18n( "Disabled" ) ); - m_duplexbox->find( DUPLEX_LONG_ID )->setText( i18n( "Enabled" ) ); + static_cast<TQButton*>(m_duplexbox->find( DUPLEX_NONE_ID ))->setText( i18n( "Disabled" ) ); + static_cast<TQButton*>(m_duplexbox->find( DUPLEX_LONG_ID ))->setText( i18n( "Enabled" ) ); m_duplexpix->hide(); } if (opt->currentChoice()) @@ -439,7 +440,7 @@ void KPGeneralPage::initialize() for ( int i=HIGHSIZE_BEGIN+1; i<DEFAULT_SIZE; i+=2 ) m_pagesize->insertItem(i18n(default_size[i])); // set default page size using locale settings - QString psname = pageSizeToPageName((KPrinter::PageSize)(KGlobal::locale()->pageSize())); + TQString psname = pageSizeToPageName((KPrinter::PageSize)(KGlobal::locale()->pageSize())); int index = findOption(default_size, DEFAULT_SIZE, psname); if (index >= 0) m_pagesize->setCurrentItem(index); @@ -455,7 +456,7 @@ void KPGeneralPage::initialize() } // Banners - QStringList values = TQStringList::split(',',printer()->option("kde-banners-supported"),false); + TQStringList values = TQStringList::split(',',printer()->option("kde-banners-supported"),false); if (values.count() > 0) { for (TQStringList::ConstIterator it = values.begin(); it != values.end(); ++it) @@ -477,12 +478,12 @@ void KPGeneralPage::initialize() void KPGeneralPage::setOptions(const TQMap<TQString,TQString>& opts) { - QString value; + TQString value; if (driver()) { value = opts["media"]; - QStringList l = TQStringList::split(',',value,false); + TQStringList l = TQStringList::split(',',value,false); for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { value = *it; @@ -546,7 +547,7 @@ void KPGeneralPage::setOptions(const TQMap<TQString,TQString>& opts) if (!value.isEmpty()) { int index(-1); - QStringList l = TQStringList::split(',',value,false); + TQStringList l = TQStringList::split(',',value,false); for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { value = *it; @@ -575,7 +576,7 @@ void KPGeneralPage::setOptions(const TQMap<TQString,TQString>& opts) value = opts["job-sheets"]; if (!value.isEmpty()) { - QStringList l = TQStringList::split(',',value,false); + TQStringList l = TQStringList::split(',',value,false); if (l.count() > 0) setComboItem(m_startbanner,l[0]); if (l.count() > 1) setComboItem(m_endbanner,l[1]); } @@ -598,7 +599,7 @@ void KPGeneralPage::setOptions(const TQMap<TQString,TQString>& opts) if (!value.isEmpty()) { bool ok; - int ID = QMIN(value.toInt(&ok)-1,2); + int ID = TQMIN(value.toInt(&ok)-1,2); if (ok) { m_nupbox->setButton(ID); @@ -614,7 +615,7 @@ void KPGeneralPage::setOptions(const TQMap<TQString,TQString>& opts) void KPGeneralPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) { - QString value; + TQString value; if (driver()) { @@ -680,7 +681,7 @@ void KPGeneralPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) if (m_bannerbox->isEnabled()) { - QStringList l = TQStringList::split(',',printer()->option("kde-banners"),false); + TQStringList l = TQStringList::split(',',printer()->option("kde-banners"),false); if (incldef || (l.count() == 2 && (l[0] != m_startbanner->currentText() || l[1] != m_endbanner->currentText())) || (l.count() == 0 && (m_startbanner->currentText() != "none" || m_endbanner->currentText() != "none"))) { @@ -692,7 +693,7 @@ void KPGeneralPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) void KPGeneralPage::slotOrientationChanged(int ID) { - QString iconstr; + TQString iconstr; switch (ID) { case ORIENT_PORTRAIT_ID: iconstr = "kdeprint_portrait"; break; @@ -706,7 +707,7 @@ void KPGeneralPage::slotOrientationChanged(int ID) void KPGeneralPage::slotNupChanged(int ID) { - QString iconstr; + TQString iconstr; switch (ID) { case NUP_1_ID: iconstr = "kdeprint_nup1"; break; @@ -721,7 +722,7 @@ void KPGeneralPage::slotDuplexChanged(int ID) { if (m_duplexbox->isEnabled()) { - QString iconstr; + TQString iconstr; switch (ID) { case DUPLEX_NONE_ID: iconstr = "kdeprint_duplex_none"; break; diff --git a/kdeprint/kpgeneralpage.h b/kdeprint/kpgeneralpage.h index df8490933..643b19b59 100644 --- a/kdeprint/kpgeneralpage.h +++ b/kdeprint/kpgeneralpage.h @@ -47,11 +47,11 @@ protected slots: void slotNupChanged(int); protected: - QComboBox *m_pagesize, *m_papertype, *m_inputslot; - QComboBox *m_startbanner, *m_endbanner; - QButtonGroup *m_orientbox, *m_duplexbox, *m_nupbox; - QGroupBox *m_bannerbox; - QLabel *m_orientpix, *m_duplexpix, *m_nuppix; + TQComboBox *m_pagesize, *m_papertype, *m_inputslot; + TQComboBox *m_startbanner, *m_endbanner; + TQButtonGroup *m_orientbox, *m_duplexbox, *m_nupbox; + TQGroupBox *m_bannerbox; + TQLabel *m_orientpix, *m_duplexpix, *m_nuppix; }; #endif diff --git a/kdeprint/kpmarginpage.cpp b/kdeprint/kpmarginpage.cpp index 9b91ce56f..309a3dfd2 100644 --- a/kdeprint/kpmarginpage.cpp +++ b/kdeprint/kpmarginpage.cpp @@ -42,13 +42,13 @@ KPMarginPage::KPMarginPage(KPrinter *prt, DrMain *driver, TQWidget *parent, cons setTitle(i18n("Margins")); m_usedriver = true; - QGroupBox *box = new TQGroupBox(1, Qt::Vertical, i18n("Margins"), this); + TQGroupBox *box = new TQGroupBox(1, Qt::Vertical, i18n("Margins"), this); m_margin = new MarginWidget(box, "MarginWidget", (m_printer != 0)); //m_margin->setSymetricMargins(true); //if (m_printer) // m_margin->setResolution(m_printer->resolution()); - QVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10); l0->addWidget(box); l0->addStretch(1); } @@ -60,10 +60,10 @@ KPMarginPage::~KPMarginPage() void KPMarginPage::initPageSize(const TQString& ps, bool landscape) { // first retrieve the Qt values for page size and margins - QPrinter prt(TQPrinter::PrinterResolution); + TQPrinter prt(TQPrinter::PrinterResolution); prt.setFullPage(true); prt.setPageSize((TQPrinter::PageSize)(ps.isEmpty() ? KGlobal::locale()->pageSize() : ps.toInt())); - QPaintDeviceMetrics metrics(&prt); + TQPaintDeviceMetrics metrics(&prt); float w = metrics.width(); float h = metrics.height(); unsigned int it, il, ib, ir; diff --git a/kdeprint/kpposterpage.cpp b/kdeprint/kpposterpage.cpp index bc95bfa10..eef927f11 100644 --- a/kdeprint/kpposterpage.cpp +++ b/kdeprint/kpposterpage.cpp @@ -302,7 +302,7 @@ void KPPosterPage::getOptions( TQMap<TQString,TQString>& opts, bool ) } else { - if ( !o.contains( "poster" ) ) + if ( !o.tqcontains( "poster" ) ) o.append( "poster" ); opts[ "_kde-filters" ] = o.join( "," ); opts[ "_kde-poster-media" ] = m_mediasize->text(); diff --git a/kdeprint/kpqtpage.cpp b/kdeprint/kpqtpage.cpp index b13ba8d6d..92337f399 100644 --- a/kdeprint/kpqtpage.cpp +++ b/kdeprint/kpqtpage.cpp @@ -115,40 +115,40 @@ void KPQtPage::init() // widget creation m_pagesize = new TQComboBox(this); TQWhatsThis::add(m_pagesize, whatsThisPageSizeOtPageLabel); - QLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this); + TQLabel *m_pagesizelabel = new TQLabel(i18n("Page s&ize:"), this); m_pagesizelabel->tqsetAlignment(Qt::AlignVCenter|Qt::AlignRight); m_pagesizelabel->setBuddy(m_pagesize); m_orientbox = new TQButtonGroup(0, Qt::Vertical, i18n("Orientation"), this); TQWhatsThis::add(m_orientbox, whatsThisOrientationOtPageLabel); m_colorbox = new TQButtonGroup(0, Qt::Vertical, i18n("Color Mode"), this); TQWhatsThis::add(m_colorbox, whatsThisColorModeOtPageLabel); - QRadioButton *m_portrait = new TQRadioButton(i18n("&Portrait"), m_orientbox); + TQRadioButton *m_portrait = new TQRadioButton(i18n("&Portrait"), m_orientbox); TQWhatsThis::add(m_portrait, whatsThisOrientationOtPageLabel); - QRadioButton *m_landscape = new TQRadioButton(i18n("&Landscape"), m_orientbox); + TQRadioButton *m_landscape = new TQRadioButton(i18n("&Landscape"), m_orientbox); TQWhatsThis::add(m_landscape, whatsThisOrientationOtPageLabel); m_orientpix = new TQLabel(m_orientbox); m_orientpix->tqsetAlignment(Qt::AlignCenter); TQWhatsThis::add(m_orientpix, whatsThisOrientationOtPageLabel); - QRadioButton *m_color = new TQRadioButton(i18n("Colo&r"), m_colorbox); + TQRadioButton *m_color = new TQRadioButton(i18n("Colo&r"), m_colorbox); TQWhatsThis::add(m_color, whatsThisColorModeOtPageLabel); - QRadioButton *m_grayscale = new TQRadioButton(i18n("&Grayscale"), m_colorbox); + TQRadioButton *m_grayscale = new TQRadioButton(i18n("&Grayscale"), m_colorbox); m_colorpix = new TQLabel(m_colorbox); m_colorpix->tqsetAlignment(Qt::AlignCenter); TQWhatsThis::add(m_colorpix, whatsThisColorModeOtPageLabel); m_nupbox = new TQButtonGroup(0, Qt::Vertical, i18n("Pages per Sheet"), this); // TQWhatsThis::add(m_nupbox, whatsThisPagesPerSheetOtPageLabel); - QRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox); + TQRadioButton *m_nup1 = new TQRadioButton("&1", m_nupbox); TQWhatsThis::add(m_nup1, whatsThisPagesPerSheetOtPageLabel); - QRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox); + TQRadioButton *m_nup2 = new TQRadioButton("&2", m_nupbox); TQWhatsThis::add(m_nup2, whatsThisPagesPerSheetOtPageLabel); - QRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox); + TQRadioButton *m_nup4 = new TQRadioButton("&4", m_nupbox); TQWhatsThis::add(m_nup4, whatsThisPagesPerSheetOtPageLabel); - QRadioButton *m_nupother = new TQRadioButton(i18n("Ot&her"), m_nupbox); + TQRadioButton *m_nupother = new TQRadioButton(i18n("Ot&her"), m_nupbox); TQWhatsThis::add(m_nupother, whatsThisPagesPerSheetOtPageLabel); m_nuppix = new TQLabel(m_nupbox); @@ -156,7 +156,7 @@ void KPQtPage::init() TQWhatsThis::add(m_nuppix, whatsThisPagesPerSheetOtPageLabel); // layout creation - QGridLayout *lay0 = new TQGridLayout(this, 3, 2, 0, 10); + TQGridLayout *lay0 = new TQGridLayout(this, 3, 2, 0, 10); lay0->setRowStretch(1,1); lay0->setRowStretch(2,1); lay0->addWidget(m_pagesizelabel,0,0); @@ -164,15 +164,15 @@ void KPQtPage::init() lay0->addWidget(m_orientbox,1,0); lay0->addWidget(m_colorbox,1,1); lay0->addWidget(m_nupbox,2,0); - QGridLayout *lay1 = new TQGridLayout(m_orientbox->layout(), 2, 2, 10); + TQGridLayout *lay1 = new TQGridLayout(m_orientbox->layout(), 2, 2, 10); lay1->addWidget(m_portrait,0,0); lay1->addWidget(m_landscape,1,0); lay1->addMultiCellWidget(m_orientpix,0,1,1,1); - QGridLayout *lay2 = new TQGridLayout(m_colorbox->layout(), 2, 2, 10); + TQGridLayout *lay2 = new TQGridLayout(m_colorbox->layout(), 2, 2, 10); lay2->addWidget(m_color,0,0); lay2->addWidget(m_grayscale,1,0); lay2->addMultiCellWidget(m_colorpix,0,1,1,1); - QGridLayout *lay3 = new TQGridLayout(m_nupbox->layout(), 4, 2, 5); + TQGridLayout *lay3 = new TQGridLayout(m_nupbox->layout(), 4, 2, 5); lay3->addWidget(m_nup1,0,0); lay3->addWidget(m_nup2,1,0); lay3->addWidget(m_nup4,2,0); @@ -262,7 +262,7 @@ void KPQtPage::setOptions(const TQMap<TQString,TQString>& opts) DrListOption *opt = static_cast<DrListOption*>(driver()->findOption("PageSize")); DrBase *ch = opt->findChoice(val); if (ch) - m_pagesize->setCurrentItem(opt->choices()->findRef(ch)); + m_pagesize->setCurrentItem(opt->choices()->tqfindRef(ch)); } } else if (!opts["kde-pagesize"].isEmpty()) @@ -270,7 +270,7 @@ void KPQtPage::setOptions(const TQMap<TQString,TQString>& opts) ID = NUP_1; if (opts["_kde-filters"].tqfind("psnup") != -1) { - if (opts.contains("_kde-psnup-nup")) { + if (opts.tqcontains("_kde-psnup-nup")) { ID = opts["_kde-psnup-nup"].toInt(); if (ID == 1 || ID == 2 || ID == 4) { @@ -315,7 +315,7 @@ void KPQtPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) else opts["kde-pagesize"] = TQString::number(page_sizes[m_pagesize->currentItem()].ID); int ID = m_nupbox->id(m_nupbox->selected()); - QString s = opts["_kde-filters"]; + TQString s = opts["_kde-filters"]; if (ID == NUP_1) { opts.remove("_kde-psnup-nup"); @@ -325,7 +325,7 @@ void KPQtPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) int nup(ID == NUP_2 ? 2 : 4); if (s.tqfind("psnup") == -1) { - QStringList fl = TQStringList::split(',', s, false); + TQStringList fl = TQStringList::split(',', s, false); KXmlCommandManager::self()->insertCommand(fl, "psnup"); s = fl.join(","); } diff --git a/kdeprint/kpqtpage.h b/kdeprint/kpqtpage.h index c9e770945..723f35e04 100644 --- a/kdeprint/kpqtpage.h +++ b/kdeprint/kpqtpage.h @@ -49,9 +49,9 @@ protected: void init(); protected: - QButtonGroup *m_orientbox, *m_colorbox, *m_nupbox; - QComboBox *m_pagesize; - QLabel *m_orientpix, *m_colorpix, *m_nuppix; + TQButtonGroup *m_orientbox, *m_colorbox, *m_nupbox; + TQComboBox *m_pagesize; + TQLabel *m_orientpix, *m_colorpix, *m_nuppix; }; #endif diff --git a/kdeprint/kprintdialog.cpp b/kdeprint/kprintdialog.cpp index a2b67c344..2bfd8100e 100644 --- a/kdeprint/kprintdialog.cpp +++ b/kdeprint/kprintdialog.cpp @@ -71,16 +71,16 @@ class KPrintDialog::KPrintDialogPrivate { public: - QLabel *m_type, *m_state, *m_comment, *m_location, *m_cmdlabel, *m_filelabel; + TQLabel *m_type, *m_state, *m_comment, *m_location, *m_cmdlabel, *m_filelabel; KPushButton *m_properties, *m_default, *m_options, *m_ok, *m_extbtn; - QPushButton *m_wizard, *m_filter; - QCheckBox *m_preview; - QLineEdit *m_cmd; + TQPushButton *m_wizard, *m_filter; + TQCheckBox *m_preview; + TQLineEdit *m_cmd; TreeComboBox *m_printers; - QVBox *m_dummy; + TQVBox *m_dummy; PluginComboBox *m_plugin; KURLRequester *m_file; - QCheckBox *m_persistent; + TQCheckBox *m_persistent; bool m_reduced; TQPtrList<KPrintDialogPage> m_pages; @@ -262,7 +262,7 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) setCaption(i18n("Print")); // widget creation - QGroupBox *m_pbox = new TQGroupBox(0,Qt::Vertical,i18n("Printer"), this); + TQGroupBox *m_pbox = new TQGroupBox(0,Qt::Vertical,i18n("Printer"), this); d->m_type = new TQLabel(m_pbox); TQWhatsThis::add(d->m_type, whatsThisPrinterType); d->m_state = new TQLabel(m_pbox); @@ -275,15 +275,15 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) d->m_printers = new TreeComboBox(m_pbox); TQWhatsThis::add(d->m_printers, whatsThisPrinterSelect); d->m_printers->setMinimumHeight(25); - QLabel *m_printerlabel = new TQLabel(i18n("&Name:"), m_pbox); + TQLabel *m_printerlabel = new TQLabel(i18n("&Name:"), m_pbox); TQWhatsThis::add(m_printerlabel, whatsThisPrinterSelect); - QLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), m_pbox); + TQLabel *m_statelabel = new TQLabel(i18n("Status", "State:"), m_pbox); TQWhatsThis::add(m_statelabel, whatsThisPrinterState); - QLabel *m_typelabel = new TQLabel(i18n("Type:"), m_pbox); + TQLabel *m_typelabel = new TQLabel(i18n("Type:"), m_pbox); TQWhatsThis::add(m_typelabel, whatsThisPrinterType); - QLabel *m_locationlabel = new TQLabel(i18n("Location:"), m_pbox); + TQLabel *m_locationlabel = new TQLabel(i18n("Location:"), m_pbox); TQWhatsThis::add(m_locationlabel, whatsThisLocationLabel); - QLabel *m_commentlabel = new TQLabel(i18n("Comment:"), m_pbox); + TQLabel *m_commentlabel = new TQLabel(i18n("Comment:"), m_pbox); TQWhatsThis::add(m_commentlabel, whatsThisPrinterComment); m_printerlabel->setBuddy(d->m_printers); d->m_properties = new KPushButton(KGuiItem(i18n("P&roperties"), "edit"), m_pbox); @@ -308,7 +308,7 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) TQWhatsThis::add( d->m_ok, whatsThisPrintButton); d->m_ok->setDefault(true); d->m_ok->setEnabled( false ); - QPushButton *m_cancel = new KPushButton(KStdGuiItem::cancel(), this); + TQPushButton *m_cancel = new KPushButton(KStdGuiItem::cancel(), this); TQWhatsThis::add(m_cancel, whatsThisCancelButton); d->m_preview = new TQCheckBox(i18n("Previe&w"), m_pbox); TQWhatsThis::add(d->m_preview, whatsThisPreviewCheckBox); @@ -331,7 +331,7 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) TQWhatsThis::add(d->m_extbtn, whatsThisOptions); d->m_persistent = new TQCheckBox(i18n("&Keep this dialog open after printing"), this); TQWhatsThis::add( d->m_persistent, whatsThisKeepDialogOpenCheckbox); - QPushButton *m_help = new KPushButton(KStdGuiItem::help(), this); + TQPushButton *m_help = new KPushButton(KStdGuiItem::help(), this); TQWhatsThis::add( m_help, whatsThisHelpButton); TQWidget::setTabOrder( d->m_printers, d->m_filter ); @@ -348,12 +348,12 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) TQWidget::setTabOrder( d->m_ok, m_cancel ); // layout creation - QVBoxLayout *l1 = new TQVBoxLayout(this, 10, 10); + TQVBoxLayout *l1 = new TQVBoxLayout(this, 10, 10); l1->addWidget(m_pbox,0); l1->addWidget(d->m_dummy,1); l1->addWidget(d->m_plugin,0); l1->addWidget(d->m_persistent); - QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 10); + TQHBoxLayout *l2 = new TQHBoxLayout(0, 0, 10); l1->addLayout(l2); l2->addWidget(d->m_extbtn,0); l2->addWidget(d->m_options,0); @@ -361,17 +361,17 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) l2->addStretch(1); l2->addWidget(d->m_ok,0); l2->addWidget(m_cancel,0); - QGridLayout *l3 = new TQGridLayout(m_pbox->layout(),3,3,7); + TQGridLayout *l3 = new TQGridLayout(m_pbox->layout(),3,3,7); l3->setColStretch(1,1); l3->setRowStretch(0,1); - QGridLayout *l4 = new TQGridLayout(0, 5, 2, 0, 5); + TQGridLayout *l4 = new TQGridLayout(0, 5, 2, 0, 5); l3->addMultiCellLayout(l4,0,0,0,1); l4->addWidget(m_printerlabel,0,0); l4->addWidget(m_statelabel,1,0); l4->addWidget(m_typelabel,2,0); l4->addWidget(m_locationlabel,3,0); l4->addWidget(m_commentlabel,4,0); - QHBoxLayout *ll4 = new TQHBoxLayout(0, 0, 3); + TQHBoxLayout *ll4 = new TQHBoxLayout(0, 0, 3); l4->addLayout(ll4,0,1); ll4->addWidget(d->m_printers,1); ll4->addWidget(d->m_filter,0); @@ -382,7 +382,7 @@ KPrintDialog::KPrintDialog(TQWidget *parent, const char *name) l4->addWidget(d->m_location,3,1); l4->addWidget(d->m_comment,4,1); l4->setColStretch(1,1); - QVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10); + TQVBoxLayout *l5 = new TQVBoxLayout(0, 0, 10); l3->addLayout(l5,0,2); l5->addWidget(d->m_properties,0); l5->addWidget(d->m_default,0); @@ -489,7 +489,7 @@ void KPrintDialog::setDialogPages(TQPtrList<KPrintDialogPage> *pages) else { // more than one page. - QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget")); + TQTabWidget *tabs = static_cast<TQTabWidget*>(TQT_TQWIDGET(d->m_dummy->child("TabWidget", "TQTabWidget"))); if (!tabs) { // TQTabWidget doesn't exist. Create it and reparent all @@ -658,7 +658,7 @@ void KPrintDialog::done(int result) KMPrinter *prt(0); // get options from global pages - QString msg; + TQString msg; TQPtrListIterator<KPrintDialogPage> it(d->m_pages); for (;it.current();++it) if (it.current()->isEnabled()) @@ -723,7 +723,7 @@ bool KPrintDialog::checkOutputFile() do { anotherCheck = false; - QFileInfo f(url.path()); + TQFileInfo f(url.path()); if (f.exists()) { if (f.isWritable()) @@ -800,7 +800,7 @@ void KPrintDialog::setOutputFileExtension(const TQString& ext) { KURL url( d->m_file->url() ); TQString f( url.fileName() ); - int p = f.findRev( '.' ); + int p = f.tqfindRev( '.' ); // change "file.ext"; don't change "file", "file." or ".file" but do change ".file.ext" if ( p > 0 && p != int (f.length () - 1) ) { @@ -822,7 +822,7 @@ void KPrintDialog::slotWizard() void KPrintDialog::reload() { // remove printer dependent pages (usually from plugin) - QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget")); + TQTabWidget *tabs = static_cast<TQTabWidget*>(TQT_TQWIDGET(d->m_dummy->child("TabWidget", "TQTabWidget"))); for (uint i=0; i<d->m_pages.count(); i++) if (d->m_pages.at(i)->onlyRealPrinters()) { @@ -951,7 +951,7 @@ void KPrintDialog::enableDialogPage( int index, bool flag ) if ( d->m_pages.count() > 1 ) { - QTabWidget *tabs = static_cast<TQTabWidget*>(d->m_dummy->child("TabWidget", "TQTabWidget")); + TQTabWidget *tabs = static_cast<TQTabWidget*>(TQT_TQWIDGET(d->m_dummy->child("TabWidget", "TQTabWidget"))); tabs->setTabEnabled( d->m_pages.at( index ), flag ); } else diff --git a/kdeprint/kprinter.cpp b/kdeprint/kprinter.cpp index 34e215a8e..4a7134435 100644 --- a/kdeprint/kprinter.cpp +++ b/kdeprint/kprinter.cpp @@ -52,14 +52,14 @@ static void reportError(KPrinter*); // KPrinterWrapper class //************************************************************************************** -class KPrinterWrapper : public QPrinter +class KPrinterWrapper : public TQPrinter { friend class KPrinter; public: KPrinterWrapper(KPrinter*, PrinterMode m = ScreenResolution); ~KPrinterWrapper(); protected: - virtual bool cmd(int, TQPainter*, QPDevCmdParam*); + virtual bool cmd(int, TQPainter*, TQPDevCmdParam*); virtual int metric(int) const; int qprinterMetric(int) const; private: @@ -75,7 +75,7 @@ KPrinterWrapper::~KPrinterWrapper() { } -bool KPrinterWrapper::cmd(int c, TQPainter *painter, QPDevCmdParam *p) +bool KPrinterWrapper::cmd(int c, TQPainter *painter, TQPDevCmdParam *p) { return TQPrinter::cmd(c,painter,p); } @@ -272,7 +272,7 @@ KPrinter::ApplicationType KPrinter::applicationType() return (ApplicationType)KMFactory::self()->settings()->application; } -bool KPrinter::cmd(int c, TQPainter *painter, QPDevCmdParam *p) +bool KPrinter::cmd(int c, TQPainter *painter, TQPDevCmdParam *p) { bool value(true); if (c == TQPaintDevice::PdcBegin) @@ -357,7 +357,7 @@ void KPrinter::translateQtOptions() bool KPrinter::printFiles(const TQStringList& l, bool flag, bool startviewer) { - QStringList files(l); + TQStringList files(l); bool status(true); // First apply possible filters, and update "remove" flag if filters has @@ -483,7 +483,7 @@ TQValueList<int> KPrinter::pageList() const // process range specification if (!option("kde-range").isEmpty()) { - QStringList ranges = TQStringList::split(',',option("kde-range"),false); + TQStringList ranges = TQStringList::split(',',option("kde-range"),false); for (TQStringList::ConstIterator it=ranges.begin();it!=ranges.end();++it) { int p = (*it).tqfind('-'); @@ -638,7 +638,7 @@ void KPrinter::setOptions(const TQMap<TQString,TQString>& opts) tmpset.remove( "kde-resolution" ); tmpset.remove( "kde-fonts" ); for (TQMap<TQString,TQString>::ConstIterator it=tmpset.begin();it!=tmpset.end();++it) - if (it.key().left(4) == "kde-" && !(d->m_options.contains(it.key()))) + if (it.key().left(4) == "kde-" && !(d->m_options.tqcontains(it.key()))) d->m_options[it.key()] = it.data(); } @@ -879,7 +879,7 @@ void KPrinter::setPrintProgram(const TQString& prg) } else { - QString s(prg); + TQString s(prg); if (s.tqfind("%in") == -1) s.append(" %in"); setOutputToFile( s.tqfind( "%out" ) != -1 ); diff --git a/kdeprint/kprinter.h b/kdeprint/kprinter.h index 286fdc029..7a6f21569 100644 --- a/kdeprint/kprinter.h +++ b/kdeprint/kprinter.h @@ -748,7 +748,7 @@ public: TQString docDirectory() const; protected: - virtual bool cmd(int, TQPainter*, QPDevCmdParam*); + virtual bool cmd(int, TQPainter*, TQPDevCmdParam*); virtual int metric(int) const; void translateQtOptions(); void loadSettings(); diff --git a/kdeprint/kprinterimpl.cpp b/kdeprint/kprinterimpl.cpp index 61c5bdc5f..31294b9be 100644 --- a/kdeprint/kprinterimpl.cpp +++ b/kdeprint/kprinterimpl.cpp @@ -139,7 +139,7 @@ bool KPrinterImpl::setupCommand(TQString&, KPrinter*) bool KPrinterImpl::printFiles(KPrinter *p, const TQStringList& f, bool flag) { - QString cmd; + TQString cmd; if (p->option("kde-isspecial") == "1") { if (p->option("kde-special-command").isEmpty() && p->outputToFile()) @@ -228,7 +228,7 @@ void KPrinterImpl::statusMessage(const TQString& msg, KPrinter *printer) if (!conf->readBoolEntry("ShowStatusMsg", true)) return; - QString message(msg); + TQString message(msg); if (printer && !msg.isEmpty()) message.prepend(i18n("Printing document: %1").arg(printer->docName())+"\n"); @@ -250,8 +250,8 @@ bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const T { statusMessage(i18n("Sending print data to printer: %1").arg(printer->printerName()), printer); - QString command(cmd), filestr; - QStringList printfiles; + TQString command(cmd), filestr; + TQStringList printfiles; if (command.tqfind("%in") == -1) command.append(" %in"); for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it) @@ -276,7 +276,7 @@ bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const T } else { - QString msg = i18n("Unable to start child print process. "); + TQString msg = i18n("Unable to start child print process. "); if (pid == 0) msg += i18n("The KDE print server (<b>kdeprintd</b>) could not be contacted. Check that this server is running."); else @@ -294,7 +294,7 @@ bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const T TQString KPrinterImpl::tempFile() { - QString f; + TQString f; // be sure the file doesn't exist do f = locateLocal("tmp","kdeprint_") + KApplication::randomString(8); while (TQFile::exists(f)); return f; @@ -302,7 +302,7 @@ TQString KPrinterImpl::tempFile() int KPrinterImpl::filterFiles(KPrinter *printer, TQStringList& files, bool flag) { - QStringList flist = TQStringList::split(',',printer->option("_kde-filters"),false); + TQStringList flist = TQStringList::split(',',printer->option("_kde-filters"),false); TQMap<TQString,TQString> opts = printer->options(); // generic page selection mechanism (using psselect filter) @@ -317,7 +317,7 @@ int KPrinterImpl::filterFiles(KPrinter *printer, TQStringList& files, bool flag) !printer->option("kde-range").isEmpty() || printer->pageSet() != KPrinter::AllPages)) { - if (flist.findIndex("psselect") == -1) + if (flist.tqfindIndex("psselect") == -1) { int index = KXmlCommandManager::self()->insertCommand(flist, "psselect", false); if (index == -1 || !KXmlCommandManager::self()->checkCommand("psselect")) @@ -345,8 +345,8 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ if (flist.count() == 0) return 0; - QString filtercmd; - QStringList inputMimeTypes; + TQString filtercmd; + TQStringList inputMimeTypes; for (uint i=0;i<flist.count();i++) { KXmlCommand *filter = KXmlCommandManager::self()->loadCommand(flist[i]); @@ -358,7 +358,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ if (i == 0) inputMimeTypes = filter->inputMimeTypes(); - QString subcmd = filter->buildCommand(opts,(i>0),(i<(flist.count()-1))); + TQString subcmd = filter->buildCommand(opts,(i>0),(i<(flist.count()-1))); delete filter; if (!subcmd.isEmpty()) { @@ -374,11 +374,11 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ } kdDebug(500) << "kdeprint: filter command: " << filtercmd << endl; - QString rin("%in"), rout("%out"), rpsl("%psl"), rpsu("%psu"); - QString ps = pageSizeToPageName( printer->option( "kde-printsize" ).isEmpty() ? printer->pageSize() : ( KPrinter::PageSize )printer->option( "kde-printsize" ).toInt() ); + TQString rin("%in"), rout("%out"), rpsl("%psl"), rpsu("%psu"); + TQString ps = pageSizeToPageName( printer->option( "kde-printsize" ).isEmpty() ? printer->pageSize() : ( KPrinter::PageSize )printer->option( "kde-printsize" ).toInt() ); for (TQStringList::Iterator it=files.begin(); it!=files.end(); ++it) { - QString mime = KMimeMagic::self()->findFileType(*it)->mimeType(); + TQString mime = KMimeMagic::self()->findFileType(*it)->mimeType(); if (inputMimeTypes.tqfind(mime) == inputMimeTypes.end()) { if (KMessageBox::warningContinueCancel(0, @@ -388,14 +388,14 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ "format?</p>").arg(mime), TQString::null, i18n("Convert")) == KMessageBox::Continue) { - QStringList ff; + TQStringList ff; int done(0); ff << *it; while (done == 0) { bool ok(false); - QString targetMime = KInputDialog::getItem( + TQString targetMime = KInputDialog::getItem( i18n("Select MIME Type"), i18n("Select the target format for the conversion:"), inputMimeTypes, 0, false, &ok); @@ -404,7 +404,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ printer->setErrorMessage(i18n("Operation aborted.")); return -1; } - QStringList filters = KXmlCommandManager::self()->autoConvert(mime, targetMime); + TQStringList filters = KXmlCommandManager::self()->autoConvert(mime, targetMime); if (filters.count() == 0) { KMessageBox::error(0, i18n("No appropriate filter found. Select another target format.")); @@ -432,8 +432,8 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ } } - QString tmpfile = tempFile(); - QString cmd(filtercmd); + TQString tmpfile = tempFile(); + TQString cmd(filtercmd); cmd.replace(rout,quote(tmpfile)); cmd.replace(rpsl,ps.lower()); cmd.replace(rpsu,ps); @@ -479,7 +479,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool int status(0), result; for (TQStringList::Iterator it=files.begin(); it!=files.end(); ) { - QString mime = KMimeMagic::self()->findFileType(*it)->mimeType(); + TQString mime = KMimeMagic::self()->findFileType(*it)->mimeType(); if ( mime == "application/x-zerosize" ) { // special case of empty file @@ -491,7 +491,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool it = files.remove( it ); continue; } - else if (mimeTypes.findIndex(mime) == -1) + else if (mimeTypes.tqfindIndex(mime) == -1) { if ((result=KMessageBox::warningYesNoCancel(NULL, i18n("<qt>The file format <em> %1 </em> is not directly supported by the current print system. You " @@ -511,7 +511,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool TQString::tqfromLatin1("kdeprintAutoConvert"))) == KMessageBox::Yes) { // find the filter chain - QStringList flist = KXmlCommandManager::self()->autoConvert(mime, primaryMimeType); + TQStringList flist = KXmlCommandManager::self()->autoConvert(mime, primaryMimeType); if (flist.count() == 0) { KMessageBox::error(NULL, @@ -529,7 +529,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool it = files.remove(it); continue; } - QStringList l(*it); + TQStringList l(*it); switch (doFilterFiles(printer, l, flist, TQMap<TQString,TQString>(), flag)) { case -1: @@ -555,7 +555,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool bool KPrinterImpl::setupSpecialCommand(TQString& cmd, KPrinter *p, const TQStringList&) { - QString s(p->option("kde-special-command")); + TQString s(p->option("kde-special-command")); if (s.isEmpty()) { p->setErrorMessage("Empty command."); @@ -564,7 +564,7 @@ bool KPrinterImpl::setupSpecialCommand(TQString& cmd, KPrinter *p, const TQStrin s = KMFactory::self()->specialManager()->setupCommand(s, p->options()); - QString ps = pageSizeToPageName( p->option( "kde-printsize" ).isEmpty() ? p->pageSize() : ( KPrinter::PageSize )p->option( "kde-printsize" ).toInt() ); + TQString ps = pageSizeToPageName( p->option( "kde-printsize" ).isEmpty() ? p->pageSize() : ( KPrinter::PageSize )p->option( "kde-printsize" ).toInt() ); s.replace("%psl", ps.lower()); s.replace("%psu", ps); s.replace("%out", "$out{" + p->outputFileName() + "}"); // Replace as last @@ -585,7 +585,7 @@ void KPrinterImpl::loadAppOptions() { KConfig *conf = KGlobal::config(); conf->setGroup("KPrinter Settings"); - QStringList opts = conf->readListEntry("ApplicationOptions"); + TQStringList opts = conf->readListEntry("ApplicationOptions"); for (uint i=0; i<opts.count(); i+=2) if (opts[i].startsWith("app-")) m_options[opts[i]] = opts[i+1]; @@ -593,7 +593,7 @@ void KPrinterImpl::loadAppOptions() void KPrinterImpl::saveAppOptions() { - QStringList optlist; + TQStringList optlist; for (TQMap<TQString,TQString>::ConstIterator it=m_options.begin(); it!=m_options.end(); ++it) if (it.key().startsWith("app-")) optlist << it.key() << it.data(); diff --git a/kdeprint/kprinterpropertydialog.cpp b/kdeprint/kprinterpropertydialog.cpp index ab3b44f05..d2036bcf1 100644 --- a/kdeprint/kprinterpropertydialog.cpp +++ b/kdeprint/kprinterpropertydialog.cpp @@ -68,7 +68,7 @@ void KPrinterPropertyDialog::addPage(KPrintDialogPage *page) bool KPrinterPropertyDialog::synchronize() { if (m_current) m_current->getOptions(m_options,true); - QString msg; + TQString msg; TQPtrListIterator<KPrintDialogPage> it(m_pages); for (;it.current();++it) { diff --git a/kdeprint/kprinterpropertydialog.h b/kdeprint/kprinterpropertydialog.h index e781a7595..9264ea0d1 100644 --- a/kdeprint/kprinterpropertydialog.h +++ b/kdeprint/kprinterpropertydialog.h @@ -62,8 +62,8 @@ protected: TQPtrList<KPrintDialogPage> m_pages; KPrintDialogPage *m_current; TQMap<TQString,TQString> m_options; - QTabWidget *m_tw; - QPushButton *m_save; + TQTabWidget *m_tw; + TQPushButton *m_save; }; #endif diff --git a/kdeprint/kprintpreview.cpp b/kdeprint/kprintpreview.cpp index ec2ea0a37..6d385c17c 100644 --- a/kdeprint/kprintpreview.cpp +++ b/kdeprint/kprintpreview.cpp @@ -99,7 +99,7 @@ public: KParts::ReadOnlyPart *gvpart_; KToolBar *toolbar_; KActionCollection *actions_; - QWidget *mainwidget_; + TQWidget *mainwidget_; KAccel *accel_; bool previewonly_; }; @@ -154,11 +154,11 @@ KPrintPreview::KPrintPreview(TQWidget *parent, bool previewOnly) // create main view and actions setMainWidget(d->mainwidget_); if (previewOnly) - KStdAction::close(this, TQT_SLOT(reject()), d->actions_, "close_print"); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(reject()), d->actions_, "close_print"); else { - new KAction(i18n("Print"), "fileprint", Qt::Key_Return, this, TQT_SLOT(accept()), d->actions_, "continue_print"); - new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, this, TQT_SLOT(reject()), d->actions_, "stop_print"); + new KAction(i18n("Print"), "fileprint", Qt::Key_Return, TQT_TQOBJECT(this), TQT_SLOT(accept()), d->actions_, "continue_print"); + new KAction(i18n("Cancel"), "stop", Qt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(reject()), d->actions_, "stop_print"); } } @@ -171,7 +171,7 @@ KPrintPreview::~KPrintPreview() void KPrintPreview::initView(KLibFactory *factory) { // load the component - d->gvpart_ = (KParts::ReadOnlyPart*)factory->create(d->mainwidget_, "gvpart", "KParts::ReadOnlyPart"); + d->gvpart_ = (KParts::ReadOnlyPart*)factory->create(TQT_TQOBJECT(d->mainwidget_), "gvpart", "KParts::ReadOnlyPart"); // populate the toolbar if (d->previewonly_) @@ -218,7 +218,7 @@ void KPrintPreview::initView(KLibFactory *factory) //d->adjustSize(); // construct the layout - QVBoxLayout *l0 = new TQVBoxLayout(d->mainwidget_, 0, 0); + TQVBoxLayout *l0 = new TQVBoxLayout(d->mainwidget_, 0, 0); l0->addWidget(d->toolbar_, AlignTop); if (d->gvpart_) l0->addWidget(d->gvpart_->widget()); @@ -248,8 +248,8 @@ bool KPrintPreview::preview(const TQString& file, bool previewOnly, WId parentId conf->setGroup("General"); KLibFactory *factory(0); bool externalPreview = conf->readBoolEntry("ExternalPreview", false); - QWidget *parentW = TQWidget::find(parentId); - QString exe; + TQWidget *parentW = TQT_TQWIDGET(TQWidget::find(parentId)); + TQString exe; if (!externalPreview && isPS && (factory = componentFactory()) != 0) { KPrintPreview dlg(parentW, previewOnly); diff --git a/kdeprint/kprintprocess.cpp b/kdeprint/kprintprocess.cpp index 65ae44eb5..f18addde8 100644 --- a/kdeprint/kprintprocess.cpp +++ b/kdeprint/kprintprocess.cpp @@ -48,7 +48,7 @@ TQString KPrintProcess::errorMessage() const bool KPrintProcess::print() { - m_buffer = TQString::null; + m_buffer = TQString(); m_state = Printing; return start(NotifyOnExit,All); } @@ -57,7 +57,7 @@ void KPrintProcess::slotReceivedStderr(KProcess *proc, char *buf, int len) { if (proc == this) { - QCString str = TQCString(buf,len).stripWhiteSpace(); + TQCString str = TQCString(buf,len).stripWhiteSpace(); m_buffer.append(str.append("\n")); } } diff --git a/kdeprint/kxmlcommand.cpp b/kdeprint/kxmlcommand.cpp index db707a120..fbe7ec545 100644 --- a/kdeprint/kxmlcommand.cpp +++ b/kdeprint/kxmlcommand.cpp @@ -49,17 +49,17 @@ static void setOptionText(DrBase *opt, const TQString& s) class KXmlCommand::KXmlCommandPrivate { public: - QString m_name; - QString m_command; + TQString m_name; + TQString m_command; DrMain *m_driver; struct { - QString m_format[2]; // 0 -> file, 1 -> pipe + TQString m_format[2]; // 0 -> file, 1 -> pipe } m_io[2]; // 0 -> input, 1 -> output - QString m_description; - QString m_outputMime; - QStringList m_inputMime; - QStringList m_requirements; + TQString m_description; + TQString m_outputMime; + TQStringList m_inputMime; + TQStringList m_requirements; bool m_loaded[2]; // 0 -> Desktop, 1 -> XML TQString m_comment; }; @@ -240,11 +240,11 @@ void KXmlCommand::saveDesktop() void KXmlCommand::loadXml() { - QFile f(locate("data", "kdeprint/filters/"+name()+".xml")); - QDomDocument doc; + TQFile f(locate("data", "kdeprint/filters/"+name()+".xml")); + TQDomDocument doc; if (f.open(IO_ReadOnly) && doc.setContent(&f) && doc.documentElement().tagName() == "kprintfilter") { - QDomElement e, docElem = doc.documentElement(); + TQDomElement e, docElem = doc.documentElement(); d->m_name = docElem.attribute("name"); // command @@ -274,7 +274,7 @@ void KXmlCommand::loadXml() void KXmlCommand::parseIO(const TQDomElement& e, int n) { - QDomElement elem = e.firstChild().toElement(); + TQDomElement elem = e.firstChild().toElement(); while (!elem.isNull()) { if (elem.tagName() == "filterarg") @@ -293,7 +293,7 @@ DrGroup* KXmlCommand::parseGroup(const TQDomElement& e, DrGroup *grp) grp->setName(e.attribute("name")); setOptionText(grp, e.attribute("description")); - QDomElement elem = e.firstChild().toElement(); + TQDomElement elem = e.firstChild().toElement(); while (!elem.isNull()) { if (elem.tagName() == "filterarg") @@ -317,7 +317,7 @@ DrGroup* KXmlCommand::parseGroup(const TQDomElement& e, DrGroup *grp) DrBase* KXmlCommand::parseArgument(const TQDomElement& e) { DrBase *opt(0); - QString type = e.attribute("type"); + TQString type = e.attribute("type"); if (type == "int" || type == "float") { @@ -337,7 +337,7 @@ DrBase* KXmlCommand::parseArgument(const TQDomElement& e) else opt = new DrBooleanOption; DrListOption *lopt = static_cast<DrListOption*>(opt); - QDomElement elem = e.firstChild().toElement(); + TQDomElement elem = e.firstChild().toElement(); while (!elem.isNull()) { if (elem.tagName() == "value") @@ -367,7 +367,7 @@ TQString KXmlCommand::buildCommand(const TQMap<TQString,TQString>& opts, bool pi { check(true); - QString str, cmd = d->m_command; + TQString str, cmd = d->m_command; TQString re( "%value" ), quotedRe( "'%value'" ); if (d->m_driver) @@ -381,7 +381,7 @@ TQString KXmlCommand::buildCommand(const TQMap<TQString,TQString>& opts, bool pi DrBase *dopt = d->m_driver->findOption(it.key()); if (dopt) { - QString format = dopt->get("format"); + TQString format = dopt->get("format"); TQString value = dopt->valueText(); if ( format.tqfind( quotedRe ) != -1 ) { @@ -425,12 +425,12 @@ void KXmlCommand::getOptions(TQMap<TQString,TQString>& opts, bool incldef) void KXmlCommand::saveXml() { - QFile f(locateLocal("data", "kdeprint/filters/"+name()+".xml")); + TQFile f(locateLocal("data", "kdeprint/filters/"+name()+".xml")); if (!f.open(IO_WriteOnly)) return; - QDomDocument doc("kprintfilter"); - QDomElement root = doc.createElement("kprintfilter"), elem; + TQDomDocument doc("kprintfilter"); + TQDomElement root = doc.createElement("kprintfilter"), elem; root.setAttribute("name", d->m_name); doc.appendChild(root); @@ -455,19 +455,19 @@ void KXmlCommand::saveXml() root.appendChild(elem); // save to file (and close it) - QTextStream t(&f); + TQTextStream t(&f); t << doc.toString(); f.close(); } TQDomElement KXmlCommand::createIO(TQDomDocument& doc, int n, const TQString& tag) { - QDomElement elem = doc.createElement(tag); + TQDomElement elem = doc.createElement(tag); if (d->m_command.tqfind("%"+tag) != -1) { for (int i=0; i<2; i++) { - QDomElement io = doc.createElement("filterarg"); + TQDomElement io = doc.createElement("filterarg"); io.setAttribute("name", (i ? "pipe" : "file")); io.setAttribute("format", d->m_io[n].m_format[i]); elem.appendChild(io); @@ -479,7 +479,7 @@ TQDomElement KXmlCommand::createIO(TQDomDocument& doc, int n, const TQString& ta TQDomElement KXmlCommand::createGroup(TQDomDocument& doc, DrGroup *group) { - QDomElement elem = doc.createElement("filtergroup"); + TQDomElement elem = doc.createElement("filtergroup"); elem.setAttribute("name", group->name()); elem.setAttribute("description", group->get("text")); @@ -496,8 +496,8 @@ TQDomElement KXmlCommand::createGroup(TQDomDocument& doc, DrGroup *group) TQDomElement KXmlCommand::createElement(TQDomDocument& doc, DrBase *opt) { - QDomElement elem = doc.createElement("filterarg"); - QString elemName = opt->name(); + TQDomElement elem = doc.createElement("filterarg"); + TQString elemName = opt->name(); if (elemName.startsWith("_kde-")) elemName.replace(0, name().length()+6, ""); elem.setAttribute("name", elemName); @@ -524,7 +524,7 @@ TQDomElement KXmlCommand::createElement(TQDomDocument& doc, DrBase *opt) TQPtrListIterator<DrBase> it(*(static_cast<DrListOption*>(opt)->choices())); for (; it.current(); ++it) { - QDomElement chElem = doc.createElement("value"); + TQDomElement chElem = doc.createElement("value"); chElem.setAttribute("name", it.current()->name()); chElem.setAttribute("description", it.current()->get("text")); elem.appendChild(chElem); @@ -543,7 +543,7 @@ TQDomElement KXmlCommand::createElement(TQDomDocument& doc, DrBase *opt) class KXmlCommandManager::KXmlCommandManagerPrivate { public: - QStringList m_cmdlist; + TQStringList m_cmdlist; TQMap<TQString, TQValueList<KXmlCommand*> > m_mimemap; TQMap<TQString, KXmlCommand*> m_cmdmap; }; @@ -576,7 +576,7 @@ KXmlCommand* KXmlCommandManager::loadCommand(const TQString& xmlId, bool check) { if (check) { - QString desktopFile = locate("data", "kdeprint/filters/"+xmlId+".desktop"); + TQString desktopFile = locate("data", "kdeprint/filters/"+xmlId+".desktop"); if (desktopFile.isEmpty()) return 0; } @@ -610,7 +610,7 @@ void KXmlCommandManager::preload() KXmlCommand *xmlCmd = loadCommand(*it); if (!xmlCmd) continue; // Error! - QStringList inputMime = xmlCmd->inputMimeTypes(); + TQStringList inputMime = xmlCmd->inputMimeTypes(); for (TQStringList::ConstIterator mime=inputMime.begin(); mime!=inputMime.end(); ++mime) { d->m_mimemap[*mime].append(xmlCmd); @@ -624,14 +624,14 @@ TQStringList KXmlCommandManager::commandList() { if (d->m_cmdlist.isEmpty()) { - QStringList dirs = KGlobal::dirs()->findDirs("data", "kdeprint/filters/"); + TQStringList dirs = KGlobal::dirs()->findDirs("data", "kdeprint/filters/"); for (TQStringList::ConstIterator it=dirs.begin(); it!=dirs.end(); ++it) { - QStringList list = TQDir(*it).entryList("*.desktop", TQDir::Files, TQDir::Unsorted); + TQStringList list = TQDir(*it).entryList("*.desktop", TQDir::Files, TQDir::Unsorted); for (TQStringList::ConstIterator it2=list.begin(); it2!=list.end(); ++it2) { - QString cmdName = (*it2).left((*it2).length()-8); + TQString cmdName = (*it2).left((*it2).length()-8); if (d->m_cmdlist.tqfind(cmdName) == d->m_cmdlist.end()) d->m_cmdlist.append(cmdName); } @@ -646,7 +646,7 @@ TQStringList KXmlCommandManager::commandList() TQStringList KXmlCommandManager::commandListWithDescription() { preload(); - QStringList l; + TQStringList l; for (TQMap<TQString,KXmlCommand*>::ConstIterator it=d->m_cmdmap.begin(); it!=d->m_cmdmap.end(); ++it) l << (*it)->name() << (*it)->description(); @@ -676,7 +676,7 @@ TQString KXmlCommandManager::selectCommand(TQWidget *parent) KXmlCommand* KXmlCommandManager::command(const TQString& xmlId) const { - return (d->m_cmdmap.contains(xmlId) ? d->m_cmdmap[xmlId] : 0); + return (d->m_cmdmap.tqcontains(xmlId) ? d->m_cmdmap[xmlId] : 0); } int KXmlCommandManager::insertCommand(TQStringList& list, const TQString& filtername, bool defaultToStart) @@ -687,7 +687,7 @@ int KXmlCommandManager::insertCommand(TQStringList& list, const TQString& filter KXmlCommand *f1 = command(filtername), *f2 = 0; if (f1 && f1->inputMimeTypes().count() > 0) { - QString mimetype = f1->inputMimeTypes()[0]; + TQString mimetype = f1->inputMimeTypes()[0]; for (TQStringList::Iterator it=list.begin(); it!=list.end(); ++it, pos++) { f2 = command(*it); @@ -723,12 +723,12 @@ int KXmlCommandManager::insertCommand(TQStringList& list, const TQString& filter TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQString& mimedest) { - QStringList chain; + TQStringList chain; uint score(0); preload(); - if (d->m_mimemap.contains(mimesrc)) + if (d->m_mimemap.tqcontains(mimesrc)) { const TQValueList<KXmlCommand*> l = d->m_mimemap[mimesrc]; for (TQValueList<KXmlCommand*>::ConstIterator it=l.begin(); it!=l.end(); ++it) @@ -747,12 +747,12 @@ TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQSt // its output and mimedest (do not consider cyling filters) else if ((*it)->mimeType() != mimesrc) { - QStringList subchain = autoConvert((*it)->mimeType(), mimedest); + TQStringList subchain = autoConvert((*it)->mimeType(), mimedest); // If chain length is 0, then there's no possible filter between those 2 // mime types. Just discard it. If the subchain contains also the current // considered filter, then discard it: it denotes of a cycle in filter // chain. - if (subchain.count() > 0 && subchain.findIndex((*it)->name()) == -1) + if (subchain.count() > 0 && subchain.tqfindIndex((*it)->name()) == -1) { subchain.prepend((*it)->name()); if (subchain.count() < score || score == 0) @@ -772,7 +772,7 @@ TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQSt bool KXmlCommandManager::checkCommand(const TQString& xmlId, int inputCheck, int outputCheck, TQString *msg) { KXmlCommand *xmlCmd = command(xmlId); - QString errmsg; + TQString errmsg; bool needDestroy(false); //kdDebug(500) << "checking command: " << xmlId << " (" << (xmlCmd != NULL) << ")" << endl; if (!xmlCmd) @@ -788,7 +788,7 @@ bool KXmlCommandManager::checkCommand(const TQString& xmlId, int inputCheck, int if (!status) errmsg = i18n("One of the command object's requirements is not met."); } - QString cmd = (xmlCmd ? xmlCmd->command() : xmlId); + TQString cmd = (xmlCmd ? xmlCmd->command() : xmlId); if (status && !cmd.isEmpty() && (inputCheck > None || outputCheck > None)) { if (inputCheck > None && (cmd.tqfind("%in") == -1 || inputCheck == Advanced) && cmd.tqfind("%filterinput") == -1) diff --git a/kdeprint/lpdunix/kmlpdunixmanager.cpp b/kdeprint/lpdunix/kmlpdunixmanager.cpp index 1adb21ccb..5350b53f1 100644 --- a/kdeprint/lpdunix/kmlpdunixmanager.cpp +++ b/kdeprint/lpdunix/kmlpdunixmanager.cpp @@ -43,13 +43,13 @@ public: TQString readLine(); void unreadLine(const TQString& l) { m_linebuf = l; } private: - QTextStream m_stream; - QString m_linebuf; + TQTextStream m_stream; + TQString m_linebuf; }; TQString KTextBuffer::readLine() { - QString line; + TQString line; if (!m_linebuf.isEmpty()) { line = m_linebuf; @@ -73,7 +73,7 @@ TQString KTextBuffer::readLine() // '#', '|', ':'. The line is then put back in the IODevice. TQString readLine(KTextBuffer& t) { - QString line, buffer; + TQString line, buffer; bool lineContinue(false); while (!t.eof()) @@ -105,12 +105,12 @@ TQString readLine(KTextBuffer& t) // extact an entry (printcap-like) TQMap<TQString,TQString> readEntry(KTextBuffer& t) { - QString line = readLine(t); + TQString line = readLine(t); TQMap<TQString,TQString> entry; if (!line.isEmpty()) { - QStringList l = TQStringList::split(':',line,false); + TQStringList l = TQStringList::split(':',line,false); if (l.count() > 0) { int p(-1); @@ -150,25 +150,25 @@ KMPrinter* createPrinter(const TQString& prname) TQString getPrintcapFileName() { // check if LPRng system - QString printcap("/etc/printcap"); - QFile f("/etc/lpd.conf"); + TQString printcap("/etc/printcap"); + TQFile f("/etc/lpd.conf"); if (f.exists() && f.open(IO_ReadOnly)) { kdDebug() << "/etc/lpd.conf found: probably LPRng system" << endl; - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; while (!t.eof()) { line = t.readLine().stripWhiteSpace(); if (line.startsWith("printcap_path=")) { kdDebug() << "printcap_path entry found: " << line << endl; - QString pcentry = line.mid(14).stripWhiteSpace(); + TQString pcentry = line.mid(14).stripWhiteSpace(); kdDebug() << "printcap_path value: " << pcentry << endl; if (pcentry[0] == '|') { // printcap through pipe printcap = locateLocal("tmp","printcap"); - QString cmd = TQString::tqfromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap); + TQString cmd = TQString::tqfromLatin1("echo \"all\" | %1 > %2").arg(pcentry.mid(1)).arg(printcap); kdDebug() << "printcap obtained through pipe" << endl << "executing: " << cmd << endl; ::system(cmd.local8Bit()); } @@ -183,27 +183,27 @@ TQString getPrintcapFileName() // "/etc/printcap" file parsing (Linux/LPR) void KMLpdUnixManager::parseEtcPrintcap() { - QFile f(getPrintcapFileName()); + TQFile f(getPrintcapFileName()); if (f.exists() && f.open(IO_ReadOnly)) { - KTextBuffer t(&f); + KTextBuffer t(TQT_TQIODEVICE(&f)); TQMap<TQString,TQString> entry; while (!t.eof()) { entry = readEntry(t); - if (entry.isEmpty() || !entry.contains("printer-name") || entry.contains("server")) + if (entry.isEmpty() || !entry.tqcontains("printer-name") || entry.tqcontains("server")) continue; if (entry["printer-name"] == "all") { - if (entry.contains("all")) + if (entry.tqcontains("all")) { // find separator int p = entry["all"].tqfind(TQRegExp("[^a-zA-Z0-9_\\s-]")); if (p != -1) { - QChar c = entry["all"][p]; - QStringList prs = TQStringList::split(c,entry["all"],false); + TQChar c = entry["all"][p]; + TQStringList prs = TQStringList::split(c,entry["all"],false); for (TQStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it) { KMPrinter *printer = ::createPrinter(*it); @@ -216,7 +216,7 @@ void KMLpdUnixManager::parseEtcPrintcap() else { KMPrinter *printer = ::createPrinter(entry); - if (entry.contains("rm")) + if (entry.tqcontains("rm")) printer->setDescription(i18n("Remote printer queue on %1").arg(entry["rm"])); else printer->setDescription(i18n("Local printer")); @@ -229,12 +229,12 @@ void KMLpdUnixManager::parseEtcPrintcap() // helper function for NIS support in Solaris-2.6 (use "ypcat printers.conf.byname") TQString getEtcPrintersConfName() { - QString printersconf("/etc/printers.conf"); + TQString printersconf("/etc/printers.conf"); if (!TQFile::exists(printersconf) && !KStandardDirs::findExe( "ypcat" ).isEmpty()) { // standard file not found, try NIS printersconf = locateLocal("tmp","printers.conf"); - QString cmd = TQString::tqfromLatin1("ypcat printers.conf.byname > %1").arg(printersconf); + TQString cmd = TQString::tqfromLatin1("ypcat printers.conf.byname > %1").arg(printersconf); kdDebug() << "printers.conf obtained from NIS server: " << cmd << endl; ::system(TQFile::encodeName(cmd)); } @@ -244,30 +244,30 @@ TQString getEtcPrintersConfName() // "/etc/printers.conf" file parsing (Solaris 2.6) void KMLpdUnixManager::parseEtcPrintersConf() { - QFile f(getEtcPrintersConfName()); + TQFile f(getEtcPrintersConfName()); if (f.exists() && f.open(IO_ReadOnly)) { - KTextBuffer t(&f); + KTextBuffer t(TQT_TQIODEVICE(&f)); TQMap<TQString,TQString> entry; - QString default_printer; + TQString default_printer; while (!t.eof()) { entry = readEntry(t); - if (entry.isEmpty() || !entry.contains("printer-name")) + if (entry.isEmpty() || !entry.tqcontains("printer-name")) continue; - QString prname = entry["printer-name"]; + TQString prname = entry["printer-name"]; if (prname == "_default") { - if (entry.contains("use")) + if (entry.tqcontains("use")) default_printer = entry["use"]; } else if (prname != "_all") { KMPrinter *printer = ::createPrinter(entry); - if (entry.contains("bsdaddr")) + if (entry.tqcontains("bsdaddr")) { - QStringList l = TQStringList::split(',',entry["bsdaddr"],false); + TQStringList l = TQStringList::split(',',entry["bsdaddr"],false); printer->setDescription(i18n("Remote printer queue on %1").arg(l[0])); } else @@ -284,28 +284,28 @@ void KMLpdUnixManager::parseEtcPrintersConf() // "/etc/lp/printers/" directory parsing (Solaris non-2.6) void KMLpdUnixManager::parseEtcLpPrinters() { - QDir d("/etc/lp/printers"); - const QFileInfoList *prlist = d.entryInfoList(TQDir::Dirs); + TQDir d("/etc/lp/printers"); + const TQFileInfoList *prlist = d.entryInfoList(TQDir::Dirs); if (!prlist) return; - QFileInfoListIterator it(*prlist); + TQFileInfoListIterator it(*prlist); for (;it.current();++it) { if (it.current()->fileName() == "." || it.current()->fileName() == "..") continue; - QFile f(it.current()->absFilePath() + "/configuration"); + TQFile f(it.current()->absFilePath() + "/configuration"); if (f.exists() && f.open(IO_ReadOnly)) { - KTextBuffer t(&f); - QString line, remote; + KTextBuffer t(TQT_TQIODEVICE(&f)); + TQString line, remote; while (!t.eof()) { line = readLine(t); if (line.isEmpty()) continue; if (line.startsWith("Remote:")) { - QStringList l = TQStringList::split(':',line,false); + TQStringList l = TQStringList::split(':',line,false); if (l.count() > 1) remote = l[1]; } } @@ -326,12 +326,12 @@ void KMLpdUnixManager::parseEtcLpPrinters() // "/etc/lp/member/" directory parsing (HP-UX) void KMLpdUnixManager::parseEtcLpMember() { - QDir d("/etc/lp/member"); - const QFileInfoList *prlist = d.entryInfoList(TQDir::Files); + TQDir d("/etc/lp/member"); + const TQFileInfoList *prlist = d.entryInfoList(TQDir::Files); if (!prlist) return; - QFileInfoListIterator it(*prlist); + TQFileInfoListIterator it(*prlist); for (;it.current();++it) { KMPrinter *printer = new KMPrinter; @@ -347,26 +347,26 @@ void KMLpdUnixManager::parseEtcLpMember() // "/usr/spool/lp/interfaces/" directory parsing (IRIX 6.x) void KMLpdUnixManager::parseSpoolInterface() { - QDir d("/usr/spool/interfaces/lp"); - const QFileInfoList *prlist = d.entryInfoList(TQDir::Files); + TQDir d("/usr/spool/interfaces/lp"); + const TQFileInfoList *prlist = d.entryInfoList(TQDir::Files); if (!prlist) return; - QFileInfoListIterator it(*prlist); + TQFileInfoListIterator it(*prlist); for (;it.current();++it) { - QFile f(it.current()->absFilePath()); + TQFile f(it.current()->absFilePath()); if (f.exists() && f.open(IO_ReadOnly)) { - KTextBuffer t(&f); - QString line, remote; + KTextBuffer t(TQT_TQIODEVICE(&f)); + TQString line, remote; while (!t.eof()) { line = t.readLine().stripWhiteSpace(); if (line.startsWith("HOSTNAME")) { - QStringList l = TQStringList::split('=',line,false); + TQStringList l = TQStringList::split('=',line,false); if (l.count() > 1) remote = l[1]; } } diff --git a/kdeprint/lpr/apshandler.cpp b/kdeprint/lpr/apshandler.cpp index 526edaf49..57ac45311 100644 --- a/kdeprint/lpr/apshandler.cpp +++ b/kdeprint/lpr/apshandler.cpp @@ -63,7 +63,7 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor if (!shortmode) { TQMap<TQString,TQString> opts = loadResources(entry); - if (opts.contains("PRINTER")) + if (opts.tqcontains("PRINTER")) { prt->setDescription(i18n("APS Driver (%1)").arg(opts["PRINTER"])); prt->setDriverInfo(prt->description()); @@ -72,8 +72,8 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor if (prt->device().isEmpty()) { TQString prot; - QString smbname(sysconfDir() + "/" + prt->printerName() + "/smbclient.conf"); - QString ncpname(sysconfDir() + "/" + prt->printerName() + "/netware.conf"); + TQString smbname(sysconfDir() + "/" + prt->printerName() + "/smbclient.conf"); + TQString ncpname(sysconfDir() + "/" + prt->printerName() + "/netware.conf"); if (TQFile::exists(smbname)) { TQMap<TQString,TQString> opts = loadVarFile(smbname); @@ -139,19 +139,19 @@ TQMap<TQString,TQString> ApsHandler::loadResources(PrintcapEntry *entry) TQMap<TQString,TQString> ApsHandler::loadVarFile(const TQString& filename) { TQMap<TQString,TQString> opts; - QFile f(filename); + TQFile f(filename); if (f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; int p(-1); while (!t.atEnd()) { line = t.readLine().stripWhiteSpace(); if (line.isEmpty() || line[0] == '#' || (p = line.tqfind('=')) == -1) continue; - QString variable = line.left(p).stripWhiteSpace(); - QString value = line.mid(p+1).stripWhiteSpace(); + TQString variable = line.left(p).stripWhiteSpace(); + TQString value = line.mid(p+1).stripWhiteSpace(); if (!value.isEmpty() && value[0] == '\'') value = value.mid(1, value.length()-2); opts[variable] = value; @@ -166,7 +166,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config if (driver /* && config */ ) // Load resources in all case, to get the correct page size { TQMap<TQString,TQString> opts = loadResources(entry); - if ( !config && opts.contains( "PAPERSIZE" ) ) + if ( !config && opts.tqcontains( "PAPERSIZE" ) ) { // this is needed to keep applications informed // about the current selected page size @@ -209,13 +209,13 @@ void ApsHandler::reset() PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) { - QString prot = prt->deviceProtocol(); + TQString prot = prt->deviceProtocol(); if (prot != "parallel" && prot != "lpd" && prot != "smb" && prot != "ncp") { manager()->setErrorMsg(i18n("Unsupported backend: %1.").arg(prot)); return NULL; } - QString path = sysconfDir() + "/" + prt->printerName(); + TQString path = sysconfDir() + "/" + prt->printerName(); if (!KStandardDirs::makeDir(path, 0755)) { manager()->setErrorMsg(i18n("Unable to create directory %1.").arg(path)); @@ -226,13 +226,13 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) // either "smb" or "ncp" TQFile::remove(path + "/smbclient.conf"); TQFile::remove(path + "/netware.conf"); - QFile f; + TQFile f; if (prot == "smb") { f.setName(path + "/smbclient.conf"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + TQTextStream t(&f); TQString work, server, printer, user, passwd; if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) ) { @@ -275,7 +275,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) uri.replace( 0, 3, "smb" ); if ( splitSmbURI( uri, work, server, printer, user, passwd ) ) { - QTextStream t(&f); + TQTextStream t(&f); t << "NCP_SERVER='" << server << "'" << endl; t << "NCP_PRINTER='" << printer << "'" << endl; if (!user.isEmpty()) @@ -305,7 +305,7 @@ PrintcapEntry* ApsHandler::createEntry(KMPrinter *prt) entry = new PrintcapEntry; entry->addField("lp", Field::String, "/dev/null"); } - QString sd = LprSettings::self()->baseSpoolDir() + "/" + prt->printerName(); + TQString sd = LprSettings::self()->baseSpoolDir() + "/" + prt->printerName(); entry->addField("af", Field::String, sd + "/acct"); entry->addField("lf", Field::String, sd + "/log"); entry->addField("if", Field::String, sysconfDir() + "/basedir/bin/apsfilter"); @@ -322,10 +322,10 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain manager()->setErrorMsg(i18n("The APS driver is not defined.")); return false; } - QFile f(sysconfDir() + "/" + prt->printerName() + "/apsfilterrc"); + TQFile f(sysconfDir() + "/" + prt->printerName() + "/apsfilterrc"); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + TQTextStream t(&f); t << "# File generated by KDEPrint" << endl; t << "PRINTER='" << driver->get("gsdriver") << "'" << endl; TQValueStack<DrGroup*> stack; @@ -337,7 +337,7 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain for (; git.current(); ++git) stack.push(git.current()); TQPtrListIterator<DrBase> oit(grp->options()); - QString value; + TQString value; for (; oit.current(); ++oit) { value = oit.current()->valueText(); @@ -371,7 +371,7 @@ bool ApsHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain bool ApsHandler::removePrinter(KMPrinter*, PrintcapEntry *entry) { - QString path(sysconfDir() + "/" + entry->name); + TQString path(sysconfDir() + "/" + entry->name); TQFile::remove(path + "/smbclient.conf"); TQFile::remove(path + "/netware.conf"); TQFile::remove(path + "/apsfilterrc"); @@ -385,7 +385,7 @@ bool ApsHandler::removePrinter(KMPrinter*, PrintcapEntry *entry) TQString ApsHandler::printOptions(KPrinter *printer) { - QString optstr; + TQString optstr; TQMap<TQString,TQString> opts = printer->options(); for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it) { diff --git a/kdeprint/lpr/editentrydialog.cpp b/kdeprint/lpr/editentrydialog.cpp index 6b0fb63f7..9029a6736 100644 --- a/kdeprint/lpr/editentrydialog.cpp +++ b/kdeprint/lpr/editentrydialog.cpp @@ -34,10 +34,10 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, TQString::null, Ok|Cancel) { - QWidget *w = new TQWidget(this); + TQWidget *w = new TQWidget(this); setMainWidget(w); - QLabel *lab0 = new TQLabel(i18n("Aliases:"), w); + TQLabel *lab0 = new TQLabel(i18n("Aliases:"), w); m_aliases = new TQLineEdit(w); m_view = new KListView(w); m_view->addColumn(""); @@ -55,9 +55,9 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const c m_stack->addWidget(m_number, 1); m_name = new TQLineEdit(w); - QVBoxLayout *l0 = new TQVBoxLayout(w, 0, 10); - QHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10); - QHBoxLayout *l2 = new TQHBoxLayout(0, 0, 5); + TQVBoxLayout *l0 = new TQVBoxLayout(w, 0, 10); + TQHBoxLayout *l1 = new TQHBoxLayout(0, 0, 10); + TQHBoxLayout *l2 = new TQHBoxLayout(0, 0, 5); l0->addLayout(l1); l1->addWidget(lab0); l1->addWidget(m_aliases); @@ -72,7 +72,7 @@ EditEntryDialog::EditEntryDialog(PrintcapEntry *entry, TQWidget *parent, const c setCaption(i18n("Printcap Entry: %1").arg(entry->name)); m_fields = entry->fields; m_aliases->setText(entry->aliases.join("|")); - QListViewItem *root = new TQListViewItem(m_view, entry->name), *item = 0; + TQListViewItem *root = new TQListViewItem(m_view, entry->name), *item = 0; root->setSelectable(false); root->setOpen(true); root->setPixmap(0, SmallIcon("fileprint")); diff --git a/kdeprint/lpr/editentrydialog.h b/kdeprint/lpr/editentrydialog.h index bbde7613c..c51152627 100644 --- a/kdeprint/lpr/editentrydialog.h +++ b/kdeprint/lpr/editentrydialog.h @@ -28,7 +28,7 @@ class TQCheckBox; class TQSpinBox; class TQComboBox; class TQListView; -class QListviewItem; +class TQListviewItem; class TQWidgetStack; class EditEntryDialog : public KDialogBase @@ -49,13 +49,13 @@ protected: private: TQMap<TQString,Field> m_fields; - QLineEdit *m_name, *m_string, *m_aliases; - QCheckBox *m_boolean; - QComboBox *m_type; - QSpinBox *m_number; - QListView *m_view; - QWidgetStack *m_stack; - QString m_current; + TQLineEdit *m_name, *m_string, *m_aliases; + TQCheckBox *m_boolean; + TQComboBox *m_type; + TQSpinBox *m_number; + TQListView *m_view; + TQWidgetStack *m_stack; + TQString m_current; bool m_block; }; diff --git a/kdeprint/lpr/kmconfiglpr.cpp b/kdeprint/lpr/kmconfiglpr.cpp index 95a2e02d4..f9f51b46d 100644 --- a/kdeprint/lpr/kmconfiglpr.cpp +++ b/kdeprint/lpr/kmconfiglpr.cpp @@ -34,13 +34,13 @@ KMConfigLpr::KMConfigLpr(TQWidget *parent, const char *name) setPageHeader(i18n("Spooler Settings")); setPagePixmap("gear"); - QGroupBox *m_modebox = new TQGroupBox(1, Qt::Vertical, i18n("Spooler"), this); + TQGroupBox *m_modebox = new TQGroupBox(1, Qt::Vertical, i18n("Spooler"), this); m_mode = new TQComboBox(m_modebox); m_mode->insertItem("LPR (BSD compatible)"); m_mode->insertItem("LPRng"); - QVBoxLayout *l0 = new TQVBoxLayout(this, 5, 10); + TQVBoxLayout *l0 = new TQVBoxLayout(this, 5, 10); l0->addWidget(m_modebox); l0->addStretch(1); } @@ -54,7 +54,7 @@ void KMConfigLpr::saveConfig(KConfig *conf) { LprSettings::self()->setMode((LprSettings::Mode)(m_mode->currentItem())); - QString modestr; + TQString modestr; switch (m_mode->currentItem()) { default: diff --git a/kdeprint/lpr/kmconfiglpr.h b/kdeprint/lpr/kmconfiglpr.h index 2700e846c..1f88d9fb7 100644 --- a/kdeprint/lpr/kmconfiglpr.h +++ b/kdeprint/lpr/kmconfiglpr.h @@ -33,7 +33,7 @@ public: void saveConfig(KConfig*); private: - QComboBox *m_mode; + TQComboBox *m_mode; }; #endif diff --git a/kdeprint/lpr/kmlprjobmanager.cpp b/kdeprint/lpr/kmlprjobmanager.cpp index f002043d5..67e7a4001 100644 --- a/kdeprint/lpr/kmlprjobmanager.cpp +++ b/kdeprint/lpr/kmlprjobmanager.cpp @@ -60,7 +60,7 @@ int KMLprJobManager::actions() bool KMLprJobManager::sendCommandSystemJob(const TQPtrList<KMJob>& jobs, int action, const TQString& arg) { - QString msg; + TQString msg; TQPtrListIterator<KMJob> it(jobs); bool status(true); LpcHelper *helper = lpcHelper(); diff --git a/kdeprint/lpr/kmlprmanager.cpp b/kdeprint/lpr/kmlprmanager.cpp index 008674a78..d9bcae5e1 100644 --- a/kdeprint/lpr/kmlprmanager.cpp +++ b/kdeprint/lpr/kmlprmanager.cpp @@ -67,7 +67,7 @@ KMLprManager::KMLprManager(TQObject *parent, const char *name, const TQStringLis void KMLprManager::listPrinters() { - QFileInfo fi(LprSettings::self()->printcapFile()); + TQFileInfo fi(LprSettings::self()->printcapFile()); if (m_lpchelper) m_lpchelper->updateStates(); @@ -84,7 +84,7 @@ void KMLprManager::listPrinters() // try to open the printcap file and parse it PrintcapReader reader; - QFile f(fi.absFilePath()); + TQFile f(fi.absFilePath()); PrintcapEntry *entry; if (f.exists() && f.open(IO_ReadOnly)) { @@ -137,7 +137,7 @@ void KMLprManager::initHandlers() insertHandler(new LPRngToolHandler(this)); // now load external handlers - QStringList l = KGlobal::dirs()->findAllResources("data", "kdeprint/lpr/*.la"); + TQStringList l = KGlobal::dirs()->findAllResources("data", "kdeprint/lpr/*.la"); for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { KLibrary *library = KLibLoader::self()->library(TQFile::encodeName(*it)); @@ -158,7 +158,7 @@ void KMLprManager::initHandlers() LprHandler* KMLprManager::findHandler(KMPrinter *prt) { - QString handlerstr(prt->option("kde-lpr-handler")); + TQString handlerstr(prt->option("kde-lpr-handler")); LprHandler *handler(0); if (handlerstr.isEmpty() || (handler = m_handlers.tqfind(handlerstr)) == NULL) { @@ -231,7 +231,7 @@ DrMain* KMLprManager::loadPrinterDriver(KMPrinter *prt, bool config) DrMain* KMLprManager::loadFileDriver(const TQString& filename) { int p = filename.tqfind('/'); - QString handler_str = (p != -1 ? filename.left(p) : TQString::tqfromLatin1("default")); + TQString handler_str = (p != -1 ? filename.left(p) : TQString::tqfromLatin1("default")); LprHandler *handler = m_handlers.tqfind(handler_str); if (handler) { @@ -245,7 +245,7 @@ DrMain* KMLprManager::loadFileDriver(const TQString& filename) bool KMLprManager::enablePrinter(KMPrinter *prt, bool state) { - QString msg; + TQString msg; if (!m_lpchelper->enable(prt, state, msg)) { setErrorMsg(msg); @@ -256,7 +256,7 @@ bool KMLprManager::enablePrinter(KMPrinter *prt, bool state) bool KMLprManager::startPrinter(KMPrinter *prt, bool state) { - QString msg; + TQString msg; if (!m_lpchelper->start(prt, state, msg)) { setErrorMsg(msg); @@ -289,10 +289,10 @@ bool KMLprManager::savePrintcapFile() setErrorMsg(i18n("The printcap file is a remote file (NIS). It cannot be written.")); return false; } - QFile f(LprSettings::self()->printcapFile()); + TQFile f(LprSettings::self()->printcapFile()); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + TQTextStream t(&f); TQDictIterator<PrintcapEntry> it(m_entries); for (; it.current(); ++it) { @@ -338,7 +338,7 @@ bool KMLprManager::createPrinter(KMPrinter *prt) if (!prt->driver() && oldEntry) prt->setDriver(handler->loadDriver(prt, oldEntry, true)); - QString sd = LprSettings::self()->baseSpoolDir(); + TQString sd = LprSettings::self()->baseSpoolDir(); if (sd.isEmpty()) { setErrorMsg(i18n("Couldn't determine spool directory. See options dialog.")); @@ -376,7 +376,7 @@ bool KMLprManager::createPrinter(KMPrinter *prt) // in case of LPRng, we need to tell the daemon about new printer if (LprSettings::self()->mode() == LprSettings::LPRng) { - QString msg; + TQString msg; if (!m_lpchelper->restart(msg)) { setErrorMsg(i18n("The printer has been created but the print daemon " @@ -396,7 +396,7 @@ bool KMLprManager::removePrinter(KMPrinter *prt) { if (handler->removePrinter(prt, entry)) { - QString sd = entry->field("sd"); + TQString sd = entry->field("sd"); // first try to save the printcap file, and if // successful, remove the spool directory m_entries.take(prt->printerName()); @@ -428,10 +428,10 @@ TQString KMLprManager::driverDbCreationProgram() TQString KMLprManager::driverDirectory() { TQPtrListIterator<LprHandler> it(m_handlerlist); - QString dbDirs; + TQString dbDirs; for (; it.current(); ++it) { - QString dir = it.current()->driverDirectory(); + TQString dir = it.current()->driverDirectory(); if (!dir.isEmpty()) dbDirs.append(dir).append(":"); } @@ -443,7 +443,7 @@ TQString KMLprManager::driverDirectory() TQString KMLprManager::printOptions(KPrinter *prt) { KMPrinter *mprt = findPrinter(prt->printerName()); - QString opts; + TQString opts; if (mprt) { LprHandler *handler = findHandler(mprt); diff --git a/kdeprint/lpr/kmlprmanager.h b/kdeprint/lpr/kmlprmanager.h index 516494f95..d95fb7db5 100644 --- a/kdeprint/lpr/kmlprmanager.h +++ b/kdeprint/lpr/kmlprmanager.h @@ -74,7 +74,7 @@ private: TQDict<LprHandler> m_handlers; TQPtrList<LprHandler> m_handlerlist; TQDict<PrintcapEntry> m_entries; - QDateTime m_updtime; + TQDateTime m_updtime; LpcHelper *m_lpchelper; KMPrinter *m_currentprinter; }; diff --git a/kdeprint/lpr/lpchelper.cpp b/kdeprint/lpr/lpchelper.cpp index fb39a37f9..4fa32b8e0 100644 --- a/kdeprint/lpr/lpchelper.cpp +++ b/kdeprint/lpr/lpchelper.cpp @@ -33,10 +33,10 @@ static TQString execute(const TQString& cmd) { KPipeProcess proc; - QString output; + TQString output; if (proc.open(cmd)) { - QTextStream t(&proc); + TQTextStream t(&proc); while (!t.atEnd()) output.append(t.readLine()).append("\n"); proc.close(); @@ -49,7 +49,7 @@ LpcHelper::LpcHelper(TQObject *parent, const char *name) { // look for the "lpc" executable. Use the PATH variable and // add some specific dirs. - QString PATH = getenv("PATH"); + TQString PATH = getenv("PATH"); PATH.append(":/usr/sbin:/usr/local/sbin:/sbin:/opt/sbin:/opt/local/sbin"); m_exepath = KStandardDirs::findExe("lpc", PATH); m_checkpcpath = KStandardDirs::findExe("checkpc", PATH); @@ -62,7 +62,7 @@ LpcHelper::~LpcHelper() KMPrinter::PrinterState LpcHelper::state(const TQString& prname) const { - if (m_state.contains(prname)) + if (m_state.tqcontains(prname)) return m_state[prname]; return KMPrinter::Unknown; } @@ -74,7 +74,7 @@ KMPrinter::PrinterState LpcHelper::state(KMPrinter *prt) const void LpcHelper::parseStatusLPR(TQTextStream &t) { - QString printer, line; + TQString printer, line; int p(-1); while (!t.atEnd()) @@ -109,9 +109,9 @@ void LpcHelper::parseStatusLPR(TQTextStream &t) void LpcHelper::parseStatusLPRng(TQTextStream& t) { - QStringList l; + TQStringList l; int p(-1); - QString printer; + TQString printer; while (!t.atEnd()) if (t.readLine().stripWhiteSpace().startsWith("Printer")) @@ -146,7 +146,7 @@ void LpcHelper::updateStates() m_state.clear(); if (!m_exepath.isEmpty() && proc.open(m_exepath + " status all")) { - QTextStream t(&proc); + TQTextStream t(&proc); switch (LprSettings::self()->mode()) { @@ -211,7 +211,7 @@ static TQString lprngAnswer(const TQString& result, const TQString& printer) { q = result.tqfind(':', p)+2; p = result.tqfind('\n', q); - QString answer = result.mid(q, p-q).stripWhiteSpace(); + TQString answer = result.mid(q, p-q).stripWhiteSpace(); return answer; } return TQString::null; @@ -219,7 +219,7 @@ static TQString lprngAnswer(const TQString& result, const TQString& printer) int LpcHelper::parseStateChangeLPRng(const TQString& result, const TQString& printer) { - QString answer = lprngAnswer(result, printer); + TQString answer = lprngAnswer(result, printer); if (answer == "no") return -1; else if (answer == "disabled" || answer == "enabled" || answer == "started" || answer == "stopped") @@ -235,7 +235,7 @@ bool LpcHelper::changeState(const TQString& printer, const TQString& op, TQStrin msg = i18n("The executable %1 couldn't be found in your PATH.").arg("lpc"); return false; } - QString result = execute(m_exepath + " " + op + " " + KProcess::quote(printer)); + TQString result = execute(m_exepath + " " + op + " " + KProcess::quote(printer)); int status; switch (LprSettings::self()->mode()) @@ -273,7 +273,7 @@ bool LpcHelper::removeJob(KMJob *job, TQString& msg) msg = i18n("The executable %1 couldn't be found in your PATH.").arg("lprm"); return false; } - QString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + TQString::number(job->id())); + TQString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + TQString::number(job->id())); if (result.tqfind("dequeued") != -1) return true; else if (result.tqfind("Permission denied") != -1 || result.tqfind("no permissions") != -1) @@ -291,8 +291,8 @@ bool LpcHelper::changeJobState(KMJob *job, int state, TQString& msg) msg = i18n("The executable %1 couldn't be found in your PATH.").arg("lpc"); return false; } - QString result = execute(m_exepath + (state == KMJob::Held ? " hold " : " release ") + KProcess::quote(job->printer()) + " " + TQString::number(job->id())); - QString answer = lprngAnswer(result, job->printer()); + TQString result = execute(m_exepath + (state == KMJob::Held ? " hold " : " release ") + KProcess::quote(job->printer()) + " " + TQString::number(job->id())); + TQString answer = lprngAnswer(result, job->printer()); if (answer == "no") { msg = i18n("Permission denied."); @@ -304,7 +304,7 @@ bool LpcHelper::changeJobState(KMJob *job, int state, TQString& msg) bool LpcHelper::restart(TQString& msg) { - QString s; + TQString s; if (m_exepath.isEmpty()) s = "lpc"; else if (m_checkpcpath.isEmpty()) diff --git a/kdeprint/lpr/lpchelper.h b/kdeprint/lpr/lpchelper.h index 2c711f41b..8f2590065 100644 --- a/kdeprint/lpr/lpchelper.h +++ b/kdeprint/lpr/lpchelper.h @@ -53,7 +53,7 @@ protected: private: TQMap<TQString, KMPrinter::PrinterState> m_state; - QString m_exepath, m_lprmpath, m_checkpcpath; + TQString m_exepath, m_lprmpath, m_checkpcpath; }; #endif diff --git a/kdeprint/lpr/lpqhelper.cpp b/kdeprint/lpr/lpqhelper.cpp index aa8e19879..bbc70da3a 100644 --- a/kdeprint/lpr/lpqhelper.cpp +++ b/kdeprint/lpr/lpqhelper.cpp @@ -38,7 +38,7 @@ LpqHelper::~LpqHelper() KMJob* LpqHelper::parseLineLpr(const TQString& line) { - QString rank = line.left(7); + TQString rank = line.left(7); if (!rank[0].isDigit() && rank != "active") return NULL; KMJob *job = new KMJob; @@ -56,13 +56,13 @@ KMJob* LpqHelper::parseLineLpr(const TQString& line) KMJob* LpqHelper::parseLineLPRng(const TQString& line) { - QString rank = line.left(7).stripWhiteSpace(); + TQString rank = line.left(7).stripWhiteSpace(); if (!rank[0].isDigit() && rank != "active" && rank != "hold") return NULL; KMJob *job = new KMJob; job->setState((rank[0].isDigit() ? KMJob::Queued : (rank == "hold" ? KMJob::Held : KMJob::Printing))); int p = line.tqfind('@', 7), q = line.tqfind(' ', 7); - job->setOwner(line.mid(7, QMIN(p,q)-7)); + job->setOwner(line.mid(7, TQMIN(p,q)-7)); while (line[q].isSpace()) q++; q++; @@ -85,8 +85,8 @@ void LpqHelper::listJobs(TQPtrList<KMJob>& jobs, const TQString& prname, int lim KPipeProcess proc; if (!m_exepath.isEmpty() && proc.open(m_exepath + " -P " + KProcess::quote(prname))) { - QTextStream t(&proc); - QString line; + TQTextStream t(&proc); + TQString line; bool lprng = (LprSettings::self()->mode() == LprSettings::LPRng); int count = 0; diff --git a/kdeprint/lpr/lpqhelper.h b/kdeprint/lpr/lpqhelper.h index d79903f57..59965fb62 100644 --- a/kdeprint/lpr/lpqhelper.h +++ b/kdeprint/lpr/lpqhelper.h @@ -38,7 +38,7 @@ protected: KMJob* parseLineLPRng(const TQString&); private: - QString m_exepath; + TQString m_exepath; }; #endif diff --git a/kdeprint/lpr/lprhandler.cpp b/kdeprint/lpr/lprhandler.cpp index 4a2a96b0f..1cacfae85 100644 --- a/kdeprint/lpr/lprhandler.cpp +++ b/kdeprint/lpr/lprhandler.cpp @@ -121,7 +121,7 @@ PrintcapEntry* LprHandler::createEntry(KMPrinter *prt) { // this default handler only supports local parallel and remote lpd URIs KURL uri ( prt->device() ); - QString prot = uri.protocol(); + TQString prot = uri.protocol(); if (!prot.isEmpty() && prot != "parallel" && prot != "file" && prot != "lpd" && prot != "socket") { manager()->setErrorMsg(i18n("Unsupported backend: %1.").arg(prot)); @@ -132,7 +132,7 @@ PrintcapEntry* LprHandler::createEntry(KMPrinter *prt) if (prot == "lpd") { entry->addField("rm", Field::String, uri.host()); - QString rp = uri.path(); + TQString rp = uri.path(); if (rp[0] == '/') rp = rp.mid(1); entry->addField("rp", Field::String, rp); @@ -172,13 +172,13 @@ void LprHandler::reset() DrMain* LprHandler::loadToolDriver(const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (f.open(IO_ReadOnly)) { DrMain *driver = new DrMain; TQValueStack<DrGroup*> groups; - QTextStream t(&f); - QStringList l; + TQTextStream t(&f); + TQStringList l; DrListOption *lopt(0); DrBase *opt(0); @@ -259,10 +259,10 @@ TQString LprHandler::driverDirInternal() TQString LprHandler::locateDir(const TQString& dirname, const TQString& paths) { - QStringList pathlist = TQStringList::split(':', paths, false); + TQStringList pathlist = TQStringList::split(':', paths, false); for (TQStringList::ConstIterator it=pathlist.begin(); it!=pathlist.end(); ++it) { - QString testpath = *it + "/" + dirname; + TQString testpath = *it + "/" + dirname; if (::access(TQFile::encodeName(testpath), F_OK) == 0) return testpath; } diff --git a/kdeprint/lpr/lprhandler.h b/kdeprint/lpr/lprhandler.h index 98b9c3819..eaab2557f 100644 --- a/kdeprint/lpr/lprhandler.h +++ b/kdeprint/lpr/lprhandler.h @@ -68,9 +68,9 @@ protected: virtual TQString driverDirInternal(); protected: - QString m_name; + TQString m_name; KMManager *m_manager; - QString m_cacheddriverdir; + TQString m_cacheddriverdir; }; inline TQString LprHandler::name() const diff --git a/kdeprint/lpr/lprngtoolhandler.cpp b/kdeprint/lpr/lprngtoolhandler.cpp index 624b74114..aea703ea5 100644 --- a/kdeprint/lpr/lprngtoolhandler.cpp +++ b/kdeprint/lpr/lprngtoolhandler.cpp @@ -47,10 +47,10 @@ bool LPRngToolHandler::validate(PrintcapEntry *entry) bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shortmode) { - QString str, lp; + TQString str, lp; // look for type in comment - QStringList l = TQStringList::split(' ', entry->comment, false); + TQStringList l = TQStringList::split(' ', entry->comment, false); lp = entry->field("lp"); if (l.count() < 1) return false; @@ -60,7 +60,7 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo else if (l[1] == "SMB") { TQMap<TQString,TQString> opts = parseXferOptions(entry->field("xfer_options")); - QString user, pass; + TQString user, pass; loadAuthFile(LprSettings::self()->baseSpoolDir() + "/" + entry->name + "/" + opts["authfile"], user, pass); TQString uri = buildSmbURI( opts[ "workgroup" ], @@ -81,7 +81,7 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo //{ if (!(str=entry->field("ifhp")).isEmpty()) { - QString model; + TQString model; int p = str.tqfind("model"); if (p != -1) { @@ -107,7 +107,7 @@ TQMap<TQString,TQString> LPRngToolHandler::parseXferOptions(const TQString& str) { uint p(0), q; TQMap<TQString,TQString> opts; - QString key, val; + TQString key, val; while (p < str.length()) { @@ -132,11 +132,11 @@ TQMap<TQString,TQString> LPRngToolHandler::parseXferOptions(const TQString& str) void LPRngToolHandler::loadAuthFile(const TQString& filename, TQString& user, TQString& pass) { - QFile f(filename); + TQFile f(filename); if (f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; while (!t.atEnd()) { line = t.readLine().stripWhiteSpace(); @@ -145,7 +145,7 @@ void LPRngToolHandler::loadAuthFile(const TQString& filename, TQString& user, TQ int p = line.tqfind('='); if (p != -1) { - QString key = line.left(p); + TQString key = line.left(p); if (key == "username") user = line.mid(p+1); else if (key == "password") @@ -166,7 +166,7 @@ DrMain* LPRngToolHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool DrMain* driver = loadToolDriver(locate("data", "kdeprint/lprngtooldriver1")); if (driver) { - QString model = prt->option("driverID"); + TQString model = prt->option("driverID"); driver->set("text", i18n("LPRngTool Common Driver (%1)").arg((model.isEmpty() ? i18n("unknown") : model))); if (!model.isEmpty()) driver->set("driverID", model); @@ -189,22 +189,22 @@ DrMain* LPRngToolHandler::loadDbDriver(const TQString& s) return driver; } -TQValueList< QPair<TQString,TQStringList> > LPRngToolHandler::loadChoiceDict(const TQString& filename) +TQValueList< TQPair<TQString,TQStringList> > LPRngToolHandler::loadChoiceDict(const TQString& filename) { - QFile f(filename); - TQValueList< QPair<TQString,TQStringList> > dict; + TQFile f(filename); + TQValueList< TQPair<TQString,TQStringList> > dict; if (f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line, key; - QStringList l; + TQTextStream t(&f); + TQString line, key; + TQStringList l; while (!t.atEnd()) { line = t.readLine().stripWhiteSpace(); if (line.startsWith("OPTION")) { if (l.count() > 0 && !key.isEmpty()) - dict << QPair<TQString,TQStringList>(key, l); + dict << TQPair<TQString,TQStringList>(key, l); l.clear(); key = TQString::null; if (line.contains('|') == 2 || line.right(7) == "BOOLEAN") @@ -226,18 +226,18 @@ TQValueList< QPair<TQString,TQStringList> > LPRngToolHandler::loadChoiceDict(con TQMap<TQString,TQString> LPRngToolHandler::parseZOptions(const TQString& optstr) { TQMap<TQString,TQString> opts; - QStringList l = TQStringList::split(',', optstr, false); + TQStringList l = TQStringList::split(',', optstr, false); if (l.count() == 0) return opts; if (m_dict.count() == 0) m_dict = loadChoiceDict(locate("data", "kdeprint/lprngtooldriver1")); - QString unknown; + TQString unknown; for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { bool found(false); - for (TQValueList< QPair<TQString,TQStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p) + for (TQValueList< TQPair<TQString,TQStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p) { if ((*p).second.tqfind(*it) != (*p).second.end()) { @@ -270,7 +270,7 @@ TQString LPRngToolHandler::driverDirInternal() PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt) { - QString prot = prt->deviceProtocol(); + TQString prot = prt->deviceProtocol(); if (prot != "parallel" && prot != "lpd" && prot != "smb" && prot != "socket") { manager()->setErrorMsg(i18n("Unsupported backend: %1.").arg(prot)); @@ -278,7 +278,7 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt) } PrintcapEntry *entry = new PrintcapEntry; entry->addField("cm", Field::String, prt->description()); - QString lp, comment("##LPRNGTOOL## "); + TQString lp, comment("##LPRNGTOOL## "); if (prot == "parallel") { comment.append("DEVICE "); @@ -305,14 +305,14 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt) { comment.append("SMB "); lp = "| " + filterDir() + "/smbprint"; - QString work, server, printer, user, passwd; + TQString work, server, printer, user, passwd; if ( splitSmbURI( prt->device(), work, server, printer, user, passwd ) ) { entry->addField("xfer_options", Field::String, TQString::tqfromLatin1("authfile=\"auth\" crlf=\"0\" hostip=\"\" host=\"%1\" printer=\"%2\" remote_mode=\"SMB\" share=\"//%3/%4\" workgroup=\"%5\"").arg(server).arg(printer).arg(server).arg(printer).arg(work)); - QFile authfile(LprSettings::self()->baseSpoolDir() + "/" + prt->printerName() + "/auth"); + TQFile authfile(LprSettings::self()->baseSpoolDir() + "/" + prt->printerName() + "/auth"); if (authfile.open(IO_WriteOnly)) { - QTextStream t(&authfile); + TQTextStream t(&authfile); t << "username=" << user << endl; t << "password=" << passwd << endl; authfile.close(); @@ -334,7 +334,7 @@ PrintcapEntry* LPRngToolHandler::createEntry(KMPrinter *prt) entry->addField("ifhp", Field::String, TQString::tqfromLatin1("model=%1,status@,sync@,pagecount@,waitend@").arg(driver->get("driverID"))); entry->addField("lprngtooloptions", Field::String, TQString::tqfromLatin1("FILTERTYPE=\"IFHP\" IFHP_OPTIONS=\"status@,sync@,pagecount@,waitend@\" PRINTERDB_ENTRY=\"%1\"").arg(driver->get("driverID"))); TQMap<TQString,TQString> opts; - QString optstr; + TQString optstr; driver->getOptions(opts, false); for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it) if (it.key() != "lpr") @@ -358,7 +358,7 @@ bool LPRngToolHandler::savePrinterDriver(KMPrinter*, PrintcapEntry *entry, DrMai { // save options in the "prefix_z" field and tell the manager to save the printcap file TQMap<TQString,TQString> opts; - QString optstr; + TQString optstr; driver->getOptions(opts, false); for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it) if (it.key() != "lpr") @@ -376,7 +376,7 @@ bool LPRngToolHandler::savePrinterDriver(KMPrinter*, PrintcapEntry *entry, DrMai TQString LPRngToolHandler::printOptions(KPrinter *printer) { - QString optstr; + TQString optstr; TQMap<TQString,TQString> opts = printer->options(); for (TQMap<TQString,TQString>::ConstIterator it=opts.begin(); it!=opts.end(); ++it) { diff --git a/kdeprint/lpr/lprngtoolhandler.h b/kdeprint/lpr/lprngtoolhandler.h index 6d7ec299f..e8843dc64 100644 --- a/kdeprint/lpr/lprngtoolhandler.h +++ b/kdeprint/lpr/lprngtoolhandler.h @@ -41,14 +41,14 @@ public: protected: TQMap<TQString,TQString> parseXferOptions(const TQString&); void loadAuthFile(const TQString&, TQString&, TQString&); - TQValueList< QPair<TQString,TQStringList> > loadChoiceDict(const TQString&); + TQValueList< TQPair<TQString,TQStringList> > loadChoiceDict(const TQString&); TQMap<TQString,TQString> parseZOptions(const TQString&); TQString filterDir(); TQString driverDirInternal(); private: - TQValueList< QPair<TQString,TQStringList> > m_dict; + TQValueList< TQPair<TQString,TQStringList> > m_dict; }; #endif diff --git a/kdeprint/lpr/lprsettings.cpp b/kdeprint/lpr/lprsettings.cpp index 15eef4126..a1a632a0f 100644 --- a/kdeprint/lpr/lprsettings.cpp +++ b/kdeprint/lpr/lprsettings.cpp @@ -55,7 +55,7 @@ void LprSettings::init() // LPR/LPRng mode KConfig *conf = KMFactory::self()->printConfig(); conf->setGroup("LPR"); - QString modestr = conf->readEntry("Mode"); + TQString modestr = conf->readEntry("Mode"); if (modestr == "LPRng") m_mode = LPRng; else if (modestr == "LPR") @@ -70,7 +70,7 @@ void LprSettings::init() } // Printcap file - m_printcapfile = TQString::null; + m_printcapfile = TQString(); m_local = true; // Spool directory @@ -89,14 +89,14 @@ TQString LprSettings::printcapFile() TQFile cf(LPDCONF); if (cf.open(IO_ReadOnly)) { - QTextStream t(&cf); - QString line; + TQTextStream t(&cf); + TQString line; while (!t.atEnd()) { line = t.readLine().stripWhiteSpace(); if (line.startsWith("printcap_path")) { - QString filename = line.mid(14).stripWhiteSpace(); + TQString filename = line.mid(14).stripWhiteSpace(); if (filename[0] != '|') m_printcapfile = filename; else @@ -120,14 +120,14 @@ TQString LprSettings::defaultRemoteHost() TQFile cf(LPDCONF); if (cf.open(IO_ReadOnly)) { - QTextStream t(&cf); - QString line; + TQTextStream t(&cf); + TQString line; while (!t.atEnd()) { line = t.readLine().stripWhiteSpace(); if (line.startsWith("default_remote_host")) { - QString hostname = line.mid(20).stripWhiteSpace(); + TQString hostname = line.mid(20).stripWhiteSpace(); m_defaultremotehost = hostname; } } diff --git a/kdeprint/lpr/matichandler.cpp b/kdeprint/lpr/matichandler.cpp index 9f830c821..1625571d7 100644 --- a/kdeprint/lpr/matichandler.cpp +++ b/kdeprint/lpr/matichandler.cpp @@ -44,7 +44,7 @@ MaticHandler::MaticHandler(KMManager *mgr) : LprHandler("foomatic", mgr) { - QString PATH = getenv("PATH"); + TQString PATH = getenv("PATH"); PATH.append(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); m_exematicpath = KStandardDirs::findExe("lpdomatic", PATH); m_ncpath = KStandardDirs::findExe("nc"); @@ -76,7 +76,7 @@ KMPrinter* MaticHandler::createPrinter(PrintcapEntry *entry) bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shortmode) { - QString val = entry->field("lp"); + TQString val = entry->field("lp"); if (val == "/dev/null" || val.isEmpty()) { prt->setLocation(i18n("Network printer")); @@ -98,13 +98,13 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh Foomatic2Loader loader; if ( loader.readFromFile( maticFile( entry ) ) ) { - QString postpipe = loader.data()[ "POSTPIPE" ].toString(); + TQString postpipe = loader.data()[ "POSTPIPE" ].toString(); if (!postpipe.isEmpty()) { KURL url ( parsePostpipe(postpipe) ); if (!url.isEmpty()) { - QString ds = TQString::tqfromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol()); + TQString ds = TQString::tqfromLatin1("%1 (%2)").arg(prt->location()).arg(url.protocol()); prt->setDevice(url.url()); prt->setLocation(ds); } @@ -125,9 +125,9 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh TQString MaticHandler::parsePostpipe(const TQString& s) { - QString url; - int p = s.findRev('|'); - QStringList args = TQStringList::split(" ", s.right(s.length()-p-1)); + TQString url; + int p = s.tqfindRev('|'); + TQStringList args = TQStringList::split(" ", s.right(s.length()-p-1)); if (args.count() != 0) { @@ -143,8 +143,8 @@ TQString MaticHandler::parsePostpipe(const TQString& s) // smb printer else if (args[0].right(10) == "/smbclient") { - QStringList host_components = TQStringList::split(TQRegExp("/|\\\\\""), args[1], false); - QString workgrp, user, pass; + TQStringList host_components = TQStringList::split(TQRegExp("/|\\\\\""), args[1], false); + TQString workgrp, user, pass; for (uint i=2; i<args.count(); i++) { if (args[i] == "-U") @@ -166,7 +166,7 @@ TQString MaticHandler::parsePostpipe(const TQString& s) i++; else { - QString host = (args[i].length() == 2 ? args[i+1] : args[i].right(args[i].length()-2)); + TQString host = (args[i].length() == 2 ? args[i+1] : args[i].right(args[i].length()-2)); int p = host.tqfind("\\@"); if (p != -1) { @@ -184,8 +184,8 @@ TQString MaticHandler::parsePostpipe(const TQString& s) TQString MaticHandler::createPostpipe(const TQString& _url) { KURL url( _url ); - QString prot = url.protocol(); - QString str; + TQString prot = url.protocol(); + TQString str; if (prot == "socket") { str += ("| " + m_ncpath); @@ -196,7 +196,7 @@ TQString MaticHandler::createPostpipe(const TQString& _url) else if (prot == "lpd") { str += ("| " + m_rlprpath + " -q -h"); - QString h = url.host(), p = url.path().mid(1); + TQString h = url.host(), p = url.path().mid(1); str += (" -P " + p + "\\@" + h); } else if (prot == "smb") @@ -223,8 +223,8 @@ DrMain* MaticHandler::loadDriver(KMPrinter*, PrintcapEntry *entry, bool) // we need to use a copy of the driver, as the driver // is not self-contained. If the printer is removed (when // changing printer name), the template would be also removed - QString origfilename = maticFile(entry); - QString filename = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); + TQString origfilename = maticFile(entry); + TQString filename = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); ::system(TQFile::encodeName("cp " + KProcess::quote(origfilename) + " " + KProcess::quote(filename))); DrMain *driver = Foomatic2Loader::loadDriver(filename); if (driver) @@ -239,16 +239,16 @@ DrMain* MaticHandler::loadDriver(KMPrinter*, PrintcapEntry *entry, bool) DrMain* MaticHandler::loadDbDriver(const TQString& path) { - QStringList comps = TQStringList::split('/', path, false); + TQStringList comps = TQStringList::split('/', path, false); if (comps.count() < 3 || comps[0] != "foomatic") { manager()->setErrorMsg(i18n("Internal error.")); return NULL; } - QString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); - QString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); - QString exe = KStandardDirs::findExe("foomatic-datafile", PATH); + TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); + TQString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { manager()->setErrorMsg(i18n("Unable to find the executable foomatic-datafile " @@ -257,7 +257,7 @@ DrMain* MaticHandler::loadDbDriver(const TQString& path) } KPipeProcess in; - QFile out(tmpFile); + TQFile out(tmpFile); TQString cmd = KProcess::quote(exe); cmd += " -t lpd -d "; cmd += KProcess::quote(comps[2]); @@ -265,8 +265,8 @@ DrMain* MaticHandler::loadDbDriver(const TQString& path) cmd += KProcess::quote(comps[1]); if (in.open(cmd) && out.open(IO_WriteOnly)) { - QTextStream tin(&in), tout(&out); - QString line; + TQTextStream tin(&in), tout(&out); + TQString line; while (!tin.atEnd()) { line = tin.readLine(); @@ -291,16 +291,16 @@ DrMain* MaticHandler::loadDbDriver(const TQString& path) bool MaticHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMain *driver, bool*) { - QFile tmpFile(locateLocal("tmp", "foomatic_" + kapp->randomString(8))); - QFile inFile(driver->get("template")); - QString outFile = maticFile(entry); + TQFile tmpFile(locateLocal("tmp", "foomatic_" + kapp->randomString(8))); + TQFile inFile(driver->get("template")); + TQString outFile = maticFile(entry); bool result(false); - QString postpipe = createPostpipe(prt->device()); + TQString postpipe = createPostpipe(prt->device()); if (inFile.open(IO_ReadOnly) && tmpFile.open(IO_WriteOnly)) { - QTextStream tin(&inFile), tout(&tmpFile); - QString line, optname; + TQTextStream tin(&inFile), tout(&tmpFile); + TQString line, optname; int p(-1), q(-1); if (!postpipe.isEmpty()) tout << "$postpipe = \"" << postpipe << "\";" << endl; @@ -329,7 +329,7 @@ bool MaticHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMai inFile.close(); tmpFile.close(); - QString cmd = "mv " + KProcess::quote(tmpFile.name()) + " " + KProcess::quote(outFile); + TQString cmd = "mv " + KProcess::quote(tmpFile.name()) + " " + KProcess::quote(outFile); int status = ::system(TQFile::encodeName(cmd).data()); TQFile::remove(tmpFile.name()); result = (status != -1 && WEXITSTATUS(status) == 0); @@ -347,12 +347,12 @@ bool MaticHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMai bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename) { - QString mdriver(driver->get("matic_driver")), mprinter(driver->get("matic_printer")); + TQString mdriver(driver->get("matic_driver")), mprinter(driver->get("matic_printer")); if (mdriver.isEmpty() || mprinter.isEmpty()) return true; - QString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); - QString exe = KStandardDirs::findExe("foomatic-datafile", PATH); + TQString PATH = getenv("PATH") + TQString::tqfromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); + TQString exe = KStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { manager()->setErrorMsg(i18n("Unable to find the executable foomatic-datafile " @@ -361,12 +361,12 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename) } KPipeProcess in; - QFile out(filename); + TQFile out(filename); if (in.open(exe + " -t cups -d " + mdriver + " -p " + mprinter) && out.open(IO_WriteOnly)) { - QTextStream tin(&in), tout(&out); - QString line, optname; - QRegExp re("^\\*Default(\\w+):"), foo("'name'\\s+=>\\s+'(\\w+)'"), foo2("'\\w+'\\s*,\\s*$"); + TQTextStream tin(&in), tout(&out); + TQString line, optname; + TQRegExp re("^\\*Default(\\w+):"), foo("'name'\\s+=>\\s+'(\\w+)'"), foo2("'\\w+'\\s*,\\s*$"); while (!tin.atEnd()) { line = tin.readLine(); @@ -388,7 +388,7 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename) DrBase *opt = driver->findOption(re.cap(1)); if (opt) { - QString val = opt->valueText(); + TQString val = opt->valueText(); if (opt->type() == DrBase::Boolean) val = (val == "1" ? "True" : "False"); tout << "*Default" << opt->name() << ": " << val << endl; @@ -412,7 +412,7 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename) PrintcapEntry* MaticHandler::createEntry(KMPrinter *prt) { KURL url( prt->device() ); - QString prot = url.protocol(); + TQString prot = url.protocol(); if ((prot != "lpd" || m_rlprpath.isEmpty()) && (prot != "socket" || m_ncpath.isEmpty()) && (prot != "smb" || m_smbpath.isEmpty()) && @@ -449,7 +449,7 @@ PrintcapEntry* MaticHandler::createEntry(KMPrinter *prt) bool MaticHandler::removePrinter(KMPrinter *prt, PrintcapEntry *entry) { // remove Foomatic driver - QString af = entry->field("af"); + TQString af = entry->field("af"); if (af.isEmpty()) return true; if (!TQFile::remove(af)) @@ -463,7 +463,7 @@ bool MaticHandler::removePrinter(KMPrinter *prt, PrintcapEntry *entry) TQString MaticHandler::printOptions(KPrinter *printer) { TQMap<TQString,TQString> opts = printer->options(); - QString str; + TQString str; for (TQMap<TQString,TQString>::Iterator it=opts.begin(); it!=opts.end(); ++it) { if (it.key().startsWith("kde-") || it.key().startsWith("_kde-") || it.key().startsWith( "app-" )) diff --git a/kdeprint/lpr/matichandler.h b/kdeprint/lpr/matichandler.h index a7111f5ff..db376f264 100644 --- a/kdeprint/lpr/matichandler.h +++ b/kdeprint/lpr/matichandler.h @@ -50,8 +50,8 @@ private: bool savePpdFile(DrMain*, const TQString&); private: - QString m_exematicpath; - QString m_ncpath, m_smbpath, m_rlprpath; + TQString m_exematicpath; + TQString m_ncpath, m_smbpath, m_rlprpath; }; #endif diff --git a/kdeprint/lpr/matichelper.cpp b/kdeprint/lpr/matichelper.cpp index 544db8c71..acc968331 100644 --- a/kdeprint/lpr/matichelper.cpp +++ b/kdeprint/lpr/matichelper.cpp @@ -23,13 +23,13 @@ TQString maticFile(PrintcapEntry *entry) { - QString s(entry->field("af")); + TQString s(entry->field("af")); if (s.isEmpty()) { s = entry->field("filter_options"); if (!s.isEmpty()) { - int p = s.findRev(' '); + int p = s.tqfindRev(' '); if (p != -1) s = s.mid(p+1); } diff --git a/kdeprint/lpr/printcapentry.cpp b/kdeprint/lpr/printcapentry.cpp index 419a532a9..3f3af643b 100644 --- a/kdeprint/lpr/printcapentry.cpp +++ b/kdeprint/lpr/printcapentry.cpp @@ -21,7 +21,7 @@ TQString Field::toString() const { - QString s = name; + TQString s = name; switch (type) { case String: diff --git a/kdeprint/lpr/printcapentry.h b/kdeprint/lpr/printcapentry.h index 15adafddd..e1c785760 100644 --- a/kdeprint/lpr/printcapentry.h +++ b/kdeprint/lpr/printcapentry.h @@ -52,8 +52,8 @@ public: TQString toString() const; Type type; - QString name; - QString value; + TQString name; + TQString value; }; /** @@ -66,13 +66,13 @@ public: class PrintcapEntry { public: - QString name; - QStringList aliases; - QString comment; + TQString name; + TQStringList aliases; + TQString comment; TQMap<TQString,Field> fields; - QString postcomment; + TQString postcomment; - bool has(const TQString& f) const { return fields.contains(f); } + bool has(const TQString& f) const { return fields.tqcontains(f); } TQString field(const TQString& f) const { return fields[f].value; } bool writeEntry(TQTextStream&); void addField(const TQString& name, Field::Type type = Field::Boolean, const TQString& value = TQString::null); diff --git a/kdeprint/lpr/printcapreader.cpp b/kdeprint/lpr/printcapreader.cpp index 7abd094f9..4a5ce5ea7 100644 --- a/kdeprint/lpr/printcapreader.cpp +++ b/kdeprint/lpr/printcapreader.cpp @@ -27,7 +27,7 @@ void PrintcapReader::setPrintcapFile(TQFile *f) { if (f->isOpen()) { - m_stream.setDevice(f); + m_stream.setDevice(TQT_TQIODEVICE(f)); m_buffer = TQString::null; } } @@ -56,7 +56,7 @@ void PrintcapReader::unputLine(const TQString& s) PrintcapEntry* PrintcapReader::nextEntry() { - if (!m_stream.device()) + if (!m_stream.tqdevice()) return NULL; TQString line, comment, name, fields, buf; 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 diff --git a/kdeprint/marginpreview.cpp b/kdeprint/marginpreview.cpp index b41a14388..191d1850c 100644 --- a/kdeprint/marginpreview.cpp +++ b/kdeprint/marginpreview.cpp @@ -126,9 +126,9 @@ void MarginPreview::resizeEvent(TQResizeEvent *) void MarginPreview::paintEvent(TQPaintEvent *) { - QPainter p(this); + TQPainter p(this); - QRect pagebox(TQPoint(box_.left()-1,box_.top()-1),TQPoint(box_.right()+2,box_.bottom()+2)); + TQRect pagebox(TQPoint(box_.left()-1,box_.top()-1),TQPoint(box_.right()+2,box_.bottom()+2)); if (nopreview_) { @@ -212,22 +212,22 @@ void MarginPreview::mouseMoveEvent(TQMouseEvent *e) switch (state_) { case TMoving: - newpos = QMIN(QMAX(e->pos().y(), box_.top()), (symetric_ ? (box_.top()+box_.bottom())/2 : margbox_.bottom()+1)); + newpos = TQMIN(TQMAX(e->pos().y(), box_.top()), (symetric_ ? (box_.top()+box_.bottom())/2 : margbox_.bottom()+1)); break; case BMoving: - newpos = QMIN(QMAX(e->pos().y(), (symetric_? (box_.top()+box_.bottom()+1)/2 : margbox_.top()-1)), box_.bottom()); + newpos = TQMIN(TQMAX(e->pos().y(), (symetric_? (box_.top()+box_.bottom()+1)/2 : margbox_.top()-1)), box_.bottom()); break; case LMoving: - newpos = QMIN(QMAX(e->pos().x(), box_.left()), (symetric_ ? (box_.left()+box_.right())/2 : margbox_.right()+1)); + newpos = TQMIN(TQMAX(e->pos().x(), box_.left()), (symetric_ ? (box_.left()+box_.right())/2 : margbox_.right()+1)); break; case RMoving: - newpos = QMIN(QMAX(e->pos().x(), (symetric_ ? (box_.left()+box_.right()+1)/2 : margbox_.left()-1)), box_.right()); + newpos = TQMIN(TQMAX(e->pos().x(), (symetric_ ? (box_.left()+box_.right()+1)/2 : margbox_.left()-1)), box_.right()); break; } if (newpos != oldpos_) { - QPainter p(this); - p.setRasterOp(Qt::XorROP); + TQPainter p(this); + p.setRasterOp(TQt::XorROP); p.setPen(gray); for (int i=0; i<2; i++, oldpos_ = newpos) { @@ -275,8 +275,8 @@ void MarginPreview::mouseReleaseEvent(TQMouseEvent *e) { if (state_ > None) { - QPainter p(this); - p.setRasterOp(Qt::XorROP); + TQPainter p(this); + p.setRasterOp(TQt::XorROP); p.setPen(gray); if (oldpos_ >= 0) { diff --git a/kdeprint/marginpreview.h b/kdeprint/marginpreview.h index 7722b73c7..a9d1165b7 100644 --- a/kdeprint/marginpreview.h +++ b/kdeprint/marginpreview.h @@ -54,7 +54,7 @@ protected: private: float width_, height_; float top_, bottom_, left_, right_; - QRect box_, margbox_; + TQRect box_, margbox_; float zoom_; bool nopreview_; int state_; diff --git a/kdeprint/marginwidget.cpp b/kdeprint/marginwidget.cpp index 6061736a6..bb745b072 100644 --- a/kdeprint/marginwidget.cpp +++ b/kdeprint/marginwidget.cpp @@ -194,7 +194,7 @@ MarginWidget::MarginWidget(TQWidget *parent, const char* name, bool allowMetricU m_right->setEnabled(false); //m_units->setEnabled(false); - QGridLayout *l3 = new TQGridLayout(this, 7, 2, 0, 10); + TQGridLayout *l3 = new TQGridLayout(this, 7, 2, 0, 10); l3->addWidget(m_custom, 0, 0); l3->addWidget(m_top, 1, 0); l3->addWidget(m_bottom, 2, 0); diff --git a/kdeprint/marginwidget.h b/kdeprint/marginwidget.h index c526c9f9a..2a493dedf 100644 --- a/kdeprint/marginwidget.h +++ b/kdeprint/marginwidget.h @@ -64,8 +64,8 @@ protected: private: MarginValueWidget *m_top, *m_bottom, *m_left, *m_right; MarginPreview *m_preview; - QComboBox *m_units; - QCheckBox *m_custom; + TQComboBox *m_units; + TQCheckBox *m_custom; bool m_symetric, m_block; TQValueVector<float> m_default; TQValueVector<float> m_pagesize; diff --git a/kdeprint/messagewindow.cpp b/kdeprint/messagewindow.cpp index 553d78e21..5504fa411 100644 --- a/kdeprint/messagewindow.cpp +++ b/kdeprint/messagewindow.cpp @@ -31,7 +31,7 @@ TQPtrDict<MessageWindow> MessageWindow::m_windows; MessageWindow::MessageWindow( const TQString& txt, int delay, TQWidget *parent, const char *name ) - : TQWidget( parent, name, WStyle_Customize|WStyle_NoBorder|WShowModal|WType_Dialog|WDestructiveClose ) + : TQWidget( parent, name, (WFlags)(WStyle_Customize|WStyle_NoBorder|WShowModal|WType_Dialog|WDestructiveClose) ) { TQHBox *box = new TQHBox( this ); box->setFrameStyle( TQFrame::Panel|TQFrame::Raised ); diff --git a/kdeprint/plugincombobox.cpp b/kdeprint/plugincombobox.cpp index b6533353a..02934b0d9 100644 --- a/kdeprint/plugincombobox.cpp +++ b/kdeprint/plugincombobox.cpp @@ -42,19 +42,19 @@ PluginComboBox::PluginComboBox(TQWidget *parent, const char *name) m_combo = new TQComboBox(this, "PluginCombo"); TQWhatsThis::add(m_combo, whatsThisCurrentPrintsystem); - QLabel *m_label = new TQLabel(i18n("Print s&ystem currently used:"), this); + TQLabel *m_label = new TQLabel(i18n("Print s&ystem currently used:"), this); TQWhatsThis::add(m_label, whatsThisCurrentPrintsystem); m_label->tqsetAlignment(AlignVCenter|AlignRight); m_label->setBuddy(m_combo); m_plugininfo = new TQLabel("Plugin information", this); - QGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 5); + TQGridLayout *l0 = new TQGridLayout(this, 2, 2, 0, 5); l0->setColStretch(0, 1); l0->addWidget(m_label, 0, 0); l0->addWidget(m_combo, 0, 1); l0->addWidget(m_plugininfo, 1, 1); TQValueList<KMFactory::PluginInfo> list = KMFactory::self()->pluginList(); - QString currentPlugin = KMFactory::self()->printSystem(); + TQString currentPlugin = KMFactory::self()->printSystem(); for (TQValueList<KMFactory::PluginInfo>::ConstIterator it=list.begin(); it!=list.end(); ++it) { m_combo->insertItem((*it).comment); @@ -69,7 +69,7 @@ PluginComboBox::PluginComboBox(TQWidget *parent, const char *name) void PluginComboBox::slotActivated(int index) { - QString plugin = m_pluginlist[index]; + TQString plugin = m_pluginlist[index]; if (!plugin.isEmpty()) { // the factory will notify all registered objects of the change @@ -79,9 +79,9 @@ void PluginComboBox::slotActivated(int index) void PluginComboBox::reload() { - QString syst = KMFactory::self()->printSystem(); + TQString syst = KMFactory::self()->printSystem(); int index(-1); - if ((index=m_pluginlist.findIndex(syst)) != -1) + if ((index=m_pluginlist.tqfindIndex(syst)) != -1) m_combo->setCurrentItem(index); configChanged(); } diff --git a/kdeprint/plugincombobox.h b/kdeprint/plugincombobox.h index 94fea9974..ddfc8a89c 100644 --- a/kdeprint/plugincombobox.h +++ b/kdeprint/plugincombobox.h @@ -42,9 +42,9 @@ protected: void configChanged(); private: - QComboBox *m_combo; - QLabel *m_plugininfo; - QStringList m_pluginlist; + TQComboBox *m_combo; + TQLabel *m_plugininfo; + TQStringList m_pluginlist; }; #endif diff --git a/kdeprint/posterpreview.cpp b/kdeprint/posterpreview.cpp index f3535de25..c4685f719 100644 --- a/kdeprint/posterpreview.cpp +++ b/kdeprint/posterpreview.cpp @@ -61,7 +61,7 @@ void PosterPreview::init() m_dirty = false; setDirty(); setMouseTracking( true ); - setBackgroundMode( Qt::NoBackground ); + setBackgroundMode( TQt::NoBackground ); } void PosterPreview::parseBuffer() @@ -144,7 +144,7 @@ void PosterPreview::drawContents( TQPainter *painter ) p->drawRect( x, y, m_pw, m_ph ); if ( pw > 0 && ph > 0 ) p->fillRect( x+m_mw+px, y+m_mh+py, QMIN( pw, m_pw-2*m_mw-px ), QMIN( ph, m_ph-2*m_mh-py ), - ( selected ? KGlobalSettings::highlightColor().dark( 160 ) : lightGray ) ); + ( selected ? TQColor(KGlobalSettings::highlightColor().dark( 160 )) : lightGray ) ); p->setPen( Qt::DotLine ); p->drawRect( x+m_mw, y+m_mh, m_pw-2*m_mw, m_ph-2*m_mh ); p->setPen( Qt::SolidLine ); @@ -188,9 +188,9 @@ void PosterPreview::mousePressEvent( TQMouseEvent *e ) int pagenum = ( r-1 )*m_cols+c; if ( m_selectedpages.tqfind( pagenum ) == m_selectedpages.end() || - !( e->state() & Qt::ShiftButton ) ) + !( e->state() & TQt::ShiftButton ) ) { - if ( !( e->state() & Qt::ShiftButton ) ) + if ( !( e->state() & TQt::ShiftButton ) ) m_selectedpages.clear(); m_selectedpages.append( pagenum ); update(); diff --git a/kdeprint/ppdloader.cpp b/kdeprint/ppdloader.cpp index 035038a7a..32721a45b 100644 --- a/kdeprint/ppdloader.cpp +++ b/kdeprint/ppdloader.cpp @@ -220,7 +220,7 @@ bool PPDLoader::endUi( const TQString& name ) else grp = m_groups.top(); grp->addOption( m_option ); - if ( grp->get( "text" ).contains( "install", false ) ) + if ( grp->get( "text" ).tqcontains( "install", false ) ) m_option->set( "fixed", "1" ); } m_option = 0; diff --git a/kdeprint/ppdparser.cpp b/kdeprint/ppdparser.cpp index 00710b152..ace79dbab 100644 --- a/kdeprint/ppdparser.cpp +++ b/kdeprint/ppdparser.cpp @@ -120,7 +120,7 @@ * Boston, MA 02110-1301, USA. **/ -#define YYSTYPE QStringList +#define YYSTYPE TQStringList #define YYPARSE_PARAM ppdloader #define YYDEBUG 1 #define YYERROR_VERBOSE 1 diff --git a/kdeprint/ppdparser.y b/kdeprint/ppdparser.y index afe9fdc58..37b130b88 100644 --- a/kdeprint/ppdparser.y +++ b/kdeprint/ppdparser.y @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. **/ -#define YYSTYPE QStringList +#define YYSTYPE TQStringList #define YYPARSE_PARAM ppdloader #define YYDEBUG 1 #define YYERROR_VERBOSE 1 diff --git a/kdeprint/ppdscanner.cpp b/kdeprint/ppdscanner.cpp index 1b138a491..213e08507 100644 --- a/kdeprint/ppdscanner.cpp +++ b/kdeprint/ppdscanner.cpp @@ -540,7 +540,7 @@ char *yytext; #include <tqstringlist.h> #include <tqiodevice.h> -#define YYSTYPE QStringList +#define YYSTYPE TQStringList #include "ppdparser.cpp.h" #define yylval kdeprint_ppdlval @@ -933,7 +933,7 @@ YY_RULE_SETUP case 24: YY_RULE_SETUP #line 100 "./ppdscanner.l" -{ yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].contains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; } +{ yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].tqcontains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; } YY_BREAK case 25: YY_RULE_SETUP diff --git a/kdeprint/ppdscanner.l b/kdeprint/ppdscanner.l index b71edcd89..851ee290e 100644 --- a/kdeprint/ppdscanner.l +++ b/kdeprint/ppdscanner.l @@ -20,7 +20,7 @@ #include <qstringlist.h> #include <qiodevice.h> -#define YYSTYPE QStringList +#define YYSTYPE TQStringList #include "ppdparser.cpp.h" #define yylval kdeprint_ppdlval @@ -97,7 +97,7 @@ L [[:alnum:]] /** * Value state */ -<value>\"[^\"]*\" { yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].contains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; } +<value>\"[^\"]*\" { yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].tqcontains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; } <value>{WORD} { yylval = yytext; QDEBUG1("String part: %s",yytext); return STRINGPART; } <value>"/" { BEGIN(translation_2); return '/'; } <value>"\n" { kdeprint_ppdscanner_lno++; BEGIN(INITIAL); } diff --git a/kdeprint/printerfilter.h b/kdeprint/printerfilter.h index 7deb9d345..df92d6a9f 100644 --- a/kdeprint/printerfilter.h +++ b/kdeprint/printerfilter.h @@ -26,7 +26,7 @@ class KMPrinter; -class PrinterFilter : QObject +class PrinterFilter : TQObject { public: PrinterFilter(TQObject *parent = 0, const char *name = 0); @@ -38,8 +38,8 @@ public: bool isEnabled() const; private: - QRegExp m_locationRe; - QStringList m_printers; + TQRegExp m_locationRe; + TQStringList m_printers; bool m_enabled; }; diff --git a/kdeprint/rlpr/kmconfigproxy.cpp b/kdeprint/rlpr/kmconfigproxy.cpp index 0676fc7e6..6be500e8f 100644 --- a/kdeprint/rlpr/kmconfigproxy.cpp +++ b/kdeprint/rlpr/kmconfigproxy.cpp @@ -31,7 +31,7 @@ KMConfigProxy::KMConfigProxy(TQWidget *parent) setPagePixmap("proxy"); m_widget = new KMProxyWidget(this); - QVBoxLayout *lay0 = new TQVBoxLayout(this, 5, 0); + TQVBoxLayout *lay0 = new TQVBoxLayout(this, 5, 0); lay0->addWidget(m_widget); lay0->addStretch(1); } diff --git a/kdeprint/rlpr/kmproprlpr.cpp b/kdeprint/rlpr/kmproprlpr.cpp index 3296949a3..c40a3985e 100644 --- a/kdeprint/rlpr/kmproprlpr.cpp +++ b/kdeprint/rlpr/kmproprlpr.cpp @@ -31,11 +31,11 @@ KMPropRlpr::KMPropRlpr(TQWidget *parent, const char *name) m_host = new TQLabel("",this); m_queue = new TQLabel("",this); - QLabel *l1 = new TQLabel(i18n("Host:"), this); - QLabel *l2 = new TQLabel(i18n("Queue:"), this); + TQLabel *l1 = new TQLabel(i18n("Host:"), this); + TQLabel *l2 = new TQLabel(i18n("Queue:"), 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); diff --git a/kdeprint/rlpr/kmproprlpr.h b/kdeprint/rlpr/kmproprlpr.h index cc6631fa1..630bdf671 100644 --- a/kdeprint/rlpr/kmproprlpr.h +++ b/kdeprint/rlpr/kmproprlpr.h @@ -36,8 +36,8 @@ protected: void configureWizard(KMWizard*); private: - QLabel *m_host; - QLabel *m_queue; + TQLabel *m_host; + TQLabel *m_queue; }; #endif diff --git a/kdeprint/rlpr/kmproxywidget.cpp b/kdeprint/rlpr/kmproxywidget.cpp index c6dd59189..daf4b7665 100644 --- a/kdeprint/rlpr/kmproxywidget.cpp +++ b/kdeprint/rlpr/kmproxywidget.cpp @@ -31,13 +31,13 @@ KMProxyWidget::KMProxyWidget(TQWidget *parent, const char *name) : TQGroupBox(0, Qt::Vertical, i18n("Proxy Settings"), parent, name) { - QLabel *m_hostlabel = new TQLabel(i18n("&Host:"), this); - QLabel *m_portlabel = new TQLabel(i18n("&Port:"), this); + TQLabel *m_hostlabel = new TQLabel(i18n("&Host:"), this); + TQLabel *m_portlabel = new TQLabel(i18n("&Port:"), this); m_useproxy = new TQCheckBox(i18n("&Use proxy server"), this); m_useproxy->setCursor(KCursor::handCursor()); m_proxyhost = new TQLineEdit(this); m_proxyport = new TQLineEdit(this); - m_proxyport->setValidator(new TQIntValidator(m_proxyport)); + m_proxyport->setValidator(new TQIntValidator(TQT_TQOBJECT(m_proxyport))); m_hostlabel->setBuddy(m_proxyhost); m_portlabel->setBuddy(m_proxyport); @@ -46,7 +46,7 @@ KMProxyWidget::KMProxyWidget(TQWidget *parent, const char *name) m_proxyhost->setEnabled(false); m_proxyport->setEnabled(false); - QGridLayout *lay0 = new TQGridLayout(layout(), 3, 2, 10); + TQGridLayout *lay0 = new TQGridLayout(layout(), 3, 2, 10); lay0->setColStretch(1,1); lay0->addMultiCellWidget(m_useproxy,0,0,0,1); lay0->addWidget(m_hostlabel,1,0); diff --git a/kdeprint/rlpr/kmproxywidget.h b/kdeprint/rlpr/kmproxywidget.h index 4d2799a67..85dcbf111 100644 --- a/kdeprint/rlpr/kmproxywidget.h +++ b/kdeprint/rlpr/kmproxywidget.h @@ -35,9 +35,9 @@ public: void saveConfig(KConfig*); private: - QLineEdit *m_proxyhost; - QLineEdit *m_proxyport; - QCheckBox *m_useproxy; + TQLineEdit *m_proxyhost; + TQLineEdit *m_proxyport; + TQCheckBox *m_useproxy; }; #endif diff --git a/kdeprint/rlpr/kmrlprmanager.cpp b/kdeprint/rlpr/kmrlprmanager.cpp index 718969116..3a5460dda 100644 --- a/kdeprint/rlpr/kmrlprmanager.cpp +++ b/kdeprint/rlpr/kmrlprmanager.cpp @@ -59,7 +59,7 @@ bool KMRlprManager::createPrinter(KMPrinter *p) bool KMRlprManager::removePrinter(KMPrinter *p) { - if (m_printers.findRef(p) == -1) + if (m_printers.tqfindRef(p) == -1) setErrorMsg(i18n("Printer not found.")); else { @@ -78,7 +78,7 @@ bool KMRlprManager::testPrinter(KMPrinter *) void KMRlprManager::listPrinters() { - QFileInfo pfi(printerFile()); + TQFileInfo pfi(printerFile()); if (pfi.exists() && (!m_checktime.isValid() || m_checktime < pfi.lastModified())) { loadPrintersConf(pfi.absFilePath()); @@ -90,17 +90,17 @@ void KMRlprManager::listPrinters() void KMRlprManager::loadPrintersConf(const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; while (!t.eof()) { line = t.readLine().stripWhiteSpace(); if (line.isEmpty() || line[0] == '#') continue; - QStringList w = TQStringList::split('\t',line,true); + TQStringList w = TQStringList::split('\t',line,true); if (w.count() < 3) continue; @@ -130,18 +130,18 @@ void KMRlprManager::savePrinters() void KMRlprManager::savePrintersConf(const TQString& filename) { - QFile f(filename); + TQFile f(filename); if (f.open(IO_WriteOnly)) { - QTextStream t(&f); + TQTextStream t(&f); t << "# File generated by KDE print system. Don't edit by hand." << endl; TQPtrListIterator<KMPrinter> it(m_printers); for (;it.current();++it) { if (!it.current()->name().isEmpty() && it.current()->instanceName().isEmpty()) { - QString host = it.current()->option("host"); - QString queue = it.current()->option("queue"); + TQString host = it.current()->option("host"); + TQString queue = it.current()->option("queue"); if (!host.isEmpty() && !queue.isEmpty()) { t << it.current()->name() << '\t' << host << '\t' << queue; diff --git a/kdeprint/rlpr/kmrlprmanager.h b/kdeprint/rlpr/kmrlprmanager.h index eb47f95df..dbc0f1096 100644 --- a/kdeprint/rlpr/kmrlprmanager.h +++ b/kdeprint/rlpr/kmrlprmanager.h @@ -42,7 +42,7 @@ protected: TQString printerFile(); private: - QDateTime m_checktime; + TQDateTime m_checktime; }; #endif diff --git a/kdeprint/rlpr/kmwrlpr.cpp b/kdeprint/rlpr/kmwrlpr.cpp index 915bf74ae..5e87be982 100644 --- a/kdeprint/rlpr/kmwrlpr.cpp +++ b/kdeprint/rlpr/kmwrlpr.cpp @@ -32,9 +32,9 @@ #include <klocale.h> #include <kiconloader.h> -static TQListViewItem* findChild(TQListViewItem *c, const TQString& txt) +static TQListViewItem* rlpr_findChild(TQListViewItem *c, const TQString& txt) { - QListViewItem *item(c); + TQListViewItem *item(c); while (item) if (item->text(0) == txt) return item; else item = item->nextSibling(); @@ -59,14 +59,14 @@ KMWRlpr::KMWRlpr(TQWidget *parent, const char *name) m_view->setSorting(0); m_host = new TQLineEdit(this); m_queue = new TQLineEdit(this); - QLabel *m_hostlabel = new TQLabel(i18n("Host:"), this); - QLabel *m_queuelabel = new TQLabel(i18n("Queue:"), this); + TQLabel *m_hostlabel = new TQLabel(i18n("Host:"), this); + TQLabel *m_queuelabel = new TQLabel(i18n("Queue:"), this); m_hostlabel->setBuddy(m_host); m_queuelabel->setBuddy(m_queue); connect(m_view,TQT_SIGNAL(selectionChanged(TQListViewItem*)),TQT_SLOT(slotPrinterSelected(TQListViewItem*))); - QHBoxLayout *lay0 = new TQHBoxLayout(this, 0, 10); - QVBoxLayout *lay1 = new TQVBoxLayout(0, 0, 5); + TQHBoxLayout *lay0 = new TQHBoxLayout(this, 0, 10); + TQVBoxLayout *lay1 = new TQVBoxLayout(0, 0, 5); lay0->addWidget(m_view,1); lay0->addLayout(lay1,1); lay1->addWidget(m_hostlabel); @@ -94,13 +94,13 @@ void KMWRlpr::initPrinter(KMPrinter *p) { m_host->setText(p->option("host")); m_queue->setText(p->option("queue")); - QListViewItem *item = findChild(m_view->firstChild(),m_host->text()); + TQListViewItem *item = rlpr_findChild(m_view->firstChild(),m_host->text()); if (item) { - item = findChild(item->firstChild(),m_queue->text()); + item = rlpr_findChild(item->firstChild(),m_queue->text()); if (item) { - item->parent()->setOpen(true); + item->tqparent()->setOpen(true); m_view->setCurrentItem(item); m_view->ensureItemVisible(item); } @@ -109,7 +109,7 @@ void KMWRlpr::initPrinter(KMPrinter *p) void KMWRlpr::updatePrinter(KMPrinter *p) { - QString uri = TQString::tqfromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text()); + TQString uri = TQString::tqfromLatin1("lpd://%1/%2").arg(m_host->text()).arg(m_queue->text()); p->setDevice(uri); p->setOption("host",m_host->text()); p->setOption("queue",m_queue->text()); @@ -128,12 +128,12 @@ void KMWRlpr::updatePrinter(KMPrinter *p) void KMWRlpr::initialize() { m_view->clear(); - QFile f(TQDir::homeDirPath()+"/.rlprrc"); + TQFile f(TQDir::homeDirPath()+"/.rlprrc"); if (!f.exists()) f.setName("/etc/rlprrc"); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line, host; + TQTextStream t(&f); + TQString line, host; int p(-1); while (!t.eof()) { @@ -143,12 +143,12 @@ void KMWRlpr::initialize() if ((p=line.tqfind(':')) != -1) { host = line.left(p).stripWhiteSpace(); - QListViewItem *hitem = new TQListViewItem(m_view,host); + TQListViewItem *hitem = new TQListViewItem(m_view,host); hitem->setPixmap(0,SmallIcon("kdeprint_computer")); - QStringList prs = TQStringList::split(' ',line.right(line.length()-p-1),false); + TQStringList prs = TQStringList::split(' ',line.right(line.length()-p-1),false); for (TQStringList::ConstIterator it=prs.begin(); it!=prs.end(); ++it) { - QListViewItem *pitem = new TQListViewItem(hitem,*it); + TQListViewItem *pitem = new TQListViewItem(hitem,*it); pitem->setPixmap(0,SmallIcon("kdeprint_printer")); } } @@ -160,9 +160,9 @@ void KMWRlpr::initialize() f.setName("/etc/printcap"); if (f.exists() && f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString line, buffer; - QListViewItem *hitem(m_view->firstChild()); + TQTextStream t(&f); + TQString line, buffer; + TQListViewItem *hitem(m_view->firstChild()); while (hitem) if (hitem->text(0) == "localhost") break; else hitem = hitem->nextSibling(); while (!t.eof()) { @@ -183,13 +183,13 @@ void KMWRlpr::initialize() int p = buffer.tqfind(':'); if (p != -1) { - QString name = buffer.left(p); + TQString name = buffer.left(p); if (!hitem) { hitem = new TQListViewItem(m_view,"localhost"); hitem->setPixmap(0,SmallIcon("kdeprint_computer")); } - QListViewItem *pitem = new TQListViewItem(hitem,name); + TQListViewItem *pitem = new TQListViewItem(hitem,name); pitem->setPixmap(0,SmallIcon("kdeprint_printer")); } } @@ -203,7 +203,7 @@ void KMWRlpr::slotPrinterSelected(TQListViewItem *item) { if (item && item->depth() == 1) { - m_host->setText(item->parent()->text(0)); + m_host->setText(item->tqparent()->text(0)); m_queue->setText(item->text(0)); } } diff --git a/kdeprint/rlpr/kmwrlpr.h b/kdeprint/rlpr/kmwrlpr.h index c71f51144..14be9aee0 100644 --- a/kdeprint/rlpr/kmwrlpr.h +++ b/kdeprint/rlpr/kmwrlpr.h @@ -44,7 +44,7 @@ protected: private: KListView *m_view; - QLineEdit *m_host, *m_queue; + TQLineEdit *m_host, *m_queue; }; #endif diff --git a/kdeprint/tools/escputil/escpwidget.cpp b/kdeprint/tools/escputil/escpwidget.cpp index 4a65a380d..e01cb6771 100644 --- a/kdeprint/tools/escputil/escpwidget.cpp +++ b/kdeprint/tools/escputil/escpwidget.cpp @@ -42,14 +42,14 @@ protected: TQObject* createObject(TQObject *parent = 0, const char *name = 0, const char * className = "TQObject", const TQStringList& args = TQStringList()) { Q_UNUSED(className); - KDialogBase *dlg = new KDialogBase(static_cast<TQWidget*>(parent), name, true, i18n("EPSON InkJet Printer Utilities"), KDialogBase::Close); + KDialogBase *dlg = new KDialogBase(TQT_TQWIDGET(parent), name, true, i18n("EPSON InkJet Printer Utilities"), KDialogBase::Close); EscpWidget *w = new EscpWidget(dlg); if (args.count() > 0) w->setDevice(args[0]); if (args.count() > 1) w->setPrinterName(args[1]); dlg->setMainWidget(w); - return dlg; + return TQT_TQOBJECT(dlg); } }; @@ -71,18 +71,18 @@ EscpWidget::EscpWidget(TQWidget *parent, const char *name) connect(&m_proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), TQT_SLOT(slotReceivedStdout(KProcess*,char*,int))); connect(&m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), TQT_SLOT(slotReceivedStderr(KProcess*,char*,int))); - QPushButton *cleanbtn = new TQPushButton(this, "-c"); + TQPushButton *cleanbtn = new TQPushButton(this, "-c"); cleanbtn->setPixmap(DesktopIcon("exec")); - QPushButton *nozzlebtn = new TQPushButton(this, "-n"); + TQPushButton *nozzlebtn = new TQPushButton(this, "-n"); nozzlebtn->setPixmap(DesktopIcon("exec")); - QPushButton *alignbtn = new TQPushButton(this, "-a"); + TQPushButton *alignbtn = new TQPushButton(this, "-a"); alignbtn->setPixmap(DesktopIcon("exec")); - QPushButton *inkbtn = new TQPushButton(this, "-i"); + TQPushButton *inkbtn = new TQPushButton(this, "-i"); inkbtn->setPixmap(DesktopIcon("kdeprint_inklevel")); - QPushButton *identbtn = new TQPushButton(this, "-d"); + TQPushButton *identbtn = new TQPushButton(this, "-d"); identbtn->setPixmap(DesktopIcon("exec")); - QFont f(font()); + TQFont f(font()); f.setBold(true); m_printer = new TQLabel(this); m_printer->setFont(f); @@ -96,15 +96,15 @@ EscpWidget::EscpWidget(TQWidget *parent, const char *name) connect(inkbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked())); connect(identbtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonClicked())); - QLabel *printerlab = new TQLabel(i18n("Printer:"), this); + TQLabel *printerlab = new TQLabel(i18n("Printer:"), this); printerlab->tqsetAlignment(AlignRight|AlignVCenter); - QLabel *devicelab = new TQLabel(i18n("Device:"), this); + TQLabel *devicelab = new TQLabel(i18n("Device:"), this); devicelab->tqsetAlignment(AlignRight|AlignVCenter); - QLabel *cleanlab = new TQLabel(i18n("Clea&n print head"), this); - QLabel *nozzlelab = new TQLabel(i18n("&Print a nozzle test pattern"), this); - QLabel *alignlab = new TQLabel(i18n("&Align print head"), this); - QLabel *inklab = new TQLabel(i18n("&Ink level"), this); - QLabel *identlab = new TQLabel(i18n("P&rinter identification"), this); + TQLabel *cleanlab = new TQLabel(i18n("Clea&n print head"), this); + TQLabel *nozzlelab = new TQLabel(i18n("&Print a nozzle test pattern"), this); + TQLabel *alignlab = new TQLabel(i18n("&Align print head"), this); + TQLabel *inklab = new TQLabel(i18n("&Ink level"), this); + TQLabel *identlab = new TQLabel(i18n("P&rinter identification"), this); cleanlab->tqsetAlignment(AlignLeft|AlignVCenter|ShowPrefix); nozzlelab->tqsetAlignment(AlignLeft|AlignVCenter|ShowPrefix); @@ -121,8 +121,8 @@ EscpWidget::EscpWidget(TQWidget *parent, const char *name) KSeparator *sep = new KSeparator(this); sep->setFixedHeight(10); - QGridLayout *l0 = new TQGridLayout(this, 8, 2, 10, 10); - QGridLayout *l1 = new TQGridLayout(0, 2, 2, 0, 5); + TQGridLayout *l0 = new TQGridLayout(this, 8, 2, 10, 10); + TQGridLayout *l1 = new TQGridLayout(0, 2, 2, 0, 5); l0->addMultiCellLayout(l1, 0, 0, 0, 1); l1->addWidget(printerlab, 0, 0); l1->addWidget(devicelab, 1, 0); @@ -155,7 +155,7 @@ void EscpWidget::startCommand(const TQString& arg) } else { - QString protocol = m_deviceURL.protocol(); + TQString protocol = m_deviceURL.protocol(); if (protocol == "usb") useUSB = true; else if (protocol != "file" && protocol != "parallel" && protocol != "serial" && !protocol.isEmpty()) @@ -173,7 +173,7 @@ void EscpWidget::startCommand(const TQString& arg) return; } - QString exestr = KStandardDirs::findExe("escputil"); + TQString exestr = KStandardDirs::findExe("escputil"); if (exestr.isEmpty()) { KMessageBox::error(this, i18n("The executable escputil cannot be found in your " @@ -211,8 +211,8 @@ void EscpWidget::slotProcessExited(KProcess*) setEnabled(true); if (!m_proc.normalExit() || m_proc.exitStatus() != 0) { - QString msg1 = "<qt>"+i18n("Operation terminated with errors.")+"</qt>"; - QString msg2; + TQString msg1 = "<qt>"+i18n("Operation terminated with errors.")+"</qt>"; + TQString msg2; if (!m_outbuffer.isEmpty()) msg2 += "<p><b><u>"+i18n("Output")+"</u></b></p><p>"+m_outbuffer+"</p>"; if (!m_errorbuffer.isEmpty()) @@ -231,19 +231,19 @@ void EscpWidget::slotProcessExited(KProcess*) void EscpWidget::slotReceivedStdout(KProcess*, char *buf, int len) { - QString bufstr = TQCString(buf, len); + TQString bufstr = TQCString(buf, len); m_outbuffer.append(bufstr); } void EscpWidget::slotReceivedStderr(KProcess*, char *buf, int len) { - QString bufstr = TQCString(buf, len); + TQString bufstr = TQCString(buf, len); m_errorbuffer.append(bufstr); } void EscpWidget::slotButtonClicked() { - QString arg = sender()->name(); + TQString arg = TQT_TQOBJECT_CONST(sender())->name(); startCommand(arg); } diff --git a/kdeprint/tools/escputil/escpwidget.h b/kdeprint/tools/escputil/escpwidget.h index 9cc0f2d38..809bb89c3 100644 --- a/kdeprint/tools/escputil/escpwidget.h +++ b/kdeprint/tools/escputil/escpwidget.h @@ -48,9 +48,9 @@ protected: private: KProcess m_proc; KURL m_deviceURL; - QString m_errorbuffer, m_outbuffer; - QLabel *m_printer, *m_device; - QCheckBox *m_useraw; + TQString m_errorbuffer, m_outbuffer; + TQLabel *m_printer, *m_device; + TQCheckBox *m_useraw; bool m_hasoutput; }; diff --git a/kdeprint/treecombobox.cpp b/kdeprint/treecombobox.cpp index 752562e62..d36db7092 100644 --- a/kdeprint/treecombobox.cpp +++ b/kdeprint/treecombobox.cpp @@ -43,8 +43,8 @@ TreeListBoxItem::TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQStr } else { - QString parentStr = txt.left(txt.length()-m_path[m_depth].length()-1); - TreeListBoxItem *parentItem = static_cast<TreeListBoxItem*>(lb->findItem(parentStr, Qt::ExactMatch)); + TQString parentStr = txt.left(txt.length()-m_path[m_depth].length()-1); + TreeListBoxItem *parentItem = static_cast<TreeListBoxItem*>(lb->tqfindItem(parentStr, TQt::ExactMatch)); if (!parentItem) { // parent not found, add parent first into QListBox diff --git a/kdeprint/treecombobox.h b/kdeprint/treecombobox.h index fa31c4471..c50be34d2 100644 --- a/kdeprint/treecombobox.h +++ b/kdeprint/treecombobox.h @@ -39,7 +39,7 @@ protected: int stepSize() const { return 16; } private: - QStringList m_path; + TQStringList m_path; int m_depth; TreeListBoxItem *m_child, *m_next, *m_parent; }; @@ -70,7 +70,7 @@ public: void insertItem(const TQPixmap& pix, const TQString& txt, bool oneBlock = false); private: - QListBox *m_listbox; + TQListBox *m_listbox; }; #endif diff --git a/kdeprint/util.cpp b/kdeprint/util.cpp index 01e276ae1..28e9afcba 100644 --- a/kdeprint/util.cpp +++ b/kdeprint/util.cpp @@ -54,7 +54,7 @@ KURL smbToUrl(const TQString& s) else { // assumes URL starts with "smb://" - QString username = s.mid(6, p-6); + TQString username = s.mid(6, p-6); url = KURL("smb://" + KURL::encode_string(s.mid(p+1))); int q = username.tqfind(':'); if (q == -1) |