File indexing completed on 2024-04-28 04:48:50

0001 /*
0002    SPDX-FileCopyrightText: 2016 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr>
0003 
0004    SPDX-License-Identifier: LGPL-3.0-or-later
0005  */
0006 
0007 #ifndef MANAGEHEADERBARTEST_H
0008 #define MANAGEHEADERBARTEST_H
0009 
0010 #include <QObject>
0011 
0012 #include "databasetestdata.h"
0013 
0014 
0015 class ManageHeaderBarTest : public QObject, public DatabaseTestData
0016 {
0017 
0018     Q_OBJECT
0019 
0020 public:
0021 
0022     enum ColumnsRoles {
0023         IsValidRole = Qt::UserRole + 1,
0024         TitleRole = IsValidRole + 1,
0025         DurationRole = TitleRole + 1,
0026         CreatorRole = DurationRole + 1,
0027         ArtistRole = CreatorRole + 1,
0028         AlbumRole = ArtistRole + 1,
0029         TrackNumberRole = AlbumRole + 1,
0030         RatingRole = TrackNumberRole + 1,
0031         ImageRole = RatingRole + 1,
0032         AlbumIdRole = ImageRole + 1,
0033         ResourceRole = AlbumIdRole + 1,
0034         CountRole = ResourceRole + 1,
0035         IsPlayingRole = CountRole + 1,
0036     };
0037 
0038     Q_ENUM(ColumnsRoles)
0039 
0040     explicit ManageHeaderBarTest(QObject *parent = nullptr);
0041 
0042 Q_SIGNALS:
0043 
0044 private Q_SLOTS:
0045 
0046     void initTestCase();
0047 
0048     void simpleInitialCase();
0049 
0050     void setCurrentTrackWithInvalidData();
0051 
0052     void setCurrentTrackWithData();
0053 
0054 };
0055 
0056 #endif // MANAGEHEADERBARTEST_H