@@ -92,56 +92,6 @@ struct ZipData {
9292 QString release;
9393};
9494
95- /* *
96- * @struct ListItemData
97- * @brief Represents a Tomb Raider Level Entry Card Info.
98- *
99- * This struct is designed to store a single TRLE (Tomb Raider Level Editor) level record.
100- * Each record contains metadata and a cover image displayed as a card in the application.
101- * The struct includes properties to facilitate searching, filtering, and sorting without
102- * the cover image.
103- */
104- struct ListItemData {
105- /* *
106- * @brief Default constructor for `ListItemData`.
107- *
108- * Initializes an empty instance of `ListItemData`.
109- */
110- ListItemData () {}
111-
112- /* *
113- * @brief Parameterized constructor for `ListItemData`.
114- *
115- * This constructor initializes a `ListItemData` object with metadata.
116- *
117- * @param id The TRLE numeric level ID.
118- * @param title The TRLE title. Expected to contain a single name.
119- * @param author The TRLE author(s). Can be a single name or multiple names.
120- * @param type The TRLE type, represented by a numeric ID.
121- * @param classInput The TRLE class, represented by a numeric ID.
122- * @param releaseDate The release date in the format "YYYY-MM-DD" (e.g., "2000-01-01").
123- * @param difficulty The TRLE difficulty, represented by a numeric ID.
124- * @param duration The TRLE duration, represented by a numeric ID.
125- */
126- ListItemData (
127- qint64 id, const QString& title, const QStringList& authors, qint64 type,
128- qint64 classInput, const QString& releaseDate, qint64 difficulty,
129- qint64 duration) :
130- m_trle_id (id), m_title(title), m_authors(authors), m_type(type),
131- m_class (classInput), m_releaseDate(releaseDate),
132- m_difficulty (difficulty), m_duration(duration) {}
133-
134- // Data members
135- qint64 m_trle_id; // /< The TRLE level id.
136- QString m_title; // /< The TRLE level title.
137- QStringList m_authors; // /< The TRLE author(s), as a string list.
138- qint64 m_type; // /< ID of the type of level.
139- qint64 m_class; // /< ID of the class of the level.
140- QString m_releaseDate; // /< The release date in "YYYY-MM-DD" format.
141- qint64 m_difficulty; // /< ID of the difficulty of the level.
142- qint64 m_duration; // /< ID of the estimated duration of the level.
143- };
144-
14595/* *
14696 * @struct ListItemPicture
14797 * @brief Represents a Tomb Raider Level Entry Card Picture.
@@ -210,6 +160,60 @@ struct ListItemPicture {
210160 QIcon m_picture; // /< The cover image.
211161};
212162
163+ /* *
164+ * @struct ListItemData
165+ * @brief Represents a Tomb Raider Level Entry Card Info.
166+ *
167+ * This struct is designed to store a single TRLE (Tomb Raider Level Editor) level record.
168+ * Each record contains metadata and a cover image displayed as a card in the application.
169+ * The struct includes properties to facilitate searching, filtering, and sorting without
170+ * the cover image, just a pointer.
171+ */
172+ struct ListItemData {
173+ /* *
174+ * @brief Default constructor for `ListItemData`.
175+ *
176+ * Initializes an empty instance of `ListItemData`.
177+ */
178+ ListItemData () {}
179+
180+ /* *
181+ * @brief Parameterized constructor for `ListItemData`.
182+ *
183+ * This constructor initializes a `ListItemData` object with metadata.
184+ *
185+ * @param id The TRLE numeric level ID.
186+ * @param title The TRLE title. Expected to contain a single name.
187+ * @param author The TRLE author(s). Can be a single name or multiple names.
188+ * @param type The TRLE type, represented by a numeric ID.
189+ * @param classInput The TRLE class, represented by a numeric ID.
190+ * @param releaseDate The release date in the format "YYYY-MM-DD" (e.g., "2000-01-01").
191+ * @param difficulty The TRLE difficulty, represented by a numeric ID.
192+ * @param duration The TRLE duration, represented by a numeric ID.
193+ * @param m_cover The cover image as a `ListItemPicture*`.
194+ */
195+ ListItemData (
196+ qint64 id, const QString& title, const QStringList& authors,
197+ qint64 type, qint64 classInput, const QString& releaseDate,
198+ qint64 difficulty, qint64 duration) :
199+ m_trle_id (id), m_title(title), m_authors(authors), m_type(type),
200+ m_class (classInput), m_releaseDate(releaseDate),
201+ m_difficulty (difficulty), m_duration(duration) {
202+ m_cover = nullptr ;
203+ }
204+
205+ // Data members
206+ qint64 m_trle_id; // /< The TRLE level id.
207+ QString m_title; // /< The TRLE level title.
208+ QStringList m_authors; // /< The TRLE author(s), as a string list.
209+ qint64 m_type; // /< ID of the type of level.
210+ qint64 m_class; // /< ID of the class of the level.
211+ QString m_releaseDate; // /< The release date in "YYYY-MM-DD" format.
212+ qint64 m_difficulty; // /< ID of the difficulty of the level.
213+ qint64 m_duration; // /< ID of the estimated duration of the level.
214+ ListItemPicture* m_cover; // /< The TRLE cover image pointer.
215+ };
216+
213217/* *
214218 * @struct InfoData
215219 * @brief Store HTML data and a list of icons generated from image WEBP data.
0 commit comments