diff options
Diffstat (limited to 'src/collections')
24 files changed, 416 insertions, 404 deletions
diff --git a/src/collections/bibtexcollection.cpp b/src/collections/bibtexcollection.cpp index f069cc9..4218a3c 100644 --- a/src/collections/bibtexcollection.cpp +++ b/src/collections/bibtexcollection.cpp @@ -26,26 +26,26 @@ namespace { static const char* bibtex_misc = I18N_NOOP("Miscellaneous"); } -BibtexCollection::BibtexCollection(bool addFields_, const QString& title_ /*=null*/) +BibtexCollection::BibtexCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("Bibliography") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("author")); + setDefaultGroupField(TQString::tqfromLatin1("author")); // Bibtex has some default macros for the months - addMacro(QString::fromLatin1("jan"), QString::null); - addMacro(QString::fromLatin1("feb"), QString::null); - addMacro(QString::fromLatin1("mar"), QString::null); - addMacro(QString::fromLatin1("apr"), QString::null); - addMacro(QString::fromLatin1("may"), QString::null); - addMacro(QString::fromLatin1("jun"), QString::null); - addMacro(QString::fromLatin1("jul"), QString::null); - addMacro(QString::fromLatin1("aug"), QString::null); - addMacro(QString::fromLatin1("sep"), QString::null); - addMacro(QString::fromLatin1("oct"), QString::null); - addMacro(QString::fromLatin1("nov"), QString::null); - addMacro(QString::fromLatin1("dec"), QString::null); + addMacro(TQString::tqfromLatin1("jan"), TQString()); + addMacro(TQString::tqfromLatin1("feb"), TQString()); + addMacro(TQString::tqfromLatin1("mar"), TQString()); + addMacro(TQString::tqfromLatin1("apr"), TQString()); + addMacro(TQString::tqfromLatin1("may"), TQString()); + addMacro(TQString::tqfromLatin1("jun"), TQString()); + addMacro(TQString::tqfromLatin1("jul"), TQString()); + addMacro(TQString::tqfromLatin1("aug"), TQString()); + addMacro(TQString::tqfromLatin1("sep"), TQString()); + addMacro(TQString::tqfromLatin1("oct"), TQString()); + addMacro(TQString::tqfromLatin1("nov"), TQString()); + addMacro(TQString::tqfromLatin1("dec"), TQString()); } Tellico::Data::FieldVec BibtexCollection::defaultFields() { @@ -53,189 +53,189 @@ Tellico::Data::FieldVec BibtexCollection::defaultFields() { FieldPtr field; /******************* General ****************************/ - field = new Field(QString::fromLatin1("title"), i18n("Title")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("title")); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("title")); field->setCategory(i18n("General")); field->setFlags(Field::NoDelete); field->setFormatFlag(Field::FormatTitle); list.append(field); - QStringList types; - types << QString::fromLatin1("article") << QString::fromLatin1("book") - << QString::fromLatin1("booklet") << QString::fromLatin1("inbook") - << QString::fromLatin1("incollection") << QString::fromLatin1("inproceedings") - << QString::fromLatin1("manual") << QString::fromLatin1("mastersthesis") - << QString::fromLatin1("misc") << QString::fromLatin1("phdthesis") - << QString::fromLatin1("proceedings") << QString::fromLatin1("techreport") - << QString::fromLatin1("unpublished") << QString::fromLatin1("periodical") - << QString::fromLatin1("conference"); - field = new Field(QString::fromLatin1("entry-type"), i18n("Entry Type"), types); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("entry-type")); + TQStringList types; + types << TQString::tqfromLatin1("article") << TQString::tqfromLatin1("book") + << TQString::tqfromLatin1("booklet") << TQString::tqfromLatin1("inbook") + << TQString::tqfromLatin1("incollection") << TQString::tqfromLatin1("inproceedings") + << TQString::tqfromLatin1("manual") << TQString::tqfromLatin1("mastersthesis") + << TQString::tqfromLatin1("misc") << TQString::tqfromLatin1("phdthesis") + << TQString::tqfromLatin1("proceedings") << TQString::tqfromLatin1("techreport") + << TQString::tqfromLatin1("unpublished") << TQString::tqfromLatin1("periodical") + << TQString::tqfromLatin1("conference"); + field = new Field(TQString::tqfromLatin1("entry-type"), i18n("Entry Type"), types); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("entry-type")); field->setCategory(i18n(bibtex_general)); field->setFlags(Field::AllowGrouped | Field::NoDelete); field->setDescription(i18n("These entry types are specific to bibtex. See the bibtex documentation.")); list.append(field); - field = new Field(QString::fromLatin1("author"), i18n("Author")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("author")); + field = new Field(TQString::tqfromLatin1("author"), i18n("Author")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("author")); field->setCategory(i18n(bibtex_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("bibtex-key"), i18n("Bibtex Key")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("key")); + field = new Field(TQString::tqfromLatin1("bibtex-key"), i18n("Bibtex Key")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("key")); field->setCategory(i18n("General")); field->setFlags(Field::NoDelete); list.append(field); - field = new Field(QString::fromLatin1("booktitle"), i18n("Book Title")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("booktitle")); + field = new Field(TQString::tqfromLatin1("booktitle"), i18n("Book Title")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("booktitle")); field->setCategory(i18n(bibtex_general)); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("editor"), i18n("Editor")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("editor")); + field = new Field(TQString::tqfromLatin1("editor"), i18n("Editor")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("editor")); field->setCategory(i18n(bibtex_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("organization"), i18n("Organization")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("organization")); + field = new Field(TQString::tqfromLatin1("organization"), i18n("Organization")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("organization")); field->setCategory(i18n(bibtex_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); -// field = new Field(QString::fromLatin1("institution"), i18n("Institution")); -// field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("institution")); +// field = new Field(TQString::tqfromLatin1("institution"), i18n("Institution")); +// field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("institution")); // field->setCategory(i18n(bibtex_general)); // field->setFlags(Field::AllowDelete); // field->setFormatFlag(Field::FormatTitle); // list.append(field); /******************* Publishing ****************************/ - field = new Field(QString::fromLatin1("publisher"), i18n("Publisher")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("publisher")); + field = new Field(TQString::tqfromLatin1("publisher"), i18n("Publisher")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("publisher")); field->setCategory(i18n(bibtex_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("address"), i18n("Address")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("address")); + field = new Field(TQString::tqfromLatin1("address"), i18n("Address")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("address")); field->setCategory(i18n(bibtex_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("edition"), i18n("Edition")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("edition")); + field = new Field(TQString::tqfromLatin1("edition"), i18n("Edition")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("edition")); field->setCategory(i18n(bibtex_publishing)); field->setFlags(Field::AllowCompletion); list.append(field); // don't make it a nuumber, it could have latex processing commands in it - field = new Field(QString::fromLatin1("pages"), i18n("Pages")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("pages")); + field = new Field(TQString::tqfromLatin1("pages"), i18n("Pages")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("pages")); field->setCategory(i18n(bibtex_publishing)); list.append(field); - field = new Field(QString::fromLatin1("year"), i18n("Year"), Field::Number); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("year")); + field = new Field(TQString::tqfromLatin1("year"), i18n("Year"), Field::Number); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("year")); field->setCategory(i18n(bibtex_publishing)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("isbn"), i18n("ISBN#")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("isbn")); + field = new Field(TQString::tqfromLatin1("isbn"), i18n("ISBN#")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("isbn")); field->setCategory(i18n(bibtex_publishing)); field->setDescription(i18n("International Standard Book Number")); list.append(field); - field = new Field(QString::fromLatin1("journal"), i18n("Journal")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("journal")); + field = new Field(TQString::tqfromLatin1("journal"), i18n("Journal")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("journal")); field->setCategory(i18n(bibtex_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("doi"), i18n("DOI")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("doi")); + field = new Field(TQString::tqfromLatin1("doi"), i18n("DOI")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("doi")); field->setCategory(i18n(bibtex_publishing)); field->setDescription(i18n("Digital Object Identifier")); list.append(field); // could make this a string list, but since bibtex import could have funky values // keep it an editbox - field = new Field(QString::fromLatin1("month"), i18n("Month")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("month")); + field = new Field(TQString::tqfromLatin1("month"), i18n("Month")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("month")); field->setCategory(i18n(bibtex_publishing)); field->setFlags(Field::AllowCompletion); list.append(field); - field = new Field(QString::fromLatin1("number"), i18n("Number"), Field::Number); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("number")); + field = new Field(TQString::tqfromLatin1("number"), i18n("Number"), Field::Number); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("number")); field->setCategory(i18n(bibtex_publishing)); list.append(field); - field = new Field(QString::fromLatin1("howpublished"), i18n("How Published")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("howpublished")); + field = new Field(TQString::tqfromLatin1("howpublished"), i18n("How Published")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("howpublished")); field->setCategory(i18n(bibtex_publishing)); list.append(field); -// field = new Field(QString::fromLatin1("school"), i18n("School")); -// field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("school")); +// field = new Field(TQString::tqfromLatin1("school"), i18n("School")); +// field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("school")); // field->setCategory(i18n(bibtex_publishing)); // field->setFlags(Field::AllowCompletion | Field::AllowGrouped); // list.append(field); /******************* Classification ****************************/ - field = new Field(QString::fromLatin1("chapter"), i18n("Chapter"), Field::Number); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("chapter")); + field = new Field(TQString::tqfromLatin1("chapter"), i18n("Chapter"), Field::Number); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("chapter")); field->setCategory(i18n(bibtex_misc)); list.append(field); - field = new Field(QString::fromLatin1("series"), i18n("Series")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("series")); + field = new Field(TQString::tqfromLatin1("series"), i18n("Series")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("series")); field->setCategory(i18n(bibtex_misc)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("volume"), i18n("Volume"), Field::Number); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("volume")); + field = new Field(TQString::tqfromLatin1("volume"), i18n("Volume"), Field::Number); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("volume")); field->setCategory(i18n(bibtex_misc)); list.append(field); - field = new Field(QString::fromLatin1("crossref"), i18n("Cross-Reference")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("crossref")); + field = new Field(TQString::tqfromLatin1("crossref"), i18n("Cross-Reference")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("crossref")); field->setCategory(i18n(bibtex_misc)); list.append(field); -// field = new Field(QString::fromLatin1("annote"), i18n("Annotation")); -// field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("annote")); +// field = new Field(TQString::tqfromLatin1("annote"), i18n("Annotation")); +// field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("annote")); // field->setCategory(i18n(bibtex_misc)); // list.append(field); - field = new Field(QString::fromLatin1("keyword"), i18n("Keywords")); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("keywords")); + field = new Field(TQString::tqfromLatin1("keyword"), i18n("Keywords")); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("keywords")); field->setCategory(i18n(bibtex_misc)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("url"), i18n("URL"), Field::URL); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("url")); + field = new Field(TQString::tqfromLatin1("url"), i18n("URL"), Field::URL); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("url")); field->setCategory(i18n(bibtex_misc)); list.append(field); - field = new Field(QString::fromLatin1("abstract"), i18n("Abstract"), Data::Field::Para); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("abstract")); + field = new Field(TQString::tqfromLatin1("abstract"), i18n("Abstract"), Data::Field::Para); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("abstract")); list.append(field); - field = new Field(QString::fromLatin1("note"), i18n("Notes"), Field::Para); - field->setProperty(QString::fromLatin1("bibtex"), QString::fromLatin1("note")); + field = new Field(TQString::tqfromLatin1("note"), i18n("Notes"), Field::Para); + field->setProperty(TQString::tqfromLatin1("bibtex"), TQString::tqfromLatin1("note")); list.append(field); return list; @@ -248,7 +248,7 @@ bool BibtexCollection::addField(FieldPtr field_) { // myDebug() << "BibtexCollection::addField()" << endl; bool success = Collection::addField(field_); if(success) { - QString bibtex = field_->property(QString::fromLatin1("bibtex")); + TQString bibtex = field_->property(TQString::tqfromLatin1("bibtex")); if(!bibtex.isEmpty()) { m_bibtexFieldDict.insert(bibtex, field_); } @@ -263,13 +263,13 @@ bool BibtexCollection::modifyField(FieldPtr newField_) { // myDebug() << "BibtexCollection::modifyField()" << endl; bool success = Collection::modifyField(newField_); FieldPtr oldField = fieldByName(newField_->name()); - QString oldBibtex = oldField->property(QString::fromLatin1("bibtex")); - QString newBibtex = newField_->property(QString::fromLatin1("bibtex")); + TQString oldBibtex = oldField->property(TQString::tqfromLatin1("bibtex")); + TQString newBibtex = newField_->property(TQString::tqfromLatin1("bibtex")); if(!oldBibtex.isEmpty()) { success &= m_bibtexFieldDict.remove(oldBibtex); } if(!newBibtex.isEmpty()) { - oldField->setProperty(QString::fromLatin1("bibtex"), newBibtex); + oldField->setProperty(TQString::tqfromLatin1("bibtex"), newBibtex); m_bibtexFieldDict.insert(newBibtex, oldField); } return success; @@ -281,42 +281,42 @@ bool BibtexCollection::deleteField(FieldPtr field_, bool force_) { } // myDebug() << "BibtexCollection::deleteField()" << endl; bool success = true; - QString bibtex = field_->property(QString::fromLatin1("bibtex")); + TQString bibtex = field_->property(TQString::tqfromLatin1("bibtex")); if(!bibtex.isEmpty()) { success &= m_bibtexFieldDict.remove(bibtex); } return success && Collection::removeField(field_, force_); } -Tellico::Data::FieldPtr BibtexCollection::fieldByBibtexName(const QString& bibtex_) const { - return m_bibtexFieldDict.isEmpty() ? 0 : m_bibtexFieldDict.find(bibtex_); +Tellico::Data::FieldPtr BibtexCollection::fieldByBibtexName(const TQString& bibtex_) const { + return m_bibtexFieldDict.isEmpty() ? 0 : m_bibtexFieldDict.tqfind(bibtex_); } // same as BookCollection::sameEntry() int BibtexCollection::sameEntry(Data::EntryPtr entry1_, Data::EntryPtr entry2_) const { // equal isbn's or lccn's are easy, give it a weight of 100 - if(Entry::compareValues(entry1_, entry2_, QString::fromLatin1("isbn"), this) > 0 || - Entry::compareValues(entry1_, entry2_, QString::fromLatin1("lccn"), this) > 0 || - Entry::compareValues(entry1_, entry2_, QString::fromLatin1("doi"), this) > 0 || - Entry::compareValues(entry1_, entry2_, QString::fromLatin1("pmid"), this) > 0 || - Entry::compareValues(entry1_, entry2_, QString::fromLatin1("arxiv"), this) > 0) { + if(Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("isbn"), this) > 0 || + Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("lccn"), this) > 0 || + Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("doi"), this) > 0 || + Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("pmid"), this) > 0 || + Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("arxiv"), this) > 0) { return 100; // good match } - int res = 3*Entry::compareValues(entry1_, entry2_, QString::fromLatin1("title"), this); + int res = 3*Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("title"), this); // if(res == 0) { // myDebug() << "BookCollection::sameEntry() - different titles for " << entry1_->title() << " vs. " // << entry2_->title() << endl; // } - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("author"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("cr_year"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("pub_year"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("binding"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("author"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("cr_year"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("pub_year"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("binding"), this); return res; } // static Tellico::Data::CollPtr BibtexCollection::convertBookCollection(CollPtr coll_) { - const QString bibtex = QString::fromLatin1("bibtex"); + const TQString bibtex = TQString::tqfromLatin1("bibtex"); KSharedPtr<BibtexCollection> coll = new BibtexCollection(false, coll_->title()); FieldVec fields = coll_->fields(); for(FieldVec::Iterator fIt = fields.begin(); fIt != fields.end(); ++fIt) { @@ -329,7 +329,7 @@ Tellico::Data::CollPtr BibtexCollection::convertBookCollection(CollPtr coll_) { } // be sure to set bibtex property before adding it though - QString name = field->name(); + TQString name = field->name(); // this first group has bibtex field names the same as their own field name if(name == Latin1Literal("title") || name == Latin1Literal("author") @@ -344,17 +344,17 @@ Tellico::Data::CollPtr BibtexCollection::convertBookCollection(CollPtr coll_) { || name == Latin1Literal("series")) { field->setProperty(bibtex, name); } else if(name == Latin1Literal("series_num")) { - field->setProperty(bibtex, QString::fromLatin1("number")); + field->setProperty(bibtex, TQString::tqfromLatin1("number")); } else if(name == Latin1Literal("pur_price")) { - field->setProperty(bibtex, QString::fromLatin1("price")); + field->setProperty(bibtex, TQString::tqfromLatin1("price")); } else if(name == Latin1Literal("cr_year")) { - field->setProperty(bibtex, QString::fromLatin1("year")); + field->setProperty(bibtex, TQString::tqfromLatin1("year")); } else if(name == Latin1Literal("bibtex-id")) { - field->setProperty(bibtex, QString::fromLatin1("key")); + field->setProperty(bibtex, TQString::tqfromLatin1("key")); } else if(name == Latin1Literal("keyword")) { - field->setProperty(bibtex, QString::fromLatin1("keywords")); + field->setProperty(bibtex, TQString::tqfromLatin1("keywords")); } else if(name == Latin1Literal("comments")) { - field->setProperty(bibtex, QString::fromLatin1("note")); + field->setProperty(bibtex, TQString::tqfromLatin1("note")); } coll->addField(field); } @@ -365,15 +365,15 @@ Tellico::Data::CollPtr BibtexCollection::convertBookCollection(CollPtr coll_) { if(!coll->hasField(it->name()) && (it->flags() & Field::NoDelete)) { // but don't add a Bibtex Key if there's already a bibtex-id if(it->property(bibtex) != Latin1Literal("key") - || !coll->hasField(QString::fromLatin1("bibtex-id"))) { + || !coll->hasField(TQString::tqfromLatin1("bibtex-id"))) { coll->addField(it); } } } // set the entry-type to book - FieldPtr field = coll->fieldByBibtexName(QString::fromLatin1("entry-type")); - QString entryTypeName; + FieldPtr field = coll->fieldByBibtexName(TQString::tqfromLatin1("entry-type")); + TQString entryTypeName; if(field) { entryTypeName = field->name(); } else { @@ -385,7 +385,7 @@ Tellico::Data::CollPtr BibtexCollection::convertBookCollection(CollPtr coll_) { Data::EntryPtr entry = new Entry(*entryIt); entry->setCollection(coll.data()); if(!entryTypeName.isEmpty()) { - entry->setField(entryTypeName, QString::fromLatin1("book")); + entry->setField(entryTypeName, TQString::tqfromLatin1("book")); } newEntries.append(entry); } diff --git a/src/collections/bibtexcollection.h b/src/collections/bibtexcollection.h index 628cc37..2752063 100644 --- a/src/collections/bibtexcollection.h +++ b/src/collections/bibtexcollection.h @@ -29,6 +29,7 @@ namespace Tellico { */ class BibtexCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -37,7 +38,7 @@ public: * @param addFields A boolean indicating whether the default attributes should be added * @param title The title of the collection */ - BibtexCollection(bool addFields, const QString& title = QString::null); + BibtexCollection(bool addFields, const TQString& title = TQString()); /** */ virtual ~BibtexCollection() {} @@ -47,12 +48,12 @@ public: virtual bool modifyField(FieldPtr field); virtual bool deleteField(FieldPtr field, bool force=false); - FieldPtr fieldByBibtexName(const QString& name) const; - const QString& preamble() const { return m_preamble; } - void setPreamble(const QString& preamble) { m_preamble = preamble; } + FieldPtr fieldByBibtexName(const TQString& name) const; + const TQString& preamble() const { return m_preamble; } + void setPreamble(const TQString& preamble) { m_preamble = preamble; } const StringMap& macroList() const { return m_macros; } void setMacroList(StringMap map) { m_macros = map; } - void addMacro(const QString& key, const QString& value) { m_macros.insert(key, value); } + void addMacro(const TQString& key, const TQString& value) { m_macros.insert(key, value); } virtual int sameEntry(Data::EntryPtr entry1, Data::EntryPtr entry2) const; @@ -60,8 +61,8 @@ public: static CollPtr convertBookCollection(CollPtr coll); private: - QDict<Field> m_bibtexFieldDict; - QString m_preamble; + TQDict<Field> m_bibtexFieldDict; + TQString m_preamble; StringMap m_macros; }; diff --git a/src/collections/boardgamecollection.cpp b/src/collections/boardgamecollection.cpp index 4899e0e..ac7fe69 100644 --- a/src/collections/boardgamecollection.cpp +++ b/src/collections/boardgamecollection.cpp @@ -22,87 +22,87 @@ namespace { using Tellico::Data::BoardGameCollection; -BoardGameCollection::BoardGameCollection(bool addFields_, const QString& title_ /*=null*/) +BoardGameCollection::BoardGameCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Board Games") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("genre")); + setDefaultGroupField(TQString::tqfromLatin1("genre")); } Tellico::Data::FieldVec BoardGameCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title")); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title")); field->setCategory(i18n(boardgame_general)); field->setFlags(Field::NoDelete); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("genre"), i18n("Genre")); + field = new Field(TQString::tqfromLatin1("genre"), i18n("Genre")); field->setCategory(i18n(boardgame_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("mechanism"), i18n("Mechanism")); + field = new Field(TQString::tqfromLatin1("mechanism"), i18n("Mechanism")); field->setCategory(i18n(boardgame_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("year"), i18n("Release Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("year"), i18n("Release Year"), Field::Number); field->setCategory(i18n(boardgame_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("publisher"), i18n("Publisher")); + field = new Field(TQString::tqfromLatin1("publisher"), i18n("Publisher")); field->setCategory(i18n(boardgame_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("designer"), i18n("Designer")); + field = new Field(TQString::tqfromLatin1("designer"), i18n("Designer")); field->setCategory(i18n(boardgame_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("num-player"), i18n("Number of Players"), Field::Number); + field = new Field(TQString::tqfromLatin1("num-player"), i18n("Number of Players"), Field::Number); field->setCategory(i18n(boardgame_general)); field->setFlags(Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("description"), i18n("Description"), Field::Para); + field = new Field(TQString::tqfromLatin1("description"), i18n("Description"), Field::Para); list.append(field); - field = new Field(QString::fromLatin1("rating"), i18n("Rating"), Field::Rating); + field = new Field(TQString::tqfromLatin1("rating"), i18n("Rating"), Field::Rating); field->setCategory(i18n(boardgame_personal)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(boardgame_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(boardgame_personal)); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(boardgame_personal)); list.append(field); - field = new Field(QString::fromLatin1("loaned"), i18n("Loaned"), Field::Bool); + field = new Field(TQString::tqfromLatin1("loaned"), i18n("Loaned"), Field::Bool); field->setCategory(i18n(boardgame_personal)); list.append(field); - field = new Field(QString::fromLatin1("cover"), i18n("Cover"), Field::Image); + field = new Field(TQString::tqfromLatin1("cover"), i18n("Cover"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); field->setCategory(i18n(boardgame_personal)); list.append(field); diff --git a/src/collections/boardgamecollection.h b/src/collections/boardgamecollection.h index 642fc31..1b2ed35 100644 --- a/src/collections/boardgamecollection.h +++ b/src/collections/boardgamecollection.h @@ -24,6 +24,7 @@ namespace Tellico { */ class BoardGameCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -32,7 +33,7 @@ public: * @param addFields Whether to add the default attributes * @param title The title of the collection */ - BoardGameCollection(bool addFields, const QString& title = QString::null); + BoardGameCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return BoardGame; } diff --git a/src/collections/bookcollection.cpp b/src/collections/bookcollection.cpp index 0137156..21c5d90 100644 --- a/src/collections/bookcollection.cpp +++ b/src/collections/bookcollection.cpp @@ -24,157 +24,157 @@ namespace { using Tellico::Data::BookCollection; -BookCollection::BookCollection(bool addFields_, const QString& title_ /*=null*/) +BookCollection::BookCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Books") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("author")); + setDefaultGroupField(TQString::tqfromLatin1("author")); } Tellico::Data::FieldVec BookCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title")); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title")); field->setCategory(i18n("General")); field->setFlags(Field::NoDelete); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("subtitle"), i18n("Subtitle")); + field = new Field(TQString::tqfromLatin1("subtitle"), i18n("Subtitle")); field->setCategory(i18n(book_general)); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("author"), i18n("Author")); + field = new Field(TQString::tqfromLatin1("author"), i18n("Author")); field->setCategory(i18n(book_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("editor"), i18n("Editor")); + field = new Field(TQString::tqfromLatin1("editor"), i18n("Editor")); field->setCategory(i18n(book_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - QStringList binding; + TQStringList binding; binding << i18n("Hardback") << i18n("Paperback") << i18n("Trade Paperback") << i18n("E-Book") << i18n("Magazine") << i18n("Journal"); - field = new Field(QString::fromLatin1("binding"), i18n("Binding"), binding); + field = new Field(TQString::tqfromLatin1("binding"), i18n("Binding"), binding); field->setCategory(i18n(book_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(book_general)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(book_general)); list.append(field); - field = new Field(QString::fromLatin1("publisher"), i18n("Publisher")); + field = new Field(TQString::tqfromLatin1("publisher"), i18n("Publisher")); field->setCategory(i18n(book_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("edition"), i18n("Edition")); + field = new Field(TQString::tqfromLatin1("edition"), i18n("Edition")); field->setCategory(i18n(book_publishing)); field->setFlags(Field::AllowCompletion); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("cr_year"), i18n("Copyright Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("cr_year"), i18n("Copyright Year"), Field::Number); field->setCategory(i18n(book_publishing)); field->setFlags(Field::AllowGrouped | Field::AllowMultiple); list.append(field); - field = new Field(QString::fromLatin1("pub_year"), i18n("Publication Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("pub_year"), i18n("Publication Year"), Field::Number); field->setCategory(i18n(book_publishing)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("isbn"), i18n("ISBN#")); + field = new Field(TQString::tqfromLatin1("isbn"), i18n("ISBN#")); field->setCategory(i18n(book_publishing)); field->setDescription(i18n("International Standard Book Number")); list.append(field); - field = new Field(QString::fromLatin1("lccn"), i18n("LCCN#")); + field = new Field(TQString::tqfromLatin1("lccn"), i18n("LCCN#")); field->setCategory(i18n(book_publishing)); field->setDescription(i18n("Library of Congress Control Number")); list.append(field); - field = new Field(QString::fromLatin1("pages"), i18n("Pages"), Field::Number); + field = new Field(TQString::tqfromLatin1("pages"), i18n("Pages"), Field::Number); field->setCategory(i18n(book_publishing)); list.append(field); - field = new Field(QString::fromLatin1("translator"), i18n("Translator")); + field = new Field(TQString::tqfromLatin1("translator"), i18n("Translator")); field->setCategory(i18n(book_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("language"), i18n("Language")); + field = new Field(TQString::tqfromLatin1("language"), i18n("Language")); field->setCategory(i18n(book_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped | Field::AllowMultiple); list.append(field); - field = new Field(QString::fromLatin1("genre"), i18n("Genre")); + field = new Field(TQString::tqfromLatin1("genre"), i18n("Genre")); field->setCategory(i18n(book_classification)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); list.append(field); // in document versions < 3, this was "keywords" and not "keyword" // but the title didn't change, only the name - field = new Field(QString::fromLatin1("keyword"), i18n("Keywords")); + field = new Field(TQString::tqfromLatin1("keyword"), i18n("Keywords")); field->setCategory(i18n(book_classification)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("series"), i18n("Series")); + field = new Field(TQString::tqfromLatin1("series"), i18n("Series")); field->setCategory(i18n(book_classification)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("series_num"), i18n("Series Number"), Field::Number); + field = new Field(TQString::tqfromLatin1("series_num"), i18n("Series Number"), Field::Number); field->setCategory(i18n(book_classification)); list.append(field); - QStringList cond; + TQStringList cond; cond << i18n("New") << i18n("Used"); - field = new Field(QString::fromLatin1("condition"), i18n("Condition"), cond); + field = new Field(TQString::tqfromLatin1("condition"), i18n("Condition"), cond); field->setCategory(i18n(book_classification)); list.append(field); - field = new Field(QString::fromLatin1("signed"), i18n("Signed"), Field::Bool); + field = new Field(TQString::tqfromLatin1("signed"), i18n("Signed"), Field::Bool); field->setCategory(i18n(book_personal)); list.append(field); - field = new Field(QString::fromLatin1("read"), i18n("Read"), Field::Bool); + field = new Field(TQString::tqfromLatin1("read"), i18n("Read"), Field::Bool); field->setCategory(i18n(book_personal)); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(book_personal)); list.append(field); - field = new Field(QString::fromLatin1("loaned"), i18n("Loaned"), Field::Bool); + field = new Field(TQString::tqfromLatin1("loaned"), i18n("Loaned"), Field::Bool); field->setCategory(i18n(book_personal)); list.append(field); - field = new Field(QString::fromLatin1("rating"), i18n("Rating"), Field::Rating); + field = new Field(TQString::tqfromLatin1("rating"), i18n("Rating"), Field::Rating); field->setCategory(i18n(book_personal)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("cover"), i18n("Front Cover"), Field::Image); + field = new Field(TQString::tqfromLatin1("cover"), i18n("Front Cover"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); field->setCategory(i18n(book_personal)); list.append(field); @@ -183,19 +183,19 @@ Tellico::Data::FieldVec BookCollection::defaultFields() { int BookCollection::sameEntry(Data::EntryPtr entry1_, Data::EntryPtr entry2_) const { // equal isbn's or lccn's are easy, give it a weight of 100 - if(Entry::compareValues(entry1_, entry2_, QString::fromLatin1("isbn"), this) > 0 || - Entry::compareValues(entry1_, entry2_, QString::fromLatin1("lccn"), this) > 0) { + if(Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("isbn"), this) > 0 || + Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("lccn"), this) > 0) { return 100; // good match } - int res = 3*Entry::compareValues(entry1_, entry2_, QString::fromLatin1("title"), this); + int res = 3*Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("title"), this); // if(res == 0) { // myDebug() << "BookCollection::sameEntry() - different titles for " << entry1_->title() << " vs. " // << entry2_->title() << endl; // } - res += 2*Entry::compareValues(entry1_, entry2_, QString::fromLatin1("author"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("cr_year"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("pub_year"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("binding"), this); + res += 2*Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("author"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("cr_year"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("pub_year"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("binding"), this); return res; } diff --git a/src/collections/bookcollection.h b/src/collections/bookcollection.h index 0236dd6..0ccc58b 100644 --- a/src/collections/bookcollection.h +++ b/src/collections/bookcollection.h @@ -53,6 +53,7 @@ namespace Tellico { */ class BookCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -61,7 +62,7 @@ public: * @param addFields Whether to add the default attributes * @param title The title of the collection */ - BookCollection(bool addFields, const QString& title = QString::null); + BookCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return Book; } virtual int sameEntry(Data::EntryPtr entry1, Data::EntryPtr entry2) const; diff --git a/src/collections/cardcollection.cpp b/src/collections/cardcollection.cpp index c29ad7f..815f5f9 100644 --- a/src/collections/cardcollection.cpp +++ b/src/collections/cardcollection.cpp @@ -22,97 +22,97 @@ namespace { using Tellico::Data::CardCollection; -CardCollection::CardCollection(bool addFields_, const QString& title_ /*=null*/) +CardCollection::CardCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Cards") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("series")); + setDefaultGroupField(TQString::tqfromLatin1("series")); } Tellico::Data::FieldVec CardCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title"), Field::Dependent); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title"), Field::Dependent); field->setCategory(i18n(card_general)); - field->setDescription(QString::fromLatin1("%{year} %{brand} %{player}")); + field->setDescription(TQString::tqfromLatin1("%{year} %{brand} %{player}")); field->setFlags(Field::NoDelete); list.append(field); - field = new Field(QString::fromLatin1("player"), i18n("Player")); + field = new Field(TQString::tqfromLatin1("player"), i18n("Player")); field->setCategory(i18n(card_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("team"), i18n("Team")); + field = new Field(TQString::tqfromLatin1("team"), i18n("Team")); field->setCategory(i18n(card_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("brand"), i18n("Brand")); + field = new Field(TQString::tqfromLatin1("brand"), i18n("Brand")); field->setCategory(i18n(card_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); // might not be totally numeric! - field = new Field(QString::fromLatin1("number"), i18n("Card Number")); + field = new Field(TQString::tqfromLatin1("number"), i18n("Card Number")); field->setCategory(i18n(card_general)); list.append(field); - field = new Field(QString::fromLatin1("year"), i18n("Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("year"), i18n("Year"), Field::Number); field->setCategory(i18n(card_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("series"), i18n("Series")); + field = new Field(TQString::tqfromLatin1("series"), i18n("Series")); field->setCategory(i18n(card_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("type"), i18n("Card Type")); + field = new Field(TQString::tqfromLatin1("type"), i18n("Card Type")); field->setCategory(i18n(card_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(card_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(card_personal)); list.append(field); - field = new Field(QString::fromLatin1("location"), i18n("Location")); + field = new Field(TQString::tqfromLatin1("location"), i18n("Location")); field->setCategory(i18n(card_personal)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(card_personal)); list.append(field); - field = new Field(QString::fromLatin1("keyword"), i18n("Keywords")); + field = new Field(TQString::tqfromLatin1("keyword"), i18n("Keywords")); field->setCategory(i18n(card_personal)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("quantity"), i18n("Quantity"), Field::Number); + field = new Field(TQString::tqfromLatin1("quantity"), i18n("Quantity"), Field::Number); field->setCategory(i18n(card_personal)); list.append(field); - field = new Field(QString::fromLatin1("front"), i18n("Front Image"), Field::Image); + field = new Field(TQString::tqfromLatin1("front"), i18n("Front Image"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("back"), i18n("Back Image"), Field::Image); + field = new Field(TQString::tqfromLatin1("back"), i18n("Back Image"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); list.append(field); return list; diff --git a/src/collections/cardcollection.h b/src/collections/cardcollection.h index 61fd2b0..cd9b3ee 100644 --- a/src/collections/cardcollection.h +++ b/src/collections/cardcollection.h @@ -29,6 +29,7 @@ namespace Tellico { */ class CardCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -37,7 +38,7 @@ public: * @param addFields A boolean indicating whether the default attributes should be added * @param title The title of the collection */ - CardCollection(bool addFields, const QString& title = QString::null); + CardCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return Card; } diff --git a/src/collections/coincollection.cpp b/src/collections/coincollection.cpp index 1cd2ec0..d3a7e01 100644 --- a/src/collections/coincollection.cpp +++ b/src/collections/coincollection.cpp @@ -22,59 +22,59 @@ namespace { using Tellico::Data::CoinCollection; -CoinCollection::CoinCollection(bool addFields_, const QString& title_ /*=null*/) +CoinCollection::CoinCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Coins") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("denomination")); + setDefaultGroupField(TQString::tqfromLatin1("denomination")); } Tellico::Data::FieldVec CoinCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title"), Field::Dependent); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title"), Field::Dependent); field->setCategory(i18n(coin_general)); // not i18n() - field->setDescription(QString::fromLatin1("%{year}%{mintmark} %{type} %{denomination}")); + field->setDescription(TQString::tqfromLatin1("%{year}%{mintmark} %{type} %{denomination}")); field->setFlags(Field::NoDelete); list.append(field); - field = new Field(QString::fromLatin1("type"), i18n("Type")); + field = new Field(TQString::tqfromLatin1("type"), i18n("Type")); field->setCategory(i18n(coin_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatTitle); list.append(field); /* TRANSLATORS: denomination refers to the monetary value. */ - field = new Field(QString::fromLatin1("denomination"), i18n("Denomination")); + field = new Field(TQString::tqfromLatin1("denomination"), i18n("Denomination")); field->setCategory(i18n(coin_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("year"), i18n("Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("year"), i18n("Year"), Field::Number); field->setCategory(i18n(coin_general)); field->setFlags(Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("mintmark"), i18n("Mint Mark")); + field = new Field(TQString::tqfromLatin1("mintmark"), i18n("Mint Mark")); field->setCategory(i18n(coin_general)); field->setFlags(Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("country"), i18n("Country")); + field = new Field(TQString::tqfromLatin1("country"), i18n("Country")); field->setCategory(i18n(coin_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("set"), i18n("Coin Set"), Field::Bool); + field = new Field(TQString::tqfromLatin1("set"), i18n("Coin Set"), Field::Bool); field->setCategory(i18n(coin_general)); list.append(field); - QStringList grade = QStringList::split(QRegExp(QString::fromLatin1("\\s*,\\s*")), + TQStringList grade = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s*,\\s*")), i18n("Coin grade levels - " "Proof-65,Proof-60,Mint State-65,Mint State-60," "Almost Uncirculated-55,Almost Uncirculated-50," @@ -85,47 +85,47 @@ Tellico::Data::FieldVec CoinCollection::defaultFields() { "Extremely Fine-40,Very Fine-30,Very Fine-20,Fine-12," "Very Good-8,Good-4,Fair"), false); - field = new Field(QString::fromLatin1("grade"), i18n("Grade"), grade); + field = new Field(TQString::tqfromLatin1("grade"), i18n("Grade"), grade); field->setCategory(i18n(coin_general)); field->setFlags(Field::AllowGrouped); list.append(field); - QStringList service = QStringList::split(QRegExp(QString::fromLatin1("\\s*,\\s*")), + TQStringList service = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s*,\\s*")), i18n("Coin grading services - " "PCGS,NGC,ANACS,ICG,ASA,PCI", "PCGS,NGC,ANACS,ICG,ASA,PCI"), false); - field = new Field(QString::fromLatin1("service"), i18n("Grading Service"), service); + field = new Field(TQString::tqfromLatin1("service"), i18n("Grading Service"), service); field->setCategory(i18n(coin_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(coin_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(coin_personal)); list.append(field); - field = new Field(QString::fromLatin1("location"), i18n("Location")); + field = new Field(TQString::tqfromLatin1("location"), i18n("Location")); field->setCategory(i18n(coin_personal)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(coin_personal)); list.append(field); - field = new Field(QString::fromLatin1("obverse"), i18n("Obverse"), Field::Image); + field = new Field(TQString::tqfromLatin1("obverse"), i18n("Obverse"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("reverse"), i18n("Reverse"), Field::Image); + field = new Field(TQString::tqfromLatin1("reverse"), i18n("Reverse"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); field->setCategory(i18n(coin_personal)); list.append(field); diff --git a/src/collections/coincollection.h b/src/collections/coincollection.h index d22937d..cd6beb9 100644 --- a/src/collections/coincollection.h +++ b/src/collections/coincollection.h @@ -29,6 +29,7 @@ namespace Tellico { */ class CoinCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -37,7 +38,7 @@ public: * @param addFields Whether to add the default attributes * @param title The title of the collection */ - CoinCollection(bool addFields, const QString& title = QString::null); + CoinCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return Coin; } diff --git a/src/collections/comicbookcollection.cpp b/src/collections/comicbookcollection.cpp index 30e1ef0..36e31a4 100644 --- a/src/collections/comicbookcollection.cpp +++ b/src/collections/comicbookcollection.cpp @@ -24,130 +24,130 @@ namespace { using Tellico::Data::ComicBookCollection; -ComicBookCollection::ComicBookCollection(bool addFields_, const QString& title_ /*=null*/) +ComicBookCollection::ComicBookCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Comic Books") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("series")); + setDefaultGroupField(TQString::tqfromLatin1("series")); } Tellico::Data::FieldVec ComicBookCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title")); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title")); field->setCategory(i18n(comic_general)); field->setFlags(Field::NoDelete); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("subtitle"), i18n("Subtitle")); + field = new Field(TQString::tqfromLatin1("subtitle"), i18n("Subtitle")); field->setCategory(i18n(comic_general)); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("writer"), i18n("Writer")); + field = new Field(TQString::tqfromLatin1("writer"), i18n("Writer")); field->setCategory(i18n(comic_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("artist"), i18n("Comic Book Illustrator", "Artist")); + field = new Field(TQString::tqfromLatin1("artist"), i18n("Comic Book Illustrator", "Artist")); field->setCategory(i18n(comic_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("series"), i18n("Series")); + field = new Field(TQString::tqfromLatin1("series"), i18n("Series")); field->setCategory(i18n(comic_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("issue"), i18n("Issue"), Field::Number); + field = new Field(TQString::tqfromLatin1("issue"), i18n("Issue"), Field::Number); field->setCategory(i18n(comic_general)); field->setFlags(Field::AllowMultiple); list.append(field); - field = new Field(QString::fromLatin1("publisher"), i18n("Publisher")); + field = new Field(TQString::tqfromLatin1("publisher"), i18n("Publisher")); field->setCategory(i18n(comic_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("edition"), i18n("Edition")); + field = new Field(TQString::tqfromLatin1("edition"), i18n("Edition")); field->setCategory(i18n(comic_publishing)); field->setFlags(Field::AllowCompletion); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("pub_year"), i18n("Publication Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("pub_year"), i18n("Publication Year"), Field::Number); field->setCategory(i18n(comic_publishing)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("pages"), i18n("Pages"), Field::Number); + field = new Field(TQString::tqfromLatin1("pages"), i18n("Pages"), Field::Number); field->setCategory(i18n(comic_publishing)); list.append(field); - field = new Field(QString::fromLatin1("country"), i18n("Country")); + field = new Field(TQString::tqfromLatin1("country"), i18n("Country")); field->setCategory(i18n(comic_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped | Field::AllowMultiple); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("language"), i18n("Language")); + field = new Field(TQString::tqfromLatin1("language"), i18n("Language")); field->setCategory(i18n(comic_publishing)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped | Field::AllowMultiple); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("genre"), i18n("Genre")); + field = new Field(TQString::tqfromLatin1("genre"), i18n("Genre")); field->setCategory(i18n(comic_classification)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("keyword"), i18n("Keywords")); + field = new Field(TQString::tqfromLatin1("keyword"), i18n("Keywords")); field->setCategory(i18n(comic_classification)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); list.append(field); - QStringList cond = QStringList::split(QRegExp(QString::fromLatin1("\\s*,\\s*")), + TQStringList cond = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s*,\\s*")), i18n("Comic book grade levels - " "Mint,Near Mint,Very Fine,Fine,Very Good,Good,Fair,Poor", "Mint,Near Mint,Very Fine,Fine,Very Good,Good,Fair,Poor"), false); - field = new Field(QString::fromLatin1("condition"), i18n("Condition"), cond); + field = new Field(TQString::tqfromLatin1("condition"), i18n("Condition"), cond); field->setCategory(i18n(comic_classification)); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(comic_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(comic_personal)); list.append(field); - field = new Field(QString::fromLatin1("signed"), i18n("Signed"), Field::Bool); + field = new Field(TQString::tqfromLatin1("signed"), i18n("Signed"), Field::Bool); field->setCategory(i18n(comic_personal)); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(comic_personal)); list.append(field); - field = new Field(QString::fromLatin1("loaned"), i18n("Loaned"), Field::Bool); + field = new Field(TQString::tqfromLatin1("loaned"), i18n("Loaned"), Field::Bool); field->setCategory(i18n(comic_personal)); list.append(field); - field = new Field(QString::fromLatin1("cover"), i18n("Front Cover"), Field::Image); + field = new Field(TQString::tqfromLatin1("cover"), i18n("Front Cover"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); field->setCategory(i18n(comic_personal)); list.append(field); diff --git a/src/collections/comicbookcollection.h b/src/collections/comicbookcollection.h index 36302c2..707b19d 100644 --- a/src/collections/comicbookcollection.h +++ b/src/collections/comicbookcollection.h @@ -29,6 +29,7 @@ namespace Tellico { */ class ComicBookCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -36,7 +37,7 @@ public: * * @param title The title of the collection */ - ComicBookCollection(bool addFields, const QString& title = QString::null); + ComicBookCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return ComicBook; } diff --git a/src/collections/filecatalog.cpp b/src/collections/filecatalog.cpp index 8d375be..cf67e2d 100644 --- a/src/collections/filecatalog.cpp +++ b/src/collections/filecatalog.cpp @@ -21,82 +21,82 @@ namespace { using Tellico::Data::FileCatalog; -FileCatalog::FileCatalog(bool addFields_, const QString& title_ /*=null*/) +FileCatalog::FileCatalog(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Files") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("volume")); + setDefaultGroupField(TQString::tqfromLatin1("volume")); } Tellico::Data::FieldVec FileCatalog::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Name")); + field = new Field(TQString::tqfromLatin1("title"), i18n("Name")); field->setCategory(i18n(file_general)); field->setFlags(Field::NoDelete); list.append(field); - field = new Field(QString::fromLatin1("url"), i18n("URL"), Field::URL); + field = new Field(TQString::tqfromLatin1("url"), i18n("URL"), Field::URL); field->setCategory(i18n(file_general)); list.append(field); - field = new Field(QString::fromLatin1("description"), i18n("Description")); + field = new Field(TQString::tqfromLatin1("description"), i18n("Description")); field->setCategory(i18n(file_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("volume"), i18n("Volume")); + field = new Field(TQString::tqfromLatin1("volume"), i18n("Volume")); field->setCategory(i18n(file_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("folder"), i18n("Folder")); + field = new Field(TQString::tqfromLatin1("folder"), i18n("Folder")); field->setCategory(i18n(file_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("mimetype"), i18n("Mimetype")); + field = new Field(TQString::tqfromLatin1("mimetype"), i18n("Mimetype")); field->setCategory(i18n(file_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("size"), i18n("Size")); + field = new Field(TQString::tqfromLatin1("size"), i18n("Size")); field->setCategory(i18n(file_general)); list.append(field); - field = new Field(QString::fromLatin1("permissions"), i18n("Permissions")); + field = new Field(TQString::tqfromLatin1("permissions"), i18n("Permissions")); field->setCategory(i18n(file_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("owner"), i18n("Owner")); + field = new Field(TQString::tqfromLatin1("owner"), i18n("Owner")); field->setCategory(i18n(file_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("group"), i18n("Group")); + field = new Field(TQString::tqfromLatin1("group"), i18n("Group")); field->setCategory(i18n(file_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); // these dates are string fields, not dates, since the time is included - field = new Field(QString::fromLatin1("created"), i18n("Created")); + field = new Field(TQString::tqfromLatin1("created"), i18n("Created")); field->setCategory(i18n(file_general)); list.append(field); - field = new Field(QString::fromLatin1("modified"), i18n("Modified")); + field = new Field(TQString::tqfromLatin1("modified"), i18n("Modified")); field->setCategory(i18n(file_general)); list.append(field); - field = new Field(QString::fromLatin1("metainfo"), i18n("Meta Info"), Field::Table); - field->setProperty(QString::fromLatin1("columns"), QChar('2')); - field->setProperty(QString::fromLatin1("column1"), i18n("Property")); - field->setProperty(QString::fromLatin1("column2"), i18n("Value")); + field = new Field(TQString::tqfromLatin1("metainfo"), i18n("Meta Info"), Field::Table); + field->setProperty(TQString::tqfromLatin1("columns"), TQChar('2')); + field->setProperty(TQString::tqfromLatin1("column1"), i18n("Property")); + field->setProperty(TQString::tqfromLatin1("column2"), i18n("Value")); list.append(field); - field = new Field(QString::fromLatin1("icon"), i18n("Icon"), Field::Image); + field = new Field(TQString::tqfromLatin1("icon"), i18n("Icon"), Field::Image); list.append(field); return list; diff --git a/src/collections/filecatalog.h b/src/collections/filecatalog.h index aa7a82c..73951e7 100644 --- a/src/collections/filecatalog.h +++ b/src/collections/filecatalog.h @@ -24,9 +24,10 @@ namespace Tellico { */ class FileCatalog : public Collection { Q_OBJECT + TQ_OBJECT public: - FileCatalog(bool addFields, const QString& title = QString::null); + FileCatalog(bool addFields, const TQString& title = TQString()); virtual Type type() const { return File; } diff --git a/src/collections/gamecollection.cpp b/src/collections/gamecollection.cpp index b93176f..d218247 100644 --- a/src/collections/gamecollection.cpp +++ b/src/collections/gamecollection.cpp @@ -22,101 +22,101 @@ namespace { using Tellico::Data::GameCollection; -GameCollection::GameCollection(bool addFields_, const QString& title_ /*=null*/) +GameCollection::GameCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Games") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("platform")); + setDefaultGroupField(TQString::tqfromLatin1("platform")); } Tellico::Data::FieldVec GameCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title")); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title")); field->setCategory(i18n(game_general)); field->setFlags(Field::NoDelete); field->setFormatFlag(Field::FormatTitle); list.append(field); - QStringList platform; + TQStringList platform; platform << i18n("Xbox 360") << i18n("Xbox") << i18n("PlayStation3") << i18n("PlayStation2") << i18n("PlayStation") << i18n("PlayStation Portable", "PSP") << i18n("Nintendo Wii") << i18n("Nintendo DS") << i18n("GameCube") << i18n("Dreamcast") << i18n("Game Boy Advance") << i18n("Game Boy Color") << i18n("Game Boy") << i18n("Windows Platform", "Windows") << i18n("Mac OS") << i18n("Linux"); - field = new Field(QString::fromLatin1("platform"), i18n("Platform"), platform); + field = new Field(TQString::tqfromLatin1("platform"), i18n("Platform"), platform); field->setCategory(i18n(game_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("genre"), i18n("Genre")); + field = new Field(TQString::tqfromLatin1("genre"), i18n("Genre")); field->setCategory(i18n(game_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("year"), i18n("Release Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("year"), i18n("Release Year"), Field::Number); field->setCategory(i18n(game_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("publisher"), i18n("Games - Publisher", "Publisher")); + field = new Field(TQString::tqfromLatin1("publisher"), i18n("Games - Publisher", "Publisher")); field->setCategory(i18n(game_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("developer"), i18n("Developer")); + field = new Field(TQString::tqfromLatin1("developer"), i18n("Developer")); field->setCategory(i18n(game_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - QStringList cert = QStringList::split(QRegExp(QString::fromLatin1("\\s*,\\s*")), + TQStringList cert = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s*,\\s*")), i18n("Video game ratings - " "Unrated, Adults Only, Mature, Teen, Everyone, Early Childhood, Pending", "Unrated, Adults Only, Mature, Teen, Everyone, Early Childhood, Pending"), false); - field = new Field(QString::fromLatin1("certification"), i18n("ESRB Rating"), cert); + field = new Field(TQString::tqfromLatin1("certification"), i18n("ESRB Rating"), cert); field->setCategory(i18n(game_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("description"), i18n("Description"), Field::Para); + field = new Field(TQString::tqfromLatin1("description"), i18n("Description"), Field::Para); list.append(field); - field = new Field(QString::fromLatin1("rating"), i18n("Personal Rating"), Field::Rating); + field = new Field(TQString::tqfromLatin1("rating"), i18n("Personal Rating"), Field::Rating); field->setCategory(i18n(game_personal)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("completed"), i18n("Completed"), Field::Bool); + field = new Field(TQString::tqfromLatin1("completed"), i18n("Completed"), Field::Bool); field->setCategory(i18n(game_personal)); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(game_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(game_personal)); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(game_personal)); list.append(field); - field = new Field(QString::fromLatin1("loaned"), i18n("Loaned"), Field::Bool); + field = new Field(TQString::tqfromLatin1("loaned"), i18n("Loaned"), Field::Bool); field->setCategory(i18n(game_personal)); list.append(field); - field = new Field(QString::fromLatin1("cover"), i18n("Cover"), Field::Image); + field = new Field(TQString::tqfromLatin1("cover"), i18n("Cover"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); field->setCategory(i18n(game_personal)); list.append(field); diff --git a/src/collections/gamecollection.h b/src/collections/gamecollection.h index 7d6ce92..0b08373 100644 --- a/src/collections/gamecollection.h +++ b/src/collections/gamecollection.h @@ -24,6 +24,7 @@ namespace Tellico { */ class GameCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -32,7 +33,7 @@ public: * @param addFields Whether to add the default attributes * @param title The title of the collection */ - GameCollection(bool addFields, const QString& title = QString::null); + GameCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return Game; } diff --git a/src/collections/musiccollection.cpp b/src/collections/musiccollection.cpp index d3c0445..fde5a04 100644 --- a/src/collections/musiccollection.cpp +++ b/src/collections/musiccollection.cpp @@ -22,93 +22,93 @@ namespace { using Tellico::Data::MusicCollection; -MusicCollection::MusicCollection(bool addFields_, const QString& title_ /*=null*/) +MusicCollection::MusicCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Music") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("artist")); + setDefaultGroupField(TQString::tqfromLatin1("artist")); } Tellico::Data::FieldVec MusicCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Album")); + field = new Field(TQString::tqfromLatin1("title"), i18n("Album")); field->setCategory(i18n(music_general)); field->setFlags(Field::NoDelete | Field::AllowCompletion); field->setFormatFlag(Field::FormatTitle); list.append(field); - QStringList media; + TQStringList media; media << i18n("Compact Disc") << i18n("DVD") << i18n("Cassette") << i18n("Vinyl"); - field = new Field(QString::fromLatin1("medium"), i18n("Medium"), media); + field = new Field(TQString::tqfromLatin1("medium"), i18n("Medium"), media); field->setCategory(i18n(music_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("artist"), i18n("Artist")); + field = new Field(TQString::tqfromLatin1("artist"), i18n("Artist")); field->setCategory(i18n(music_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped | Field::AllowMultiple); field->setFormatFlag(Field::FormatTitle); // don't use FormatName list.append(field); - field = new Field(QString::fromLatin1("label"), i18n("Label")); + field = new Field(TQString::tqfromLatin1("label"), i18n("Label")); field->setCategory(i18n(music_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped | Field::AllowMultiple); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("year"), i18n("Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("year"), i18n("Year"), Field::Number); field->setCategory(i18n(music_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("genre"), i18n("Genre")); + field = new Field(TQString::tqfromLatin1("genre"), i18n("Genre")); field->setCategory(i18n(music_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("track"), i18n("Tracks"), Field::Table); + field = new Field(TQString::tqfromLatin1("track"), i18n("Tracks"), Field::Table); field->setFormatFlag(Field::FormatTitle); - field->setProperty(QString::fromLatin1("columns"), QChar('3')); - field->setProperty(QString::fromLatin1("column1"), i18n("Title")); - field->setProperty(QString::fromLatin1("column2"), i18n("Artist")); - field->setProperty(QString::fromLatin1("column3"), i18n("Length")); + field->setProperty(TQString::tqfromLatin1("columns"), TQChar('3')); + field->setProperty(TQString::tqfromLatin1("column1"), i18n("Title")); + field->setProperty(TQString::tqfromLatin1("column2"), i18n("Artist")); + field->setProperty(TQString::tqfromLatin1("column3"), i18n("Length")); list.append(field); - field = new Field(QString::fromLatin1("rating"), i18n("Rating"), Field::Rating); + field = new Field(TQString::tqfromLatin1("rating"), i18n("Rating"), Field::Rating); field->setCategory(i18n(music_personal)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(music_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(music_personal)); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(music_personal)); list.append(field); - field = new Field(QString::fromLatin1("loaned"), i18n("Loaned"), Field::Bool); + field = new Field(TQString::tqfromLatin1("loaned"), i18n("Loaned"), Field::Bool); field->setCategory(i18n(music_personal)); list.append(field); - field = new Field(QString::fromLatin1("keyword"), i18n("Keywords")); + field = new Field(TQString::tqfromLatin1("keyword"), i18n("Keywords")); field->setCategory(i18n(music_personal)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("cover"), i18n("Cover"), Field::Image); + field = new Field(TQString::tqfromLatin1("cover"), i18n("Cover"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); field->setCategory(i18n(music_personal)); list.append(field); @@ -117,15 +117,15 @@ Tellico::Data::FieldVec MusicCollection::defaultFields() { int MusicCollection::sameEntry(Data::EntryPtr entry1_, Data::EntryPtr entry2_) const { // not enough for title to be equal, must also have another field - int res = 2*Entry::compareValues(entry1_, entry2_, QString::fromLatin1("title"), this); + int res = 2*Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("title"), this); // if(res == 0) { // myDebug() << "MusicCollection::sameEntry() - different titles for " << entry1_->title() << " vs. " // << entry2_->title() << endl; // } - res += 2*Entry::compareValues(entry1_, entry2_, QString::fromLatin1("artist"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("year"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("label"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("medium"), this); + res += 2*Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("artist"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("year"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("label"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("medium"), this); return res; } diff --git a/src/collections/musiccollection.h b/src/collections/musiccollection.h index ddada5b..32cfa4c 100644 --- a/src/collections/musiccollection.h +++ b/src/collections/musiccollection.h @@ -34,6 +34,7 @@ namespace Tellico { */ class MusicCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -42,7 +43,7 @@ public: * @param addFields Whether to add the default attributes * @param title The title of the collection */ - MusicCollection(bool addFields, const QString& title = QString::null); + MusicCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return Album; } virtual int sameEntry(Data::EntryPtr, Data::EntryPtr) const; diff --git a/src/collections/stampcollection.cpp b/src/collections/stampcollection.cpp index c26da9a..f5b8e0c 100644 --- a/src/collections/stampcollection.cpp +++ b/src/collections/stampcollection.cpp @@ -23,108 +23,108 @@ namespace { using Tellico::Data::StampCollection; -StampCollection::StampCollection(bool addFields_, const QString& title_ /*=null*/) +StampCollection::StampCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Stamps") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("denomination")); + setDefaultGroupField(TQString::tqfromLatin1("denomination")); } Tellico::Data::FieldVec StampCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title"), Field::Dependent); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title"), Field::Dependent); field->setCategory(i18n(stamp_general)); - field->setDescription(QString::fromLatin1("%{year} %{description} %{denomination}")); + field->setDescription(TQString::tqfromLatin1("%{year} %{description} %{denomination}")); field->setFlags(Field::NoDelete); list.append(field); - field = new Field(QString::fromLatin1("description"), i18n("Description")); + field = new Field(TQString::tqfromLatin1("description"), i18n("Description")); field->setCategory(i18n(stamp_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatTitle); list.append(field); - field = new Field(QString::fromLatin1("denomination"), i18n("Denomination")); + field = new Field(TQString::tqfromLatin1("denomination"), i18n("Denomination")); field->setCategory(i18n(stamp_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("country"), i18n("Country")); + field = new Field(TQString::tqfromLatin1("country"), i18n("Country")); field->setCategory(i18n(stamp_general)); field->setFormatFlag(Field::FormatPlain); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("year"), i18n("Issue Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("year"), i18n("Issue Year"), Field::Number); field->setCategory(i18n(stamp_general)); field->setFlags(Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("color"), i18n("Color")); + field = new Field(TQString::tqfromLatin1("color"), i18n("Color")); field->setCategory(i18n(stamp_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("scott"), i18n("Scott#")); + field = new Field(TQString::tqfromLatin1("scott"), i18n("Scott#")); field->setCategory(i18n(stamp_general)); list.append(field); - QStringList grade = QStringList::split(QRegExp(QString::fromLatin1("\\s*,\\s*")), + TQStringList grade = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s*,\\s*")), i18n("Stamp grade levels - " "Superb,Extremely Fine,Very Fine,Fine,Average,Poor", "Superb,Extremely Fine,Very Fine,Fine,Average,Poor"), false); - field = new Field(QString::fromLatin1("grade"), i18n("Grade"), grade); + field = new Field(TQString::tqfromLatin1("grade"), i18n("Grade"), grade); field->setCategory(i18n(stamp_condition)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("cancelled"), i18n("Cancelled"), Field::Bool); + field = new Field(TQString::tqfromLatin1("cancelled"), i18n("Cancelled"), Field::Bool); field->setCategory(i18n(stamp_condition)); list.append(field); /* TRANSLATORS: See http://en.wikipedia.org/wiki/Stamp_hinge */ - field = new Field(QString::fromLatin1("hinged"), i18n("Hinged")); + field = new Field(TQString::tqfromLatin1("hinged"), i18n("Hinged")); field->setCategory(i18n(stamp_condition)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("centering"), i18n("Centering")); + field = new Field(TQString::tqfromLatin1("centering"), i18n("Centering")); field->setCategory(i18n(stamp_condition)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("gummed"), i18n("Gummed")); + field = new Field(TQString::tqfromLatin1("gummed"), i18n("Gummed")); field->setCategory(i18n(stamp_condition)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(stamp_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(stamp_personal)); list.append(field); - field = new Field(QString::fromLatin1("location"), i18n("Location")); + field = new Field(TQString::tqfromLatin1("location"), i18n("Location")); field->setCategory(i18n(stamp_personal)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(stamp_personal)); list.append(field); - field = new Field(QString::fromLatin1("image"), i18n("Image"), Field::Image); + field = new Field(TQString::tqfromLatin1("image"), i18n("Image"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); list.append(field); return list; diff --git a/src/collections/stampcollection.h b/src/collections/stampcollection.h index 8b81623..5a5def9 100644 --- a/src/collections/stampcollection.h +++ b/src/collections/stampcollection.h @@ -46,6 +46,7 @@ namespace Tellico { */ class StampCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -54,7 +55,7 @@ public: * @param addFields A boolean indicating whether the default attributes should be added * @param title The title of the collection */ - StampCollection(bool addFields, const QString& title = QString::null); + StampCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return Stamp; } diff --git a/src/collections/videocollection.cpp b/src/collections/videocollection.cpp index ad83b5f..d8ac081 100644 --- a/src/collections/videocollection.cpp +++ b/src/collections/videocollection.cpp @@ -24,53 +24,53 @@ namespace { using Tellico::Data::VideoCollection; -VideoCollection::VideoCollection(bool addFields_, const QString& title_ /*=null*/) +VideoCollection::VideoCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Videos") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("genre")); + setDefaultGroupField(TQString::tqfromLatin1("genre")); } Tellico::Data::FieldVec VideoCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title")); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title")); field->setCategory(i18n("General")); field->setFlags(Field::NoDelete); field->setFormatFlag(Field::FormatTitle); list.append(field); - QStringList media; + TQStringList media; media << i18n("DVD") << i18n("VHS") << i18n("VCD") << i18n("DivX") << i18n("Blu-ray") << i18n("HD DVD"); - field = new Field(QString::fromLatin1("medium"), i18n("Medium"), media); + field = new Field(TQString::tqfromLatin1("medium"), i18n("Medium"), media); field->setCategory(i18n(video_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("year"), i18n("Production Year"), Field::Number); + field = new Field(TQString::tqfromLatin1("year"), i18n("Production Year"), Field::Number); field->setCategory(i18n(video_general)); field->setFlags(Field::AllowGrouped); list.append(field); - QStringList cert = QStringList::split(QRegExp(QString::fromLatin1("\\s*,\\s*")), + TQStringList cert = TQStringList::split(TQRegExp(TQString::tqfromLatin1("\\s*,\\s*")), i18n("Movie ratings - " "G (USA),PG (USA),PG-13 (USA),R (USA), U (USA)", "G (USA),PG (USA),PG-13 (USA),R (USA), U (USA)"), false); - field = new Field(QString::fromLatin1("certification"), i18n("Certification"), cert); + field = new Field(TQString::tqfromLatin1("certification"), i18n("Certification"), cert); field->setCategory(i18n(video_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("genre"), i18n("Genre")); + field = new Field(TQString::tqfromLatin1("genre"), i18n("Genre")); field->setCategory(i18n(video_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - QStringList region; + TQStringList region; region << i18n("Region 1") << i18n("Region 2") << i18n("Region 3") @@ -79,140 +79,140 @@ Tellico::Data::FieldVec VideoCollection::defaultFields() { << i18n("Region 6") << i18n("Region 7") << i18n("Region 8"); - field = new Field(QString::fromLatin1("region"), i18n("Region"), region); + field = new Field(TQString::tqfromLatin1("region"), i18n("Region"), region); field->setCategory(i18n(video_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("nationality"), i18n("Nationality")); + field = new Field(TQString::tqfromLatin1("nationality"), i18n("Nationality")); field->setCategory(i18n(video_general)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - QStringList format; + TQStringList format; format << i18n("NTSC") << i18n("PAL") << i18n("SECAM"); - field = new Field(QString::fromLatin1("format"), i18n("Format"), format); + field = new Field(TQString::tqfromLatin1("format"), i18n("Format"), format); field->setCategory(i18n(video_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("cast"), i18n("Cast"), Field::Table); - field->setProperty(QString::fromLatin1("columns"), QChar('2')); - field->setProperty(QString::fromLatin1("column1"), i18n("Actor/Actress")); - field->setProperty(QString::fromLatin1("column2"), i18n("Role")); + field = new Field(TQString::tqfromLatin1("cast"), i18n("Cast"), Field::Table); + field->setProperty(TQString::tqfromLatin1("columns"), TQChar('2')); + field->setProperty(TQString::tqfromLatin1("column1"), i18n("Actor/Actress")); + field->setProperty(TQString::tqfromLatin1("column2"), i18n("Role")); field->setFormatFlag(Field::FormatName); field->setFlags(Field::AllowGrouped); field->setDescription(i18n("A table for the cast members, along with the roles they play")); list.append(field); - field = new Field(QString::fromLatin1("director"), i18n("Director")); + field = new Field(TQString::tqfromLatin1("director"), i18n("Director")); field->setCategory(i18n(video_people)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("producer"), i18n("Producer")); + field = new Field(TQString::tqfromLatin1("producer"), i18n("Producer")); field->setCategory(i18n(video_people)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("writer"), i18n("Writer")); + field = new Field(TQString::tqfromLatin1("writer"), i18n("Writer")); field->setCategory(i18n(video_people)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("composer"), i18n("Composer")); + field = new Field(TQString::tqfromLatin1("composer"), i18n("Composer")); field->setCategory(i18n(video_people)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatName); list.append(field); - field = new Field(QString::fromLatin1("studio"), i18n("Studio")); + field = new Field(TQString::tqfromLatin1("studio"), i18n("Studio")); field->setCategory(i18n(video_people)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("language"), i18n("Language Tracks")); + field = new Field(TQString::tqfromLatin1("language"), i18n("Language Tracks")); field->setCategory(i18n(video_features)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("subtitle"), i18n("Subtitle Languages")); + field = new Field(TQString::tqfromLatin1("subtitle"), i18n("Subtitle Languages")); field->setCategory(i18n(video_features)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("audio-track"), i18n("Audio Tracks")); + field = new Field(TQString::tqfromLatin1("audio-track"), i18n("Audio Tracks")); field->setCategory(i18n(video_features)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("running-time"), i18n("Running Time"), Field::Number); + field = new Field(TQString::tqfromLatin1("running-time"), i18n("Running Time"), Field::Number); field->setCategory(i18n(video_features)); field->setDescription(i18n("The running time of the video (in minutes)")); list.append(field); - field = new Field(QString::fromLatin1("aspect-ratio"), i18n("Aspect Ratio")); + field = new Field(TQString::tqfromLatin1("aspect-ratio"), i18n("Aspect Ratio")); field->setCategory(i18n(video_features)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("widescreen"), i18n("Widescreen"), Field::Bool); + field = new Field(TQString::tqfromLatin1("widescreen"), i18n("Widescreen"), Field::Bool); field->setCategory(i18n(video_features)); list.append(field); - QStringList color; + TQStringList color; color << i18n("Color") << i18n("Black & White"); - field = new Field(QString::fromLatin1("color"), i18n("Color Mode"), color); + field = new Field(TQString::tqfromLatin1("color"), i18n("Color Mode"), color); field->setCategory(i18n(video_features)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("directors-cut"), i18n("Director's Cut"), Field::Bool); + field = new Field(TQString::tqfromLatin1("directors-cut"), i18n("Director's Cut"), Field::Bool); field->setCategory(i18n(video_features)); list.append(field); - field = new Field(QString::fromLatin1("plot"), i18n("Plot Summary"), Field::Para); + field = new Field(TQString::tqfromLatin1("plot"), i18n("Plot Summary"), Field::Para); list.append(field); - field = new Field(QString::fromLatin1("rating"), i18n("Personal Rating"), Field::Rating); + field = new Field(TQString::tqfromLatin1("rating"), i18n("Personal Rating"), Field::Rating); field->setCategory(i18n(video_personal)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(video_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(video_personal)); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(video_personal)); list.append(field); - field = new Field(QString::fromLatin1("loaned"), i18n("Loaned"), Field::Bool); + field = new Field(TQString::tqfromLatin1("loaned"), i18n("Loaned"), Field::Bool); field->setCategory(i18n(video_personal)); list.append(field); - field = new Field(QString::fromLatin1("keyword"), i18n("Keywords")); + field = new Field(TQString::tqfromLatin1("keyword"), i18n("Keywords")); field->setCategory(i18n(video_personal)); field->setFlags(Field::AllowCompletion | Field::AllowMultiple | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("cover"), i18n("Cover"), Field::Image); + field = new Field(TQString::tqfromLatin1("cover"), i18n("Cover"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); list.append(field); return list; @@ -221,15 +221,15 @@ Tellico::Data::FieldVec VideoCollection::defaultFields() { int VideoCollection::sameEntry(Data::EntryPtr entry1_, Data::EntryPtr entry2_) const { // not enough for title to be equal, must also have another field // ever possible for a studio to do two movies with identical titles? - int res = 3*Entry::compareValues(entry1_, entry2_, QString::fromLatin1("title"), this); + int res = 3*Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("title"), this); // if(res == 0) { // myDebug() << "VideoCollection::sameEntry() - different titles for " << entry1_->title() << " vs. " // << entry2_->title() << endl; // } - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("year"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("director"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("studio"), this); - res += Entry::compareValues(entry1_, entry2_, QString::fromLatin1("medium"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("year"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("director"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("studio"), this); + res += Entry::compareValues(entry1_, entry2_, TQString::tqfromLatin1("medium"), this); return res; } diff --git a/src/collections/videocollection.h b/src/collections/videocollection.h index 58f729c..a47814f 100644 --- a/src/collections/videocollection.h +++ b/src/collections/videocollection.h @@ -33,6 +33,7 @@ namespace Tellico { */ class VideoCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -41,7 +42,7 @@ public: * @param addFields Whether to add the default attributes * @param title The title of the collection */ - VideoCollection(bool addFields, const QString& title = QString::null); + VideoCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return Video; } virtual int sameEntry(Data::EntryPtr, Data::EntryPtr) const; diff --git a/src/collections/winecollection.cpp b/src/collections/winecollection.cpp index 31bc5d0..bab7617 100644 --- a/src/collections/winecollection.cpp +++ b/src/collections/winecollection.cpp @@ -22,96 +22,96 @@ namespace { using Tellico::Data::WineCollection; -WineCollection::WineCollection(bool addFields_, const QString& title_ /*=null*/) +WineCollection::WineCollection(bool addFields_, const TQString& title_ /*=null*/) : Collection(title_.isEmpty() ? i18n("My Wines") : title_) { if(addFields_) { addFields(defaultFields()); } - setDefaultGroupField(QString::fromLatin1("type")); + setDefaultGroupField(TQString::tqfromLatin1("type")); } Tellico::Data::FieldVec WineCollection::defaultFields() { FieldVec list; FieldPtr field; - field = new Field(QString::fromLatin1("title"), i18n("Title"), Field::Dependent); + field = new Field(TQString::tqfromLatin1("title"), i18n("Title"), Field::Dependent); field->setCategory(i18n(wine_general)); - field->setDescription(QString::fromLatin1("%{vintage} %{producer} %{varietal}")); + field->setDescription(TQString::tqfromLatin1("%{vintage} %{producer} %{varietal}")); field->setFlags(Field::NoDelete); list.append(field); - field = new Field(QString::fromLatin1("producer"), i18n("Producer")); + field = new Field(TQString::tqfromLatin1("producer"), i18n("Producer")); field->setCategory(i18n(wine_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("appellation"), i18n("Appellation")); + field = new Field(TQString::tqfromLatin1("appellation"), i18n("Appellation")); field->setCategory(i18n(wine_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("varietal"), i18n("Varietal")); + field = new Field(TQString::tqfromLatin1("varietal"), i18n("Varietal")); field->setCategory(i18n(wine_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("vintage"), i18n("Vintage"), Field::Number); + field = new Field(TQString::tqfromLatin1("vintage"), i18n("Vintage"), Field::Number); field->setCategory(i18n(wine_general)); field->setFlags(Field::AllowGrouped); list.append(field); - QStringList type; + TQStringList type; type << i18n("Red Wine") << i18n("White Wine") << i18n("Sparkling Wine"); - field = new Field(QString::fromLatin1("type"), i18n("Type"), type); + field = new Field(TQString::tqfromLatin1("type"), i18n("Type"), type); field->setCategory(i18n(wine_general)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("country"), i18n("Country")); + field = new Field(TQString::tqfromLatin1("country"), i18n("Country")); field->setCategory(i18n(wine_general)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); field->setFormatFlag(Field::FormatPlain); list.append(field); - field = new Field(QString::fromLatin1("pur_date"), i18n("Purchase Date")); + field = new Field(TQString::tqfromLatin1("pur_date"), i18n("Purchase Date")); field->setCategory(i18n(wine_personal)); field->setFormatFlag(Field::FormatDate); list.append(field); - field = new Field(QString::fromLatin1("pur_price"), i18n("Purchase Price")); + field = new Field(TQString::tqfromLatin1("pur_price"), i18n("Purchase Price")); field->setCategory(i18n(wine_personal)); list.append(field); - field = new Field(QString::fromLatin1("location"), i18n("Location")); + field = new Field(TQString::tqfromLatin1("location"), i18n("Location")); field->setCategory(i18n(wine_personal)); field->setFlags(Field::AllowCompletion | Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("quantity"), i18n("Quantity"), Field::Number); + field = new Field(TQString::tqfromLatin1("quantity"), i18n("Quantity"), Field::Number); field->setCategory(i18n(wine_personal)); list.append(field); - field = new Field(QString::fromLatin1("drink-by"), i18n("Drink By"), Field::Number); + field = new Field(TQString::tqfromLatin1("drink-by"), i18n("Drink By"), Field::Number); field->setCategory(i18n(wine_personal)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("rating"), i18n("Rating"), Field::Rating); + field = new Field(TQString::tqfromLatin1("rating"), i18n("Rating"), Field::Rating); field->setCategory(i18n(wine_personal)); field->setFlags(Field::AllowGrouped); list.append(field); - field = new Field(QString::fromLatin1("gift"), i18n("Gift"), Field::Bool); + field = new Field(TQString::tqfromLatin1("gift"), i18n("Gift"), Field::Bool); field->setCategory(i18n(wine_personal)); list.append(field); - field = new Field(QString::fromLatin1("label"), i18n("Label Image"), Field::Image); + field = new Field(TQString::tqfromLatin1("label"), i18n("Label Image"), Field::Image); list.append(field); - field = new Field(QString::fromLatin1("comments"), i18n("Comments"), Field::Para); + field = new Field(TQString::tqfromLatin1("comments"), i18n("Comments"), Field::Para); list.append(field); return list; diff --git a/src/collections/winecollection.h b/src/collections/winecollection.h index 236a9cd..6481930 100644 --- a/src/collections/winecollection.h +++ b/src/collections/winecollection.h @@ -34,6 +34,7 @@ namespace Tellico { */ class WineCollection : public Collection { Q_OBJECT + TQ_OBJECT public: /** @@ -42,7 +43,7 @@ public: * @param addFields A boolean indicating whether the default attributes should be added * @param title The title of the collection */ - WineCollection(bool addFields, const QString& title = QString::null); + WineCollection(bool addFields, const TQString& title = TQString()); virtual Type type() const { return Wine; } |