diff options
author | Timothy Pearson <[email protected]> | 2011-12-15 15:34:15 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-15 15:34:15 -0600 |
commit | 031454e56009d576589c28757f6c6fcf4884095e (patch) | |
tree | ad4c9959d05a814c9090e8fe63ba27057903271b /src/fetchdialog.cpp | |
parent | 54011e0e1af8cd96162160ecf5d361a59a2c733e (diff) | |
download | tellico-031454e56009d576589c28757f6c6fcf4884095e.tar.gz tellico-031454e56009d576589c28757f6c6fcf4884095e.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/fetchdialog.cpp')
-rw-r--r-- | src/fetchdialog.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/fetchdialog.cpp b/src/fetchdialog.cpp index 11a719d..77f04d5 100644 --- a/src/fetchdialog.cpp +++ b/src/fetchdialog.cpp @@ -41,7 +41,7 @@ #include <kaccelmanager.h> #include <ktextedit.h> -#include <tqlayout.h> +#include <layout.h> #include <tqhbox.h> #include <tqvgroupbox.h> #include <tqsplitter.h> @@ -112,19 +112,19 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_) m_searchButton = new KPushButton(box1); m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_STOP), - SmallIconSet(TQString::tqfromLatin1("cancel")))); + SmallIconSet(TQString::fromLatin1("cancel")))); connect(m_searchButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSearchClicked())); TQWhatsThis::add(m_searchButton, i18n("Click to start or stop the search")); // the search button's text changes from search to stop // I don't want it resizing, so figure out the maximum size and set that m_searchButton->polish(); - int maxWidth = m_searchButton->tqsizeHint().width(); - int maxHeight = m_searchButton->tqsizeHint().height(); + int maxWidth = m_searchButton->sizeHint().width(); + int maxHeight = m_searchButton->sizeHint().height(); m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_SEARCH), - SmallIconSet(TQString::tqfromLatin1("find")))); - maxWidth = TQMAX(maxWidth, m_searchButton->tqsizeHint().width()); - maxHeight = TQMAX(maxHeight, m_searchButton->tqsizeHint().height()); + SmallIconSet(TQString::fromLatin1("find")))); + maxWidth = TQMAX(maxWidth, m_searchButton->sizeHint().width()); + maxHeight = TQMAX(maxHeight, m_searchButton->sizeHint().height()); m_searchButton->setMinimumWidth(maxWidth); m_searchButton->setMinimumHeight(maxHeight); @@ -135,7 +135,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_) TQWhatsThis::add(m_multipleISBN, i18n("Check this box to search for multiple ISBN or UPC values.")); connect(m_multipleISBN, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotMultipleISBN(bool))); - m_editISBN = new KPushButton(KGuiItem(i18n("Edit List..."), TQString::tqfromLatin1("text_block")), box2); + m_editISBN = new KPushButton(KGuiItem(i18n("Edit List..."), TQString::fromLatin1("text_block")), box2); m_editISBN->setEnabled(false); TQWhatsThis::add(m_editISBN, i18n("Click to open a text edit box for entering or editing multiple ISBN values.")); connect(m_editISBN, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditMultipleISBN())); @@ -181,7 +181,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_) // don't bother creating funky gradient images for compact view m_entryView->setUseGradientImages(false); // set the xslt file AFTER setting the gradient image option - m_entryView->setXSLTFile(TQString::tqfromLatin1("Compact.xsl")); + m_entryView->setXSLTFile(TQString::fromLatin1("Compact.xsl")); TQWhatsThis::add(m_entryView->view(), i18n("An entry may be shown here before adding it to the " "current collection by selecting it in the list above")); @@ -195,7 +195,7 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_) connect(m_addButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddEntry())); TQWhatsThis::add(m_addButton, i18n("Add the selected entry to the current collection")); - m_moreButton = new KPushButton(KGuiItem(i18n("Get More Results"), SmallIconSet(TQString::tqfromLatin1("find"))), box3); + m_moreButton = new KPushButton(KGuiItem(i18n("Get More Results"), SmallIconSet(TQString::fromLatin1("find"))), box3); m_moreButton->setEnabled(false); connect(m_moreButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoreClicked())); TQWhatsThis::add(m_moreButton, i18n("Fetch more results from the current data source")); @@ -223,9 +223,9 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_) connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotMoveProgress())); setMinimumWidth(TQMAX(minimumWidth(), FETCH_MIN_WIDTH)); - settqStatus(i18n("Ready.")); + setStatus(i18n("Ready.")); - resize(configDialogSize(TQString::tqfromLatin1("Fetch Dialog Options"))); + resize(configDialogSize(TQString::fromLatin1("Fetch Dialog Options"))); KConfigGroup config(kapp->config(), "Fetch Dialog Options"); TQValueList<int> splitList = config.readIntListEntry("Splitter Sizes"); @@ -235,8 +235,8 @@ FetchDialog::FetchDialog(TQWidget* parent_, const char* name_) connect(Fetch::Manager::self(), TQT_SIGNAL(signalResultFound(Tellico::Fetch::SearchResult*)), TQT_SLOT(slotResultFound(Tellico::Fetch::SearchResult*))); - connect(Fetch::Manager::self(), TQT_SIGNAL(signaltqStatus(const TQString&)), - TQT_SLOT(slottqStatus(const TQString&))); + connect(Fetch::Manager::self(), TQT_SIGNAL(signalStatus(const TQString&)), + TQT_SLOT(slotStatus(const TQString&))); connect(Fetch::Manager::self(), TQT_SIGNAL(signalDone()), TQT_SLOT(slotFetchDone())); @@ -285,7 +285,7 @@ FetchDialog::~FetchDialog() { // no additional entries to check images to keep though Data::Document::self()->removeImagesNotInCollection(entriesToCheck, Data::EntryVec()); - saveDialogSize(TQString::tqfromLatin1("Fetch Dialog Options")); + saveDialogSize(TQString::fromLatin1("Fetch Dialog Options")); KConfigGroup config(kapp->config(), "Fetch Dialog Options"); config.writeEntry("Splitter Sizes", static_cast<TQSplitter*>(m_listView->parentWidget())->sizes()); @@ -296,7 +296,7 @@ FetchDialog::~FetchDialog() { void FetchDialog::slotSearchClicked() { m_valueLineEdit->selectAll(); if(m_started) { - settqStatus(i18n("Cancelling the search...")); + setStatus(i18n("Cancelling the search...")); Fetch::Manager::self()->stop(); slotFetchDone(); } else { @@ -309,9 +309,9 @@ void FetchDialog::slotSearchClicked() { m_oldSearch = value; m_started = true; m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_STOP), - SmallIconSet(TQString::tqfromLatin1("cancel")))); + SmallIconSet(TQString::fromLatin1("cancel")))); startProgress(); - settqStatus(i18n("Searching...")); + setStatus(i18n("Searching...")); kapp->processEvents(); Fetch::Manager::self()->startSearch(m_sourceCombo->currentText(), static_cast<Fetch::FetchKey>(m_keyCombo->currentData().toInt()), @@ -331,31 +331,31 @@ void FetchDialog::slotClearClicked() { m_moreButton->setEnabled(false); m_isbnList.clear(); m_statusMessages.clear(); - settqStatus(i18n("Ready.")); // because slotFetchDone() writes text + setStatus(i18n("Ready.")); // because slotFetchDone() writes text } -void FetchDialog::slottqStatus(const TQString& status_) { +void FetchDialog::slotStatus(const TQString& status_) { m_statusMessages.push_back(status_); // if the queue was empty, start the timer if(m_statusMessages.count() == 1) { // wait 2 seconds - TQTimer::singleShot(2000, this, TQT_SLOT(slotUpdatetqStatus())); + TQTimer::singleShot(2000, this, TQT_SLOT(slotUpdateStatus())); } } -void FetchDialog::slotUpdatetqStatus() { +void FetchDialog::slotUpdateStatus() { if(m_statusMessages.isEmpty()) { return; } - settqStatus(m_statusMessages.front()); + setStatus(m_statusMessages.front()); m_statusMessages.pop_front(); if(!m_statusMessages.isEmpty()) { // wait 2 seconds - TQTimer::singleShot(2000, this, TQT_SLOT(slotUpdatetqStatus())); + TQTimer::singleShot(2000, this, TQT_SLOT(slotUpdateStatus())); } } -void FetchDialog::settqStatus(const TQString& text_) { +void FetchDialog::setStatus(const TQString& text_) { m_statusBar->changeItem(TQChar(' ') + text_, FETCH_STATUS_ID); } @@ -363,13 +363,13 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) { // myDebug() << "FetchDialog::slotFetchDone()" << endl; m_started = false; m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_SEARCH), - SmallIconSet(TQString::tqfromLatin1("find")))); + SmallIconSet(TQString::fromLatin1("find")))); stopProgress(); if(m_resultCount == 0) { - slottqStatus(i18n("The search returned no items.")); + slotStatus(i18n("The search returned no items.")); } else { /* TRANSLATORS: This is a plural form, you need to translate both lines (except "_n: ") */ - slottqStatus(i18n("The search returned 1 item.", + slotStatus(i18n("The search returned 1 item.", "The search returned %n items.", m_resultCount)); } @@ -385,7 +385,7 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) { if(m_collType & (Data::Collection::Book | Data::Collection::Bibtex) && m_multipleISBN->isChecked() && (key == Fetch::ISBN || key == Fetch::UPC)) { - TQStringList values = TQStringList::split(TQString::tqfromLatin1("; "), + TQStringList values = TQStringList::split(TQString::fromLatin1("; "), m_oldSearch.simplifyWhiteSpace()); for(TQStringList::Iterator it = values.begin(); it != values.end(); ++it) { *it = ISBNValidator::cleanValue(*it); @@ -393,7 +393,7 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) { for(TQListViewItemIterator it(m_listView); it.current(); ++it) { TQString i = ISBNValidator::cleanValue(static_cast<SearchResultItem*>(it.current())->m_result->isbn); values.remove(i); - if(i.length() > 10 && i.startsWith(TQString::tqfromLatin1("978"))) { + if(i.length() > 10 && i.startsWith(TQString::fromLatin1("978"))) { values.remove(ISBNValidator::cleanValue(ISBNValidator::isbn10(i))); } } @@ -407,7 +407,7 @@ void FetchDialog::slotFetchDone(bool checkISBN /* = true */) { TQVBoxLayout* lay = new TQVBoxLayout(box, KDialog::marginHint(), KDialog::spacingHint()*2); TQHBoxLayout* lay2 = new TQHBoxLayout(lay); TQLabel* lab = new TQLabel(box); - lab->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::tqfromLatin1("messagebox_info"), + lab->setPixmap(KGlobal::iconLoader()->loadIcon(TQString::fromLatin1("messagebox_info"), KIcon::NoGroup, KIcon::SizeMedium)); lay2->addWidget(lab); @@ -442,7 +442,7 @@ void FetchDialog::slotAddEntry() { Fetch::SearchResult* r = item->m_result; Data::EntryPtr entry = m_entries[r->uid]; if(!entry) { - settqStatus(i18n("Fetching %1...").tqarg(r->title)); + setStatus(i18n("Fetching %1...").arg(r->title)); startProgress(); entry = r->fetchEntry(); if(!entry) { @@ -450,11 +450,11 @@ void FetchDialog::slotAddEntry() { } m_entries.insert(r->uid, entry); stopProgress(); - settqStatus(i18n("Ready.")); + setStatus(i18n("Ready.")); } // add a copy, intentionally allowing multiple copies to be added vec.append(new Data::Entry(*entry)); - item->setPixmap(0, UserIcon(TQString::tqfromLatin1("checkmark"))); + item->setPixmap(0, UserIcon(TQString::fromLatin1("checkmark"))); } if(!vec.isEmpty()) { Kernel::self()->addEntries(vec, true); @@ -469,9 +469,9 @@ void FetchDialog::slotMoreClicked() { m_started = true; m_searchButton->setGuiItem(KGuiItem(i18n(FETCH_STRING_STOP), - SmallIconSet(TQString::tqfromLatin1("cancel")))); + SmallIconSet(TQString::fromLatin1("cancel")))); startProgress(); - settqStatus(i18n("Searching...")); + setStatus(i18n("Searching...")); kapp->processEvents(); Fetch::Manager::self()->continueSearch(); } @@ -494,7 +494,7 @@ void FetchDialog::slotShowEntry() { SearchResultItem* item = static_cast<SearchResultItem*>(items.getFirst()); Fetch::SearchResult* r = item->m_result; - settqStatus(i18n("Fetching %1...").tqarg(r->title)); + setStatus(i18n("Fetching %1...").arg(r->title)); Data::EntryPtr entry = m_entries[r->uid]; if(!entry) { GUI::CursorSaver cs; @@ -505,7 +505,7 @@ void FetchDialog::slotShowEntry() { } stopProgress(); } - settqStatus(i18n("Ready.")); + setStatus(i18n("Ready.")); m_entryView->showEntry(entry); } @@ -603,7 +603,7 @@ void FetchDialog::slotEditMultipleISBN() { m_isbnTextEdit = new KTextEdit(box, "isbn text edit"); m_isbnTextEdit->setText(m_isbnList.join(TQChar('\n'))); TQWhatsThis::add(m_isbnTextEdit, s); - KPushButton* fromFileBtn = new KPushButton(SmallIconSet(TQString::tqfromLatin1("fileopen")), + KPushButton* fromFileBtn = new KPushButton(SmallIconSet(TQString::fromLatin1("fileopen")), i18n("&Load From File..."), box); TQWhatsThis::add(fromFileBtn, i18n("<qt>Load the list from a text file.</qt>")); connect(fromFileBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotLoadISBNList())); @@ -630,7 +630,7 @@ void FetchDialog::slotEditMultipleISBN() { while(m_isbnList.count() > 100) { m_isbnList.pop_back(); } - m_valueLineEdit->setText(m_isbnList.join(TQString::tqfromLatin1("; "))); + m_valueLineEdit->setText(m_isbnList.join(TQString::fromLatin1("; "))); } m_isbnTextEdit = 0; // gets auto-deleted } |