Add volume slider, time played widget, and pause/play on album art click
This commit is contained in:
@@ -13,6 +13,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
src/components/albumTile/albumtile.cpp \
|
src/components/albumTile/albumtile.cpp \
|
||||||
src/components/spinningAlbumArt/spinningalbumart.cpp \
|
src/components/spinningAlbumArt/spinningalbumart.cpp \
|
||||||
|
src/components/timePlayedWidget/timePlayedWidget.cpp \
|
||||||
src/components/tracklistWidget/tracklistwidget.cpp \
|
src/components/tracklistWidget/tracklistwidget.cpp \
|
||||||
src/main.cpp \
|
src/main.cpp \
|
||||||
src/windows/musicSelector/musicSelector.cpp \
|
src/windows/musicSelector/musicSelector.cpp \
|
||||||
@@ -26,6 +27,7 @@ SOURCES += \
|
|||||||
HEADERS += \
|
HEADERS += \
|
||||||
src/components/albumTile/albumtile.h \
|
src/components/albumTile/albumtile.h \
|
||||||
src/components/spinningAlbumArt/spinningalbumart.h \
|
src/components/spinningAlbumArt/spinningalbumart.h \
|
||||||
|
src/components/timePlayedWidget/timePlayedWidget.h \
|
||||||
src/components/tracklistWidget/tracklistwidget.h \
|
src/components/tracklistWidget/tracklistwidget.h \
|
||||||
src/data/cleanerScripts.h \
|
src/data/cleanerScripts.h \
|
||||||
src/windows/musicSelector/musicSelector.h \
|
src/windows/musicSelector/musicSelector.h \
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Generated by qmake (3.1) (Qt 6.9.3)
|
# Generated by qmake (3.1) (Qt 6.9.3)
|
||||||
# Project: ../../Music-Player.pro
|
# Project: ../../Music-Player.pro
|
||||||
# Template: app
|
# Template: app
|
||||||
# Command: /opt/homebrew/Cellar/qtbase/6.9.3/bin/qmake -o Makefile ../../Music-Player.pro -spec macx-clang CONFIG+=debug CONFIG+=qml_debug
|
# Command: /opt/homebrew/opt/qtbase/bin/qmake -o Makefile ../../Music-Player.pro -spec macx-clang CONFIG+=debug CONFIG+=qml_debug
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
MAKEFILE = Makefile
|
MAKEFILE = Makefile
|
||||||
@@ -18,7 +18,7 @@ DEFINES = -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB
|
|||||||
CFLAGS = -pipe -g $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=14.0 -Wall -Wextra $(DEFINES)
|
CFLAGS = -pipe -g $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=14.0 -Wall -Wextra $(DEFINES)
|
||||||
CXXFLAGS = -pipe -stdlib=libc++ -g -std=gnu++1z $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=14.0 -Wall -Wextra $(DEFINES)
|
CXXFLAGS = -pipe -stdlib=libc++ -g -std=gnu++1z $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=14.0 -Wall -Wextra $(DEFINES)
|
||||||
INCPATH = -I../../../Qt-Music-Player -I. -I/opt/homebrew/lib/QtWidgets.framework/Headers -I/opt/homebrew/lib/QtMultimedia.framework/Headers -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtNetwork.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/opt/homebrew/share/qt/mkspecs/macx-clang -F/opt/homebrew/lib
|
INCPATH = -I../../../Qt-Music-Player -I. -I/opt/homebrew/lib/QtWidgets.framework/Headers -I/opt/homebrew/lib/QtMultimedia.framework/Headers -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtNetwork.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/opt/homebrew/share/qt/mkspecs/macx-clang -F/opt/homebrew/lib
|
||||||
QMAKE = /opt/homebrew/Cellar/qtbase/6.9.3/bin/qmake
|
QMAKE = /opt/homebrew/opt/qtbase/bin/qmake
|
||||||
DEL_FILE = rm -f
|
DEL_FILE = rm -f
|
||||||
CHK_DIR_EXISTS= test -d
|
CHK_DIR_EXISTS= test -d
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
@@ -28,8 +28,8 @@ COPY_DIR = cp -f -R
|
|||||||
INSTALL_FILE = install -m 644 -p
|
INSTALL_FILE = install -m 644 -p
|
||||||
INSTALL_PROGRAM = install -m 755 -p
|
INSTALL_PROGRAM = install -m 755 -p
|
||||||
INSTALL_DIR = cp -f -R
|
INSTALL_DIR = cp -f -R
|
||||||
QINSTALL = /opt/homebrew/Cellar/qtbase/6.9.3/bin/qmake -install qinstall
|
QINSTALL = /opt/homebrew/opt/qtbase/bin/qmake -install qinstall
|
||||||
QINSTALL_PROGRAM = /opt/homebrew/Cellar/qtbase/6.9.3/bin/qmake -install qinstall -exe
|
QINSTALL_PROGRAM = /opt/homebrew/opt/qtbase/bin/qmake -install qinstall -exe
|
||||||
DEL_FILE = rm -f
|
DEL_FILE = rm -f
|
||||||
SYMLINK = ln -f -s
|
SYMLINK = ln -f -s
|
||||||
DEL_DIR = rmdir
|
DEL_DIR = rmdir
|
||||||
@@ -54,6 +54,7 @@ OBJECTS_DIR = ./
|
|||||||
|
|
||||||
SOURCES = ../../src/components/albumTile/albumtile.cpp \
|
SOURCES = ../../src/components/albumTile/albumtile.cpp \
|
||||||
../../src/components/spinningAlbumArt/spinningalbumart.cpp \
|
../../src/components/spinningAlbumArt/spinningalbumart.cpp \
|
||||||
|
../../src/components/timePlayedWidget/timePlayedWidget.cpp \
|
||||||
../../src/components/tracklistWidget/tracklistwidget.cpp \
|
../../src/components/tracklistWidget/tracklistwidget.cpp \
|
||||||
../../src/main.cpp \
|
../../src/main.cpp \
|
||||||
../../src/windows/musicSelector/musicSelector.cpp \
|
../../src/windows/musicSelector/musicSelector.cpp \
|
||||||
@@ -61,11 +62,13 @@ SOURCES = ../../src/components/albumTile/albumtile.cpp \
|
|||||||
../../src/layout/flowLayout/flowLayout.cpp qrc_qmake_qmake_qm_files.cpp \
|
../../src/layout/flowLayout/flowLayout.cpp qrc_qmake_qmake_qm_files.cpp \
|
||||||
moc_albumtile.cpp \
|
moc_albumtile.cpp \
|
||||||
moc_spinningalbumart.cpp \
|
moc_spinningalbumart.cpp \
|
||||||
|
moc_timePlayedWidget.cpp \
|
||||||
moc_tracklistwidget.cpp \
|
moc_tracklistwidget.cpp \
|
||||||
moc_musicSelector.cpp \
|
moc_musicSelector.cpp \
|
||||||
moc_playerWindow.cpp
|
moc_playerWindow.cpp
|
||||||
OBJECTS = albumtile.o \
|
OBJECTS = albumtile.o \
|
||||||
spinningalbumart.o \
|
spinningalbumart.o \
|
||||||
|
timePlayedWidget.o \
|
||||||
tracklistwidget.o \
|
tracklistwidget.o \
|
||||||
main.o \
|
main.o \
|
||||||
musicSelector.o \
|
musicSelector.o \
|
||||||
@@ -74,6 +77,7 @@ OBJECTS = albumtile.o \
|
|||||||
qrc_qmake_qmake_qm_files.o \
|
qrc_qmake_qmake_qm_files.o \
|
||||||
moc_albumtile.o \
|
moc_albumtile.o \
|
||||||
moc_spinningalbumart.o \
|
moc_spinningalbumart.o \
|
||||||
|
moc_timePlayedWidget.o \
|
||||||
moc_tracklistwidget.o \
|
moc_tracklistwidget.o \
|
||||||
moc_musicSelector.o \
|
moc_musicSelector.o \
|
||||||
moc_playerWindow.o
|
moc_playerWindow.o
|
||||||
@@ -451,6 +455,7 @@ DIST = /opt/homebrew/share/qt/mkspecs/features/spec_pre.prf \
|
|||||||
/opt/homebrew/share/qt/mkspecs/features/lex.prf \
|
/opt/homebrew/share/qt/mkspecs/features/lex.prf \
|
||||||
../../../../Music-Player.pro ../../src/components/albumTile/albumtile.h \
|
../../../../Music-Player.pro ../../src/components/albumTile/albumtile.h \
|
||||||
../../src/components/spinningAlbumArt/spinningalbumart.h \
|
../../src/components/spinningAlbumArt/spinningalbumart.h \
|
||||||
|
../../src/components/timePlayedWidget/timePlayedWidget.h \
|
||||||
../../src/components/tracklistWidget/tracklistwidget.h \
|
../../src/components/tracklistWidget/tracklistwidget.h \
|
||||||
../../src/data/cleanerScripts.h \
|
../../src/data/cleanerScripts.h \
|
||||||
../../src/windows/musicSelector/musicSelector.h \
|
../../src/windows/musicSelector/musicSelector.h \
|
||||||
@@ -458,6 +463,7 @@ DIST = /opt/homebrew/share/qt/mkspecs/features/spec_pre.prf \
|
|||||||
../../src/data/albumInformation.h \
|
../../src/data/albumInformation.h \
|
||||||
../../src/layout/flowLayout/flowLayout.h ../../src/components/albumTile/albumtile.cpp \
|
../../src/layout/flowLayout/flowLayout.h ../../src/components/albumTile/albumtile.cpp \
|
||||||
../../src/components/spinningAlbumArt/spinningalbumart.cpp \
|
../../src/components/spinningAlbumArt/spinningalbumart.cpp \
|
||||||
|
../../src/components/timePlayedWidget/timePlayedWidget.cpp \
|
||||||
../../src/components/tracklistWidget/tracklistwidget.cpp \
|
../../src/components/tracklistWidget/tracklistwidget.cpp \
|
||||||
../../src/main.cpp \
|
../../src/main.cpp \
|
||||||
../../src/windows/musicSelector/musicSelector.cpp \
|
../../src/windows/musicSelector/musicSelector.cpp \
|
||||||
@@ -1272,8 +1278,8 @@ distdir: FORCE
|
|||||||
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
|
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
|
||||||
$(COPY_FILE) --parents qmake_qmake_qm_files.qrc $(DISTDIR)/
|
$(COPY_FILE) --parents qmake_qmake_qm_files.qrc $(DISTDIR)/
|
||||||
$(COPY_FILE) --parents /opt/homebrew/share/qt/mkspecs/features/data/dummy.cpp $(DISTDIR)/
|
$(COPY_FILE) --parents /opt/homebrew/share/qt/mkspecs/features/data/dummy.cpp $(DISTDIR)/
|
||||||
$(COPY_FILE) --parents ../../src/components/albumTile/albumtile.h ../../src/components/spinningAlbumArt/spinningalbumart.h ../../src/components/tracklistWidget/tracklistwidget.h ../../src/data/cleanerScripts.h ../../src/windows/musicSelector/musicSelector.h ../../src/windows/playerWindow/playerWindow.h ../../src/data/albumInformation.h ../../src/layout/flowLayout/flowLayout.h $(DISTDIR)/
|
$(COPY_FILE) --parents ../../src/components/albumTile/albumtile.h ../../src/components/spinningAlbumArt/spinningalbumart.h ../../src/components/timePlayedWidget/timePlayedWidget.h ../../src/components/tracklistWidget/tracklistwidget.h ../../src/data/cleanerScripts.h ../../src/windows/musicSelector/musicSelector.h ../../src/windows/playerWindow/playerWindow.h ../../src/data/albumInformation.h ../../src/layout/flowLayout/flowLayout.h $(DISTDIR)/
|
||||||
$(COPY_FILE) --parents ../../src/components/albumTile/albumtile.cpp ../../src/components/spinningAlbumArt/spinningalbumart.cpp ../../src/components/tracklistWidget/tracklistwidget.cpp ../../src/main.cpp ../../src/windows/musicSelector/musicSelector.cpp ../../src/windows/playerWindow/playerWindow.cpp ../../src/layout/flowLayout/flowLayout.cpp $(DISTDIR)/
|
$(COPY_FILE) --parents ../../src/components/albumTile/albumtile.cpp ../../src/components/spinningAlbumArt/spinningalbumart.cpp ../../src/components/timePlayedWidget/timePlayedWidget.cpp ../../src/components/tracklistWidget/tracklistwidget.cpp ../../src/main.cpp ../../src/windows/musicSelector/musicSelector.cpp ../../src/windows/playerWindow/playerWindow.cpp ../../src/layout/flowLayout/flowLayout.cpp $(DISTDIR)/
|
||||||
$(COPY_FILE) --parents ../../src/windows/musicSelector/musicSelector.ui $(DISTDIR)/
|
$(COPY_FILE) --parents ../../src/windows/musicSelector/musicSelector.ui $(DISTDIR)/
|
||||||
|
|
||||||
|
|
||||||
@@ -1316,9 +1322,9 @@ compiler_moc_predefs_clean:
|
|||||||
moc_predefs.h: /opt/homebrew/share/qt/mkspecs/features/data/dummy.cpp
|
moc_predefs.h: /opt/homebrew/share/qt/mkspecs/features/data/dummy.cpp
|
||||||
/Library/Developer/CommandLineTools/usr/bin/clang++ -pipe -stdlib=libc++ -g -std=gnu++1z $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=14.0 -Wall -Wextra -dM -E -o moc_predefs.h /opt/homebrew/share/qt/mkspecs/features/data/dummy.cpp
|
/Library/Developer/CommandLineTools/usr/bin/clang++ -pipe -stdlib=libc++ -g -std=gnu++1z $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=14.0 -Wall -Wextra -dM -E -o moc_predefs.h /opt/homebrew/share/qt/mkspecs/features/data/dummy.cpp
|
||||||
|
|
||||||
compiler_moc_header_make_all: moc_albumtile.cpp moc_spinningalbumart.cpp moc_tracklistwidget.cpp moc_musicSelector.cpp moc_playerWindow.cpp
|
compiler_moc_header_make_all: moc_albumtile.cpp moc_spinningalbumart.cpp moc_timePlayedWidget.cpp moc_tracklistwidget.cpp moc_musicSelector.cpp moc_playerWindow.cpp
|
||||||
compiler_moc_header_clean:
|
compiler_moc_header_clean:
|
||||||
-$(DEL_FILE) moc_albumtile.cpp moc_spinningalbumart.cpp moc_tracklistwidget.cpp moc_musicSelector.cpp moc_playerWindow.cpp
|
-$(DEL_FILE) moc_albumtile.cpp moc_spinningalbumart.cpp moc_timePlayedWidget.cpp moc_tracklistwidget.cpp moc_musicSelector.cpp moc_playerWindow.cpp
|
||||||
moc_albumtile.cpp: ../../src/components/albumTile/albumtile.h \
|
moc_albumtile.cpp: ../../src/components/albumTile/albumtile.h \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/QWidget \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QWidget \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/qwidget.h \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qwidget.h \
|
||||||
@@ -1346,10 +1352,23 @@ moc_spinningalbumart.cpp: ../../src/components/spinningAlbumArt/spinningalbumart
|
|||||||
/opt/homebrew/lib/QtGui.framework/Headers/qpixmap.h \
|
/opt/homebrew/lib/QtGui.framework/Headers/qpixmap.h \
|
||||||
/opt/homebrew/lib/QtCore.framework/Headers/QTimer \
|
/opt/homebrew/lib/QtCore.framework/Headers/QTimer \
|
||||||
/opt/homebrew/lib/QtCore.framework/Headers/qtimer.h \
|
/opt/homebrew/lib/QtCore.framework/Headers/qtimer.h \
|
||||||
|
/opt/homebrew/lib/QtGui.framework/Headers/QMouseEvent \
|
||||||
|
/opt/homebrew/lib/QtGui.framework/Headers/qevent.h \
|
||||||
moc_predefs.h \
|
moc_predefs.h \
|
||||||
/opt/homebrew/share/qt/libexec/moc
|
/opt/homebrew/share/qt/libexec/moc
|
||||||
/opt/homebrew/share/qt/libexec/moc $(DEFINES) --include /Users/lucas/Developer/Qt-Music-Player/build/Desktop-Debug/moc_predefs.h -I/opt/homebrew/share/qt/mkspecs/macx-clang -I/Users/lucas/Developer/Qt-Music-Player -I/opt/homebrew/lib/QtWidgets.framework/Headers -I/opt/homebrew/lib/QtMultimedia.framework/Headers -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtNetwork.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -I/Library/Developer/CommandLineTools/usr/lib/clang/17/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/usr/include -F/opt/homebrew/lib ../../src/components/spinningAlbumArt/spinningalbumart.h -o moc_spinningalbumart.cpp
|
/opt/homebrew/share/qt/libexec/moc $(DEFINES) --include /Users/lucas/Developer/Qt-Music-Player/build/Desktop-Debug/moc_predefs.h -I/opt/homebrew/share/qt/mkspecs/macx-clang -I/Users/lucas/Developer/Qt-Music-Player -I/opt/homebrew/lib/QtWidgets.framework/Headers -I/opt/homebrew/lib/QtMultimedia.framework/Headers -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtNetwork.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -I/Library/Developer/CommandLineTools/usr/lib/clang/17/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/usr/include -F/opt/homebrew/lib ../../src/components/spinningAlbumArt/spinningalbumart.h -o moc_spinningalbumart.cpp
|
||||||
|
|
||||||
|
moc_timePlayedWidget.cpp: ../../src/components/timePlayedWidget/timePlayedWidget.h \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QWidget \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qwidget.h \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QLabel \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qlabel.h \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QVBoxLayout \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qboxlayout.h \
|
||||||
|
moc_predefs.h \
|
||||||
|
/opt/homebrew/share/qt/libexec/moc
|
||||||
|
/opt/homebrew/share/qt/libexec/moc $(DEFINES) --include /Users/lucas/Developer/Qt-Music-Player/build/Desktop-Debug/moc_predefs.h -I/opt/homebrew/share/qt/mkspecs/macx-clang -I/Users/lucas/Developer/Qt-Music-Player -I/opt/homebrew/lib/QtWidgets.framework/Headers -I/opt/homebrew/lib/QtMultimedia.framework/Headers -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtNetwork.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -I/Library/Developer/CommandLineTools/usr/lib/clang/17/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/usr/include -F/opt/homebrew/lib ../../src/components/timePlayedWidget/timePlayedWidget.h -o moc_timePlayedWidget.cpp
|
||||||
|
|
||||||
moc_tracklistwidget.cpp: ../../src/components/tracklistWidget/tracklistwidget.h \
|
moc_tracklistwidget.cpp: ../../src/components/tracklistWidget/tracklistwidget.h \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/QWidget \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QWidget \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/qwidget.h \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qwidget.h \
|
||||||
@@ -1392,9 +1411,14 @@ moc_playerWindow.cpp: ../../src/windows/playerWindow/playerWindow.h \
|
|||||||
../../src/components/spinningalbumart/spinningAlbumArt.h \
|
../../src/components/spinningalbumart/spinningAlbumArt.h \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/QPixmap \
|
/opt/homebrew/lib/QtGui.framework/Headers/QPixmap \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/qpixmap.h \
|
/opt/homebrew/lib/QtGui.framework/Headers/qpixmap.h \
|
||||||
|
/opt/homebrew/lib/QtGui.framework/Headers/QMouseEvent \
|
||||||
|
/opt/homebrew/lib/QtGui.framework/Headers/qevent.h \
|
||||||
../../src/components/tracklistWidget/tracklistwidget.h \
|
../../src/components/tracklistWidget/tracklistwidget.h \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/QListWidget \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QListWidget \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/qlistwidget.h \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qlistwidget.h \
|
||||||
|
../../src/components/timePlayedWidget/timePlayedWidget.h \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QVBoxLayout \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qboxlayout.h \
|
||||||
moc_predefs.h \
|
moc_predefs.h \
|
||||||
/opt/homebrew/share/qt/libexec/moc
|
/opt/homebrew/share/qt/libexec/moc
|
||||||
/opt/homebrew/share/qt/libexec/moc $(DEFINES) --include /Users/lucas/Developer/Qt-Music-Player/build/Desktop-Debug/moc_predefs.h -I/opt/homebrew/share/qt/mkspecs/macx-clang -I/Users/lucas/Developer/Qt-Music-Player -I/opt/homebrew/lib/QtWidgets.framework/Headers -I/opt/homebrew/lib/QtMultimedia.framework/Headers -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtNetwork.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -I/Library/Developer/CommandLineTools/usr/lib/clang/17/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/usr/include -F/opt/homebrew/lib ../../src/windows/playerWindow/playerWindow.h -o moc_playerWindow.cpp
|
/opt/homebrew/share/qt/libexec/moc $(DEFINES) --include /Users/lucas/Developer/Qt-Music-Player/build/Desktop-Debug/moc_predefs.h -I/opt/homebrew/share/qt/mkspecs/macx-clang -I/Users/lucas/Developer/Qt-Music-Player -I/opt/homebrew/lib/QtWidgets.framework/Headers -I/opt/homebrew/lib/QtMultimedia.framework/Headers -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtNetwork.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -I/Library/Developer/CommandLineTools/usr/lib/clang/17/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/usr/include -F/opt/homebrew/lib ../../src/windows/playerWindow/playerWindow.h -o moc_playerWindow.cpp
|
||||||
@@ -1449,12 +1473,23 @@ spinningalbumart.o: ../../src/components/spinningAlbumArt/spinningalbumart.cpp .
|
|||||||
/opt/homebrew/lib/QtGui.framework/Headers/qpixmap.h \
|
/opt/homebrew/lib/QtGui.framework/Headers/qpixmap.h \
|
||||||
/opt/homebrew/lib/QtCore.framework/Headers/QTimer \
|
/opt/homebrew/lib/QtCore.framework/Headers/QTimer \
|
||||||
/opt/homebrew/lib/QtCore.framework/Headers/qtimer.h \
|
/opt/homebrew/lib/QtCore.framework/Headers/qtimer.h \
|
||||||
|
/opt/homebrew/lib/QtGui.framework/Headers/QMouseEvent \
|
||||||
|
/opt/homebrew/lib/QtGui.framework/Headers/qevent.h \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/QPainter \
|
/opt/homebrew/lib/QtGui.framework/Headers/QPainter \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/qpainter.h \
|
/opt/homebrew/lib/QtGui.framework/Headers/qpainter.h \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/QPainterPath \
|
/opt/homebrew/lib/QtGui.framework/Headers/QPainterPath \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/qpainterpath.h
|
/opt/homebrew/lib/QtGui.framework/Headers/qpainterpath.h
|
||||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o spinningalbumart.o ../../src/components/spinningAlbumArt/spinningalbumart.cpp
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o spinningalbumart.o ../../src/components/spinningAlbumArt/spinningalbumart.cpp
|
||||||
|
|
||||||
|
timePlayedWidget.o: ../../src/components/timePlayedWidget/timePlayedWidget.cpp ../../src/components/timePlayedWidget/timePlayedWidget.h \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QWidget \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qwidget.h \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QLabel \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qlabel.h \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QVBoxLayout \
|
||||||
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qboxlayout.h
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o timePlayedWidget.o ../../src/components/timePlayedWidget/timePlayedWidget.cpp
|
||||||
|
|
||||||
tracklistwidget.o: ../../src/components/tracklistWidget/tracklistwidget.cpp ../../src/components/tracklistWidget/tracklistwidget.h \
|
tracklistwidget.o: ../../src/components/tracklistWidget/tracklistwidget.cpp ../../src/components/tracklistWidget/tracklistwidget.h \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/QWidget \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QWidget \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/qwidget.h \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qwidget.h \
|
||||||
@@ -1519,6 +1554,7 @@ musicSelector.o: ../../src/windows/musicSelector/musicSelector.cpp ../../src/win
|
|||||||
../../src/components/tracklistWidget/tracklistwidget.h \
|
../../src/components/tracklistWidget/tracklistwidget.h \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/QListWidget \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QListWidget \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/qlistwidget.h \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qlistwidget.h \
|
||||||
|
../../src/components/timePlayedWidget/timePlayedWidget.h \
|
||||||
../../src/layout/flowlayout/flowLayout.h \
|
../../src/layout/flowlayout/flowLayout.h \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/QLayout \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QLayout \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/qlayout.h \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qlayout.h \
|
||||||
@@ -1553,15 +1589,17 @@ playerWindow.o: ../../src/windows/playerWindow/playerWindow.cpp ../../src/window
|
|||||||
../../src/components/spinningalbumart/spinningAlbumArt.h \
|
../../src/components/spinningalbumart/spinningAlbumArt.h \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/QPixmap \
|
/opt/homebrew/lib/QtGui.framework/Headers/QPixmap \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/qpixmap.h \
|
/opt/homebrew/lib/QtGui.framework/Headers/qpixmap.h \
|
||||||
|
/opt/homebrew/lib/QtGui.framework/Headers/QMouseEvent \
|
||||||
|
/opt/homebrew/lib/QtGui.framework/Headers/qevent.h \
|
||||||
../../src/components/tracklistWidget/tracklistwidget.h \
|
../../src/components/tracklistWidget/tracklistwidget.h \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/QListWidget \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QListWidget \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/qlistwidget.h \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qlistwidget.h \
|
||||||
|
../../src/components/timePlayedWidget/timePlayedWidget.h \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/QVBoxLayout \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/QVBoxLayout \
|
||||||
/opt/homebrew/lib/QtWidgets.framework/Headers/qboxlayout.h \
|
/opt/homebrew/lib/QtWidgets.framework/Headers/qboxlayout.h \
|
||||||
/opt/homebrew/lib/QtCore.framework/Headers/QFileInfo \
|
/opt/homebrew/lib/QtCore.framework/Headers/QFileInfo \
|
||||||
/opt/homebrew/lib/QtCore.framework/Headers/qfileinfo.h \
|
/opt/homebrew/lib/QtCore.framework/Headers/qfileinfo.h \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/QCloseEvent \
|
/opt/homebrew/lib/QtGui.framework/Headers/QCloseEvent \
|
||||||
/opt/homebrew/lib/QtGui.framework/Headers/qevent.h \
|
|
||||||
../../src/data/cleanerScripts.h \
|
../../src/data/cleanerScripts.h \
|
||||||
/opt/homebrew/lib/QtCore.framework/Headers/QRegularExpression \
|
/opt/homebrew/lib/QtCore.framework/Headers/QRegularExpression \
|
||||||
/opt/homebrew/lib/QtCore.framework/Headers/qregularexpression.h
|
/opt/homebrew/lib/QtCore.framework/Headers/qregularexpression.h
|
||||||
@@ -1706,6 +1744,9 @@ moc_albumtile.o: moc_albumtile.cpp
|
|||||||
moc_spinningalbumart.o: moc_spinningalbumart.cpp
|
moc_spinningalbumart.o: moc_spinningalbumart.cpp
|
||||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_spinningalbumart.o moc_spinningalbumart.cpp
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_spinningalbumart.o moc_spinningalbumart.cpp
|
||||||
|
|
||||||
|
moc_timePlayedWidget.o: moc_timePlayedWidget.cpp
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_timePlayedWidget.o moc_timePlayedWidget.cpp
|
||||||
|
|
||||||
moc_tracklistwidget.o: moc_tracklistwidget.cpp
|
moc_tracklistwidget.o: moc_tracklistwidget.cpp
|
||||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tracklistwidget.o moc_tracklistwidget.cpp
|
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_tracklistwidget.o moc_tracklistwidget.cpp
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -40,19 +40,22 @@ template <> constexpr inline auto SpinningAlbumArt::qt_create_metaobjectdata<qt_
|
|||||||
namespace QMC = QtMocConstants;
|
namespace QMC = QtMocConstants;
|
||||||
QtMocHelpers::StringRefStorage qt_stringData {
|
QtMocHelpers::StringRefStorage qt_stringData {
|
||||||
"SpinningAlbumArt",
|
"SpinningAlbumArt",
|
||||||
"start",
|
"artClicked",
|
||||||
"",
|
"",
|
||||||
|
"start",
|
||||||
"stop",
|
"stop",
|
||||||
"updateRotation"
|
"updateRotation"
|
||||||
};
|
};
|
||||||
|
|
||||||
QtMocHelpers::UintData qt_methods {
|
QtMocHelpers::UintData qt_methods {
|
||||||
|
// Signal 'artClicked'
|
||||||
|
QtMocHelpers::SignalData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
|
||||||
// Slot 'start'
|
// Slot 'start'
|
||||||
QtMocHelpers::SlotData<void()>(1, 2, QMC::AccessPublic, QMetaType::Void),
|
|
||||||
// Slot 'stop'
|
|
||||||
QtMocHelpers::SlotData<void()>(3, 2, QMC::AccessPublic, QMetaType::Void),
|
QtMocHelpers::SlotData<void()>(3, 2, QMC::AccessPublic, QMetaType::Void),
|
||||||
|
// Slot 'stop'
|
||||||
|
QtMocHelpers::SlotData<void()>(4, 2, QMC::AccessPublic, QMetaType::Void),
|
||||||
// Slot 'updateRotation'
|
// Slot 'updateRotation'
|
||||||
QtMocHelpers::SlotData<void()>(4, 2, QMC::AccessPrivate, QMetaType::Void),
|
QtMocHelpers::SlotData<void()>(5, 2, QMC::AccessPrivate, QMetaType::Void),
|
||||||
};
|
};
|
||||||
QtMocHelpers::UintData qt_properties {
|
QtMocHelpers::UintData qt_properties {
|
||||||
};
|
};
|
||||||
@@ -76,13 +79,17 @@ void SpinningAlbumArt::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int
|
|||||||
auto *_t = static_cast<SpinningAlbumArt *>(_o);
|
auto *_t = static_cast<SpinningAlbumArt *>(_o);
|
||||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||||
switch (_id) {
|
switch (_id) {
|
||||||
case 0: _t->start(); break;
|
case 0: _t->artClicked(); break;
|
||||||
case 1: _t->stop(); break;
|
case 1: _t->start(); break;
|
||||||
case 2: _t->updateRotation(); break;
|
case 2: _t->stop(); break;
|
||||||
|
case 3: _t->updateRotation(); break;
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(void)_a;
|
if (_c == QMetaObject::IndexOfMethod) {
|
||||||
|
if (QtMocHelpers::indexOfMethod<void (SpinningAlbumArt::*)()>(_a, &SpinningAlbumArt::artClicked, 0))
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const QMetaObject *SpinningAlbumArt::metaObject() const
|
const QMetaObject *SpinningAlbumArt::metaObject() const
|
||||||
@@ -104,15 +111,21 @@ int SpinningAlbumArt::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
|||||||
if (_id < 0)
|
if (_id < 0)
|
||||||
return _id;
|
return _id;
|
||||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||||
if (_id < 3)
|
if (_id < 4)
|
||||||
qt_static_metacall(this, _c, _id, _a);
|
qt_static_metacall(this, _c, _id, _a);
|
||||||
_id -= 3;
|
_id -= 4;
|
||||||
}
|
}
|
||||||
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||||
if (_id < 3)
|
if (_id < 4)
|
||||||
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
||||||
_id -= 3;
|
_id -= 4;
|
||||||
}
|
}
|
||||||
return _id;
|
return _id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SIGNAL 0
|
||||||
|
void SpinningAlbumArt::artClicked()
|
||||||
|
{
|
||||||
|
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
|
||||||
|
}
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|||||||
Binary file not shown.
122
build/Desktop-Debug/moc_timePlayedWidget.cpp
Normal file
122
build/Desktop-Debug/moc_timePlayedWidget.cpp
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Meta object code from reading C++ file 'timePlayedWidget.h'
|
||||||
|
**
|
||||||
|
** Created by: The Qt Meta Object Compiler version 69 (Qt 6.9.3)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../../src/components/timePlayedWidget/timePlayedWidget.h"
|
||||||
|
#include <QtGui/qtextcursor.h>
|
||||||
|
#include <QtCore/qmetatype.h>
|
||||||
|
|
||||||
|
#include <QtCore/qtmochelpers.h>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
|
#include <QtCore/qxptype_traits.h>
|
||||||
|
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||||
|
#error "The header file 'timePlayedWidget.h' doesn't include <QObject>."
|
||||||
|
#elif Q_MOC_OUTPUT_REVISION != 69
|
||||||
|
#error "This file was generated using the moc from 6.9.3. It"
|
||||||
|
#error "cannot be used with the include files from this version of Qt."
|
||||||
|
#error "(The moc has changed too much.)"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef Q_CONSTINIT
|
||||||
|
#define Q_CONSTINIT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QT_WARNING_PUSH
|
||||||
|
QT_WARNING_DISABLE_DEPRECATED
|
||||||
|
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
|
||||||
|
namespace {
|
||||||
|
struct qt_meta_tag_ZN16TimePlayedWidgetE_t {};
|
||||||
|
} // unnamed namespace
|
||||||
|
|
||||||
|
template <> constexpr inline auto TimePlayedWidget::qt_create_metaobjectdata<qt_meta_tag_ZN16TimePlayedWidgetE_t>()
|
||||||
|
{
|
||||||
|
namespace QMC = QtMocConstants;
|
||||||
|
QtMocHelpers::StringRefStorage qt_stringData {
|
||||||
|
"TimePlayedWidget",
|
||||||
|
"setDuration",
|
||||||
|
"",
|
||||||
|
"ms",
|
||||||
|
"setPosition",
|
||||||
|
"reset"
|
||||||
|
};
|
||||||
|
|
||||||
|
QtMocHelpers::UintData qt_methods {
|
||||||
|
// Slot 'setDuration'
|
||||||
|
QtMocHelpers::SlotData<void(qint64)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
|
||||||
|
{ QMetaType::LongLong, 3 },
|
||||||
|
}}),
|
||||||
|
// Slot 'setPosition'
|
||||||
|
QtMocHelpers::SlotData<void(qint64)>(4, 2, QMC::AccessPublic, QMetaType::Void, {{
|
||||||
|
{ QMetaType::LongLong, 3 },
|
||||||
|
}}),
|
||||||
|
// Slot 'reset'
|
||||||
|
QtMocHelpers::SlotData<void()>(5, 2, QMC::AccessPublic, QMetaType::Void),
|
||||||
|
};
|
||||||
|
QtMocHelpers::UintData qt_properties {
|
||||||
|
};
|
||||||
|
QtMocHelpers::UintData qt_enums {
|
||||||
|
};
|
||||||
|
return QtMocHelpers::metaObjectData<TimePlayedWidget, qt_meta_tag_ZN16TimePlayedWidgetE_t>(QMC::MetaObjectFlag{}, qt_stringData,
|
||||||
|
qt_methods, qt_properties, qt_enums);
|
||||||
|
}
|
||||||
|
Q_CONSTINIT const QMetaObject TimePlayedWidget::staticMetaObject = { {
|
||||||
|
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
|
||||||
|
qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16TimePlayedWidgetE_t>.stringdata,
|
||||||
|
qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16TimePlayedWidgetE_t>.data,
|
||||||
|
qt_static_metacall,
|
||||||
|
nullptr,
|
||||||
|
qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN16TimePlayedWidgetE_t>.metaTypes,
|
||||||
|
nullptr
|
||||||
|
} };
|
||||||
|
|
||||||
|
void TimePlayedWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||||
|
{
|
||||||
|
auto *_t = static_cast<TimePlayedWidget *>(_o);
|
||||||
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||||
|
switch (_id) {
|
||||||
|
case 0: _t->setDuration((*reinterpret_cast< std::add_pointer_t<qint64>>(_a[1]))); break;
|
||||||
|
case 1: _t->setPosition((*reinterpret_cast< std::add_pointer_t<qint64>>(_a[1]))); break;
|
||||||
|
case 2: _t->reset(); break;
|
||||||
|
default: ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const QMetaObject *TimePlayedWidget::metaObject() const
|
||||||
|
{
|
||||||
|
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *TimePlayedWidget::qt_metacast(const char *_clname)
|
||||||
|
{
|
||||||
|
if (!_clname) return nullptr;
|
||||||
|
if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN16TimePlayedWidgetE_t>.strings))
|
||||||
|
return static_cast<void*>(this);
|
||||||
|
return QWidget::qt_metacast(_clname);
|
||||||
|
}
|
||||||
|
|
||||||
|
int TimePlayedWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||||
|
{
|
||||||
|
_id = QWidget::qt_metacall(_c, _id, _a);
|
||||||
|
if (_id < 0)
|
||||||
|
return _id;
|
||||||
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||||
|
if (_id < 3)
|
||||||
|
qt_static_metacall(this, _c, _id, _a);
|
||||||
|
_id -= 3;
|
||||||
|
}
|
||||||
|
if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||||
|
if (_id < 3)
|
||||||
|
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
||||||
|
_id -= 3;
|
||||||
|
}
|
||||||
|
return _id;
|
||||||
|
}
|
||||||
|
QT_WARNING_POP
|
||||||
BIN
build/Desktop-Debug/moc_timePlayedWidget.o
Normal file
BIN
build/Desktop-Debug/moc_timePlayedWidget.o
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/Desktop-Debug/timePlayedWidget.o
Normal file
BIN
build/Desktop-Debug/timePlayedWidget.o
Normal file
Binary file not shown.
@@ -80,3 +80,9 @@ void SpinningAlbumArt::updateRotation()
|
|||||||
|
|
||||||
artLabel_->setPixmap(frame);
|
artLabel_->setPixmap(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SpinningAlbumArt::mousePressEvent(QMouseEvent* event)
|
||||||
|
{
|
||||||
|
emit artClicked();
|
||||||
|
QWidget::mousePressEvent(event);
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
|
||||||
class SpinningAlbumArt : public QWidget
|
class SpinningAlbumArt : public QWidget
|
||||||
{
|
{
|
||||||
@@ -16,9 +17,15 @@ public slots:
|
|||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void artClicked();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateRotation();
|
void updateRotation();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void mousePressEvent(QMouseEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPixmap discArt_; // circular-masked album image
|
QPixmap discArt_; // circular-masked album image
|
||||||
QLabel* artLabel_; // widget that displays the spinning frame
|
QLabel* artLabel_; // widget that displays the spinning frame
|
||||||
|
|||||||
47
src/components/timePlayedWidget/timePlayedWidget.cpp
Normal file
47
src/components/timePlayedWidget/timePlayedWidget.cpp
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
#include "timePlayedWidget.h"
|
||||||
|
|
||||||
|
TimePlayedWidget::TimePlayedWidget(QWidget* parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
label_ = new QLabel("00:00 / 00:00", this);
|
||||||
|
label_->setAlignment(Qt::AlignCenter);
|
||||||
|
label_->setStyleSheet("font-size: 12px; color: #666;");
|
||||||
|
|
||||||
|
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||||
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
layout->addWidget(label_);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString TimePlayedWidget::formatTime(qint64 ms) const
|
||||||
|
{
|
||||||
|
int sec = ms / 1000;
|
||||||
|
int min = sec / 60;
|
||||||
|
int s = sec % 60;
|
||||||
|
|
||||||
|
return QString("%1:%2")
|
||||||
|
.arg(min, 2, 10, QChar('0'))
|
||||||
|
.arg(s, 2, 10, QChar('0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
void TimePlayedWidget::setDuration(qint64 ms)
|
||||||
|
{
|
||||||
|
duration_ = ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TimePlayedWidget::setPosition(qint64 ms)
|
||||||
|
{
|
||||||
|
if (duration_ > 0)
|
||||||
|
{
|
||||||
|
label_->setText(
|
||||||
|
QString("%1 / %2")
|
||||||
|
.arg(formatTime(ms))
|
||||||
|
.arg(formatTime(duration_))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TimePlayedWidget::reset()
|
||||||
|
{
|
||||||
|
duration_ = 0;
|
||||||
|
label_->setText("00:00 / 00:00");
|
||||||
|
}
|
||||||
27
src/components/timePlayedWidget/timePlayedWidget.h
Normal file
27
src/components/timePlayedWidget/timePlayedWidget.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef TIMEPLAYEDWIDGET_H
|
||||||
|
#define TIMEPLAYEDWIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
|
class TimePlayedWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit TimePlayedWidget(QWidget* parent = nullptr);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void setDuration(qint64 ms);
|
||||||
|
void setPosition(qint64 ms);
|
||||||
|
void reset();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QLabel* label_;
|
||||||
|
qint64 duration_ = 0;
|
||||||
|
|
||||||
|
QString formatTime(qint64 ms) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TIMEPLAYEDWIDGET_H
|
||||||
@@ -22,6 +22,17 @@ PlayerWindow::PlayerWindow(const AlbumData& item, QWidget* parent)
|
|||||||
trackLabel_->setStyleSheet("font-size: 14px; font-weight: 500;");
|
trackLabel_->setStyleSheet("font-size: 14px; font-weight: 500;");
|
||||||
layout->addWidget(trackLabel_);
|
layout->addWidget(trackLabel_);
|
||||||
|
|
||||||
|
// Time played in Song Indicator
|
||||||
|
timeIndicator_ = new TimePlayedWidget(this);
|
||||||
|
layout->addWidget(timeIndicator_);
|
||||||
|
|
||||||
|
// Volume slider (NEW)
|
||||||
|
volumeSlider_ = new QSlider(Qt::Horizontal);
|
||||||
|
volumeSlider_->setRange(0, 100);
|
||||||
|
volumeSlider_->setValue(80);
|
||||||
|
volumeSlider_->setStyleSheet("margin: 0 12px;");
|
||||||
|
layout->addWidget(volumeSlider_);
|
||||||
|
|
||||||
// Track list widget
|
// Track list widget
|
||||||
trackList_ = new TrackListWidget(item_.audioFiles, this);
|
trackList_ = new TrackListWidget(item_.audioFiles, this);
|
||||||
layout->addWidget(trackList_);
|
layout->addWidget(trackList_);
|
||||||
@@ -31,6 +42,10 @@ PlayerWindow::PlayerWindow(const AlbumData& item, QWidget* parent)
|
|||||||
audio_ = new QAudioOutput(this);
|
audio_ = new QAudioOutput(this);
|
||||||
player_->setAudioOutput(audio_);
|
player_->setAudioOutput(audio_);
|
||||||
|
|
||||||
|
audio_->setVolume(0.8f); // match slider
|
||||||
|
connect(volumeSlider_, &QSlider::valueChanged, this,
|
||||||
|
[this](int v){ audio_->setVolume(v / 100.0); });
|
||||||
|
|
||||||
// Spin album art based on playback
|
// Spin album art based on playback
|
||||||
connect(player_, &QMediaPlayer::playbackStateChanged, this,
|
connect(player_, &QMediaPlayer::playbackStateChanged, this,
|
||||||
[this](QMediaPlayer::PlaybackState st){
|
[this](QMediaPlayer::PlaybackState st){
|
||||||
@@ -40,6 +55,24 @@ PlayerWindow::PlayerWindow(const AlbumData& item, QWidget* parent)
|
|||||||
spinningArt_->stop();
|
spinningArt_->stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Get song duration and played time
|
||||||
|
connect(player_, &QMediaPlayer::durationChanged,
|
||||||
|
timeIndicator_, &TimePlayedWidget::setDuration);
|
||||||
|
|
||||||
|
connect(player_, &QMediaPlayer::positionChanged,
|
||||||
|
timeIndicator_, &TimePlayedWidget::setPosition);
|
||||||
|
|
||||||
|
// Pause/Play on album art click
|
||||||
|
connect(spinningArt_, &SpinningAlbumArt::artClicked, this, [this]() {
|
||||||
|
if (player_->playbackState() == QMediaPlayer::PlayingState) {
|
||||||
|
player_->pause();
|
||||||
|
spinningArt_->stop();
|
||||||
|
} else {
|
||||||
|
player_->play();
|
||||||
|
spinningArt_->start();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// When a track finishes, auto-play next
|
// When a track finishes, auto-play next
|
||||||
connect(player_, &QMediaPlayer::mediaStatusChanged, this,
|
connect(player_, &QMediaPlayer::mediaStatusChanged, this,
|
||||||
[this](QMediaPlayer::MediaStatus st){
|
[this](QMediaPlayer::MediaStatus st){
|
||||||
|
|||||||
@@ -9,10 +9,13 @@
|
|||||||
#include "src/data/albumInformation.h"
|
#include "src/data/albumInformation.h"
|
||||||
#include "src/components/spinningalbumart/spinningAlbumArt.h"
|
#include "src/components/spinningalbumart/spinningAlbumArt.h"
|
||||||
#include "src/components/tracklistWidget/tracklistwidget.h"
|
#include "src/components/tracklistWidget/tracklistwidget.h"
|
||||||
|
#include "src/components/timePlayedWidget/timePlayedWidget.h"
|
||||||
|
|
||||||
class PlayerWindow : public QWidget
|
class PlayerWindow : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QSlider* volumeSlider_;
|
||||||
|
TimePlayedWidget* timeIndicator_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PlayerWindow(const AlbumData& item, QWidget* parent = nullptr);
|
explicit PlayerWindow(const AlbumData& item, QWidget* parent = nullptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user