Add explicit
This commit is contained in:
parent
3efc496c41
commit
21b2193cd0
@ -43,7 +43,7 @@ class SCollection : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SCollection(Application *app, QObject *parent);
|
explicit SCollection(Application *app, QObject *parent);
|
||||||
~SCollection();
|
~SCollection();
|
||||||
|
|
||||||
static const char *kSongsTable;
|
static const char *kSongsTable;
|
||||||
|
@ -45,7 +45,7 @@ class CollectionBackendInterface : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CollectionBackendInterface(QObject *parent = nullptr) : QObject(parent) {}
|
explicit CollectionBackendInterface(QObject *parent = nullptr) : QObject(parent) {}
|
||||||
virtual ~CollectionBackendInterface() {}
|
virtual ~CollectionBackendInterface() {}
|
||||||
|
|
||||||
struct Album {
|
struct Album {
|
||||||
|
@ -42,7 +42,7 @@ class CollectionDirectoryModel : public QStandardItemModel {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CollectionDirectoryModel(CollectionBackend* backend, QObject *parent = nullptr);
|
explicit CollectionDirectoryModel(CollectionBackend* backend, QObject *parent = nullptr);
|
||||||
~CollectionDirectoryModel();
|
~CollectionDirectoryModel();
|
||||||
|
|
||||||
// To be called by GUIs
|
// To be called by GUIs
|
||||||
|
@ -48,7 +48,7 @@ class CollectionFilterWidget : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CollectionFilterWidget(QWidget *parent = nullptr);
|
explicit CollectionFilterWidget(QWidget *parent = nullptr);
|
||||||
~CollectionFilterWidget();
|
~CollectionFilterWidget();
|
||||||
|
|
||||||
static const int kFilterDelay = 500; // msec
|
static const int kFilterDelay = 500; // msec
|
||||||
|
@ -37,12 +37,12 @@ class CollectionItem : public SimpleTreeItem<CollectionItem> {
|
|||||||
Type_LoadingIndicator,
|
Type_LoadingIndicator,
|
||||||
};
|
};
|
||||||
|
|
||||||
CollectionItem(SimpleTreeModel<CollectionItem> *model)
|
explicit CollectionItem(SimpleTreeModel<CollectionItem> *model)
|
||||||
: SimpleTreeItem<CollectionItem>(Type_Root, model),
|
: SimpleTreeItem<CollectionItem>(Type_Root, model),
|
||||||
container_level(-1),
|
container_level(-1),
|
||||||
compilation_artist_node_(nullptr) {}
|
compilation_artist_node_(nullptr) {}
|
||||||
|
|
||||||
CollectionItem(Type type, CollectionItem *parent = nullptr)
|
explicit CollectionItem(Type type, CollectionItem *parent = nullptr)
|
||||||
: SimpleTreeItem<CollectionItem>(type, parent),
|
: SimpleTreeItem<CollectionItem>(type, parent),
|
||||||
container_level(-1),
|
container_level(-1),
|
||||||
compilation_artist_node_(nullptr) {}
|
compilation_artist_node_(nullptr) {}
|
||||||
|
@ -36,7 +36,7 @@ class CollectionItemDelegate : public QStyledItemDelegate {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CollectionItemDelegate(QObject *parent);
|
explicit CollectionItemDelegate(QObject *parent);
|
||||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -62,7 +62,7 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
|||||||
Q_ENUMS(GroupBy)
|
Q_ENUMS(GroupBy)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CollectionModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr);
|
explicit CollectionModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr);
|
||||||
~CollectionModel();
|
~CollectionModel();
|
||||||
|
|
||||||
static const char *kSavedGroupingsSettingsGroup;
|
static const char *kSavedGroupingsSettingsGroup;
|
||||||
|
@ -33,8 +33,8 @@ class SqlRow;
|
|||||||
|
|
||||||
class CollectionPlaylistItem : public PlaylistItem {
|
class CollectionPlaylistItem : public PlaylistItem {
|
||||||
public:
|
public:
|
||||||
CollectionPlaylistItem();
|
explicit CollectionPlaylistItem();
|
||||||
CollectionPlaylistItem(const Song &song);
|
explicit CollectionPlaylistItem(const Song &song);
|
||||||
|
|
||||||
bool InitFromQuery(const SqlRow &query);
|
bool InitFromQuery(const SqlRow &query);
|
||||||
void Reload();
|
void Reload();
|
||||||
|
@ -72,7 +72,7 @@ struct QueryOptions {
|
|||||||
|
|
||||||
class CollectionQuery {
|
class CollectionQuery {
|
||||||
public:
|
public:
|
||||||
CollectionQuery(const QueryOptions &options = QueryOptions());
|
explicit CollectionQuery(const QueryOptions &options = QueryOptions());
|
||||||
|
|
||||||
// Sets contents of SELECT clause on the query (list of columns to get).
|
// Sets contents of SELECT clause on the query (list of columns to get).
|
||||||
void SetColumnSpec(const QString &spec) { column_spec_ = spec; }
|
void SetColumnSpec(const QString &spec) { column_spec_ = spec; }
|
||||||
|
@ -53,7 +53,7 @@ class CollectionView : public AutoExpandingTreeView {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CollectionView(QWidget *parent = nullptr);
|
explicit CollectionView(QWidget *parent = nullptr);
|
||||||
~CollectionView();
|
~CollectionView();
|
||||||
|
|
||||||
// Returns Songs currently selected in the collection view.
|
// Returns Songs currently selected in the collection view.
|
||||||
|
@ -34,7 +34,7 @@ class CollectionViewContainer : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CollectionViewContainer(QWidget *parent = nullptr);
|
explicit CollectionViewContainer(QWidget *parent = nullptr);
|
||||||
~CollectionViewContainer();
|
~CollectionViewContainer();
|
||||||
|
|
||||||
CollectionFilterWidget *filter() const;
|
CollectionFilterWidget *filter() const;
|
||||||
|
@ -48,7 +48,7 @@ class CollectionWatcher : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CollectionWatcher(Song::Source source, QObject *parent = nullptr);
|
explicit CollectionWatcher(Song::Source source, QObject *parent = nullptr);
|
||||||
|
|
||||||
void set_backend(CollectionBackend *backend) { backend_ = backend; }
|
void set_backend(CollectionBackend *backend) { backend_ = backend; }
|
||||||
void set_task_manager(TaskManager *task_manager) { task_manager_ = task_manager; }
|
void set_task_manager(TaskManager *task_manager) { task_manager_ = task_manager; }
|
||||||
@ -64,7 +64,7 @@ class CollectionWatcher : public QObject {
|
|||||||
|
|
||||||
void ExitAsync();
|
void ExitAsync();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void NewOrUpdatedSongs(const SongList &songs);
|
void NewOrUpdatedSongs(const SongList &songs);
|
||||||
void SongsMTimeUpdated(const SongList &songs);
|
void SongsMTimeUpdated(const SongList &songs);
|
||||||
void SongsDeleted(const SongList &songs);
|
void SongsDeleted(const SongList &songs);
|
||||||
|
@ -40,7 +40,7 @@ class GroupByDialog : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GroupByDialog(QWidget *parent = nullptr);
|
explicit GroupByDialog(QWidget *parent = nullptr);
|
||||||
~GroupByDialog();
|
~GroupByDialog();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -39,7 +39,7 @@ class SavedGroupingManager : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SavedGroupingManager(QWidget *parent = nullptr);
|
explicit SavedGroupingManager(QWidget *parent = nullptr);
|
||||||
~SavedGroupingManager();
|
~SavedGroupingManager();
|
||||||
|
|
||||||
void UpdateModel();
|
void UpdateModel();
|
||||||
|
@ -44,7 +44,7 @@ class ContextAlbum : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ContextAlbum(QWidget *parent = nullptr);
|
explicit ContextAlbum(QWidget *parent = nullptr);
|
||||||
|
|
||||||
void Init(AlbumCoverChoiceController *album_cover_choice_controller);
|
void Init(AlbumCoverChoiceController *album_cover_choice_controller);
|
||||||
void SetImage(QImage image = QImage());
|
void SetImage(QImage image = QImage());
|
||||||
|
@ -56,7 +56,7 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ContextAlbumsModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr);
|
explicit ContextAlbumsModel(CollectionBackend *backend, Application *app, QObject *parent = nullptr);
|
||||||
~ContextAlbumsModel();
|
~ContextAlbumsModel();
|
||||||
|
|
||||||
static const int kPrettyCoverSize;
|
static const int kPrettyCoverSize;
|
||||||
|
@ -54,7 +54,7 @@ class ContextItemDelegate : public QStyledItemDelegate {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ContextItemDelegate(QObject *parent);
|
explicit ContextItemDelegate(QObject *parent);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index);
|
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index);
|
||||||
|
@ -54,7 +54,7 @@ class ContextView : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ContextView(QWidget *parent = nullptr);
|
explicit ContextView(QWidget *parent = nullptr);
|
||||||
|
|
||||||
void Init(Application *app, CollectionView *collectionview, AlbumCoverChoiceController *album_cover_choice_controller);
|
void Init(Application *app, CollectionView *collectionview, AlbumCoverChoiceController *album_cover_choice_controller);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class Database : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Database(Application *app, QObject *parent = nullptr, const QString &database_name = QString());
|
explicit Database(Application *app, QObject *parent = nullptr, const QString &database_name = QString());
|
||||||
~Database();
|
~Database();
|
||||||
|
|
||||||
struct AttachedDatabase {
|
struct AttachedDatabase {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
class DBusScreensaver : public Screensaver {
|
class DBusScreensaver : public Screensaver {
|
||||||
public:
|
public:
|
||||||
DBusScreensaver(const QString &service, const QString &path, const QString &interface);
|
explicit DBusScreensaver(const QString &service, const QString &path, const QString &interface);
|
||||||
|
|
||||||
void Inhibit();
|
void Inhibit();
|
||||||
void Uninhibit();
|
void Uninhibit();
|
||||||
|
@ -38,7 +38,7 @@ class DeleteFiles : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeleteFiles(TaskManager *task_manager, std::shared_ptr<MusicStorage> storage);
|
explicit DeleteFiles(TaskManager *task_manager, std::shared_ptr<MusicStorage> storage);
|
||||||
~DeleteFiles();
|
~DeleteFiles();
|
||||||
|
|
||||||
static const int kBatchSize;
|
static const int kBatchSize;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "musicstorage.h"
|
#include "musicstorage.h"
|
||||||
|
|
||||||
class FilesystemMusicStorage : public virtual MusicStorage {
|
class FilesystemMusicStorage : public virtual MusicStorage {
|
||||||
public:
|
public:
|
||||||
explicit FilesystemMusicStorage(const QString &root);
|
explicit FilesystemMusicStorage(const QString &root);
|
||||||
~FilesystemMusicStorage() {}
|
~FilesystemMusicStorage() {}
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ public:
|
|||||||
bool CopyToStorage(const CopyJob &job);
|
bool CopyToStorage(const CopyJob &job);
|
||||||
bool DeleteFromStorage(const DeleteJob &job);
|
bool DeleteFromStorage(const DeleteJob &job);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString root_;
|
QString root_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class IconLoader {
|
|||||||
static void Init();
|
static void Init();
|
||||||
static QIcon Load(const QString &name, const int size = 0);
|
static QIcon Load(const QString &name, const int size = 0);
|
||||||
private:
|
private:
|
||||||
IconLoader() {}
|
explicit IconLoader() {}
|
||||||
static bool system_icons_;
|
static bool system_icons_;
|
||||||
static bool custom_icons_;
|
static bool custom_icons_;
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
namespace IconMapper {
|
namespace IconMapper {
|
||||||
|
|
||||||
struct IconProperties {
|
struct IconProperties {
|
||||||
IconProperties() : min_size(0), max_size(0) {}
|
explicit IconProperties() : min_size(0), max_size(0) {}
|
||||||
IconProperties(const QStringList &_names, const int _min_size, const int _max_size) : names(_names), min_size(_min_size), max_size(_max_size) {}
|
IconProperties(const QStringList &_names, const int _min_size, const int _max_size) : names(_names), min_size(_min_size), max_size(_max_size) {}
|
||||||
QStringList names;
|
QStringList names;
|
||||||
int min_size;
|
int min_size;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
class MacScreensaver : public Screensaver {
|
class MacScreensaver : public Screensaver {
|
||||||
public:
|
public:
|
||||||
MacScreensaver();
|
explicit MacScreensaver();
|
||||||
|
|
||||||
void Inhibit();
|
void Inhibit();
|
||||||
void Uninhibit();
|
void Uninhibit();
|
||||||
|
@ -38,7 +38,7 @@ class MacSystemTrayIcon : public SystemTrayIcon {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MacSystemTrayIcon(QObject *parent = nullptr);
|
explicit MacSystemTrayIcon(QObject *parent = nullptr);
|
||||||
~MacSystemTrayIcon();
|
~MacSystemTrayIcon();
|
||||||
|
|
||||||
void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit);
|
void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit);
|
||||||
|
@ -100,7 +100,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, const CommandlineOptions& options, QWidget *parent = nullptr);
|
explicit MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, const CommandlineOptions& options, QWidget *parent = nullptr);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
static const char *kSettingsGroup;
|
static const char *kSettingsGroup;
|
||||||
|
@ -78,7 +78,7 @@ class Mpris2 : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Mpris2(Application *app, QObject *parent = nullptr);
|
explicit Mpris2(Application *app, QObject *parent = nullptr);
|
||||||
|
|
||||||
// org.mpris.MediaPlayer2 MPRIS 2.0 Root interface
|
// org.mpris.MediaPlayer2 MPRIS 2.0 Root interface
|
||||||
Q_PROPERTY(bool CanQuit READ CanQuit)
|
Q_PROPERTY(bool CanQuit READ CanQuit)
|
||||||
|
@ -32,7 +32,7 @@ class QObject;
|
|||||||
|
|
||||||
class MultiSortFilterProxy : public QSortFilterProxyModel {
|
class MultiSortFilterProxy : public QSortFilterProxyModel {
|
||||||
public:
|
public:
|
||||||
MultiSortFilterProxy(QObject *parent = nullptr);
|
explicit MultiSortFilterProxy(QObject *parent = nullptr);
|
||||||
|
|
||||||
void AddSortSpec(int role, Qt::SortOrder order = Qt::AscendingOrder);
|
void AddSortSpec(int role, Qt::SortOrder order = Qt::AscendingOrder);
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
class MusicStorage {
|
class MusicStorage {
|
||||||
public:
|
public:
|
||||||
MusicStorage();
|
explicit MusicStorage();
|
||||||
virtual ~MusicStorage() {}
|
virtual ~MusicStorage() {}
|
||||||
|
|
||||||
enum Role {
|
enum Role {
|
||||||
|
@ -44,7 +44,7 @@ class NetworkProxyFactory : public QNetworkProxyFactory {
|
|||||||
QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query);
|
QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NetworkProxyFactory();
|
explicit NetworkProxyFactory();
|
||||||
|
|
||||||
static NetworkProxyFactory *sInstance;
|
static NetworkProxyFactory *sInstance;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class QSqlDatabase;
|
|||||||
// Rolls back the transaction if the object goes out of scope before Commit() is called.
|
// Rolls back the transaction if the object goes out of scope before Commit() is called.
|
||||||
class ScopedTransaction : boost::noncopyable {
|
class ScopedTransaction : boost::noncopyable {
|
||||||
public:
|
public:
|
||||||
ScopedTransaction(QSqlDatabase *db);
|
explicit ScopedTransaction(QSqlDatabase *db);
|
||||||
~ScopedTransaction();
|
~ScopedTransaction();
|
||||||
|
|
||||||
void Commit();
|
void Commit();
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
class SettingsProvider {
|
class SettingsProvider {
|
||||||
public:
|
public:
|
||||||
SettingsProvider();
|
explicit SettingsProvider();
|
||||||
virtual ~SettingsProvider() {}
|
virtual ~SettingsProvider() {}
|
||||||
|
|
||||||
virtual void set_group(const char *group) = 0;
|
virtual void set_group(const char *group) = 0;
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
class SimpleTreeItem {
|
class SimpleTreeItem {
|
||||||
public:
|
public:
|
||||||
SimpleTreeItem(int _type, SimpleTreeModel<T>* _model); // For the root item
|
explicit SimpleTreeItem(int _type, SimpleTreeModel<T>* _model); // For the root item
|
||||||
SimpleTreeItem(int _type, const QString& _key, T* _parent = nullptr);
|
explicit SimpleTreeItem(int _type, const QString& _key, T* _parent = nullptr);
|
||||||
explicit SimpleTreeItem(int _type, T* _parent = nullptr);
|
explicit SimpleTreeItem(int _type, T* _parent = nullptr);
|
||||||
virtual ~SimpleTreeItem();
|
virtual ~SimpleTreeItem();
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ const QStringList Song::kArticles = QStringList() << "the " << "a " << "an ";
|
|||||||
|
|
||||||
struct Song::Private : public QSharedData {
|
struct Song::Private : public QSharedData {
|
||||||
|
|
||||||
Private(Source source = Source_Unknown);
|
explicit Private(Source source = Source_Unknown);
|
||||||
|
|
||||||
bool valid_;
|
bool valid_;
|
||||||
int id_;
|
int id_;
|
||||||
|
@ -103,7 +103,7 @@ class Song {
|
|||||||
FileType_Stream = 91,
|
FileType_Stream = 91,
|
||||||
};
|
};
|
||||||
|
|
||||||
Song(Song::Source source = Song::Source_Unknown);
|
explicit Song(Song::Source source = Song::Source_Unknown);
|
||||||
Song(const Song &other);
|
Song(const Song &other);
|
||||||
~Song();
|
~Song();
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class StandardItemIconLoader : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
StandardItemIconLoader(AlbumCoverLoader *cover_loader, QObject *parent = nullptr);
|
explicit StandardItemIconLoader(AlbumCoverLoader *cover_loader, QObject *parent = nullptr);
|
||||||
|
|
||||||
AlbumCoverLoaderOptions *options() { return &cover_options_; }
|
AlbumCoverLoaderOptions *options() { return &cover_options_; }
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class SystemTrayIcon : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SystemTrayIcon(QObject *parent = nullptr);
|
explicit SystemTrayIcon(QObject *parent = nullptr);
|
||||||
|
|
||||||
// Called once to create the icon's context menu
|
// Called once to create the icon's context menu
|
||||||
virtual void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit) = 0;
|
virtual void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit) = 0;
|
||||||
|
@ -29,8 +29,7 @@ class QObject;
|
|||||||
// Improve QThread by adding a SetIoPriority function
|
// Improve QThread by adding a SetIoPriority function
|
||||||
class Thread : public QThread {
|
class Thread : public QThread {
|
||||||
public:
|
public:
|
||||||
Thread(QObject* parent = nullptr)
|
explicit Thread(QObject* parent = nullptr) : QThread(parent), io_priority_(Utilities::IOPRIO_CLASS_NONE) {}
|
||||||
: QThread(parent), io_priority_(Utilities::IOPRIO_CLASS_NONE) {}
|
|
||||||
|
|
||||||
void SetIoPriority(Utilities::IoPriority priority) {
|
void SetIoPriority(Utilities::IoPriority priority) {
|
||||||
io_priority_ = priority;
|
io_priority_ = priority;
|
||||||
|
@ -27,7 +27,7 @@ class QTranslator;
|
|||||||
|
|
||||||
class Translations : public QObject {
|
class Translations : public QObject {
|
||||||
public:
|
public:
|
||||||
Translations();
|
explicit Translations();
|
||||||
~Translations();
|
~Translations();
|
||||||
void LoadTranslation(const QString &prefix, const QString &path, const QString &language);
|
void LoadTranslation(const QString &prefix, const QString &path, const QString &language);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class Windows7ThumbBar : public QObject {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// Creates a list of buttons in the taskbar icon for this window. Does nothing and is safe to use on other operating systems too.
|
// Creates a list of buttons in the taskbar icon for this window. Does nothing and is safe to use on other operating systems too.
|
||||||
Windows7ThumbBar(QWidget *widget = 0);
|
explicit Windows7ThumbBar(QWidget *widget = 0);
|
||||||
|
|
||||||
static const int kIconSize;
|
static const int kIconSize;
|
||||||
static const int kMaxButtonCount;
|
static const int kMaxButtonCount;
|
||||||
|
@ -57,7 +57,7 @@ class AlbumCoverChoiceController : public QWidget {
|
|||||||
static const char *kSaveImageFileFilter;
|
static const char *kSaveImageFileFilter;
|
||||||
static const char *kAllFilesFilter;
|
static const char *kAllFilesFilter;
|
||||||
|
|
||||||
AlbumCoverChoiceController(QWidget *parent = nullptr);
|
explicit AlbumCoverChoiceController(QWidget *parent = nullptr);
|
||||||
~AlbumCoverChoiceController();
|
~AlbumCoverChoiceController();
|
||||||
|
|
||||||
void Init(Application *app);
|
void Init(Application *app);
|
||||||
|
@ -35,7 +35,7 @@ class AlbumCoverExport : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AlbumCoverExport(QWidget *parent = nullptr);
|
explicit AlbumCoverExport(QWidget *parent = nullptr);
|
||||||
~AlbumCoverExport();
|
~AlbumCoverExport();
|
||||||
|
|
||||||
enum OverwriteMode {
|
enum OverwriteMode {
|
||||||
|
@ -42,7 +42,7 @@ struct CoverSearchStatistics;
|
|||||||
|
|
||||||
// This class represents a single search-for-cover request. It identifies and describes the request.
|
// This class represents a single search-for-cover request. It identifies and describes the request.
|
||||||
struct CoverSearchRequest {
|
struct CoverSearchRequest {
|
||||||
CoverSearchRequest() : id(-1), search(false), fetchall(false) {}
|
explicit CoverSearchRequest() : id(-1), search(false), fetchall(false) {}
|
||||||
|
|
||||||
// An unique (for one AlbumCoverFetcher) request identifier
|
// An unique (for one AlbumCoverFetcher) request identifier
|
||||||
quint64 id;
|
quint64 id;
|
||||||
@ -60,7 +60,7 @@ struct CoverSearchRequest {
|
|||||||
|
|
||||||
// This structure represents a single result of some album's cover search request.
|
// This structure represents a single result of some album's cover search request.
|
||||||
struct CoverSearchResult {
|
struct CoverSearchResult {
|
||||||
CoverSearchResult() : score(0.0) {}
|
explicit CoverSearchResult() : score(0.0) {}
|
||||||
|
|
||||||
// Used for grouping in the user interface.
|
// Used for grouping in the user interface.
|
||||||
QString provider;
|
QString provider;
|
||||||
@ -87,7 +87,7 @@ class AlbumCoverFetcher : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AlbumCoverFetcher(CoverProviders *cover_providers, QObject *parent = nullptr, QNetworkAccessManager *network = 0);
|
explicit AlbumCoverFetcher(CoverProviders *cover_providers, QObject *parent = nullptr, QNetworkAccessManager *network = 0);
|
||||||
virtual ~AlbumCoverFetcher() {}
|
virtual ~AlbumCoverFetcher() {}
|
||||||
|
|
||||||
static const int kMaxConcurrentRequests;
|
static const int kMaxConcurrentRequests;
|
||||||
|
@ -47,7 +47,7 @@ class AlbumCoverFetcherSearch : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AlbumCoverFetcherSearch(const CoverSearchRequest &request, QNetworkAccessManager *network, QObject *parent);
|
explicit AlbumCoverFetcherSearch(const CoverSearchRequest &request, QNetworkAccessManager *network, QObject *parent);
|
||||||
|
|
||||||
void Start(CoverProviders *cover_providers);
|
void Start(CoverProviders *cover_providers);
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class AlbumCoverLoader : public QObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct Task {
|
struct Task {
|
||||||
Task() : redirects(0) {}
|
explicit Task() : redirects(0) {}
|
||||||
|
|
||||||
AlbumCoverLoaderOptions options;
|
AlbumCoverLoaderOptions options;
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ class AlbumCoverLoader : public QObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TryLoadResult {
|
struct TryLoadResult {
|
||||||
TryLoadResult(bool async, bool success, const QUrl &_cover_url, const QImage &_image) : started_async(async), loaded_success(success), cover_url(_cover_url), image(_image) {}
|
explicit TryLoadResult(bool async, bool success, const QUrl &_cover_url, const QImage &_image) : started_async(async), loaded_success(success), cover_url(_cover_url), image(_image) {}
|
||||||
|
|
||||||
bool started_async;
|
bool started_async;
|
||||||
bool loaded_success;
|
bool loaded_success;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
|
||||||
struct AlbumCoverLoaderOptions {
|
struct AlbumCoverLoaderOptions {
|
||||||
AlbumCoverLoaderOptions()
|
explicit AlbumCoverLoaderOptions()
|
||||||
: desired_height_(120),
|
: desired_height_(120),
|
||||||
scale_output_image_(true),
|
scale_output_image_(true),
|
||||||
pad_output_image_(true) {}
|
pad_output_image_(true) {}
|
||||||
|
@ -36,16 +36,17 @@ class AlbumCoverManager;
|
|||||||
|
|
||||||
class AlbumCoverManagerList : public QListWidget {
|
class AlbumCoverManagerList : public QListWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AlbumCoverManagerList(QWidget *parent = nullptr);
|
explicit AlbumCoverManagerList(QWidget *parent = nullptr);
|
||||||
|
|
||||||
void set_cover_manager(AlbumCoverManager *manager) { manager_ = manager; }
|
void set_cover_manager(AlbumCoverManager *manager) { manager_ = manager; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QMimeData *mimeData(const QList<QListWidgetItem*> items) const;
|
QMimeData *mimeData(const QList<QListWidgetItem*> items) const;
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AlbumCoverManager* manager_;
|
AlbumCoverManager* manager_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class Application;
|
|||||||
class Ui_AlbumCoverSearcher;
|
class Ui_AlbumCoverSearcher;
|
||||||
|
|
||||||
class SizeOverlayDelegate : public QStyledItemDelegate {
|
class SizeOverlayDelegate : public QStyledItemDelegate {
|
||||||
public:
|
public:
|
||||||
static const int kMargin;
|
static const int kMargin;
|
||||||
static const int kPaddingX;
|
static const int kPaddingX;
|
||||||
static const int kPaddingY;
|
static const int kPaddingY;
|
||||||
@ -57,7 +57,7 @@ public:
|
|||||||
static const int kBorderAlpha;
|
static const int kBorderAlpha;
|
||||||
static const int kBackgroundAlpha;
|
static const int kBackgroundAlpha;
|
||||||
|
|
||||||
SizeOverlayDelegate(QObject *parent = nullptr);
|
explicit SizeOverlayDelegate(QObject *parent = nullptr);
|
||||||
|
|
||||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||||
};
|
};
|
||||||
@ -66,8 +66,8 @@ public:
|
|||||||
class AlbumCoverSearcher : public QDialog {
|
class AlbumCoverSearcher : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AlbumCoverSearcher(const QIcon &no_cover_icon, Application *app, QWidget *parent);
|
explicit AlbumCoverSearcher(const QIcon &no_cover_icon, Application *app, QWidget *parent);
|
||||||
~AlbumCoverSearcher();
|
~AlbumCoverSearcher();
|
||||||
|
|
||||||
enum Role {
|
enum Role {
|
||||||
@ -82,17 +82,17 @@ public:
|
|||||||
|
|
||||||
QImage Exec(const QString &artist, const QString &album);
|
QImage Exec(const QString &artist, const QString &album);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void keyPressEvent(QKeyEvent*);
|
void keyPressEvent(QKeyEvent*);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void Search();
|
void Search();
|
||||||
void SearchFinished(const quint64 id, const CoverSearchResults &results);
|
void SearchFinished(const quint64 id, const CoverSearchResults &results);
|
||||||
void ImageLoaded(const quint64 id, const QUrl &cover_url, const QImage &image);
|
void ImageLoaded(const quint64 id, const QUrl &cover_url, const QImage &image);
|
||||||
|
|
||||||
void CoverDoubleClicked(const QModelIndex &index);
|
void CoverDoubleClicked(const QModelIndex &index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_AlbumCoverSearcher *ui_;
|
Ui_AlbumCoverSearcher *ui_;
|
||||||
|
|
||||||
Application *app_;
|
Application *app_;
|
||||||
|
@ -34,7 +34,7 @@ class CoverExportRunnable : public QObject, public QRunnable {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CoverExportRunnable(const AlbumCoverExport::DialogResult &dialog_result, const Song &song);
|
explicit CoverExportRunnable(const AlbumCoverExport::DialogResult &dialog_result, const Song &song);
|
||||||
virtual ~CoverExportRunnable() {}
|
virtual ~CoverExportRunnable() {}
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
@ -38,7 +38,7 @@ class CoverFromURLDialog : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CoverFromURLDialog(QWidget *parent = nullptr);
|
explicit CoverFromURLDialog(QWidget *parent = nullptr);
|
||||||
~CoverFromURLDialog();
|
~CoverFromURLDialog();
|
||||||
|
|
||||||
// Opens the dialog. This returns an image found at the URL chosen by user or null image if the dialog got rejected.
|
// Opens the dialog. This returns an image found at the URL chosen by user or null image if the dialog got rejected.
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
struct CoverSearchStatistics {
|
struct CoverSearchStatistics {
|
||||||
|
|
||||||
CoverSearchStatistics();
|
explicit CoverSearchStatistics();
|
||||||
|
|
||||||
CoverSearchStatistics& operator +=(const CoverSearchStatistics &other);
|
CoverSearchStatistics& operator +=(const CoverSearchStatistics &other);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class Application;
|
|||||||
|
|
||||||
// This struct represents a single search-for-cover request. It identifies and describes the request.
|
// This struct represents a single search-for-cover request. It identifies and describes the request.
|
||||||
struct DiscogsCoverSearchContext {
|
struct DiscogsCoverSearchContext {
|
||||||
DiscogsCoverSearchContext() : id(-1), r_count(0) {}
|
explicit DiscogsCoverSearchContext() : id(-1), r_count(0) {}
|
||||||
|
|
||||||
// The unique request identifier
|
// The unique request identifier
|
||||||
int id;
|
int id;
|
||||||
@ -58,7 +58,7 @@ Q_DECLARE_METATYPE(DiscogsCoverSearchContext)
|
|||||||
|
|
||||||
// This struct represents a single release request. It identifies and describes the request.
|
// This struct represents a single release request. It identifies and describes the request.
|
||||||
struct DiscogsCoverReleaseContext {
|
struct DiscogsCoverReleaseContext {
|
||||||
DiscogsCoverReleaseContext() : id(-1) {}
|
explicit DiscogsCoverReleaseContext() : id(-1) {}
|
||||||
|
|
||||||
int id; // The unique request identifier
|
int id; // The unique request identifier
|
||||||
int s_id; // The search request identifier
|
int s_id; // The search request identifier
|
||||||
|
@ -16,8 +16,8 @@ class iMobileDeviceConnection;
|
|||||||
class AfcFile : public QIODevice {
|
class AfcFile : public QIODevice {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AfcFile(iMobileDeviceConnection* connection, const QString &path, QObject *parent = 0);
|
explicit AfcFile(iMobileDeviceConnection* connection, const QString &path, QObject *parent = 0);
|
||||||
~AfcFile();
|
~AfcFile();
|
||||||
|
|
||||||
// QIODevice
|
// QIODevice
|
||||||
@ -26,7 +26,7 @@ public:
|
|||||||
bool seek(qint64 pos);
|
bool seek(qint64 pos);
|
||||||
qint64 size() const;
|
qint64 size() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// QIODevice
|
// QIODevice
|
||||||
qint64 readData(char *data, qint64 max_size);
|
qint64 readData(char *data, qint64 max_size);
|
||||||
qint64 writeData(const char *data, qint64 max_size);
|
qint64 writeData(const char *data, qint64 max_size);
|
||||||
|
@ -38,26 +38,26 @@ class iMobileDeviceConnection;
|
|||||||
class AfcTransfer : public QObject {
|
class AfcTransfer : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AfcTransfer(const QString &uuid, const QString &local_destination, TaskManager *task_manager, std::shared_ptr<ConnectedDevice> device);
|
explicit AfcTransfer(const QString &uuid, const QString &local_destination, TaskManager *task_manager, std::shared_ptr<ConnectedDevice> device);
|
||||||
~AfcTransfer();
|
~AfcTransfer();
|
||||||
|
|
||||||
bool CopyToDevice(iMobileDeviceConnection *connection);
|
bool CopyToDevice(iMobileDeviceConnection *connection);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void CopyFromDevice();
|
void CopyFromDevice();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void TaskStarted(int task_id);
|
void TaskStarted(int task_id);
|
||||||
void CopyFinished(bool success);
|
void CopyFinished(bool success);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool CopyDirFromDevice(iMobileDeviceConnection *c, const QString &path);
|
bool CopyDirFromDevice(iMobileDeviceConnection *c, const QString &path);
|
||||||
bool CopyDirToDevice(iMobileDeviceConnection *c, const QString &path);
|
bool CopyDirToDevice(iMobileDeviceConnection *c, const QString &path);
|
||||||
bool CopyFileFromDevice(iMobileDeviceConnection *c, const QString &path);
|
bool CopyFileFromDevice(iMobileDeviceConnection *c, const QString &path);
|
||||||
bool CopyFileToDevice(iMobileDeviceConnection *c, const QString &path);
|
bool CopyFileToDevice(iMobileDeviceConnection *c, const QString &path);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QThread *original_thread_;
|
QThread *original_thread_;
|
||||||
std::shared_ptr<ConnectedDevice> device_;
|
std::shared_ptr<ConnectedDevice> device_;
|
||||||
TaskManager *task_manager_;
|
TaskManager *task_manager_;
|
||||||
|
@ -107,7 +107,7 @@ bool CddaLister::Init() {
|
|||||||
cdio_init();
|
cdio_init();
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
if (!cdio_have_driver(DRIVER_OSX)) {
|
if (!cdio_have_driver(DRIVER_OSX)) {
|
||||||
qLog(Error) << "libcdio was compiled without support for OS X!";
|
qLog(Error) << "libcdio was compiled without support for macOS!";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
char** devices = cdio_get_devices(DRIVER_DEVICE);
|
char** devices = cdio_get_devices(DRIVER_DEVICE);
|
||||||
|
@ -37,7 +37,7 @@ class CddaLister : public DeviceLister {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CddaLister() {}
|
explicit CddaLister() {}
|
||||||
|
|
||||||
QStringList DeviceUniqueIDs();
|
QStringList DeviceUniqueIDs();
|
||||||
QVariantList DeviceIcons(const QString &id);
|
QVariantList DeviceIcons(const QString &id);
|
||||||
|
@ -43,7 +43,7 @@ class ConnectedDevice : public QObject, public virtual MusicStorage, public std:
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ConnectedDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time);
|
explicit ConnectedDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time);
|
||||||
~ConnectedDevice();
|
~ConnectedDevice();
|
||||||
|
|
||||||
virtual bool Init() = 0;
|
virtual bool Init() = 0;
|
||||||
|
@ -60,7 +60,7 @@ class DeviceInfo : public SimpleTreeItem<DeviceInfo> {
|
|||||||
Type_Device,
|
Type_Device,
|
||||||
};
|
};
|
||||||
|
|
||||||
DeviceInfo(SimpleTreeModel<DeviceInfo> *model)
|
explicit DeviceInfo(SimpleTreeModel<DeviceInfo> *model)
|
||||||
: SimpleTreeItem<DeviceInfo>(Type_Root, model),
|
: SimpleTreeItem<DeviceInfo>(Type_Root, model),
|
||||||
database_id_(-1),
|
database_id_(-1),
|
||||||
size_(0),
|
size_(0),
|
||||||
@ -70,7 +70,7 @@ class DeviceInfo : public SimpleTreeItem<DeviceInfo> {
|
|||||||
unmount_(false),
|
unmount_(false),
|
||||||
forget_(false) {}
|
forget_(false) {}
|
||||||
|
|
||||||
DeviceInfo(Type type, DeviceInfo *parent = nullptr)
|
explicit DeviceInfo(Type type, DeviceInfo *parent = nullptr)
|
||||||
: SimpleTreeItem<DeviceInfo>(type, parent),
|
: SimpleTreeItem<DeviceInfo>(type, parent),
|
||||||
database_id_(-1),
|
database_id_(-1),
|
||||||
size_(0),
|
size_(0),
|
||||||
@ -83,7 +83,7 @@ class DeviceInfo : public SimpleTreeItem<DeviceInfo> {
|
|||||||
// A device can be discovered in different ways (udisks2, gio, etc.)
|
// A device can be discovered in different ways (udisks2, gio, etc.)
|
||||||
// Sometimes the same device is discovered more than once. In this case the device will have multiple "backends".
|
// Sometimes the same device is discovered more than once. In this case the device will have multiple "backends".
|
||||||
struct Backend {
|
struct Backend {
|
||||||
Backend(DeviceLister *lister = nullptr, const QString &id = QString())
|
explicit Backend(DeviceLister *lister = nullptr, const QString &id = QString())
|
||||||
:
|
:
|
||||||
lister_(lister),
|
lister_(lister),
|
||||||
unique_id_(id)
|
unique_id_(id)
|
||||||
|
@ -58,7 +58,7 @@ class DeviceManager : public SimpleTreeModel<DeviceInfo> {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeviceManager(Application *app, QObject *parent = nullptr);
|
explicit DeviceManager(Application *app, QObject *parent = nullptr);
|
||||||
~DeviceManager();
|
~DeviceManager();
|
||||||
|
|
||||||
enum Role {
|
enum Role {
|
||||||
|
@ -42,7 +42,7 @@ class DeviceProperties : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeviceProperties(QWidget *parent = nullptr);
|
explicit DeviceProperties(QWidget *parent = nullptr);
|
||||||
~DeviceProperties();
|
~DeviceProperties();
|
||||||
|
|
||||||
void SetDeviceManager(DeviceManager *manager);
|
void SetDeviceManager(DeviceManager *manager);
|
||||||
|
@ -35,22 +35,22 @@ class QModelIndex;
|
|||||||
class DeviceStateFilterModel : public QSortFilterProxyModel {
|
class DeviceStateFilterModel : public QSortFilterProxyModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeviceStateFilterModel(QObject *parent, DeviceManager::State state = DeviceManager::State_Remembered);
|
explicit DeviceStateFilterModel(QObject *parent, DeviceManager::State state = DeviceManager::State_Remembered);
|
||||||
|
|
||||||
void setSourceModel(QAbstractItemModel *sourceModel);
|
void setSourceModel(QAbstractItemModel *sourceModel);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void IsEmptyChanged(bool is_empty);
|
void IsEmptyChanged(bool is_empty);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool filterAcceptsRow(int row, const QModelIndex &parent) const;
|
bool filterAcceptsRow(int row, const QModelIndex &parent) const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ProxyRowCountChanged();
|
void ProxyRowCountChanged();
|
||||||
void ProxyRowCountChanged(QModelIndex index, int first, int last);
|
void ProxyRowCountChanged(QModelIndex index, int first, int last);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DeviceManager::State state_;
|
DeviceManager::State state_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class DeviceItemDelegate : public CollectionItemDelegate {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeviceItemDelegate(QObject *parent);
|
explicit DeviceItemDelegate(QObject *parent);
|
||||||
|
|
||||||
static const int kIconPadding;
|
static const int kIconPadding;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class DeviceView : public AutoExpandingTreeView {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DeviceView(QWidget *parent = nullptr);
|
explicit DeviceView(QWidget *parent = nullptr);
|
||||||
~DeviceView();
|
~DeviceView();
|
||||||
|
|
||||||
void SetApplication(Application *app);
|
void SetApplication(Application *app);
|
||||||
|
@ -49,7 +49,7 @@ class GioLister : public DeviceLister {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GioLister() {}
|
explicit GioLister() {}
|
||||||
~GioLister();
|
~GioLister();
|
||||||
|
|
||||||
int priority() const { return 50; }
|
int priority() const { return 50; }
|
||||||
|
@ -40,7 +40,7 @@ class GPodLoader : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPodLoader(const QString &mount_point, TaskManager *task_manager, CollectionBackend *backend, std::shared_ptr<ConnectedDevice> device);
|
explicit GPodLoader(const QString &mount_point, TaskManager *task_manager, CollectionBackend *backend, std::shared_ptr<ConnectedDevice> device);
|
||||||
~GPodLoader();
|
~GPodLoader();
|
||||||
|
|
||||||
void set_music_path_prefix(const QString &prefix) { path_prefix_ = prefix; }
|
void set_music_path_prefix(const QString &prefix) { path_prefix_ = prefix; }
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
class iLister : public DeviceLister {
|
class iLister : public DeviceLister {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
iLister();
|
explicit iLister();
|
||||||
~iLister();
|
~iLister();
|
||||||
|
|
||||||
int priority() const { return 120; }
|
int priority() const { return 120; }
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
class iMobileDeviceConnection {
|
class iMobileDeviceConnection {
|
||||||
public:
|
public:
|
||||||
iMobileDeviceConnection(const QString &uuid);
|
explicit iMobileDeviceConnection(const QString &uuid);
|
||||||
~iMobileDeviceConnection();
|
~iMobileDeviceConnection();
|
||||||
|
|
||||||
afc_client_t afc() { return afc_; }
|
afc_client_t afc() { return afc_; }
|
||||||
|
@ -42,7 +42,7 @@ class MacOsDeviceLister : public DeviceLister {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MacOsDeviceLister();
|
explicit MacOsDeviceLister();
|
||||||
~MacOsDeviceLister();
|
~MacOsDeviceLister();
|
||||||
|
|
||||||
QStringList DeviceUniqueIDs();
|
QStringList DeviceUniqueIDs();
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
class MtpConnection : public QObject, public std::enable_shared_from_this<MtpConnection> {
|
class MtpConnection : public QObject, public std::enable_shared_from_this<MtpConnection> {
|
||||||
public:
|
public:
|
||||||
MtpConnection(const QUrl &url);
|
explicit MtpConnection(const QUrl &url);
|
||||||
~MtpConnection();
|
~MtpConnection();
|
||||||
|
|
||||||
bool is_valid() const { return device_; }
|
bool is_valid() const { return device_; }
|
||||||
|
@ -39,7 +39,7 @@ class MtpLoader : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MtpLoader(const QUrl &url, TaskManager *task_manager, CollectionBackend *backend);
|
explicit MtpLoader(const QUrl &url, TaskManager *task_manager, CollectionBackend *backend);
|
||||||
~MtpLoader();
|
~MtpLoader();
|
||||||
|
|
||||||
bool Init();
|
bool Init();
|
||||||
|
@ -49,7 +49,7 @@ class Udisks2Lister : public DeviceLister {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Udisks2Lister();
|
explicit Udisks2Lister();
|
||||||
~Udisks2Lister();
|
~Udisks2Lister();
|
||||||
|
|
||||||
QStringList DeviceUniqueIDs() override;
|
QStringList DeviceUniqueIDs() override;
|
||||||
|
@ -37,7 +37,7 @@ class About : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
About(QWidget *parent = nullptr);
|
explicit About(QWidget *parent = nullptr);
|
||||||
|
|
||||||
struct Person {
|
struct Person {
|
||||||
Person(const QString &n, const QString &e = QString()) : name(n), email(e) {}
|
Person(const QString &n, const QString &e = QString()) : name(n), email(e) {}
|
||||||
|
@ -34,8 +34,9 @@ class Application;
|
|||||||
|
|
||||||
class Console : public QDialog {
|
class Console : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Console(Application *app, QWidget *parent = nullptr);
|
explicit Console(Application *app, QWidget *parent = nullptr);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void RunQuery();
|
void RunQuery();
|
||||||
|
@ -60,7 +60,7 @@ class EditTagDialog : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EditTagDialog(Application *app, QWidget *parent = nullptr);
|
explicit EditTagDialog(Application *app, QWidget *parent = nullptr);
|
||||||
~EditTagDialog();
|
~EditTagDialog();
|
||||||
|
|
||||||
static const char *kHintText;
|
static const char *kHintText;
|
||||||
|
@ -36,7 +36,7 @@ class ErrorDialog : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ErrorDialog(QWidget *parent = nullptr);
|
explicit ErrorDialog(QWidget *parent = nullptr);
|
||||||
~ErrorDialog();
|
~ErrorDialog();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -38,7 +38,7 @@ class TrackSelectionDialog : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TrackSelectionDialog(QWidget *parent = nullptr);
|
explicit TrackSelectionDialog(QWidget *parent = nullptr);
|
||||||
~TrackSelectionDialog();
|
~TrackSelectionDialog();
|
||||||
|
|
||||||
void set_save_on_close(bool save_on_close) { save_on_close_ = save_on_close; }
|
void set_save_on_close(bool save_on_close) { save_on_close_ = save_on_close; }
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
class AlsaDeviceFinder : public DeviceFinder {
|
class AlsaDeviceFinder : public DeviceFinder {
|
||||||
public:
|
public:
|
||||||
AlsaDeviceFinder();
|
explicit AlsaDeviceFinder();
|
||||||
|
|
||||||
virtual bool Initialise() { return true; }
|
virtual bool Initialise() { return true; }
|
||||||
virtual QList<Device> ListDevices();
|
virtual QList<Device> ListDevices();
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
class DirectSoundDeviceFinder : public DeviceFinder {
|
class DirectSoundDeviceFinder : public DeviceFinder {
|
||||||
public:
|
public:
|
||||||
DirectSoundDeviceFinder();
|
explicit DirectSoundDeviceFinder();
|
||||||
|
|
||||||
virtual bool Initialise() { return true; }
|
virtual bool Initialise() { return true; }
|
||||||
virtual QList<Device> ListDevices();
|
virtual QList<Device> ListDevices();
|
||||||
|
@ -32,7 +32,7 @@ class GstElementDeleter : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GstElementDeleter(QObject *parent = nullptr);
|
explicit GstElementDeleter(QObject *parent = nullptr);
|
||||||
|
|
||||||
// If you call this function with any gstreamer element, the element will get deleted in the main thread.
|
// If you call this function with any gstreamer element, the element will get deleted in the main thread.
|
||||||
// This is useful if you need to delete an element from its own callback.
|
// This is useful if you need to delete an element from its own callback.
|
||||||
|
@ -57,7 +57,7 @@ class GstEngine : public Engine::Base, public GstBufferConsumer {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GstEngine(TaskManager *task_manager);
|
explicit GstEngine(TaskManager *task_manager);
|
||||||
~GstEngine();
|
~GstEngine();
|
||||||
|
|
||||||
bool Init();
|
bool Init();
|
||||||
|
@ -60,7 +60,7 @@ class GstEnginePipeline : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GstEnginePipeline(GstEngine *engine);
|
explicit GstEnginePipeline(GstEngine *engine);
|
||||||
~GstEnginePipeline();
|
~GstEnginePipeline();
|
||||||
|
|
||||||
// Globally unique across all pipelines.
|
// Globally unique across all pipelines.
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
class MacOsDeviceFinder : public DeviceFinder {
|
class MacOsDeviceFinder : public DeviceFinder {
|
||||||
public:
|
public:
|
||||||
MacOsDeviceFinder();
|
explicit MacOsDeviceFinder();
|
||||||
|
|
||||||
virtual bool Initialise() { return true; }
|
virtual bool Initialise() { return true; }
|
||||||
virtual QList<Device> ListDevices();
|
virtual QList<Device> ListDevices();
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
class MMDeviceFinder : public DeviceFinder {
|
class MMDeviceFinder : public DeviceFinder {
|
||||||
public:
|
public:
|
||||||
MMDeviceFinder();
|
explicit MMDeviceFinder();
|
||||||
|
|
||||||
virtual bool Initialise() { return true; }
|
virtual bool Initialise() { return true; }
|
||||||
virtual QList<Device> ListDevices();
|
virtual QList<Device> ListDevices();
|
||||||
};
|
};
|
||||||
|
@ -40,7 +40,7 @@ class PhononEngine : public Engine::Base {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PhononEngine(TaskManager *task_manager);
|
explicit PhononEngine(TaskManager *task_manager);
|
||||||
~PhononEngine();
|
~PhononEngine();
|
||||||
|
|
||||||
bool Init();
|
bool Init();
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
class PulseDeviceFinder : public DeviceFinder {
|
class PulseDeviceFinder : public DeviceFinder {
|
||||||
public:
|
public:
|
||||||
PulseDeviceFinder();
|
explicit PulseDeviceFinder();
|
||||||
~PulseDeviceFinder();
|
~PulseDeviceFinder();
|
||||||
|
|
||||||
virtual bool Initialise();
|
virtual bool Initialise();
|
||||||
|
@ -42,7 +42,7 @@ class VLCEngine : public Engine::Base {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VLCEngine(TaskManager *task_manager);
|
explicit VLCEngine(TaskManager *task_manager);
|
||||||
~VLCEngine();
|
~VLCEngine();
|
||||||
|
|
||||||
bool Init();
|
bool Init();
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
class VlcScopedRef {
|
class VlcScopedRef {
|
||||||
public:
|
public:
|
||||||
VlcScopedRef(T* ptr);
|
explicit VlcScopedRef(T* ptr);
|
||||||
~VlcScopedRef();
|
~VlcScopedRef();
|
||||||
|
|
||||||
operator T* () const { return ptr_; }
|
operator T* () const { return ptr_; }
|
||||||
@ -36,7 +36,7 @@ class VlcScopedRef {
|
|||||||
T* operator ->() const { return ptr_; }
|
T* operator ->() const { return ptr_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VlcScopedRef(VlcScopedRef&) {}
|
explicit VlcScopedRef(VlcScopedRef&) {}
|
||||||
VlcScopedRef& operator =(const VlcScopedRef&) { return *this; }
|
VlcScopedRef& operator =(const VlcScopedRef&) { return *this; }
|
||||||
|
|
||||||
T* ptr_;
|
T* ptr_;
|
||||||
|
@ -48,7 +48,7 @@ class XineEngine : public Engine::Base {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
XineEngine(TaskManager *task_manager);
|
explicit XineEngine(TaskManager *task_manager);
|
||||||
~XineEngine();
|
~XineEngine();
|
||||||
|
|
||||||
bool Init();
|
bool Init();
|
||||||
|
@ -41,7 +41,7 @@ class Equalizer : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Equalizer(QWidget *parent = nullptr);
|
explicit Equalizer(QWidget *parent = nullptr);
|
||||||
~Equalizer();
|
~Equalizer();
|
||||||
|
|
||||||
static const int kBands = 10;
|
static const int kBands = 10;
|
||||||
|
@ -35,7 +35,7 @@ class EqualizerSlider : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EqualizerSlider(const QString &label, QWidget *parent = nullptr);
|
explicit EqualizerSlider(const QString &label, QWidget *parent = nullptr);
|
||||||
~EqualizerSlider();
|
~EqualizerSlider();
|
||||||
|
|
||||||
int value() const;
|
int value() const;
|
||||||
|
@ -47,7 +47,7 @@ class GlobalShortcutGrabber : public QDialog {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GlobalShortcutGrabber(QWidget *parent = nullptr);
|
explicit GlobalShortcutGrabber(QWidget *parent = nullptr);
|
||||||
~GlobalShortcutGrabber();
|
~GlobalShortcutGrabber();
|
||||||
|
|
||||||
QKeySequence GetKey(const QString &name);
|
QKeySequence GetKey(const QString &name);
|
||||||
@ -59,7 +59,7 @@ class GlobalShortcutGrabber : public QDialog {
|
|||||||
void grabKeyboard();
|
void grabKeyboard();
|
||||||
void releaseKeyboard();
|
void releaseKeyboard();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void Accepted();
|
void Accepted();
|
||||||
void Rejected();
|
void Rejected();
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class InternetCollectionView : public AutoExpandingTreeView {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InternetCollectionView(QWidget *parent = nullptr);
|
explicit InternetCollectionView(QWidget *parent = nullptr);
|
||||||
~InternetCollectionView();
|
~InternetCollectionView();
|
||||||
|
|
||||||
void Init(Application *app, CollectionBackend *backend, CollectionModel *model, const bool favorite = false);
|
void Init(Application *app, CollectionBackend *backend, CollectionModel *model, const bool favorite = false);
|
||||||
|
@ -42,7 +42,7 @@ class InternetCollectionViewContainer : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InternetCollectionViewContainer(QWidget *parent = nullptr);
|
explicit InternetCollectionViewContainer(QWidget *parent = nullptr);
|
||||||
~InternetCollectionViewContainer();
|
~InternetCollectionViewContainer();
|
||||||
|
|
||||||
QStackedWidget *stacked() const { return ui_->stacked; }
|
QStackedWidget *stacked() const { return ui_->stacked; }
|
||||||
|
@ -50,7 +50,7 @@ class InternetSearch : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InternetSearch(Application *app, Song::Source source, QObject *parent = nullptr);
|
explicit InternetSearch(Application *app, Song::Source source, QObject *parent = nullptr);
|
||||||
~InternetSearch();
|
~InternetSearch();
|
||||||
|
|
||||||
enum SearchType {
|
enum SearchType {
|
||||||
|
@ -32,7 +32,7 @@ class InternetSearchView;
|
|||||||
|
|
||||||
class InternetSearchItemDelegate : public CollectionItemDelegate {
|
class InternetSearchItemDelegate : public CollectionItemDelegate {
|
||||||
public:
|
public:
|
||||||
InternetSearchItemDelegate(InternetSearchView *view);
|
explicit InternetSearchItemDelegate(InternetSearchView *view);
|
||||||
|
|
||||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ class InternetSearchModel : public QStandardItemModel {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InternetSearchModel(InternetSearch *engine, QObject *parent = nullptr);
|
explicit InternetSearchModel(InternetSearch *engine, QObject *parent = nullptr);
|
||||||
|
|
||||||
enum Role {
|
enum Role {
|
||||||
Role_Result = CollectionModel::LastRole,
|
Role_Result = CollectionModel::LastRole,
|
||||||
|
@ -28,7 +28,7 @@ class QModelIndex;
|
|||||||
|
|
||||||
class InternetSearchSortModel : public QSortFilterProxyModel {
|
class InternetSearchSortModel : public QSortFilterProxyModel {
|
||||||
public:
|
public:
|
||||||
InternetSearchSortModel(QObject *parent = nullptr);
|
explicit InternetSearchSortModel(QObject *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
||||||
|
@ -60,7 +60,7 @@ class InternetSearchView : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InternetSearchView(QWidget *parent = nullptr);
|
explicit InternetSearchView(QWidget *parent = nullptr);
|
||||||
~InternetSearchView();
|
~InternetSearchView();
|
||||||
|
|
||||||
void Init(Application *app, InternetSearch *engine, const QString &settings_group, const SettingsDialog::Page settings_page, const bool artists = false, const bool albums = false, const bool songs = false);
|
void Init(Application *app, InternetSearch *engine, const QString &settings_group, const SettingsDialog::Page settings_page, const bool artists = false, const bool albums = false, const bool songs = false);
|
||||||
|
@ -39,7 +39,7 @@ class InternetService : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InternetService(Song::Source source, const QString &name, const QString &url_scheme, Application *app, QObject *parent = nullptr);
|
explicit InternetService(Song::Source source, const QString &name, const QString &url_scheme, Application *app, QObject *parent = nullptr);
|
||||||
|
|
||||||
virtual ~InternetService() {}
|
virtual ~InternetService() {}
|
||||||
virtual void Exit() {}
|
virtual void Exit() {}
|
||||||
|
@ -40,7 +40,7 @@ class InternetSongsView : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InternetSongsView(Application *app, InternetService *service, const QString &settings_group, const SettingsDialog::Page settings_page, QWidget *parent = nullptr);
|
explicit InternetSongsView(Application *app, InternetService *service, const QString &settings_group, const SettingsDialog::Page settings_page, QWidget *parent = nullptr);
|
||||||
~InternetSongsView();
|
~InternetSongsView();
|
||||||
|
|
||||||
void ReloadSettings();
|
void ReloadSettings();
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user