Compare commits
17 Commits
1.2.5
...
refactorin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38d49ceb64 | ||
|
|
58fc8c82bb | ||
|
|
02bb875bb3 | ||
|
|
5db01482eb | ||
|
|
719fa6ffb3 | ||
|
|
159be5d79e | ||
|
|
911237e281 | ||
|
|
ae89ca8123 | ||
|
|
b832675893 | ||
|
|
b4cfe636c9 | ||
|
|
e6a0945dfa | ||
|
|
726c105ed6 | ||
|
|
d73cbc3a1d | ||
|
|
121f45d3b6 | ||
|
|
3a9ea81929 | ||
|
|
b919472241 | ||
|
|
e8c8b39410 |
1119
CMakeLists.txt
1119
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,11 @@ Strawberry Music Player
|
||||
=======================
|
||||
ChangeLog
|
||||
|
||||
Version 1.2.6 (2025.01.17):
|
||||
|
||||
Bugfixes:
|
||||
* Fixed dragging songs from playlist to queue.
|
||||
|
||||
Version 1.2.5 (2025.01.17):
|
||||
|
||||
Bugfixes:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
set(STRAWBERRY_VERSION_MAJOR 1)
|
||||
set(STRAWBERRY_VERSION_MINOR 2)
|
||||
set(STRAWBERRY_VERSION_PATCH 5)
|
||||
set(STRAWBERRY_VERSION_PATCH 6)
|
||||
#set(STRAWBERRY_VERSION_PRERELEASE rc1)
|
||||
|
||||
set(INCLUDE_GIT_REVISION OFF)
|
||||
set(INCLUDE_GIT_REVISION ON)
|
||||
|
||||
set(majorminorpatch "${STRAWBERRY_VERSION_MAJOR}.${STRAWBERRY_VERSION_MINOR}.${STRAWBERRY_VERSION_PATCH}")
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
</screenshots>
|
||||
<update_contact>eclipseo@fedoraproject.org</update_contact>
|
||||
<releases>
|
||||
<release version="1.2.6" date="2025-01-17"/>
|
||||
<release version="1.2.5" date="2025-01-17"/>
|
||||
<release version="1.2.4" date="2025-01-10"/>
|
||||
<release version="1.2.3" date="2024-12-08"/>
|
||||
|
||||
@@ -1,2 +1,71 @@
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||
|
||||
add_subdirectory(utilities)
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(mimedata)
|
||||
add_subdirectory(osd)
|
||||
add_subdirectory(tagreader)
|
||||
add_subdirectory(widgets)
|
||||
add_subdirectory(dialogs)
|
||||
add_subdirectory(engine)
|
||||
add_subdirectory(lyrics)
|
||||
add_subdirectory(filterparser)
|
||||
add_subdirectory(analyzer)
|
||||
add_subdirectory(transcoder)
|
||||
add_subdirectory(collection)
|
||||
add_subdirectory(playlist)
|
||||
add_subdirectory(playlistparsers)
|
||||
add_subdirectory(equalizer)
|
||||
add_subdirectory(edittagdialog)
|
||||
add_subdirectory(smartplaylists)
|
||||
add_subdirectory(settings)
|
||||
add_subdirectory(device)
|
||||
add_subdirectory(covermanager)
|
||||
add_subdirectory(fileview)
|
||||
add_subdirectory(player)
|
||||
add_subdirectory(radios)
|
||||
add_subdirectory(streaming)
|
||||
add_subdirectory(scrobbler)
|
||||
add_subdirectory(organize)
|
||||
add_subdirectory(context)
|
||||
add_subdirectory(queue)
|
||||
add_subdirectory(providers)
|
||||
add_subdirectory(songloader)
|
||||
add_subdirectory(systemtrayicon)
|
||||
|
||||
if(HAVE_MUSICBRAINZ)
|
||||
add_subdirectory(musicbrainz)
|
||||
endif()
|
||||
|
||||
if(HAVE_GLOBALSHORTCUTS)
|
||||
add_subdirectory(globalshortcuts)
|
||||
endif()
|
||||
|
||||
if(HAVE_MOODBAR)
|
||||
add_subdirectory(moodbar)
|
||||
endif()
|
||||
|
||||
if(HAVE_MPRIS2)
|
||||
add_subdirectory(mpris2)
|
||||
endif()
|
||||
|
||||
if(HAVE_SUBSONIC)
|
||||
add_subdirectory(subsonic)
|
||||
endif()
|
||||
|
||||
if(HAVE_TIDAL)
|
||||
add_subdirectory(tidal)
|
||||
endif()
|
||||
|
||||
if(HAVE_SPOTIFY)
|
||||
add_subdirectory(spotify)
|
||||
endif()
|
||||
|
||||
if(HAVE_QOBUZ)
|
||||
add_subdirectory(qobuz)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
add_subdirectory(macstartup)
|
||||
endif()
|
||||
|
||||
41
src/analyzer/CMakeLists.txt
Normal file
41
src/analyzer/CMakeLists.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
set(ANALYZER_SOURCES
|
||||
fht.cpp
|
||||
analyzerbase.cpp
|
||||
analyzercontainer.cpp
|
||||
blockanalyzer.cpp
|
||||
boomanalyzer.cpp
|
||||
turbineanalyzer.cpp
|
||||
sonogramanalyzer.cpp
|
||||
waverubberanalyzer.cpp
|
||||
rainbowanalyzer.cpp
|
||||
)
|
||||
|
||||
set(ANALYZER_HEADERS
|
||||
analyzerbase.h
|
||||
analyzercontainer.h
|
||||
blockanalyzer.h
|
||||
boomanalyzer.h
|
||||
turbineanalyzer.h
|
||||
sonogramanalyzer.h
|
||||
waverubberanalyzer.h
|
||||
rainbowanalyzer.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(ANALYZER_SOURCES ${ANALYZER_HEADERS})
|
||||
|
||||
add_library(strawberry_analyzer STATIC ${ANALYZER_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_analyzer PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_analyzer PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_core
|
||||
strawberry_engine
|
||||
)
|
||||
@@ -50,9 +50,9 @@
|
||||
// Make an INSTRUCTIONS file
|
||||
// can't mod scope in analyze you have to use transform for 2D use setErasePixmap Qt function insetead of m_background
|
||||
|
||||
AnalyzerBase::AnalyzerBase(QWidget *parent, const uint scopeSize)
|
||||
AnalyzerBase::AnalyzerBase(QWidget *parent, const uint scope_size)
|
||||
: QWidget(parent),
|
||||
fht_(new FHT(scopeSize)),
|
||||
fht_(new FHT(scope_size)),
|
||||
engine_(nullptr),
|
||||
lastscope_(512),
|
||||
new_frame_(false),
|
||||
@@ -211,28 +211,28 @@ void AnalyzerBase::demo(QPainter &p) {
|
||||
|
||||
}
|
||||
|
||||
void AnalyzerBase::interpolate(const Scope &inVec, Scope &outVec) {
|
||||
void AnalyzerBase::interpolate(const Scope &in_scope, Scope &out_scope) {
|
||||
|
||||
double pos = 0.0;
|
||||
const double step = static_cast<double>(inVec.size()) / static_cast<double>(outVec.size());
|
||||
const double step = static_cast<double>(in_scope.size()) / static_cast<double>(out_scope.size());
|
||||
|
||||
for (uint i = 0; i < outVec.size(); ++i, pos += step) {
|
||||
for (uint i = 0; i < out_scope.size(); ++i, pos += step) {
|
||||
const double error = pos - std::floor(pos);
|
||||
const uint64_t offset = static_cast<uint64_t>(pos);
|
||||
|
||||
uint64_t indexLeft = offset + 0;
|
||||
|
||||
if (indexLeft >= inVec.size()) {
|
||||
indexLeft = inVec.size() - 1;
|
||||
if (indexLeft >= in_scope.size()) {
|
||||
indexLeft = in_scope.size() - 1;
|
||||
}
|
||||
|
||||
uint64_t indexRight = offset + 1;
|
||||
|
||||
if (indexRight >= inVec.size()) {
|
||||
indexRight = inVec.size() - 1;
|
||||
if (indexRight >= in_scope.size()) {
|
||||
indexRight = in_scope.size() - 1;
|
||||
}
|
||||
|
||||
outVec[i] = inVec[indexLeft] * (1.0F - static_cast<float>(error)) + inVec[indexRight] * static_cast<float>(error);
|
||||
out_scope[i] = in_scope[indexLeft] * (1.0F - static_cast<float>(error)) + in_scope[indexRight] * static_cast<float>(error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class AnalyzerBase : public QWidget {
|
||||
|
||||
protected:
|
||||
using Scope = std::vector<float>;
|
||||
explicit AnalyzerBase(QWidget*, const uint scopeSize = 7);
|
||||
explicit AnalyzerBase(QWidget *parent, const uint scope_size = 7);
|
||||
|
||||
void hideEvent(QHideEvent *e) override;
|
||||
void showEvent(QShowEvent *e) override;
|
||||
@@ -71,12 +71,12 @@ class AnalyzerBase : public QWidget {
|
||||
int resizeExponent(int exp);
|
||||
int resizeForBands(const int bands);
|
||||
virtual void init() {}
|
||||
virtual void transform(Scope&);
|
||||
virtual void analyze(QPainter &p, const Scope&, const bool new_frame) = 0;
|
||||
virtual void transform(Scope &scope);
|
||||
virtual void analyze(QPainter &p, const Scope &s, const bool new_frame) = 0;
|
||||
virtual void demo(QPainter &p);
|
||||
|
||||
void interpolate(const Scope&, Scope&);
|
||||
void initSin(Scope&, const uint = 6000);
|
||||
void interpolate(const Scope &in_scope, Scope &out_scope);
|
||||
void initSin(Scope &v, const uint size = 6000);
|
||||
|
||||
protected:
|
||||
QBasicTimer timer_;
|
||||
|
||||
82
src/collection/CMakeLists.txt
Normal file
82
src/collection/CMakeLists.txt
Normal file
@@ -0,0 +1,82 @@
|
||||
set(COLLECTION_SOURCES
|
||||
collectionlibrary.cpp
|
||||
collectionmodel.cpp
|
||||
collectionbackend.cpp
|
||||
collectionwatcher.cpp
|
||||
collectionview.cpp
|
||||
collectionitemdelegate.cpp
|
||||
collectionviewcontainer.cpp
|
||||
collectiondirectorymodel.cpp
|
||||
collectionfilteroptions.cpp
|
||||
collectionfilterwidget.cpp
|
||||
collectionfilter.cpp
|
||||
collectionplaylistitem.cpp
|
||||
collectionquery.cpp
|
||||
savedgroupingmanager.cpp
|
||||
groupbydialog.cpp
|
||||
collectiontask.cpp
|
||||
collectionmodelupdate.cpp
|
||||
collectionitem.cpp
|
||||
)
|
||||
|
||||
set(COLLECTION_HEADERS
|
||||
collectionlibrary.h
|
||||
collectionmodel.h
|
||||
collectionbackend.h
|
||||
collectionwatcher.h
|
||||
collectionview.h
|
||||
collectionitemdelegate.h
|
||||
collectionviewcontainer.h
|
||||
collectiondirectorymodel.h
|
||||
collectionfilterwidget.h
|
||||
collectionfilter.h
|
||||
savedgroupingmanager.h
|
||||
groupbydialog.h
|
||||
)
|
||||
|
||||
set(COLLECTION_UI
|
||||
groupbydialog.ui
|
||||
collectionfilterwidget.ui
|
||||
collectionviewcontainer.ui
|
||||
savedgroupingmanager.ui
|
||||
)
|
||||
|
||||
qt_wrap_cpp(COLLECTION_SOURCES ${COLLECTION_HEADERS})
|
||||
qt_wrap_ui(COLLECTION_SOURCES ${COLLECTION_UI})
|
||||
|
||||
add_library(strawberry_collection STATIC ${COLLECTION_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_collection PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_collection PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::GSTREAMER
|
||||
PkgConfig::GSTREAMER_BASE
|
||||
PkgConfig::GSTREAMER_AUDIO
|
||||
PkgConfig::GSTREAMER_APP
|
||||
PkgConfig::GSTREAMER_TAG
|
||||
PkgConfig::GSTREAMER_PBUTILS
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_mimedata
|
||||
strawberry_engine
|
||||
strawberry_tagreader
|
||||
strawberry_covermanager
|
||||
strawberry_filterparser
|
||||
strawberry_dialogs
|
||||
strawberry_edittagdialog
|
||||
strawberry_organize
|
||||
strawberry_playlistparsers
|
||||
)
|
||||
@@ -78,7 +78,7 @@ CollectionBackend::~CollectionBackend() {
|
||||
|
||||
void CollectionBackend::Init(SharedPtr<Database> db, SharedPtr<TaskManager> task_manager, const Song::Source source, const QString &songs_table, const QString &dirs_table, const QString &subdirs_table) {
|
||||
|
||||
setObjectName(source == Song::Source::Collection ? QLatin1String(metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(source), QLatin1String(metaObject()->className())));
|
||||
setObjectName(source == Song::Source::Collection ? QLatin1String(QObject::metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(source), QLatin1String(QObject::metaObject()->className())));
|
||||
|
||||
db_ = db;
|
||||
task_manager_ = task_manager;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QUrl>
|
||||
|
||||
#include "core/song.h"
|
||||
#include "core/songmimedata.h"
|
||||
#include "mimedata/songmimedata.h"
|
||||
#include "filterparser/filterparser.h"
|
||||
#include "filterparser/filtertree.h"
|
||||
#include "collectionbackend.h"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "savedgroupingmanager.h"
|
||||
#include "collectionfilterwidget.h"
|
||||
#include "groupbydialog.h"
|
||||
#include "ui_collectionfilterwidget.h"
|
||||
#include "collection/ui_collectionfilterwidget.h"
|
||||
#include "widgets/searchfield.h"
|
||||
#include "constants/collectionsettings.h"
|
||||
#include "constants/appearancesettings.h"
|
||||
|
||||
@@ -66,7 +66,7 @@ CollectionLibrary::CollectionLibrary(const SharedPtr<Database> database,
|
||||
save_playcounts_to_files_(false),
|
||||
save_ratings_to_files_(false) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#include "core/database.h"
|
||||
#include "core/iconloader.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/songmimedata.h"
|
||||
#include "mimedata/songmimedata.h"
|
||||
#include "collectionfilteroptions.h"
|
||||
#include "collectionquery.h"
|
||||
#include "collectionbackend.h"
|
||||
@@ -98,7 +98,7 @@ CollectionModel::CollectionModel(const SharedPtr<CollectionBackend> backend, con
|
||||
loading_(false),
|
||||
icon_disk_cache_(new QNetworkDiskCache(this)) {
|
||||
|
||||
setObjectName(backend_->source() == Song::Source::Collection ? QLatin1String(metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(backend_->source()), QLatin1String(metaObject()->className())));
|
||||
setObjectName(backend_->source() == Song::Source::Collection ? QLatin1String(QObject::metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(backend_->source()), QLatin1String(QObject::metaObject()->className())));
|
||||
|
||||
filter_->setSourceModel(this);
|
||||
filter_->setSortRole(Role_SortText);
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <QContextMenuEvent>
|
||||
|
||||
#include "core/iconloader.h"
|
||||
#include "core/mimedata.h"
|
||||
#include "mimedata/mimedata.h"
|
||||
#include "core/musicstorage.h"
|
||||
#include "core/deletefiles.h"
|
||||
#include "core/settings.h"
|
||||
@@ -69,7 +69,7 @@
|
||||
# include "device/devicemanager.h"
|
||||
# include "device/devicestatefiltermodel.h"
|
||||
#endif
|
||||
#include "dialogs/edittagdialog.h"
|
||||
#include "edittagdialog/edittagdialog.h"
|
||||
#include "dialogs/deleteconfirmationdialog.h"
|
||||
#include "organize/organizedialog.h"
|
||||
#include "organize/organizeerrordialog.h"
|
||||
@@ -108,7 +108,7 @@ CollectionView::CollectionView(QWidget *parent)
|
||||
is_in_keyboard_search_(false),
|
||||
delete_files_(false) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
setItemDelegate(new CollectionItemDelegate(this));
|
||||
setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "collectionfilterwidget.h"
|
||||
#include "collectionview.h"
|
||||
#include "collectionviewcontainer.h"
|
||||
#include "ui_collectionviewcontainer.h"
|
||||
#include "collection/ui_collectionviewcontainer.h"
|
||||
|
||||
CollectionViewContainer::CollectionViewContainer(QWidget *parent) : QWidget(parent), ui_(new Ui_CollectionViewContainer) {
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ CollectionWatcher::CollectionWatcher(const Song::Source source,
|
||||
cue_parser_(new CueParser(tagreader_client, backend, this)),
|
||||
last_scan_time_(0) {
|
||||
|
||||
setObjectName(source_ == Song::Source::Collection ? QLatin1String(metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(source_), QLatin1String(metaObject()->className())));
|
||||
setObjectName(source_ == Song::Source::Collection ? QLatin1String(QObject::metaObject()->className()) : QStringLiteral("%1%2").arg(Song::DescriptionForSource(source_), QLatin1String(QObject::metaObject()->className())));
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
32
src/context/CMakeLists.txt
Normal file
32
src/context/CMakeLists.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
set(CONTEXT_SOURCES
|
||||
contextview.cpp
|
||||
contextalbum.cpp
|
||||
)
|
||||
|
||||
set(CONTEXT_HEADERS
|
||||
contextview.h
|
||||
contextalbum.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(CONTEXT_SOURCES ${CONTEXT_HEADERS})
|
||||
|
||||
add_library(strawberry_context STATIC ${CONTEXT_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_context PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_context PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_collection
|
||||
strawberry_covermanager
|
||||
strawberry_lyrics
|
||||
strawberry_widgets
|
||||
)
|
||||
95
src/core/CMakeLists.txt
Normal file
95
src/core/CMakeLists.txt
Normal file
@@ -0,0 +1,95 @@
|
||||
set(CORE_SOURCES
|
||||
logging.cpp
|
||||
commandlineoptions.cpp
|
||||
database.cpp
|
||||
memorydatabase.cpp
|
||||
sqlquery.cpp
|
||||
sqlrow.cpp
|
||||
deletefiles.cpp
|
||||
filesystemmusicstorage.cpp
|
||||
filesystemwatcherinterface.cpp
|
||||
mergedproxymodel.cpp
|
||||
multisortfilterproxy.cpp
|
||||
musicstorage.cpp
|
||||
networkaccessmanager.cpp
|
||||
threadsafenetworkdiskcache.cpp
|
||||
networktimeouts.cpp
|
||||
networkproxyfactory.cpp
|
||||
qtfslistener.cpp
|
||||
settings.cpp
|
||||
settingsprovider.cpp
|
||||
signalchecker.cpp
|
||||
song.cpp
|
||||
stylehelper.cpp
|
||||
stylesheetloader.cpp
|
||||
taskmanager.cpp
|
||||
thread.cpp
|
||||
urlhandlers.cpp
|
||||
urlhandler.cpp
|
||||
iconloader.cpp
|
||||
standarditemiconloader.cpp
|
||||
scopedtransaction.cpp
|
||||
localredirectserver.cpp
|
||||
temporaryfile.cpp
|
||||
enginemetadata.cpp
|
||||
platforminterface.cpp
|
||||
)
|
||||
|
||||
set(CORE_HEADERS
|
||||
logging.h
|
||||
database.h
|
||||
memorydatabase.h
|
||||
deletefiles.h
|
||||
filesystemwatcherinterface.h
|
||||
mergedproxymodel.h
|
||||
multisortfilterproxy.h
|
||||
networkaccessmanager.h
|
||||
threadsafenetworkdiskcache.h
|
||||
networktimeouts.h
|
||||
qtfslistener.h
|
||||
settings.h
|
||||
taskmanager.h
|
||||
thread.h
|
||||
urlhandlers.h
|
||||
urlhandler.h
|
||||
standarditemiconloader.h
|
||||
stylesheetloader.h
|
||||
localredirectserver.h
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND CORE_SOURCES scoped_nsautorelease_pool.mm)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND CORE_SOURCES windows7thumbbar.cpp)
|
||||
list(APPEND CORE_HEADERS windows7thumbbar.h)
|
||||
endif()
|
||||
|
||||
qt_wrap_cpp(CORE_SOURCES ${CORE_HEADERS})
|
||||
|
||||
add_library(strawberry_core STATIC ${CORE_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_core PRIVATE
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_core PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::SQLITE
|
||||
${TAGLIB_LIBRARIES}
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
$<$<BOOL:${HAVE_DBUS}>:Qt${QT_VERSION_MAJOR}::DBus>
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
$<$<BOOL:${HAVE_GPOD}>:PkgConfig::LIBGPOD PkgConfig::GDK_PIXBUF>
|
||||
$<$<BOOL:${WIN32}>:getopt-win::getopt>
|
||||
strawberry_utilities
|
||||
)
|
||||
@@ -69,7 +69,7 @@ Database::Database(SharedPtr<TaskManager> task_manager, QObject *parent, const Q
|
||||
startup_schema_version_(-1),
|
||||
original_thread_(nullptr) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
TaskManager::TaskManager(QObject *parent) : QObject(parent), next_task_id_(1) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
119
src/covermanager/CMakeLists.txt
Normal file
119
src/covermanager/CMakeLists.txt
Normal file
@@ -0,0 +1,119 @@
|
||||
set(COVERMANAGER_SOURCES
|
||||
albumcovermanager.cpp
|
||||
albumcovermanagerlist.cpp
|
||||
albumcoverloader.cpp
|
||||
albumcoverloaderoptions.cpp
|
||||
albumcoverfetcher.cpp
|
||||
albumcoverfetchersearch.cpp
|
||||
albumcoversearcher.cpp
|
||||
albumcoverexport.cpp
|
||||
albumcoverexporter.cpp
|
||||
albumcoverchoicecontroller.cpp
|
||||
coverprovider.cpp
|
||||
coverproviders.cpp
|
||||
coversearchstatistics.cpp
|
||||
coversearchstatisticsdialog.cpp
|
||||
coverexportrunnable.cpp
|
||||
currentalbumcoverloader.cpp
|
||||
coverfromurldialog.cpp
|
||||
jsoncoverprovider.cpp
|
||||
lastfmcoverprovider.cpp
|
||||
musicbrainzcoverprovider.cpp
|
||||
discogscoverprovider.cpp
|
||||
deezercoverprovider.cpp
|
||||
musixmatchcoverprovider.cpp
|
||||
opentidalcoverprovider.cpp
|
||||
)
|
||||
|
||||
set(COVERMANAGER_HEADERS
|
||||
albumcovermanager.h
|
||||
albumcovermanagerlist.h
|
||||
albumcoverloader.h
|
||||
albumcoverfetcher.h
|
||||
albumcoverfetchersearch.h
|
||||
albumcoversearcher.h
|
||||
albumcoverexport.h
|
||||
albumcoverexporter.h
|
||||
albumcoverchoicecontroller.h
|
||||
coverprovider.h
|
||||
coverproviders.h
|
||||
coversearchstatisticsdialog.h
|
||||
coverexportrunnable.h
|
||||
currentalbumcoverloader.h
|
||||
coverfromurldialog.h
|
||||
jsoncoverprovider.h
|
||||
lastfmcoverprovider.h
|
||||
musicbrainzcoverprovider.h
|
||||
discogscoverprovider.h
|
||||
deezercoverprovider.h
|
||||
musixmatchcoverprovider.h
|
||||
opentidalcoverprovider.h
|
||||
)
|
||||
|
||||
set(COVERMANAGER_UI
|
||||
albumcoverexport.ui
|
||||
albumcovermanager.ui
|
||||
albumcoversearcher.ui
|
||||
coversearchstatisticsdialog.ui
|
||||
coverfromurldialog.ui
|
||||
)
|
||||
|
||||
if(HAVE_TIDAL)
|
||||
list(APPEND COVERMANAGER_SOURCES tidalcoverprovider.cpp)
|
||||
list(APPEND COVERMANAGER_HEADERS tidalcoverprovider.h)
|
||||
endif()
|
||||
|
||||
if(HAVE_SPOTIFY)
|
||||
list(APPEND COVERMANAGER_SOURCES spotifycoverprovider.cpp)
|
||||
list(APPEND COVERMANAGER_HEADERS spotifycoverprovider.h)
|
||||
endif()
|
||||
|
||||
if(HAVE_QOBUZ)
|
||||
list(APPEND COVERMANAGER_SOURCES qobuzcoverprovider.cpp)
|
||||
list(APPEND COVERMANAGER_HEADERS qobuzcoverprovider.h)
|
||||
endif()
|
||||
|
||||
qt_wrap_cpp(COVERMANAGER_SOURCES ${COVERMANAGER_HEADERS})
|
||||
qt_wrap_ui(COVERMANAGER_SOURCES ${COVERMANAGER_UI})
|
||||
|
||||
add_library(strawberry_covermanager STATIC ${COVERMANAGER_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_covermanager PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_covermanager PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_tagreader
|
||||
strawberry_collection
|
||||
strawberry_streaming
|
||||
strawberry_widgets
|
||||
)
|
||||
|
||||
if(HAVE_SUBSONIC)
|
||||
target_link_libraries(strawberry_covermanager PRIVATE strawberry_subsonic)
|
||||
endif()
|
||||
|
||||
if(HAVE_TIDAL)
|
||||
target_link_libraries(strawberry_covermanager PRIVATE strawberry_tidal)
|
||||
endif()
|
||||
|
||||
if(HAVE_SPOTIFY)
|
||||
target_link_libraries(strawberry_covermanager PRIVATE strawberry_spotify)
|
||||
endif()
|
||||
|
||||
if(HAVE_QOBUZ)
|
||||
target_link_libraries(strawberry_covermanager PRIVATE strawberry_qobuz)
|
||||
endif()
|
||||
@@ -64,7 +64,7 @@ AlbumCoverLoader::AlbumCoverLoader(const SharedPtr<TagReaderClient> tagreader_cl
|
||||
load_image_async_id_(1),
|
||||
original_thread_(nullptr) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
#include "core/settings.h"
|
||||
#include "core/database.h"
|
||||
#include "core/networkaccessmanager.h"
|
||||
#include "core/songmimedata.h"
|
||||
#include "mimedata/songmimedata.h"
|
||||
#include "utilities/strutils.h"
|
||||
#include "utilities/fileutils.h"
|
||||
#include "utilities/imageutils.h"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#include "includes/scoped_ptr.h"
|
||||
#include "core/song.h"
|
||||
#include "core/songmimedata.h"
|
||||
#include "mimedata/songmimedata.h"
|
||||
#include "collection/collectionbackend.h"
|
||||
#include "albumcovermanager.h"
|
||||
#include "albumcovermanagerlist.h"
|
||||
|
||||
@@ -45,7 +45,7 @@ CurrentAlbumCoverLoader::CurrentAlbumCoverLoader(const SharedPtr<AlbumCoverLoade
|
||||
temp_file_pattern_(StandardPaths::WritableLocation(StandardPaths::StandardLocation::TempLocation) + u"/strawberry-cover-XXXXXX.jpg"_s),
|
||||
id_(0) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
options_.options = AlbumCoverLoaderOptions::Option::RawImageData | AlbumCoverLoaderOptions::Option::OriginalImage | AlbumCoverLoaderOptions::Option::ScaledImage;
|
||||
options_.desired_scaled_size = QSize(120, 120);
|
||||
|
||||
115
src/device/CMakeLists.txt
Normal file
115
src/device/CMakeLists.txt
Normal file
@@ -0,0 +1,115 @@
|
||||
set(DEVICE_SOURCES
|
||||
connecteddevice.cpp
|
||||
devicedatabasebackend.cpp
|
||||
devicelister.cpp
|
||||
devicemanager.cpp
|
||||
devicestatefiltermodel.cpp
|
||||
filesystemdevice.cpp
|
||||
deviceviewcontainer.cpp
|
||||
deviceview.cpp
|
||||
deviceproperties.cpp
|
||||
deviceinfo.cpp
|
||||
)
|
||||
|
||||
set(DEVICE_HEADERS
|
||||
connecteddevice.h
|
||||
devicedatabasebackend.h
|
||||
devicelister.h
|
||||
devicemanager.h
|
||||
devicestatefiltermodel.h
|
||||
filesystemdevice.h
|
||||
deviceviewcontainer.h
|
||||
deviceview.h
|
||||
deviceproperties.h
|
||||
)
|
||||
|
||||
set(DEVICE_UI
|
||||
deviceproperties.ui
|
||||
deviceviewcontainer.ui
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND DEVICE_SOURCES macosdevicelister.mm)
|
||||
list(APPEND DEVICE_HEADERS macosdevicelister.h)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
list(APPEND DEVICE_SOURCES giolister.cpp)
|
||||
list(APPEND DEVICE_HEADERS giolister.h)
|
||||
endif()
|
||||
|
||||
if(HAVE_UDISKS2)
|
||||
list(APPEND DEVICE_SOURCES udisks2lister.cpp)
|
||||
list(APPEND DEVICE_HEADERS udisks2lister.h)
|
||||
set_source_files_properties(org.freedesktop.DBus.ObjectManager.xml PROPERTIES NO_NAMESPACE objectmanager INCLUDE includes/dbus_metatypes.h)
|
||||
set_source_files_properties(org.freedesktop.UDisks2.Filesystem.xml PROPERTIES NO_NAMESPACE udisks2filesystem INCLUDE includes/dbus_metatypes.h)
|
||||
set_source_files_properties(org.freedesktop.UDisks2.Block.xml PROPERTIES NO_NAMESPACE udisks2block INCLUDE includes/dbus_metatypes.h)
|
||||
set_source_files_properties(org.freedesktop.UDisks2.Drive.xml PROPERTIES NO_NAMESPACE udisks2drive INCLUDE includes/dbus_metatypes.h)
|
||||
set_source_files_properties(org.freedesktop.UDisks2.Job.xml PROPERTIES NO_NAMESPACE udisks2job INCLUDE includes/dbus_metatypes.h)
|
||||
qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.DBus.ObjectManager.xml objectmanager)
|
||||
qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.UDisks2.Filesystem.xml udisks2filesystem)
|
||||
qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.UDisks2.Block.xml udisks2block)
|
||||
qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.UDisks2.Drive.xml udisks2drive)
|
||||
qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.UDisks2.Job.xml udisks2job)
|
||||
endif()
|
||||
|
||||
if(HAVE_MTP)
|
||||
list(APPEND DEVICE_SOURCES mtpconnection.cpp mtpdevice.cpp mtploader.cpp)
|
||||
list(APPEND DEVICE_HEADERS mtpconnection.h mtpdevice.h mtploader.h)
|
||||
endif()
|
||||
|
||||
if(HAVE_AUDIOCD)
|
||||
list(APPEND DEVICE_SOURCES cddadevice.cpp cddalister.cpp cddasongloader.cpp)
|
||||
list(APPEND DEVICE_HEADERS cddadevice.h cddalister.h cddasongloader.h)
|
||||
endif()
|
||||
|
||||
if(HAVE_GPOD)
|
||||
list(APPEND DEVICE_SOURCES gpoddevice.cpp gpodloader.cpp)
|
||||
list(APPEND DEVICE_HEADERS gpoddevice.h gpodloader.h)
|
||||
endif()
|
||||
|
||||
qt_wrap_cpp(DEVICE_SOURCES ${DEVICE_HEADERS})
|
||||
qt_wrap_ui(DEVICE_SOURCES ${DEVICE_UI})
|
||||
|
||||
add_library(strawberry_device STATIC ${DEVICE_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_device PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_device PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::GSTREAMER
|
||||
PkgConfig::GSTREAMER_BASE
|
||||
PkgConfig::GSTREAMER_AUDIO
|
||||
PkgConfig::GSTREAMER_APP
|
||||
PkgConfig::GSTREAMER_TAG
|
||||
PkgConfig::GSTREAMER_PBUTILS
|
||||
$<$<BOOL:${HAVE_GIO}>:PkgConfig::GIO>
|
||||
$<$<BOOL:${HAVE_GIO_UNIX}>:PkgConfig::GIO_UNIX>
|
||||
$<$<BOOL:${HAVE_AUDIOCD}>:PkgConfig::LIBCDIO>
|
||||
$<$<BOOL:${HAVE_MTP}>:PkgConfig::LIBMTP>
|
||||
$<$<BOOL:${HAVE_GPOD}>:PkgConfig::LIBGPOD PkgConfig::GDK_PIXBUF>
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
$<$<BOOL:${HAVE_DBUS}>:Qt${QT_VERSION_MAJOR}::DBus>
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_collection
|
||||
strawberry_widgets
|
||||
strawberry_musicbrainz
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(strawberry_device PRIVATE
|
||||
"-framework IOKit"
|
||||
"-framework DiskArbitration"
|
||||
)
|
||||
endif()
|
||||
@@ -49,7 +49,7 @@ DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent)
|
||||
db_(nullptr),
|
||||
original_thread_(nullptr) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ DeviceLister::DeviceLister(QObject *parent)
|
||||
original_thread_(nullptr),
|
||||
next_mount_request_id_(0) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ DeviceManager::DeviceManager(const SharedPtr<TaskManager> task_manager,
|
||||
albumcover_loader_(albumcover_loader),
|
||||
not_connected_overlay_(IconLoader::Load(u"edit-delete"_s)) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
thread_pool_.setMaxThreadCount(1);
|
||||
QObject::connect(&*task_manager, &TaskManager::TasksChanged, this, &DeviceManager::TasksChanged);
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "core/iconloader.h"
|
||||
#include "core/deletefiles.h"
|
||||
#include "core/mergedproxymodel.h"
|
||||
#include "core/mimedata.h"
|
||||
#include "mimedata/mimedata.h"
|
||||
#include "core/musicstorage.h"
|
||||
#include "utilities/colorutils.h"
|
||||
#include "organize/organizedialog.h"
|
||||
|
||||
59
src/dialogs/CMakeLists.txt
Normal file
59
src/dialogs/CMakeLists.txt
Normal file
@@ -0,0 +1,59 @@
|
||||
set(DIALOGS_SOURCES
|
||||
about.cpp
|
||||
console.cpp
|
||||
errordialog.cpp
|
||||
addstreamdialog.cpp
|
||||
userpassdialog.cpp
|
||||
deleteconfirmationdialog.cpp
|
||||
lastfmimportdialog.cpp
|
||||
messagedialog.cpp
|
||||
snapdialog.cpp
|
||||
saveplaylistsdialog.cpp
|
||||
)
|
||||
|
||||
set(DIALOGS_HEADERS
|
||||
about.h
|
||||
errordialog.h
|
||||
console.h
|
||||
addstreamdialog.h
|
||||
userpassdialog.h
|
||||
deleteconfirmationdialog.h
|
||||
lastfmimportdialog.h
|
||||
messagedialog.h
|
||||
snapdialog.h
|
||||
saveplaylistsdialog.h
|
||||
)
|
||||
|
||||
set(DIALOGS_UI
|
||||
about.ui
|
||||
errordialog.ui
|
||||
console.ui
|
||||
addstreamdialog.ui
|
||||
userpassdialog.ui
|
||||
lastfmimportdialog.ui
|
||||
messagedialog.ui
|
||||
saveplaylistsdialog.ui
|
||||
)
|
||||
|
||||
qt_wrap_cpp(DIALOGS_SOURCES ${DIALOGS_HEADERS})
|
||||
qt_wrap_ui(DIALOGS_SOURCES ${DIALOGS_UI})
|
||||
|
||||
add_library(strawberry_dialogs STATIC ${DIALOGS_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_dialogs PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_dialogs PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
)
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
#include "ui_about.h"
|
||||
#include "dialogs/ui_about.h"
|
||||
|
||||
class QWidget;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <QUrl>
|
||||
#include <QLineEdit>
|
||||
|
||||
#include "ui_addstreamdialog.h"
|
||||
#include "dialogs/ui_addstreamdialog.h"
|
||||
|
||||
class AddStreamDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
|
||||
#include "ui_console.h"
|
||||
#include "dialogs/ui_console.h"
|
||||
|
||||
#include "includes/shared_ptr.h"
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
ErrorDialog::ErrorDialog(QWidget *parent)
|
||||
: QDialog(parent),
|
||||
parent_(parent),
|
||||
ui_(new Ui_ErrorDialog) {
|
||||
|
||||
ui_->setupUi(this);
|
||||
@@ -66,8 +67,11 @@ void ErrorDialog::ShowMessage(const QString &message) {
|
||||
UpdateContent();
|
||||
|
||||
show();
|
||||
raise();
|
||||
activateWindow();
|
||||
|
||||
if (parent_ && parent_->isMaximized()) {
|
||||
raise();
|
||||
activateWindow();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ class ErrorDialog : public QDialog {
|
||||
private:
|
||||
void UpdateContent();
|
||||
|
||||
QWidget *parent_;
|
||||
Ui_ErrorDialog *ui_;
|
||||
|
||||
QStringList current_messages_;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "includes/shared_ptr.h"
|
||||
|
||||
#include "ui_lastfmimportdialog.h"
|
||||
#include "dialogs/ui_lastfmimportdialog.h"
|
||||
|
||||
class QCloseEvent;
|
||||
class LastFMImport;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <QLineEdit>
|
||||
#include <QComboBox>
|
||||
|
||||
#include "ui_saveplaylistsdialog.h"
|
||||
#include "dialogs/ui_saveplaylistsdialog.h"
|
||||
|
||||
class SavePlaylistsDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
44
src/edittagdialog/CMakeLists.txt
Normal file
44
src/edittagdialog/CMakeLists.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
set(EDITTAGDIALOG_SOURCES
|
||||
edittagdialog.cpp
|
||||
trackselectiondialog.cpp
|
||||
)
|
||||
|
||||
set(EDITTAGDIALOG_HEADERS
|
||||
edittagdialog.h
|
||||
trackselectiondialog.h
|
||||
)
|
||||
|
||||
set(EDITTAGDIALOG_UI
|
||||
edittagdialog.ui
|
||||
trackselectiondialog.ui
|
||||
)
|
||||
|
||||
qt_wrap_cpp(EDITTAGDIALOG_SOURCES ${EDITTAGDIALOG_HEADERS})
|
||||
qt_wrap_ui(EDITTAGDIALOG_SOURCES ${EDITTAGDIALOG_UI})
|
||||
|
||||
add_library(strawberry_edittagdialog STATIC ${EDITTAGDIALOG_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_edittagdialog PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_edittagdialog PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_core
|
||||
strawberry_utilities
|
||||
strawberry_tagreader
|
||||
strawberry_covermanager
|
||||
strawberry_widgets
|
||||
strawberry_collection
|
||||
strawberry_lyrics
|
||||
)
|
||||
89
src/engine/CMakeLists.txt
Normal file
89
src/engine/CMakeLists.txt
Normal file
@@ -0,0 +1,89 @@
|
||||
set(ENGINE_SOURCES
|
||||
enginebase.cpp
|
||||
enginedevice.cpp
|
||||
devicefinders.cpp
|
||||
devicefinder.cpp
|
||||
gststartup.cpp
|
||||
gstengine.cpp
|
||||
gstenginepipeline.cpp
|
||||
)
|
||||
|
||||
set(ENGINE_HEADERS
|
||||
enginebase.h
|
||||
devicefinders.h
|
||||
gststartup.h
|
||||
gstengine.h
|
||||
gstenginepipeline.h
|
||||
)
|
||||
|
||||
if(HAVE_ALSA)
|
||||
list(APPEND ENGINE_SOURCES alsadevicefinder.cpp alsapcmdevicefinder.cpp)
|
||||
endif()
|
||||
|
||||
if(HAVE_PULSE)
|
||||
list(APPEND ENGINE_SOURCES pulsedevicefinder.cpp)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND ENGINE_SOURCES uwpdevicefinder.cpp asiodevicefinder.cpp)
|
||||
endif()
|
||||
|
||||
if(HAVE_SONGFINGERPRINTING OR HAVE_MUSICBRAINZ)
|
||||
list(APPEND ENGINE_SOURCES chromaprinter.cpp)
|
||||
endif()
|
||||
|
||||
if(HAVE_EBUR128)
|
||||
list(APPEND ENGINE_SOURCES ebur128analysis.cpp)
|
||||
endif()
|
||||
|
||||
if(HAVE_MOODBAR)
|
||||
list(APPEND ENGINE_SOURCES gstfastspectrumplugin.cpp gstfastspectrum.cpp)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND ENGINE_SOURCES macosdevicefinder.cpp)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND ENGINE_SOURCES directsounddevicefinder.cpp mmdevicefinder.cpp)
|
||||
endif()
|
||||
|
||||
qt_wrap_cpp(ENGINE_SOURCES ${ENGINE_HEADERS})
|
||||
|
||||
add_library(strawberry_engine STATIC ${ENGINE_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_engine PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_engine PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
$<$<BOOL:${HAVE_ALSA}>:ALSA::ALSA>
|
||||
$<$<BOOL:${HAVE_PULSE}>:PkgConfig::LIBPULSE>
|
||||
$<$<BOOL:${WIN32}>:dsound>
|
||||
$<$<BOOL:${MSVC}>:WindowsApp>
|
||||
PkgConfig::GSTREAMER
|
||||
PkgConfig::GSTREAMER_BASE
|
||||
PkgConfig::GSTREAMER_AUDIO
|
||||
PkgConfig::GSTREAMER_APP
|
||||
PkgConfig::GSTREAMER_TAG
|
||||
PkgConfig::GSTREAMER_PBUTILS
|
||||
$<$<BOOL:${HAVE_SONGFINGERPRINTING} OR ${HAVE_MUSICBRAINZ}>:PkgConfig::CHROMAPRINT>
|
||||
$<$<BOOL:${HAVE_EBUR128}>:PkgConfig::LIBEBUR128>
|
||||
$<$<BOOL:${HAVE_MOODBAR}>:PkgConfig::FFTW3>
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
strawberry_core
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(strawberry_engine PRIVATE
|
||||
"-framework CoreAudio"
|
||||
)
|
||||
endif()
|
||||
@@ -53,7 +53,7 @@ using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
DeviceFinders::DeviceFinders(QObject *parent) : QObject(parent) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class EngineBase : public QObject {
|
||||
|
||||
// Plays a media stream represented with the URL 'u' from the given 'beginning' to the given 'end' (usually from 0 to a song's length).
|
||||
// Both markers should be passed in nanoseconds. 'end' can be negative, indicating that the real length of 'u' stream is unknown.
|
||||
bool Play(const QUrl &media_url, const QUrl &stream_url, const bool pause, const TrackChangeFlags flags, const bool force_stop_at_end, const quint64 beginning_nanosec, const qint64 end_nanosec, const quint64 offset_nanosec, const std::optional<double> ebur128_integrated_loudness_lufs);
|
||||
bool Play(const QUrl &media_url, const QUrl &stream_url, const bool pause, const TrackChangeFlags flags, const bool force_stop_at_end, const quint64 beginning_offset_nanosec, const qint64 end_offset_nanosec, const quint64 offset_nanosec, const std::optional<double> ebur128_integrated_loudness_lufs);
|
||||
void SetVolume(const uint volume);
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
36
src/equalizer/CMakeLists.txt
Normal file
36
src/equalizer/CMakeLists.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
set(EQUALIZER_SOURCES
|
||||
equalizer.cpp
|
||||
equalizerslider.cpp
|
||||
)
|
||||
|
||||
set(EQUALIZER_HEADERS
|
||||
equalizer.h
|
||||
equalizerslider.h
|
||||
)
|
||||
|
||||
set(EQUALIZER_UI
|
||||
equalizer.ui
|
||||
equalizerslider.ui
|
||||
)
|
||||
|
||||
qt_wrap_cpp(EQUALIZER_SOURCES ${EQUALIZER_HEADERS})
|
||||
qt_wrap_ui(EQUALIZER_SOURCES ${EQUALIZER_UI})
|
||||
|
||||
add_library(strawberry_equalizer STATIC ${EQUALIZER_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_equalizer PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_equalizer PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_core
|
||||
strawberry_widgets
|
||||
)
|
||||
35
src/fileview/CMakeLists.txt
Normal file
35
src/fileview/CMakeLists.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
set(FILEVIEW_SOURCES
|
||||
fileview.cpp
|
||||
fileviewlist.cpp
|
||||
)
|
||||
|
||||
set(FILEVIEW_HEADERS
|
||||
fileview.h
|
||||
fileviewlist.h
|
||||
)
|
||||
|
||||
set(FILEVIEW_UI
|
||||
fileview.ui
|
||||
)
|
||||
|
||||
qt_wrap_cpp(FILEVIEW_SOURCES ${FILEVIEW_HEADERS})
|
||||
qt_wrap_ui(FILEVIEW_SOURCES ${FILEVIEW_UI})
|
||||
|
||||
add_library(strawberry_fileview STATIC ${FILEVIEW_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_fileview PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_fileview PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_mimedata
|
||||
strawberry_dialogs
|
||||
strawberry_organize
|
||||
)
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "core/filesystemmusicstorage.h"
|
||||
#include "core/iconloader.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/mimedata.h"
|
||||
#include "mimedata/mimedata.h"
|
||||
#include "dialogs/deleteconfirmationdialog.h"
|
||||
#include "fileview.h"
|
||||
#include "fileviewlist.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QtEvents>
|
||||
|
||||
#include "core/iconloader.h"
|
||||
#include "core/mimedata.h"
|
||||
#include "mimedata/mimedata.h"
|
||||
#include "utilities/filemanagerutils.h"
|
||||
#include "fileviewlist.h"
|
||||
|
||||
|
||||
52
src/filterparser/CMakeLists.txt
Normal file
52
src/filterparser/CMakeLists.txt
Normal file
@@ -0,0 +1,52 @@
|
||||
set(SOURCES
|
||||
filterparser.cpp
|
||||
filtertree.cpp
|
||||
filtertreeand.cpp
|
||||
filtertreecolumnterm.cpp
|
||||
filtertreenop.cpp
|
||||
filtertreenot.cpp
|
||||
filtertreeor.cpp
|
||||
filtertreeterm.cpp
|
||||
filterparserfloateqcomparator.cpp
|
||||
filterparserfloatgecomparator.cpp
|
||||
filterparserfloatgtcomparator.cpp
|
||||
filterparserfloatlecomparator.cpp
|
||||
filterparserfloatltcomparator.cpp
|
||||
filterparserfloatnecomparator.cpp
|
||||
filterparserint64eqcomparator.cpp
|
||||
filterparserint64gecomparator.cpp
|
||||
filterparserint64gtcomparator.cpp
|
||||
filterparserint64lecomparator.cpp
|
||||
filterparserint64ltcomparator.cpp
|
||||
filterparserint64necomparator.cpp
|
||||
filterparserinteqcomparator.cpp
|
||||
filterparserintgecomparator.cpp
|
||||
filterparserintgtcomparator.cpp
|
||||
filterparserintlecomparator.cpp
|
||||
filterparserintltcomparator.cpp
|
||||
filterparserintnecomparator.cpp
|
||||
filterparsersearchtermcomparator.cpp
|
||||
filterparsertextcontainscomparator.cpp
|
||||
filterparsertexteqcomparator.cpp
|
||||
filterparsertextnecomparator.cpp
|
||||
filterparseruinteqcomparator.cpp
|
||||
filterparseruintgecomparator.cpp
|
||||
filterparseruintgtcomparator.cpp
|
||||
filterparseruintlecomparator.cpp
|
||||
filterparseruintltcomparator.cpp
|
||||
filterparseruintnecomparator.cpp
|
||||
)
|
||||
|
||||
add_library(strawberry_filterparser STATIC ${SOURCES})
|
||||
|
||||
target_include_directories(strawberry_filterparser PRIVATE
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_filterparser PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
)
|
||||
64
src/globalshortcuts/CMakeLists.txt
Normal file
64
src/globalshortcuts/CMakeLists.txt
Normal file
@@ -0,0 +1,64 @@
|
||||
set(GLOBALSHORTCUTS_SOURCES globalshortcutsmanager.cpp globalshortcutsbackend.cpp globalshortcutgrabber.cpp)
|
||||
set(GLOBALSHORTCUTS_HEADERS globalshortcutsmanager.h globalshortcutsbackend.h globalshortcutgrabber.h)
|
||||
set(GLOBALSHORTCUTS_UI globalshortcutgrabber.ui)
|
||||
|
||||
if(HAVE_KDE_GLOBALSHORTCUTS)
|
||||
list(APPEND GLOBALSHORTCUTS_SOURCES globalshortcutsbackend-kde.cpp globalshortcutsbackend-gnome.cpp globalshortcutsbackend-mate.cpp)
|
||||
list(APPEND GLOBALSHORTCUTS_HEADERS globalshortcutsbackend-kde.h globalshortcutsbackend-gnome.h globalshortcutsbackend-mate.h)
|
||||
endif()
|
||||
|
||||
if(HAVE_X11_GLOBALSHORTCUTS)
|
||||
list(APPEND GLOBALSHORTCUTS_SOURCES globalshortcutsbackend-x11.cpp globalshortcut.cpp globalshortcut-x11.cpp)
|
||||
list(APPEND GLOBALSHORTCUTS_HEADERS globalshortcutsbackend-x11.h globalshortcut.h)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND GLOBALSHORTCUTS_SOURCES globalshortcutsbackend-macos.mm globalshortcutgrabber.mm)
|
||||
list(APPEND GLOBALSHORTCUTS_HEADERS globalshortcutsbackend-macos.h globalshortcutgrabber.h)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND GLOBALSHORTCUTS_SOURCES globalshortcutsbackend-win.cpp globalshortcut.cpp globalshortcut-win.cpp)
|
||||
list(APPEND GLOBALSHORTCUTS_HEADERS globalshortcutsbackend-win.h globalshortcut.h)
|
||||
endif()
|
||||
|
||||
if(HAVE_KDE_GLOBALSHORTCUTS)
|
||||
qt_add_dbus_interface(GLOBALSHORTCUTS_SOURCES org.kde.KGlobalAccel.xml kglobalaccel)
|
||||
qt_add_dbus_interface(GLOBALSHORTCUTS_SOURCES org.kde.KGlobalAccel.Component.xml kglobalaccelcomponent)
|
||||
endif()
|
||||
|
||||
if(HAVE_GNOME_GLOBALSHORTCUTS)
|
||||
qt_add_dbus_interface(GLOBALSHORTCUTS_SOURCES org.gnome.SettingsDaemon.MediaKeys.xml gnomesettingsdaemon)
|
||||
endif()
|
||||
|
||||
if(HAVE_MATE_GLOBALSHORTCUTS)
|
||||
qt_add_dbus_interface(GLOBALSHORTCUTS_SOURCES org.mate.SettingsDaemon.MediaKeys.xml matesettingsdaemon)
|
||||
endif()
|
||||
|
||||
qt_wrap_cpp(GLOBALSHORTCUTS_SOURCES ${GLOBALSHORTCUTS_HEADERS})
|
||||
qt_wrap_ui(GLOBALSHORTCUTS_SOURCES ${GLOBALSHORTCUTS_UI})
|
||||
|
||||
add_library(strawberry_globalshortcuts STATIC ${GLOBALSHORTCUTS_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_globalshortcuts PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_globalshortcuts PRIVATE
|
||||
$<$<BOOL:${HAVE_X11_GLOBALSHORTCUTS}>:X11::X11_xcb>
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
$<$<BOOL:${HAVE_DBUS}>:Qt${QT_VERSION_MAJOR}::DBus>
|
||||
strawberry_core
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(strawberry_globalshortcuts PRIVATE
|
||||
"-framework ScriptingBridge"
|
||||
strawberry_macstartup
|
||||
)
|
||||
endif()
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include "globalshortcutgrabber.h"
|
||||
#include "ui_globalshortcutgrabber.h"
|
||||
#include "globalshortcuts/ui_globalshortcutgrabber.h"
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <QKeySequence>
|
||||
|
||||
#import "core/mac_startup.h"
|
||||
#import "macstartup/mac_startup.h"
|
||||
|
||||
class MacMonitorWrapper {
|
||||
public:
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
#include "globalshortcutsbackend-kglobalaccel.h"
|
||||
|
||||
#include "kglobalaccel.h"
|
||||
#include "kglobalaccelcomponent.h"
|
||||
#include "globalshortcuts/kglobalaccel.h"
|
||||
#include "globalshortcuts/kglobalaccelcomponent.h"
|
||||
|
||||
using namespace Qt::Literals::StringLiterals;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#include "globalshortcutsmanager.h"
|
||||
#include "core/logging.h"
|
||||
#include "core/mac_startup.h"
|
||||
#include "macstartup/mac_startup.h"
|
||||
|
||||
#import "includes/SBSystemPreferences.h"
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ class Lazy {
|
||||
|
||||
T* operator->() const { return get(); }
|
||||
|
||||
// Returns true if the object is not yet initialized.
|
||||
explicit operator bool() const { return ptr_; }
|
||||
// Returns true if the object is initialized.
|
||||
explicit operator bool() const { return ptr_ != nullptr; }
|
||||
|
||||
// Deletes the underlying object and will re-run the initialization function if the object is requested again.
|
||||
void reset() { ptr_.reset(); }
|
||||
|
||||
60
src/lyrics/CMakeLists.txt
Normal file
60
src/lyrics/CMakeLists.txt
Normal file
@@ -0,0 +1,60 @@
|
||||
set(LYRICS_SOURCES
|
||||
lyricsproviders.cpp
|
||||
lyricsprovider.cpp
|
||||
lyricssearchrequest.h
|
||||
lyricssearchresult.h
|
||||
lyricsfetcher.cpp
|
||||
lyricsfetchersearch.cpp
|
||||
jsonlyricsprovider.cpp
|
||||
htmllyricsprovider.cpp
|
||||
ovhlyricsprovider.cpp
|
||||
lololyricsprovider.cpp
|
||||
geniuslyricsprovider.cpp
|
||||
musixmatchlyricsprovider.cpp
|
||||
chartlyricsprovider.cpp
|
||||
songlyricscomlyricsprovider.cpp
|
||||
azlyricscomlyricsprovider.cpp
|
||||
elyricsnetlyricsprovider.cpp
|
||||
letraslyricsprovider.cpp
|
||||
lyricfindlyricsprovider.cpp
|
||||
)
|
||||
|
||||
set(LYRICS_HEADERS
|
||||
lyricsproviders.h
|
||||
lyricsprovider.h
|
||||
lyricsfetcher.h
|
||||
lyricsfetchersearch.h
|
||||
jsonlyricsprovider.h
|
||||
htmllyricsprovider.h
|
||||
ovhlyricsprovider.h
|
||||
lololyricsprovider.h
|
||||
geniuslyricsprovider.h
|
||||
musixmatchlyricsprovider.h
|
||||
chartlyricsprovider.h
|
||||
songlyricscomlyricsprovider.h
|
||||
azlyricscomlyricsprovider.h
|
||||
elyricsnetlyricsprovider.h
|
||||
letraslyricsprovider.h
|
||||
lyricfindlyricsprovider.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(LYRICS_SOURCES ${LYRICS_HEADERS})
|
||||
|
||||
add_library(strawberry_lyrics STATIC ${LYRICS_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_lyrics PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_lyrics PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_providers
|
||||
)
|
||||
@@ -44,7 +44,7 @@ using std::make_shared;
|
||||
|
||||
LyricsProviders::LyricsProviders(QObject *parent) : QObject(parent), thread_(new QThread(this)), network_(make_shared<NetworkAccessManager>()) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
thread_->setObjectName(objectName());
|
||||
network_->moveToThread(thread_);
|
||||
thread_->start();
|
||||
|
||||
22
src/macstartup/CMakeLists.txt
Normal file
22
src/macstartup/CMakeLists.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
set(MACSTARTUP_SOURCES mac_startup.mm)
|
||||
|
||||
add_library(strawberry_macstartup STATIC ${MACSTARTUP_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_macstartup PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_macstartup PRIVATE
|
||||
"-framework Foundation"
|
||||
"-framework AppKit"
|
||||
"-framework IOKit"
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
SPMediaKeyTap
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_globalshortcuts
|
||||
)
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "core/database.h"
|
||||
#include "core/taskmanager.h"
|
||||
#include "core/networkaccessmanager.h"
|
||||
#include "core/player.h"
|
||||
#include "player/player.h"
|
||||
#include "tagreader/tagreaderclient.h"
|
||||
#include "engine/devicefinders.h"
|
||||
#include "core/urlhandlers.h"
|
||||
@@ -250,7 +250,7 @@ Application::Application(QObject *parent)
|
||||
p_(new ApplicationImpl(this)),
|
||||
g_thread_(nullptr) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
const QMetaObject *mo = QAbstractEventDispatcher::instance(QCoreApplication::instance()->thread())->metaObject();
|
||||
if (mo && strcmp(mo->className(), "QEventDispatcherGlib") != 0 && strcmp(mo->superClass()->className(), "QEventDispatcherGlib") != 0) {
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
# include "utilities/macosutils.h"
|
||||
# include "core/mac_startup.h"
|
||||
# include "macstartup/mac_startup.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MPRIS2
|
||||
@@ -93,9 +93,9 @@
|
||||
#include "core/commandlineoptions.h"
|
||||
#include "core/networkproxyfactory.h"
|
||||
|
||||
#include "core/application.h"
|
||||
#include "core/metatypes.h"
|
||||
#include "core/mainwindow.h"
|
||||
#include "main/application.h"
|
||||
#include "main/metatypes.h"
|
||||
#include "main/mainwindow.h"
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
# include "systemtrayicon/macsystemtrayicon.h"
|
||||
@@ -104,7 +104,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TRANSLATIONS
|
||||
# include "core/translations.h"
|
||||
# include "main/translations.h"
|
||||
#endif
|
||||
|
||||
#include "constants/behavioursettings.h"
|
||||
@@ -89,7 +89,7 @@
|
||||
#include "constants/mainwindowsettings.h"
|
||||
#include "includes/shared_ptr.h"
|
||||
#include "core/commandlineoptions.h"
|
||||
#include "core/mimedata.h"
|
||||
#include "mimedata/mimedata.h"
|
||||
#include "core/iconloader.h"
|
||||
#include "core/taskmanager.h"
|
||||
#include "core/song.h"
|
||||
@@ -100,10 +100,10 @@
|
||||
#include "core/filesystemmusicstorage.h"
|
||||
#include "core/deletefiles.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/player.h"
|
||||
#include "utilities/envutils.h"
|
||||
#include "utilities/filemanagerutils.h"
|
||||
#include "utilities/screenutils.h"
|
||||
#include "player/player.h"
|
||||
#include "engine/enginebase.h"
|
||||
#include "dialogs/errordialog.h"
|
||||
#include "dialogs/about.h"
|
||||
@@ -112,8 +112,8 @@
|
||||
#include "dialogs/deleteconfirmationdialog.h"
|
||||
#include "dialogs/lastfmimportdialog.h"
|
||||
#include "dialogs/snapdialog.h"
|
||||
#include "dialogs/edittagdialog.h"
|
||||
#include "dialogs/trackselectiondialog.h"
|
||||
#include "edittagdialog/edittagdialog.h"
|
||||
#include "edittagdialog/trackselectiondialog.h"
|
||||
#include "organize/organizedialog.h"
|
||||
#include "widgets/fancytabwidget.h"
|
||||
#include "widgets/playingwidget.h"
|
||||
@@ -213,7 +213,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
# include "core/mac_startup.h"
|
||||
# include "macstartup/mac_startup.h"
|
||||
# include "systemtrayicon/macsystemtrayicon.h"
|
||||
# include "utilities/macosutils.h"
|
||||
#else
|
||||
@@ -1666,6 +1666,11 @@ void MainWindow::StopAfterCurrent() {
|
||||
|
||||
void MainWindow::showEvent(QShowEvent *e) {
|
||||
|
||||
if (error_dialog_ && error_dialog_->isVisible() && error_dialog_->isMinimized()) {
|
||||
error_dialog_->raise();
|
||||
error_dialog_->activateWindow();
|
||||
}
|
||||
|
||||
QMainWindow::showEvent(e);
|
||||
|
||||
}
|
||||
@@ -1695,7 +1700,12 @@ void MainWindow::closeEvent(QCloseEvent *e) {
|
||||
void MainWindow::SetHiddenInTray(const bool hidden) {
|
||||
|
||||
if (hidden && isVisible()) {
|
||||
close();
|
||||
if (tray_icon_->IsSystemTrayAvailable() && tray_icon_->isVisible() && keep_running_) {
|
||||
close();
|
||||
}
|
||||
else {
|
||||
showMinimized();
|
||||
}
|
||||
}
|
||||
else if (!hidden && isHidden()) {
|
||||
if (was_minimized_) {
|
||||
27
src/mimedata/CMakeLists.txt
Normal file
27
src/mimedata/CMakeLists.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
set(MIMEDATA_SOURCES
|
||||
mimedata.cpp
|
||||
songmimedata.cpp
|
||||
)
|
||||
|
||||
set(MIMEDATA_HEADERS
|
||||
mimedata.h
|
||||
songmimedata.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(MIMEDATA_SOURCES ${MIMEDATA_HEADERS})
|
||||
|
||||
add_library(strawberry_mimedata STATIC ${MIMEDATA_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_mimedata PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_mimedata PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
strawberry_core
|
||||
strawberry_collection
|
||||
)
|
||||
44
src/moodbar/CMakeLists.txt
Normal file
44
src/moodbar/CMakeLists.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
set(MOODBAR_SOURCES
|
||||
moodbarbuilder.cpp
|
||||
moodbarcontroller.cpp
|
||||
moodbaritemdelegate.cpp
|
||||
moodbarloader.cpp
|
||||
moodbarpipeline.cpp
|
||||
moodbarproxystyle.cpp
|
||||
moodbarrenderer.cpp
|
||||
)
|
||||
|
||||
set(MOODBAR_HEADERS
|
||||
moodbarcontroller.h
|
||||
moodbaritemdelegate.h
|
||||
moodbarloader.h
|
||||
moodbarpipeline.h
|
||||
moodbarproxystyle.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(MOODBAR_SOURCES ${MOODBAR_HEADERS})
|
||||
|
||||
add_library(strawberry_moodbar STATIC ${MOODBAR_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_moodbar PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_moodbar PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::GSTREAMER
|
||||
PkgConfig::GSTREAMER_BASE
|
||||
PkgConfig::GSTREAMER_AUDIO
|
||||
PkgConfig::GSTREAMER_APP
|
||||
PkgConfig::GSTREAMER_TAG
|
||||
PkgConfig::GSTREAMER_PBUTILS
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
)
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "includes/shared_ptr.h"
|
||||
#include "core/song.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/player.h"
|
||||
#include "player/player.h"
|
||||
#include "engine/enginebase.h"
|
||||
#include "constants/moodbarsettings.h"
|
||||
|
||||
|
||||
@@ -119,7 +119,6 @@ QPixmap MoodbarItemDelegate::PixmapForIndex(const QModelIndex &idx, const QSize
|
||||
data = new Data;
|
||||
if (!data_.insert(url, data)) {
|
||||
qLog(Error) << "Could not insert moodbar data for URL" << url << "into cache";
|
||||
delete data;
|
||||
return QPixmap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ MoodbarLoader::MoodbarLoader(QObject *parent)
|
||||
kMaxActiveRequests(qMax(1, QThread::idealThreadCount() / 2)),
|
||||
save_(false) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
thread_->setObjectName(objectName());
|
||||
|
||||
cache_->setCacheDirectory(StandardPaths::WritableLocation(StandardPaths::StandardLocation::CacheLocation) + u"/moodbar"_s);
|
||||
|
||||
33
src/mpris2/CMakeLists.txt
Normal file
33
src/mpris2/CMakeLists.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
set(MPRIS2_SOURCES
|
||||
mpris2.cpp
|
||||
)
|
||||
|
||||
set(MPRIS2_HEADERS
|
||||
mpris2.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(MPRIS2_SOURCES ${MPRIS2_HEADERS})
|
||||
|
||||
qt_add_dbus_adaptor(MPRIS2_SOURCES org.mpris.MediaPlayer2.xml mpris2.h mpris::Mpris2 mpris2_root Mpris2Root)
|
||||
qt_add_dbus_adaptor(MPRIS2_SOURCES org.mpris.MediaPlayer2.Player.xml mpris2.h mpris::Mpris2 mpris2_player Mpris2Player)
|
||||
qt_add_dbus_adaptor(MPRIS2_SOURCES org.mpris.MediaPlayer2.TrackList.xml mpris2.h mpris::Mpris2 mpris2_tracklist Mpris2TrackList)
|
||||
qt_add_dbus_adaptor(MPRIS2_SOURCES org.mpris.MediaPlayer2.Playlists.xml mpris2.h mpris::Mpris2 mpris2_playlists Mpris2Playlists)
|
||||
|
||||
add_library(strawberry_mpris2 STATIC ${MPRIS2_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_mpris2 PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_mpris2 PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::DBus
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_core
|
||||
strawberry_engine
|
||||
strawberry_player
|
||||
)
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include "constants/timeconstants.h"
|
||||
#include "core/song.h"
|
||||
#include "core/player.h"
|
||||
#include "player/player.h"
|
||||
#include "engine/enginebase.h"
|
||||
#include "playlist/playlist.h"
|
||||
#include "playlist/playlistitem.h"
|
||||
|
||||
40
src/musicbrainz/CMakeLists.txt
Normal file
40
src/musicbrainz/CMakeLists.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
set(MUSICBRAINZ_SOURCES
|
||||
acoustidclient.cpp
|
||||
musicbrainzclient.cpp
|
||||
tagfetcher.cpp
|
||||
)
|
||||
|
||||
set(MUSICBRAINZ_HEADERS
|
||||
acoustidclient.h
|
||||
musicbrainzclient.h
|
||||
tagfetcher.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(MUSICBRAINZ_SOURCES ${MUSICBRAINZ_HEADERS})
|
||||
|
||||
add_library(strawberry_musicbrainz STATIC ${MUSICBRAINZ_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_musicbrainz PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_musicbrainz PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::GSTREAMER
|
||||
PkgConfig::GSTREAMER_BASE
|
||||
PkgConfig::GSTREAMER_AUDIO
|
||||
PkgConfig::GSTREAMER_APP
|
||||
PkgConfig::GSTREAMER_TAG
|
||||
PkgConfig::GSTREAMER_PBUTILS
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_engine
|
||||
)
|
||||
55
src/organize/CMakeLists.txt
Normal file
55
src/organize/CMakeLists.txt
Normal file
@@ -0,0 +1,55 @@
|
||||
set(ORGANIZE_SOURCES
|
||||
organize.cpp
|
||||
organizeformat.cpp
|
||||
organizeformatvalidator.cpp
|
||||
organizesyntaxhighlighter.cpp
|
||||
organizedialog.cpp
|
||||
organizeerrordialog.cpp
|
||||
)
|
||||
|
||||
set(ORGANIZE_HEADERS
|
||||
organize.h
|
||||
organizeformatvalidator.h
|
||||
organizesyntaxhighlighter.h
|
||||
organizedialog.h
|
||||
organizeerrordialog.h
|
||||
)
|
||||
|
||||
set(ORGANIZE_UI
|
||||
organizedialog.ui
|
||||
organizeerrordialog.ui
|
||||
)
|
||||
|
||||
qt_wrap_cpp(ORGANIZE_SOURCES ${ORGANIZE_HEADERS})
|
||||
qt_wrap_ui(ORGANIZE_SOURCES ${ORGANIZE_UI})
|
||||
|
||||
add_library(strawberry_organize STATIC ${ORGANIZE_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_organize PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_organize PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::GSTREAMER
|
||||
PkgConfig::GSTREAMER_BASE
|
||||
PkgConfig::GSTREAMER_AUDIO
|
||||
PkgConfig::GSTREAMER_APP
|
||||
PkgConfig::GSTREAMER_TAG
|
||||
PkgConfig::GSTREAMER_PBUTILS
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_tagreader
|
||||
strawberry_widgets
|
||||
strawberry_collection
|
||||
)
|
||||
46
src/osd/CMakeLists.txt
Normal file
46
src/osd/CMakeLists.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
set(OSD_SOURCES osdbase.cpp osdpretty.cpp)
|
||||
set(OSD_HEADERS osdbase.h osdpretty.h)
|
||||
set(OSD_UI osdpretty.ui)
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND OSD_SOURCES osdmac.mm)
|
||||
list(APPEND OSD_HEADERS osdmac.h)
|
||||
endif()
|
||||
|
||||
if(HAVE_DBUS)
|
||||
list(APPEND OSD_SOURCES osddbus.cpp)
|
||||
list(APPEND OSD_HEADERS osddbus.h)
|
||||
qt_add_dbus_interface(OSD_SOURCES org.freedesktop.Notifications.xml notification)
|
||||
endif()
|
||||
|
||||
qt_wrap_cpp(OSD_SOURCES ${OSD_HEADERS})
|
||||
qt_wrap_ui(OSD_SOURCES ${OSD_UI})
|
||||
|
||||
add_library(strawberry_osd STATIC ${OSD_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_osd PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
if(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
||||
target_include_directories(strawberry_osd SYSTEM PRIVATE ${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
target_link_libraries(strawberry_osd PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::SQLITE
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
$<$<BOOL:${HAVE_DBUS}>:Qt${QT_VERSION_MAJOR}::DBus>
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_systemtrayicon
|
||||
)
|
||||
@@ -59,7 +59,7 @@
|
||||
#include "constants/notificationssettings.h"
|
||||
|
||||
#include "osdpretty.h"
|
||||
#include "ui_osdpretty.h"
|
||||
#include "osd/ui_osdpretty.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
# include <windows.h>
|
||||
|
||||
42
src/player/CMakeLists.txt
Normal file
42
src/player/CMakeLists.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
set(PLAYER_SOURCES
|
||||
playerinterface.cpp
|
||||
player.cpp
|
||||
)
|
||||
|
||||
set(PLAYER_HEADERS
|
||||
playerinterface.h
|
||||
player.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(PLAYER_SOURCES ${PLAYER_HEADERS})
|
||||
|
||||
add_library(strawberry_player STATIC ${PLAYER_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_player PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_player PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::GSTREAMER
|
||||
PkgConfig::GSTREAMER_BASE
|
||||
PkgConfig::GSTREAMER_AUDIO
|
||||
PkgConfig::GSTREAMER_APP
|
||||
PkgConfig::GSTREAMER_TAG
|
||||
PkgConfig::GSTREAMER_PBUTILS
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_core
|
||||
strawberry_engine
|
||||
strawberry_collection
|
||||
strawberry_playlist
|
||||
strawberry_equalizer
|
||||
strawberry_analyzer
|
||||
)
|
||||
@@ -99,7 +99,7 @@ Player::Player(const SharedPtr<TaskManager> task_manager, const SharedPtr<UrlHan
|
||||
volume_increment_(5),
|
||||
play_offset_nanosec_(0) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
timer_save_volume_->setSingleShot(true);
|
||||
timer_save_volume_->setInterval(5s);
|
||||
110
src/playlist/CMakeLists.txt
Normal file
110
src/playlist/CMakeLists.txt
Normal file
@@ -0,0 +1,110 @@
|
||||
set(PLAYLIST_SOURCES
|
||||
playlist.cpp
|
||||
playlistbackend.cpp
|
||||
playlistcontainer.cpp
|
||||
playlistdelegates.cpp
|
||||
playlistfilter.cpp
|
||||
playlistheader.cpp
|
||||
playlistitem.cpp
|
||||
playlistitemmimedata.cpp
|
||||
playlistlistcontainer.cpp
|
||||
playlistlistmodel.cpp
|
||||
playlistlistsortfiltermodel.cpp
|
||||
playlistlistview.cpp
|
||||
playlistmanagerinterface.cpp
|
||||
playlistmanager.cpp
|
||||
playlistsaveoptionsdialog.cpp
|
||||
playlistsequence.cpp
|
||||
playlisttabbar.cpp
|
||||
playlistview.cpp
|
||||
playlistproxystyle.cpp
|
||||
songloaderinserter.cpp
|
||||
songplaylistitem.cpp
|
||||
dynamicplaylistcontrols.cpp
|
||||
playlistundocommandbase.cpp
|
||||
playlistundocommandinsertitems.cpp
|
||||
playlistundocommandremoveitems.cpp
|
||||
playlistundocommandmoveitems.cpp
|
||||
playlistundocommandreorderitems.cpp
|
||||
playlistundocommandsortitems.cpp
|
||||
playlistundocommandshuffleitems.cpp
|
||||
)
|
||||
|
||||
set(PLAYLIST_HEADERS
|
||||
playlist.h
|
||||
playlistbackend.h
|
||||
playlistcontainer.h
|
||||
playlistdelegates.h
|
||||
playlistfilter.h
|
||||
playlistheader.h
|
||||
playlistlistcontainer.h
|
||||
playlistlistmodel.h
|
||||
playlistlistview.h
|
||||
playlistlistsortfiltermodel.h
|
||||
playlistmanagerinterface.h
|
||||
playlistmanager.h
|
||||
playlistsaveoptionsdialog.h
|
||||
playlistsequence.h
|
||||
playlisttabbar.h
|
||||
playlistview.h
|
||||
playlistproxystyle.h
|
||||
playlistitemmimedata.h
|
||||
songloaderinserter.h
|
||||
dynamicplaylistcontrols.h
|
||||
)
|
||||
|
||||
set(PLAYLIST_UI
|
||||
playlistcontainer.ui
|
||||
playlistlistcontainer.ui
|
||||
playlistsaveoptionsdialog.ui
|
||||
playlistsequence.ui
|
||||
dynamicplaylistcontrols.ui
|
||||
)
|
||||
|
||||
qt_wrap_cpp(PLAYLIST_SOURCES ${PLAYLIST_HEADERS})
|
||||
qt_wrap_ui(PLAYLIST_SOURCES ${PLAYLIST_UI})
|
||||
|
||||
add_library(strawberry_playlist STATIC ${PLAYLIST_SOURCES})
|
||||
|
||||
target_include_directories(strawberry_playlist PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
)
|
||||
|
||||
target_link_libraries(strawberry_playlist PRIVATE
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GOBJECT
|
||||
PkgConfig::GSTREAMER
|
||||
PkgConfig::GSTREAMER_BASE
|
||||
PkgConfig::GSTREAMER_AUDIO
|
||||
PkgConfig::GSTREAMER_APP
|
||||
PkgConfig::GSTREAMER_TAG
|
||||
PkgConfig::GSTREAMER_PBUTILS
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Concurrent
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
Qt${QT_VERSION_MAJOR}::Sql
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
strawberry_utilities
|
||||
strawberry_core
|
||||
strawberry_mimedata
|
||||
strawberry_songloader
|
||||
strawberry_tagreader
|
||||
strawberry_collection
|
||||
strawberry_dialogs
|
||||
strawberry_queue
|
||||
strawberry_filterparser
|
||||
strawberry_covermanager
|
||||
strawberry_widgets
|
||||
strawberry_player
|
||||
strawberry_smartplaylists
|
||||
strawberry_radios
|
||||
strawberry_device
|
||||
)
|
||||
|
||||
if(HAVE_MOODBAR)
|
||||
target_link_libraries(strawberry_playlist PRIVATE strawberry_moodbar)
|
||||
endif()
|
||||
@@ -60,10 +60,10 @@
|
||||
|
||||
#include "includes/shared_ptr.h"
|
||||
#include "core/logging.h"
|
||||
#include "core/mimedata.h"
|
||||
#include "mimedata/mimedata.h"
|
||||
#include "core/song.h"
|
||||
#include "core/settings.h"
|
||||
#include "core/songmimedata.h"
|
||||
#include "mimedata/songmimedata.h"
|
||||
#include "constants/timeconstants.h"
|
||||
#include "constants/playlistsettings.h"
|
||||
#include "tagreader/tagreaderclient.h"
|
||||
@@ -859,7 +859,7 @@ bool Playlist::dropMimeData(const QMimeData *data, Qt::DropAction action, const
|
||||
qint64 own_pid = QCoreApplication::applicationPid();
|
||||
|
||||
QDataStream stream(data->data(QLatin1String(kRowsMimetype)));
|
||||
stream.readRawData(reinterpret_cast<char*>(&source_playlist), sizeof(source_playlist)); // NOLINT(bugprone-sizeof-expression)
|
||||
stream.readRawData(reinterpret_cast<char*>(&source_playlist), sizeof(&source_playlist));
|
||||
stream >> source_rows;
|
||||
if (!stream.atEnd()) {
|
||||
stream.readRawData(reinterpret_cast<char*>(&pid), sizeof(pid));
|
||||
@@ -1318,7 +1318,7 @@ QMimeData *Playlist::mimeData(const QModelIndexList &indexes) const {
|
||||
const Playlist *self = this;
|
||||
const qint64 pid = QCoreApplication::applicationPid();
|
||||
|
||||
stream.writeRawData(reinterpret_cast<char*>(&self), sizeof(self)); // NOLINT(bugprone-sizeof-expression)
|
||||
stream.writeRawData(reinterpret_cast<char*>(&self), sizeof(&self));
|
||||
stream << rows;
|
||||
stream.writeRawData(reinterpret_cast<const char*>(&pid), sizeof(pid));
|
||||
buffer.close();
|
||||
|
||||
@@ -69,7 +69,7 @@ PlaylistBackend::PlaylistBackend(const SharedPtr<Database> database,
|
||||
collection_backend_(collection_backend),
|
||||
original_thread_(nullptr) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "core/mimedata.h"
|
||||
#include "mimedata/mimedata.h"
|
||||
#include "playlistitem.h"
|
||||
|
||||
class PlaylistItemMimeData : public MimeData {
|
||||
|
||||
@@ -84,7 +84,7 @@ PlaylistManager::PlaylistManager(const SharedPtr<TaskManager> task_manager,
|
||||
active_(-1),
|
||||
playlists_loading_(0) {
|
||||
|
||||
setObjectName(QLatin1String(metaObject()->className()));
|
||||
setObjectName(QLatin1String(QObject::metaObject()->className()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "includes/shared_ptr.h"
|
||||
#include "core/logging.h"
|
||||
#include "core/iconloader.h"
|
||||
#include "core/mimedata.h"
|
||||
#include "mimedata/mimedata.h"
|
||||
#include "core/settings.h"
|
||||
#include "widgets/favoritewidget.h"
|
||||
#include "widgets/renametablineedit.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user