diff options
Diffstat (limited to 'src/entry.h')
-rw-r--r-- | src/entry.h | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/src/entry.h b/src/entry.h index bff3d7d..c589411 100644 --- a/src/entry.h +++ b/src/entry.h @@ -16,9 +16,9 @@ #include "datavectors.h" -#include <qstringlist.h> -#include <qstring.h> -#include <qobject.h> +#include <tqstringlist.h> +#include <tqstring.h> +#include <tqobject.h> #include <functional> @@ -34,23 +34,24 @@ namespace Tellico { * David Weber. The @ref groupName() would be "Weber, David" and the * @ref fieldName() would be "author". * - * It's a QObject because EntryGroupItem holds a QGuardedPtr + * It's a TQObject because EntryGroupItem holds a TQGuardedPtr * * @author Robby Stephenson */ -class EntryGroup : public QObject, public EntryVec { +class EntryGroup : public TQObject, public EntryVec { Q_OBJECT + TQ_OBJECT public: - EntryGroup(const QString& group, const QString& field); + EntryGroup(const TQString& group, const TQString& field); ~EntryGroup(); - const QString& groupName() const { return m_group; } - const QString& fieldName() const { return m_field; } + const TQString& groupName() const { return m_group; } + const TQString& fieldName() const { return m_field; } private: - QString m_group; - QString m_field; + TQString m_group; + TQString m_field; }; /** @@ -71,7 +72,7 @@ public: * The constructor, which automatically sets the id to the current number * of entries in the collection. * - * @param coll A pointer to the parent collection object + * @param coll A pointer to the tqparent collection object */ Entry(CollPtr coll); Entry(CollPtr coll, int id); @@ -96,28 +97,28 @@ public: * * @return The entry title */ - QString title() const; + TQString title() const; /** * Returns the value of the field with a given key name. If the key doesn't - * exist, the method returns @ref QString::null. + * exist, the method returns @ref TQString(). * * @param fieldName The field name * @param formatted Whether to format the field or not. * @return The value of the field */ - QString field(const QString& fieldName, bool formatted=false) const; - QString field(Data::FieldPtr field, bool formatted=false) const; + TQString field(const TQString& fieldName, bool formatted=false) const; + TQString field(Data::FieldPtr field, bool formatted=false) const; /** * Returns the formatted value of the field with a given key name. If the - * key doesn't exist, the method returns @ref QString::null. The value is cached, + * key doesn't exist, the method returns @ref TQString(). The value is cached, * so the first time the value is requested, @ref Field::format is called. * The second time, that lookup isn't necessary. * * @param fieldName The field name * @return The formatted value of the field */ - QString formattedField(const QString& fieldName) const; - QString formattedField(Data::FieldPtr field) const; + TQString formattedField(const TQString& fieldName) const; + TQString formattedField(Data::FieldPtr field) const; /** * Splits a field value. This is faster than calling Data::Field::split() since * a regexp is not used, only a string. @@ -126,8 +127,8 @@ public: * @param format Whether to format the values or not * @return The list of field values */ - QStringList fields(const QString& fieldName, bool formatted) const; - QStringList fields(Data::FieldPtr field, bool formatted) const; + TQStringList fields(const TQString& fieldName, bool formatted) const; + TQStringList fields(Data::FieldPtr field, bool formatted) const; /** * Sets the value of an field for the entry. The method first verifies that * the value is allowed for that particular key. @@ -136,10 +137,10 @@ public: * @param value The value of the field * @return A boolean indicating whether or not the field was successfully set */ - bool setField(const QString& fieldName, const QString& value); - bool setField(Data::FieldPtr field, const QString& value); + bool setField(const TQString& fieldName, const TQString& value); + bool setField(Data::FieldPtr field, const TQString& value); /** - * Returns a pointer to the parent collection of the entry. + * Returns a pointer to the tqparent collection of the entry. * * @return The collection pointer */ @@ -186,22 +187,22 @@ public: * @param fieldName The name of the field * @return The list of names */ - QStringList groupNamesByFieldName(const QString& fieldName) const; + TQStringList groupNamesByFieldName(const TQString& fieldName) const; /** * Returns a list of all the field values contained in the entry. * * @return The list of field values */ - QStringList fieldValues() const { return m_fields.values(); } + TQStringList fieldValues() const { return m_fields.values(); } /** * Returns a list of all the formatted field values contained in the entry. * * @return The list of field values */ - QStringList formattedFieldValues() const { return m_formattedFields.values(); } + TQStringList formattedFieldValues() const { return m_formattedFields.values(); } /** - * Returns a boolean indicating if the entry's parent collection recognizes - * it existence, that is, the parent collection has this entry in its list. + * Returns a boolean indicating if the entry's tqparent collection recognizes + * it existence, that is, the tqparent collection has this entry in its list. * * @return Whether the entry is owned or not */ @@ -210,12 +211,12 @@ public: * Removes the formatted value of the field from the map. This should be used when * the field's format flag has changed. * - * @param name The name of the field that changed. QString::null means invalidate all fields. + * @param name The name of the field that changed. TQString() means tqinvalidate all fields. */ - void invalidateFormattedFieldValue(const QString& name=QString::null); + void tqinvalidateFormattedFieldValue(const TQString& name=TQString()); static int compareValues(EntryPtr entry1, EntryPtr entry2, FieldPtr field); - static int compareValues(EntryPtr entry1, EntryPtr entry2, const QString& field, ConstCollPtr coll); + static int compareValues(EntryPtr entry1, EntryPtr entry2, const TQString& field, ConstCollPtr coll); /** * Construct the derived valued for an field. The format string should be @@ -227,7 +228,7 @@ public: * @param formatted Whether the inserted values should be formatted. * @return The constructed field value */ - static QString dependentValue(ConstEntryPtr e, const QString& formatString, bool formatted); + static TQString dependentValue(ConstEntryPtr e, const TQString& formatString, bool formatted); private: CollPtr m_coll; @@ -240,14 +241,14 @@ private: class EntryCmp : public std::binary_function<EntryPtr, EntryPtr, bool> { public: - EntryCmp(const QString& field) : m_field(field) {} + EntryCmp(const TQString& field) : m_field(field) {} bool operator()(EntryPtr e1, EntryPtr e2) const { return e1->field(m_field) < e2->field(m_field); } private: - QString m_field; + TQString m_field; }; } // end namespace |