diff options
Diffstat (limited to 'kdeprint/cups')
78 files changed, 410 insertions, 410 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; }; |