diff options
Diffstat (limited to 'src/controller.cpp')
-rw-r--r-- | src/controller.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/controller.cpp b/src/controller.cpp index 1b3e29b..770ef79 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -44,14 +44,14 @@ #include <kaction.h> #include <ktoolbarbutton.h> -#include <qpopupmenu.h> +#include <tqpopupmenu.h> using Tellico::Controller; Controller* Controller::s_self = 0; -Controller::Controller(MainWindow* parent_, const char* name_) - : QObject(parent_, name_), m_mainWindow(parent_), m_working (false), m_widgetWithSelection(0) { +Controller::Controller(MainWindow* tqparent_, const char* name_) + : TQObject(tqparent_, name_), m_mainWindow(tqparent_), m_working (false), m_widgetWithSelection(0) { } void Controller::addObserver(Observer* obs) { @@ -66,12 +66,12 @@ Tellico::GroupIterator Controller::groupIterator() const { return GroupIterator(m_mainWindow->m_groupView); } -QString Controller::groupBy() const { +TQString Controller::groupBy() const { return m_mainWindow->m_groupView->groupBy(); } -QStringList Controller::expandedGroupBy() const { - QStringList g = groupBy(); +TQStringList Controller::expandedGroupBy() const { + TQStringList g = groupBy(); // special case for pseudo-group if(g[0] == Data::Collection::s_peopleGroupName) { g.clear(); @@ -87,15 +87,15 @@ QStringList Controller::expandedGroupBy() const { return g; } -QStringList Controller::sortTitles() const { - QStringList list; +TQStringList Controller::sortTitles() const { + TQStringList list; list << m_mainWindow->m_detailedView->sortColumnTitle1(); list << m_mainWindow->m_detailedView->sortColumnTitle2(); list << m_mainWindow->m_detailedView->sortColumnTitle3(); return list; } -QStringList Controller::visibleColumns() const { +TQStringList Controller::visibleColumns() const { return m_mainWindow->m_detailedView->visibleColumns(); } @@ -141,11 +141,11 @@ void Controller::slotCollectionAdded(Data::CollPtr coll_) { updateActions(); - connect(coll_, SIGNAL(signalGroupsModified(Tellico::Data::CollPtr, PtrVector<Tellico::Data::EntryGroup>)), - m_mainWindow->m_groupView, SLOT(slotModifyGroups(Tellico::Data::CollPtr, PtrVector<Tellico::Data::EntryGroup>))); + connect(coll_, TQT_SIGNAL(signalGroupsModified(Tellico::Data::CollPtr, PtrVector<Tellico::Data::EntryGroup>)), + m_mainWindow->m_groupView, TQT_SLOT(slotModifyGroups(Tellico::Data::CollPtr, PtrVector<Tellico::Data::EntryGroup>))); - connect(coll_, SIGNAL(signalRefreshField(Tellico::Data::FieldPtr)), - this, SLOT(slotRefreshField(Tellico::Data::FieldPtr))); + connect(coll_, TQT_SIGNAL(signalRefreshField(Tellico::Data::FieldPtr)), + this, TQT_SLOT(slotRefreshField(Tellico::Data::FieldPtr))); } void Controller::slotCollectionModified(Data::CollPtr coll_) { @@ -278,7 +278,7 @@ void Controller::slotClearSelection() { m_working = false; } -void Controller::slotUpdateSelection(QWidget* widget_, const Data::EntryVec& entries_) { +void Controller::slotUpdateSelection(TQWidget* widget_, const Data::EntryVec& entries_) { if(m_working) { return; } @@ -336,7 +336,7 @@ void Controller::goEntrySibling(EntryDirection dir_) { return; } // find the widget that has an entry selected - GUI::ListView* view = ::qt_cast<GUI::ListView*>(m_widgetWithSelection); + GUI::ListView* view = ::tqqt_cast<GUI::ListView*>(m_widgetWithSelection); if(!view) { return; } @@ -406,7 +406,7 @@ void Controller::slotUpdateCurrent(const Data::EntryVec& entries_) { m_working = false; } -void Controller::slotUpdateSelectedEntries(const QString& source_) { +void Controller::slotUpdateSelectedEntries(const TQString& source_) { if(m_selectedEntries.isEmpty()) { return; } @@ -429,24 +429,24 @@ void Controller::slotDeleteSelectedEntries() { // confirm delete if(m_selectedEntries.count() == 1) { - QString str = i18n("Do you really want to delete this entry?"); - QString dontAsk = QString::fromLatin1("DeleteEntry"); + TQString str = i18n("Do you really want to delete this entry?"); + TQString dontAsk = TQString::tqfromLatin1("DeleteEntry"); int ret = KMessageBox::warningContinueCancel(Kernel::self()->widget(), str, i18n("Delete Entry"), - KGuiItem(i18n("&Delete"), QString::fromLatin1("editdelete")), dontAsk); + KGuiItem(i18n("&Delete"), TQString::tqfromLatin1("editdelete")), dontAsk); if(ret != KMessageBox::Continue) { return; } } else { - QStringList names; + TQStringList names; for(Data::EntryVecIt entry = m_selectedEntries.begin(); entry != m_selectedEntries.end(); ++entry) { names += entry->title(); } - QString str = i18n("Do you really want to delete these entries?"); + TQString str = i18n("Do you really want to delete these entries?"); // historically called DeleteMultipleBooks, don't change - QString dontAsk = QString::fromLatin1("DeleteMultipleBooks"); + TQString dontAsk = TQString::tqfromLatin1("DeleteMultipleBooks"); int ret = KMessageBox::warningContinueCancelList(Kernel::self()->widget(), str, names, i18n("Delete Multiple Entries"), - KGuiItem(i18n("&Delete"), QString::fromLatin1("editdelete")), dontAsk); + KGuiItem(i18n("&Delete"), TQString::tqfromLatin1("editdelete")), dontAsk); if(ret != KMessageBox::Continue) { return; } @@ -545,7 +545,7 @@ void Controller::editEntry(Data::EntryPtr) const { m_mainWindow->slotShowEntryEditor(); } -void Controller::plugCollectionActions(QPopupMenu* popup_) { +void Controller::plugCollectionActions(TQPopupMenu* popup_) { if(!popup_) { return; } @@ -555,7 +555,7 @@ void Controller::plugCollectionActions(QPopupMenu* popup_) { m_mainWindow->action("change_entry_grouping")->plug(popup_); } -void Controller::plugEntryActions(QPopupMenu* popup_) { +void Controller::plugEntryActions(TQPopupMenu* popup_) { if(!popup_) { return; } @@ -573,11 +573,11 @@ void Controller::plugEntryActions(QPopupMenu* popup_) { m_mainWindow->m_checkOutEntry->plug(popup_); } -void Controller::plugUpdateMenu(QPopupMenu* popup_) { - QPopupMenu* updatePopup = 0; +void Controller::plugUpdateMenu(TQPopupMenu* popup_) { + TQPopupMenu* updatePopup = 0; const uint count = popup_->count(); for(uint i = 0; i < count; ++i) { - QMenuItem* item = popup_->findItem(popup_->idAt(i)); + TQMenuItem* item = popup_->tqfindItem(popup_->idAt(i)); if(item && item->text() == m_mainWindow->m_updateEntryMenu->text()) { updatePopup = item->popup(); break; @@ -591,7 +591,7 @@ void Controller::plugUpdateMenu(QPopupMenu* popup_) { // I can't figure out why the actions get duplicated, but they do // so clear them all m_mainWindow->m_updateAll->unplug(updatePopup); - for(QPtrListIterator<KAction> it(m_mainWindow->m_fetchActions); it.current(); ++it) { + for(TQPtrListIterator<KAction> it(m_mainWindow->m_fetchActions); it.current(); ++it) { it.current()->unplug(updatePopup); } @@ -600,16 +600,16 @@ void Controller::plugUpdateMenu(QPopupMenu* popup_) { m_mainWindow->m_updateAll->plug(updatePopup); updatePopup->insertSeparator(); - for(QPtrListIterator<KAction> it(m_mainWindow->m_fetchActions); it.current(); ++it) { + for(TQPtrListIterator<KAction> it(m_mainWindow->m_fetchActions); it.current(); ++it) { it.current()->plug(updatePopup); } } void Controller::updateActions() const { bool emptySelection = m_selectedEntries.isEmpty(); - m_mainWindow->stateChanged(QString::fromLatin1("empty_selection"), + m_mainWindow->stateChanged(TQString::tqfromLatin1("empty_selection"), emptySelection ? KXMLGUIClient::StateNoReverse : KXMLGUIClient::StateReverse); - for(QPtrListIterator<KAction> it(m_mainWindow->m_fetchActions); it.current(); ++it) { + for(TQPtrListIterator<KAction> it(m_mainWindow->m_fetchActions); it.current(); ++it) { it.current()->setEnabled(!emptySelection); } //only enable citation items when it's a bibliography @@ -674,12 +674,12 @@ void Controller::slotCheckOut() { Data::EntryVec loanedEntries = m_selectedEntries; // check to see if any of the entries are already on-loan, and warn user - QMap<QString, Data::EntryPtr> alreadyLoaned; + TQMap<TQString, Data::EntryPtr> alreadyLoaned; const Data::BorrowerVec& borrowers = Data::Document::self()->collection()->borrowers(); for(Data::BorrowerVec::ConstIterator it = borrowers.begin(); it != borrowers.end(); ++it) { const Data::LoanVec& loans = it->loans(); for(Data::LoanVec::ConstIterator it2 = loans.begin(); it2 != loans.end(); ++it2) { - if(m_selectedEntries.contains(it2->entry())) { + if(m_selectedEntries.tqcontains(it2->entry())) { alreadyLoaned.insert(it2->entry()->title(), it2->entry()); } } @@ -691,8 +691,8 @@ void Controller::slotCheckOut() { "times. They will be removed from the list of items " "to lend."), alreadyLoaned.keys()); - QMapConstIterator<QString, Data::EntryPtr> it = alreadyLoaned.constBegin(); - QMapConstIterator<QString, Data::EntryPtr> end = alreadyLoaned.constEnd(); + TQMapConstIterator<TQString, Data::EntryPtr> it = alreadyLoaned.constBegin(); + TQMapConstIterator<TQString, Data::EntryPtr> end = alreadyLoaned.constEnd(); for( ; it != end; ++it) { loanedEntries.remove(it.data()); } @@ -748,7 +748,7 @@ void Controller::hideTabs() const { inline bool Controller::canCheckIn() const { for(Data::EntryVec::ConstIterator entry = m_selectedEntries.begin(); entry != m_selectedEntries.end(); ++entry) { - if(entry->field(QString::fromLatin1("loaned")) == Latin1Literal("true")) { + if(entry->field(TQString::tqfromLatin1("loaned")) == Latin1Literal("true")) { return true; } } |