diff options
| author | vovanec <vovanec@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-02-07 13:36:34 +0000 |
|---|---|---|
| committer | vovanec <vovanec@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-02-07 13:36:34 +0000 |
| commit | 06d1877811fa6aa97dddc0e03bcde4e766928c87 (patch) | |
| tree | c25462d0e58c3d58c728664440412bf4f16a49ec | |
| parent | 3f6b60f23c44a8ba8dd97ca6f41a16e2af7ef2f7 (diff) | |
| download | qmmp-06d1877811fa6aa97dddc0e03bcde4e766928c87.tar.gz qmmp-06d1877811fa6aa97dddc0e03bcde4e766928c87.tar.bz2 qmmp-06d1877811fa6aa97dddc0e03bcde4e766928c87.zip | |
new directory structure
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@232 90c681e8-e032-0410-971d-27865f9a5e38
| -rwxr-xr-x | bin/qmmp_launcher | 2 | ||||
| -rw-r--r-- | lib/qmmp/Input/mad/detailsdialog.cpp | 221 | ||||
| -rw-r--r-- | lib/qmmp/Input/mad/detailsdialog.ui | 487 | ||||
| -rw-r--r-- | qmmp.pri | 17 | ||||
| -rw-r--r-- | qmmp.pro | 2 | ||||
| -rw-r--r-- | remove_svn_tags | 31 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/images/advanced.png | bin | 757 -> 0 bytes | |||
| -rw-r--r-- | src/images/interface.png | bin | 779 -> 0 bytes | |||
| -rw-r--r-- | src/images/pause.png | bin | 315 -> 0 bytes | |||
| -rw-r--r-- | src/images/play.png | bin | 364 -> 0 bytes | |||
| -rw-r--r-- | src/images/playlist.png | bin | 383 -> 0 bytes | |||
| -rw-r--r-- | src/images/plugins.png | bin | 471 -> 0 bytes | |||
| -rw-r--r-- | src/images/stop.png | bin | 323 -> 0 bytes | |||
| -rw-r--r-- | src/plugins/CMakeLists.txt (renamed from lib/qmmp/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/CMakeLists.txt (renamed from lib/qmmp/Effect/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/Effect.pro (renamed from lib/qmmp/Effect/Effect.pro) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/CMakeLists.txt (renamed from lib/qmmp/Effect/srconverter/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/effectsrconverterfactory.cpp (renamed from lib/qmmp/Effect/srconverter/effectsrconverterfactory.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/effectsrconverterfactory.h (renamed from lib/qmmp/Effect/srconverter/effectsrconverterfactory.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/settingsdialog.cpp (renamed from lib/qmmp/Effect/srconverter/settingsdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/settingsdialog.h (renamed from lib/qmmp/Effect/srconverter/settingsdialog.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/settingsdialog.ui (renamed from lib/qmmp/Effect/srconverter/settingsdialog.ui) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/srconverter.cpp (renamed from lib/qmmp/Effect/srconverter/srconverter.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/srconverter.h (renamed from lib/qmmp/Effect/srconverter/srconverter.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Effect/srconverter/srconverter.pro (renamed from lib/qmmp/Effect/srconverter/srconverter.pro) | 11 | ||||
| -rw-r--r-- | src/plugins/General/General.pro | 4 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbusadaptor.cpp | 62 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbusadaptor.h | 47 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbuscontrol.cpp | 61 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbuscontrol.h | 43 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbuscontrol.pro | 39 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbuscontrolfactory.cpp | 55 | ||||
| -rw-r--r-- | src/plugins/General/dbuscontrol/dbuscontrolfactory.h | 45 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.cpp | 259 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.h | 75 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobbler.pro | 41 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobblerfactory.cpp | 59 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/scrobblerfactory.h | 45 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/settingsdialog.cpp | 51 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/settingsdialog.h | 48 | ||||
| -rw-r--r-- | src/plugins/General/scrobbler/settingsdialog.ui | 92 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/images/images.qrc | 8 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/images/tray_pause.png | bin | 0 -> 569 bytes | |||
| -rw-r--r-- | src/plugins/General/statusicon/images/tray_play.png | bin | 0 -> 706 bytes | |||
| -rw-r--r-- | src/plugins/General/statusicon/images/tray_stop.png | bin | 0 -> 503 bytes | |||
| -rw-r--r-- | src/plugins/General/statusicon/settingsdialog.cpp | 55 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/settingsdialog.h | 48 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/settingsdialog.ui | 173 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/statusicon.cpp | 109 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/statusicon.h | 58 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/statusicon.pro | 36 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/statusiconfactory.cpp | 59 | ||||
| -rw-r--r-- | src/plugins/General/statusicon/statusiconfactory.h | 45 | ||||
| -rw-r--r-- | src/plugins/Input/CMakeLists.txt (renamed from lib/qmmp/Input/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/Input.pro (renamed from lib/qmmp/Input/Input.pro) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/CMakeLists.txt (renamed from lib/qmmp/Input/ffmpeg/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp (renamed from lib/qmmp/Input/ffmpeg/decoder_ffmpeg.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoder_ffmpeg.h (renamed from lib/qmmp/Input/ffmpeg/decoder_ffmpeg.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp (renamed from lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoderffmpegfactory.h (renamed from lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/detailsdialog.cpp (renamed from lib/qmmp/Input/ffmpeg/detailsdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/detailsdialog.h (renamed from lib/qmmp/Input/ffmpeg/detailsdialog.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/detailsdialog.ui (renamed from lib/qmmp/Input/ffmpeg/detailsdialog.ui) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/ffmpeg.pro (renamed from lib/qmmp/Input/ffmpeg/ffmpeg.pro) | 14 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_cs.ts | 150 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.qm (renamed from lib/qmmp/Input/ffmpeg/translations/ffmpeg_plugin_ru.qm) | bin | 2221 -> 2221 bytes | |||
| -rw-r--r-- | src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts (renamed from lib/qmmp/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/translations/translations.qrc (renamed from lib/qmmp/Input/ffmpeg/translations/translations.qrc) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/CMakeLists.txt (renamed from lib/qmmp/Input/flac/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/decoder_flac.cpp (renamed from lib/qmmp/Input/flac/decoder_flac.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/decoder_flac.h (renamed from lib/qmmp/Input/flac/decoder_flac.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/decoderflacfactory.cpp (renamed from lib/qmmp/Input/flac/decoderflacfactory.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/decoderflacfactory.h (renamed from lib/qmmp/Input/flac/decoderflacfactory.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/detailsdialog.cpp (renamed from lib/qmmp/Input/flac/detailsdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/detailsdialog.h (renamed from lib/qmmp/Input/flac/detailsdialog.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/detailsdialog.ui (renamed from lib/qmmp/Input/flac/detailsdialog.ui) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/flac.pro (renamed from lib/qmmp/Input/flac/flac.pro) | 12 | ||||
| -rw-r--r-- | src/plugins/Input/flac/translations/flac_plugin_ru.qm (renamed from lib/qmmp/Input/flac/translations/flac_plugin_ru.qm) | bin | 2218 -> 2218 bytes | |||
| -rw-r--r-- | src/plugins/Input/flac/translations/flac_plugin_ru.ts (renamed from lib/qmmp/Input/flac/translations/flac_plugin_ru.ts) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/flac/translations/translations.qrc (renamed from lib/qmmp/Input/flac/translations/translations.qrc) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mad/CMakeLists.txt (renamed from lib/qmmp/Input/mad/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mad/decoder_mad.cpp (renamed from lib/qmmp/Input/mad/decoder_mad.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mad/decoder_mad.h (renamed from lib/qmmp/Input/mad/decoder_mad.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mad/decodermadfactory.cpp (renamed from lib/qmmp/Input/mad/decodermadfactory.cpp) | 66 | ||||
| -rw-r--r-- | src/plugins/Input/mad/decodermadfactory.h (renamed from lib/qmmp/Input/mad/decodermadfactory.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mad/detailsdialog.cpp | 294 | ||||
| -rw-r--r-- | src/plugins/Input/mad/detailsdialog.h (renamed from lib/qmmp/Input/mad/detailsdialog.h) | 19 | ||||
| -rw-r--r-- | src/plugins/Input/mad/detailsdialog.ui | 392 | ||||
| -rw-r--r-- | src/plugins/Input/mad/mad.pro (renamed from lib/qmmp/Input/mad/mad.pro) | 13 | ||||
| -rw-r--r-- | src/plugins/Input/mad/settingsdialog.cpp (renamed from lib/qmmp/Input/mad/settingsdialog.cpp) | 15 | ||||
| -rw-r--r-- | src/plugins/Input/mad/settingsdialog.h (renamed from lib/qmmp/Input/mad/settingsdialog.h) | 2 | ||||
| -rw-r--r-- | src/plugins/Input/mad/settingsdialog.ui (renamed from lib/qmmp/Input/mad/settingsdialog.ui) | 275 | ||||
| -rw-r--r-- | src/plugins/Input/mad/translations/mad_plugin_ru.qm (renamed from lib/qmmp/Input/mad/translations/mad_plugin_ru.qm) | bin | 3625 -> 3625 bytes | |||
| -rw-r--r-- | src/plugins/Input/mad/translations/mad_plugin_ru.ts (renamed from lib/qmmp/Input/mad/translations/mad_plugin_ru.ts) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mad/translations/translations.qrc (renamed from lib/qmmp/Input/mad/translations/translations.qrc) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mad/ui_detailsdialog.h | 400 | ||||
| -rw-r--r-- | src/plugins/Input/mad/ui_settingsdialog.h | 245 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/CMakeLists.txt (renamed from lib/qmmp/Input/mpc/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/Makefile | 254 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/decoder_mpc.cpp (renamed from lib/qmmp/Input/mpc/decoder_mpc.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/decoder_mpc.h (renamed from lib/qmmp/Input/mpc/decoder_mpc.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/decodermpcfactory.cpp (renamed from lib/qmmp/Input/mpc/decodermpcfactory.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/decodermpcfactory.h (renamed from lib/qmmp/Input/mpc/decodermpcfactory.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/detailsdialog.cpp (renamed from lib/qmmp/Input/mpc/detailsdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/detailsdialog.h (renamed from lib/qmmp/Input/mpc/detailsdialog.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/detailsdialog.ui (renamed from lib/qmmp/Input/mpc/detailsdialog.ui) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/mpc.pro (renamed from lib/qmmp/Input/mpc/mpc.pro) | 13 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/translations/mpc_plugin_ru.qm (renamed from lib/qmmp/Input/mpc/translations/mpc_plugin_ru.qm) | bin | 2230 -> 2230 bytes | |||
| -rw-r--r-- | src/plugins/Input/mpc/translations/mpc_plugin_ru.ts (renamed from lib/qmmp/Input/mpc/translations/mpc_plugin_ru.ts) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/translations/translations.qrc (renamed from lib/qmmp/Input/mpc/translations/translations.qrc) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/sndfile/CMakeLists.txt (renamed from lib/qmmp/Input/sndfile/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/sndfile/decoder_sndfile.cpp (renamed from lib/qmmp/Input/sndfile/decoder_sndfile.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/sndfile/decoder_sndfile.h (renamed from lib/qmmp/Input/sndfile/decoder_sndfile.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/sndfile/decodersndfilefactory.cpp (renamed from lib/qmmp/Input/sndfile/decodersndfilefactory.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/sndfile/decodersndfilefactory.h (renamed from lib/qmmp/Input/sndfile/decodersndfilefactory.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/sndfile/sndfile.pro (renamed from lib/qmmp/Input/sndfile/sndfile.pro) | 12 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/CMakeLists.txt (renamed from lib/qmmp/Input/vorbis/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/decoder_vorbis.cpp (renamed from lib/qmmp/Input/vorbis/decoder_vorbis.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/decoder_vorbis.h (renamed from lib/qmmp/Input/vorbis/decoder_vorbis.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/decodervorbisfactory.cpp (renamed from lib/qmmp/Input/vorbis/decodervorbisfactory.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/decodervorbisfactory.h (renamed from lib/qmmp/Input/vorbis/decodervorbisfactory.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/detailsdialog.cpp (renamed from lib/qmmp/Input/vorbis/detailsdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/detailsdialog.h (renamed from lib/qmmp/Input/vorbis/detailsdialog.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/detailsdialog.ui (renamed from lib/qmmp/Input/vorbis/detailsdialog.ui) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/translations/translations.qrc (renamed from lib/qmmp/Input/vorbis/translations/translations.qrc) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/translations/vorbis_plugin_ru.qm (renamed from lib/qmmp/Input/vorbis/translations/vorbis_plugin_ru.qm) | bin | 2569 -> 2569 bytes | |||
| -rw-r--r-- | src/plugins/Input/vorbis/translations/vorbis_plugin_ru.ts (renamed from lib/qmmp/Input/vorbis/translations/vorbis_plugin_ru.ts) | 0 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/vorbis.pro (renamed from lib/qmmp/Input/vorbis/vorbis.pro) | 12 | ||||
| -rw-r--r-- | src/plugins/Misc/CommandLineOptions/IncDecVolumeOption.pro | 2 | ||||
| -rw-r--r-- | src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro | 26 | ||||
| -rw-r--r-- | src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/Makefile | 301 | ||||
| -rw-r--r-- | src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp | 53 | ||||
| -rw-r--r-- | src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.h | 23 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/FileDialogs.pro | 3 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/Makefile | 134 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro | 28 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/images/cdup.png | bin | 0 -> 736 bytes | |||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/images/detail.png | bin | 0 -> 551 bytes | |||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/images/images.qrc | 8 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/images/list.png | bin | 0 -> 547 bytes | |||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.cpp | 44 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.h | 40 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.ui | 216 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp | 109 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.h | 33 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/Qt3FileDialog/Qt3FileDialog.pro | 28 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialog.cpp | 35 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialog.h | 23 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialogfactory.cpp | 20 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialogfactory.h | 19 | ||||
| -rw-r--r-- | src/plugins/Misc/FileDialogs/Qt3FileDialog/readme | 14 | ||||
| -rwxr-xr-x | src/plugins/Misc/FileDialogs/libQmmpFileDialog.so | bin | 0 -> 137806 bytes | |||
| -rwxr-xr-x | src/plugins/Misc/FileDialogs/libQt3FileDialog.so | bin | 0 -> 104681 bytes | |||
| -rw-r--r-- | src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/CSVPlaylistFormat.pro | 20 | ||||
| -rw-r--r-- | src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/Makefile | 213 | ||||
| -rw-r--r-- | src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/csvplaylistformat.cpp | 72 | ||||
| -rw-r--r-- | src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/csvplaylistformat.h | 33 | ||||
| -rw-r--r-- | src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/moc_csvplaylistformat.cpp | 64 | ||||
| -rw-r--r-- | src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/readme | 12 | ||||
| -rw-r--r-- | src/plugins/Misc/PlaylistFormats/Makefile | 112 | ||||
| -rw-r--r-- | src/plugins/Misc/PlaylistFormats/PlaylistFormats.pro | 2 | ||||
| -rwxr-xr-x | src/plugins/Misc/PlaylistFormats/libCSVPlaylistFormat.so | bin | 0 -> 38452 bytes | |||
| -rw-r--r-- | src/plugins/Output/CMakeLists.txt (renamed from lib/qmmp/Output/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/Output.pro (renamed from lib/qmmp/Output/Output.pro) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/CMakeLists.txt (renamed from lib/qmmp/Output/alsa/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/alsa.pro (renamed from lib/qmmp/Output/alsa/alsa.pro) | 14 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/outputalsa.cpp (renamed from lib/qmmp/Output/alsa/outputalsa.cpp) | 60 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/outputalsa.h (renamed from lib/qmmp/Output/alsa/outputalsa.h) | 4 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/outputalsafactory.cpp (renamed from lib/qmmp/Output/alsa/outputalsafactory.cpp) | 15 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/outputalsafactory.h (renamed from lib/qmmp/Output/alsa/outputalsafactory.h) | 6 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/settingsdialog.cpp (renamed from lib/qmmp/Output/alsa/settingsdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/settingsdialog.h (renamed from lib/qmmp/Output/alsa/settingsdialog.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/settingsdialog.ui (renamed from lib/qmmp/Output/alsa/settingsdialog.ui) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/translations/alsa_plugin_cs.ts | 90 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/translations/alsa_plugin_ru.qm (renamed from lib/qmmp/Output/alsa/translations/alsa_plugin_ru.qm) | bin | 1580 -> 1580 bytes | |||
| -rw-r--r-- | src/plugins/Output/alsa/translations/alsa_plugin_ru.ts (renamed from lib/qmmp/Output/alsa/translations/alsa_plugin_ru.ts) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/alsa/translations/translations.qrc (renamed from lib/qmmp/Output/alsa/translations/translations.qrc) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/jack/CMakeLists.txt (renamed from lib/qmmp/Output/jack/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/jack/bio2jack.c (renamed from lib/qmmp/Output/jack/bio2jack.c) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/jack/bio2jack.h (renamed from lib/qmmp/Output/jack/bio2jack.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/jack/jack.pro (renamed from lib/qmmp/Output/jack/jack.pro) | 12 | ||||
| -rw-r--r-- | src/plugins/Output/jack/outputjack.cpp (renamed from lib/qmmp/Output/jack/outputjack.cpp) | 2 | ||||
| -rw-r--r-- | src/plugins/Output/jack/outputjack.h (renamed from lib/qmmp/Output/jack/outputjack.h) | 2 | ||||
| -rw-r--r-- | src/plugins/Output/jack/outputjackfactory.cpp (renamed from lib/qmmp/Output/jack/outputjackfactory.cpp) | 11 | ||||
| -rw-r--r-- | src/plugins/Output/jack/outputjackfactory.h (renamed from lib/qmmp/Output/jack/outputjackfactory.h) | 4 | ||||
| -rw-r--r-- | src/plugins/Output/jack/translations/jack_plugin_ru.qm (renamed from lib/qmmp/Output/jack/translations/jack_plugin_ru.qm) | bin | 540 -> 540 bytes | |||
| -rw-r--r-- | src/plugins/Output/jack/translations/jack_plugin_ru.ts (renamed from lib/qmmp/Output/jack/translations/jack_plugin_ru.ts) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/jack/translations/translations.qrc (renamed from lib/qmmp/Output/jack/translations/translations.qrc) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/oss/CMakeLists.txt (renamed from lib/qmmp/Output/oss/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/oss/oss.pro (renamed from lib/qmmp/Output/oss/oss.pro) | 11 | ||||
| -rw-r--r-- | src/plugins/Output/oss/outputoss.cpp (renamed from lib/qmmp/Output/oss/outputoss.cpp) | 29 | ||||
| -rw-r--r-- | src/plugins/Output/oss/outputoss.h (renamed from lib/qmmp/Output/oss/outputoss.h) | 1 | ||||
| -rw-r--r-- | src/plugins/Output/oss/outputossfactory.cpp (renamed from lib/qmmp/Output/oss/outputossfactory.cpp) | 11 | ||||
| -rw-r--r-- | src/plugins/Output/oss/outputossfactory.h (renamed from lib/qmmp/Output/oss/outputossfactory.h) | 4 | ||||
| -rw-r--r-- | src/plugins/Output/oss/settingsdialog.cpp (renamed from lib/qmmp/Output/oss/settingsdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/oss/settingsdialog.h (renamed from lib/qmmp/Output/oss/settingsdialog.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/oss/settingsdialog.ui (renamed from lib/qmmp/Output/oss/settingsdialog.ui) | 0 | ||||
| -rw-r--r-- | src/plugins/Output/oss/translations/oss_plugin_cs.ts (renamed from lib/qmmp/Output/oss/translations/oss_plugin_cs.ts) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/CMakeLists.txt (renamed from lib/qmmp/Visual/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/Visual.pro (renamed from lib/qmmp/Visual/Visual.pro) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/CMakeLists.txt (renamed from lib/qmmp/Visual/analyzer/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/analyzer.cpp (renamed from lib/qmmp/Visual/analyzer/analyzer.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/analyzer.h (renamed from lib/qmmp/Visual/analyzer/analyzer.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/analyzer.pro (renamed from lib/qmmp/Visual/analyzer/analyzer.pro) | 12 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/colorwidget.cpp (renamed from lib/qmmp/Visual/analyzer/colorwidget.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/colorwidget.h (renamed from lib/qmmp/Visual/analyzer/colorwidget.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/fft.c (renamed from lib/qmmp/Visual/analyzer/fft.c) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/fft.h (renamed from lib/qmmp/Visual/analyzer/fft.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/inlines.h (renamed from lib/qmmp/Visual/analyzer/inlines.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/settingsdialog.cpp (renamed from lib/qmmp/Visual/analyzer/settingsdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/settingsdialog.h (renamed from lib/qmmp/Visual/analyzer/settingsdialog.h) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/settingsdialog.ui (renamed from lib/qmmp/Visual/analyzer/settingsdialog.ui) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/visualanalyzerfactory.cpp (renamed from lib/qmmp/Visual/analyzer/visualanalyzerfactory.cpp) | 0 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/visualanalyzerfactory.h (renamed from lib/qmmp/Visual/analyzer/visualanalyzerfactory.h) | 0 | ||||
| -rw-r--r-- | src/plugins/plugins.pri | 2 | ||||
| -rw-r--r-- | src/plugins/plugins.pro (renamed from lib/qmmp/qmmp.pro) | 3 | ||||
| -rw-r--r-- | src/qmmp/CMakeLists.txt (renamed from lib/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | src/qmmp/buffer.h (renamed from lib/buffer.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/constants.h (renamed from lib/constants.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/decoder.cpp (renamed from lib/decoder.cpp) | 52 | ||||
| -rw-r--r-- | src/qmmp/decoder.h (renamed from lib/decoder.h) | 7 | ||||
| -rw-r--r-- | src/qmmp/decoderfactory.h (renamed from lib/decoderfactory.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/downloader.cpp (renamed from lib/downloader.cpp) | 22 | ||||
| -rw-r--r-- | src/qmmp/downloader.h (renamed from lib/downloader.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/effect.cpp (renamed from lib/effect.cpp) | 0 | ||||
| -rw-r--r-- | src/qmmp/effect.h (renamed from lib/effect.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/effectfactory.h (renamed from lib/effectfactory.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/equ/iir.c (renamed from lib/equ/iir.c) | 0 | ||||
| -rw-r--r-- | src/qmmp/equ/iir.h (renamed from lib/equ/iir.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/equ/iir_cfs.c (renamed from lib/equ/iir_cfs.c) | 0 | ||||
| -rw-r--r-- | src/qmmp/equ/iir_cfs.h (renamed from lib/equ/iir_cfs.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/equ/iir_fpu.c (renamed from lib/equ/iir_fpu.c) | 0 | ||||
| -rw-r--r-- | src/qmmp/equ/iir_fpu.h (renamed from lib/equ/iir_fpu.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/filetag.cpp (renamed from lib/filetag.cpp) | 0 | ||||
| -rw-r--r-- | src/qmmp/filetag.h (renamed from lib/filetag.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/output.cpp (renamed from lib/output.cpp) | 65 | ||||
| -rw-r--r-- | src/qmmp/output.h (renamed from lib/output.h) | 19 | ||||
| -rw-r--r-- | src/qmmp/outputfactory.h (renamed from lib/outputfactory.h) | 15 | ||||
| -rw-r--r-- | src/qmmp/qmmp.pro (renamed from lib/lib.pro) | 4 | ||||
| -rw-r--r-- | src/qmmp/recycler.cpp (renamed from lib/recycler.cpp) | 0 | ||||
| -rw-r--r-- | src/qmmp/recycler.h (renamed from lib/recycler.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/soundcore.cpp (renamed from lib/soundcore.cpp) | 53 | ||||
| -rw-r--r-- | src/qmmp/soundcore.h (renamed from lib/soundcore.h) | 2 | ||||
| -rw-r--r-- | src/qmmp/streamreader.cpp (renamed from lib/streamreader.cpp) | 0 | ||||
| -rw-r--r-- | src/qmmp/streamreader.h (renamed from lib/streamreader.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/visual.cpp (renamed from lib/visual.cpp) | 0 | ||||
| -rw-r--r-- | src/qmmp/visual.h (renamed from lib/visual.h) | 0 | ||||
| -rw-r--r-- | src/qmmp/visualfactory.h (renamed from lib/visualfactory.h) | 0 | ||||
| -rw-r--r-- | src/qmmpui/general.cpp | 157 | ||||
| -rw-r--r-- | src/qmmpui/general.h | 86 | ||||
| -rw-r--r-- | src/qmmpui/generalfactory.h | 52 | ||||
| -rw-r--r-- | src/qmmpui/generalhandler.cpp | 143 | ||||
| -rw-r--r-- | src/qmmpui/generalhandler.h | 69 | ||||
| -rw-r--r-- | src/qmmpui/qmmpui.pro | 38 | ||||
| -rw-r--r-- | src/qmmpui/songinfo.cpp | 137 | ||||
| -rw-r--r-- | src/qmmpui/songinfo.h | 76 | ||||
| -rw-r--r-- | src/ui/aboutdialog.cpp (renamed from src/aboutdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/aboutdialog.h (renamed from src/aboutdialog.h) | 0 | ||||
| -rw-r--r-- | src/ui/addurldialog.cpp (renamed from src/addurldialog.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/addurldialog.h (renamed from src/addurldialog.h) | 0 | ||||
| -rw-r--r-- | src/ui/balancebar.cpp (renamed from src/balancebar.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/balancebar.h (renamed from src/balancebar.h) | 0 | ||||
| -rw-r--r-- | src/ui/button.cpp (renamed from src/button.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/button.h (renamed from src/button.h) | 0 | ||||
| -rw-r--r-- | src/ui/commandlineoption.cpp | 216 | ||||
| -rw-r--r-- | src/ui/commandlineoption.h | 94 | ||||
| -rw-r--r-- | src/ui/configdialog.cpp (renamed from src/configdialog.cpp) | 86 | ||||
| -rw-r--r-- | src/ui/configdialog.h (renamed from src/configdialog.h) | 2 | ||||
| -rw-r--r-- | src/ui/default/balance.png (renamed from src/default/balance.png) | bin | 1464 -> 1464 bytes | |||
| -rw-r--r-- | src/ui/default/cbuttons.png (renamed from src/default/cbuttons.png) | bin | 3148 -> 3148 bytes | |||
| -rw-r--r-- | src/ui/default/eq_ex.png (renamed from src/default/eq_ex.png) | bin | 4423 -> 4423 bytes | |||
| -rw-r--r-- | src/ui/default/eqmain.png (renamed from src/default/eqmain.png) | bin | 34985 -> 34985 bytes | |||
| -rw-r--r-- | src/ui/default/main.png (renamed from src/default/main.png) | bin | 25055 -> 25055 bytes | |||
| -rw-r--r-- | src/ui/default/monoster.png (renamed from src/default/monoster.png) | bin | 1060 -> 1060 bytes | |||
| -rw-r--r-- | src/ui/default/numbers.png (renamed from src/default/numbers.png) | bin | 210 -> 210 bytes | |||
| -rw-r--r-- | src/ui/default/playpaus.png (renamed from src/default/playpaus.png) | bin | 179 -> 179 bytes | |||
| -rw-r--r-- | src/ui/default/pledit.png (renamed from src/default/pledit.png) | bin | 19730 -> 19730 bytes | |||
| -rw-r--r-- | src/ui/default/pledit.txt (renamed from src/default/pledit.txt) | 2 | ||||
| -rw-r--r-- | src/ui/default/posbar.png (renamed from src/default/posbar.png) | bin | 3279 -> 3279 bytes | |||
| -rw-r--r-- | src/ui/default/shufrep.png (renamed from src/default/shufrep.png) | bin | 2560 -> 2560 bytes | |||
| -rw-r--r-- | src/ui/default/text.png (renamed from src/default/text.png) | bin | 525 -> 525 bytes | |||
| -rw-r--r-- | src/ui/default/titlebar.png (renamed from src/default/titlebar.png) | bin | 11329 -> 11329 bytes | |||
| -rw-r--r-- | src/ui/default/viscolor.txt (renamed from src/default/viscolor.txt) | 2 | ||||
| -rw-r--r-- | src/ui/default/volume.png (renamed from src/default/volume.png) | bin | 1727 -> 1727 bytes | |||
| -rw-r--r-- | src/ui/display.cpp (renamed from src/display.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/display.h (renamed from src/display.h) | 0 | ||||
| -rw-r--r-- | src/ui/dock.cpp (renamed from src/dock.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/dock.h (renamed from src/dock.h) | 0 | ||||
| -rw-r--r-- | src/ui/eqgraph.cpp (renamed from src/eqgraph.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/eqgraph.h (renamed from src/eqgraph.h) | 0 | ||||
| -rw-r--r-- | src/ui/eqpreset.cpp (renamed from src/eqpreset.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/eqpreset.h (renamed from src/eqpreset.h) | 0 | ||||
| -rw-r--r-- | src/ui/eqslider.cpp (renamed from src/eqslider.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/eqslider.h (renamed from src/eqslider.h) | 0 | ||||
| -rw-r--r-- | src/ui/eqtitlebar.cpp (renamed from src/eqtitlebar.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/eqtitlebar.h (renamed from src/eqtitlebar.h) | 0 | ||||
| -rw-r--r-- | src/ui/eqwidget.cpp (renamed from src/eqwidget.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/eqwidget.h (renamed from src/eqwidget.h) | 0 | ||||
| -rw-r--r-- | src/ui/fft.c (renamed from src/fft.c) | 0 | ||||
| -rw-r--r-- | src/ui/fft.h (renamed from src/fft.h) | 0 | ||||
| -rw-r--r-- | src/ui/filedialog.cpp (renamed from src/filedialog.cpp) | 13 | ||||
| -rw-r--r-- | src/ui/filedialog.h (renamed from src/filedialog.h) | 4 | ||||
| -rw-r--r-- | src/ui/fileloader.cpp (renamed from src/fileloader.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/fileloader.h (renamed from src/fileloader.h) | 0 | ||||
| -rw-r--r-- | src/ui/forms/aboutdialog.ui (renamed from src/aboutdialog.ui) | 0 | ||||
| -rw-r--r-- | src/ui/forms/addurldialog.ui (renamed from src/addurldialog.ui) | 0 | ||||
| -rw-r--r-- | src/ui/forms/configdialog.ui (renamed from src/configdialog.ui) | 228 | ||||
| -rw-r--r-- | src/ui/forms/jumptotrackdialog.ui (renamed from src/jumptotrackdialog.ui) | 0 | ||||
| -rw-r--r-- | src/ui/forms/preseteditor.ui (renamed from src/preseteditor.ui) | 0 | ||||
| -rw-r--r-- | src/ui/html/about_cs.html (renamed from src/html/about_cs.html) | 0 | ||||
| -rw-r--r-- | src/ui/html/about_en.html (renamed from src/html/about_en.html) | 0 | ||||
| -rw-r--r-- | src/ui/html/about_ru.html (renamed from src/html/about_ru.html) | 0 | ||||
| -rw-r--r-- | src/ui/html/about_zh_CN.html (renamed from src/html/about_zh_CN.html) | 0 | ||||
| -rw-r--r-- | src/ui/html/authors_cs.txt (renamed from src/html/authors_cs.txt) | 0 | ||||
| -rw-r--r-- | src/ui/html/authors_en.txt (renamed from src/html/authors_en.txt) | 0 | ||||
| -rw-r--r-- | src/ui/html/authors_ru.txt (renamed from src/html/authors_ru.txt) | 0 | ||||
| -rw-r--r-- | src/ui/html/authors_zh_CN.txt (renamed from src/html/authors_zh_CN.txt) | 0 | ||||
| -rw-r--r-- | src/ui/html/thanks_cs.txt (renamed from src/html/thanks_cs.txt) | 0 | ||||
| -rw-r--r-- | src/ui/html/thanks_en.txt (renamed from src/html/thanks_en.txt) | 0 | ||||
| -rw-r--r-- | src/ui/html/thanks_ru.txt (renamed from src/html/thanks_ru.txt) | 0 | ||||
| -rw-r--r-- | src/ui/html/thanks_zh_CN.txt (renamed from src/html/thanks_zh_CN.txt) | 0 | ||||
| -rw-r--r-- | src/ui/images/advanced.png | bin | 0 -> 1420 bytes | |||
| -rw-r--r-- | src/ui/images/images.qrc (renamed from src/images/images.qrc) | 4 | ||||
| -rw-r--r-- | src/ui/images/interface.png | bin | 0 -> 1439 bytes | |||
| -rw-r--r-- | src/ui/images/logo-qmmp.png (renamed from src/images/logo-qmmp.png) | bin | 61213 -> 61213 bytes | |||
| -rw-r--r-- | src/ui/images/network.png | bin | 0 -> 1953 bytes | |||
| -rw-r--r-- | src/ui/images/playlist.png | bin | 0 -> 1085 bytes | |||
| -rw-r--r-- | src/ui/images/plugins.png | bin | 0 -> 2237 bytes | |||
| -rw-r--r-- | src/ui/images/qmmp.xpm (renamed from src/images/qmmp.xpm) | 0 | ||||
| -rw-r--r-- | src/ui/inlines.h (renamed from src/inlines.h) | 0 | ||||
| -rw-r--r-- | src/ui/jumptotrackdialog.cpp (renamed from src/jumptotrackdialog.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/jumptotrackdialog.h (renamed from src/jumptotrackdialog.h) | 0 | ||||
| -rw-r--r-- | src/ui/keyboardmanager.cpp (renamed from src/keyboardmanager.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/keyboardmanager.h (renamed from src/keyboardmanager.h) | 0 | ||||
| -rw-r--r-- | src/ui/listwidget.cpp (renamed from src/listwidget.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/listwidget.h (renamed from src/listwidget.h) | 0 | ||||
| -rw-r--r-- | src/ui/logscale.cpp (renamed from src/logscale.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/logscale.h (renamed from src/logscale.h) | 0 | ||||
| -rw-r--r-- | src/ui/mainvisual.cpp (renamed from src/mainvisual.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/mainvisual.h (renamed from src/mainvisual.h) | 0 | ||||
| -rw-r--r-- | src/ui/mainwindow.cpp (renamed from src/mainwindow.cpp) | 151 | ||||
| -rw-r--r-- | src/ui/mainwindow.h (renamed from src/mainwindow.h) | 35 | ||||
| -rw-r--r-- | src/ui/mediafile.cpp (renamed from src/mediafile.cpp) | 7 | ||||
| -rw-r--r-- | src/ui/mediafile.h (renamed from src/mediafile.h) | 1 | ||||
| -rw-r--r-- | src/ui/monostereo.cpp (renamed from src/monostereo.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/monostereo.h (renamed from src/monostereo.h) | 0 | ||||
| -rw-r--r-- | src/ui/mp3player.cpp (renamed from src/mp3player.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/number.cpp (renamed from src/number.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/number.h (renamed from src/number.h) | 0 | ||||
| -rw-r--r-- | src/ui/pixmapwidget.cpp (renamed from src/pixmapwidget.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/pixmapwidget.h (renamed from src/pixmapwidget.h) | 0 | ||||
| -rw-r--r-- | src/ui/playlist.cpp (renamed from src/playlist.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/playlist.h (renamed from src/playlist.h) | 0 | ||||
| -rw-r--r-- | src/ui/playlistcontrol.cpp (renamed from src/playlistcontrol.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/playlistcontrol.h (renamed from src/playlistcontrol.h) | 0 | ||||
| -rw-r--r-- | src/ui/playlistformat.cpp (renamed from src/playlistformat.cpp) | 2 | ||||
| -rw-r--r-- | src/ui/playlistformat.h (renamed from src/playlistformat.h) | 4 | ||||
| -rw-r--r-- | src/ui/playlistmodel.cpp (renamed from src/playlistmodel.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/playlistmodel.h (renamed from src/playlistmodel.h) | 0 | ||||
| -rw-r--r-- | src/ui/playlistslider.cpp (renamed from src/playlistslider.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/playlistslider.h (renamed from src/playlistslider.h) | 0 | ||||
| -rw-r--r-- | src/ui/playlisttitlebar.cpp (renamed from src/playlisttitlebar.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/playlisttitlebar.h (renamed from src/playlisttitlebar.h) | 0 | ||||
| -rw-r--r-- | src/ui/playstate.cpp (renamed from src/playstate.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/playstate.h (renamed from src/playstate.h) | 0 | ||||
| -rw-r--r-- | src/ui/playstatus.cpp (renamed from src/playstatus.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/playstatus.h (renamed from src/playstatus.h) | 0 | ||||
| -rw-r--r-- | src/ui/pluginitem.cpp (renamed from src/pluginitem.cpp) | 30 | ||||
| -rw-r--r-- | src/ui/pluginitem.h (renamed from src/pluginitem.h) | 20 | ||||
| -rw-r--r-- | src/ui/positionbar.cpp (renamed from src/positionbar.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/positionbar.h (renamed from src/positionbar.h) | 0 | ||||
| -rw-r--r-- | src/ui/preseteditor.cpp (renamed from src/preseteditor.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/preseteditor.h (renamed from src/preseteditor.h) | 0 | ||||
| -rw-r--r-- | src/ui/qmmpstarter.cpp (renamed from src/qmmpstarter.cpp) | 28 | ||||
| -rw-r--r-- | src/ui/qmmpstarter.h (renamed from src/qmmpstarter.h) | 3 | ||||
| -rw-r--r-- | src/ui/shadedbar.cpp (renamed from src/shadedbar.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/shadedbar.h (renamed from src/shadedbar.h) | 0 | ||||
| -rw-r--r-- | src/ui/shadedvisual.cpp (renamed from src/shadedvisual.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/shadedvisual.h (renamed from src/shadedvisual.h) | 0 | ||||
| -rw-r--r-- | src/ui/skin.cpp (renamed from src/skin.cpp) | 2 | ||||
| -rw-r--r-- | src/ui/skin.h (renamed from src/skin.h) | 0 | ||||
| -rw-r--r-- | src/ui/skinreader.cpp (renamed from src/skinreader.cpp) | 6 | ||||
| -rw-r--r-- | src/ui/skinreader.h (renamed from src/skinreader.h) | 2 | ||||
| -rw-r--r-- | src/ui/stuff.qrc (renamed from src/stuff.qrc) | 2 | ||||
| -rw-r--r-- | src/ui/symboldisplay.cpp (renamed from src/symboldisplay.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/symboldisplay.h (renamed from src/symboldisplay.h) | 0 | ||||
| -rw-r--r-- | src/ui/textscroller.cpp (renamed from src/textscroller.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/textscroller.h (renamed from src/textscroller.h) | 0 | ||||
| -rw-r--r-- | src/ui/timeindicator.cpp (renamed from src/timeindicator.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/timeindicator.h (renamed from src/timeindicator.h) | 0 | ||||
| -rw-r--r-- | src/ui/titlebar.cpp (renamed from src/titlebar.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/titlebar.h (renamed from src/titlebar.h) | 0 | ||||
| -rw-r--r-- | src/ui/titlebarcontrol.cpp (renamed from src/titlebarcontrol.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/titlebarcontrol.h (renamed from src/titlebarcontrol.h) | 0 | ||||
| -rw-r--r-- | src/ui/togglebutton.cpp (renamed from src/togglebutton.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/togglebutton.h (renamed from src/togglebutton.h) | 0 | ||||
| -rw-r--r-- | src/ui/translations/qmmp_cs.ts (renamed from src/translations/qmmp_cs.ts) | 0 | ||||
| -rw-r--r-- | src/ui/translations/qmmp_locales.qrc (renamed from src/translations/qmmp_locales.qrc) | 0 | ||||
| -rw-r--r-- | src/ui/translations/qmmp_ru.qm (renamed from src/translations/qmmp_ru.qm) | bin | 8812 -> 8812 bytes | |||
| -rw-r--r-- | src/ui/translations/qmmp_ru.ts (renamed from src/translations/qmmp_ru.ts) | 0 | ||||
| -rw-r--r-- | src/ui/translations/qmmp_tr.qm (renamed from src/translations/qmmp_tr.qm) | bin | 8960 -> 8960 bytes | |||
| -rw-r--r-- | src/ui/translations/qmmp_tr.ts (renamed from src/translations/qmmp_tr.ts) | 0 | ||||
| -rw-r--r-- | src/ui/translations/qmmp_zh_CN.qm (renamed from src/translations/qmmp_zh_CN.qm) | bin | 7081 -> 7081 bytes | |||
| -rw-r--r-- | src/ui/translations/qmmp_zh_CN.ts (renamed from src/translations/qmmp_zh_CN.ts) | 0 | ||||
| -rw-r--r-- | src/ui/ui.pro (renamed from src/src.pro) | 101 | ||||
| -rw-r--r-- | src/ui/unixdomainsocket.cpp (renamed from src/unixdomainsocket.cpp) | 8 | ||||
| -rw-r--r-- | src/ui/unixdomainsocket.h (renamed from src/unixdomainsocket.h) | 2 | ||||
| -rw-r--r-- | src/ui/version.h (renamed from src/version.h) | 0 | ||||
| -rw-r--r-- | src/ui/visualmenu.cpp (renamed from src/visualmenu.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/visualmenu.h (renamed from src/visualmenu.h) | 0 | ||||
| -rw-r--r-- | src/ui/volumebar.cpp (renamed from src/volumebar.cpp) | 0 | ||||
| -rw-r--r-- | src/ui/volumebar.h (renamed from src/volumebar.h) | 0 |
413 files changed, 7145 insertions, 1465 deletions
diff --git a/bin/qmmp_launcher b/bin/qmmp_launcher index 8e7c68a5a..7813d3546 100755 --- a/bin/qmmp_launcher +++ b/bin/qmmp_launcher @@ -1,6 +1,6 @@ #!/bin/sh MYDIR=$(dirname $0) -LD_LIBRARY_PATH=$MYDIR/../lib:${LD_LIBRARY_PATH} +LD_LIBRARY_PATH=$MYDIR/../lib:$MYDIR/../src/qmmpui:${LD_LIBRARY_PATH} printf '\nSetting LD_LIBRARY_PATH to '$LD_LIBRARY_PATH export LD_LIBRARY_PATH printf '\n'$LD_LIBRARY_PATH diff --git a/lib/qmmp/Input/mad/detailsdialog.cpp b/lib/qmmp/Input/mad/detailsdialog.cpp deleted file mode 100644 index 8e28dda66..000000000 --- a/lib/qmmp/Input/mad/detailsdialog.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * - * forkotov02@hotmail.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#include <QTextCodec> -#include <QSettings> -#include <QDir> -#include <QFile> -#include <QFileInfo> - -#include <taglib/tag.h> -#include <taglib/fileref.h> -#include <taglib/id3v1tag.h> -#include <taglib/id3v2tag.h> -#include <taglib/tfile.h> -#include <taglib/mpegfile.h> -#include <taglib/mpegheader.h> -#include <taglib/mpegproperties.h> - -#include "detailsdialog.h" - -DetailsDialog::DetailsDialog(QWidget *parent, const QString &path) - : QDialog(parent) -{ - ui.setupUi(this); - setAttribute(Qt::WA_DeleteOnClose); - m_path = path; - setWindowTitle (path.section('/',-1)); - ui.pathLineEdit->setText(m_path); - - if (!QFile::exists(m_path)) - return; - - QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); - settings.beginGroup("MAD"); - m_codec_v1 = - QTextCodec::codecForName(settings.value("ID3v1_encoding","UTF-8" ) - .toByteArray ()); - m_codec_v2 = - QTextCodec::codecForName(settings.value("ID3v2_encoding","UTF-8" ) - .toByteArray ()); - if (!m_codec_v1) - m_codec_v1 = QTextCodec::codecForName ("UTF-8"); - if (!m_codec_v2) - m_codec_v2 = QTextCodec::codecForName ("UTF-8"); - settings.endGroup(); - - loadMPEGInfo(); - loadID3v1Tag(); - loadID3v2Tag(); - QFileInfo info(m_path); - ui.saveV1Button->setEnabled(info.isWritable()); - ui.saveV2Button->setEnabled(info.isWritable()); -} - - -DetailsDialog::~DetailsDialog() -{} - -void DetailsDialog::loadMPEGInfo() -{ - TagLib::MPEG::File f (m_path.toLocal8Bit()); - //l.label - //ui. f.audioProperties()->level(); - QString text; - text = QString("%1").arg(f.audioProperties()->layer()); - ui.levelLabel->setText("MPEG layer "+text); //TODO: add MPEG version - text = QString("%1").arg(f.audioProperties()->bitrate()); - ui.bitRateLabel->setText(text+" "+tr("kbps")); - text = QString("%1").arg(f.audioProperties()->sampleRate()); - ui.sampleRateLabel->setText(text+" "+tr("Hz")); - switch (f.audioProperties()->channelMode()) - { - case TagLib::MPEG::Header::Stereo: - ui.modeLabel->setText("Stereo"); - break; - case TagLib::MPEG::Header::JointStereo: - ui.modeLabel->setText("Joint stereo"); - break; - case TagLib::MPEG::Header::DualChannel: - ui.modeLabel->setText("Dual channel"); - break; - case TagLib::MPEG::Header::SingleChannel: - ui.modeLabel->setText("Single channel"); - break; - } - text = QString("%1 "+tr("KB")).arg(f.length()/1024); - ui.fileSizeLabel->setText(text); - /*if (f.audioProperties()->protectionEnabled()) - ui.errProtectionLabel->setText(tr("Yes")); - else - ui.errProtectionLabel->setText(tr("No"));*/ - if (f.audioProperties()->isCopyrighted()) - ui.copyrightLabel->setText(tr("Yes")); - else - ui.copyrightLabel->setText(tr("No")); - if (f.audioProperties()->isOriginal()) - ui.originalLabel->setText(tr("Yes")); - else - ui.originalLabel->setText(tr("No")); -} - -void DetailsDialog::loadID3v1Tag() -{ - TagLib::MPEG::File f (m_path.toLocal8Bit()); - - if (f.ID3v1Tag()) - { - bool utf = m_codec_v1->name().contains("UTF"); - TagLib::String title = f.ID3v1Tag()->title(); - TagLib::String artist = f.ID3v1Tag()->artist(); - TagLib::String album = f.ID3v1Tag()->album(); - TagLib::String comment = f.ID3v1Tag()->comment(); - TagLib::String genre = f.ID3v1Tag()->genre(); - QString string = m_codec_v1->toUnicode(title.toCString(utf)).trimmed(); - ui.titleLineEdit_v1->setText(string); - string = m_codec_v1->toUnicode(artist.toCString(utf)).trimmed(); - ui.artistLineEdit_v1->setText(string); - string = m_codec_v1->toUnicode(album.toCString(utf)).trimmed(); - ui.albumLineEdit_v1->setText(string); - string = m_codec_v1->toUnicode(comment.toCString(utf)).trimmed(); - ui.commentLineEdit_v1->setText(string); - string = QString("%1").arg(f.ID3v1Tag()->year()); - ui.yearLineEdit_v1->setText(string); - string = QString("%1").arg(f.ID3v1Tag()->track()); - ui.trackLineEdit_v1->setText(string); - string = m_codec_v1->toUnicode(genre.toCString(utf)).trimmed(); - ui.genreLineEdit_v1->setText(string); - } - connect(ui.saveV1Button, SIGNAL(clicked()), SLOT(saveID3v1Tag())); -} - -void DetailsDialog::loadID3v2Tag() -{ - TagLib::MPEG::File f (m_path.toLocal8Bit()); - - if (f.ID3v2Tag()) - { - bool utf = m_codec_v2->name().contains("UTF"); - TagLib::String title = f.ID3v2Tag()->title(); - TagLib::String artist = f.ID3v2Tag()->artist(); - TagLib::String album = f.ID3v2Tag()->album(); - TagLib::String comment = f.ID3v2Tag()->comment(); - TagLib::String genre = f.ID3v2Tag()->genre(); - QString string = m_codec_v2->toUnicode(title.toCString(utf)).trimmed(); - ui.titleLineEdit_v2->setText(string); - string = m_codec_v2->toUnicode(artist.toCString(utf)).trimmed(); - ui.artistLineEdit_v2->setText(string); - string = m_codec_v2->toUnicode(album.toCString(utf)).trimmed(); - ui.albumLineEdit_v2->setText(string); - string = m_codec_v2->toUnicode(comment.toCString(utf)).trimmed(); - ui.commentLineEdit_v2->setText(string); - string = QString("%1").arg(f.ID3v2Tag()->year()); - ui.yearLineEdit_v2->setText(string); - string = QString("%1").arg(f.ID3v2Tag()->track()); - ui.trackLineEdit_v2->setText(string); - string = m_codec_v2->toUnicode(genre.toCString(utf)).trimmed(); - ui.genreLineEdit_v2->setText(string); - } - connect(ui.saveV2Button, SIGNAL(clicked()), SLOT(saveID3v2Tag())); -} - -void DetailsDialog::saveID3v1Tag() -{ - TagLib::MPEG::File f (m_path.toLocal8Bit()); - - TagLib::String::Type type = TagLib::String::Latin1; - - if (m_codec_v1->name().contains("UTF")) - return; - - f.ID3v1Tag(TRUE)->setTitle(TagLib::String(m_codec_v1->fromUnicode(ui.titleLineEdit_v1->text()).constData(), type)); - f.ID3v1Tag()->setArtist(TagLib::String(m_codec_v1->fromUnicode(ui.artistLineEdit_v1->text()).constData(), type)); - f.ID3v1Tag()->setAlbum(TagLib::String(m_codec_v1->fromUnicode(ui.albumLineEdit_v1->text()).constData(), type)); - f.ID3v1Tag()->setComment(TagLib::String(m_codec_v1->fromUnicode(ui.commentLineEdit_v1->text()).constData(), type)); - f.ID3v1Tag()->setGenre(TagLib::String(m_codec_v1->fromUnicode(ui.genreLineEdit_v1->text()).constData(), type)); - f.ID3v1Tag()->setYear(ui.yearLineEdit_v1->text().toUInt()); - f.ID3v1Tag()->setTrack(ui.trackLineEdit_v1->text().toUInt()); - - f.save(); -} - -void DetailsDialog::saveID3v2Tag() -{ - TagLib::MPEG::File f (m_path.toLocal8Bit()); - - TagLib::String::Type type = TagLib::String::Latin1; - - if (m_codec_v2->name().contains("UTF")) - { - TagLib::ID3v2::FrameFactory *factory = TagLib::ID3v2::FrameFactory::instance(); - factory->setDefaultTextEncoding(TagLib::String::UTF8); - f.setID3v2FrameFactory(factory); - type = TagLib::String::UTF8; - } - - f.ID3v2Tag(TRUE)->setTitle(TagLib::String(m_codec_v2->fromUnicode(ui.titleLineEdit_v2->text()).constData(), type)); - f.ID3v2Tag()->setArtist(TagLib::String(m_codec_v2->fromUnicode(ui.artistLineEdit_v2->text()).constData(), type)); - f.ID3v2Tag()->setAlbum(TagLib::String(m_codec_v2->fromUnicode(ui.albumLineEdit_v2->text()).constData(), type)); - f.ID3v2Tag()->setComment(TagLib::String(m_codec_v2->fromUnicode(ui.commentLineEdit_v2->text()).constData(), type)); - f.ID3v2Tag()->setGenre(TagLib::String(m_codec_v2->fromUnicode(ui.genreLineEdit_v2->text()).constData(), type)); - f.ID3v2Tag()->setYear(ui.yearLineEdit_v2->text().toUInt()); - f.ID3v2Tag()->setTrack(ui.trackLineEdit_v2->text().toUInt()); - - f.save(); -} diff --git a/lib/qmmp/Input/mad/detailsdialog.ui b/lib/qmmp/Input/mad/detailsdialog.ui deleted file mode 100644 index 7257a3685..000000000 --- a/lib/qmmp/Input/mad/detailsdialog.ui +++ /dev/null @@ -1,487 +0,0 @@ -<ui version="4.0" > - <class>DetailsDialog</class> - <widget class="QDialog" name="DetailsDialog" > - <property name="geometry" > - <rect> - <x>0</x> - <y>0</y> - <width>709</width> - <height>375</height> - </rect> - </property> - <property name="windowTitle" > - <string>Details</string> - </property> - <layout class="QGridLayout" > - <property name="margin" > - <number>9</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item rowspan="2" row="1" column="0" > - <widget class="QGroupBox" name="groupBox" > - <property name="minimumSize" > - <size> - <width>200</width> - <height>16</height> - </size> - </property> - <property name="title" > - <string>MPEG Info</string> - </property> - <layout class="QGridLayout" > - <property name="margin" > - <number>9</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item row="7" column="0" > - <spacer> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>85</height> - </size> - </property> - </spacer> - </item> - <item row="3" column="0" > - <widget class="QLabel" name="label_5" > - <property name="text" > - <string>File size:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="2" column="1" > - <widget class="QLabel" name="sampleRateLabel" > - <property name="text" > - <string>-</string> - </property> - </widget> - </item> - <item row="2" column="0" > - <widget class="QLabel" name="label_3" > - <property name="text" > - <string>Sample rate:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="1" column="0" > - <widget class="QLabel" name="label_2" > - <property name="text" > - <string>Bit rate:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="1" column="1" > - <widget class="QLabel" name="bitRateLabel" > - <property name="text" > - <string>-</string> - </property> - </widget> - </item> - <item row="4" column="1" > - <widget class="QLabel" name="modeLabel" > - <property name="text" > - <string>-</string> - </property> - </widget> - </item> - <item row="3" column="1" > - <widget class="QLabel" name="fileSizeLabel" > - <property name="text" > - <string>-</string> - </property> - </widget> - </item> - <item row="0" column="0" > - <widget class="QLabel" name="label" > - <property name="text" > - <string>MPEG level:</string> - </property> - <property name="textFormat" > - <enum>Qt::AutoText</enum> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="0" column="1" > - <widget class="QLabel" name="levelLabel" > - <property name="text" > - <string>-</string> - </property> - </widget> - </item> - <item row="4" column="0" > - <widget class="QLabel" name="label_6" > - <property name="text" > - <string>Mode:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="5" column="0" > - <widget class="QLabel" name="label_8" > - <property name="text" > - <string>Copyright:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="5" column="1" > - <widget class="QLabel" name="copyrightLabel" > - <property name="text" > - <string>-</string> - </property> - </widget> - </item> - <item row="6" column="1" > - <widget class="QLabel" name="originalLabel" > - <property name="text" > - <string>-</string> - </property> - </widget> - </item> - <item row="6" column="0" > - <widget class="QLabel" name="label_9" > - <property name="text" > - <string>Original:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="1" column="1" > - <widget class="QGroupBox" name="groupBox_2" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>5</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title" > - <string>ID3v1 Tag</string> - </property> - <layout class="QGridLayout" > - <property name="margin" > - <number>8</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item row="6" column="1" colspan="2" > - <widget class="QPushButton" name="saveV1Button" > - <property name="enabled" > - <bool>false</bool> - </property> - <property name="text" > - <string>Save</string> - </property> - </widget> - </item> - <item row="4" column="3" > - <widget class="QLineEdit" name="trackLineEdit_v1" /> - </item> - <item row="4" column="2" > - <widget class="QLabel" name="label_26" > - <property name="text" > - <string>Track number:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="4" column="1" > - <widget class="QLineEdit" name="yearLineEdit_v1" /> - </item> - <item row="4" column="0" > - <widget class="QLabel" name="label_25" > - <property name="text" > - <string>Year:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="5" column="0" > - <widget class="QLabel" name="label_27" > - <property name="text" > - <string>Genre:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="3" column="0" > - <widget class="QLabel" name="label_24" > - <property name="text" > - <string>Comment:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="2" column="0" > - <widget class="QLabel" name="label_23" > - <property name="text" > - <string>Album:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="1" column="0" > - <widget class="QLabel" name="label_22" > - <property name="text" > - <string>Artist:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="0" column="0" > - <widget class="QLabel" name="label_21" > - <property name="text" > - <string>Title:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="0" column="1" colspan="3" > - <widget class="QLineEdit" name="titleLineEdit_v1" /> - </item> - <item row="1" column="1" colspan="3" > - <widget class="QLineEdit" name="artistLineEdit_v1" /> - </item> - <item row="2" column="1" colspan="3" > - <widget class="QLineEdit" name="albumLineEdit_v1" /> - </item> - <item row="3" column="1" colspan="3" > - <widget class="QLineEdit" name="commentLineEdit_v1" /> - </item> - <item row="5" column="1" colspan="2" > - <widget class="QLineEdit" name="genreLineEdit_v1" /> - </item> - </layout> - </widget> - </item> - <item row="2" column="2" > - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" > - <size> - <width>111</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="2" column="3" > - <widget class="QPushButton" name="pushButton_3" > - <property name="text" > - <string>Close</string> - </property> - </widget> - </item> - <item row="1" column="2" colspan="2" > - <widget class="QGroupBox" name="groupBox_2_2" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>5</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title" > - <string>ID3v2 Tag</string> - </property> - <layout class="QGridLayout" > - <property name="margin" > - <number>8</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item row="4" column="3" > - <widget class="QLineEdit" name="trackLineEdit_v2" /> - </item> - <item row="4" column="2" > - <widget class="QLabel" name="label_26_3" > - <property name="text" > - <string>Track number:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="4" column="1" > - <widget class="QLineEdit" name="yearLineEdit_v2" /> - </item> - <item row="4" column="0" > - <widget class="QLabel" name="label_25_3" > - <property name="text" > - <string>Year:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="5" column="0" > - <widget class="QLabel" name="label_27_3" > - <property name="text" > - <string>Genre:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="3" column="0" > - <widget class="QLabel" name="label_24_3" > - <property name="text" > - <string>Comment:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="2" column="0" > - <widget class="QLabel" name="label_23_3" > - <property name="text" > - <string>Album:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="1" column="0" > - <widget class="QLabel" name="label_22_3" > - <property name="text" > - <string>Artist:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="0" column="0" > - <widget class="QLabel" name="label_21_3" > - <property name="text" > - <string>Title:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="0" column="1" colspan="3" > - <widget class="QLineEdit" name="titleLineEdit_v2" /> - </item> - <item row="1" column="1" colspan="3" > - <widget class="QLineEdit" name="artistLineEdit_v2" /> - </item> - <item row="2" column="1" colspan="3" > - <widget class="QLineEdit" name="albumLineEdit_v2" /> - </item> - <item row="3" column="1" colspan="3" > - <widget class="QLineEdit" name="commentLineEdit_v2" /> - </item> - <item row="5" column="1" colspan="2" > - <widget class="QLineEdit" name="genreLineEdit_v2" /> - </item> - <item row="6" column="1" colspan="2" > - <widget class="QPushButton" name="saveV2Button" > - <property name="enabled" > - <bool>false</bool> - </property> - <property name="text" > - <string>Save</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="0" column="0" > - <widget class="QLabel" name="label_28" > - <property name="text" > - <string>File path:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="0" column="1" colspan="3" > - <widget class="QLineEdit" name="pathLineEdit" > - <property name="readOnly" > - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </widget> - <resources/> - <connections> - <connection> - <sender>pushButton_3</sender> - <signal>clicked()</signal> - <receiver>DetailsDialog</receiver> - <slot>close()</slot> - <hints> - <hint type="sourcelabel" > - <x>623</x> - <y>353</y> - </hint> - <hint type="destinationlabel" > - <x>539</x> - <y>352</y> - </hint> - </hints> - </connection> - </connections> -</ui> @@ -1,9 +1,16 @@ #Common settings for Qmmp build +#Some conf to redirect intermediate stuff in separate dirs +UI_DIR=./.build/ui/ +MOC_DIR=./.build/moc/ +OBJECTS_DIR=./.build/obj + + + #Comment/uncomment this if you want to change plugins list -CONFIG += JACK_PLUGIN -CONFIG += FLAC_PLUGIN -CONFIG += MUSEPACK_PLUGIN -CONFIG += FFMPEG_PLUGIN -CONFIG += OSS_PLUGIN
\ No newline at end of file +#CONFIG += JACK_PLUGIN +#CONFIG += FLAC_PLUGIN +#CONFIG += MUSEPACK_PLUGIN +#CONFIG += FFMPEG_PLUGIN +#CONFIG += OSS_PLUGIN
\ No newline at end of file @@ -1,2 +1,2 @@ TEMPLATE = subdirs -SUBDIRS = lib src lib/qmmp +SUBDIRS = src/qmmp src/qmmpui src/ui src/plugins diff --git a/remove_svn_tags b/remove_svn_tags new file mode 100644 index 000000000..272f26a2b --- /dev/null +++ b/remove_svn_tags @@ -0,0 +1,31 @@ +#!/bin/sh + +###################################### +# Removes svn tags from qmmp package # +###################################### + +rm_dir='.build' + +walk_dirs(){ + + for file in `ls -a` + do + if [ -d $file ] + then + if [ $file == $rm_dir ] + then + echo "Removing $rm_dir directory..." + rm -rf $rm_dir + elif [[ $file != '.' && $file != '..' ]] + then + echo "Entering $file" + cd $file; + walk_dirs; + cd .. + fi + fi + done + +} + +walk_dirs
\ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e0ec01195..be0d02e78 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -79,6 +79,7 @@ SET(libsrc_SRCS shadedvisual.cpp titlebarcontrol.cpp shadedbar.cpp + commandlineoption.cpp ) SET(libsrc_MOC_HDRS @@ -134,6 +135,7 @@ SET(libsrc_MOC_HDRS shadedvisual.h titlebarcontrol.h shadedbar.h + commandlineoption.h ) SET(libsrc_RCCS images/images.qrc stuff.qrc translations/qmmp_locales.qrc) diff --git a/src/images/advanced.png b/src/images/advanced.png Binary files differdeleted file mode 100644 index beb0071b4..000000000 --- a/src/images/advanced.png +++ /dev/null diff --git a/src/images/interface.png b/src/images/interface.png Binary files differdeleted file mode 100644 index 0277801c1..000000000 --- a/src/images/interface.png +++ /dev/null diff --git a/src/images/pause.png b/src/images/pause.png Binary files differdeleted file mode 100644 index 096371d82..000000000 --- a/src/images/pause.png +++ /dev/null diff --git a/src/images/play.png b/src/images/play.png Binary files differdeleted file mode 100644 index 5a4aee976..000000000 --- a/src/images/play.png +++ /dev/null diff --git a/src/images/playlist.png b/src/images/playlist.png Binary files differdeleted file mode 100644 index 0cff0ddcb..000000000 --- a/src/images/playlist.png +++ /dev/null diff --git a/src/images/plugins.png b/src/images/plugins.png Binary files differdeleted file mode 100644 index b08dcac3f..000000000 --- a/src/images/plugins.png +++ /dev/null diff --git a/src/images/stop.png b/src/images/stop.png Binary files differdeleted file mode 100644 index 637137f59..000000000 --- a/src/images/stop.png +++ /dev/null diff --git a/lib/qmmp/CMakeLists.txt b/src/plugins/CMakeLists.txt index 42382b5cd..42382b5cd 100644 --- a/lib/qmmp/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt diff --git a/lib/qmmp/Effect/CMakeLists.txt b/src/plugins/Effect/CMakeLists.txt index a777010b9..a777010b9 100644 --- a/lib/qmmp/Effect/CMakeLists.txt +++ b/src/plugins/Effect/CMakeLists.txt diff --git a/lib/qmmp/Effect/Effect.pro b/src/plugins/Effect/Effect.pro index b03c8a598..b03c8a598 100644 --- a/lib/qmmp/Effect/Effect.pro +++ b/src/plugins/Effect/Effect.pro diff --git a/lib/qmmp/Effect/srconverter/CMakeLists.txt b/src/plugins/Effect/srconverter/CMakeLists.txt index ef95abf79..ef95abf79 100644 --- a/lib/qmmp/Effect/srconverter/CMakeLists.txt +++ b/src/plugins/Effect/srconverter/CMakeLists.txt diff --git a/lib/qmmp/Effect/srconverter/effectsrconverterfactory.cpp b/src/plugins/Effect/srconverter/effectsrconverterfactory.cpp index bd4f93c1b..bd4f93c1b 100644 --- a/lib/qmmp/Effect/srconverter/effectsrconverterfactory.cpp +++ b/src/plugins/Effect/srconverter/effectsrconverterfactory.cpp diff --git a/lib/qmmp/Effect/srconverter/effectsrconverterfactory.h b/src/plugins/Effect/srconverter/effectsrconverterfactory.h index 4112a3af5..4112a3af5 100644 --- a/lib/qmmp/Effect/srconverter/effectsrconverterfactory.h +++ b/src/plugins/Effect/srconverter/effectsrconverterfactory.h diff --git a/lib/qmmp/Effect/srconverter/settingsdialog.cpp b/src/plugins/Effect/srconverter/settingsdialog.cpp index d4e017bba..d4e017bba 100644 --- a/lib/qmmp/Effect/srconverter/settingsdialog.cpp +++ b/src/plugins/Effect/srconverter/settingsdialog.cpp diff --git a/lib/qmmp/Effect/srconverter/settingsdialog.h b/src/plugins/Effect/srconverter/settingsdialog.h index b7c466477..b7c466477 100644 --- a/lib/qmmp/Effect/srconverter/settingsdialog.h +++ b/src/plugins/Effect/srconverter/settingsdialog.h diff --git a/lib/qmmp/Effect/srconverter/settingsdialog.ui b/src/plugins/Effect/srconverter/settingsdialog.ui index e837c9cf0..e837c9cf0 100644 --- a/lib/qmmp/Effect/srconverter/settingsdialog.ui +++ b/src/plugins/Effect/srconverter/settingsdialog.ui diff --git a/lib/qmmp/Effect/srconverter/srconverter.cpp b/src/plugins/Effect/srconverter/srconverter.cpp index 0e733c8c4..0e733c8c4 100644 --- a/lib/qmmp/Effect/srconverter/srconverter.cpp +++ b/src/plugins/Effect/srconverter/srconverter.cpp diff --git a/lib/qmmp/Effect/srconverter/srconverter.h b/src/plugins/Effect/srconverter/srconverter.h index 8c6dcb6d3..8c6dcb6d3 100644 --- a/lib/qmmp/Effect/srconverter/srconverter.h +++ b/src/plugins/Effect/srconverter/srconverter.h diff --git a/lib/qmmp/Effect/srconverter/srconverter.pro b/src/plugins/Effect/srconverter/srconverter.pro index 820cdbe98..af20c1e92 100644 --- a/lib/qmmp/Effect/srconverter/srconverter.pro +++ b/src/plugins/Effect/srconverter/srconverter.pro @@ -1,3 +1,5 @@ +include(../../plugins.pri) + HEADERS += srconverter.h \ effectsrconverterfactory.h \ settingsdialog.h @@ -6,9 +8,9 @@ SOURCES += srconverter.cpp \ effectsrconverterfactory.cpp \ settingsdialog.cpp -DESTDIR = ../ -QMAKE_CLEAN = ../libsrconverter.so -INCLUDEPATH += ../../../ +TARGET=$$PLUGINS_PREFIX/Effect/srconverter +QMAKE_CLEAN =$$PLUGINS_PREFIX/Effect/libsrconverter.so +INCLUDEPATH += ../../../qmmp CONFIG += release \ warn_on \ plugin \ @@ -16,7 +18,7 @@ link_pkgconfig PKGCONFIG += samplerate TEMPLATE = lib -QMAKE_LIBDIR += ../../../ +QMAKE_LIBDIR += ../../../../lib LIBS += -lqmmp -L/usr/lib -I/usr/include #TRANSLATIONS = translations/ffmpeg_plugin_ru.ts @@ -27,7 +29,6 @@ isEmpty(LIB_DIR){ } target.path = $$LIB_DIR/qmmp/Effect INSTALLS += target -#FORMS += settingsdialog.ui FORMS += settingsdialog.ui diff --git a/src/plugins/General/General.pro b/src/plugins/General/General.pro new file mode 100644 index 000000000..11f567452 --- /dev/null +++ b/src/plugins/General/General.pro @@ -0,0 +1,4 @@ +SUBDIRS += statusicon \ + scrobbler \ + dbuscontrol +TEMPLATE = subdirs diff --git a/src/plugins/General/dbuscontrol/dbusadaptor.cpp b/src/plugins/General/dbuscontrol/dbusadaptor.cpp new file mode 100644 index 000000000..77ace9208 --- /dev/null +++ b/src/plugins/General/dbuscontrol/dbusadaptor.cpp @@ -0,0 +1,62 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "dbusadaptor.h" + +DBUSAdaptor::DBUSAdaptor(QObject *parent) + : QDBusAbstractAdaptor(parent) +{ + setAutoRelaySignals(TRUE); +} + +DBUSAdaptor::~DBUSAdaptor() +{ +} + +void DBUSAdaptor::play() +{ + QMetaObject::invokeMethod(parent(), "play"); +} + +void DBUSAdaptor::stop() +{ + QMetaObject::invokeMethod(parent(), "stop"); +} + +void DBUSAdaptor::next() +{ + QMetaObject::invokeMethod(parent(), "next"); +} + +void DBUSAdaptor::previous() +{ + QMetaObject::invokeMethod(parent(), "previous"); +} + +void DBUSAdaptor::pause() +{ + QMetaObject::invokeMethod(parent(), "pause"); +} + +void DBUSAdaptor::exit() +{ + QMetaObject::invokeMethod(parent(), "exit"); +} + + diff --git a/src/plugins/General/dbuscontrol/dbusadaptor.h b/src/plugins/General/dbuscontrol/dbusadaptor.h new file mode 100644 index 000000000..43294e753 --- /dev/null +++ b/src/plugins/General/dbuscontrol/dbusadaptor.h @@ -0,0 +1,47 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef DBUSADAPTOR_H +#define DBUSADAPTOR_H + +#include <QtDBus> + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class DBUSAdaptor : public QDBusAbstractAdaptor +{ +Q_OBJECT +Q_CLASSINFO("D-Bus Interface", "org.qmmp.dbus") +public: + DBUSAdaptor(QObject *parent = 0); + + ~DBUSAdaptor(); + +public slots: + void play(); + void stop(); + void next(); + void previous(); + void pause(); + void exit(); + +}; + +#endif diff --git a/src/plugins/General/dbuscontrol/dbuscontrol.cpp b/src/plugins/General/dbuscontrol/dbuscontrol.cpp new file mode 100644 index 000000000..1133cec7a --- /dev/null +++ b/src/plugins/General/dbuscontrol/dbuscontrol.cpp @@ -0,0 +1,61 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "dbusadaptor.h" +#include "dbuscontrol.h" + +DBUSControl::DBUSControl(QObject *parent) + : General(parent) +{ + new DBUSAdaptor(this); + QDBusConnection connection = QDBusConnection::sessionBus(); + connection.registerObject("/Qmmp", this); + connection.registerService("org.qmmp.dbus"); +} + + +DBUSControl::~DBUSControl() +{} + +void DBUSControl::setState(const uint &state) +{ + switch ((uint) state) + { + case General::Playing: + { + //m_tray->setIcon(QIcon(":/tray_play.png")); + break; + } + case General::Paused: + { + //m_tray->setIcon(QIcon(":/tray_pause.png")); + break; + } + case General::Stopped: + { + //m_tray->setIcon(QIcon(":/tray_stop.png")); + break; + } + } +} + +void DBUSControl::setSongInfo(const SongInfo &song) +{ +} diff --git a/src/plugins/General/dbuscontrol/dbuscontrol.h b/src/plugins/General/dbuscontrol/dbuscontrol.h new file mode 100644 index 000000000..2d5f3c91a --- /dev/null +++ b/src/plugins/General/dbuscontrol/dbuscontrol.h @@ -0,0 +1,43 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef STATUSICON_H +#define STATUSICON_H + + +#include <qmmpui/general.h> + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ + +class DBUSControl : public General +{ +Q_OBJECT +public: + DBUSControl(QObject *parent = 0); + + ~DBUSControl(); + + void setState(const uint& state); + void setSongInfo(const SongInfo &song); + +}; + +#endif diff --git a/src/plugins/General/dbuscontrol/dbuscontrol.pro b/src/plugins/General/dbuscontrol/dbuscontrol.pro new file mode 100644 index 000000000..4ad8e047b --- /dev/null +++ b/src/plugins/General/dbuscontrol/dbuscontrol.pro @@ -0,0 +1,39 @@ +include(../../plugins.pri) + +CONFIG += release \ +warn_on \ +plugin \ + lib \ + qdbus + +TARGET=$$PLUGINS_PREFIX/General/dbuscontrol +QMAKE_CLEAN =$$PLUGINS_PREFIX/General/libdbuscontrol.so + +TEMPLATE = lib +QMAKE_LIBDIR += ../../../../lib + +#TRANSLATIONS = translations/ffmpeg_plugin_ru.ts +#RESOURCES = translations/translations.qrc + +isEmpty(LIB_DIR){ + LIB_DIR = /lib +} +target.path = $$LIB_DIR/qmmp/General +INSTALLS += target +#FORMS += settingsdialog.ui + +#RESOURCES += images/images.qrc + + +HEADERS += dbuscontrolfactory.h \ + dbuscontrol.h \ + dbusadaptor.h + +SOURCES += dbuscontrolfactory.cpp \ + dbuscontrol.cpp \ + dbusadaptor.cpp + +INCLUDEPATH += ../../../../src + +LIBS += -lqmmpui + diff --git a/src/plugins/General/dbuscontrol/dbuscontrolfactory.cpp b/src/plugins/General/dbuscontrol/dbuscontrolfactory.cpp new file mode 100644 index 000000000..922962c67 --- /dev/null +++ b/src/plugins/General/dbuscontrol/dbuscontrolfactory.cpp @@ -0,0 +1,55 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QtGui> + +#include "dbuscontrol.h" +#include "dbuscontrolfactory.h" + +const GeneralProperties DBUSControlFactory::properties() const +{ + GeneralProperties properties; + properties.name = tr("D-Bus Plugin"); + properties.hasAbout = TRUE; + properties.hasSettings = FALSE; + return properties; +} + +General *DBUSControlFactory::create(QObject *parent) +{ + return new DBUSControl(parent); +} + +void DBUSControlFactory::showSettings(QWidget *) +{} + +void DBUSControlFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About D-Bus Plugin"), + tr("Qmmp D-Bus Plugin")+"\n"+ + tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>")); +} + +QTranslator *DBUSControlFactory::createTranslator(QObject *parent) +{ + return 0; +} + +Q_EXPORT_PLUGIN(DBUSControlFactory) diff --git a/src/plugins/General/dbuscontrol/dbuscontrolfactory.h b/src/plugins/General/dbuscontrol/dbuscontrolfactory.h new file mode 100644 index 000000000..98121edec --- /dev/null +++ b/src/plugins/General/dbuscontrol/dbuscontrolfactory.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef STATUSICONFACTORY_H +#define STATUSICONFACTORY_H + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +#include <QObject> +#include <QTranslator> + +#include <qmmpui/general.h> +#include <qmmpui/generalfactory.h> + +class DBUSControlFactory : public QObject, public GeneralFactory +{ +Q_OBJECT +Q_INTERFACES(GeneralFactory); +public: + const GeneralProperties properties() const; + General *create(QObject *parent); + void showSettings(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); + +}; + +#endif diff --git a/src/plugins/General/scrobbler/scrobbler.cpp b/src/plugins/General/scrobbler/scrobbler.cpp new file mode 100644 index 000000000..7713161b7 --- /dev/null +++ b/src/plugins/General/scrobbler/scrobbler.cpp @@ -0,0 +1,259 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QMenu> +#include <QHttp> +#include <QByteArray> +#include <QCryptographicHash> +#include <QUrl> +#include <QTime> +#include <QSettings> +#include <QDir> + +#include "scrobbler.h" + +#define SCROBBLER_HS_URL "post.audioscrobbler.com" +#define PROTOCOL_VER "1.2" +#define CLIENT_ID "qmm" +#define CLIENT_VER "0.1" + +Scrobbler::Scrobbler(QObject *parent) + : General(parent) +{ + m_http = new QHttp(this); + m_http->setHost(SCROBBLER_HS_URL, 80); + m_state = General::Stopped; + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Scrobbler"); + m_login = settings.value("login").toString(); + m_passw = settings.value("password").toString(); + settings.endGroup(); + m_disabled = m_login.isEmpty() || m_passw.isEmpty(); + m_passw = QString(QCryptographicHash::hash(m_passw.toAscii(), QCryptographicHash::Md5).toHex()); + connect(m_http, SIGNAL(requestFinished (int, bool)), SLOT(processResponse(int, bool))); + connect(m_http, SIGNAL(readyRead (const QHttpResponseHeader&)), + SLOT(readResponse(const QHttpResponseHeader&))); + m_time = new QTime(); + m_submitedSongs = 0; + m_handshakeid = 0; + m_submitid = 0; + if (!m_disabled) + handshake(); + //TODO proxy support +} + + +Scrobbler::~Scrobbler() +{ + delete m_time; +} + +void Scrobbler::setState(const uint &state) +{ + m_state = state; + if (m_disabled) + return; + switch ((uint) state) + { + case General::Playing: + { + m_start_ts = time(NULL); + m_time->restart(); + if (!isReady() && m_handshakeid == 0) + handshake(); + break; + } + case General::Paused: + { + break; + } + case General::Stopped: + { + if (!m_song.isEmpty() + && ((m_time->elapsed ()/1000 > 240) + || (m_time->elapsed ()/1000 > int(m_song.length()/2))) + && (m_time->elapsed ()/1000 > 60)) + { + m_songCache << m_song; + m_timeStamps << m_start_ts; + } + + m_song.clear(); + if (m_songCache.isEmpty()) + break; + + if (m_http->error() != QHttp::NoError) + m_http->clearPendingRequests (); + + if (isReady() && m_submitid == 0) + { + submit(); + } + break; + } + } +} + +void Scrobbler::setSongInfo(const SongInfo &song) +{ + if (m_state == General::Playing + && !song.title().isEmpty() //skip empty tags + && !song.artist().isEmpty() + && !song.isStream() //skip stream + && !song.artist().contains("&") //skip tags with special symbols + && !song.title().contains("&") + && !song.album().contains("&") + && !song.artist().contains("=") + && !song.title().contains("=") + && !song.album().contains("=")) + { + m_song = song; + } +} + +void Scrobbler::processResponse(int id, bool error) +{ + if (error) + { + qWarning("Scrobbler: %s", qPrintable(m_http->errorString ())); + //TODO hard failure handling + + if (id == m_submitid) + m_submitid = 0; + else if (id == m_handshakeid) + m_handshakeid = 0; + return; + } + QString str(m_array); + QStringList strlist = str.split("\n"); + + if (id == m_handshakeid) + { + m_handshakeid = 0; + if (!strlist[0].contains("OK") || strlist.size() < 4) + { + qWarning("Scrobbler: handshake phase error: %s", qPrintable(strlist[0])); + //TODO badtime handling + return; + } + if (strlist.size() > 3) //process handshake response + { + qDebug("Scrobbler: reading handshake response"); + qDebug("Scrobbler: Session ID: %s",qPrintable(strlist[1])); + qDebug("Scrobbler: Now-Playing URL: %s",qPrintable(strlist[2])); + qDebug("Scrobbler: Submission URL: %s",qPrintable(strlist[3])); + m_submitUrl = strlist[3]; + m_session = strlist[1]; + return; + } + } + else if (id == m_submitid) + { + m_submitid = 0; + if (!strlist[0].contains("OK")) + { + qWarning("Scrobbler: submit error: %s", qPrintable(strlist[0])); + //TODO badsession handling + return; + } + qWarning("Scrobbler: submited %d song(s)", m_submitedSongs); + while (m_submitedSongs) + { + m_submitedSongs--; + m_timeStamps.removeFirst (); + m_songCache.removeFirst (); + } + } + m_array.clear(); +} + +void Scrobbler::readResponse(const QHttpResponseHeader &header) +{ + if (header.statusCode () != 200) + { + qWarning("Scrobbler: error: %s",qPrintable(header.reasonPhrase ())); + //TODO Failure Handling + return; + } + m_array = m_http->readAll(); +} + +void Scrobbler::handshake() +{ + qDebug("Scrobbler::handshake()"); + time_t ts = time(NULL); + qDebug("Scrobbler: current time stamp %ld",ts); + QString auth_tmp = QString("%1%2").arg(m_passw).arg(ts); + QByteArray auth = QCryptographicHash::hash(auth_tmp.toAscii (), QCryptographicHash::Md5); + auth = auth.toHex(); + + QString url = QString("%1?hs=true&p=%2&c=%3&v=%4&u=%5&t=%6&a=%7") + .arg("/") + .arg(PROTOCOL_VER) + .arg(CLIENT_ID) + .arg(CLIENT_VER) + .arg(m_login) + .arg(ts) + .arg(QString(auth)); + + qDebug("Scrobbler: request url: %s",qPrintable(url)); + m_http->setHost(SCROBBLER_HS_URL, 80); + m_handshakeid = m_http->get(url); +} + +void Scrobbler::submit() +{ + qDebug("Scrobbler::submit()"); + if (m_songCache.isEmpty()) + return; + m_submitedSongs = m_songCache.size(); + QString body = QString("s=%1").arg(m_session); + for (int i = 0; i < qMin(m_songCache.size(), 25); ++i) + { + SongInfo info = m_songCache[i]; + body += QString("&a[%9]=%1&t[%9]=%2&i[%9]=%3&o[%9]=%4&r[%9]=%5&l[%9]=%6&b[%9]=%7&n[%9]=%8&m[%9]=") + .arg(info.artist()) + .arg(info.title()) + .arg( m_timeStamps[i]) + .arg("P") + .arg("") + .arg(info.length()) + .arg(info.album()) + .arg(info.track()) + .arg(i); + } + QUrl url(m_submitUrl); + m_http->setHost(url.host(), url.port()); + QHttpRequestHeader header("POST", url.path()); + header.setContentType("application/x-www-form-urlencoded"); + header.setValue("User-Agent","iScrobbler/1.5.1qmmp-plugins/0.2"); + header.setValue("Host",url.host()); + header.setValue("Accept", "*/*"); + header.setContentLength(QUrl::toPercentEncoding(body,":/[]&=").size()); + qDebug("Scrobbler: submit request header"); + qDebug(qPrintable(header.toString())); + qDebug("*****************************"); + m_submitid = m_http->request(header, QUrl::toPercentEncoding(body,":/[]&=")); +} + +bool Scrobbler::isReady() +{ + return !m_submitUrl.isEmpty() && !m_session.isEmpty(); +} diff --git a/src/plugins/General/scrobbler/scrobbler.h b/src/plugins/General/scrobbler/scrobbler.h new file mode 100644 index 000000000..25faa13fd --- /dev/null +++ b/src/plugins/General/scrobbler/scrobbler.h @@ -0,0 +1,75 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SCROBBLER_H +#define SCROBBLER_H + +#include <QHttpResponseHeader> +#include <qmmpui/general.h> +#include <time.h> + +class QHttp; +class QTime; + + + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ + +class Scrobbler : public General +{ +Q_OBJECT +public: + Scrobbler(QObject *parent = 0); + + ~Scrobbler(); + + void setState(const uint& state); + void setSongInfo(const SongInfo &song); + +private slots: + void processResponse(int, bool); + void processResponseHeader(const QHttpResponseHeader &); + void readResponse(const QHttpResponseHeader&); + +private: + void handshake(); + void submit(); + bool isReady(); + time_t m_start_ts; + SongInfo m_song; + QHttp *m_http; + uint m_state; + QString m_login; + QString m_passw; + QString m_submitUrl; + QString m_session; + QList <time_t> m_timeStamps; + QList <SongInfo> m_songCache; + QTime* m_time; + int m_submitedSongs; + int m_handshakeid; + int m_submitid; + QByteArray m_array; + bool m_disabled; + +}; + +#endif diff --git a/src/plugins/General/scrobbler/scrobbler.pro b/src/plugins/General/scrobbler/scrobbler.pro new file mode 100644 index 000000000..787cb9f37 --- /dev/null +++ b/src/plugins/General/scrobbler/scrobbler.pro @@ -0,0 +1,41 @@ +include(../../plugins.pri) + +CONFIG += release \ + warn_on \ + plugin + +TEMPLATE = lib +QMAKE_LIBDIR += ../../../../lib + +TARGET=$$PLUGINS_PREFIX/General/scrobbler +QMAKE_CLEAN =$$PLUGINS_PREFIX/General/libscrobbler.so + + +#TRANSLATIONS = translations/ffmpeg_plugin_ru.ts +#RESOURCES = translations/translations.qrc + +isEmpty(LIB_DIR){ + LIB_DIR = /lib +} +target.path = $$LIB_DIR/qmmp/General +INSTALLS += target +#FORMS += settingsdialog.ui + +#RESOURCES += images/images.qrc + + +HEADERS += scrobblerfactory.h \ + scrobbler.h \ + settingsdialog.h +SOURCES += scrobblerfactory.cpp \ + scrobbler.cpp \ + settingsdialog.cpp +QT += network + + +INCLUDEPATH += ../../../ + +LIBS += -lqmmpui + +FORMS += settingsdialog.ui + diff --git a/src/plugins/General/scrobbler/scrobblerfactory.cpp b/src/plugins/General/scrobbler/scrobblerfactory.cpp new file mode 100644 index 000000000..77bbb0f2b --- /dev/null +++ b/src/plugins/General/scrobbler/scrobblerfactory.cpp @@ -0,0 +1,59 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QtGui> + +#include "scrobbler.h" +#include "settingsdialog.h" +#include "scrobblerfactory.h" + +const GeneralProperties ScrobblerFactory::properties() const +{ + GeneralProperties properties; + properties.name = tr("Scrobbler Plugin"); + properties.hasAbout = TRUE; + properties.hasSettings = TRUE; + return properties; +} + +General *ScrobblerFactory::create(QObject *parent) +{ + return new Scrobbler(parent); +} + +void ScrobblerFactory::showSettings(QWidget *parent) +{ + SettingsDialog *dialog = new SettingsDialog(parent); + dialog->show(); +} + +void ScrobblerFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About Scrobbler Plugin"), + tr("Qmmp AudioScrobbler Plugin")+"\n"+ + tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>")); +} + +QTranslator *ScrobblerFactory::createTranslator(QObject *parent) +{ + return 0; +} + +Q_EXPORT_PLUGIN(ScrobblerFactory) diff --git a/src/plugins/General/scrobbler/scrobblerfactory.h b/src/plugins/General/scrobbler/scrobblerfactory.h new file mode 100644 index 000000000..240749714 --- /dev/null +++ b/src/plugins/General/scrobbler/scrobblerfactory.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SCROBBLERFACTORY_H +#define SCROBBLERFACTORY_H + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +#include <QObject> +#include <QTranslator> + +#include <qmmpui/general.h> +#include <qmmpui/generalfactory.h> + +class ScrobblerFactory : public QObject, public GeneralFactory +{ +Q_OBJECT +Q_INTERFACES(GeneralFactory); +public: + const GeneralProperties properties() const; + General *create(QObject *parent); + void showSettings(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); + +}; + +#endif diff --git a/src/plugins/General/scrobbler/settingsdialog.cpp b/src/plugins/General/scrobbler/settingsdialog.cpp new file mode 100644 index 000000000..8dc2dfe22 --- /dev/null +++ b/src/plugins/General/scrobbler/settingsdialog.cpp @@ -0,0 +1,51 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QSettings> +#include <QDir> + +#include "settingsdialog.h" + +SettingsDialog::SettingsDialog(QWidget *parent) + : QDialog(parent) +{ + ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose); + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Scrobbler"); + ui.userLineEdit->setText(settings.value("login").toString()); + ui.passwordLineEdit->setText(settings.value("password").toString()); + settings.endGroup(); + connect(ui.okButton, SIGNAL(clicked()), SLOT(writeSettings())); +} + + +SettingsDialog::~SettingsDialog() +{} + +void SettingsDialog::writeSettings() +{ + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Scrobbler"); + settings.setValue("login",ui.userLineEdit->text()); + settings.setValue("password",ui.passwordLineEdit->text()); + settings.endGroup(); + accept(); +} diff --git a/src/plugins/General/scrobbler/settingsdialog.h b/src/plugins/General/scrobbler/settingsdialog.h new file mode 100644 index 000000000..0d5b21d52 --- /dev/null +++ b/src/plugins/General/scrobbler/settingsdialog.h @@ -0,0 +1,48 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include <QDialog> + + +#include "ui_settingsdialog.h" + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class SettingsDialog : public QDialog +{ +Q_OBJECT +public: + SettingsDialog(QWidget *parent = 0); + + ~SettingsDialog(); + + +private slots: + void writeSettings(); + +private: + Ui::SettingsDialog ui; + +}; + +#endif diff --git a/src/plugins/General/scrobbler/settingsdialog.ui b/src/plugins/General/scrobbler/settingsdialog.ui new file mode 100644 index 000000000..ec446bba2 --- /dev/null +++ b/src/plugins/General/scrobbler/settingsdialog.ui @@ -0,0 +1,92 @@ +<ui version="4.0" > + <class>SettingsDialog</class> + <widget class="QDialog" name="SettingsDialog" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>250</width> + <height>123</height> + </rect> + </property> + <property name="windowTitle" > + <string>Scrobbler Plugin Settings</string> + </property> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="label" > + <property name="text" > + <string>User name:</string> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="QLineEdit" name="userLineEdit" /> + </item> + <item row="1" column="0" > + <widget class="QLabel" name="label_2" > + <property name="text" > + <string>Password:</string> + </property> + </widget> + </item> + <item row="1" column="1" > + <widget class="QLineEdit" name="passwordLineEdit" > + <property name="echoMode" > + <enum>QLineEdit::Password</enum> + </property> + </widget> + </item> + <item row="2" column="0" colspan="2" > + <layout class="QHBoxLayout" > + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" > + <size> + <width>61</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="okButton" > + <property name="text" > + <string>OK</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="canselButton" > + <property name="text" > + <string>Cansel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>canselButton</sender> + <signal>clicked()</signal> + <receiver>SettingsDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel" > + <x>204</x> + <y>90</y> + </hint> + <hint type="destinationlabel" > + <x>26</x> + <y>102</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/src/plugins/General/statusicon/images/images.qrc b/src/plugins/General/statusicon/images/images.qrc new file mode 100644 index 000000000..b072b1d73 --- /dev/null +++ b/src/plugins/General/statusicon/images/images.qrc @@ -0,0 +1,8 @@ +<!DOCTYPE RCC> +<RCC version="1.0"> + <qresource> + <file>tray_play.png</file> + <file>tray_pause.png</file> + <file>tray_stop.png</file> + </qresource> +</RCC> diff --git a/src/plugins/General/statusicon/images/tray_pause.png b/src/plugins/General/statusicon/images/tray_pause.png Binary files differnew file mode 100644 index 000000000..dfed3deb1 --- /dev/null +++ b/src/plugins/General/statusicon/images/tray_pause.png diff --git a/src/plugins/General/statusicon/images/tray_play.png b/src/plugins/General/statusicon/images/tray_play.png Binary files differnew file mode 100644 index 000000000..4d0f9099c --- /dev/null +++ b/src/plugins/General/statusicon/images/tray_play.png diff --git a/src/plugins/General/statusicon/images/tray_stop.png b/src/plugins/General/statusicon/images/tray_stop.png Binary files differnew file mode 100644 index 000000000..9e894d9eb --- /dev/null +++ b/src/plugins/General/statusicon/images/tray_stop.png diff --git a/src/plugins/General/statusicon/settingsdialog.cpp b/src/plugins/General/statusicon/settingsdialog.cpp new file mode 100644 index 000000000..7cb6bb1e5 --- /dev/null +++ b/src/plugins/General/statusicon/settingsdialog.cpp @@ -0,0 +1,55 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QSettings> +#include <QDir> + +#include "settingsdialog.h" + +SettingsDialog::SettingsDialog(QWidget *parent) + : QDialog(parent) +{ + ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose); + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Tray"); + ui.messageCheckBox->setChecked(settings.value("show_message",TRUE).toBool()); + ui.messageDelaySpinBox->setValue(settings.value("message_delay", 2000).toInt()); + ui.toolTipCheckBox->setChecked(settings.value("show_tooltip",FALSE).toBool()); + ui.hideToTrayRadioButton->setChecked(settings.value("hide_on_close", FALSE).toBool()); + settings.endGroup(); + connect(ui.okButton, SIGNAL(clicked()), SLOT(writeSettings())); +} + + +SettingsDialog::~SettingsDialog() +{} + +void SettingsDialog::writeSettings() +{ + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Tray"); + settings.setValue ("show_message", ui.messageCheckBox->isChecked()); + settings.setValue ("message_delay", ui.messageDelaySpinBox->value()); + settings.setValue ("show_tooltip", ui.toolTipCheckBox->isChecked()); + settings.setValue ("hide_on_close", ui.hideToTrayRadioButton->isChecked()); + settings.endGroup(); + accept(); +} diff --git a/src/plugins/General/statusicon/settingsdialog.h b/src/plugins/General/statusicon/settingsdialog.h new file mode 100644 index 000000000..0d5b21d52 --- /dev/null +++ b/src/plugins/General/statusicon/settingsdialog.h @@ -0,0 +1,48 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include <QDialog> + + +#include "ui_settingsdialog.h" + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class SettingsDialog : public QDialog +{ +Q_OBJECT +public: + SettingsDialog(QWidget *parent = 0); + + ~SettingsDialog(); + + +private slots: + void writeSettings(); + +private: + Ui::SettingsDialog ui; + +}; + +#endif diff --git a/src/plugins/General/statusicon/settingsdialog.ui b/src/plugins/General/statusicon/settingsdialog.ui new file mode 100644 index 000000000..126fcce7a --- /dev/null +++ b/src/plugins/General/statusicon/settingsdialog.ui @@ -0,0 +1,173 @@ +<ui version="4.0" > + <class>SettingsDialog</class> + <widget class="QDialog" name="SettingsDialog" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>267</width> + <height>285</height> + </rect> + </property> + <property name="windowTitle" > + <string>Status Icon Plugin Settings</string> + </property> + <layout class="QVBoxLayout" > + <item> + <widget class="QGroupBox" name="groupBox_4" > + <property name="title" > + <string>Tray Icon</string> + </property> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QCheckBox" name="messageCheckBox" > + <property name="text" > + <string>Show message</string> + </property> + </widget> + </item> + <item row="1" column="0" > + <widget class="QCheckBox" name="toolTipCheckBox" > + <property name="text" > + <string>Show tooltip</string> + </property> + </widget> + </item> + <item row="2" column="0" > + <widget class="QLabel" name="label_3" > + <property name="text" > + <string>Message delay, ms:</string> + </property> + <property name="alignment" > + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="2" column="1" > + <widget class="QSpinBox" name="messageDelaySpinBox" > + <property name="minimum" > + <number>100</number> + </property> + <property name="maximum" > + <number>10000</number> + </property> + <property name="singleStep" > + <number>100</number> + </property> + <property name="value" > + <number>1000</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="closeGroupBox" > + <property name="title" > + <string>Action On Close</string> + </property> + <layout class="QVBoxLayout" > + <property name="spacing" > + <number>6</number> + </property> + <property name="leftMargin" > + <number>9</number> + </property> + <property name="topMargin" > + <number>9</number> + </property> + <property name="rightMargin" > + <number>9</number> + </property> + <property name="bottomMargin" > + <number>9</number> + </property> + <item> + <widget class="QRadioButton" name="hideToTrayRadioButton" > + <property name="text" > + <string>Hide to tray</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="quitRadioButton" > + <property name="text" > + <string>Quit</string> + </property> + <property name="checked" > + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <layout class="QHBoxLayout" > + <property name="spacing" > + <number>6</number> + </property> + <property name="leftMargin" > + <number>0</number> + </property> + <property name="topMargin" > + <number>0</number> + </property> + <property name="rightMargin" > + <number>0</number> + </property> + <property name="bottomMargin" > + <number>0</number> + </property> + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" > + <size> + <width>131</width> + <height>31</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="okButton" > + <property name="text" > + <string>OK</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="cancelButton" > + <property name="text" > + <string>Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>cancelButton</sender> + <signal>clicked()</signal> + <receiver>SettingsDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel" > + <x>336</x> + <y>210</y> + </hint> + <hint type="destinationlabel" > + <x>179</x> + <y>224</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/src/plugins/General/statusicon/statusicon.cpp b/src/plugins/General/statusicon/statusicon.cpp new file mode 100644 index 000000000..59225d028 --- /dev/null +++ b/src/plugins/General/statusicon/statusicon.cpp @@ -0,0 +1,109 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QMenu> +#include <QSettings> +#include <QDir> +#include <QTimer> +#include <QCoreApplication> + +#include "statusicon.h" + +StatusIcon::StatusIcon(QObject *parent) + : General(parent) +{ + m_tray = new QSystemTrayIcon(this); + connect(m_tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason))); + m_tray->setIcon ( QIcon(":/tray_stop.png")); + m_tray->show(); + QMenu *menu = new QMenu(qobject_cast<QWidget *>(parent)); + menu->addAction(tr("Play"), this, SLOT(play())); + menu->addAction(tr("Pause"), this, SLOT(pause())); + menu->addAction(tr("Stop"), this, SLOT(stop())); + menu->addAction(tr("Next"), this, SLOT(next())); + menu->addAction(tr("Previous"), this, SLOT(previous())); + menu->addSeparator(); + menu->addAction(tr("Exit"), this, SLOT(exit())); + m_tray->setContextMenu(menu); + + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Tray"); + m_showMessage = settings.value("show_message",TRUE).toBool(); + m_messageDelay = settings.value("message_delay", 2000).toInt(); + m_showTooltip = settings.value("show_tooltip",FALSE).toBool(); + m_hideToTray = settings.value("hide_on_close", FALSE).toBool(); + settings.endGroup(); + m_enabled = FALSE; + QTimer::singleShot(200, this, SLOT(enable())); + +} + + +StatusIcon::~StatusIcon() +{} + +void StatusIcon::setState(const uint &state) +{ + switch ((uint) state) + { + case General::Playing: + { + m_tray->setIcon(QIcon(":/tray_play.png")); + break; + } + case General::Paused: + { + m_tray->setIcon(QIcon(":/tray_pause.png")); + break; + } + case General::Stopped: + { + m_tray->setIcon(QIcon(":/tray_stop.png")); + break; + } + } +} + +void StatusIcon::setSongInfo(const SongInfo &song) +{ + if(!m_enabled) + return; + QString message = song.artist() + " - " +song.title(); + if (song.artist().isEmpty()) + message = song.title(); + if (song.title().isEmpty()) + message = song.artist(); + if (m_showMessage) + m_tray->showMessage (tr("Now Playing"), message, + QSystemTrayIcon::Information, m_messageDelay); + if (m_showTooltip) + m_tray->setToolTip(message); +} + +void StatusIcon::trayActivated(QSystemTrayIcon::ActivationReason reason) +{ + if (reason == QSystemTrayIcon::Trigger) + toggleVisibility(); +} + +void StatusIcon::enable() +{ + m_enabled = TRUE; +} diff --git a/src/plugins/General/statusicon/statusicon.h b/src/plugins/General/statusicon/statusicon.h new file mode 100644 index 000000000..fae20422d --- /dev/null +++ b/src/plugins/General/statusicon/statusicon.h @@ -0,0 +1,58 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef STATUSICON_H +#define STATUSICON_H + +#include <QSystemTrayIcon> + +#include <qmmpui/general.h> + + + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ + +class StatusIcon : public General +{ +Q_OBJECT +public: + StatusIcon(QObject *parent = 0); + + ~StatusIcon(); + + void setState(const uint& state); + void setSongInfo(const SongInfo &song); + +private slots: + void trayActivated(QSystemTrayIcon::ActivationReason); + void enable(); + +private: + QSystemTrayIcon *m_tray; + bool m_showMessage; + bool m_showTooltip; + bool m_hideToTray; + bool m_enabled; + int m_messageDelay; + +}; + +#endif diff --git a/src/plugins/General/statusicon/statusicon.pro b/src/plugins/General/statusicon/statusicon.pro new file mode 100644 index 000000000..01408d1c8 --- /dev/null +++ b/src/plugins/General/statusicon/statusicon.pro @@ -0,0 +1,36 @@ +include(../../plugins.pri) + +INCLUDEPATH += ../../../../src +CONFIG += release \ +warn_on \ +plugin + +TARGET=$$PLUGINS_PREFIX/General/statusicon +QMAKE_CLEAN =$$PLUGINS_PREFIX/General/libstatusicon.so + + +TEMPLATE = lib +QMAKE_LIBDIR += ../../../../lib +LIBS += -lqmmpui + +#TRANSLATIONS = translations/ffmpeg_plugin_ru.ts +#RESOURCES = translations/translations.qrc + +isEmpty(LIB_DIR){ + LIB_DIR = /lib +} +target.path = $$LIB_DIR/qmmp/General +INSTALLS += target +#FORMS += settingsdialog.ui + +RESOURCES += images/images.qrc + + +HEADERS += statusiconfactory.h \ +statusicon.h \ + settingsdialog.h +SOURCES += statusiconfactory.cpp \ +statusicon.cpp \ + settingsdialog.cpp +FORMS += settingsdialog.ui + diff --git a/src/plugins/General/statusicon/statusiconfactory.cpp b/src/plugins/General/statusicon/statusiconfactory.cpp new file mode 100644 index 000000000..1d3beaa0b --- /dev/null +++ b/src/plugins/General/statusicon/statusiconfactory.cpp @@ -0,0 +1,59 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QtGui> + +#include "statusicon.h" +#include "settingsdialog.h" +#include "statusiconfactory.h" + +const GeneralProperties StatusIconFactory::properties() const +{ + GeneralProperties properties; + properties.name = tr("Status Icon Plugin"); + properties.hasAbout = TRUE; + properties.hasSettings = TRUE; + return properties; +} + +General *StatusIconFactory::create(QObject *parent) +{ + return new StatusIcon(parent); +} + +void StatusIconFactory::showSettings(QWidget *parent) +{ + SettingsDialog *s = new SettingsDialog(parent); + s->show(); +} + +void StatusIconFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About Scrobbler Plugin"), + tr("Qmmp Status Icon Plugin")+"\n"+ + tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>")); +} + +QTranslator *StatusIconFactory::createTranslator(QObject *parent) +{ + return 0; +} + +Q_EXPORT_PLUGIN(StatusIconFactory) diff --git a/src/plugins/General/statusicon/statusiconfactory.h b/src/plugins/General/statusicon/statusiconfactory.h new file mode 100644 index 000000000..b09fb1ef1 --- /dev/null +++ b/src/plugins/General/statusicon/statusiconfactory.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef STATUSICONFACTORY_H +#define STATUSICONFACTORY_H + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +#include <QObject> +#include <QTranslator> + +#include <qmmpui/general.h> +#include <qmmpui/generalfactory.h> + +class StatusIconFactory : public QObject, public GeneralFactory +{ +Q_OBJECT +Q_INTERFACES(GeneralFactory); +public: + const GeneralProperties properties() const; + General *create(QObject *parent); + void showSettings(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); + +}; + +#endif diff --git a/lib/qmmp/Input/CMakeLists.txt b/src/plugins/Input/CMakeLists.txt index 8114bc092..8114bc092 100644 --- a/lib/qmmp/Input/CMakeLists.txt +++ b/src/plugins/Input/CMakeLists.txt diff --git a/lib/qmmp/Input/Input.pro b/src/plugins/Input/Input.pro index e180229cc..e180229cc 100644 --- a/lib/qmmp/Input/Input.pro +++ b/src/plugins/Input/Input.pro diff --git a/lib/qmmp/Input/ffmpeg/CMakeLists.txt b/src/plugins/Input/ffmpeg/CMakeLists.txt index 1ca0d4b7a..1ca0d4b7a 100644 --- a/lib/qmmp/Input/ffmpeg/CMakeLists.txt +++ b/src/plugins/Input/ffmpeg/CMakeLists.txt diff --git a/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp index 095f818e7..095f818e7 100644 --- a/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.cpp +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp diff --git a/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.h b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h index 956e5f32b..956e5f32b 100644 --- a/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.h +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h diff --git a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp index 789635a15..789635a15 100644 --- a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp diff --git a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h b/src/plugins/Input/ffmpeg/decoderffmpegfactory.h index 16b6de1dd..16b6de1dd 100644 --- a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.h diff --git a/lib/qmmp/Input/ffmpeg/detailsdialog.cpp b/src/plugins/Input/ffmpeg/detailsdialog.cpp index 076cd6872..076cd6872 100644 --- a/lib/qmmp/Input/ffmpeg/detailsdialog.cpp +++ b/src/plugins/Input/ffmpeg/detailsdialog.cpp diff --git a/lib/qmmp/Input/ffmpeg/detailsdialog.h b/src/plugins/Input/ffmpeg/detailsdialog.h index 258a1bd21..258a1bd21 100644 --- a/lib/qmmp/Input/ffmpeg/detailsdialog.h +++ b/src/plugins/Input/ffmpeg/detailsdialog.h diff --git a/lib/qmmp/Input/ffmpeg/detailsdialog.ui b/src/plugins/Input/ffmpeg/detailsdialog.ui index 70ed57052..70ed57052 100644 --- a/lib/qmmp/Input/ffmpeg/detailsdialog.ui +++ b/src/plugins/Input/ffmpeg/detailsdialog.ui diff --git a/lib/qmmp/Input/ffmpeg/ffmpeg.pro b/src/plugins/Input/ffmpeg/ffmpeg.pro index 30d425ae2..7de7c7d5b 100644 --- a/lib/qmmp/Input/ffmpeg/ffmpeg.pro +++ b/src/plugins/Input/ffmpeg/ffmpeg.pro @@ -1,3 +1,5 @@ +include(../../plugins.pri) + FORMS += detailsdialog.ui HEADERS += decoderffmpegfactory.h \ detailsdialog.h \ @@ -5,15 +7,21 @@ HEADERS += decoderffmpegfactory.h \ SOURCES += detailsdialog.cpp \ decoder_ffmpeg.cpp \ decoderffmpegfactory.cpp -DESTDIR = ../ + + QMAKE_CLEAN = ../libffmpeg.so -INCLUDEPATH += ../../../ + +TARGET=$$PLUGINS_PREFIX/Input/ffmpeg +QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libffmpeg.so + + +INCLUDEPATH += ../../../qmmp CONFIG += release \ warn_on \ plugin \ link_pkgconfig TEMPLATE = lib -QMAKE_LIBDIR += ../../../ +QMAKE_LIBDIR += ../../../../lib LIBS += -lqmmp -L/usr/lib -I/usr/include DEFINES += __STDC_CONSTANT_MACROS PKGCONFIG += libavcodec libavformat diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_cs.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_cs.ts new file mode 100644 index 000000000..8f686a145 --- /dev/null +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_cs.ts @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS><TS version="1.1" language="pl"> +<defaultcodec></defaultcodec> +<context> + <name>DecoderFFmpegFactory</name> + <message> + <location filename="../decoderffmpegfactory.cpp" line="33"/> + <source>WMA Files</source> + <translation>Soubory WMA</translation> + </message> + <message> + <location filename="../decoderffmpegfactory.cpp" line="61"/> + <source>About FFmpeg Audio Plugin</source> + <translation>O pluginu FFmpeg</translation> + </message> + <message> + <location filename="../decoderffmpegfactory.cpp" line="62"/> + <source>Qmmp FFmpeg Audio Plugin</source> + <translation>Vstupní plugin Qmmp FFmpeg</translation> + </message> + <message> + <location filename="../decoderffmpegfactory.cpp" line="63"/> + <source>Suppored formats: WMA</source> + <translation>Podporované formáty: WMA</translation> + </message> + <message> + <location filename="../decoderffmpegfactory.cpp" line="64"/> + <source>Writen by: Ilya Kotov <forkotov02@hotmail.ru></source> + <translation>Autor: Ilja Kotov <forkotov02@hotmail.ru></translation> + </message> + <message> + <location filename="../decoderffmpegfactory.cpp" line="19"/> + <source>FFmpeg Plugin</source> + <translation>Plugin FFmpeg</translation> + </message> +</context> +<context> + <name>DetailsDialog</name> + <message> + <location filename="../detailsdialog.cpp" line="81"/> + <source>kbps</source> + <translation>kbps</translation> + </message> + <message> + <location filename="../detailsdialog.cpp" line="95"/> + <source>Hz</source> + <translation>Hz</translation> + </message> + <message> + <location filename="../detailsdialog.cpp" line="78"/> + <source>KB</source> + <translation>KB</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="13"/> + <source>Details</source> + <translation>Podrobnosti</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="70"/> + <source>File size:</source> + <translation>Velikost souboru:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="130"/> + <source>-</source> + <translation>-</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="103"/> + <source>Sample rate:</source> + <translation>Vzorkovací frakvence:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="176"/> + <source>Save</source> + <translation>Uložit</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="186"/> + <source>Track number:</source> + <translation>Číslo stopy:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="199"/> + <source>Year:</source> + <translation>Rok:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="209"/> + <source>Genre:</source> + <translation>Žánr:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="219"/> + <source>Comment:</source> + <translation>Komentář:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="229"/> + <source>Album:</source> + <translation>Album:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="239"/> + <source>Artist:</source> + <translation>Umělec:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="249"/> + <source>Title:</source> + <translation>Název:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="290"/> + <source>Close</source> + <translation>Zavřít</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="297"/> + <source>File path:</source> + <translation>Cesta k souboru:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="120"/> + <source>Length:</source> + <translation>Délka:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="83"/> + <source>Channels:</source> + <translation>Počet kanálů:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="60"/> + <source>Bitrate:</source> + <translation>Datový tok:</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="31"/> + <source>ASF Info</source> + <translation>Informace ASF</translation> + </message> + <message> + <location filename="../detailsdialog.ui" line="161"/> + <source>WMA Tag</source> + <translation>WMA tag</translation> + </message> +</context> +</TS> diff --git a/lib/qmmp/Input/ffmpeg/translations/ffmpeg_plugin_ru.qm b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.qm Binary files differindex 68ceb6f8b..68ceb6f8b 100644 --- a/lib/qmmp/Input/ffmpeg/translations/ffmpeg_plugin_ru.qm +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.qm diff --git a/lib/qmmp/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts index a65f434f2..a65f434f2 100644 --- a/lib/qmmp/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts diff --git a/lib/qmmp/Input/ffmpeg/translations/translations.qrc b/src/plugins/Input/ffmpeg/translations/translations.qrc index 5e15f321d..5e15f321d 100644 --- a/lib/qmmp/Input/ffmpeg/translations/translations.qrc +++ b/src/plugins/Input/ffmpeg/translations/translations.qrc diff --git a/lib/qmmp/Input/flac/CMakeLists.txt b/src/plugins/Input/flac/CMakeLists.txt index 24041608c..24041608c 100644 --- a/lib/qmmp/Input/flac/CMakeLists.txt +++ b/src/plugins/Input/flac/CMakeLists.txt diff --git a/lib/qmmp/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp index b2a895bca..b2a895bca 100644 --- a/lib/qmmp/Input/flac/decoder_flac.cpp +++ b/src/plugins/Input/flac/decoder_flac.cpp diff --git a/lib/qmmp/Input/flac/decoder_flac.h b/src/plugins/Input/flac/decoder_flac.h index 4c85176ed..4c85176ed 100644 --- a/lib/qmmp/Input/flac/decoder_flac.h +++ b/src/plugins/Input/flac/decoder_flac.h diff --git a/lib/qmmp/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp index 5abb60b39..5abb60b39 100644 --- a/lib/qmmp/Input/flac/decoderflacfactory.cpp +++ b/src/plugins/Input/flac/decoderflacfactory.cpp diff --git a/lib/qmmp/Input/flac/decoderflacfactory.h b/src/plugins/Input/flac/decoderflacfactory.h index 586bc3b33..586bc3b33 100644 --- a/lib/qmmp/Input/flac/decoderflacfactory.h +++ b/src/plugins/Input/flac/decoderflacfactory.h diff --git a/lib/qmmp/Input/flac/detailsdialog.cpp b/src/plugins/Input/flac/detailsdialog.cpp index 2826b6cdb..2826b6cdb 100644 --- a/lib/qmmp/Input/flac/detailsdialog.cpp +++ b/src/plugins/Input/flac/detailsdialog.cpp diff --git a/lib/qmmp/Input/flac/detailsdialog.h b/src/plugins/Input/flac/detailsdialog.h index 80c17544c..80c17544c 100644 --- a/lib/qmmp/Input/flac/detailsdialog.h +++ b/src/plugins/Input/flac/detailsdialog.h diff --git a/lib/qmmp/Input/flac/detailsdialog.ui b/src/plugins/Input/flac/detailsdialog.ui index 5ea739953..5ea739953 100644 --- a/lib/qmmp/Input/flac/detailsdialog.ui +++ b/src/plugins/Input/flac/detailsdialog.ui diff --git a/lib/qmmp/Input/flac/flac.pro b/src/plugins/Input/flac/flac.pro index 3847cd196..4ab46c296 100644 --- a/lib/qmmp/Input/flac/flac.pro +++ b/src/plugins/Input/flac/flac.pro @@ -3,6 +3,8 @@ # ?????????? ???????????? ???????? ???????? ???????: ./Plugins/Input/flac # ???? - ??????????: +include(../../plugins.pri) + FORMS += detailsdialog.ui HEADERS += decoderflacfactory.h \ decoder_flac.h \ @@ -10,15 +12,17 @@ HEADERS += decoderflacfactory.h \ SOURCES += decoder_flac.cpp \ decoderflacfactory.cpp \ detailsdialog.cpp -DESTDIR = ../ -QMAKE_CLEAN += ../libflac.so -INCLUDEPATH += ../../../ + +TARGET=$$PLUGINS_PREFIX/Input/flac +QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libflac.so + +INCLUDEPATH += ../../../qmmp CONFIG += release \ warn_on \ plugin \ link_pkgconfig TEMPLATE = lib -QMAKE_LIBDIR += ../../../ +QMAKE_LIBDIR += ../../../../lib LIBS += -lqmmp -L/usr/lib -I/usr/include PKGCONFIG += taglib flac #TRANSLATIONS = translations/flac_plugin_ru.ts diff --git a/lib/qmmp/Input/flac/translations/flac_plugin_ru.qm b/src/plugins/Input/flac/translations/flac_plugin_ru.qm Binary files differindex fbd97d091..fbd97d091 100644 --- a/lib/qmmp/Input/flac/translations/flac_plugin_ru.qm +++ b/src/plugins/Input/flac/translations/flac_plugin_ru.qm diff --git a/lib/qmmp/Input/flac/translations/flac_plugin_ru.ts b/src/plugins/Input/flac/translations/flac_plugin_ru.ts index a1e9b98b7..a1e9b98b7 100644 --- a/lib/qmmp/Input/flac/translations/flac_plugin_ru.ts +++ b/src/plugins/Input/flac/translations/flac_plugin_ru.ts diff --git a/lib/qmmp/Input/flac/translations/translations.qrc b/src/plugins/Input/flac/translations/translations.qrc index cd630dfce..cd630dfce 100644 --- a/lib/qmmp/Input/flac/translations/translations.qrc +++ b/src/plugins/Input/flac/translations/translations.qrc diff --git a/lib/qmmp/Input/mad/CMakeLists.txt b/src/plugins/Input/mad/CMakeLists.txt index 3e4dfa9d0..3e4dfa9d0 100644 --- a/lib/qmmp/Input/mad/CMakeLists.txt +++ b/src/plugins/Input/mad/CMakeLists.txt diff --git a/lib/qmmp/Input/mad/decoder_mad.cpp b/src/plugins/Input/mad/decoder_mad.cpp index 6b4c2569a..6b4c2569a 100644 --- a/lib/qmmp/Input/mad/decoder_mad.cpp +++ b/src/plugins/Input/mad/decoder_mad.cpp diff --git a/lib/qmmp/Input/mad/decoder_mad.h b/src/plugins/Input/mad/decoder_mad.h index ecbb160cb..ecbb160cb 100644 --- a/lib/qmmp/Input/mad/decoder_mad.h +++ b/src/plugins/Input/mad/decoder_mad.h diff --git a/lib/qmmp/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index 1c863d6e0..8bb04aca1 100644 --- a/lib/qmmp/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -6,6 +6,7 @@ #include <taglib/fileref.h> #include <taglib/id3v1tag.h> #include <taglib/id3v2tag.h> +#include <taglib/apetag.h> #include <taglib/tfile.h> #include <taglib/mpegfile.h> @@ -83,46 +84,41 @@ FileTag *DecoderMADFactory::createTag(const QString &source) QTextCodec *codec = 0; - int ver = settings.value("ID3_version", 2).toInt(); - if (ver == 1 && settings.value("ID3v1_enable", TRUE).toBool() && - fileRef.ID3v1Tag()) + uint tag_array[3]; + tag_array[0] = settings.value("tag_1", SettingsDialog::ID3v2).toInt(); + tag_array[1] = settings.value("tag_2", SettingsDialog::Disabled).toInt(); + tag_array[2] = settings.value("tag_3", SettingsDialog::Disabled).toInt(); + + + for (int i = 0; i < 3; ++i) { - tag = fileRef.ID3v1Tag(); - codec = codec_v1; - if (tag->isEmpty()) + switch ((uint) tag_array[i]) + { + case SettingsDialog::ID3v1: { - tag = 0; - if (settings.value("ID3v2_enable", TRUE).toBool() && - fileRef.ID3v2Tag()) - { - if (!fileRef.ID3v2Tag()->isEmpty()) - { - tag = fileRef.ID3v2Tag(); - codec = codec_v2; - } - } + codec = codec_v1; + tag = fileRef.ID3v1Tag(); + break; } - } - else - ver = 2; - if (ver == 2 && settings.value("ID3v2_enable", TRUE).toBool() && - fileRef.ID3v2Tag()) - { - tag = fileRef.ID3v2Tag(); - codec = codec_v2; - if (tag->isEmpty()) + case SettingsDialog::ID3v2: { - tag = 0; - if (settings.value("ID3v1_enable", TRUE).toBool() && - fileRef.ID3v1Tag()) - { - if (!fileRef.ID3v1Tag()->isEmpty()) - { - tag = fileRef.ID3v1Tag(); - codec = codec_v1; - } - } + codec = codec_v2; + tag = fileRef.ID3v2Tag(); + break; + } + case SettingsDialog::APE: + { + codec = QTextCodec::codecForName ("UTF-8"); + tag = fileRef.APETag(); + break; + } + case SettingsDialog::Disabled: + { + break; + } } + if(tag && !tag->isEmpty()) + break; } settings.endGroup(); diff --git a/lib/qmmp/Input/mad/decodermadfactory.h b/src/plugins/Input/mad/decodermadfactory.h index 2c7da8e47..2c7da8e47 100644 --- a/lib/qmmp/Input/mad/decodermadfactory.h +++ b/src/plugins/Input/mad/decodermadfactory.h diff --git a/src/plugins/Input/mad/detailsdialog.cpp b/src/plugins/Input/mad/detailsdialog.cpp new file mode 100644 index 000000000..af9b466cd --- /dev/null +++ b/src/plugins/Input/mad/detailsdialog.cpp @@ -0,0 +1,294 @@ +/*************************************************************************** + * Copyright (C) 2006 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include <QTextCodec> +#include <QSettings> +#include <QDir> +#include <QFile> +#include <QFileInfo> + +#include <taglib/tag.h> +#include <taglib/fileref.h> +#include <taglib/id3v1tag.h> +#include <taglib/id3v2tag.h> +#include <taglib/apetag.h> +#include <taglib/tfile.h> +#include <taglib/mpegfile.h> +#include <taglib/mpegheader.h> +#include <taglib/mpegproperties.h> + +#include "detailsdialog.h" + +DetailsDialog::DetailsDialog(QWidget *parent, const QString &path) + : QDialog(parent) +{ + ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose); + m_path = path; + setWindowTitle (path.section('/',-1)); + ui.pathLineEdit->setText(m_path); + + if (!QFile::exists(m_path)) + return; + + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("MAD"); + m_codec_v1 = + QTextCodec::codecForName(settings.value("ID3v1_encoding","UTF-8" ) + .toByteArray ()); + m_codec_v2 = + QTextCodec::codecForName(settings.value("ID3v2_encoding","UTF-8" ) + .toByteArray ()); + if (!m_codec_v1) + m_codec_v1 = QTextCodec::codecForName ("UTF-8"); + if (!m_codec_v2) + m_codec_v2 = QTextCodec::codecForName ("UTF-8"); + + QString tag_name = settings.value("current_tag","ID3v2").toString (); + + if (tag_name == "ID3v1") + ui.id3v1RadioButton->setChecked(TRUE); + else if (tag_name == "ID3v2") + ui.id3v2RadioButton->setChecked(TRUE); + else if (tag_name == "APE") + ui.apeRadioButton->setChecked(TRUE); + else + ui.id3v2RadioButton->setChecked(TRUE); + + settings.endGroup(); + + loadMPEGInfo(); + QFileInfo info(m_path); + m_rw = info.isWritable(); + loadTag(); + connect(ui.saveButton, SIGNAL(clicked()), SLOT(save())); + connect(ui.createButton, SIGNAL(clicked()), SLOT(create())); + connect(ui.deleteButton, SIGNAL(clicked()), SLOT(deleteTag())); + connect(ui.id3v1RadioButton, SIGNAL(clicked()), SLOT(loadTag())); + connect(ui.id3v2RadioButton, SIGNAL(clicked()), SLOT(loadTag())); + connect(ui.apeRadioButton, SIGNAL(clicked()), SLOT(loadTag())); +} + + +DetailsDialog::~DetailsDialog() +{} + +void DetailsDialog::loadMPEGInfo() +{ + TagLib::MPEG::File f (m_path.toLocal8Bit()); + //l.label + //ui. f.audioProperties()->level(); + QString text; + text = QString("%1").arg(f.audioProperties()->layer()); + ui.levelLabel->setText("MPEG layer "+text); //TODO: add MPEG version + text = QString("%1").arg(f.audioProperties()->bitrate()); + ui.bitRateLabel->setText(text+" "+tr("kbps")); + text = QString("%1").arg(f.audioProperties()->sampleRate()); + ui.sampleRateLabel->setText(text+" "+tr("Hz")); + switch (f.audioProperties()->channelMode()) + { + case TagLib::MPEG::Header::Stereo: + ui.modeLabel->setText("Stereo"); + break; + case TagLib::MPEG::Header::JointStereo: + ui.modeLabel->setText("Joint stereo"); + break; + case TagLib::MPEG::Header::DualChannel: + ui.modeLabel->setText("Dual channel"); + break; + case TagLib::MPEG::Header::SingleChannel: + ui.modeLabel->setText("Single channel"); + break; + } + text = QString("%1 "+tr("KB")).arg(f.length()/1024); + ui.fileSizeLabel->setText(text); + /*if (f.audioProperties()->protectionEnabled()) + ui.errProtectionLabel->setText(tr("Yes")); + else + ui.errProtectionLabel->setText(tr("No"));*/ + if (f.audioProperties()->isCopyrighted()) + ui.copyrightLabel->setText(tr("Yes")); + else + ui.copyrightLabel->setText(tr("No")); + if (f.audioProperties()->isOriginal()) + ui.originalLabel->setText(tr("Yes")); + else + ui.originalLabel->setText(tr("No")); +} + +void DetailsDialog::loadTag() +{ + TagLib::MPEG::File f (m_path.toLocal8Bit()); + QTextCodec *codec = QTextCodec::codecForName ("UTF-8"); + TagLib::Tag *tag = 0; + + if (selectedTag() == TagLib::MPEG::File::ID3v1) + { + tag = f.ID3v1Tag(); + codec = m_codec_v1; + ui.tagGroupBox->setTitle(tr("ID3v1 Tag")); + } + else if (selectedTag() == TagLib::MPEG::File::ID3v2) + { + tag = f.ID3v2Tag(); + codec = m_codec_v2; + ui.tagGroupBox->setTitle(tr("ID3v2 Tag")); + } + else if (selectedTag() == TagLib::MPEG::File::APE) + { + ui.tagGroupBox->setTitle(tr("APE Tag")); + tag = f.APETag(); + } + ui.saveButton->setEnabled(tag && m_rw); + ui.createButton->setEnabled(!tag && m_rw); + ui.deleteButton->setEnabled(tag && m_rw); + ui.tagsWidget->setEnabled(tag); + //clear old values + ui.titleLineEdit->clear(); + ui.artistLineEdit->clear(); + ui.albumLineEdit->clear(); + ui.commentLineEdit->clear(); + ui.yearLineEdit->clear(); + ui.trackLineEdit->clear(); + ui.genreLineEdit->clear(); + + if (tag) + { + bool utf = codec->name().contains("UTF"); + TagLib::String title = tag->title(); + TagLib::String artist = tag->artist(); + TagLib::String album = tag->album(); + TagLib::String comment = tag->comment(); + TagLib::String genre = tag->genre(); + QString string = codec->toUnicode(title.toCString(utf)).trimmed(); + ui.titleLineEdit->setText(string); + string = codec->toUnicode(artist.toCString(utf)).trimmed(); + ui.artistLineEdit->setText(string); + string = codec->toUnicode(album.toCString(utf)).trimmed(); + ui.albumLineEdit->setText(string); + string = codec->toUnicode(comment.toCString(utf)).trimmed(); + ui.commentLineEdit->setText(string); + string = QString("%1").arg(tag->year()); + ui.yearLineEdit->setText(string); + string = QString("%1").arg(tag->track()); + ui.trackLineEdit->setText(string); + string = codec->toUnicode(genre.toCString(utf)).trimmed(); + ui.genreLineEdit->setText(string); + } +} + +void DetailsDialog::save() +{ + TagLib::MPEG::File* f = new TagLib::MPEG::File(m_path.toLocal8Bit()); + TagLib::String::Type type = TagLib::String::Latin1; + + QTextCodec *codec = 0; + TagLib::Tag *tag = 0; + + if (selectedTag() == TagLib::MPEG::File::ID3v1) + { + codec = m_codec_v1; + tag = f->ID3v1Tag(TRUE); + if (codec->name().contains("UTF")) + { + delete f; + loadTag(); + } + } + if (selectedTag() == TagLib::MPEG::File::ID3v2) + { + codec = m_codec_v2; + tag = f->ID3v2Tag(TRUE); + if (codec->name().contains("UTF")) + { + TagLib::ID3v2::FrameFactory *factory = TagLib::ID3v2::FrameFactory::instance(); + factory->setDefaultTextEncoding(TagLib::String::UTF8); + f->setID3v2FrameFactory(factory); + type = TagLib::String::UTF8; + } + } + if (selectedTag() == TagLib::MPEG::File::APE) + { + codec = QTextCodec::codecForName ("UTF-8"); + tag = f->APETag(TRUE); + type = TagLib::String::UTF8; + } + + tag->setTitle(TagLib::String(codec->fromUnicode(ui.titleLineEdit->text()).constData(), type)); + tag->setArtist(TagLib::String(codec->fromUnicode(ui.artistLineEdit->text()).constData(), type)); + tag->setAlbum(TagLib::String(codec->fromUnicode(ui.albumLineEdit->text()).constData(), type)); + tag->setComment(TagLib::String(codec->fromUnicode(ui.commentLineEdit->text()).constData(), type)); + tag->setGenre(TagLib::String(codec->fromUnicode(ui.genreLineEdit->text()).constData(), type)); + tag->setYear(ui.yearLineEdit->text().toUInt()); + tag->setTrack(ui.trackLineEdit->text().toUInt()); + + f->save(selectedTag(), FALSE); + delete f; + loadTag(); +} + +void DetailsDialog::create() +{ + TagLib::MPEG::File *f = new TagLib::MPEG::File (m_path.toLocal8Bit()); + TagLib::Tag *tag = 0; + if (selectedTag() == TagLib::MPEG::File::ID3v1) + tag = f->ID3v1Tag(TRUE); + else if (selectedTag() == TagLib::MPEG::File::ID3v2) + tag = f->ID3v2Tag(TRUE); + else if (selectedTag() == TagLib::MPEG::File::APE) + tag = f->APETag(TRUE); + + f->save(selectedTag(), FALSE); + delete f; + loadTag(); + ui.tagsWidget->setEnabled(TRUE); + ui.saveButton->setEnabled(m_rw); +} + +void DetailsDialog::deleteTag() +{ + TagLib::MPEG::File *f = new TagLib::MPEG::File (m_path.toLocal8Bit()); + f->strip(selectedTag()); + delete f; + loadTag(); +} + +uint DetailsDialog::selectedTag() +{ + if (ui.id3v1RadioButton->isChecked()) + return TagLib::MPEG::File::ID3v1; + else if (ui.id3v2RadioButton->isChecked()) + return TagLib::MPEG::File::ID3v2; + else if (ui.apeRadioButton->isChecked()) + return TagLib::MPEG::File::APE; + return TagLib::MPEG::File::ID3v2; +} + +void DetailsDialog::closeEvent (QCloseEvent *) +{ + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("MAD"); + if (ui.id3v1RadioButton->isChecked()) + settings.setValue("current_tag","ID3v1"); + else if (ui.id3v2RadioButton->isChecked()) + settings.setValue("current_tag","ID3v2"); + else if (ui.apeRadioButton->isChecked()) + settings.setValue("current_tag","APE"); + settings.endGroup(); +} diff --git a/lib/qmmp/Input/mad/detailsdialog.h b/src/plugins/Input/mad/detailsdialog.h index 204e29358..bc92724a3 100644 --- a/lib/qmmp/Input/mad/detailsdialog.h +++ b/src/plugins/Input/mad/detailsdialog.h @@ -25,31 +25,38 @@ #include "ui_detailsdialog.h" /** - @author Ilya Kotov <forkotov02@hotmail.ru> + @author Ilya Kotov <forkotov02@hotmail.ru> */ class QTextCodec; class DetailsDialog : public QDialog { -Q_OBJECT + Q_OBJECT public: DetailsDialog(QWidget *parent = 0, const QString &path = 0); ~DetailsDialog(); +protected: + virtual void closeEvent (QCloseEvent *); + private slots: - void saveID3v1Tag(); - void saveID3v2Tag(); + void save(); + void create(); + void deleteTag(); + void loadTag(); private: void loadMPEGInfo(); - void loadID3v1Tag(); - void loadID3v2Tag(); + uint selectedTag(); + //void loadTag(); + //void loadID3v2Tag(); Ui::DetailsDialog ui; QString m_path; QTextCodec *m_codec_v1; QTextCodec *m_codec_v2; + bool m_rw; }; diff --git a/src/plugins/Input/mad/detailsdialog.ui b/src/plugins/Input/mad/detailsdialog.ui new file mode 100644 index 000000000..6f9a00c31 --- /dev/null +++ b/src/plugins/Input/mad/detailsdialog.ui @@ -0,0 +1,392 @@ +<ui version="4.0" > + <class>DetailsDialog</class> + <widget class="QDialog" name="DetailsDialog" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>593</width> + <height>402</height> + </rect> + </property> + <property name="windowTitle" > + <string>Details</string> + </property> + <layout class="QGridLayout" > + <item row="0" column="0" colspan="3" > + <layout class="QHBoxLayout" > + <item> + <widget class="QLabel" name="label_28" > + <property name="text" > + <string>File path:</string> + </property> + <property name="alignment" > + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="pathLineEdit" > + <property name="readOnly" > + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item rowspan="2" row="1" column="0" > + <layout class="QVBoxLayout" > + <item> + <widget class="QGroupBox" name="groupBox_3" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title" > + <string>Tag Choice</string> + </property> + <layout class="QHBoxLayout" > + <item> + <widget class="QRadioButton" name="id3v1RadioButton" > + <property name="text" > + <string>ID3v1</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="id3v2RadioButton" > + <property name="text" > + <string>ID3v2</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="apeRadioButton" > + <property name="text" > + <string>APE</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox" > + <property name="minimumSize" > + <size> + <width>200</width> + <height>16</height> + </size> + </property> + <property name="title" > + <string>MPEG Info</string> + </property> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="label" > + <property name="text" > + <string>MPEG level:</string> + </property> + <property name="textFormat" > + <enum>Qt::AutoText</enum> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="QLabel" name="levelLabel" > + <property name="text" > + <string>-</string> + </property> + </widget> + </item> + <item row="1" column="0" > + <widget class="QLabel" name="label_2" > + <property name="text" > + <string>Bit rate:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="1" column="1" > + <widget class="QLabel" name="bitRateLabel" > + <property name="text" > + <string>-</string> + </property> + </widget> + </item> + <item row="2" column="0" > + <widget class="QLabel" name="label_3" > + <property name="text" > + <string>Sample rate:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="2" column="1" > + <widget class="QLabel" name="sampleRateLabel" > + <property name="text" > + <string>-</string> + </property> + </widget> + </item> + <item row="3" column="0" > + <widget class="QLabel" name="label_5" > + <property name="text" > + <string>File size:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="3" column="1" > + <widget class="QLabel" name="fileSizeLabel" > + <property name="text" > + <string>-</string> + </property> + </widget> + </item> + <item row="4" column="0" > + <widget class="QLabel" name="label_6" > + <property name="text" > + <string>Mode:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="4" column="1" > + <widget class="QLabel" name="modeLabel" > + <property name="text" > + <string>-</string> + </property> + </widget> + </item> + <item row="5" column="0" > + <widget class="QLabel" name="label_8" > + <property name="text" > + <string>Copyright:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="5" column="1" > + <widget class="QLabel" name="copyrightLabel" > + <property name="text" > + <string>-</string> + </property> + </widget> + </item> + <item row="6" column="0" > + <widget class="QLabel" name="label_9" > + <property name="text" > + <string>Original:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="6" column="1" > + <widget class="QLabel" name="originalLabel" > + <property name="text" > + <string>-</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> + <item row="1" column="1" colspan="2" > + <widget class="QGroupBox" name="tagGroupBox" > + <property name="title" > + <string>ID3v1 Tag</string> + </property> + <layout class="QVBoxLayout" > + <item> + <widget class="QWidget" native="1" name="tagsWidget" > + <property name="enabled" > + <bool>true</bool> + </property> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="label_21" > + <property name="text" > + <string>Title:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="0" column="1" colspan="3" > + <widget class="QLineEdit" name="titleLineEdit" /> + </item> + <item row="1" column="0" > + <widget class="QLabel" name="label_22" > + <property name="text" > + <string>Artist:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="1" column="1" colspan="3" > + <widget class="QLineEdit" name="artistLineEdit" /> + </item> + <item row="2" column="0" > + <widget class="QLabel" name="label_23" > + <property name="text" > + <string>Album:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="2" column="1" colspan="3" > + <widget class="QLineEdit" name="albumLineEdit" /> + </item> + <item row="3" column="0" > + <widget class="QLabel" name="label_24" > + <property name="text" > + <string>Comment:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="3" column="1" colspan="3" > + <widget class="QLineEdit" name="commentLineEdit" /> + </item> + <item row="4" column="0" > + <widget class="QLabel" name="label_25" > + <property name="text" > + <string>Year:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="4" column="1" > + <widget class="QLineEdit" name="yearLineEdit" /> + </item> + <item row="4" column="2" > + <widget class="QLabel" name="label_26" > + <property name="text" > + <string>Track number:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="4" column="3" > + <widget class="QLineEdit" name="trackLineEdit" /> + </item> + <item row="5" column="0" > + <widget class="QLabel" name="label_27" > + <property name="text" > + <string>Genre:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="5" column="1" colspan="3" > + <widget class="QLineEdit" name="genreLineEdit" /> + </item> + </layout> + </widget> + </item> + <item> + <layout class="QHBoxLayout" > + <item> + <widget class="QPushButton" name="createButton" > + <property name="text" > + <string>Create</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="deleteButton" > + <property name="text" > + <string>Delete</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="saveButton" > + <property name="enabled" > + <bool>false</bool> + </property> + <property name="text" > + <string>Save</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item row="2" column="1" > + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" > + <size> + <width>111</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="2" column="2" > + <widget class="QPushButton" name="pushButton_3" > + <property name="text" > + <string>Close</string> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>pushButton_3</sender> + <signal>clicked()</signal> + <receiver>DetailsDialog</receiver> + <slot>close()</slot> + <hints> + <hint type="sourcelabel" > + <x>623</x> + <y>353</y> + </hint> + <hint type="destinationlabel" > + <x>539</x> + <y>352</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/lib/qmmp/Input/mad/mad.pro b/src/plugins/Input/mad/mad.pro index fd81524ae..7a320b370 100644 --- a/lib/qmmp/Input/mad/mad.pro +++ b/src/plugins/Input/mad/mad.pro @@ -3,6 +3,9 @@ # ?????????? ???????????? ???????? ???????? ???????: ./Plugins/Input/mad # ???? - ??????????: +include(../../plugins.pri) + + FORMS += detailsdialog.ui \ settingsdialog.ui HEADERS += decodermadfactory.h \ @@ -13,15 +16,17 @@ SOURCES += decoder_mad.cpp \ decodermadfactory.cpp \ detailsdialog.cpp \ settingsdialog.cpp -DESTDIR = ../ -QMAKE_CLEAN += ../libmad.so -INCLUDEPATH += ../../../ + +TARGET=$$PLUGINS_PREFIX/Input/mad +QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libmad.so + +INCLUDEPATH += ../../../qmmp CONFIG += release \ warn_on \ plugin \ link_pkgconfig TEMPLATE = lib -QMAKE_LIBDIR += ../../../ +QMAKE_LIBDIR += ../../../../lib LIBS += -lqmmp PKGCONFIG += taglib mad #TRANSLATIONS = translations/mad_plugin_ru.ts diff --git a/lib/qmmp/Input/mad/settingsdialog.cpp b/src/plugins/Input/mad/settingsdialog.cpp index d88b3317f..667e8598a 100644 --- a/lib/qmmp/Input/mad/settingsdialog.cpp +++ b/src/plugins/Input/mad/settingsdialog.cpp @@ -43,11 +43,9 @@ SettingsDialog::SettingsDialog(QWidget *parent) (settings.value("ID3v2_encoding","UTF-8").toString()); ui.id3v2EncComboBox->setCurrentIndex(pos); - ui.id3v1CheckBox->setChecked(settings.value("ID3v1_enable", TRUE).toBool()); - ui.id3v2CheckBox->setChecked(settings.value("ID3v2_enable", TRUE).toBool()); - ui.id3v1EncComboBox->setEnabled(ui.id3v1CheckBox->isChecked()); - ui.id3v2EncComboBox->setEnabled(ui.id3v2CheckBox->isChecked()); - ui.defTagComboBox->setCurrentIndex(settings.value("ID3_version", 2).toInt() - 1); + ui.firstTagComboBox->setCurrentIndex(settings.value("tag_1", ID3v2).toInt()); + ui.secondTagComboBox->setCurrentIndex(settings.value("tag_2", Disabled).toInt()); + ui.thirdTagComboBox->setCurrentIndex(settings.value("tag_3", Disabled).toInt()); settings.endGroup(); connect(ui.okButton, SIGNAL(clicked()), SLOT(writeSettings())); @@ -63,10 +61,9 @@ void SettingsDialog::writeSettings() settings.beginGroup("MAD"); settings.setValue("ID3v1_encoding", ui.id3v1EncComboBox->currentText()); settings.setValue("ID3v2_encoding", ui.id3v2EncComboBox->currentText()); - settings.setValue("ID3v1_enable", ui.id3v1CheckBox->isChecked()); - settings.setValue("ID3v2_enable", ui.id3v2CheckBox->isChecked()); - settings.setValue("ID3_version", ui.defTagComboBox->currentIndex()+1); - + settings.setValue("tag_1", ui.firstTagComboBox->currentIndex()); + settings.setValue("tag_2", ui.secondTagComboBox->currentIndex()); + settings.setValue("tag_3", ui.thirdTagComboBox->currentIndex()); settings.endGroup(); accept(); } diff --git a/lib/qmmp/Input/mad/settingsdialog.h b/src/plugins/Input/mad/settingsdialog.h index 86a8c8ad5..2ad1ed188 100644 --- a/lib/qmmp/Input/mad/settingsdialog.h +++ b/src/plugins/Input/mad/settingsdialog.h @@ -36,6 +36,8 @@ public: ~SettingsDialog(); + enum TagType {ID3v1 = 0, ID3v2, APE, Disabled}; + private slots: void writeSettings(); diff --git a/lib/qmmp/Input/mad/settingsdialog.ui b/src/plugins/Input/mad/settingsdialog.ui index 08f42642d..3ace8fcec 100644 --- a/lib/qmmp/Input/mad/settingsdialog.ui +++ b/src/plugins/Input/mad/settingsdialog.ui @@ -5,44 +5,32 @@ <rect> <x>0</x> <y>0</y> - <width>333</width> - <height>224</height> + <width>242</width> + <height>303</height> </rect> </property> <property name="windowTitle" > <string>MPEG Plugin Settings</string> </property> <layout class="QVBoxLayout" > - <property name="margin" > - <number>8</number> - </property> - <property name="spacing" > - <number>6</number> - </property> <item> - <widget class="QGroupBox" name="groupBox" > + <widget class="QGroupBox" name="groupBox_2" > <property name="title" > - <string>ID3 Tags</string> + <string>Tag Priority</string> </property> <layout class="QVBoxLayout" > - <property name="margin" > - <number>8</number> - </property> - <property name="spacing" > - <number>6</number> - </property> <item> <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> <item> <widget class="QLabel" name="label_15_2" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text" > - <string>Default tag version:</string> + <string>First:</string> </property> <property name="alignment" > <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> @@ -50,15 +38,9 @@ </widget> </item> <item> - <widget class="QComboBox" name="defTagComboBox" > - <property name="maximumSize" > - <size> - <width>67</width> - <height>16777215</height> - </size> - </property> + <widget class="QComboBox" name="firstTagComboBox" > <property name="currentIndex" > - <number>1</number> + <number>0</number> </property> <item> <property name="text" > @@ -70,45 +52,140 @@ <string>ID3v2</string> </property> </item> + <item> + <property name="text" > + <string>APE</string> + </property> + </item> + <item> + <property name="text" > + <string>Disabled</string> + </property> + </item> </widget> </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" > <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> + <widget class="QLabel" name="label_15_3" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text" > + <string>Second:</string> </property> - <property name="sizeHint" > - <size> - <width>40</width> - <height>20</height> - </size> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="secondTagComboBox" > + <property name="currentIndex" > + <number>0</number> </property> - </spacer> + <item> + <property name="text" > + <string>ID3v1</string> + </property> + </item> + <item> + <property name="text" > + <string>ID3v2</string> + </property> + </item> + <item> + <property name="text" > + <string>APE</string> + </property> + </item> + <item> + <property name="text" > + <string>Disabled</string> + </property> + </item> + </widget> </item> </layout> </item> <item> - <widget class="QCheckBox" name="id3v1CheckBox" > - <property name="text" > - <string>Enable ID3v1</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="id3v2CheckBox" > - <property name="text" > - <string>Enable ID3v2</string> - </property> - </widget> + <layout class="QHBoxLayout" > + <item> + <widget class="QLabel" name="label_15_4" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Preferred" hsizetype="Preferred" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text" > + <string>Third:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="thirdTagComboBox" > + <property name="currentIndex" > + <number>0</number> + </property> + <item> + <property name="text" > + <string>ID3v1</string> + </property> + </item> + <item> + <property name="text" > + <string>ID3v2</string> + </property> + </item> + <item> + <property name="text" > + <string>APE</string> + </property> + </item> + <item> + <property name="text" > + <string>Disabled</string> + </property> + </item> + </widget> + </item> + </layout> </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox" > + <property name="title" > + <string>Encodings</string> + </property> + <layout class="QVBoxLayout" > <item> <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> <property name="spacing" > <number>6</number> </property> + <property name="leftMargin" > + <number>0</number> + </property> + <property name="topMargin" > + <number>0</number> + </property> + <property name="rightMargin" > + <number>0</number> + </property> + <property name="bottomMargin" > + <number>0</number> + </property> <item> <widget class="QLabel" name="label_17_2_2" > <property name="text" > @@ -122,29 +199,25 @@ <item> <widget class="QComboBox" name="id3v1EncComboBox" /> </item> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" > - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> </layout> </item> <item> <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> <property name="spacing" > <number>6</number> </property> + <property name="leftMargin" > + <number>0</number> + </property> + <property name="topMargin" > + <number>0</number> + </property> + <property name="rightMargin" > + <number>0</number> + </property> + <property name="bottomMargin" > + <number>0</number> + </property> <item> <widget class="QLabel" name="label_18_2_2" > <property name="text" > @@ -158,19 +231,6 @@ <item> <widget class="QComboBox" name="id3v2EncComboBox" /> </item> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" > - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> </layout> </item> </layout> @@ -178,12 +238,21 @@ </item> <item> <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> <property name="spacing" > <number>6</number> </property> + <property name="leftMargin" > + <number>0</number> + </property> + <property name="topMargin" > + <number>0</number> + </property> + <property name="rightMargin" > + <number>0</number> + </property> + <property name="bottomMargin" > + <number>0</number> + </property> <item> <spacer> <property name="orientation" > @@ -233,37 +302,5 @@ </hint> </hints> </connection> - <connection> - <sender>id3v2CheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>id3v2EncComboBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>84</x> - <y>104</y> - </hint> - <hint type="destinationlabel" > - <x>165</x> - <y>163</y> - </hint> - </hints> - </connection> - <connection> - <sender>id3v1CheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>id3v1EncComboBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>95</x> - <y>73</y> - </hint> - <hint type="destinationlabel" > - <x>165</x> - <y>133</y> - </hint> - </hints> - </connection> </connections> </ui> diff --git a/lib/qmmp/Input/mad/translations/mad_plugin_ru.qm b/src/plugins/Input/mad/translations/mad_plugin_ru.qm Binary files differindex 16bea746b..16bea746b 100644 --- a/lib/qmmp/Input/mad/translations/mad_plugin_ru.qm +++ b/src/plugins/Input/mad/translations/mad_plugin_ru.qm diff --git a/lib/qmmp/Input/mad/translations/mad_plugin_ru.ts b/src/plugins/Input/mad/translations/mad_plugin_ru.ts index 6406f6045..6406f6045 100644 --- a/lib/qmmp/Input/mad/translations/mad_plugin_ru.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_ru.ts diff --git a/lib/qmmp/Input/mad/translations/translations.qrc b/src/plugins/Input/mad/translations/translations.qrc index 34dbabbca..34dbabbca 100644 --- a/lib/qmmp/Input/mad/translations/translations.qrc +++ b/src/plugins/Input/mad/translations/translations.qrc diff --git a/src/plugins/Input/mad/ui_detailsdialog.h b/src/plugins/Input/mad/ui_detailsdialog.h new file mode 100644 index 000000000..d630be894 --- /dev/null +++ b/src/plugins/Input/mad/ui_detailsdialog.h @@ -0,0 +1,400 @@ +/******************************************************************************** +** Form generated from reading ui file 'detailsdialog.ui' +** +** Created: Thu Feb 7 00:21:43 2008 +** by: Qt User Interface Compiler version 4.3.0 +** +** WARNING! All changes made in this file will be lost when recompiling ui file! +********************************************************************************/ + +#ifndef UI_DETAILSDIALOG_H +#define UI_DETAILSDIALOG_H + +#include <QtCore/QVariant> +#include <QtGui/QAction> +#include <QtGui/QApplication> +#include <QtGui/QButtonGroup> +#include <QtGui/QDialog> +#include <QtGui/QGridLayout> +#include <QtGui/QGroupBox> +#include <QtGui/QHBoxLayout> +#include <QtGui/QLabel> +#include <QtGui/QLineEdit> +#include <QtGui/QPushButton> +#include <QtGui/QRadioButton> +#include <QtGui/QSpacerItem> +#include <QtGui/QVBoxLayout> +#include <QtGui/QWidget> + +class Ui_DetailsDialog +{ +public: + QGridLayout *gridLayout; + QHBoxLayout *hboxLayout; + QLabel *label_28; + QLineEdit *pathLineEdit; + QVBoxLayout *vboxLayout; + QGroupBox *groupBox_3; + QHBoxLayout *hboxLayout1; + QRadioButton *id3v1RadioButton; + QRadioButton *id3v2RadioButton; + QRadioButton *apeRadioButton; + QGroupBox *groupBox; + QGridLayout *gridLayout1; + QLabel *label; + QLabel *levelLabel; + QLabel *label_2; + QLabel *bitRateLabel; + QLabel *label_3; + QLabel *sampleRateLabel; + QLabel *label_5; + QLabel *fileSizeLabel; + QLabel *label_6; + QLabel *modeLabel; + QLabel *label_8; + QLabel *copyrightLabel; + QLabel *label_9; + QLabel *originalLabel; + QGroupBox *tagGroupBox; + QVBoxLayout *vboxLayout1; + QWidget *tagsWidget; + QGridLayout *gridLayout2; + QLabel *label_21; + QLineEdit *titleLineEdit; + QLabel *label_22; + QLineEdit *artistLineEdit; + QLabel *label_23; + QLineEdit *albumLineEdit; + QLabel *label_24; + QLineEdit *commentLineEdit; + QLabel *label_25; + QLineEdit *yearLineEdit; + QLabel *label_26; + QLineEdit *trackLineEdit; + QLabel *label_27; + QLineEdit *genreLineEdit; + QHBoxLayout *hboxLayout2; + QPushButton *createButton; + QPushButton *deleteButton; + QPushButton *saveButton; + QSpacerItem *spacerItem; + QPushButton *pushButton_3; + + void setupUi(QDialog *DetailsDialog) + { + if (DetailsDialog->objectName().isEmpty()) + DetailsDialog->setObjectName(QString::fromUtf8("DetailsDialog")); + QSize size(593, 402); + size = size.expandedTo(DetailsDialog->minimumSizeHint()); + DetailsDialog->resize(size); + gridLayout = new QGridLayout(DetailsDialog); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + hboxLayout = new QHBoxLayout(); + hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + label_28 = new QLabel(DetailsDialog); + label_28->setObjectName(QString::fromUtf8("label_28")); + label_28->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter); + + hboxLayout->addWidget(label_28); + + pathLineEdit = new QLineEdit(DetailsDialog); + pathLineEdit->setObjectName(QString::fromUtf8("pathLineEdit")); + pathLineEdit->setReadOnly(true); + + hboxLayout->addWidget(pathLineEdit); + + + gridLayout->addLayout(hboxLayout, 0, 0, 1, 3); + + vboxLayout = new QVBoxLayout(); + vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + groupBox_3 = new QGroupBox(DetailsDialog); + groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); + QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(groupBox_3->sizePolicy().hasHeightForWidth()); + groupBox_3->setSizePolicy(sizePolicy); + hboxLayout1 = new QHBoxLayout(groupBox_3); + hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + id3v1RadioButton = new QRadioButton(groupBox_3); + id3v1RadioButton->setObjectName(QString::fromUtf8("id3v1RadioButton")); + + hboxLayout1->addWidget(id3v1RadioButton); + + id3v2RadioButton = new QRadioButton(groupBox_3); + id3v2RadioButton->setObjectName(QString::fromUtf8("id3v2RadioButton")); + + hboxLayout1->addWidget(id3v2RadioButton); + + apeRadioButton = new QRadioButton(groupBox_3); + apeRadioButton->setObjectName(QString::fromUtf8("apeRadioButton")); + + hboxLayout1->addWidget(apeRadioButton); + + + vboxLayout->addWidget(groupBox_3); + + groupBox = new QGroupBox(DetailsDialog); + groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setMinimumSize(QSize(200, 16)); + gridLayout1 = new QGridLayout(groupBox); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + label = new QLabel(groupBox); + label->setObjectName(QString::fromUtf8("label")); + label->setTextFormat(Qt::AutoText); + label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout1->addWidget(label, 0, 0, 1, 1); + + levelLabel = new QLabel(groupBox); + levelLabel->setObjectName(QString::fromUtf8("levelLabel")); + + gridLayout1->addWidget(levelLabel, 0, 1, 1, 1); + + label_2 = new QLabel(groupBox); + label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout1->addWidget(label_2, 1, 0, 1, 1); + + bitRateLabel = new QLabel(groupBox); + bitRateLabel->setObjectName(QString::fromUtf8("bitRateLabel")); + + gridLayout1->addWidget(bitRateLabel, 1, 1, 1, 1); + + label_3 = new QLabel(groupBox); + label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout1->addWidget(label_3, 2, 0, 1, 1); + + sampleRateLabel = new QLabel(groupBox); + sampleRateLabel->setObjectName(QString::fromUtf8("sampleRateLabel")); + + gridLayout1->addWidget(sampleRateLabel, 2, 1, 1, 1); + + label_5 = new QLabel(groupBox); + label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout1->addWidget(label_5, 3, 0, 1, 1); + + fileSizeLabel = new QLabel(groupBox); + fileSizeLabel->setObjectName(QString::fromUtf8("fileSizeLabel")); + + gridLayout1->addWidget(fileSizeLabel, 3, 1, 1, 1); + + label_6 = new QLabel(groupBox); + label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout1->addWidget(label_6, 4, 0, 1, 1); + + modeLabel = new QLabel(groupBox); + modeLabel->setObjectName(QString::fromUtf8("modeLabel")); + + gridLayout1->addWidget(modeLabel, 4, 1, 1, 1); + + label_8 = new QLabel(groupBox); + label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout1->addWidget(label_8, 5, 0, 1, 1); + + copyrightLabel = new QLabel(groupBox); + copyrightLabel->setObjectName(QString::fromUtf8("copyrightLabel")); + + gridLayout1->addWidget(copyrightLabel, 5, 1, 1, 1); + + label_9 = new QLabel(groupBox); + label_9->setObjectName(QString::fromUtf8("label_9")); + label_9->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout1->addWidget(label_9, 6, 0, 1, 1); + + originalLabel = new QLabel(groupBox); + originalLabel->setObjectName(QString::fromUtf8("originalLabel")); + + gridLayout1->addWidget(originalLabel, 6, 1, 1, 1); + + + vboxLayout->addWidget(groupBox); + + + gridLayout->addLayout(vboxLayout, 1, 0, 2, 1); + + tagGroupBox = new QGroupBox(DetailsDialog); + tagGroupBox->setObjectName(QString::fromUtf8("tagGroupBox")); + vboxLayout1 = new QVBoxLayout(tagGroupBox); + vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + tagsWidget = new QWidget(tagGroupBox); + tagsWidget->setObjectName(QString::fromUtf8("tagsWidget")); + tagsWidget->setEnabled(true); + gridLayout2 = new QGridLayout(tagsWidget); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + label_21 = new QLabel(tagsWidget); + label_21->setObjectName(QString::fromUtf8("label_21")); + label_21->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout2->addWidget(label_21, 0, 0, 1, 1); + + titleLineEdit = new QLineEdit(tagsWidget); + titleLineEdit->setObjectName(QString::fromUtf8("titleLineEdit")); + + gridLayout2->addWidget(titleLineEdit, 0, 1, 1, 3); + + label_22 = new QLabel(tagsWidget); + label_22->setObjectName(QString::fromUtf8("label_22")); + label_22->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout2->addWidget(label_22, 1, 0, 1, 1); + + artistLineEdit = new QLineEdit(tagsWidget); + artistLineEdit->setObjectName(QString::fromUtf8("artistLineEdit")); + + gridLayout2->addWidget(artistLineEdit, 1, 1, 1, 3); + + label_23 = new QLabel(tagsWidget); + label_23->setObjectName(QString::fromUtf8("label_23")); + label_23->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout2->addWidget(label_23, 2, 0, 1, 1); + + albumLineEdit = new QLineEdit(tagsWidget); + albumLineEdit->setObjectName(QString::fromUtf8("albumLineEdit")); + + gridLayout2->addWidget(albumLineEdit, 2, 1, 1, 3); + + label_24 = new QLabel(tagsWidget); + label_24->setObjectName(QString::fromUtf8("label_24")); + label_24->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout2->addWidget(label_24, 3, 0, 1, 1); + + commentLineEdit = new QLineEdit(tagsWidget); + commentLineEdit->setObjectName(QString::fromUtf8("commentLineEdit")); + + gridLayout2->addWidget(commentLineEdit, 3, 1, 1, 3); + + label_25 = new QLabel(tagsWidget); + label_25->setObjectName(QString::fromUtf8("label_25")); + label_25->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout2->addWidget(label_25, 4, 0, 1, 1); + + yearLineEdit = new QLineEdit(tagsWidget); + yearLineEdit->setObjectName(QString::fromUtf8("yearLineEdit")); + + gridLayout2->addWidget(yearLineEdit, 4, 1, 1, 1); + + label_26 = new QLabel(tagsWidget); + label_26->setObjectName(QString::fromUtf8("label_26")); + label_26->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout2->addWidget(label_26, 4, 2, 1, 1); + + trackLineEdit = new QLineEdit(tagsWidget); + trackLineEdit->setObjectName(QString::fromUtf8("trackLineEdit")); + + gridLayout2->addWidget(trackLineEdit, 4, 3, 1, 1); + + label_27 = new QLabel(tagsWidget); + label_27->setObjectName(QString::fromUtf8("label_27")); + label_27->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + gridLayout2->addWidget(label_27, 5, 0, 1, 1); + + genreLineEdit = new QLineEdit(tagsWidget); + genreLineEdit->setObjectName(QString::fromUtf8("genreLineEdit")); + + gridLayout2->addWidget(genreLineEdit, 5, 1, 1, 3); + + + vboxLayout1->addWidget(tagsWidget); + + hboxLayout2 = new QHBoxLayout(); + hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + createButton = new QPushButton(tagGroupBox); + createButton->setObjectName(QString::fromUtf8("createButton")); + + hboxLayout2->addWidget(createButton); + + deleteButton = new QPushButton(tagGroupBox); + deleteButton->setObjectName(QString::fromUtf8("deleteButton")); + + hboxLayout2->addWidget(deleteButton); + + saveButton = new QPushButton(tagGroupBox); + saveButton->setObjectName(QString::fromUtf8("saveButton")); + saveButton->setEnabled(false); + + hboxLayout2->addWidget(saveButton); + + + vboxLayout1->addLayout(hboxLayout2); + + + gridLayout->addWidget(tagGroupBox, 1, 1, 1, 2); + + spacerItem = new QSpacerItem(111, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout->addItem(spacerItem, 2, 1, 1, 1); + + pushButton_3 = new QPushButton(DetailsDialog); + pushButton_3->setObjectName(QString::fromUtf8("pushButton_3")); + + gridLayout->addWidget(pushButton_3, 2, 2, 1, 1); + + + retranslateUi(DetailsDialog); + QObject::connect(pushButton_3, SIGNAL(clicked()), DetailsDialog, SLOT(close())); + + QMetaObject::connectSlotsByName(DetailsDialog); + } // setupUi + + void retranslateUi(QDialog *DetailsDialog) + { + DetailsDialog->setWindowTitle(QApplication::translate("DetailsDialog", "Details", 0, QApplication::UnicodeUTF8)); + label_28->setText(QApplication::translate("DetailsDialog", "File path:", 0, QApplication::UnicodeUTF8)); + groupBox_3->setTitle(QApplication::translate("DetailsDialog", "Tag Choice", 0, QApplication::UnicodeUTF8)); + id3v1RadioButton->setText(QApplication::translate("DetailsDialog", "ID3v1", 0, QApplication::UnicodeUTF8)); + id3v2RadioButton->setText(QApplication::translate("DetailsDialog", "ID3v2", 0, QApplication::UnicodeUTF8)); + apeRadioButton->setText(QApplication::translate("DetailsDialog", "APE", 0, QApplication::UnicodeUTF8)); + groupBox->setTitle(QApplication::translate("DetailsDialog", "MPEG Info", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("DetailsDialog", "MPEG level:", 0, QApplication::UnicodeUTF8)); + levelLabel->setText(QApplication::translate("DetailsDialog", "-", 0, QApplication::UnicodeUTF8)); + label_2->setText(QApplication::translate("DetailsDialog", "Bit rate:", 0, QApplication::UnicodeUTF8)); + bitRateLabel->setText(QApplication::translate("DetailsDialog", "-", 0, QApplication::UnicodeUTF8)); + label_3->setText(QApplication::translate("DetailsDialog", "Sample rate:", 0, QApplication::UnicodeUTF8)); + sampleRateLabel->setText(QApplication::translate("DetailsDialog", "-", 0, QApplication::UnicodeUTF8)); + label_5->setText(QApplication::translate("DetailsDialog", "File size:", 0, QApplication::UnicodeUTF8)); + fileSizeLabel->setText(QApplication::translate("DetailsDialog", "-", 0, QApplication::UnicodeUTF8)); + label_6->setText(QApplication::translate("DetailsDialog", "Mode:", 0, QApplication::UnicodeUTF8)); + modeLabel->setText(QApplication::translate("DetailsDialog", "-", 0, QApplication::UnicodeUTF8)); + label_8->setText(QApplication::translate("DetailsDialog", "Copyright:", 0, QApplication::UnicodeUTF8)); + copyrightLabel->setText(QApplication::translate("DetailsDialog", "-", 0, QApplication::UnicodeUTF8)); + label_9->setText(QApplication::translate("DetailsDialog", "Original:", 0, QApplication::UnicodeUTF8)); + originalLabel->setText(QApplication::translate("DetailsDialog", "-", 0, QApplication::UnicodeUTF8)); + tagGroupBox->setTitle(QApplication::translate("DetailsDialog", "ID3v1 Tag", 0, QApplication::UnicodeUTF8)); + label_21->setText(QApplication::translate("DetailsDialog", "Title:", 0, QApplication::UnicodeUTF8)); + label_22->setText(QApplication::translate("DetailsDialog", "Artist:", 0, QApplication::UnicodeUTF8)); + label_23->setText(QApplication::translate("DetailsDialog", "Album:", 0, QApplication::UnicodeUTF8)); + label_24->setText(QApplication::translate("DetailsDialog", "Comment:", 0, QApplication::UnicodeUTF8)); + label_25->setText(QApplication::translate("DetailsDialog", "Year:", 0, QApplication::UnicodeUTF8)); + label_26->setText(QApplication::translate("DetailsDialog", "Track number:", 0, QApplication::UnicodeUTF8)); + label_27->setText(QApplication::translate("DetailsDialog", "Genre:", 0, QApplication::UnicodeUTF8)); + createButton->setText(QApplication::translate("DetailsDialog", "Create", 0, QApplication::UnicodeUTF8)); + deleteButton->setText(QApplication::translate("DetailsDialog", "Delete", 0, QApplication::UnicodeUTF8)); + saveButton->setText(QApplication::translate("DetailsDialog", "Save", 0, QApplication::UnicodeUTF8)); + pushButton_3->setText(QApplication::translate("DetailsDialog", "Close", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(DetailsDialog); + } // retranslateUi + +}; + +namespace Ui { + class DetailsDialog: public Ui_DetailsDialog {}; +} // namespace Ui + +#endif // UI_DETAILSDIALOG_H diff --git a/src/plugins/Input/mad/ui_settingsdialog.h b/src/plugins/Input/mad/ui_settingsdialog.h new file mode 100644 index 000000000..47cdac64f --- /dev/null +++ b/src/plugins/Input/mad/ui_settingsdialog.h @@ -0,0 +1,245 @@ +/******************************************************************************** +** Form generated from reading ui file 'settingsdialog.ui' +** +** Created: Thu Feb 7 00:21:43 2008 +** by: Qt User Interface Compiler version 4.3.0 +** +** WARNING! All changes made in this file will be lost when recompiling ui file! +********************************************************************************/ + +#ifndef UI_SETTINGSDIALOG_H +#define UI_SETTINGSDIALOG_H + +#include <QtCore/QVariant> +#include <QtGui/QAction> +#include <QtGui/QApplication> +#include <QtGui/QButtonGroup> +#include <QtGui/QComboBox> +#include <QtGui/QDialog> +#include <QtGui/QGroupBox> +#include <QtGui/QHBoxLayout> +#include <QtGui/QLabel> +#include <QtGui/QPushButton> +#include <QtGui/QSpacerItem> +#include <QtGui/QVBoxLayout> + +class Ui_SettingsDialog +{ +public: + QVBoxLayout *vboxLayout; + QGroupBox *groupBox_2; + QVBoxLayout *vboxLayout1; + QHBoxLayout *hboxLayout; + QLabel *label_15_2; + QComboBox *firstTagComboBox; + QHBoxLayout *hboxLayout1; + QLabel *label_15_3; + QComboBox *secondTagComboBox; + QHBoxLayout *hboxLayout2; + QLabel *label_15_4; + QComboBox *thirdTagComboBox; + QGroupBox *groupBox; + QVBoxLayout *vboxLayout2; + QHBoxLayout *hboxLayout3; + QLabel *label_17_2_2; + QComboBox *id3v1EncComboBox; + QHBoxLayout *hboxLayout4; + QLabel *label_18_2_2; + QComboBox *id3v2EncComboBox; + QHBoxLayout *hboxLayout5; + QSpacerItem *spacerItem; + QPushButton *okButton; + QPushButton *cancelButton; + + void setupUi(QDialog *SettingsDialog) + { + if (SettingsDialog->objectName().isEmpty()) + SettingsDialog->setObjectName(QString::fromUtf8("SettingsDialog")); + QSize size(242, 303); + size = size.expandedTo(SettingsDialog->minimumSizeHint()); + SettingsDialog->resize(size); + vboxLayout = new QVBoxLayout(SettingsDialog); + vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + groupBox_2 = new QGroupBox(SettingsDialog); + groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + vboxLayout1 = new QVBoxLayout(groupBox_2); + vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + hboxLayout = new QHBoxLayout(); + hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + label_15_2 = new QLabel(groupBox_2); + label_15_2->setObjectName(QString::fromUtf8("label_15_2")); + QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(label_15_2->sizePolicy().hasHeightForWidth()); + label_15_2->setSizePolicy(sizePolicy); + label_15_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + hboxLayout->addWidget(label_15_2); + + firstTagComboBox = new QComboBox(groupBox_2); + firstTagComboBox->setObjectName(QString::fromUtf8("firstTagComboBox")); + + hboxLayout->addWidget(firstTagComboBox); + + + vboxLayout1->addLayout(hboxLayout); + + hboxLayout1 = new QHBoxLayout(); + hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + label_15_3 = new QLabel(groupBox_2); + label_15_3->setObjectName(QString::fromUtf8("label_15_3")); + sizePolicy.setHeightForWidth(label_15_3->sizePolicy().hasHeightForWidth()); + label_15_3->setSizePolicy(sizePolicy); + label_15_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + hboxLayout1->addWidget(label_15_3); + + secondTagComboBox = new QComboBox(groupBox_2); + secondTagComboBox->setObjectName(QString::fromUtf8("secondTagComboBox")); + + hboxLayout1->addWidget(secondTagComboBox); + + + vboxLayout1->addLayout(hboxLayout1); + + hboxLayout2 = new QHBoxLayout(); + hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + label_15_4 = new QLabel(groupBox_2); + label_15_4->setObjectName(QString::fromUtf8("label_15_4")); + sizePolicy.setHeightForWidth(label_15_4->sizePolicy().hasHeightForWidth()); + label_15_4->setSizePolicy(sizePolicy); + label_15_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + hboxLayout2->addWidget(label_15_4); + + thirdTagComboBox = new QComboBox(groupBox_2); + thirdTagComboBox->setObjectName(QString::fromUtf8("thirdTagComboBox")); + + hboxLayout2->addWidget(thirdTagComboBox); + + + vboxLayout1->addLayout(hboxLayout2); + + + vboxLayout->addWidget(groupBox_2); + + groupBox = new QGroupBox(SettingsDialog); + groupBox->setObjectName(QString::fromUtf8("groupBox")); + vboxLayout2 = new QVBoxLayout(groupBox); + vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + hboxLayout3 = new QHBoxLayout(); + hboxLayout3->setSpacing(6); + hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setContentsMargins(0, 0, 0, 0); + label_17_2_2 = new QLabel(groupBox); + label_17_2_2->setObjectName(QString::fromUtf8("label_17_2_2")); + label_17_2_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + hboxLayout3->addWidget(label_17_2_2); + + id3v1EncComboBox = new QComboBox(groupBox); + id3v1EncComboBox->setObjectName(QString::fromUtf8("id3v1EncComboBox")); + + hboxLayout3->addWidget(id3v1EncComboBox); + + + vboxLayout2->addLayout(hboxLayout3); + + hboxLayout4 = new QHBoxLayout(); + hboxLayout4->setSpacing(6); + hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + hboxLayout4->setContentsMargins(0, 0, 0, 0); + label_18_2_2 = new QLabel(groupBox); + label_18_2_2->setObjectName(QString::fromUtf8("label_18_2_2")); + label_18_2_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + + hboxLayout4->addWidget(label_18_2_2); + + id3v2EncComboBox = new QComboBox(groupBox); + id3v2EncComboBox->setObjectName(QString::fromUtf8("id3v2EncComboBox")); + + hboxLayout4->addWidget(id3v2EncComboBox); + + + vboxLayout2->addLayout(hboxLayout4); + + + vboxLayout->addWidget(groupBox); + + hboxLayout5 = new QHBoxLayout(); + hboxLayout5->setSpacing(6); + hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5")); + hboxLayout5->setContentsMargins(0, 0, 0, 0); + spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); + + hboxLayout5->addItem(spacerItem); + + okButton = new QPushButton(SettingsDialog); + okButton->setObjectName(QString::fromUtf8("okButton")); + + hboxLayout5->addWidget(okButton); + + cancelButton = new QPushButton(SettingsDialog); + cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + + hboxLayout5->addWidget(cancelButton); + + + vboxLayout->addLayout(hboxLayout5); + + + retranslateUi(SettingsDialog); + QObject::connect(cancelButton, SIGNAL(clicked()), SettingsDialog, SLOT(reject())); + + firstTagComboBox->setCurrentIndex(0); + secondTagComboBox->setCurrentIndex(0); + thirdTagComboBox->setCurrentIndex(0); + + + QMetaObject::connectSlotsByName(SettingsDialog); + } // setupUi + + void retranslateUi(QDialog *SettingsDialog) + { + SettingsDialog->setWindowTitle(QApplication::translate("SettingsDialog", "MPEG Plugin Settings", 0, QApplication::UnicodeUTF8)); + groupBox_2->setTitle(QApplication::translate("SettingsDialog", "Tag Priority", 0, QApplication::UnicodeUTF8)); + label_15_2->setText(QApplication::translate("SettingsDialog", "First:", 0, QApplication::UnicodeUTF8)); + firstTagComboBox->clear(); + firstTagComboBox->insertItems(0, QStringList() + << QApplication::translate("SettingsDialog", "ID3v1", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "ID3v2", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "APE", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "Disabled", 0, QApplication::UnicodeUTF8) + ); + label_15_3->setText(QApplication::translate("SettingsDialog", "Second:", 0, QApplication::UnicodeUTF8)); + secondTagComboBox->clear(); + secondTagComboBox->insertItems(0, QStringList() + << QApplication::translate("SettingsDialog", "ID3v1", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "ID3v2", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "APE", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "Disabled", 0, QApplication::UnicodeUTF8) + ); + label_15_4->setText(QApplication::translate("SettingsDialog", "Third:", 0, QApplication::UnicodeUTF8)); + thirdTagComboBox->clear(); + thirdTagComboBox->insertItems(0, QStringList() + << QApplication::translate("SettingsDialog", "ID3v1", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "ID3v2", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "APE", 0, QApplication::UnicodeUTF8) + << QApplication::translate("SettingsDialog", "Disabled", 0, QApplication::UnicodeUTF8) + ); + groupBox->setTitle(QApplication::translate("SettingsDialog", "Encodings", 0, QApplication::UnicodeUTF8)); + label_17_2_2->setText(QApplication::translate("SettingsDialog", "ID3v1 encoding:", 0, QApplication::UnicodeUTF8)); + label_18_2_2->setText(QApplication::translate("SettingsDialog", "ID3v2 encoding:", 0, QApplication::UnicodeUTF8)); + okButton->setText(QApplication::translate("SettingsDialog", "OK", 0, QApplication::UnicodeUTF8)); + cancelButton->setText(QApplication::translate("SettingsDialog", "Cancel", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(SettingsDialog); + } // retranslateUi + +}; + +namespace Ui { + class SettingsDialog: public Ui_SettingsDialog {}; +} // namespace Ui + +#endif // UI_SETTINGSDIALOG_H diff --git a/lib/qmmp/Input/mpc/CMakeLists.txt b/src/plugins/Input/mpc/CMakeLists.txt index dccd6dd6b..dccd6dd6b 100644 --- a/lib/qmmp/Input/mpc/CMakeLists.txt +++ b/src/plugins/Input/mpc/CMakeLists.txt diff --git a/src/plugins/Input/mpc/Makefile b/src/plugins/Input/mpc/Makefile new file mode 100644 index 000000000..7aa3ee7b3 --- /dev/null +++ b/src/plugins/Input/mpc/Makefile @@ -0,0 +1,254 @@ +############################################################################# +# Makefile for building: libmpc.so +# Generated by qmake (2.01a) (Qt 4.3.1) on: Thu Feb 7 14:07:02 2008 +# Project: mpc.pro +# Template: lib +# Command: /usr/local/Trolltech/Qt-4.3.1/bin/qmake -unix -o Makefile mpc.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -O2 -I/usr/include/taglib -Wall -W -D_REENTRANT -fPIC $(DEFINES) +CXXFLAGS = -pipe -O2 -I/usr/include/taglib -Wall -W -D_REENTRANT -fPIC $(DEFINES) +INCPATH = -I/usr/local/Trolltech/Qt-4.3.1/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.3.1/include/QtCore -I/usr/local/Trolltech/Qt-4.3.1/include/QtCore -I/usr/local/Trolltech/Qt-4.3.1/include/QtGui -I/usr/local/Trolltech/Qt-4.3.1/include/QtGui -I/usr/local/Trolltech/Qt-4.3.1/include -I../../../qmmp -I.build/moc -I.build/ui +LINK = g++ +LFLAGS = -Wl,-rpath,/usr/local/Trolltech/Qt-4.3.1/lib -shared +LIBS = $(SUBLIBS) -L../../../../lib -L/usr/local/Trolltech/Qt-4.3.1/lib -lqmmp -L/usr/lib -lmpcdec -I/usr/include -ltag -lQtGui -L/usr/local/Trolltech/Qt-4.3.1/lib -L/usr/X11R6/lib -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lglib-2.0 -lrt -ldl -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/local/Trolltech/Qt-4.3.1/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -sf +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = .build/obj/ + +####### Files + +SOURCES = decoder_mpc.cpp \ + decodermpcfactory.cpp \ + detailsdialog.cpp .build/moc/moc_decodermpcfactory.cpp \ + .build/moc/moc_detailsdialog.cpp +OBJECTS = .build/obj/decoder_mpc.o \ + .build/obj/decodermpcfactory.o \ + .build/obj/detailsdialog.o \ + .build/obj/moc_decodermpcfactory.o \ + .build/obj/moc_detailsdialog.o +DIST = /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf \ + ../../../../qmmp.pri \ + ../../plugins.pri \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/link_pkgconfig.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf \ + mpc.pro +QMAKE_TARGET = mpc +DESTDIR = ../../../../lib/qmmp/Input/ +TARGET = libmpc.so +TARGETD = libmpc.so + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile ../../../../lib/qmmp/Input/$(TARGET) + +../../../../lib/qmmp/Input/$(TARGET): .build/ui/ui_detailsdialog.h $(OBJECTS) $(SUBLIBS) $(OBJCOMP) + @$(CHK_DIR_EXISTS) ../../../../lib/qmmp/Input/ || $(MKDIR) ../../../../lib/qmmp/Input/ + -$(DEL_FILE) $(TARGET) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) + -$(MOVE) $(TARGET) ../../../../lib/qmmp/Input/ + + + +Makefile: mpc.pro /usr/local/Trolltech/Qt-4.3.1/mkspecs/linux-g++/qmake.conf /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf \ + ../../../../qmmp.pri \ + ../../plugins.pri \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/link_pkgconfig.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf \ + /usr/local/Trolltech/Qt-4.3.1/lib/libQtGui.prl \ + /usr/local/Trolltech/Qt-4.3.1/lib/libQtCore.prl + $(QMAKE) -unix -o Makefile mpc.pro +/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf: +../../../../qmmp.pri: +../../plugins.pri: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/release.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/link_pkgconfig.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf: +/usr/local/Trolltech/Qt-4.3.1/lib/libQtGui.prl: +/usr/local/Trolltech/Qt-4.3.1/lib/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -unix -o Makefile mpc.pro + +dist: + @$(CHK_DIR_EXISTS) .build/obj/mpc1.0.0 || $(MKDIR) .build/obj/mpc1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .build/obj/mpc1.0.0/ && $(COPY_FILE) --parents decodermpcfactory.h decoder_mpc.h detailsdialog.h .build/obj/mpc1.0.0/ && $(COPY_FILE) --parents decoder_mpc.cpp decodermpcfactory.cpp detailsdialog.cpp .build/obj/mpc1.0.0/ && $(COPY_FILE) --parents detailsdialog.ui .build/obj/mpc1.0.0/ && (cd `dirname .build/obj/mpc1.0.0` && $(TAR) mpc1.0.0.tar mpc1.0.0 && $(COMPRESS) mpc1.0.0.tar) && $(MOVE) `dirname .build/obj/mpc1.0.0`/mpc1.0.0.tar.gz . && $(DEL_FILE) -r .build/obj/mpc1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) ../../../../lib/qmmp/Input/libmpc.so + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: .build/moc/moc_decodermpcfactory.cpp .build/moc/moc_detailsdialog.cpp +compiler_moc_header_clean: + -$(DEL_FILE) .build/moc/moc_decodermpcfactory.cpp .build/moc/moc_detailsdialog.cpp +.build/moc/moc_decodermpcfactory.cpp: decodermpcfactory.h + /usr/local/Trolltech/Qt-4.3.1/bin/moc $(DEFINES) $(INCPATH) decodermpcfactory.h -o .build/moc/moc_decodermpcfactory.cpp + +.build/moc/moc_detailsdialog.cpp: .build/ui/ui_detailsdialog.h \ + detailsdialog.h + /usr/local/Trolltech/Qt-4.3.1/bin/moc $(DEFINES) $(INCPATH) detailsdialog.h -o .build/moc/moc_detailsdialog.cpp + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: .build/ui/ui_detailsdialog.h +compiler_uic_clean: + -$(DEL_FILE) .build/ui/ui_detailsdialog.h +.build/ui/ui_detailsdialog.h: detailsdialog.ui + /usr/local/Trolltech/Qt-4.3.1/bin/uic detailsdialog.ui -o .build/ui/ui_detailsdialog.h + +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean compiler_uic_clean + +####### Compile + +.build/obj/decoder_mpc.o: decoder_mpc.cpp decoder_mpc.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/decoder_mpc.o decoder_mpc.cpp + +.build/obj/decodermpcfactory.o: decodermpcfactory.cpp detailsdialog.h \ + .build/ui/ui_detailsdialog.h \ + decoder_mpc.h \ + decodermpcfactory.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/decodermpcfactory.o decodermpcfactory.cpp + +.build/obj/detailsdialog.o: detailsdialog.cpp detailsdialog.h \ + .build/ui/ui_detailsdialog.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/detailsdialog.o detailsdialog.cpp + +.build/obj/moc_decodermpcfactory.o: .build/moc/moc_decodermpcfactory.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_decodermpcfactory.o .build/moc/moc_decodermpcfactory.cpp + +.build/obj/moc_detailsdialog.o: .build/moc/moc_detailsdialog.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_detailsdialog.o .build/moc/moc_detailsdialog.cpp + +####### Install + +install_target: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/lib/qmmp/Input/ || $(MKDIR) $(INSTALL_ROOT)/lib/qmmp/Input/ + -$(INSTALL_PROGRAM) "../../../../lib/qmmp/Input/$(TARGET)" "$(INSTALL_ROOT)/lib/qmmp/Input/$(TARGET)" + -strip --strip-unneeded "$(INSTALL_ROOT)/lib/qmmp/Input/$(TARGET)" + +uninstall_target: FORCE + -$(DEL_FILE) "$(INSTALL_ROOT)/lib/qmmp/Input/$(TARGET)" + -$(DEL_DIR) $(INSTALL_ROOT)/lib/qmmp/Input/ + + +install: install_target FORCE + +uninstall: uninstall_target FORCE + +FORCE: + diff --git a/lib/qmmp/Input/mpc/decoder_mpc.cpp b/src/plugins/Input/mpc/decoder_mpc.cpp index 10591a384..10591a384 100644 --- a/lib/qmmp/Input/mpc/decoder_mpc.cpp +++ b/src/plugins/Input/mpc/decoder_mpc.cpp diff --git a/lib/qmmp/Input/mpc/decoder_mpc.h b/src/plugins/Input/mpc/decoder_mpc.h index 3b17b100e..3b17b100e 100644 --- a/lib/qmmp/Input/mpc/decoder_mpc.h +++ b/src/plugins/Input/mpc/decoder_mpc.h diff --git a/lib/qmmp/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp index f2874a08d..f2874a08d 100644 --- a/lib/qmmp/Input/mpc/decodermpcfactory.cpp +++ b/src/plugins/Input/mpc/decodermpcfactory.cpp diff --git a/lib/qmmp/Input/mpc/decodermpcfactory.h b/src/plugins/Input/mpc/decodermpcfactory.h index 0f8dda55f..0f8dda55f 100644 --- a/lib/qmmp/Input/mpc/decodermpcfactory.h +++ b/src/plugins/Input/mpc/decodermpcfactory.h diff --git a/lib/qmmp/Input/mpc/detailsdialog.cpp b/src/plugins/Input/mpc/detailsdialog.cpp index 472046717..472046717 100644 --- a/lib/qmmp/Input/mpc/detailsdialog.cpp +++ b/src/plugins/Input/mpc/detailsdialog.cpp diff --git a/lib/qmmp/Input/mpc/detailsdialog.h b/src/plugins/Input/mpc/detailsdialog.h index 70540bda1..70540bda1 100644 --- a/lib/qmmp/Input/mpc/detailsdialog.h +++ b/src/plugins/Input/mpc/detailsdialog.h diff --git a/lib/qmmp/Input/mpc/detailsdialog.ui b/src/plugins/Input/mpc/detailsdialog.ui index 918dd3abf..918dd3abf 100644 --- a/lib/qmmp/Input/mpc/detailsdialog.ui +++ b/src/plugins/Input/mpc/detailsdialog.ui diff --git a/lib/qmmp/Input/mpc/mpc.pro b/src/plugins/Input/mpc/mpc.pro index 93c7a5d38..f1a50683d 100644 --- a/lib/qmmp/Input/mpc/mpc.pro +++ b/src/plugins/Input/mpc/mpc.pro @@ -1,3 +1,5 @@ +include(../../plugins.pri) + FORMS += detailsdialog.ui HEADERS += decodermpcfactory.h \ decoder_mpc.h \ @@ -5,15 +7,18 @@ HEADERS += decodermpcfactory.h \ SOURCES += decoder_mpc.cpp \ decodermpcfactory.cpp \ detailsdialog.cpp -DESTDIR = ../ -QMAKE_CLEAN += ../libmpc.so -INCLUDEPATH += ../../../ + +TARGET=$$PLUGINS_PREFIX/Input/mpc +QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libmpc.so + + +INCLUDEPATH += ../../../qmmp CONFIG += release \ warn_on \ plugin \ link_pkgconfig TEMPLATE = lib -QMAKE_LIBDIR += ../../../ +QMAKE_LIBDIR += ../../../../lib LIBS += -lqmmp -L/usr/lib -lmpcdec -I/usr/include PKGCONFIG += taglib #TRANSLATIONS = translations/mpc_plugin_ru.ts diff --git a/lib/qmmp/Input/mpc/translations/mpc_plugin_ru.qm b/src/plugins/Input/mpc/translations/mpc_plugin_ru.qm Binary files differindex 0eb8c1533..0eb8c1533 100644 --- a/lib/qmmp/Input/mpc/translations/mpc_plugin_ru.qm +++ b/src/plugins/Input/mpc/translations/mpc_plugin_ru.qm diff --git a/lib/qmmp/Input/mpc/translations/mpc_plugin_ru.ts b/src/plugins/Input/mpc/translations/mpc_plugin_ru.ts index 53ecd8dc8..53ecd8dc8 100644 --- a/lib/qmmp/Input/mpc/translations/mpc_plugin_ru.ts +++ b/src/plugins/Input/mpc/translations/mpc_plugin_ru.ts diff --git a/lib/qmmp/Input/mpc/translations/translations.qrc b/src/plugins/Input/mpc/translations/translations.qrc index cc88de9ce..cc88de9ce 100644 --- a/lib/qmmp/Input/mpc/translations/translations.qrc +++ b/src/plugins/Input/mpc/translations/translations.qrc diff --git a/lib/qmmp/Input/sndfile/CMakeLists.txt b/src/plugins/Input/sndfile/CMakeLists.txt index 974db398e..974db398e 100644 --- a/lib/qmmp/Input/sndfile/CMakeLists.txt +++ b/src/plugins/Input/sndfile/CMakeLists.txt diff --git a/lib/qmmp/Input/sndfile/decoder_sndfile.cpp b/src/plugins/Input/sndfile/decoder_sndfile.cpp index b4baa2ba4..b4baa2ba4 100644 --- a/lib/qmmp/Input/sndfile/decoder_sndfile.cpp +++ b/src/plugins/Input/sndfile/decoder_sndfile.cpp diff --git a/lib/qmmp/Input/sndfile/decoder_sndfile.h b/src/plugins/Input/sndfile/decoder_sndfile.h index 53bb8fd81..53bb8fd81 100644 --- a/lib/qmmp/Input/sndfile/decoder_sndfile.h +++ b/src/plugins/Input/sndfile/decoder_sndfile.h diff --git a/lib/qmmp/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp index b918d32fc..b918d32fc 100644 --- a/lib/qmmp/Input/sndfile/decodersndfilefactory.cpp +++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp diff --git a/lib/qmmp/Input/sndfile/decodersndfilefactory.h b/src/plugins/Input/sndfile/decodersndfilefactory.h index 8439594fb..8439594fb 100644 --- a/lib/qmmp/Input/sndfile/decodersndfilefactory.h +++ b/src/plugins/Input/sndfile/decodersndfilefactory.h diff --git a/lib/qmmp/Input/sndfile/sndfile.pro b/src/plugins/Input/sndfile/sndfile.pro index 4167c7591..701ea58fb 100644 --- a/lib/qmmp/Input/sndfile/sndfile.pro +++ b/src/plugins/Input/sndfile/sndfile.pro @@ -1,16 +1,20 @@ +include(../../plugins.pri) + HEADERS += decodersndfilefactory.h \ decoder_sndfile.h SOURCES += decoder_sndfile.cpp \ decodersndfilefactory.cpp -DESTDIR = ../ -QMAKE_CLEAN = ../libsndfile.so -INCLUDEPATH += ../../../ + +TARGET=$$PLUGINS_PREFIX/Input/sndfile +QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libsndfile.so + +INCLUDEPATH += ../../../qmmp CONFIG += release \ warn_on \ plugin \ link_pkgconfig TEMPLATE = lib -QMAKE_LIBDIR += ../../../ +QMAKE_LIBDIR += ../../../../lib LIBS += -lqmmp -L/usr/lib -I/usr/include PKGCONFIG += sndfile diff --git a/lib/qmmp/Input/vorbis/CMakeLists.txt b/src/plugins/Input/vorbis/CMakeLists.txt index baf5bad8c..baf5bad8c 100644 --- a/lib/qmmp/Input/vorbis/CMakeLists.txt +++ b/src/plugins/Input/vorbis/CMakeLists.txt diff --git a/lib/qmmp/Input/vorbis/decoder_vorbis.cpp b/src/plugins/Input/vorbis/decoder_vorbis.cpp index 31fb99c6f..31fb99c6f 100644 --- a/lib/qmmp/Input/vorbis/decoder_vorbis.cpp +++ b/src/plugins/Input/vorbis/decoder_vorbis.cpp diff --git a/lib/qmmp/Input/vorbis/decoder_vorbis.h b/src/plugins/Input/vorbis/decoder_vorbis.h index 091d856ff..091d856ff 100644 --- a/lib/qmmp/Input/vorbis/decoder_vorbis.h +++ b/src/plugins/Input/vorbis/decoder_vorbis.h diff --git a/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp b/src/plugins/Input/vorbis/decodervorbisfactory.cpp index c3b31ec52..c3b31ec52 100644 --- a/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp +++ b/src/plugins/Input/vorbis/decodervorbisfactory.cpp diff --git a/lib/qmmp/Input/vorbis/decodervorbisfactory.h b/src/plugins/Input/vorbis/decodervorbisfactory.h index 6830fc102..6830fc102 100644 --- a/lib/qmmp/Input/vorbis/decodervorbisfactory.h +++ b/src/plugins/Input/vorbis/decodervorbisfactory.h diff --git a/lib/qmmp/Input/vorbis/detailsdialog.cpp b/src/plugins/Input/vorbis/detailsdialog.cpp index bbe441703..bbe441703 100644 --- a/lib/qmmp/Input/vorbis/detailsdialog.cpp +++ b/src/plugins/Input/vorbis/detailsdialog.cpp diff --git a/lib/qmmp/Input/vorbis/detailsdialog.h b/src/plugins/Input/vorbis/detailsdialog.h index 94d4243b8..94d4243b8 100644 --- a/lib/qmmp/Input/vorbis/detailsdialog.h +++ b/src/plugins/Input/vorbis/detailsdialog.h diff --git a/lib/qmmp/Input/vorbis/detailsdialog.ui b/src/plugins/Input/vorbis/detailsdialog.ui index 1804ab268..1804ab268 100644 --- a/lib/qmmp/Input/vorbis/detailsdialog.ui +++ b/src/plugins/Input/vorbis/detailsdialog.ui diff --git a/lib/qmmp/Input/vorbis/translations/translations.qrc b/src/plugins/Input/vorbis/translations/translations.qrc index c5cacdfb0..c5cacdfb0 100644 --- a/lib/qmmp/Input/vorbis/translations/translations.qrc +++ b/src/plugins/Input/vorbis/translations/translations.qrc diff --git a/lib/qmmp/Input/vorbis/translations/vorbis_plugin_ru.qm b/src/plugins/Input/vorbis/translations/vorbis_plugin_ru.qm Binary files differindex a6a3a77b7..a6a3a77b7 100644 --- a/lib/qmmp/Input/vorbis/translations/vorbis_plugin_ru.qm +++ b/src/plugins/Input/vorbis/translations/vorbis_plugin_ru.qm diff --git a/lib/qmmp/Input/vorbis/translations/vorbis_plugin_ru.ts b/src/plugins/Input/vorbis/translations/vorbis_plugin_ru.ts index 16cf81ea3..16cf81ea3 100644 --- a/lib/qmmp/Input/vorbis/translations/vorbis_plugin_ru.ts +++ b/src/plugins/Input/vorbis/translations/vorbis_plugin_ru.ts diff --git a/lib/qmmp/Input/vorbis/vorbis.pro b/src/plugins/Input/vorbis/vorbis.pro index 89f393f54..afd7b6510 100644 --- a/lib/qmmp/Input/vorbis/vorbis.pro +++ b/src/plugins/Input/vorbis/vorbis.pro @@ -3,6 +3,8 @@ # ?????????? ???????????? ???????? ???????? ???????: ./Plugins/Input/ogg # ???? - ??????????: +include(../../plugins.pri) + FORMS += detailsdialog.ui HEADERS += decodervorbisfactory.h \ decoder_vorbis.h \ @@ -10,15 +12,17 @@ HEADERS += decodervorbisfactory.h \ SOURCES += decoder_vorbis.cpp \ decodervorbisfactory.cpp \ detailsdialog.cpp -DESTDIR = ../ -QMAKE_CLEAN += ../libvorbis.so -INCLUDEPATH += ../../../ + +TARGET=$$PLUGINS_PREFIX/Input/vorbis +QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libvorbis.so + +INCLUDEPATH += ../../../qmmp CONFIG += release \ warn_on \ plugin \ link_pkgconfig TEMPLATE = lib -QMAKE_LIBDIR += ../../../ +QMAKE_LIBDIR += ../../../../lib LIBS += -lqmmp -L/usr/lib PKGCONFIG += taglib ogg vorbisfile vorbis #TRANSLATIONS = translations/vorbis_plugin_ru.ts diff --git a/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption.pro b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption.pro new file mode 100644 index 000000000..1832a0166 --- /dev/null +++ b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = IncDecVolumeOption diff --git a/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro new file mode 100644 index 000000000..fdcef5e38 --- /dev/null +++ b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/IncDecVolumeOption.pro @@ -0,0 +1,26 @@ +include(../../../../../qmmp.pri) + +QMMPSRCROOT = ../../../../ + +INCLUDEPATH += $$QMMPSRCROOT/ui \ + $$QMMPSRCROOT/qmmp \ + $$QMMPSRCROOT + +HEADERS += incdecvolumeoption.h \ + $$QMMPSRCROOT/ui/mainwindow.h \ + $$QMMPSRCROOT/qmmp/soundcore.h + +SOURCES += incdecvolumeoption.cpp \ + $$QMMPSRCROOT/qmmp/soundcore.cpp \ + $$QMMPSRCROOT/ui/mainwindow.cpp + +DESTDIR = ../ +QMAKE_CLEAN = ../libincdecvolumeoption.so + + + +CONFIG += release warn_on plugin + +TEMPLATE = lib + + diff --git a/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/Makefile b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/Makefile new file mode 100644 index 000000000..0ac10a77d --- /dev/null +++ b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/Makefile @@ -0,0 +1,301 @@ +############################################################################# +# Makefile for building: libIncDecVolumeOption.so +# Generated by qmake (2.01a) (Qt 4.3.0) on: Thu Feb 7 01:34:34 2008 +# Project: IncDecVolumeOption.pro +# Template: lib +# Command: /usr/local/Trolltech/Qt-4.3.0/bin/qmake -unix -o Makefile IncDecVolumeOption.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) +CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) +INCPATH = -I/usr/local/Trolltech/Qt-4.3.0/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.3.0/include/QtCore -I/usr/local/Trolltech/Qt-4.3.0/include/QtCore -I/usr/local/Trolltech/Qt-4.3.0/include/QtGui -I/usr/local/Trolltech/Qt-4.3.0/include/QtGui -I/usr/local/Trolltech/Qt-4.3.0/include -I../../../../ui -I../../../../qmmp -I../../../.. -I.build/moc -I./.build/ui/ +LINK = g++ +LFLAGS = -Wl,-rpath,/usr/local/Trolltech/Qt-4.3.0/lib -shared +LIBS = $(SUBLIBS) -L/usr/local/Trolltech/Qt-4.3.0/lib -lQtGui -L/usr/local/Trolltech/Qt-4.3.0/lib -L/usr/X11R6/lib -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/local/Trolltech/Qt-4.3.0/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -sf +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = .build/obj/ + +####### Files + +SOURCES = incdecvolumeoption.cpp \ + ../../../../qmmp/soundcore.cpp \ + ../../../../ui/mainwindow.cpp .build/moc/moc_incdecvolumeoption.cpp \ + .build/moc/moc_mainwindow.cpp \ + .build/moc/moc_soundcore.cpp +OBJECTS = .build/obj/incdecvolumeoption.o \ + .build/obj/soundcore.o \ + .build/obj/mainwindow.o \ + .build/obj/moc_incdecvolumeoption.o \ + .build/obj/moc_mainwindow.o \ + .build/obj/moc_soundcore.o +DIST = /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_pre.prf \ + /rest/qmmp/qmmp/qmmp.pri \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/lex.prf \ + IncDecVolumeOption.pro +QMAKE_TARGET = IncDecVolumeOption +DESTDIR = ../ +TARGET = libIncDecVolumeOption.so +TARGETD = libIncDecVolumeOption.so + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile ../$(TARGET) + +../$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) + @$(CHK_DIR_EXISTS) ../ || $(MKDIR) ../ + -$(DEL_FILE) $(TARGET) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) + -$(MOVE) $(TARGET) ../ + + + +Makefile: IncDecVolumeOption.pro /usr/local/Trolltech/Qt-4.3.0/mkspecs/linux-g++/qmake.conf /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_pre.prf \ + /rest/qmmp/qmmp/qmmp.pri \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/lex.prf \ + /usr/local/Trolltech/Qt-4.3.0/lib/libQtGui.prl \ + /usr/local/Trolltech/Qt-4.3.0/lib/libQtCore.prl + $(QMAKE) -unix -o Makefile IncDecVolumeOption.pro +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/g++.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/unix.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/linux.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/qconfig.pri: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_functions.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_config.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/exclusive_builds.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_pre.prf: +/rest/qmmp/qmmp/qmmp.pri: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/release.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_post.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/warn_on.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/unix/thread.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/moc.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/resources.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/uic.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/yacc.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/lex.prf: +/usr/local/Trolltech/Qt-4.3.0/lib/libQtGui.prl: +/usr/local/Trolltech/Qt-4.3.0/lib/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -unix -o Makefile IncDecVolumeOption.pro + +dist: + @$(CHK_DIR_EXISTS) .build/obj/IncDecVolumeOption1.0.0 || $(MKDIR) .build/obj/IncDecVolumeOption1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .build/obj/IncDecVolumeOption1.0.0/ && $(COPY_FILE) --parents incdecvolumeoption.h ../../../../ui/mainwindow.h ../../../../qmmp/soundcore.h .build/obj/IncDecVolumeOption1.0.0/ && $(COPY_FILE) --parents incdecvolumeoption.cpp ../../../../qmmp/soundcore.cpp ../../../../ui/mainwindow.cpp .build/obj/IncDecVolumeOption1.0.0/ && (cd `dirname .build/obj/IncDecVolumeOption1.0.0` && $(TAR) IncDecVolumeOption1.0.0.tar IncDecVolumeOption1.0.0 && $(COMPRESS) IncDecVolumeOption1.0.0.tar) && $(MOVE) `dirname .build/obj/IncDecVolumeOption1.0.0`/IncDecVolumeOption1.0.0.tar.gz . && $(DEL_FILE) -r .build/obj/IncDecVolumeOption1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) ../libincdecvolumeoption.so + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: .build/moc/moc_incdecvolumeoption.cpp .build/moc/moc_mainwindow.cpp .build/moc/moc_soundcore.cpp +compiler_moc_header_clean: + -$(DEL_FILE) .build/moc/moc_incdecvolumeoption.cpp .build/moc/moc_mainwindow.cpp .build/moc/moc_soundcore.cpp +.build/moc/moc_incdecvolumeoption.cpp: incdecvolumeoption.h + /usr/local/Trolltech/Qt-4.3.0/bin/moc $(DEFINES) $(INCPATH) incdecvolumeoption.h -o .build/moc/moc_incdecvolumeoption.cpp + +.build/moc/moc_mainwindow.cpp: ../../../../qmmp/output.h \ + ../../../../qmmp/visual.h \ + ../../../../qmmp/outputfactory.h \ + ../../../../qmmp/visualfactory.h \ + ../../../../qmmp/recycler.h \ + ../../../../qmmp/decoder.h \ + ../../../../qmmp/filetag.h \ + ../../../../ui/display.h \ + ../../../../ui/pixmapwidget.h \ + ../../../../ui/mediafile.h \ + ../../../../qmmp/decoderfactory.h \ + ../../../../ui/titlebar.h \ + ../../../../ui/playlist.h \ + ../../../../ui/mainwindow.h \ + ../../../../ui/mainwindow.h + /usr/local/Trolltech/Qt-4.3.0/bin/moc $(DEFINES) $(INCPATH) ../../../../ui/mainwindow.h -o .build/moc/moc_mainwindow.cpp + +.build/moc/moc_soundcore.cpp: ../../../../qmmp/decoder.h \ + ../../../../qmmp/filetag.h \ + ../../../../qmmp/output.h \ + ../../../../qmmp/visual.h \ + ../../../../qmmp/outputfactory.h \ + ../../../../qmmp/visualfactory.h \ + ../../../../qmmp/recycler.h \ + ../../../../qmmp/soundcore.h + /usr/local/Trolltech/Qt-4.3.0/bin/moc $(DEFINES) $(INCPATH) ../../../../qmmp/soundcore.h -o .build/moc/moc_soundcore.cpp + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: +compiler_uic_clean: +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean + +####### Compile + +.build/obj/incdecvolumeoption.o: incdecvolumeoption.cpp incdecvolumeoption.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/incdecvolumeoption.o incdecvolumeoption.cpp + +.build/obj/soundcore.o: ../../../../qmmp/soundcore.cpp ../../../../qmmp/decoderfactory.h \ + ../../../../qmmp/constants.h \ + ../../../../qmmp/config.h \ + ../../../../qmmp/streamreader.h \ + ../../../../qmmp/effect.h \ + ../../../../qmmp/soundcore.h \ + ../../../../qmmp/decoder.h \ + ../../../../qmmp/filetag.h \ + ../../../../qmmp/output.h \ + ../../../../qmmp/visual.h \ + ../../../../qmmp/outputfactory.h \ + ../../../../qmmp/visualfactory.h \ + ../../../../qmmp/recycler.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/soundcore.o ../../../../qmmp/soundcore.cpp + +.build/obj/mainwindow.o: ../../../../ui/mainwindow.cpp ../../../../ui/textscroller.h \ + ../../../../ui/mainwindow.h \ + ../../../../qmmp/output.h \ + ../../../../qmmp/visual.h \ + ../../../../qmmp/outputfactory.h \ + ../../../../qmmp/visualfactory.h \ + ../../../../qmmp/recycler.h \ + ../../../../qmmp/decoder.h \ + ../../../../qmmp/filetag.h \ + ../../../../ui/display.h \ + ../../../../ui/pixmapwidget.h \ + ../../../../ui/mediafile.h \ + ../../../../qmmp/decoderfactory.h \ + ../../../../ui/titlebar.h \ + ../../../../ui/playlist.h \ + ../../../../qmmp/constants.h \ + ../../../../qmmp/config.h \ + ../../../../ui/fileloader.h \ + ../../../../ui/skin.h \ + ../../../../ui/playlistmodel.h \ + ../../../../ui/configdialog.h \ + ../../../../ui/dock.h \ + ../../../../ui/eqwidget.h \ + ../../../../ui/mainvisual.h \ + ../../../../ui/logscale.h \ + ../../../../ui/playlistformat.h \ + ../../../../ui/jumptotrackdialog.h \ + ../../../../ui/aboutdialog.h \ + ../../../../ui/filedialog.h \ + ../../../../ui/listwidget.h \ + ../../../../ui/visualmenu.h \ + ../../../../ui/commandlineoption.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/mainwindow.o ../../../../ui/mainwindow.cpp + +.build/obj/moc_incdecvolumeoption.o: .build/moc/moc_incdecvolumeoption.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_incdecvolumeoption.o .build/moc/moc_incdecvolumeoption.cpp + +.build/obj/moc_mainwindow.o: .build/moc/moc_mainwindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_mainwindow.o .build/moc/moc_mainwindow.cpp + +.build/obj/moc_soundcore.o: .build/moc/moc_soundcore.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_soundcore.o .build/moc/moc_soundcore.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: + diff --git a/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp new file mode 100644 index 000000000..4bd35a910 --- /dev/null +++ b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp @@ -0,0 +1,53 @@ +#include <QtPlugin> + +#include "incdecvolumeoption.h" +#include <soundcore.h> +#include "mainwindow.h" + +bool IncDecVolumeCommandLineOption::identify(const QString & str) const +{ + if( + str == QString("--volume-inc") || + str == QString("--volume-dec") + ) + { + return TRUE; + } + + return FALSE; +} + +const QString IncDecVolumeCommandLineOption::helpString() const +{ + return QString( + "--volume-inc Increase volume with step 10\n" + "--volume-dec Decrease volume with step 10\n" + ); +} + + +void IncDecVolumeCommandLineOption::executeCommand(const QString & option_string, MainWindow *mw) +{ + if (option_string == "--volume-inc") + { + int l = 0; + int r = 0; + mw->soundCore()->volume(&l,&r); + mw->soundCore()->setVolume(l+10,r+10); + } + else if (option_string == "--volume-dec") + { + int l = 0; + int r = 0; + mw->soundCore()->volume(&l,&r); + mw->soundCore()->setVolume(l-10,r-10); + } +} + +const QString IncDecVolumeCommandLineOption::name() const +{ + return "IncDecVolumeCommandLineOption"; +} + +Q_EXPORT_PLUGIN(IncDecVolumeCommandLineOption) + diff --git a/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.h b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.h new file mode 100644 index 000000000..6fbf3d24a --- /dev/null +++ b/src/plugins/Misc/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.h @@ -0,0 +1,23 @@ +#ifndef IncDecVolumeCommandLineOption_H +#define IncDecVolumeCommandLineOption_H + +#include <commandlineoption.h> + +#include <QString> +#include <QObject> + +class MainWindow; + +class IncDecVolumeCommandLineOption : public QObject, public CommandLineOption +{ +Q_OBJECT +Q_INTERFACES(CommandLineOption) +public: + virtual bool identify(const QString& opt_str)const; + virtual const QString name()const; + virtual const QString helpString()const; + virtual void executeCommand(const QString& opt_str,MainWindow* mw); +}; + +#endif + diff --git a/src/plugins/Misc/FileDialogs/FileDialogs.pro b/src/plugins/Misc/FileDialogs/FileDialogs.pro new file mode 100644 index 000000000..a15058c1f --- /dev/null +++ b/src/plugins/Misc/FileDialogs/FileDialogs.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = Qt3FileDialog \ + QmmpFileDialog
\ No newline at end of file diff --git a/src/plugins/Misc/FileDialogs/Makefile b/src/plugins/Misc/FileDialogs/Makefile new file mode 100644 index 000000000..5e0580ccf --- /dev/null +++ b/src/plugins/Misc/FileDialogs/Makefile @@ -0,0 +1,134 @@ +############################################################################# +# Makefile for building: FileDialogs +# Generated by qmake (2.01a) (Qt 4.2.3) on: Tue Jul 24 19:08:22 2007 +# Project: FileDialogs.pro +# Template: subdirs +# Command: /usr/local/Trolltech/Qt-4.2.3/bin/qmake -unix -o Makefile FileDialogs.pro +############################################################################# + +first: make_default +MAKEFILE = Makefile +QMAKE = /usr/local/Trolltech/Qt-4.2.3/bin/qmake +DEL_FILE = rm -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +COPY = cp -f +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +INSTALL_FILE = install -m 644 -p +INSTALL_PROGRAM = install -m 755 -p +INSTALL_DIR = $(COPY_DIR) +DEL_FILE = rm -f +SYMLINK = ln -sf +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +SUBTARGETS = \ + sub-Qt3FileDialog \ + sub-QmmpFileDialog + +Qt3FileDialog/$(MAKEFILE): + @$(CHK_DIR_EXISTS) Qt3FileDialog/ || $(MKDIR) Qt3FileDialog/ + cd Qt3FileDialog && $(QMAKE) Qt3FileDialog.pro -unix -o $(MAKEFILE) +sub-Qt3FileDialog-qmake_all: FORCE + @$(CHK_DIR_EXISTS) Qt3FileDialog/ || $(MKDIR) Qt3FileDialog/ + cd Qt3FileDialog && $(QMAKE) Qt3FileDialog.pro -unix -o $(MAKEFILE) +sub-Qt3FileDialog: Qt3FileDialog/$(MAKEFILE) FORCE + cd Qt3FileDialog && $(MAKE) -f $(MAKEFILE) +sub-Qt3FileDialog-make_default: Qt3FileDialog/$(MAKEFILE) FORCE + cd Qt3FileDialog && $(MAKE) -f $(MAKEFILE) +sub-Qt3FileDialog-make_first: Qt3FileDialog/$(MAKEFILE) FORCE + cd Qt3FileDialog && $(MAKE) -f $(MAKEFILE) first +sub-Qt3FileDialog-all: Qt3FileDialog/$(MAKEFILE) FORCE + cd Qt3FileDialog && $(MAKE) -f $(MAKEFILE) all +sub-Qt3FileDialog-clean: Qt3FileDialog/$(MAKEFILE) FORCE + cd Qt3FileDialog && $(MAKE) -f $(MAKEFILE) clean +sub-Qt3FileDialog-distclean: Qt3FileDialog/$(MAKEFILE) FORCE + cd Qt3FileDialog && $(MAKE) -f $(MAKEFILE) distclean +sub-Qt3FileDialog-install_subtargets: Qt3FileDialog/$(MAKEFILE) FORCE + cd Qt3FileDialog && $(MAKE) -f $(MAKEFILE) install +sub-Qt3FileDialog-uninstall_subtargets: Qt3FileDialog/$(MAKEFILE) FORCE + cd Qt3FileDialog && $(MAKE) -f $(MAKEFILE) uninstall +QmmpFileDialog/$(MAKEFILE): + @$(CHK_DIR_EXISTS) QmmpFileDialog/ || $(MKDIR) QmmpFileDialog/ + cd QmmpFileDialog && $(QMAKE) QmmpFileDialog.pro -unix -o $(MAKEFILE) +sub-QmmpFileDialog-qmake_all: FORCE + @$(CHK_DIR_EXISTS) QmmpFileDialog/ || $(MKDIR) QmmpFileDialog/ + cd QmmpFileDialog && $(QMAKE) QmmpFileDialog.pro -unix -o $(MAKEFILE) +sub-QmmpFileDialog: QmmpFileDialog/$(MAKEFILE) FORCE + cd QmmpFileDialog && $(MAKE) -f $(MAKEFILE) +sub-QmmpFileDialog-make_default: QmmpFileDialog/$(MAKEFILE) FORCE + cd QmmpFileDialog && $(MAKE) -f $(MAKEFILE) +sub-QmmpFileDialog-make_first: QmmpFileDialog/$(MAKEFILE) FORCE + cd QmmpFileDialog && $(MAKE) -f $(MAKEFILE) first +sub-QmmpFileDialog-all: QmmpFileDialog/$(MAKEFILE) FORCE + cd QmmpFileDialog && $(MAKE) -f $(MAKEFILE) all +sub-QmmpFileDialog-clean: QmmpFileDialog/$(MAKEFILE) FORCE + cd QmmpFileDialog && $(MAKE) -f $(MAKEFILE) clean +sub-QmmpFileDialog-distclean: QmmpFileDialog/$(MAKEFILE) FORCE + cd QmmpFileDialog && $(MAKE) -f $(MAKEFILE) distclean +sub-QmmpFileDialog-install_subtargets: QmmpFileDialog/$(MAKEFILE) FORCE + cd QmmpFileDialog && $(MAKE) -f $(MAKEFILE) install +sub-QmmpFileDialog-uninstall_subtargets: QmmpFileDialog/$(MAKEFILE) FORCE + cd QmmpFileDialog && $(MAKE) -f $(MAKEFILE) uninstall + +Makefile: FileDialogs.pro /usr/local/Trolltech/Qt-4.2.3/mkspecs/linux-g++/qmake.conf /usr/local/Trolltech/Qt-4.2.3/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/default_pre.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.2.3/mkspecs/features/uic.prf + $(QMAKE) -unix -o Makefile FileDialogs.pro +/usr/local/Trolltech/Qt-4.2.3/mkspecs/common/unix.conf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/common/g++.conf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/common/linux.conf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/qconfig.pri: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/qt_functions.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/qt_config.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/exclusive_builds.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/default_pre.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/release.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/default_post.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/warn_on.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/qt.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/unix/thread.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/moc.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/resources.prf: +/usr/local/Trolltech/Qt-4.2.3/mkspecs/features/uic.prf: +qmake: qmake_all FORCE + @$(QMAKE) -unix -o Makefile FileDialogs.pro + +qmake_all: sub-Qt3FileDialog-qmake_all sub-QmmpFileDialog-qmake_all FORCE + +make_default: sub-Qt3FileDialog-make_default sub-QmmpFileDialog-make_default FORCE +make_first: sub-Qt3FileDialog-make_first sub-QmmpFileDialog-make_first FORCE +all: sub-Qt3FileDialog-all sub-QmmpFileDialog-all FORCE +clean: sub-Qt3FileDialog-clean sub-QmmpFileDialog-clean FORCE +distclean: sub-Qt3FileDialog-distclean sub-QmmpFileDialog-distclean FORCE + -$(DEL_FILE) Makefile +install_subtargets: sub-Qt3FileDialog-install_subtargets sub-QmmpFileDialog-install_subtargets FORCE +uninstall_subtargets: sub-Qt3FileDialog-uninstall_subtargets sub-QmmpFileDialog-uninstall_subtargets FORCE + +/usr/local/Trolltech/Qt-4.2.3/bin/moc: + (cd $(QTDIR)/src/tools/moc && $(MAKE)) + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all +install: install_subtargets FORCE + +uninstall: uninstall_subtargets FORCE + +FORCE: + diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro b/src/plugins/Misc/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro new file mode 100644 index 000000000..d9b8a96df --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/QmmpFileDialog.pro @@ -0,0 +1,28 @@ +QMMPROOT = ../../../qmmp + +INCLUDEPATH += $$QMMPROOT/src +INCLUDEPATH += $$QMMPROOT/lib + +HEADERS += qmmpfiledialog.h \ + qmmpfiledialogimpl.h \ + $$QMMPROOT/src/filedialog.h \ + $$QMMPROOT/src/playlistmodel.h + +SOURCES += qmmpfiledialog.cpp \ + qmmpfiledialogimpl.cpp \ + $$QMMPROOT/src/filedialog.cpp \ + $$QMMPROOT/src/playlistmodel.cpp + + +FORMS += qmmpfiledialog.ui + +RESOURCES += images/images.qrc + +DESTDIR = ../ +QMAKE_CLEAN += ../libqmmpfiledialog.so + + +CONFIG += release warn_on plugin + +TEMPLATE = lib + diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/cdup.png b/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/cdup.png Binary files differnew file mode 100644 index 000000000..5d966a77b --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/cdup.png diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/detail.png b/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/detail.png Binary files differnew file mode 100644 index 000000000..2e552a425 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/detail.png diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/images.qrc b/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/images.qrc new file mode 100644 index 000000000..c194a6b91 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/images.qrc @@ -0,0 +1,8 @@ +<!DOCTYPE RCC> +<RCC version="1.0"> + <qresource> + <file>cdup.png</file> + <file>detail.png</file> + <file>list.png</file> + </qresource> +</RCC> diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/list.png b/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/list.png Binary files differnew file mode 100644 index 000000000..13b44a620 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/images/list.png diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.cpp b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.cpp new file mode 100644 index 000000000..fce9f6e53 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.cpp @@ -0,0 +1,44 @@ +#include <QtPlugin> + +#include "qmmpfiledialogimpl.h" +#include "qmmpfiledialog.h" + + + +QmmpFileDialog::QmmpFileDialog() +{ + m_dialog = new QmmpFileDialogImpl(); + connect(m_dialog,SIGNAL(filesAdded(const QStringList&)),this,SIGNAL(filesAdded(const QStringList&))); +} + +void QmmpFileDialog::handleSelected(/*const QStringList& s */) +{ +} + +bool QmmpFileDialog::modal()const +{ + return FALSE; +} + +QmmpFileDialog::~QmmpFileDialog() +{ + qWarning("QmmpFileDialog::~QmmpFileDialog()"); + delete m_dialog; +} +void QmmpFileDialog::raise(const QString& d,Mode m,const QStringList& f) +{ + m_dialog->setModeAndMask(d,m,f); + m_dialog->show(); + m_dialog->raise(); +} + + +FileDialog* QmmpFileDialogFactory::create(){ return new QmmpFileDialog();} + +QString QmmpFileDialogFactory::name(){return QmmpFileDialogFactoryName;} + +QString QmmpFileDialogFactory::QmmpFileDialogFactoryName = "Qmmp File Dialog"; + + +Q_EXPORT_PLUGIN(QmmpFileDialogFactory) + diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.h b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.h new file mode 100644 index 000000000..30a4fef59 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.h @@ -0,0 +1,40 @@ +#ifndef QMMPFILEDIALOG_H +#define QMMPFILEDIALOG_H + +#include <filedialog.h> + +class QmmpFileDialogImpl; + +class QmmpFileDialog : public FileDialog +{ +Q_OBJECT + public: + QmmpFileDialog(); + virtual ~QmmpFileDialog(); + virtual bool modal()const; + virtual void raise(const QString&,Mode = AddFiles,const QStringList& = QStringList()); + public slots: + void handleSelected(); + + private: + QmmpFileDialogImpl * m_dialog; +}; + + + + +class QmmpFileDialogFactory : public QObject, public FileDialogFactory +{ + Q_OBJECT + Q_INTERFACES(FileDialogFactory); + public: + virtual FileDialog* create(); + virtual QString name(); + virtual ~QmmpFileDialogFactory(){;} + static QString QmmpFileDialogFactoryName; +}; + + +#endif + + diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.ui b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.ui new file mode 100644 index 000000000..dbfb2edc2 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialog.ui @@ -0,0 +1,216 @@ +<ui version="4.0" > + <class>QmmpFileDialog</class> + <widget class="QDialog" name="QmmpFileDialog" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>517</width> + <height>312</height> + </rect> + </property> + <property name="windowTitle" > + <string>Add Files</string> + </property> + <layout class="QVBoxLayout" > + <property name="margin" > + <number>9</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <layout class="QHBoxLayout" > + <property name="margin" > + <number>0</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <widget class="QLabel" name="label_2" > + <property name="text" > + <string>Look in:</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="lookInComboBox" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>1</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="editable" > + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="upToolButton" > + <property name="text" > + <string>Up</string> + </property> + <property name="icon" > + <iconset resource="images/images.qrc" >:/cdup.png</iconset> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="listToolButton" > + <property name="toolTip" > + <string>List view</string> + </property> + <property name="text" > + <string>lst</string> + </property> + <property name="icon" > + <iconset resource="images/images.qrc" >:/list.png</iconset> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="iconToolButton" > + <property name="toolTip" > + <string>Icon view</string> + </property> + <property name="text" > + <string>icn</string> + </property> + <property name="icon" > + <iconset resource="images/images.qrc" >:/detail.png</iconset> + </property> + <property name="iconSize" > + <size> + <width>16</width> + <height>16</height> + </size> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QListView" name="fileListView" > + <property name="editTriggers" > + <set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers</set> + </property> + <property name="dragEnabled" > + <bool>true</bool> + </property> + <property name="dragDropMode" > + <enum>QAbstractItemView::NoDragDrop</enum> + </property> + <property name="alternatingRowColors" > + <bool>false</bool> + </property> + <property name="selectionMode" > + <enum>QAbstractItemView::ExtendedSelection</enum> + </property> + <property name="selectionBehavior" > + <enum>QAbstractItemView::SelectItems</enum> + </property> + <property name="movement" > + <enum>QListView::Static</enum> + </property> + <property name="layoutMode" > + <enum>QListView::Batched</enum> + </property> + <property name="viewMode" > + <enum>QListView::ListMode</enum> + </property> + <property name="wordWrap" > + <bool>true</bool> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" > + <property name="margin" > + <number>0</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <widget class="QLabel" name="label" > + <property name="text" > + <string>File name:</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="fileNameLineEdit" /> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" > + <property name="margin" > + <number>0</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" > + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="addPushButton" > + <property name="text" > + <string>Add</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="closePushButton" > + <property name="text" > + <string>Close</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources> + <include location="images/images.qrc" /> + </resources> + <connections> + <connection> + <sender>closePushButton</sender> + <signal>clicked()</signal> + <receiver>QmmpFileDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel" > + <x>459</x> + <y>291</y> + </hint> + <hint type="destinationlabel" > + <x>153</x> + <y>289</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp new file mode 100644 index 000000000..984cc7204 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.cpp @@ -0,0 +1,109 @@ +#include "qmmpfiledialogimpl.h" + +#include <QDirModel> +#include <QFileInfo> + +QmmpFileDialogImpl::QmmpFileDialogImpl( QWidget * parent, Qt::WindowFlags f) : QDialog(parent,f) +{ + setupUi(this); + setAttribute(Qt::WA_QuitOnClose, FALSE); + m_model = new QDirModel(this); + m_model->setSorting(QDir::Type /*| QDir::Name*/); + fileListView->setModel(m_model); + //fileListView->setViewMode(QListView::IconMode); + listToolButton->setChecked(true); +} + +QmmpFileDialogImpl::~QmmpFileDialogImpl() +{ +} + +void QmmpFileDialogImpl::on_lookInComboBox_activated(const QString&) +{ + qWarning("TODO: %s %d",__FILE__,__LINE__); +} + +void QmmpFileDialogImpl::on_upToolButton_clicked() +{ + fileListView->setRootIndex(m_model->parent(fileListView->rootIndex())); + lookInComboBox->setEditText(m_model->filePath(fileListView->rootIndex())); +} + +void QmmpFileDialogImpl::on_fileListView_doubleClicked(const QModelIndex& ind) +{ + if(ind.isValid()) + { + QFileInfo info = m_model->fileInfo(ind); + if(info.isDir()) + { + fileListView->setRootIndex(ind); + lookInComboBox->setEditText(m_model->filePath(ind)); + } + else + { + QStringList l; + l << m_model->filePath(ind); + emit filesAdded(l); + } + } + +} + +void QmmpFileDialogImpl::on_fileNameLineEdit_returnPressed() +{ + on_addPushButton_clicked(); +} + +void QmmpFileDialogImpl::on_addPushButton_clicked() +{ + QModelIndexList ml = fileListView->selectionModel()->selectedIndexes(); + QStringList l; + foreach(QModelIndex i,ml) + l << m_model->filePath(i); + qWarning("!!!!!!!!!"); + emit filesAdded(l); +} + +void QmmpFileDialogImpl::setModeAndMask(const QString& d,FileDialog::Mode m, const QStringList & mask) +{ + if(m == FileDialog::AddFiles) + { + setWindowTitle("Add Files"); + m_model->setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); + } + else if(m == FileDialog::AddDirs) + { + setWindowTitle("Add Dirs"); + m_model->setFilter(QDir::Dirs | QDir::NoDotAndDotDot); + } + else + { + setWindowTitle("Save File"); + m_model->setFilter(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot); + qWarning("To be implemented..."); + } + + m_model->setSorting(QDir::Type); + fileListView->setRootIndex(m_model->index(d)); + m_model->sort(0); + lookInComboBox->setEditText(d); +} + +void QmmpFileDialogImpl::on_listToolButton_toggled(bool yes) +{ + if(yes) + { + iconToolButton->setChecked(false); + fileListView->setViewMode(QListView::ListMode); + } +} + +void QmmpFileDialogImpl::on_iconToolButton_toggled(bool yes) +{ + if(yes) + { + listToolButton->setChecked(false); + fileListView->setViewMode(QListView::IconMode); + } +} + diff --git a/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.h b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.h new file mode 100644 index 000000000..2be25bf05 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/QmmpFileDialog/qmmpfiledialogimpl.h @@ -0,0 +1,33 @@ +#ifndef QMMPFILEDIALOGIMPL_H +#define QMMPFILEDIALOGIMPL_H + +#include "ui_qmmpfiledialog.h" +#include <QDialog> + +#include "filedialog.h" + +class QDirModel; + + +class QmmpFileDialogImpl : public QDialog , private Ui::QmmpFileDialog +{ +Q_OBJECT +public: + QmmpFileDialogImpl( QWidget * parent = 0, Qt::WindowFlags f = 0 ); + ~QmmpFileDialogImpl(); + void setModeAndMask(const QString&,FileDialog::Mode m,const QStringList& mask); +protected slots: + void on_lookInComboBox_activated(const QString&); + void on_upToolButton_clicked(); + void on_fileListView_doubleClicked(const QModelIndex&); + void on_fileNameLineEdit_returnPressed(); + void on_addPushButton_clicked(); + void on_listToolButton_toggled(bool); + void on_iconToolButton_toggled(bool); +signals: + void filesAdded(const QStringList&); +protected: + QDirModel* m_model; + +}; +#endif //QMMPFILEDIALOGIMPL_H diff --git a/src/plugins/Misc/FileDialogs/Qt3FileDialog/Qt3FileDialog.pro b/src/plugins/Misc/FileDialogs/Qt3FileDialog/Qt3FileDialog.pro new file mode 100644 index 000000000..7954ebf01 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/Qt3FileDialog/Qt3FileDialog.pro @@ -0,0 +1,28 @@ +QMMPROOT = ../../../qmmp + +INCLUDEPATH += $$QMMPROOT/src +INCLUDEPATH += $$QMMPROOT/lib + +HEADERS += qt3filedialogfactory.h \ + qt3filedialog.h \ + $$QMMPROOT/src/filedialog.h \ + $$QMMPROOT/src/playlistmodel.h + +SOURCES += qt3filedialog.cpp \ + qt3filedialogfactory.cpp \ + $$QMMPROOT/src/filedialog.cpp \ + $$QMMPROOT/src/playlistmodel.cpp + + +DESTDIR = ../ +QMAKE_CLEAN += ../libqt3filedialog.so + + +CONFIG += release warn_on plugin + +TEMPLATE = lib + +QT += qt3support + +#target.path = /plugins/FileDialogs +#INSTALLS += target diff --git a/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialog.cpp b/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialog.cpp new file mode 100644 index 000000000..b9b9bc898 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialog.cpp @@ -0,0 +1,35 @@ +#include "qt3filedialog.h" +#include <Q3FileDialog> + +Qt3SupportFileDialog::~Qt3SupportFileDialog() +{ + qWarning("Qt3SupportFileDialog::~Qt3SupportFileDialog()"); +} + +QString Qt3SupportFileDialog::existingDirectory(QWidget * parent , const QString & caption, const QString & dir) +{ + return Q3FileDialog::getExistingDirectory ( dir, + parent, + 0, + caption, + true, + true ); +} + +QString Qt3SupportFileDialog::openFileName(QWidget * parent,const QString & caption,const QString & /*dir*/,const QString & filter, + QString * selectedFilter) +{ + return Q3FileDialog::getOpenFileName ( QString(),filter,parent,0,caption,selectedFilter); +} + +QStringList Qt3SupportFileDialog::openFileNames(QWidget * parent, const QString & caption , const QString & dir , + const QString & filter, QString * selectedFilter) +{ + return Q3FileDialog::getOpenFileNames(filter,dir,parent,0,caption,selectedFilter); +} + +QString Qt3SupportFileDialog::saveFileName ( QWidget * parent, const QString & caption, + const QString &, const QString & filter, QString * selectedFilter) +{ + return Q3FileDialog::getSaveFileName(QString(),filter,parent,0,caption,selectedFilter); +} diff --git a/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialog.h b/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialog.h new file mode 100644 index 000000000..bbce2e3c8 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialog.h @@ -0,0 +1,23 @@ +#ifndef QT3FILEDIALOG_H +#define QT3FILEDIALOG_H + +#include <filedialog.h> + + +class Qt3SupportFileDialog : public FileDialog +{ + public: + virtual ~Qt3SupportFileDialog(); + virtual QString existingDirectory(QWidget * parent , const QString & , const QString & dir); + virtual QString openFileName(QWidget * parent,const QString & caption,const QString & dir,const QString & filter, + QString * selectedFilter); + virtual QStringList openFileNames(QWidget * parent, const QString & caption , const QString & dir , + const QString & filter, QString * selectedFilter); + virtual QString saveFileName ( QWidget * parent, const QString & caption, + const QString & dir, const QString & filter, QString * selectedFilter); + +}; + +#endif + + diff --git a/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialogfactory.cpp b/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialogfactory.cpp new file mode 100644 index 000000000..45b4260bb --- /dev/null +++ b/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialogfactory.cpp @@ -0,0 +1,20 @@ +#include <QtPlugin> +#include "qt3filedialogfactory.h" +#include "qt3filedialog.h" + + +FileDialog* Qt3SupportFileDialogFactory::create() +{ + return new Qt3SupportFileDialog(); +} + +QString Qt3SupportFileDialogFactory::name() +{ + return Qt3SupportFileDialogFactory::Qt3SupportFileDialogFactoryName; +} + + +QString Qt3SupportFileDialogFactory::Qt3SupportFileDialogFactoryName = "Qt3 File Dialog"; + +Q_EXPORT_PLUGIN(Qt3SupportFileDialogFactory) + diff --git a/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialogfactory.h b/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialogfactory.h new file mode 100644 index 000000000..e5d3b4595 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/Qt3FileDialog/qt3filedialogfactory.h @@ -0,0 +1,19 @@ +#ifndef QT3FILEDIALOGFACTORY_H +#define QT3FILEDIALOGFACTORY_H + + +#include <filedialog.h> + +class Qt3SupportFileDialogFactory : public QObject, public FileDialogFactory +{ + Q_OBJECT + Q_INTERFACES(FileDialogFactory); + public: + virtual FileDialog* create(); + virtual QString name(); + virtual ~Qt3SupportFileDialogFactory(){;} + static QString Qt3SupportFileDialogFactoryName; +}; + +#endif + diff --git a/src/plugins/Misc/FileDialogs/Qt3FileDialog/readme b/src/plugins/Misc/FileDialogs/Qt3FileDialog/readme new file mode 100644 index 000000000..966f7201d --- /dev/null +++ b/src/plugins/Misc/FileDialogs/Qt3FileDialog/readme @@ -0,0 +1,14 @@ +This is simple example of File Dialog plugin. +Requires Qt3Support library. This plugin developed +mostly for QMMP customizing demonstration - +we don't think that somebody will prefer use Qt3 +look&feel :) + +Build: Change QMMPROOT variable in .pro file according your +QMMP build tree location.Then qmake && make + +Install: copy library into ~/.qmmp/plugins/FileDialogs directory. + + + vovanec@gmail.com + diff --git a/src/plugins/Misc/FileDialogs/libQmmpFileDialog.so b/src/plugins/Misc/FileDialogs/libQmmpFileDialog.so Binary files differnew file mode 100755 index 000000000..d04ccf53a --- /dev/null +++ b/src/plugins/Misc/FileDialogs/libQmmpFileDialog.so diff --git a/src/plugins/Misc/FileDialogs/libQt3FileDialog.so b/src/plugins/Misc/FileDialogs/libQt3FileDialog.so Binary files differnew file mode 100755 index 000000000..efbb0d313 --- /dev/null +++ b/src/plugins/Misc/FileDialogs/libQt3FileDialog.so diff --git a/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/CSVPlaylistFormat.pro b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/CSVPlaylistFormat.pro new file mode 100644 index 000000000..11c27c3d3 --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/CSVPlaylistFormat.pro @@ -0,0 +1,20 @@ +QMMPROOT = ../../../qmmp + +HEADERS += csvplaylistformat.h + +SOURCES += csvplaylistformat.cpp \ + $$QMMPROOT/src/mediafile.cpp + +DESTDIR = ../ +QMAKE_CLEAN = ../libcsvplaylistformat.so + +INCLUDEPATH += $$QMMPROOT/src \ + $$QMMPROOT/lib + +CONFIG += release warn_on plugin + +TEMPLATE = lib + +#QMAKE_LIBDIR += ../../../ +#LIBS += -lqmmp -L/usr/lib -I/usr/include + diff --git a/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/Makefile b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/Makefile new file mode 100644 index 000000000..5afa50b01 --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/Makefile @@ -0,0 +1,213 @@ +############################################################################# +# Makefile for building: libCSVPlaylistFormat.so +# Generated by qmake (2.01a) (Qt 4.3.0) on: Mon Dec 24 01:59:02 2007 +# Project: CSVPlaylistFormat.pro +# Template: lib +# Command: /usr/local/Trolltech/Qt-4.3.0/bin/qmake -unix -o Makefile CSVPlaylistFormat.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) +CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES) +INCPATH = -I/usr/local/Trolltech/Qt-4.3.0/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.3.0/include/QtCore -I/usr/local/Trolltech/Qt-4.3.0/include/QtCore -I/usr/local/Trolltech/Qt-4.3.0/include/QtGui -I/usr/local/Trolltech/Qt-4.3.0/include/QtGui -I/usr/local/Trolltech/Qt-4.3.0/include -I../../../qmmp/src -I../../../qmmp/lib -I. -I. +LINK = g++ +LFLAGS = -Wl,-rpath,/usr/local/Trolltech/Qt-4.3.0/lib -shared +LIBS = $(SUBLIBS) -L/usr/local/Trolltech/Qt-4.3.0/lib -lQtGui -L/usr/local/Trolltech/Qt-4.3.0/lib -L/usr/X11R6/lib -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/local/Trolltech/Qt-4.3.0/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -sf +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = csvplaylistformat.cpp \ + ../../../qmmp/src/mediafile.cpp moc_csvplaylistformat.cpp +OBJECTS = csvplaylistformat.o \ + mediafile.o \ + moc_csvplaylistformat.o +DIST = /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_pre.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/lex.prf \ + CSVPlaylistFormat.pro +QMAKE_TARGET = CSVPlaylistFormat +DESTDIR = ../ +TARGET = libCSVPlaylistFormat.so +TARGETD = libCSVPlaylistFormat.so + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile ../$(TARGET) + +../$(TARGET): $(OBJECTS) $(SUBLIBS) $(OBJCOMP) + @$(CHK_DIR_EXISTS) ../ || $(MKDIR) ../ + -$(DEL_FILE) $(TARGET) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) + -$(MOVE) $(TARGET) ../ + + + +Makefile: CSVPlaylistFormat.pro /usr/local/Trolltech/Qt-4.3.0/mkspecs/linux-g++/qmake.conf /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_pre.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/lex.prf \ + /usr/local/Trolltech/Qt-4.3.0/lib/libQtGui.prl \ + /usr/local/Trolltech/Qt-4.3.0/lib/libQtCore.prl + $(QMAKE) -unix -o Makefile CSVPlaylistFormat.pro +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/g++.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/unix.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/linux.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/qconfig.pri: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_functions.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_config.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/exclusive_builds.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_pre.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/release.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_post.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/warn_on.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/unix/thread.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/moc.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/resources.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/uic.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/yacc.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/lex.prf: +/usr/local/Trolltech/Qt-4.3.0/lib/libQtGui.prl: +/usr/local/Trolltech/Qt-4.3.0/lib/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -unix -o Makefile CSVPlaylistFormat.pro + +dist: + @$(CHK_DIR_EXISTS) .tmp/CSVPlaylistFormat1.0.0 || $(MKDIR) .tmp/CSVPlaylistFormat1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/CSVPlaylistFormat1.0.0/ && $(COPY_FILE) --parents csvplaylistformat.h .tmp/CSVPlaylistFormat1.0.0/ && $(COPY_FILE) --parents csvplaylistformat.cpp ../../../qmmp/src/mediafile.cpp .tmp/CSVPlaylistFormat1.0.0/ && (cd `dirname .tmp/CSVPlaylistFormat1.0.0` && $(TAR) CSVPlaylistFormat1.0.0.tar CSVPlaylistFormat1.0.0 && $(COMPRESS) CSVPlaylistFormat1.0.0.tar) && $(MOVE) `dirname .tmp/CSVPlaylistFormat1.0.0`/CSVPlaylistFormat1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/CSVPlaylistFormat1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) ../libcsvplaylistformat.so + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: moc_csvplaylistformat.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc_csvplaylistformat.cpp +moc_csvplaylistformat.cpp: csvplaylistformat.h + /usr/local/Trolltech/Qt-4.3.0/bin/moc $(DEFINES) $(INCPATH) csvplaylistformat.h -o moc_csvplaylistformat.cpp + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: +compiler_uic_clean: +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean + +####### Compile + +csvplaylistformat.o: csvplaylistformat.cpp csvplaylistformat.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o csvplaylistformat.o csvplaylistformat.cpp + +mediafile.o: ../../../qmmp/src/mediafile.cpp ../../../qmmp/src/mediafile.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mediafile.o ../../../qmmp/src/mediafile.cpp + +moc_csvplaylistformat.o: moc_csvplaylistformat.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_csvplaylistformat.o moc_csvplaylistformat.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: + diff --git a/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/csvplaylistformat.cpp b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/csvplaylistformat.cpp new file mode 100644 index 000000000..bff8a20b5 --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/csvplaylistformat.cpp @@ -0,0 +1,72 @@ +#include <QtPlugin> +#include <QFileInfo> + +#include "csvplaylistformat.h" +#include <mediafile.h> + + +bool CSVPlaylistFormat::hasFormat(const QString & f) +{ + foreach(QString s,m_supported_formats) + if(f == s) + return true; + + return false; +} + +QStringList CSVPlaylistFormat::getExtensions() const +{ + return m_supported_formats; +} + +CSVPlaylistFormat::CSVPlaylistFormat() +{ + m_supported_formats << "csv"; +} + +QString CSVPlaylistFormat::name() const +{ + return "CSVPlaylistFormat"; +} + + +QStringList CSVPlaylistFormat::decode(const QString & contents) +{ + qWarning("CONTENTS: %s",qPrintable(contents)); + QStringList out; + QStringList splitted = contents.split("\n"); + if(!splitted.isEmpty()) + { + foreach(QString str, splitted) + { + QStringList song = str.split(";"); + qWarning("SONG: %s",qPrintable(song[0])); + if(song.count() > 1) + { + QString unverified = song[1]; + if(QFileInfo(unverified).exists()) + out << QFileInfo(unverified).absoluteFilePath(); + else + qWarning("File %s does not exist",unverified.toLocal8Bit().data()); + } + + } + return out; + } + else + qWarning("Error parsing CSV playlist format"); + + return QStringList(); +} + +QString CSVPlaylistFormat::encode(const QList< MediaFile * > & contents) +{ + QStringList out; + foreach(MediaFile* f,contents) + out.append(f->title() + ";" + f->path() + ";" + QString::number(f->length())); + + return out.join("\n"); +} + +Q_EXPORT_PLUGIN(CSVPlaylistFormat) + diff --git a/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/csvplaylistformat.h b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/csvplaylistformat.h new file mode 100644 index 000000000..45e93d346 --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/csvplaylistformat.h @@ -0,0 +1,33 @@ +#ifndef CSVPLAYLISTFORMAT_H +#define CSVPLAYLISTFORMAT_H + +#include <playlistformat.h> + +#include <QStringList> + +class MediaFile; + +/*! + * Example of custom playlist CSV semicolon separated format. + * Each line represents a song in the next format: + * TITLE;FILEPATH;DURATION + */ + +class CSVPlaylistFormat : public QObject, public PlaylistFormat +{ +Q_OBJECT +Q_INTERFACES(PlaylistFormat) +public: + CSVPlaylistFormat(); + virtual ~CSVPlaylistFormat(){;} + virtual QStringList decode(const QString& contents); + virtual QString encode(const QList<MediaFile*>& contents); + virtual QStringList getExtensions()const; + virtual bool hasFormat(const QString& ext); + virtual QString name()const; +protected: + QStringList m_supported_formats; +}; + +#endif //CSVPLAYLISTFORMAT_H + diff --git a/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/moc_csvplaylistformat.cpp b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/moc_csvplaylistformat.cpp new file mode 100644 index 000000000..133bf4692 --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/moc_csvplaylistformat.cpp @@ -0,0 +1,64 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'csvplaylistformat.h' +** +** Created: Mon Dec 24 01:59:05 2007 +** by: The Qt Meta Object Compiler version 59 (Qt 4.3.0) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "csvplaylistformat.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'csvplaylistformat.h' doesn't include <QObject>." +#elif Q_MOC_OUTPUT_REVISION != 59 +#error "This file was generated using the moc from 4.3.0. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +static const uint qt_meta_data_CSVPlaylistFormat[] = { + + // content: + 1, // revision + 0, // classname + 0, 0, // classinfo + 0, 0, // methods + 0, 0, // properties + 0, 0, // enums/sets + + 0 // eod +}; + +static const char qt_meta_stringdata_CSVPlaylistFormat[] = { + "CSVPlaylistFormat\0" +}; + +const QMetaObject CSVPlaylistFormat::staticMetaObject = { + { &QObject::staticMetaObject, qt_meta_stringdata_CSVPlaylistFormat, + qt_meta_data_CSVPlaylistFormat, 0 } +}; + +const QMetaObject *CSVPlaylistFormat::metaObject() const +{ + return &staticMetaObject; +} + +void *CSVPlaylistFormat::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_CSVPlaylistFormat)) + return static_cast<void*>(const_cast< CSVPlaylistFormat*>(this)); + if (!strcmp(_clname, "PlaylistFormat")) + return static_cast< PlaylistFormat*>(const_cast< CSVPlaylistFormat*>(this)); + if (!strcmp(_clname, "PlaylistFormatInterface/1.0")) + return static_cast< PlaylistFormat*>(const_cast< CSVPlaylistFormat*>(this)); + return QObject::qt_metacast(_clname); +} + +int CSVPlaylistFormat::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QObject::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + return _id; +} diff --git a/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/readme b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/readme new file mode 100644 index 000000000..a047e358b --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/CSVPlaylistFormat/readme @@ -0,0 +1,12 @@ +This is simple example of custom Playlist Format plugin. +It represents CVS semicolon-separated format storage. +This plugin developed mostly for QMMP customizing demonstration. + +Build: Change QMMPROOT variable in .pro file according your +QMMP build tree location.Then qmake && make + +Install: copy library into ~/.qmmp/plugins/PlaylistFormats directory. + + + vovanec@gmail.com + diff --git a/src/plugins/Misc/PlaylistFormats/Makefile b/src/plugins/Misc/PlaylistFormats/Makefile new file mode 100644 index 000000000..cbf632042 --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/Makefile @@ -0,0 +1,112 @@ +############################################################################# +# Makefile for building: PlaylistFormats +# Generated by qmake (2.01a) (Qt 4.3.0) on: Mon Dec 24 01:59:00 2007 +# Project: PlaylistFormats.pro +# Template: subdirs +# Command: /usr/local/Trolltech/Qt-4.3.0/bin/qmake -unix -o Makefile PlaylistFormats.pro +############################################################################# + +first: make_default +MAKEFILE = Makefile +QMAKE = /usr/local/Trolltech/Qt-4.3.0/bin/qmake +DEL_FILE = rm -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +COPY = cp -f +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +INSTALL_FILE = install -m 644 -p +INSTALL_PROGRAM = install -m 755 -p +INSTALL_DIR = $(COPY_DIR) +DEL_FILE = rm -f +SYMLINK = ln -sf +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +SUBTARGETS = \ + sub-CSVPlaylistFormat + +CSVPlaylistFormat//$(MAKEFILE): + @$(CHK_DIR_EXISTS) CSVPlaylistFormat/ || $(MKDIR) CSVPlaylistFormat/ + cd CSVPlaylistFormat/ && $(QMAKE) CSVPlaylistFormat.pro -unix -o $(MAKEFILE) +sub-CSVPlaylistFormat-qmake_all: FORCE + @$(CHK_DIR_EXISTS) CSVPlaylistFormat/ || $(MKDIR) CSVPlaylistFormat/ + cd CSVPlaylistFormat/ && $(QMAKE) CSVPlaylistFormat.pro -unix -o $(MAKEFILE) +sub-CSVPlaylistFormat: CSVPlaylistFormat//$(MAKEFILE) FORCE + cd CSVPlaylistFormat/ && $(MAKE) -f $(MAKEFILE) +sub-CSVPlaylistFormat-make_default: CSVPlaylistFormat//$(MAKEFILE) FORCE + cd CSVPlaylistFormat/ && $(MAKE) -f $(MAKEFILE) +sub-CSVPlaylistFormat-make_first: CSVPlaylistFormat//$(MAKEFILE) FORCE + cd CSVPlaylistFormat/ && $(MAKE) -f $(MAKEFILE) first +sub-CSVPlaylistFormat-all: CSVPlaylistFormat//$(MAKEFILE) FORCE + cd CSVPlaylistFormat/ && $(MAKE) -f $(MAKEFILE) all +sub-CSVPlaylistFormat-clean: CSVPlaylistFormat//$(MAKEFILE) FORCE + cd CSVPlaylistFormat/ && $(MAKE) -f $(MAKEFILE) clean +sub-CSVPlaylistFormat-distclean: CSVPlaylistFormat//$(MAKEFILE) FORCE + cd CSVPlaylistFormat/ && $(MAKE) -f $(MAKEFILE) distclean +sub-CSVPlaylistFormat-install_subtargets: CSVPlaylistFormat//$(MAKEFILE) FORCE + cd CSVPlaylistFormat/ && $(MAKE) -f $(MAKEFILE) install +sub-CSVPlaylistFormat-uninstall_subtargets: CSVPlaylistFormat//$(MAKEFILE) FORCE + cd CSVPlaylistFormat/ && $(MAKE) -f $(MAKEFILE) uninstall + +Makefile: PlaylistFormats.pro /usr/local/Trolltech/Qt-4.3.0/mkspecs/linux-g++/qmake.conf /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_pre.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.0/mkspecs/features/lex.prf + $(QMAKE) -unix -o Makefile PlaylistFormats.pro +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/g++.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/unix.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/common/linux.conf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/qconfig.pri: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_functions.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt_config.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/exclusive_builds.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_pre.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/release.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/default_post.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/warn_on.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/qt.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/unix/thread.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/moc.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/resources.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/uic.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/yacc.prf: +/usr/local/Trolltech/Qt-4.3.0/mkspecs/features/lex.prf: +qmake: qmake_all FORCE + @$(QMAKE) -unix -o Makefile PlaylistFormats.pro + +qmake_all: sub-CSVPlaylistFormat-qmake_all FORCE + +make_default: sub-CSVPlaylistFormat-make_default FORCE +make_first: sub-CSVPlaylistFormat-make_first FORCE +all: sub-CSVPlaylistFormat-all FORCE +clean: sub-CSVPlaylistFormat-clean FORCE +distclean: sub-CSVPlaylistFormat-distclean FORCE + -$(DEL_FILE) Makefile +install_subtargets: sub-CSVPlaylistFormat-install_subtargets FORCE +uninstall_subtargets: sub-CSVPlaylistFormat-uninstall_subtargets FORCE + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all +install: install_subtargets FORCE + +uninstall: uninstall_subtargets FORCE + +FORCE: + diff --git a/src/plugins/Misc/PlaylistFormats/PlaylistFormats.pro b/src/plugins/Misc/PlaylistFormats/PlaylistFormats.pro new file mode 100644 index 000000000..4235b3190 --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/PlaylistFormats.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = CSVPlaylistFormat
\ No newline at end of file diff --git a/src/plugins/Misc/PlaylistFormats/libCSVPlaylistFormat.so b/src/plugins/Misc/PlaylistFormats/libCSVPlaylistFormat.so Binary files differnew file mode 100755 index 000000000..f9677157c --- /dev/null +++ b/src/plugins/Misc/PlaylistFormats/libCSVPlaylistFormat.so diff --git a/lib/qmmp/Output/CMakeLists.txt b/src/plugins/Output/CMakeLists.txt index 864d945c1..864d945c1 100644 --- a/lib/qmmp/Output/CMakeLists.txt +++ b/src/plugins/Output/CMakeLists.txt diff --git a/lib/qmmp/Output/Output.pro b/src/plugins/Output/Output.pro index eed8b9f14..eed8b9f14 100644 --- a/lib/qmmp/Output/Output.pro +++ b/src/plugins/Output/Output.pro diff --git a/lib/qmmp/Output/alsa/CMakeLists.txt b/src/plugins/Output/alsa/CMakeLists.txt index 92f7af8d9..92f7af8d9 100644 --- a/lib/qmmp/Output/alsa/CMakeLists.txt +++ b/src/plugins/Output/alsa/CMakeLists.txt diff --git a/lib/qmmp/Output/alsa/alsa.pro b/src/plugins/Output/alsa/alsa.pro index b1dbee703..465fabe4a 100644 --- a/lib/qmmp/Output/alsa/alsa.pro +++ b/src/plugins/Output/alsa/alsa.pro @@ -3,20 +3,26 @@ # ?????????? ???????????? ???????? ???????? ???????: ./Plugins/Output/alsa # ???? - ??????????: +include(../../plugins.pri) + HEADERS += outputalsa.h \ outputalsafactory.h \ settingsdialog.h SOURCES += outputalsa.cpp \ outputalsafactory.cpp \ settingsdialog.cpp -INCLUDEPATH += ../../../ -QMAKE_LIBDIR += ../../../ -QMAKE_CLEAN = ../libalsa.so + +TARGET=$$PLUGINS_PREFIX/Output/alsa +QMAKE_CLEAN =$$PLUGINS_PREFIX/Output/libalsa.so + + +INCLUDEPATH += ../../../qmmp +QMAKE_LIBDIR += ../../../../lib + CONFIG += release \ warn_on \ thread \ plugin -DESTDIR = ../ TEMPLATE = lib LIBS += -lqmmp -lasound FORMS += settingsdialog.ui diff --git a/lib/qmmp/Output/alsa/outputalsa.cpp b/src/plugins/Output/alsa/outputalsa.cpp index c07a2b7a0..66c031bbb 100644 --- a/lib/qmmp/Output/alsa/outputalsa.cpp +++ b/src/plugins/Output/alsa/outputalsa.cpp @@ -34,8 +34,8 @@ #include "buffer.h" #include "visual.h" -OutputALSA::OutputALSA(QObject * parent) - : Output(parent, Output::Custom), m_inited(FALSE), m_pause(FALSE), m_play(FALSE), +OutputALSA::OutputALSA(QObject * parent, bool useVolume) + : Output(parent), m_inited(FALSE), m_pause(FALSE), m_play(FALSE), m_userStop(FALSE), m_totalWritten(0), m_currentSeconds(-1), m_bps(-1), m_frequency(-1), m_channels(-1), m_precision(-1) { @@ -47,16 +47,19 @@ OutputALSA::OutputALSA(QObject * parent) pcm_handle = 0; //alsa mixer mixer = 0; - QString card = settings.value("ALSA/mixer_card","hw:0").toString(); - QString dev = settings.value("ALSA/mixer_device", "PCM").toString(); - setupMixer(card, dev); + if (useVolume) + { + QString card = settings.value("ALSA/mixer_card","hw:0").toString(); + QString dev = settings.value("ALSA/mixer_device", "PCM").toString(); + setupMixer(card, dev); + } } OutputALSA::~OutputALSA() { uninitialize(); free (pcm_name); - if(mixer) + if (mixer) snd_mixer_close(mixer); } @@ -279,10 +282,7 @@ void OutputALSA::run() if (b) { - - l = qMin(int(globalBlockSize*2), int(b->nbytes - n)); - l = snd_pcm_bytes_to_frames(pcm_handle, l); - //l = qMin(aval, int(l)); + l = snd_pcm_bytes_to_frames(pcm_handle, b->nbytes - n); while (l>0) { m = snd_pcm_writei (pcm_handle, b->data+n, l); @@ -298,7 +298,7 @@ void OutputALSA::run() { mutex()->unlock(); snd_pcm_wait(pcm_handle, 500); - mutex()->lock(); + mutex()->lock (); } else if (m == -EPIPE) { @@ -485,6 +485,17 @@ void OutputALSA::setVolume(int l, int r) SND_MIXER_SCHN_FRONT_RIGHT, r); } +void OutputALSA::volume(int * l, int * r) +{ + if (!pcm_element) + return; + snd_mixer_handle_events(mixer); + snd_mixer_selem_get_playback_volume(pcm_element, + SND_MIXER_SCHN_FRONT_LEFT, (long int*)l); + snd_mixer_selem_get_playback_volume(pcm_element, + SND_MIXER_SCHN_FRONT_RIGHT, (long int*)r); +} + int OutputALSA::getMixer(snd_mixer_t **mixer, QString card) { char *dev; @@ -524,32 +535,5 @@ int OutputALSA::getMixer(snd_mixer_t **mixer, QString card) return (*mixer != NULL); } -void OutputALSA::checkVolume() -{ - long ll = 0, lr = 0; - - if (!pcm_element) - return; - - snd_mixer_handle_events(mixer); - snd_mixer_selem_get_playback_volume(pcm_element, - SND_MIXER_SCHN_FRONT_LEFT, - &ll); - snd_mixer_selem_get_playback_volume(pcm_element, - SND_MIXER_SCHN_FRONT_RIGHT, - &lr); - //qDebug("%d, %d",ll, lr); - - ll = (ll > 100) ? 100 : ll; - lr = (lr > 100) ? 100 : lr; - ll = (ll < 0) ? 0 : ll; - lr = (lr < 0) ? 0 : lr; - if (bl!=ll || br!=lr) - { - bl = ll; - br = lr; - dispatchVolume(ll,lr); - } -} diff --git a/lib/qmmp/Output/alsa/outputalsa.h b/src/plugins/Output/alsa/outputalsa.h index 5c872bec9..f3dd222fe 100644 --- a/lib/qmmp/Output/alsa/outputalsa.h +++ b/src/plugins/Output/alsa/outputalsa.h @@ -38,7 +38,7 @@ class OutputALSA : public Output { Q_OBJECT public: - OutputALSA(QObject * parent = 0); + OutputALSA(QObject * parent = 0, bool useVolume = TRUE); ~OutputALSA(); bool initialize(); @@ -51,6 +51,7 @@ public: long latency(); void seek(long); void setVolume(int l, int r); + void volume(int *l, int *r); void checkVolume(); private: @@ -78,7 +79,6 @@ private: snd_mixer_elem_t* getMixerElem(snd_mixer_t *mixer, char *name, int index); snd_mixer_t *mixer; snd_mixer_elem_t *pcm_element; - long bl, br; }; diff --git a/lib/qmmp/Output/alsa/outputalsafactory.cpp b/src/plugins/Output/alsa/outputalsafactory.cpp index 25d8c337c..641ff1278 100644 --- a/lib/qmmp/Output/alsa/outputalsafactory.cpp +++ b/src/plugins/Output/alsa/outputalsafactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2007 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -25,15 +25,18 @@ #include "outputalsafactory.h" -const QString& OutputALSAFactory::name() const +const OutputProperties OutputALSAFactory::properties() const { - static QString name(tr("ALSA Plugin")); - return name; + OutputProperties properties; + properties.name = tr("ALSA Plugin"); + properties.hasAbout = TRUE; + properties.hasSettings = TRUE; + return properties; } -Output* OutputALSAFactory::create(QObject* parent) +Output* OutputALSAFactory::create(QObject* parent, bool volume) { - return new OutputALSA(parent); + return new OutputALSA(parent, volume); } void OutputALSAFactory::showSettings(QWidget* parent) diff --git a/lib/qmmp/Output/alsa/outputalsafactory.h b/src/plugins/Output/alsa/outputalsafactory.h index 24129e2d5..afaa18358 100644 --- a/lib/qmmp/Output/alsa/outputalsafactory.h +++ b/src/plugins/Output/alsa/outputalsafactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2007 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -37,8 +37,8 @@ Q_OBJECT Q_INTERFACES(OutputFactory); public: - const QString& name() const; - Output* create(QObject* parent); + const OutputProperties properties() const; + Output* create(QObject* parent, bool volume); void showSettings(QWidget* parent); void showAbout(QWidget *parent); QTranslator *createTranslator(QObject *parent); diff --git a/lib/qmmp/Output/alsa/settingsdialog.cpp b/src/plugins/Output/alsa/settingsdialog.cpp index 89c6cae84..89c6cae84 100644 --- a/lib/qmmp/Output/alsa/settingsdialog.cpp +++ b/src/plugins/Output/alsa/settingsdialog.cpp diff --git a/lib/qmmp/Output/alsa/settingsdialog.h b/src/plugins/Output/alsa/settingsdialog.h index 467b25a03..467b25a03 100644 --- a/lib/qmmp/Output/alsa/settingsdialog.h +++ b/src/plugins/Output/alsa/settingsdialog.h diff --git a/lib/qmmp/Output/alsa/settingsdialog.ui b/src/plugins/Output/alsa/settingsdialog.ui index 2f9a20753..2f9a20753 100644 --- a/lib/qmmp/Output/alsa/settingsdialog.ui +++ b/src/plugins/Output/alsa/settingsdialog.ui diff --git a/src/plugins/Output/alsa/translations/alsa_plugin_cs.ts b/src/plugins/Output/alsa/translations/alsa_plugin_cs.ts new file mode 100644 index 000000000..3108490ec --- /dev/null +++ b/src/plugins/Output/alsa/translations/alsa_plugin_cs.ts @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS><TS version="1.1" language="pl"> +<defaultcodec></defaultcodec> +<context> + <name>OutputALSAFactory</name> + <message> + <location filename="../outputalsafactory.cpp" line="30"/> + <source>ALSA Plugin</source> + <translation>Plugin ALSA</translation> + </message> + <message> + <location filename="../outputalsafactory.cpp" line="47"/> + <source>About ALSA Output Plugin</source> + <translation>O pluginu ALSA</translation> + </message> + <message> + <location filename="../outputalsafactory.cpp" line="48"/> + <source>Qmmp ALSA Output Plugin</source> + <translation>Výstupní plugin Qmmp ALSA</translation> + </message> + <message> + <location filename="../outputalsafactory.cpp" line="49"/> + <source>Writen by: Ilya Kotov <forkotov02@hotmail.ru></source> + <translation>Autor: Ilja Kotov <forkotov02@hotmail.ru></translation> + </message> +</context> +<context> + <name>SettingsDialog</name> + <message> + <location filename="../settingsdialog.ui" line="13"/> + <source>ALSA Plugin Settings</source> + <translation>Nastavení pluginu ALSA</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="29"/> + <source>Device Settings</source> + <translation>Nastavení zařízení</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="41"/> + <source>Audio device</source> + <translation>Zvukové zařízení</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="58"/> + <source>Mixer</source> + <translation>Mixér</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="73"/> + <source>Mixer card:</source> + <translation>Zvuková karta:</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="83"/> + <source>Mixer device:</source> + <translation>Ovládání hlasitosti:</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="100"/> + <source>Advanced Settings</source> + <translation>Pokročilá nastavení</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="112"/> + <source>Soundcard</source> + <translation>Zvuková karta</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="176"/> + <source>Buffer time (ms):</source> + <translation>Velikost bufferu (ms):</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="186"/> + <source>Period time (ms):</source> + <translation type="unfinished">Délka periody (ms):</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="229"/> + <source>Cancel</source> + <translation>Zrušit</translation> + </message> + <message> + <location filename="../settingsdialog.ui" line="236"/> + <source>OK</source> + <translation>OK</translation> + </message> +</context> +</TS> diff --git a/lib/qmmp/Output/alsa/translations/alsa_plugin_ru.qm b/src/plugins/Output/alsa/translations/alsa_plugin_ru.qm Binary files differindex 78ed38962..78ed38962 100644 --- a/lib/qmmp/Output/alsa/translations/alsa_plugin_ru.qm +++ b/src/plugins/Output/alsa/translations/alsa_plugin_ru.qm diff --git a/lib/qmmp/Output/alsa/translations/alsa_plugin_ru.ts b/src/plugins/Output/alsa/translations/alsa_plugin_ru.ts index 2c7296750..2c7296750 100644 --- a/lib/qmmp/Output/alsa/translations/alsa_plugin_ru.ts +++ b/src/plugins/Output/alsa/translations/alsa_plugin_ru.ts diff --git a/lib/qmmp/Output/alsa/translations/translations.qrc b/src/plugins/Output/alsa/translations/translations.qrc index beac1cd17..beac1cd17 100644 --- a/lib/qmmp/Output/alsa/translations/translations.qrc +++ b/src/plugins/Output/alsa/translations/translations.qrc diff --git a/lib/qmmp/Output/jack/CMakeLists.txt b/src/plugins/Output/jack/CMakeLists.txt index 665a6fb13..665a6fb13 100644 --- a/lib/qmmp/Output/jack/CMakeLists.txt +++ b/src/plugins/Output/jack/CMakeLists.txt diff --git a/lib/qmmp/Output/jack/bio2jack.c b/src/plugins/Output/jack/bio2jack.c index aef7ea9b7..aef7ea9b7 100644 --- a/lib/qmmp/Output/jack/bio2jack.c +++ b/src/plugins/Output/jack/bio2jack.c diff --git a/lib/qmmp/Output/jack/bio2jack.h b/src/plugins/Output/jack/bio2jack.h index f81a7c777..f81a7c777 100644 --- a/lib/qmmp/Output/jack/bio2jack.h +++ b/src/plugins/Output/jack/bio2jack.h diff --git a/lib/qmmp/Output/jack/jack.pro b/src/plugins/Output/jack/jack.pro index 19c1d697b..a943a5b3b 100644 --- a/lib/qmmp/Output/jack/jack.pro +++ b/src/plugins/Output/jack/jack.pro @@ -1,4 +1,4 @@ - +include(../../plugins.pri) HEADERS += outputjackfactory.h \ outputjack.h \ @@ -8,15 +8,17 @@ SOURCES += outputjackfactory.cpp \ outputjack.cpp \ bio2jack.c -INCLUDEPATH += ../../../ -QMAKE_LIBDIR += ../../../ -QMAKE_CLEAN = ../libjack.so +TARGET=$$PLUGINS_PREFIX/Output/jack +QMAKE_CLEAN =$$PLUGINS_PREFIX/Output/libjack.so + + +INCLUDEPATH += ../../../qmmp +QMAKE_LIBDIR += ../../../../lib CONFIG += release \ warn_on \ thread \ plugin \ link_pkgconfig -DESTDIR = ../ TEMPLATE = lib LIBS += -lqmmp PKGCONFIG += jack samplerate diff --git a/lib/qmmp/Output/jack/outputjack.cpp b/src/plugins/Output/jack/outputjack.cpp index 7c3c0a32c..c8d3ebe86 100644 --- a/lib/qmmp/Output/jack/outputjack.cpp +++ b/src/plugins/Output/jack/outputjack.cpp @@ -47,7 +47,7 @@ void OutputJACK::seek(long pos) m_currentSeconds = -1; } -OutputJACK::OutputJACK(QObject * parent) +OutputJACK::OutputJACK(QObject * parent, bool useVolume) : Output(parent), m_inited(FALSE), m_pause(FALSE), m_play(FALSE), m_userStop(FALSE), m_totalWritten(0), m_currentSeconds(-1), m_bps(-1), m_frequency(-1), m_channels(-1), m_precision(-1) diff --git a/lib/qmmp/Output/jack/outputjack.h b/src/plugins/Output/jack/outputjack.h index e20a9570a..e01ced315 100644 --- a/lib/qmmp/Output/jack/outputjack.h +++ b/src/plugins/Output/jack/outputjack.h @@ -16,7 +16,7 @@ class OutputJACK : public Output { Q_OBJECT public: - OutputJACK(QObject * parent = 0); + OutputJACK(QObject * parent = 0, bool useVolume = TRUE); ~OutputJACK(); bool initialize(); bool isInitialized() const diff --git a/lib/qmmp/Output/jack/outputjackfactory.cpp b/src/plugins/Output/jack/outputjackfactory.cpp index acb8d1376..b41ba4487 100644 --- a/lib/qmmp/Output/jack/outputjackfactory.cpp +++ b/src/plugins/Output/jack/outputjackfactory.cpp @@ -24,13 +24,16 @@ #include "outputjackfactory.h" -const QString& OutputJACKFactory::name() const +const OutputProperties OutputJACKFactory::properties() const { - static QString name(tr("JACK Plugin")); - return name; + OutputProperties properties; + properties.name = tr("JACK Plugin"); + properties.hasAbout = TRUE; + properties.hasSettings = TRUE; + return properties; } -Output* OutputJACKFactory::create(QObject* parent) +Output* OutputJACKFactory::create(QObject* parent, bool volume) { return new OutputJACK(parent); } diff --git a/lib/qmmp/Output/jack/outputjackfactory.h b/src/plugins/Output/jack/outputjackfactory.h index d96c73df5..cc27990f1 100644 --- a/lib/qmmp/Output/jack/outputjackfactory.h +++ b/src/plugins/Output/jack/outputjackfactory.h @@ -37,8 +37,8 @@ Q_OBJECT Q_INTERFACES(OutputFactory); public: - const QString& name() const; - Output* create(QObject* parent); + const OutputProperties properties() const; + Output* create(QObject* parent, bool volume); void showSettings(QWidget* parent); void showAbout(QWidget *parent); QTranslator *createTranslator(QObject *parent); diff --git a/lib/qmmp/Output/jack/translations/jack_plugin_ru.qm b/src/plugins/Output/jack/translations/jack_plugin_ru.qm Binary files differindex 4050034bc..4050034bc 100644 --- a/lib/qmmp/Output/jack/translations/jack_plugin_ru.qm +++ b/src/plugins/Output/jack/translations/jack_plugin_ru.qm diff --git a/lib/qmmp/Output/jack/translations/jack_plugin_ru.ts b/src/plugins/Output/jack/translations/jack_plugin_ru.ts index 6f5057529..6f5057529 100644 --- a/lib/qmmp/Output/jack/translations/jack_plugin_ru.ts +++ b/src/plugins/Output/jack/translations/jack_plugin_ru.ts diff --git a/lib/qmmp/Output/jack/translations/translations.qrc b/src/plugins/Output/jack/translations/translations.qrc index af9447328..af9447328 100644 --- a/lib/qmmp/Output/jack/translations/translations.qrc +++ b/src/plugins/Output/jack/translations/translations.qrc diff --git a/lib/qmmp/Output/oss/CMakeLists.txt b/src/plugins/Output/oss/CMakeLists.txt index 8ab6f8d88..8ab6f8d88 100644 --- a/lib/qmmp/Output/oss/CMakeLists.txt +++ b/src/plugins/Output/oss/CMakeLists.txt diff --git a/lib/qmmp/Output/oss/oss.pro b/src/plugins/Output/oss/oss.pro index eb0cf3562..e401f14b0 100644 --- a/lib/qmmp/Output/oss/oss.pro +++ b/src/plugins/Output/oss/oss.pro @@ -1,3 +1,4 @@ +include(../../plugins.pri) FORMS += settingsdialog.ui HEADERS += outputossfactory.h \ @@ -9,15 +10,17 @@ SOURCES += outputossfactory.cpp \ outputoss.cpp \ settingsdialog.cpp -INCLUDEPATH += ../../../ -QMAKE_LIBDIR += ../../../ -QMAKE_CLEAN = ../liboss.so +TARGET=$$PLUGINS_PREFIX/Output/oss +QMAKE_CLEAN =$$PLUGINS_PREFIX/Output/liboss.so + + +INCLUDEPATH += ../../../qmmp +QMAKE_LIBDIR += ../../../../lib CONFIG += release \ warn_on \ thread \ plugin -DESTDIR = ../ TEMPLATE = lib LIBS += -lqmmp diff --git a/lib/qmmp/Output/oss/outputoss.cpp b/src/plugins/Output/oss/outputoss.cpp index 60936bd10..9c52ac777 100644 --- a/lib/qmmp/Output/oss/outputoss.cpp +++ b/src/plugins/Output/oss/outputoss.cpp @@ -88,7 +88,7 @@ void OutputOSS::seek(long pos) OutputOSS::OutputOSS(QObject * parent) - : Output(parent, Output::Custom), m_inited(FALSE), m_pause(FALSE), m_play(FALSE), + : Output(parent), m_inited(FALSE), m_pause(FALSE), m_play(FALSE), m_userStop(FALSE), m_totalWritten(0), m_currentSeconds(-1), m_bps(1), m_frequency(-1), m_channels(-1), m_precision(-1), @@ -424,7 +424,6 @@ void OutputOSS::run() void OutputOSS::setVolume(int l, int r) { - int v, devs; long cmd; @@ -442,6 +441,32 @@ void OutputOSS::setVolume(int l, int r) ioctl(m_mixer_fd, cmd, &v); } +void OutputOSS::volume(int *ll,int *rr) +{ + *ll = 0; + *rr = 0; + int cmd; + int v, devs; + + ioctl(m_mixer_fd, SOUND_MIXER_READ_DEVMASK, &devs); + if ((devs & SOUND_MASK_PCM) && (m_master == 0)) + cmd = SOUND_MIXER_READ_PCM; + else if ((devs & SOUND_MASK_VOLUME) && (m_master == 1)) + cmd = SOUND_MIXER_READ_VOLUME; + else + return; + + ioctl(m_mixer_fd, cmd, &v); + *ll = (v & 0xFF00) >> 8; + *rr = (v & 0x00FF); + + *ll = (*ll > 100) ? 100 : *ll; + *rr = (*rr > 100) ? 100 : *rr; + *ll = (*ll < 0) ? 0 : *ll; + *rr = (*rr < 0) ? 0 : *rr; +} + + void OutputOSS::checkVolume() { long ll = 0, lr = 0, cmd; diff --git a/lib/qmmp/Output/oss/outputoss.h b/src/plugins/Output/oss/outputoss.h index ce73bf3bd..a2f260057 100644 --- a/lib/qmmp/Output/oss/outputoss.h +++ b/src/plugins/Output/oss/outputoss.h @@ -45,6 +45,7 @@ public: long latency(); void seek(long); void setVolume(int l, int r); + void volume(int* l,int* r); void checkVolume(); private: diff --git a/lib/qmmp/Output/oss/outputossfactory.cpp b/src/plugins/Output/oss/outputossfactory.cpp index a2212fc52..3fa8c07a2 100644 --- a/lib/qmmp/Output/oss/outputossfactory.cpp +++ b/src/plugins/Output/oss/outputossfactory.cpp @@ -31,11 +31,20 @@ const QString& OutputOSSFactory::name() const return name; } -Output* OutputOSSFactory::create(QObject* parent) +Output* OutputOSSFactory::create(QObject* parent,bool) { return new OutputOSS(parent); } +const OutputProperties OutputOSSFactory::properties() const +{ + OutputProperties properties; + properties.name = name(); + properties.hasAbout = TRUE; + properties.hasSettings = TRUE; + return properties; +} + void OutputOSSFactory::showSettings(QWidget* parent) { SettingsDialog *s = new SettingsDialog(parent); diff --git a/lib/qmmp/Output/oss/outputossfactory.h b/src/plugins/Output/oss/outputossfactory.h index 0c5864a7c..03166bb94 100644 --- a/lib/qmmp/Output/oss/outputossfactory.h +++ b/src/plugins/Output/oss/outputossfactory.h @@ -38,11 +38,11 @@ Q_INTERFACES(OutputFactory); public: const QString& name() const; - Output* create(QObject* parent); + Output* create(QObject* parent,bool); void showSettings(QWidget* parent); void showAbout(QWidget *parent); QTranslator *createTranslator(QObject *parent); - + const OutputProperties properties() const; }; #endif diff --git a/lib/qmmp/Output/oss/settingsdialog.cpp b/src/plugins/Output/oss/settingsdialog.cpp index 8d75b06eb..8d75b06eb 100644 --- a/lib/qmmp/Output/oss/settingsdialog.cpp +++ b/src/plugins/Output/oss/settingsdialog.cpp diff --git a/lib/qmmp/Output/oss/settingsdialog.h b/src/plugins/Output/oss/settingsdialog.h index fd75c5698..fd75c5698 100644 --- a/lib/qmmp/Output/oss/settingsdialog.h +++ b/src/plugins/Output/oss/settingsdialog.h diff --git a/lib/qmmp/Output/oss/settingsdialog.ui b/src/plugins/Output/oss/settingsdialog.ui index ce1c40894..ce1c40894 100644 --- a/lib/qmmp/Output/oss/settingsdialog.ui +++ b/src/plugins/Output/oss/settingsdialog.ui diff --git a/lib/qmmp/Output/oss/translations/oss_plugin_cs.ts b/src/plugins/Output/oss/translations/oss_plugin_cs.ts index 424d320e7..424d320e7 100644 --- a/lib/qmmp/Output/oss/translations/oss_plugin_cs.ts +++ b/src/plugins/Output/oss/translations/oss_plugin_cs.ts diff --git a/lib/qmmp/Visual/CMakeLists.txt b/src/plugins/Visual/CMakeLists.txt index df35bdf14..df35bdf14 100644 --- a/lib/qmmp/Visual/CMakeLists.txt +++ b/src/plugins/Visual/CMakeLists.txt diff --git a/lib/qmmp/Visual/Visual.pro b/src/plugins/Visual/Visual.pro index e30196780..e30196780 100644 --- a/lib/qmmp/Visual/Visual.pro +++ b/src/plugins/Visual/Visual.pro diff --git a/lib/qmmp/Visual/analyzer/CMakeLists.txt b/src/plugins/Visual/analyzer/CMakeLists.txt index 7de2ca687..7de2ca687 100644 --- a/lib/qmmp/Visual/analyzer/CMakeLists.txt +++ b/src/plugins/Visual/analyzer/CMakeLists.txt diff --git a/lib/qmmp/Visual/analyzer/analyzer.cpp b/src/plugins/Visual/analyzer/analyzer.cpp index efcb8b7d7..efcb8b7d7 100644 --- a/lib/qmmp/Visual/analyzer/analyzer.cpp +++ b/src/plugins/Visual/analyzer/analyzer.cpp diff --git a/lib/qmmp/Visual/analyzer/analyzer.h b/src/plugins/Visual/analyzer/analyzer.h index ab08d3af0..ab08d3af0 100644 --- a/lib/qmmp/Visual/analyzer/analyzer.h +++ b/src/plugins/Visual/analyzer/analyzer.h diff --git a/lib/qmmp/Visual/analyzer/analyzer.pro b/src/plugins/Visual/analyzer/analyzer.pro index f30710c2b..05d95a1ff 100644 --- a/lib/qmmp/Visual/analyzer/analyzer.pro +++ b/src/plugins/Visual/analyzer/analyzer.pro @@ -1,3 +1,9 @@ +include(../../plugins.pri) + +TARGET=$$PLUGINS_PREFIX/Visual/analyzer +QMAKE_CLEAN =$$PLUGINS_PREFIX/Visual/libanalyzer.so + + #FORMS += detailsdialog.ui HEADERS += analyzer.h \ fft.h \ @@ -10,14 +16,12 @@ SOURCES += analyzer.cpp \ visualanalyzerfactory.cpp \ colorwidget.cpp \ settingsdialog.cpp -DESTDIR = ../ -QMAKE_CLEAN = ../libanalyzer.so -INCLUDEPATH += ../../../ +INCLUDEPATH += ../../../qmmp CONFIG += release \ warn_on \ plugin TEMPLATE = lib -QMAKE_LIBDIR += ../../../ +QMAKE_LIBDIR += ../../../../lib LIBS += -lqmmp -L/usr/lib -I/usr/include #TRANSLATIONS = translations/ffmpeg_plugin_ru.ts #RESOURCES = translations/translations.qrc diff --git a/lib/qmmp/Visual/analyzer/colorwidget.cpp b/src/plugins/Visual/analyzer/colorwidget.cpp index 7117a6cac..7117a6cac 100644 --- a/lib/qmmp/Visual/analyzer/colorwidget.cpp +++ b/src/plugins/Visual/analyzer/colorwidget.cpp diff --git a/lib/qmmp/Visual/analyzer/colorwidget.h b/src/plugins/Visual/analyzer/colorwidget.h index c145c1035..c145c1035 100644 --- a/lib/qmmp/Visual/analyzer/colorwidget.h +++ b/src/plugins/Visual/analyzer/colorwidget.h diff --git a/lib/qmmp/Visual/analyzer/fft.c b/src/plugins/Visual/analyzer/fft.c index 7ca1978a5..7ca1978a5 100644 --- a/lib/qmmp/Visual/analyzer/fft.c +++ b/src/plugins/Visual/analyzer/fft.c diff --git a/lib/qmmp/Visual/analyzer/fft.h b/src/plugins/Visual/analyzer/fft.h index 431afa365..431afa365 100644 --- a/lib/qmmp/Visual/analyzer/fft.h +++ b/src/plugins/Visual/analyzer/fft.h diff --git a/lib/qmmp/Visual/analyzer/inlines.h b/src/plugins/Visual/analyzer/inlines.h index 3efccf0de..3efccf0de 100644 --- a/lib/qmmp/Visual/analyzer/inlines.h +++ b/src/plugins/Visual/analyzer/inlines.h diff --git a/lib/qmmp/Visual/analyzer/settingsdialog.cpp b/src/plugins/Visual/analyzer/settingsdialog.cpp index badadc190..badadc190 100644 --- a/lib/qmmp/Visual/analyzer/settingsdialog.cpp +++ b/src/plugins/Visual/analyzer/settingsdialog.cpp diff --git a/lib/qmmp/Visual/analyzer/settingsdialog.h b/src/plugins/Visual/analyzer/settingsdialog.h index b7c466477..b7c466477 100644 --- a/lib/qmmp/Visual/analyzer/settingsdialog.h +++ b/src/plugins/Visual/analyzer/settingsdialog.h diff --git a/lib/qmmp/Visual/analyzer/settingsdialog.ui b/src/plugins/Visual/analyzer/settingsdialog.ui index 4ddd391a3..4ddd391a3 100644 --- a/lib/qmmp/Visual/analyzer/settingsdialog.ui +++ b/src/plugins/Visual/analyzer/settingsdialog.ui diff --git a/lib/qmmp/Visual/analyzer/visualanalyzerfactory.cpp b/src/plugins/Visual/analyzer/visualanalyzerfactory.cpp index 0e110b2cd..0e110b2cd 100644 --- a/lib/qmmp/Visual/analyzer/visualanalyzerfactory.cpp +++ b/src/plugins/Visual/analyzer/visualanalyzerfactory.cpp diff --git a/lib/qmmp/Visual/analyzer/visualanalyzerfactory.h b/src/plugins/Visual/analyzer/visualanalyzerfactory.h index 54f52bfe2..54f52bfe2 100644 --- a/lib/qmmp/Visual/analyzer/visualanalyzerfactory.h +++ b/src/plugins/Visual/analyzer/visualanalyzerfactory.h diff --git a/src/plugins/plugins.pri b/src/plugins/plugins.pri new file mode 100644 index 000000000..e109b7b46 --- /dev/null +++ b/src/plugins/plugins.pri @@ -0,0 +1,2 @@ +include(../../qmmp.pri) +PLUGINS_PREFIX=../../../../lib/qmmp
\ No newline at end of file diff --git a/lib/qmmp/qmmp.pro b/src/plugins/plugins.pro index 6a68558ce..9be0dd332 100644 --- a/lib/qmmp/qmmp.pro +++ b/src/plugins/plugins.pro @@ -2,5 +2,6 @@ SUBDIRS += Input \ Output \ Visual \ - Effect + Effect \ + General TEMPLATE = subdirs diff --git a/lib/CMakeLists.txt b/src/qmmp/CMakeLists.txt index 79edd7152..79edd7152 100644 --- a/lib/CMakeLists.txt +++ b/src/qmmp/CMakeLists.txt diff --git a/lib/buffer.h b/src/qmmp/buffer.h index c5ffadc0c..c5ffadc0c 100644 --- a/lib/buffer.h +++ b/src/qmmp/buffer.h diff --git a/lib/constants.h b/src/qmmp/constants.h index ee558f3a9..ee558f3a9 100644 --- a/lib/constants.h +++ b/src/qmmp/constants.h diff --git a/lib/decoder.cpp b/src/qmmp/decoder.cpp index 4ae0637c7..f2dceba92 100644 --- a/lib/decoder.cpp +++ b/src/qmmp/decoder.cpp @@ -35,10 +35,12 @@ Decoder::Decoder(QObject *parent, DecoderFactory *d, QIODevice *i, Output *o) int b[] = {0,0,0,0,0,0,0,0,0,0}; setEQ(b, 0); qRegisterMetaType<DecoderState>("DecoderState"); - - blksize = Buffer::size(); m_effects = Effect::create(this); + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + m_useVolume = settings.value("Volume/software_volume", FALSE).toBool(); + m_volL = settings.value("Volume/left", 80).toInt(); + m_volR = settings.value("Volume/right", 80).toInt(); } Decoder::~Decoder() @@ -300,16 +302,19 @@ ulong Decoder::produceSound(char *data, ulong output_bytes, ulong bitrate, int n { ulong sz = output_bytes < blksize ? output_bytes : blksize; - if (!m_eqInited) - { - init_iir(); - m_eqInited = TRUE; - } if (m_useEQ) { + if (!m_eqInited) + { + init_iir(); + m_eqInited = TRUE; + } iir((void*) data,sz,nch); } - + if (m_useVolume) + { + changeVolume(data, sz, nch); + } char *out_data = data; char *prev_data = data; ulong w = sz; @@ -318,14 +323,14 @@ ulong Decoder::produceSound(char *data, ulong output_bytes, ulong bitrate, int n { w = effect->process(prev_data, sz, &out_data); - if(w <= 0) + if (w <= 0) { // copy data if plugin can not procees it w = sz; out_data = new char[w]; memcpy(out_data, prev_data, w); } - if(data != prev_data) + if (data != prev_data) delete prev_data; prev_data = out_data; } @@ -375,3 +380,30 @@ void Decoder::setEQ(int bands[10], int preamp) set_gain(i,1, 0.03*value+0.000999999*value*value); } } + +void Decoder::changeVolume(char *data, ulong sz, int channels) +{ + int r = pow( 10, (m_volR - 100)/40.0 ) * 256; + int l = pow( 10, (m_volL - 100)/40.0 ) * 256; + for (ulong i = 0; i < sz/2; i+=2) + { + ((short*)data)[i]*= r/256.0; + ((short*)data)[i+1]*= l/256.0; + } +} + +void Decoder::setVolume(int l, int r) +{ + mtx.lock(); + m_volR = l; + m_volL = r; + mtx.unlock(); +} + +void Decoder::volume(int *l, int *r) +{ + mtx.lock(); + *l = m_volL; + *r = m_volR; + mtx.unlock(); +} diff --git a/lib/decoder.h b/src/qmmp/decoder.h index 97a3e1da6..31d96cc6d 100644 --- a/lib/decoder.h +++ b/src/qmmp/decoder.h @@ -146,6 +146,9 @@ public: { m_useEQ = on; }; + void setVolume(int, int); + + void volume(int*, int*); // static methods static QStringList all(); @@ -173,6 +176,7 @@ protected: private: DecoderFactory *fctry; + void changeVolume(char *data, ulong sz, int channels); QList <Effect*> m_effects; QIODevice *in; @@ -184,6 +188,9 @@ private: uint blksize; bool m_eqInited; bool m_useEQ; + bool m_useVolume; + int m_volL; + int m_volR; }; diff --git a/lib/decoderfactory.h b/src/qmmp/decoderfactory.h index d67d1b564..d67d1b564 100644 --- a/lib/decoderfactory.h +++ b/src/qmmp/decoderfactory.h diff --git a/lib/downloader.cpp b/src/qmmp/downloader.cpp index b9a9c67ab..5b091b640 100644 --- a/lib/downloader.cpp +++ b/src/qmmp/downloader.cpp @@ -113,6 +113,7 @@ Downloader::Downloader(QObject *parent, const QString &url) Downloader::~Downloader() { abort(); + curl_global_cleanup(); } @@ -199,36 +200,33 @@ void Downloader::run() { qDebug("Downloader: starting download thread"); m_handle = curl_easy_init(); - //proxy QSettings settings ( QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat ); if (settings.value ("Proxy/use_proxy", FALSE).toBool()) curl_easy_setopt(m_handle, CURLOPT_PROXY, - (settings.value("Proxy/host").toString()+":"+ + strdup((settings.value("Proxy/host").toString()+":"+ settings.value("Proxy/port").toString()). - toLatin1 ().constData ()); + toLatin1 ().constData ())); if (settings.value ("Proxy/authentication", FALSE).toBool()) curl_easy_setopt(m_handle, CURLOPT_PROXYUSERPWD, - (settings.value("Proxy/user").toString()+":"+ + strdup((settings.value("Proxy/user").toString()+":"+ settings.value("Proxy/passw").toString()). - toLatin1 ().constData ()); + toLatin1 ().constData ())); // Set url to download - curl_easy_setopt(m_handle, CURLOPT_URL, m_url.toAscii().constData()); - //qDebug("Downloader: url: %s", qPrintable(url)); + curl_easy_setopt(m_handle, CURLOPT_URL, strdup(m_url.toAscii().constData())); // callback for wrting curl_easy_setopt(m_handle, CURLOPT_WRITEFUNCTION, curl_write_data); // Set destination file curl_easy_setopt(m_handle, CURLOPT_WRITEDATA, this); curl_easy_setopt(m_handle, CURLOPT_HEADERDATA, this); curl_easy_setopt(m_handle, CURLOPT_HEADERFUNCTION, curl_header); - // Some SSL mambo jambo + // Disable SSL curl_easy_setopt(m_handle, CURLOPT_SSL_VERIFYPEER, FALSE); curl_easy_setopt(m_handle, CURLOPT_SSL_VERIFYHOST, 0); - // Disable progress meter + // Enable progress meter curl_easy_setopt(m_handle, CURLOPT_NOPROGRESS, 0); - curl_easy_setopt(m_handle, CURLOPT_PROGRESSDATA, this); curl_easy_setopt(m_handle, CURLOPT_PROGRESSFUNCTION, curl_progress); // Any kind of authentication @@ -238,6 +236,8 @@ void Downloader::run() curl_easy_setopt(m_handle, CURLOPT_AUTOREFERER, 1); // Follow redirections curl_easy_setopt(m_handle, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(m_handle, CURLOPT_FAILONERROR, 1); + curl_easy_setopt(m_handle, CURLOPT_MAXREDIRS, 15); // user agent curl_easy_setopt(m_handle, CURLOPT_USERAGENT, "qmmp/0.2"); curl_easy_setopt(m_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); @@ -256,7 +256,7 @@ void Downloader::run() qDebug("Downloader: starting libcurl"); m_mutex.unlock(); return_code = curl_easy_perform(m_handle); - //qDebug("curl_easy_perform %d", return_code); + qDebug("curl_easy_perform %d", return_code); m_mutex.lock(); m_stream.aborted = TRUE; diff --git a/lib/downloader.h b/src/qmmp/downloader.h index 05175e379..05175e379 100644 --- a/lib/downloader.h +++ b/src/qmmp/downloader.h diff --git a/lib/effect.cpp b/src/qmmp/effect.cpp index c6d3ba0fb..c6d3ba0fb 100644 --- a/lib/effect.cpp +++ b/src/qmmp/effect.cpp diff --git a/lib/effect.h b/src/qmmp/effect.h index 654c1c2b6..654c1c2b6 100644 --- a/lib/effect.h +++ b/src/qmmp/effect.h diff --git a/lib/effectfactory.h b/src/qmmp/effectfactory.h index 96354cf6e..96354cf6e 100644 --- a/lib/effectfactory.h +++ b/src/qmmp/effectfactory.h diff --git a/lib/equ/iir.c b/src/qmmp/equ/iir.c index 9d826b86c..9d826b86c 100644 --- a/lib/equ/iir.c +++ b/src/qmmp/equ/iir.c diff --git a/lib/equ/iir.h b/src/qmmp/equ/iir.h index e7ea5ef1a..e7ea5ef1a 100644 --- a/lib/equ/iir.h +++ b/src/qmmp/equ/iir.h diff --git a/lib/equ/iir_cfs.c b/src/qmmp/equ/iir_cfs.c index f8e6f88a6..f8e6f88a6 100644 --- a/lib/equ/iir_cfs.c +++ b/src/qmmp/equ/iir_cfs.c diff --git a/lib/equ/iir_cfs.h b/src/qmmp/equ/iir_cfs.h index c4cc4a0fd..c4cc4a0fd 100644 --- a/lib/equ/iir_cfs.h +++ b/src/qmmp/equ/iir_cfs.h diff --git a/lib/equ/iir_fpu.c b/src/qmmp/equ/iir_fpu.c index ae0051fdf..ae0051fdf 100644 --- a/lib/equ/iir_fpu.c +++ b/src/qmmp/equ/iir_fpu.c diff --git a/lib/equ/iir_fpu.h b/src/qmmp/equ/iir_fpu.h index 990eebf97..990eebf97 100644 --- a/lib/equ/iir_fpu.h +++ b/src/qmmp/equ/iir_fpu.h diff --git a/lib/filetag.cpp b/src/qmmp/filetag.cpp index 3ce3b505a..3ce3b505a 100644 --- a/lib/filetag.cpp +++ b/src/qmmp/filetag.cpp diff --git a/lib/filetag.h b/src/qmmp/filetag.h index f75facfa0..f75facfa0 100644 --- a/lib/filetag.h +++ b/src/qmmp/filetag.h diff --git a/lib/output.cpp b/src/qmmp/output.cpp index 94b68aa36..50136608a 100644 --- a/lib/output.cpp +++ b/src/qmmp/output.cpp @@ -57,7 +57,7 @@ void Output::registerFactory ( OutputFactory *fact ) factories->append ( fact ); } -Output *Output::create ( QObject *parent ) +Output *Output::create (QObject *parent) { Output *output = 0; @@ -77,27 +77,20 @@ Output *Output::create ( QObject *parent ) j = i; } OutputFactory *fact = factories->at (j); - if ( fact ) + bool useVolume = !settings.value("Volume/software_volume", FALSE).toBool(); + if (fact) { - output = fact->create (parent); - } - switch ((int) output->volumeControl()) - { - case Output::Standard: - { - break; - } - case Output::Custom: - { - timer = new QTimer(output); - connect(timer, SIGNAL(timeout()), output, SLOT(checkVolume())); - timer->start(125); - break; - } - case Output::Disabled: - { - break; - } + output = fact->create (parent, useVolume); + if (useVolume) + { + timer = new QTimer(output); + connect(timer, SIGNAL(timeout()), output, SLOT(checkVolume())); + timer->start(125); + } + else + { + QTimer::singleShot(125, output, SLOT(checkSoftwareVolume())); + } } return output; } @@ -114,10 +107,11 @@ QStringList Output::outputFiles() return files; } -Output::Output ( QObject* parent, VolumeType vt) : QThread (parent), r (stackSize()) +Output::Output (QObject* parent) : QThread (parent), r (stackSize()) { qRegisterMetaType<OutputState>("OutputState"); - m_vol = vt; + m_bl = -1; + m_br = -1; } @@ -248,3 +242,28 @@ void Output::dispatchVolume(int L, int R) { emit stateChanged ( OutputState(L, R) ); } + +void Output::checkVolume() +{ + int ll = 0, lr = 0; + volume(&ll,&lr); + ll = (ll > 100) ? 100 : ll; + lr = (lr > 100) ? 100 : lr; + ll = (ll < 0) ? 0 : ll; + lr = (lr < 0) ? 0 : lr; + if (m_bl!=ll || m_br!=lr) + { + m_bl = ll; + m_br = lr; + dispatchVolume(ll,lr); + } +} + +void Output::checkSoftwareVolume() +{ + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + int L = settings.value("Volume/left", 80).toInt(); + int R = settings.value("Volume/right", 80).toInt(); + dispatchVolume(L, R); +} + diff --git a/lib/output.h b/src/qmmp/output.h index 24bc9d3fb..1a8ec3bd9 100644 --- a/lib/output.h +++ b/src/qmmp/output.h @@ -143,9 +143,7 @@ class Output : public QThread Q_OBJECT public: - enum VolumeType { Standard, Custom, Disabled }; - - Output(QObject * parent = 0, VolumeType vt = Standard); + Output(QObject * parent = 0); ~Output(); Recycler *recycler() @@ -158,11 +156,6 @@ public: return &mtx; } - VolumeType volumeControl() - { - return m_vol; - }; - //visualization void addVisual(Visual*); void removeVisual(Visual*); @@ -179,8 +172,8 @@ public: virtual long written() = 0; virtual long latency() = 0; virtual void seek(long) = 0; - virtual void setVolume(int, int) - {}; + virtual void setVolume(int, int){}; + virtual void volume(int*, int*){}; static void registerFactory(OutputFactory *); static Output *create(QObject *); @@ -188,8 +181,8 @@ public: static QStringList outputFiles(); public slots: - virtual void checkVolume() - {}; + void checkVolume(); + void checkSoftwareVolume(); signals: void stateChanged(const OutputState&); @@ -208,7 +201,7 @@ private: Recycler r; QList<Visual*> visuals; //external visualization QMap<VisualFactory*, Visual*> m_vis_map; //internal visualization - VolumeType m_vol; + int m_bl, m_br; }; diff --git a/lib/outputfactory.h b/src/qmmp/outputfactory.h index a398cf2b5..2a5513759 100644 --- a/lib/outputfactory.h +++ b/src/qmmp/outputfactory.h @@ -1,6 +1,6 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * - * forkotov02@hotmail.ru * + * Copyright (C) 2007 by Ilya Kotov * + * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -30,12 +30,19 @@ class QTranslator; class Decoder; class Output; +struct OutputProperties +{ + QString name; + bool hasAbout; + bool hasSettings; +}; + class OutputFactory { public: virtual ~OutputFactory() {} - virtual const QString &name() const = 0; - virtual Output *create(QObject *) = 0; + virtual const OutputProperties properties() const = 0; + virtual Output *create(QObject *, bool) = 0; virtual void showSettings(QWidget *parent) = 0; virtual void showAbout(QWidget *parent) = 0; virtual QTranslator *createTranslator(QObject *parent) = 0; diff --git a/lib/lib.pro b/src/qmmp/qmmp.pro index 7899f81b4..a583cd45b 100644 --- a/lib/lib.pro +++ b/src/qmmp/qmmp.pro @@ -3,6 +3,8 @@ # ?????????? ???????????? ???????? ???????? ???????: ./libs # ???? - ??????????: nnp +include(../../qmmp.pri) + HEADERS += recycler.h \ buffer.h \ constants.h \ @@ -34,7 +36,7 @@ SOURCES += recycler.cpp \ visual.cpp \ effect.cpp -TARGET = qmmp +TARGET = ../../lib/qmmp CONFIG += release \ warn_on \ qt \ diff --git a/lib/recycler.cpp b/src/qmmp/recycler.cpp index 15d2234a6..15d2234a6 100644 --- a/lib/recycler.cpp +++ b/src/qmmp/recycler.cpp diff --git a/lib/recycler.h b/src/qmmp/recycler.h index 6bb80375d..6bb80375d 100644 --- a/lib/recycler.h +++ b/src/qmmp/recycler.h diff --git a/lib/soundcore.cpp b/src/qmmp/soundcore.cpp index 37c28e5f5..019b4c78e 100644 --- a/lib/soundcore.cpp +++ b/src/qmmp/soundcore.cpp @@ -21,6 +21,8 @@ #include <QIODevice> #include <QFile> #include <QApplication> +#include <QSettings> +#include <QDir> #include "decoderfactory.h" #include "constants.h" @@ -111,12 +113,12 @@ bool SoundCore::play(const QString &source) Visual *visual = 0; foreach(visual, m_visuals) - m_output->addVisual(visual); + m_output->addVisual(visual); VisualFactory* factory; foreach(factory, *Visual::visualFactories()) { - if(Visual::isEnabled(factory)) + if (Visual::isEnabled(factory)) m_output->addVisual(factory, m_parentWidget); } @@ -199,7 +201,7 @@ void SoundCore::stop() VisualFactory* factory; foreach(factory, *Visual::visualFactories()) { - if(Visual::isEnabled(factory)) + if (Visual::isEnabled(factory)) m_output->addVisual(factory, m_parentWidget); } connect(m_output, SIGNAL(stateChanged(const OutputState&)), @@ -299,10 +301,39 @@ void SoundCore::setEQEnabled(bool on) void SoundCore::setVolume(int L, int R) { - if (m_output) + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + bool sofVolume = settings.value("Volume/software_volume", FALSE).toBool(); + if (sofVolume) + { + L = qMin(L,100); + R = qMin(R,100); + L = qMax(L,0); + R = qMax(R,0); + settings.setValue("Volume/left", L); + settings.setValue("Volume/right", R); + if (m_decoder) + m_decoder->setVolume(L,R); + if (m_output) + m_output->checkSoftwareVolume(); + } + else if (m_output) m_output->setVolume(L,R); } +void SoundCore::volume(int *left, int *right) +{ + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + bool sofVolume = settings.value("Volume/software_volume", FALSE).toBool(); + if (sofVolume) + { + *left = settings.value("Volume/left", 0).toInt(); + *right = settings.value("Volume/right", 0).toInt(); + } + else if (m_output) + m_output->volume(left,right); + return; +} + void SoundCore::updateConfig() { m_update = TRUE; @@ -316,7 +347,7 @@ void SoundCore::addVisualization(Visual *visual) if (m_visuals.indexOf (visual) == -1) { m_visuals.append(visual); - if(m_output) + if (m_output) m_output->addVisual(visual); } } @@ -364,12 +395,12 @@ void SoundCore::showVisualization(QWidget *parent) if (!m_parentWidget) { m_parentWidget = parent; - if(!m_output) + if (!m_output) return; VisualFactory* factory; foreach(factory, *Visual::visualFactories()) { - if(Visual::isEnabled(factory)) + if (Visual::isEnabled(factory)) m_output->addVisual(factory, m_parentWidget); } } @@ -377,7 +408,7 @@ void SoundCore::showVisualization(QWidget *parent) void SoundCore::addVisual(VisualFactory *factory, QWidget *parent) { - if(m_output) + if (m_output) m_output->addVisual(factory, parent); else Visual::setEnabled(factory, TRUE); @@ -385,7 +416,7 @@ void SoundCore::addVisual(VisualFactory *factory, QWidget *parent) void SoundCore::removeVisual(VisualFactory *factory) { - if(m_output) + if (m_output) m_output->removeVisual(factory); else Visual::setEnabled(factory, FALSE); @@ -396,7 +427,7 @@ void SoundCore::removeVisual(Visual *visual) if (m_visuals.indexOf (visual) != -1) { m_visuals.removeAll(visual); - if(m_output) + if (m_output) m_output->removeVisual(visual); } } @@ -405,3 +436,5 @@ SoundCore* SoundCore::instance() { return m_instance; } + + diff --git a/lib/soundcore.h b/src/qmmp/soundcore.h index cd342d677..3fa785a2a 100644 --- a/lib/soundcore.h +++ b/src/qmmp/soundcore.h @@ -124,6 +124,8 @@ public: * \b L and \b R should be 0..100 */ void setVolume(int L, int R); + + void volume(int*, int*); //config diff --git a/lib/streamreader.cpp b/src/qmmp/streamreader.cpp index 30bb9c3a7..30bb9c3a7 100644 --- a/lib/streamreader.cpp +++ b/src/qmmp/streamreader.cpp diff --git a/lib/streamreader.h b/src/qmmp/streamreader.h index c8182153a..c8182153a 100644 --- a/lib/streamreader.h +++ b/src/qmmp/streamreader.h diff --git a/lib/visual.cpp b/src/qmmp/visual.cpp index ce5e8a982..ce5e8a982 100644 --- a/lib/visual.cpp +++ b/src/qmmp/visual.cpp diff --git a/lib/visual.h b/src/qmmp/visual.h index ef663bb37..ef663bb37 100644 --- a/lib/visual.h +++ b/src/qmmp/visual.h diff --git a/lib/visualfactory.h b/src/qmmp/visualfactory.h index 6862032bb..6862032bb 100644 --- a/lib/visualfactory.h +++ b/src/qmmp/visualfactory.h diff --git a/src/qmmpui/general.cpp b/src/qmmpui/general.cpp new file mode 100644 index 000000000..aebd06647 --- /dev/null +++ b/src/qmmpui/general.cpp @@ -0,0 +1,157 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QtGui> +#include <QObject> +#include <QList> +#include <QApplication> + +#include "config.h" +#include "general.h" + + +static QList<GeneralFactory*> *factories = 0; +static QStringList files; + +static void checkFactories() +{ + if (! factories) + { + files.clear(); + factories = new QList<GeneralFactory *>; + + QDir pluginsDir (qApp->applicationDirPath()); + pluginsDir.cdUp(); + pluginsDir.cd("./"LIB_DIR"/qmmp/General"); + foreach (QString fileName, pluginsDir.entryList(QDir::Files)) + { + QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); + QObject *plugin = loader.instance(); + if (loader.isLoaded()) + { + qDebug("General: plugin loaded - %s", qPrintable(fileName)); + } + GeneralFactory *factory = 0; + if (plugin) + factory = qobject_cast<GeneralFactory *>(plugin); + + if (factory) + { + factories->append(factory); + files << pluginsDir.absoluteFilePath(fileName); + } + } + } +} + +General::General(QObject *parent) + : QObject(parent) +{ +} + + +General::~General() +{ +} + +void General::setState(const uint&) +{} + +void General::setSongInfo(const SongInfo &song) +{} + + +QList<GeneralFactory*> *General::generalFactories() +{ + checkFactories(); + return factories; +} + +QStringList General::generalFiles() +{ + checkFactories(); + return files; +} + +void General::setEnabled(GeneralFactory* factory, bool enable) +{ + checkFactories(); + if(!factories->contains(factory)) + return; + + QString name = files.at(factories->indexOf(factory)).section('/',-1); + QSettings settings ( QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat ); + QStringList genList = settings.value("General/plugin_files").toStringList(); + + if(enable) + { + if (!genList.contains(name)) + genList << name; + } + else + genList.removeAll(name); + settings.setValue("General/plugin_files", genList); +} + +bool General::isEnabled(GeneralFactory* factory) +{ + checkFactories(); + if(!factories->contains(factory)) + return FALSE; + QString name = files.at(factories->indexOf(factory)).section('/',-1); + QSettings settings ( QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat ); + QStringList genList = settings.value("General/plugin_files").toStringList(); + return genList.contains(name); +} + +void General::play() +{ + emit commandCalled(Play); +} + +void General::pause() +{ + emit commandCalled(Pause); +} + +void General::stop() +{ + emit commandCalled(Stop); +} + +void General::next() +{ + emit commandCalled(Next); +} + +void General::previous() +{ + emit commandCalled(Previous); +} + +void General::exit() +{ + emit commandCalled(Exit); +} + +void General::toggleVisibility() +{ + emit commandCalled(ToggleVisibility); +} diff --git a/src/qmmpui/general.h b/src/qmmpui/general.h new file mode 100644 index 000000000..a7cc0e142 --- /dev/null +++ b/src/qmmpui/general.h @@ -0,0 +1,86 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef GENERAL_H +#define GENERAL_H + +#include <QObject> +#include <QStringList> +#include <QMap> + +#include "songinfo.h" +#include "generalfactory.h" + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class General : public QObject +{ + Q_OBJECT +public: + General(QObject *parent = 0); + + ~General(); + + enum State + { + Playing = 0, + Paused, + Stopped + }; + + enum Command + { + Play = 0, + Stop, + Pause, + Previous, + Next, + Exit, + ToggleVisibility + }; + + virtual void setState(const uint &state); + virtual void setSongInfo(const SongInfo &song); + + //static methods + static QList<GeneralFactory*> *generalFactories(); + static QStringList generalFiles(); + static void setEnabled(GeneralFactory* factory, bool enable = TRUE); + static bool isEnabled(GeneralFactory* factory); + +signals: + void commandCalled(uint command); + +public slots: + void play(); + void pause(); + void stop(); + void next(); + void previous(); + void exit(); + void toggleVisibility(); + +private: + QMap <uint, QString> m_strValues; + QMap <uint, uint> m_numValues; + +}; + +#endif diff --git a/src/qmmpui/generalfactory.h b/src/qmmpui/generalfactory.h new file mode 100644 index 000000000..3038b597c --- /dev/null +++ b/src/qmmpui/generalfactory.h @@ -0,0 +1,52 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef GENERALFACTORY_H +#define GENERALFACTORY_H + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class QObject; +class QTranslator; + +class General; + +struct GeneralProperties +{ + QString name; + bool hasAbout; + bool hasSettings; +}; + +class GeneralFactory +{ +public: + virtual ~GeneralFactory() {} + virtual const GeneralProperties properties() const = 0; + virtual General *create(QObject *parent) = 0; + virtual void showSettings(QWidget *parent) = 0; + virtual void showAbout(QWidget *parent) = 0; + virtual QTranslator *createTranslator(QObject *parent) = 0; +}; + +Q_DECLARE_INTERFACE(GeneralFactory, "GeneralFactory/1.0"); + + +#endif diff --git a/src/qmmpui/generalhandler.cpp b/src/qmmpui/generalhandler.cpp new file mode 100644 index 000000000..dc29f281a --- /dev/null +++ b/src/qmmpui/generalhandler.cpp @@ -0,0 +1,143 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "general.h" +#include "generalfactory.h" + +#include "generalhandler.h" + +GeneralHandler *GeneralHandler::m_instance = 0; + +GeneralHandler::GeneralHandler(QObject *parent) + : QObject(parent) +{ + m_instance = this; + m_state = General::Stopped; + GeneralFactory* factory; + foreach(factory, *General::generalFactories()) + { + if (General::isEnabled(factory)) + { + General *general = factory->create(parent); + connect(general, SIGNAL(commandCalled(uint)), SLOT(processCommand(uint))); + m_generals.append(general); + } + } +} + +GeneralHandler::~GeneralHandler() +{} + +void GeneralHandler::setState(uint state) +{ + if (state == m_state) + return; + m_state = state; + General *general; + if (state == General::Stopped) + m_songInfo.clear(); + + foreach(general, m_generals) + { + general->setState(state); + } +} + +void GeneralHandler::setSongInfo(const SongInfo &info) +{ + if (m_state == General::Stopped) + return; + if (m_songInfo != info) + { + m_songInfo = info; + General *general; + foreach(general, m_generals) + { + general->setSongInfo(m_songInfo); + } + } +} + +void GeneralHandler::updateConfig() +{ + while (!m_generals.isEmpty()) + delete m_generals.takeFirst(); + + GeneralFactory* factory; + foreach(factory, *General::generalFactories()) + { + if (General::isEnabled(factory)) + { + General *general = factory->create(parent()); + connect(general, SIGNAL(commandCalled(uint)), SLOT(processCommand(uint))); + m_generals.append(general); + general->setState(m_state); + if (m_state != General::Stopped) + general->setSongInfo(m_songInfo); + } + } +} + +GeneralHandler* GeneralHandler::instance() +{ + return m_instance; +} + +void GeneralHandler::processCommand(uint command) +{ + switch ((uint) command) + { + case General::Play: + { + emit playCalled(); + break; + } + case General::Stop: + { + emit stopCalled(); + break; + } + case General::Pause: + { + emit pauseCalled(); + break; + } + case General::Previous: + { + emit previousCalled(); + break; + } + case General::Next: + { + emit nextCalled(); + break; + } + case General::Exit: + { + emit exitCalled(); + break; + } + case General::ToggleVisibility: + { + emit toggleVisibilityCalled(); + break; + } + } +} diff --git a/src/qmmpui/generalhandler.h b/src/qmmpui/generalhandler.h new file mode 100644 index 000000000..308a0a694 --- /dev/null +++ b/src/qmmpui/generalhandler.h @@ -0,0 +1,69 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef GENERALHANDLER_H +#define GENERALHANDLER_H + +#include <QObject> + +#include "songinfo.h" + +class General; +class GeneralFactory; + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class GeneralHandler : public QObject +{ + Q_OBJECT +public: + GeneralHandler(QObject *parent = 0); + + ~GeneralHandler(); + + void setSongInfo(const SongInfo &info); + void updateConfig(); + static GeneralHandler* instance(); + +signals: + void playCalled(); + void pauseCalled(); + void stopCalled(); + void nextCalled(); + void previousCalled(); + void exitCalled(); + void toggleVisibilityCalled(); + +public slots: + void setState(uint state); + +private slots: + void processCommand(uint command); + +private: + void connectSignals(General*); + QList <General*> m_generals; + SongInfo m_songInfo; + uint m_state; + static GeneralHandler* m_instance; + +}; + +#endif diff --git a/src/qmmpui/qmmpui.pro b/src/qmmpui/qmmpui.pro new file mode 100644 index 000000000..88c60a0da --- /dev/null +++ b/src/qmmpui/qmmpui.pro @@ -0,0 +1,38 @@ +include(../../qmmp.pri) + +TARGET = ../../lib/qmmpui +CONFIG += release \ +warn_on \ +qt \ +thread + +TEMPLATE = lib + + +isEmpty(LIB_DIR){ + LIB_DIR = /lib +} + +unix { + LINE1 = $$sprintf(echo \"%1ifndef CONFIG_H\" > ./config.h, $$LITERAL_HASH) + LINE2 = $$sprintf(echo \"%1define CONFIG_H\" >> ./config.h, $$LITERAL_HASH) + LINE3 = $$sprintf(echo \"%1define LIB_DIR \\\"%2\\\"\" >> ./config.h, $$LITERAL_HASH, $$LIB_DIR) + LINE4 = $$sprintf(echo \"%1endif\" >> ./config.h, $$LITERAL_HASH) + system($$LINE1) + system($$LINE2) + system($$LINE3) + system($$LINE4) + QMAKE_CLEAN = ./config.h +} + + +target.path = $$LIB_DIR +INSTALLS += target +HEADERS += general.h \ +generalfactory.h \ + generalhandler.h \ + songinfo.h +SOURCES += general.cpp \ + generalhandler.cpp \ + songinfo.cpp + diff --git a/src/qmmpui/songinfo.cpp b/src/qmmpui/songinfo.cpp new file mode 100644 index 000000000..6fa1e831e --- /dev/null +++ b/src/qmmpui/songinfo.cpp @@ -0,0 +1,137 @@ +/*************************************************************************** + * Copyright (C) 2007 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#include "songinfo.h" + +SongInfo::SongInfo() +{} + +SongInfo::SongInfo(const SongInfo &other) +{ + *this = other; +} + +SongInfo::~SongInfo() +{} + +void SongInfo::operator=(const SongInfo &info) +{ + setValue(TITLE,info.title ()); + setValue(ARTIST,info.artist ()); + setValue(ALBUM,info.album ()); + setValue(COMMENT,info.comment ()); + setValue(GENRE,info.genre ()); + setValue(YEAR,info.year ()); + setValue(TRACK,info.track ()); + setValue(LENGTH,info.length ()); + setValue(STREAM,info.isStream()); +} + +bool SongInfo::operator==(const SongInfo &info) +{ + return title() == info.title() && + artist() == info.artist() && + album() == info.album() && + comment() == info.comment() && + genre() == info.genre() && + track() == info.track() && + year() == info.year() && + isStream() == info.isStream(); +} + +bool SongInfo::operator!=(const SongInfo &info) +{ + return !operator==(info); +} + +void SongInfo::setValue(uint name, const QString &value) +{ + if (!value.isEmpty()) + m_strValues.insert (name, value); +} + +void SongInfo::setValue(uint name, const uint &value) +{ + if (value > 0) + m_numValues.insert (name, value); +} + +void SongInfo::setValue(uint name, const bool &value) +{ + if(name == STREAM) + m_stream = value; +} + +const QString SongInfo::title () const +{ + return m_strValues[TITLE]; +} + +const QString SongInfo::artist () const +{ + return m_strValues[ARTIST]; +} + +const QString SongInfo::album () const +{ + return m_strValues[ALBUM]; +} + +const QString SongInfo::comment () const +{ + return m_strValues[COMMENT]; +} + +const QString SongInfo::genre () const +{ + return m_strValues[GENRE]; +} + +const uint SongInfo::year () const +{ + return m_numValues[YEAR]; +} + +const uint SongInfo::track () const +{ + return m_numValues[TRACK]; +} + +const uint SongInfo::length () const +{ + return m_numValues[LENGTH]; +} + +const bool SongInfo::isEmpty () const +{ + return m_strValues.isEmpty(); +} + +void SongInfo::clear () +{ + m_strValues.clear(); + m_numValues.clear(); + m_stream = FALSE; +} + +const bool SongInfo::isStream () const +{ + return m_stream; +} + diff --git a/src/qmmpui/songinfo.h b/src/qmmpui/songinfo.h new file mode 100644 index 000000000..7bc43381d --- /dev/null +++ b/src/qmmpui/songinfo.h @@ -0,0 +1,76 @@ +/*************************************************************************** + * Copyright (C) 2007 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SONGINFO_H +#define SONGINFO_H + +#include <QMap> +#include <QString> + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ + +class SongInfo{ +public: + public: + SongInfo(); + SongInfo(const SongInfo &other); + + ~SongInfo(); + + enum Type + { + TITLE = 0, + ARTIST, + ALBUM, + COMMENT, + GENRE, + YEAR, + TRACK, + LENGTH, + STREAM + }; + + void operator=(const SongInfo &info); + bool operator==(const SongInfo &info); + bool operator!=(const SongInfo &info); + void setValue(uint name, const QString &value); + void setValue(uint name, const uint &value); + void setValue(uint name, const bool &value); + const QString title () const; + const QString artist () const; + const QString album () const; + const QString comment () const; + const QString genre () const; + const uint year () const; + const uint track () const; + const uint length () const; + const bool isEmpty () const; + const bool isStream () const; + void clear(); + +private: + QMap <uint, QString> m_strValues; + QMap <uint, uint> m_numValues; + bool m_stream; + +}; + +#endif diff --git a/src/aboutdialog.cpp b/src/ui/aboutdialog.cpp index a8b80e6cd..a8b80e6cd 100644 --- a/src/aboutdialog.cpp +++ b/src/ui/aboutdialog.cpp diff --git a/src/aboutdialog.h b/src/ui/aboutdialog.h index 10dcde4a5..10dcde4a5 100644 --- a/src/aboutdialog.h +++ b/src/ui/aboutdialog.h diff --git a/src/addurldialog.cpp b/src/ui/addurldialog.cpp index 6746a2de1..6746a2de1 100644 --- a/src/addurldialog.cpp +++ b/src/ui/addurldialog.cpp diff --git a/src/addurldialog.h b/src/ui/addurldialog.h index 86a065703..86a065703 100644 --- a/src/addurldialog.h +++ b/src/ui/addurldialog.h diff --git a/src/balancebar.cpp b/src/ui/balancebar.cpp index 3089e0cbd..3089e0cbd 100644 --- a/src/balancebar.cpp +++ b/src/ui/balancebar.cpp diff --git a/src/balancebar.h b/src/ui/balancebar.h index 6704671f9..6704671f9 100644 --- a/src/balancebar.h +++ b/src/ui/balancebar.h diff --git a/src/button.cpp b/src/ui/button.cpp index 8bd006ed3..8bd006ed3 100644 --- a/src/button.cpp +++ b/src/ui/button.cpp diff --git a/src/button.h b/src/ui/button.h index 7f2d8f314..7f2d8f314 100644 --- a/src/button.h +++ b/src/ui/button.h diff --git a/src/ui/commandlineoption.cpp b/src/ui/commandlineoption.cpp new file mode 100644 index 000000000..ca9e8d398 --- /dev/null +++ b/src/ui/commandlineoption.cpp @@ -0,0 +1,216 @@ +/*************************************************************************** + * Copyright (C) 2007 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QDir> +#include <QPluginLoader> + +#include "commandlineoption.h" +#include "mainwindow.h" +#include <soundcore.h> + + +// Command option manager methods +CommandLineOptionManager::CommandLineOptionManager() +{ + this->registerBuiltingCommandLineOptions(); + this->registerExternalCommandLineOptions(); +} + +bool CommandLineOptionManager::hasOption(const QString &opt) +{ + for(int i = 0; i < m_options.count(); i++) + { + if(m_options[i]->identify(opt)) + { + return true; + } + } + return false; +} + +void CommandLineOptionManager::executeCommand(const QString &opt, MainWindow *mw) +{ + for(int i = 0; i < m_options.count(); i++) + { + if(m_options[i]->identify(opt)) + { + m_options[i]->executeCommand(opt,mw); + } + } +} + +CommandLineOption * CommandLineOptionManager::operator [](int index) +{ + return m_options[index]; +} + +int CommandLineOptionManager::count() const +{ + return m_options.count(); +} + + +void CommandLineOptionManager::registerBuiltingCommandLineOptions() +{ + m_options.append(new BuiltinCommandLineOption()); +} + + +void CommandLineOptionManager::registerExternalCommandLineOptions() +{ + QDir pluginsDir (QDir::homePath()+"/.qmmp/plugins/CommandLineOptions"); + foreach (QString fileName, pluginsDir.entryList(QDir::Files)) + { + QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); + QObject *plugin = loader.instance(); + if (loader.isLoaded()) + qDebug("CommandLineOption: plugin loaded - %s", qPrintable(fileName)); + else + qWarning(qPrintable(loader.errorString())); + + CommandLineOption *cmd_option = 0; + if (plugin) + cmd_option = qobject_cast<CommandLineOption *>(plugin); + + if (cmd_option) + { + foreach(CommandLineOption* opt,m_options) + { + if (opt->name() == cmd_option->name()) + { + qDebug("CommandLineOption: Plugin with name %s is already registered...", + qPrintable(cmd_option->name())); + return; + } + } + m_options.append(cmd_option); + } + } +} + +/////////////////////////////////////////////////////////////////// + + +// BuiltinCommandLineOption methods implementation +bool BuiltinCommandLineOption::identify(const QString & str) const +{ + if( + str == QString("--help") || + str == QString("--next") || + str == QString("--previous") || + str == QString("--play") || + str == QString("--pause") || + str == QString("--play-pause") || + str == QString("--stop") || + str.startsWith("--volume") || + str.startsWith("--jump-to-file") || + str.startsWith("--toggle-visibility") || + str.startsWith("--add-file") + ) + { + return TRUE; + } + + return FALSE; +} + +const QString BuiltinCommandLineOption::helpString() const +{ + return QString( + "--next Skip forward in playlist\n" + "--previous Skip backwards in playlist\n" + "--play Start playing current song\n" + "--pause Pause current song\n" + "--play-pause Pause if playing, play otherwise\n" + "--stop Stop current song\n" + "--next Skip forward in playlist\n" + "--volume Set playback volume(example: qmmp --volume20, qmmp --volume100)\n" + "--jump-to-file Display Jump to File dialog\n" + "--toggle-visibility Show/hide application\n" + "--add-file Display Add File dialog" + ); +} + +void BuiltinCommandLineOption::executeCommand(const QString & option_string, MainWindow *mw) +{ + if (option_string == "--play") + { + mw->play(); + } + else if (option_string == "--stop") + { + mw->stop(); + mw->mainDisplay()->hideTimeDisplay(); + } + else if (option_string == "--pause") + { + mw->pause(); + } + else if (option_string == "--next") + { + mw->next(); + if(!mw->soundCore()->isInitialized()) + mw->play(); + } + else if (option_string == "--previous") + { + mw->previous(); + if(!mw->soundCore()->isInitialized()) + mw->play(); + } + else if (option_string == "--play-pause") + { + mw->playPause(); + } + else if (option_string == "--jump-to-file") + { + mw->jumpToFile(); + } + else if (option_string == "--toggle-visibility") + { + mw->toggleVisibility(); + } + else if (option_string == "--add-file") + { + mw->addFile(); + } + else if (option_string.startsWith("--volume")) + { + QString vol_str(option_string); + vol_str.remove("--volume"); + bool ok = FALSE; + int volume = vol_str.toUInt(&ok); + if(ok) + { + mw->soundCore()->setVolume(volume,volume); + } + } +} + +const QString BuiltinCommandLineOption::name() const +{ + return "BuiltinCommandLineOption"; +} + + + + + + diff --git a/src/ui/commandlineoption.h b/src/ui/commandlineoption.h new file mode 100644 index 000000000..f5bc78ecf --- /dev/null +++ b/src/ui/commandlineoption.h @@ -0,0 +1,94 @@ +/*************************************************************************** + * Copyright (C) 2007 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef CommandLineOption_H +#define CommandLineOption_H + +#include <QtPlugin> +#include <QString> +#include <QList> + +class MainWindow; + +/** + @author Vladimir Kuznetsov <vovanec@gmail.ru> + */ +class CommandLineOption +{ +public: + /*! + * Returns \b true if \b opt_str string can be processed, + * otherise \b false + */ + virtual bool identify(const QString& opt_str)const = 0; + + /*! + * Command line option name + */ + virtual const QString name()const = 0; + + /*! + * Help string. + */ + virtual const QString helpString()const = 0; + + /*! + * Parses \b opt_str args(if needed), executes command. + */ + virtual void executeCommand(const QString& opt_str,MainWindow* mw) = 0; + virtual ~CommandLineOption(){;} +}; + +Q_DECLARE_INTERFACE(CommandLineOption,"CommandLineOptionInterface/1.0"); + + + +typedef QList<CommandLineOption*> CommandLineOptionList; + +class CommandLineOptionManager +{ +public: + CommandLineOptionManager(); + bool hasOption(const QString& ); + void executeCommand(const QString&,MainWindow* = NULL); + CommandLineOption* operator[](int); + int count()const; +protected: + void registerBuiltingCommandLineOptions(); + void registerExternalCommandLineOptions(); +private: + void _register(CommandLineOption*); +private: + CommandLineOptionList m_options; +}; + +/*! + * Represens command line option handling for standard operations. + */ +class BuiltinCommandLineOption : public CommandLineOption +{ + virtual bool identify(const QString& str)const; + virtual const QString helpString()const; + virtual void executeCommand(const QString& option,MainWindow* = NULL); + virtual const QString name()const; + virtual ~BuiltinCommandLineOption(){;} +}; + +#endif diff --git a/src/configdialog.cpp b/src/ui/configdialog.cpp index 958453a27..808c1ac94 100644 --- a/src/configdialog.cpp +++ b/src/ui/configdialog.cpp @@ -33,6 +33,9 @@ #include <visualfactory.h> #include <effectfactory.h> #include <effect.h> +#include <qmmpui/generalfactory.h> +#include <qmmpui/general.h> + #include "skin.h" #include "filedialog.h" @@ -85,22 +88,6 @@ void ConfigDialog::readSettings() settings.value ( "PlayList/title_format", "%p - %t").toString()); ui.metadataCheckBox->setChecked( settings.value ( "PlayList/load_metadata", TRUE).toBool()); - ui.trayCheckBox->setChecked( - settings.value("Tray/enabled",TRUE).toBool()); - ui.messageCheckBox->setChecked( - settings.value("Tray/show_message",TRUE).toBool()); - ui.messageDelaySpinBox->setValue(settings.value("Tray/message_delay", - 2000).toInt()); - ui.messageCheckBox->setEnabled(ui.trayCheckBox->isChecked()); - ui.messageDelaySpinBox->setEnabled(ui.trayCheckBox->isChecked() || - ui.messageCheckBox->isChecked() ); - ui.toolTipCheckBox->setEnabled(ui.trayCheckBox->isChecked()); - ui.toolTipCheckBox->setChecked( - settings.value("Tray/show_tooltip",FALSE).toBool()); - - ui.hideToTrayRadioButton->setChecked(settings.value("Tray/hide_on_close", FALSE).toBool()); - ui.closeGroupBox->setEnabled(ui.trayCheckBox->isChecked()); - QString f_dialogName = settings.value("FileDialog",QtFileDialogFactory::QtFileDialogFactoryName).toString(); @@ -125,6 +112,8 @@ void ConfigDialog::readSettings() ui.portLineEdit->setEnabled(ui.enableProxyCheckBox->isChecked()); ui.proxyUserLineEdit->setEnabled(ui.authProxyCheckBox->isChecked()); ui.proxyPasswLineEdit->setEnabled(ui.authProxyCheckBox->isChecked()); + + ui.softVolumeCheckBox->setChecked(settings.value("Volume/software_volume", FALSE).toBool()); } void ConfigDialog::changePage ( QListWidgetItem *current, QListWidgetItem *previous ) @@ -155,6 +144,7 @@ void ConfigDialog::loadSkins() findSkins(QDir::homePath() +"/.qmmp/skins"); findSkins(QDir::homePath() +"/.qmmp/cache/skins"); + findSkins(qApp->applicationDirPath()+"/../share/qmmp/skins"); connect ( ui.listWidget, SIGNAL ( itemClicked ( QListWidgetItem* ) ), this, SLOT ( changeSkin() ) ); } @@ -202,6 +192,8 @@ void ConfigDialog::loadPluginsInfo() ui.inputPluginTable->setItem ( i,1, new QTableWidgetItem (item->factory()->properties().name) ); ui.inputPluginTable->setItem ( i,2, new QTableWidgetItem (files.at (i)) ); + ui.inputPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + ui.inputPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); } ui.inputPluginTable->resizeColumnToContents ( 0 ); ui.inputPluginTable->resizeColumnToContents ( 1 ); @@ -227,8 +219,10 @@ void ConfigDialog::loadPluginsInfo() button->setChecked ( item->isSelected() ); ui.outputPluginTable->setCellWidget ( i, 0, button ); ui.outputPluginTable->setItem (i,1, - new QTableWidgetItem (item->factory()->name())); + new QTableWidgetItem (item->factory()->properties().name)); ui.outputPluginTable->setItem (i,2, new QTableWidgetItem (files.at(i))); + ui.outputPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + ui.outputPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); } ui.outputPluginTable->resizeColumnToContents ( 0 ); @@ -257,6 +251,8 @@ void ConfigDialog::loadPluginsInfo() ui.visualPluginTable->setItem (i,1, new QTableWidgetItem (item->factory()->properties().name)); ui.visualPluginTable->setItem (i,2, new QTableWidgetItem (files.at(i))); + ui.visualPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + ui.visualPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); } ui.visualPluginTable->resizeColumnToContents ( 0 ); @@ -286,11 +282,44 @@ void ConfigDialog::loadPluginsInfo() ui.effectPluginTable->setItem (i,1, new QTableWidgetItem (item->factory()->properties().name)); ui.effectPluginTable->setItem (i,2, new QTableWidgetItem (files.at(i))); + ui.effectPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + ui.effectPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); } ui.effectPluginTable->resizeColumnToContents ( 0 ); ui.effectPluginTable->resizeColumnToContents ( 1 ); ui.effectPluginTable->resizeRowsToContents (); + + /* + load general plugin information + */ + QList <GeneralFactory *> *generals = 0; + generals = General::generalFactories(); + files = General::generalFiles(); + ui.generalPluginTable->setColumnCount ( 3 ); + ui.generalPluginTable->verticalHeader()->hide(); + ui.generalPluginTable->setHorizontalHeaderLabels ( QStringList() + << tr ( "Enabled" ) << tr ( "Description" ) << tr ( "Filename" ) ); + ui.generalPluginTable->setRowCount ( generals->count () ); + + for ( int i = 0; i < generals->count (); ++i ) + { + GeneralPluginItem *item = new GeneralPluginItem(this,generals->at(i),files.at(i)); + m_generalPluginItems.append(item); + QCheckBox* button = new QCheckBox (ui.generalPluginTable); + connect(button, SIGNAL(clicked (bool)), item, SLOT(select(bool))); + button->setChecked (item->isSelected()); + ui.generalPluginTable->setCellWidget ( i, 0, button ); + ui.generalPluginTable->setItem (i,1, + new QTableWidgetItem (item->factory()->properties().name)); + ui.generalPluginTable->setItem (i,2, new QTableWidgetItem (files.at(i))); + ui.generalPluginTable->item(i,1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + ui.generalPluginTable->item(i,2)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + } + + ui.generalPluginTable->resizeColumnToContents ( 0 ); + ui.generalPluginTable->resizeColumnToContents ( 1 ); + ui.generalPluginTable->resizeRowsToContents (); } @@ -375,6 +404,14 @@ void ConfigDialog::showPluginSettings() m_effectPluginItems.at(row)->factory()->showSettings ( this ); break; } + case 4: + { + int row = ui.generalPluginTable->currentRow (); + if ( m_generalPluginItems.isEmpty() || row < 0 ) + return; + m_generalPluginItems.at(row)->factory()->showSettings ( this ); + break; + } } } @@ -417,6 +454,14 @@ void ConfigDialog::showPluginInfo() m_effectPluginItems.at(row)->factory()->showAbout ( this ); break; } + case 4: + { + int row = ui.generalPluginTable->currentRow (); + if ( m_generalPluginItems.isEmpty() || row < 0 ) + return; + m_generalPluginItems.at(row)->factory()->showAbout ( this ); + break; + } } } @@ -452,12 +497,6 @@ void ConfigDialog::saveSettings() QSettings settings (QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat); settings.setValue ("PlayList/title_format", ui.formatLineEdit->text()); settings.setValue ("PlayList/load_metadata", ui.metadataCheckBox->isChecked()); - settings.setValue ("MainWindow/tray_enabled", ui.trayCheckBox->isChecked()); - settings.setValue ("Tray/enabled", ui.trayCheckBox->isChecked()); - settings.setValue ("Tray/show_message", ui.messageCheckBox->isChecked()); - settings.setValue ("Tray/message_delay", ui.messageDelaySpinBox->value()); - settings.setValue ("Tray/show_tooltip", ui.toolTipCheckBox->isChecked()); - settings.setValue ("Tray/hide_on_close",ui.hideToTrayRadioButton->isChecked()); settings.setValue ("FileDialog", ui.fileDialogComboBox->currentText()); settings.setValue ("Proxy/use_proxy", ui.enableProxyCheckBox->isChecked()); settings.setValue ("Proxy/authentication", ui.authProxyCheckBox->isChecked()); @@ -465,5 +504,6 @@ void ConfigDialog::saveSettings() settings.setValue ("Proxy/port",ui.portLineEdit->text()); settings.setValue ("Proxy/user",ui.proxyUserLineEdit->text()); settings.setValue ("Proxy/passw",ui.proxyPasswLineEdit->text()); + settings.setValue ("Volume/software_volume", ui.softVolumeCheckBox->isChecked()); } diff --git a/src/configdialog.h b/src/ui/configdialog.h index a5c632cc6..7b9b1fab2 100644 --- a/src/configdialog.h +++ b/src/ui/configdialog.h @@ -36,6 +36,7 @@ class InputPluginItem; class OutputPluginItem; class VisualPluginItem; class EffectPluginItem; +class GeneralPluginItem; class ConfigDialog : public QDialog { @@ -73,6 +74,7 @@ private: QList <OutputPluginItem*> m_outputPluginItems; QList <VisualPluginItem*> m_visualPluginItems; QList <EffectPluginItem*> m_effectPluginItems; + QList <GeneralPluginItem*> m_generalPluginItems; }; #endif diff --git a/src/default/balance.png b/src/ui/default/balance.png Binary files differindex 5fa10cce8..5fa10cce8 100644 --- a/src/default/balance.png +++ b/src/ui/default/balance.png diff --git a/src/default/cbuttons.png b/src/ui/default/cbuttons.png Binary files differindex 7a1369b59..7a1369b59 100644 --- a/src/default/cbuttons.png +++ b/src/ui/default/cbuttons.png diff --git a/src/default/eq_ex.png b/src/ui/default/eq_ex.png Binary files differindex 974004590..974004590 100644 --- a/src/default/eq_ex.png +++ b/src/ui/default/eq_ex.png diff --git a/src/default/eqmain.png b/src/ui/default/eqmain.png Binary files differindex b28b818de..b28b818de 100644 --- a/src/default/eqmain.png +++ b/src/ui/default/eqmain.png diff --git a/src/default/main.png b/src/ui/default/main.png Binary files differindex 6b7c8597a..6b7c8597a 100644 --- a/src/default/main.png +++ b/src/ui/default/main.png diff --git a/src/default/monoster.png b/src/ui/default/monoster.png Binary files differindex 7ddb9d0e5..7ddb9d0e5 100644 --- a/src/default/monoster.png +++ b/src/ui/default/monoster.png diff --git a/src/default/numbers.png b/src/ui/default/numbers.png Binary files differindex 46f1e1f63..46f1e1f63 100644 --- a/src/default/numbers.png +++ b/src/ui/default/numbers.png diff --git a/src/default/playpaus.png b/src/ui/default/playpaus.png Binary files differindex 0cfbd6835..0cfbd6835 100644 --- a/src/default/playpaus.png +++ b/src/ui/default/playpaus.png diff --git a/src/default/pledit.png b/src/ui/default/pledit.png Binary files differindex 3c2943cea..3c2943cea 100644 --- a/src/default/pledit.png +++ b/src/ui/default/pledit.png diff --git a/src/default/pledit.txt b/src/ui/default/pledit.txt index 5435dd2fd..549a81ad1 100644 --- a/src/default/pledit.txt +++ b/src/ui/default/pledit.txt @@ -1,6 +1,6 @@ [Text]
Normal=#C0C0C0
Current=#8080FF
-NormalBG=#400080
+NormalBG=#000080
SelectedBG=#408080
Font=Tahoma Bold
\ No newline at end of file diff --git a/src/default/posbar.png b/src/ui/default/posbar.png Binary files differindex 271106557..271106557 100644 --- a/src/default/posbar.png +++ b/src/ui/default/posbar.png diff --git a/src/default/shufrep.png b/src/ui/default/shufrep.png Binary files differindex 107fd50bb..107fd50bb 100644 --- a/src/default/shufrep.png +++ b/src/ui/default/shufrep.png diff --git a/src/default/text.png b/src/ui/default/text.png Binary files differindex d37241405..d37241405 100644 --- a/src/default/text.png +++ b/src/ui/default/text.png diff --git a/src/default/titlebar.png b/src/ui/default/titlebar.png Binary files differindex c1e7818cd..c1e7818cd 100644 --- a/src/default/titlebar.png +++ b/src/ui/default/titlebar.png diff --git a/src/default/viscolor.txt b/src/ui/default/viscolor.txt index 65490ebb6..9fbb3f64d 100644 --- a/src/default/viscolor.txt +++ b/src/ui/default/viscolor.txt @@ -21,4 +21,4 @@ 135,165,195
119,153,187
87,129,171
-87,179,160 +114,223,229 diff --git a/src/default/volume.png b/src/ui/default/volume.png Binary files differindex b4f457453..b4f457453 100644 --- a/src/default/volume.png +++ b/src/ui/default/volume.png diff --git a/src/display.cpp b/src/ui/display.cpp index d2cce8165..d2cce8165 100644 --- a/src/display.cpp +++ b/src/ui/display.cpp diff --git a/src/display.h b/src/ui/display.h index 15e0111d6..15e0111d6 100644 --- a/src/display.h +++ b/src/ui/display.h diff --git a/src/dock.cpp b/src/ui/dock.cpp index 2a755a9b9..2a755a9b9 100644 --- a/src/dock.cpp +++ b/src/ui/dock.cpp diff --git a/src/dock.h b/src/ui/dock.h index b4b62dda2..b4b62dda2 100644 --- a/src/dock.h +++ b/src/ui/dock.h diff --git a/src/eqgraph.cpp b/src/ui/eqgraph.cpp index 314e504d9..314e504d9 100644 --- a/src/eqgraph.cpp +++ b/src/ui/eqgraph.cpp diff --git a/src/eqgraph.h b/src/ui/eqgraph.h index 4f6bf1882..4f6bf1882 100644 --- a/src/eqgraph.h +++ b/src/ui/eqgraph.h diff --git a/src/eqpreset.cpp b/src/ui/eqpreset.cpp index 760dea9d2..760dea9d2 100644 --- a/src/eqpreset.cpp +++ b/src/ui/eqpreset.cpp diff --git a/src/eqpreset.h b/src/ui/eqpreset.h index 80f31747e..80f31747e 100644 --- a/src/eqpreset.h +++ b/src/ui/eqpreset.h diff --git a/src/eqslider.cpp b/src/ui/eqslider.cpp index bdc4ec4e2..bdc4ec4e2 100644 --- a/src/eqslider.cpp +++ b/src/ui/eqslider.cpp diff --git a/src/eqslider.h b/src/ui/eqslider.h index 54dc9f285..54dc9f285 100644 --- a/src/eqslider.h +++ b/src/ui/eqslider.h diff --git a/src/eqtitlebar.cpp b/src/ui/eqtitlebar.cpp index 5420831f8..5420831f8 100644 --- a/src/eqtitlebar.cpp +++ b/src/ui/eqtitlebar.cpp diff --git a/src/eqtitlebar.h b/src/ui/eqtitlebar.h index d3e9a0452..d3e9a0452 100644 --- a/src/eqtitlebar.h +++ b/src/ui/eqtitlebar.h diff --git a/src/eqwidget.cpp b/src/ui/eqwidget.cpp index d86ab45d2..d86ab45d2 100644 --- a/src/eqwidget.cpp +++ b/src/ui/eqwidget.cpp diff --git a/src/eqwidget.h b/src/ui/eqwidget.h index 94cd564d5..94cd564d5 100644 --- a/src/eqwidget.h +++ b/src/ui/eqwidget.h diff --git a/src/fft.c b/src/ui/fft.c index 7ca1978a5..7ca1978a5 100644 --- a/src/fft.c +++ b/src/ui/fft.c diff --git a/src/fft.h b/src/ui/fft.h index 431afa365..431afa365 100644 --- a/src/fft.h +++ b/src/ui/fft.h diff --git a/src/filedialog.cpp b/src/ui/filedialog.cpp index 29195acef..fb7ecbdaf 100644 --- a/src/filedialog.cpp +++ b/src/ui/filedialog.cpp @@ -26,9 +26,9 @@ bool FileDialog::isModal() return instance()->modal(); } + void FileDialog::init(QObject* o) { - qWarning("void FileDialog::init(QObject* o)"); if(!m_initialized && !instance()->modal()) { PlayListModel* model = NULL; @@ -130,7 +130,6 @@ void FileDialog::registerExternalFactories() foreach (QString fileName, pluginsDir.entryList(QDir::Files)) { - //qWarning("file dialog path: %s",qPrintable(fileName)); QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); QObject *plugin = loader.instance(); if (loader.isLoaded()) @@ -164,7 +163,6 @@ QString FileDialog::m_current_factory = QString(); FileDialog* FileDialog::instance() { - //qWarning("INSTANCE"); if(_instance && _instance->modal()) { delete _instance; @@ -188,13 +186,13 @@ FileDialog* FileDialog::instance() if(_instance) delete _instance; - qWarning("%s\t%s",qPrintable(m_current_factory),qPrintable(f_dialogName)); foreach(QString name,names) { if(name == f_dialogName) { _instance = factories[name]->create(); m_current_factory = f_dialogName; + break; } } @@ -204,7 +202,6 @@ FileDialog* FileDialog::instance() //else if(!_instance->modal()) //return _instance; // _instance->raise(); - return _instance; } @@ -241,9 +238,9 @@ QStringList FileDialog::registeredFactories() void FileDialog::popup(QObject* o,const QString& d,Mode m,const QStringList& f) { -// qWarning("void FileDialog::popup(QObject* o,const QString& d,Mode m,const QStringList& f)"); - instance()->init(o); - instance()->raise(d,m,f); + FileDialog* inst = instance(); + inst->init(o); + inst->raise(d,m,f); } diff --git a/src/filedialog.h b/src/ui/filedialog.h index 8e82e98b7..f8e6c4f93 100644 --- a/src/filedialog.h +++ b/src/ui/filedialog.h @@ -42,8 +42,8 @@ Q_OBJECT virtual QString saveFileName ( QWidget* , const QString& ,const QString& , const QString& , QString* ); virtual bool modal()const{ return TRUE;} virtual ~FileDialog(){;} - virtual void init(QObject*); - virtual void raise(const QString& = QString(),Mode = AddFiles,const QStringList& = QStringList()){;} + void init(QObject*); + virtual void raise(const QString& = QString(),Mode = AddFiles,const QStringList& = QStringList()){;} static bool registerFactory(FileDialogFactory*); public: diff --git a/src/fileloader.cpp b/src/ui/fileloader.cpp index fda8efdc1..fda8efdc1 100644 --- a/src/fileloader.cpp +++ b/src/ui/fileloader.cpp diff --git a/src/fileloader.h b/src/ui/fileloader.h index c23d1ed35..c23d1ed35 100644 --- a/src/fileloader.h +++ b/src/ui/fileloader.h diff --git a/src/aboutdialog.ui b/src/ui/forms/aboutdialog.ui index 56fbef9c5..56fbef9c5 100644 --- a/src/aboutdialog.ui +++ b/src/ui/forms/aboutdialog.ui diff --git a/src/addurldialog.ui b/src/ui/forms/addurldialog.ui index 46031b849..46031b849 100644 --- a/src/addurldialog.ui +++ b/src/ui/forms/addurldialog.ui diff --git a/src/configdialog.ui b/src/ui/forms/configdialog.ui index 1f6f45516..530786ab4 100644 --- a/src/configdialog.ui +++ b/src/ui/forms/configdialog.ui @@ -6,7 +6,7 @@ <x>0</x> <y>0</y> <width>601</width> - <height>375</height> + <height>409</height> </rect> </property> <property name="windowTitle" > @@ -77,6 +77,9 @@ <property name="resizeMode" > <enum>QListView::Adjust</enum> </property> + <property name="spacing" > + <number>2</number> + </property> <property name="viewMode" > <enum>QListView::ListMode</enum> </property> @@ -90,7 +93,7 @@ <bool>false</bool> </property> <property name="currentRow" > - <number>0</number> + <number>-1</number> </property> <item> <property name="text" > @@ -128,6 +131,9 @@ <property name="text" > <string>Connectivity</string> </property> + <property name="icon" > + <iconset resource="images/images.qrc" >:/network.png</iconset> + </property> </item> </widget> </item> @@ -575,6 +581,20 @@ </item> </layout> </widget> + <widget class="QWidget" name="tab_3" > + <attribute name="title" > + <string>General</string> + </attribute> + <layout class="QVBoxLayout" > + <item> + <widget class="QTableWidget" name="generalPluginTable" > + <property name="selectionBehavior" > + <enum>QAbstractItemView::SelectRows</enum> + </property> + </widget> + </item> + </layout> + </widget> <widget class="QWidget" name="fileDialogTab" > <attribute name="title" > <string>File Dialog</string> @@ -651,130 +671,16 @@ </widget> <widget class="QWidget" name="page_2" > <layout class="QVBoxLayout" > - <property name="spacing" > - <number>6</number> - </property> - <property name="leftMargin" > - <number>9</number> - </property> - <property name="topMargin" > - <number>9</number> - </property> - <property name="rightMargin" > - <number>9</number> - </property> - <property name="bottomMargin" > - <number>9</number> - </property> - <item> - <widget class="QGroupBox" name="groupBox_4" > - <property name="title" > - <string>Tray Icon</string> - </property> - <layout class="QGridLayout" > - <property name="leftMargin" > - <number>9</number> - </property> - <property name="topMargin" > - <number>9</number> - </property> - <property name="rightMargin" > - <number>9</number> - </property> - <property name="bottomMargin" > - <number>9</number> - </property> - <property name="horizontalSpacing" > - <number>6</number> - </property> - <property name="verticalSpacing" > - <number>6</number> - </property> - <item row="2" column="0" > - <widget class="QCheckBox" name="toolTipCheckBox" > - <property name="text" > - <string>Show tooltip</string> - </property> - </widget> - </item> - <item row="1" column="0" > - <widget class="QCheckBox" name="messageCheckBox" > - <property name="text" > - <string>Show message</string> - </property> - </widget> - </item> - <item row="3" column="1" > - <widget class="QSpinBox" name="messageDelaySpinBox" > - <property name="minimum" > - <number>100</number> - </property> - <property name="maximum" > - <number>10000</number> - </property> - <property name="singleStep" > - <number>100</number> - </property> - <property name="value" > - <number>1000</number> - </property> - </widget> - </item> - <item row="3" column="0" > - <widget class="QLabel" name="label_3" > - <property name="text" > - <string>Message delay, ms:</string> - </property> - <property name="alignment" > - <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="0" column="0" colspan="2" > - <widget class="QCheckBox" name="trayCheckBox" > - <property name="text" > - <string>Show tray icon</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> <item> - <widget class="QGroupBox" name="closeGroupBox" > + <widget class="QGroupBox" name="groupBox_6" > <property name="title" > - <string>Action On Close</string> + <string>Audio</string> </property> <layout class="QVBoxLayout" > - <property name="spacing" > - <number>6</number> - </property> - <property name="leftMargin" > - <number>9</number> - </property> - <property name="topMargin" > - <number>9</number> - </property> - <property name="rightMargin" > - <number>9</number> - </property> - <property name="bottomMargin" > - <number>9</number> - </property> <item> - <widget class="QRadioButton" name="hideToTrayRadioButton" > + <widget class="QCheckBox" name="softVolumeCheckBox" > <property name="text" > - <string>Hide to tray</string> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="quitRadioButton" > - <property name="text" > - <string>Quit</string> - </property> - <property name="checked" > - <bool>true</bool> + <string>Use software volume control</string> </property> </widget> </item> @@ -789,7 +695,7 @@ <property name="sizeHint" > <size> <width>20</width> - <height>40</height> + <height>251</height> </size> </property> </spacer> @@ -971,86 +877,6 @@ </hints> </connection> <connection> - <sender>trayCheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>toolTipCheckBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>550</x> - <y>64</y> - </hint> - <hint type="destinationlabel" > - <x>383</x> - <y>118</y> - </hint> - </hints> - </connection> - <connection> - <sender>trayCheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>messageDelaySpinBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>208</x> - <y>55</y> - </hint> - <hint type="destinationlabel" > - <x>469</x> - <y>148</y> - </hint> - </hints> - </connection> - <connection> - <sender>trayCheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>messageCheckBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>262</x> - <y>55</y> - </hint> - <hint type="destinationlabel" > - <x>258</x> - <y>76</y> - </hint> - </hints> - </connection> - <connection> - <sender>messageCheckBox</sender> - <signal>toggled(bool)</signal> - <receiver>messageDelaySpinBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>307</x> - <y>82</y> - </hint> - <hint type="destinationlabel" > - <x>469</x> - <y>148</y> - </hint> - </hints> - </connection> - <connection> - <sender>trayCheckBox</sender> - <signal>clicked(bool)</signal> - <receiver>closeGroupBox</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel" > - <x>376</x> - <y>56</y> - </hint> - <hint type="destinationlabel" > - <x>436</x> - <y>175</y> - </hint> - </hints> - </connection> - <connection> <sender>enableProxyCheckBox</sender> <signal>toggled(bool)</signal> <receiver>hostLineEdit</receiver> diff --git a/src/jumptotrackdialog.ui b/src/ui/forms/jumptotrackdialog.ui index 1418c54fd..1418c54fd 100644 --- a/src/jumptotrackdialog.ui +++ b/src/ui/forms/jumptotrackdialog.ui diff --git a/src/preseteditor.ui b/src/ui/forms/preseteditor.ui index 2f88d6d53..2f88d6d53 100644 --- a/src/preseteditor.ui +++ b/src/ui/forms/preseteditor.ui diff --git a/src/html/about_cs.html b/src/ui/html/about_cs.html index 84bd2b42a..84bd2b42a 100644 --- a/src/html/about_cs.html +++ b/src/ui/html/about_cs.html diff --git a/src/html/about_en.html b/src/ui/html/about_en.html index d03691cf6..d03691cf6 100644 --- a/src/html/about_en.html +++ b/src/ui/html/about_en.html diff --git a/src/html/about_ru.html b/src/ui/html/about_ru.html index 26e5b9906..26e5b9906 100644 --- a/src/html/about_ru.html +++ b/src/ui/html/about_ru.html diff --git a/src/html/about_zh_CN.html b/src/ui/html/about_zh_CN.html index eadc7f78d..eadc7f78d 100644 --- a/src/html/about_zh_CN.html +++ b/src/ui/html/about_zh_CN.html diff --git a/src/html/authors_cs.txt b/src/ui/html/authors_cs.txt index 89d585c24..89d585c24 100644 --- a/src/html/authors_cs.txt +++ b/src/ui/html/authors_cs.txt diff --git a/src/html/authors_en.txt b/src/ui/html/authors_en.txt index 6c11ebd5e..6c11ebd5e 100644 --- a/src/html/authors_en.txt +++ b/src/ui/html/authors_en.txt diff --git a/src/html/authors_ru.txt b/src/ui/html/authors_ru.txt index b95c3887e..b95c3887e 100644 --- a/src/html/authors_ru.txt +++ b/src/ui/html/authors_ru.txt diff --git a/src/html/authors_zh_CN.txt b/src/ui/html/authors_zh_CN.txt index f2d8892fd..f2d8892fd 100644 --- a/src/html/authors_zh_CN.txt +++ b/src/ui/html/authors_zh_CN.txt diff --git a/src/html/thanks_cs.txt b/src/ui/html/thanks_cs.txt index 9bc0388da..9bc0388da 100644 --- a/src/html/thanks_cs.txt +++ b/src/ui/html/thanks_cs.txt diff --git a/src/html/thanks_en.txt b/src/ui/html/thanks_en.txt index 3ed2fe5d5..3ed2fe5d5 100644 --- a/src/html/thanks_en.txt +++ b/src/ui/html/thanks_en.txt diff --git a/src/html/thanks_ru.txt b/src/ui/html/thanks_ru.txt index 79acc177d..79acc177d 100644 --- a/src/html/thanks_ru.txt +++ b/src/ui/html/thanks_ru.txt diff --git a/src/html/thanks_zh_CN.txt b/src/ui/html/thanks_zh_CN.txt index 505d05c72..505d05c72 100644 --- a/src/html/thanks_zh_CN.txt +++ b/src/ui/html/thanks_zh_CN.txt diff --git a/src/ui/images/advanced.png b/src/ui/images/advanced.png Binary files differnew file mode 100644 index 000000000..25efaf35b --- /dev/null +++ b/src/ui/images/advanced.png diff --git a/src/images/images.qrc b/src/ui/images/images.qrc index 8dcc2efe2..acc7c26f0 100644 --- a/src/images/images.qrc +++ b/src/ui/images/images.qrc @@ -1,14 +1,12 @@ <!DOCTYPE RCC> <RCC version="1.0"> <qresource> - <file>play.png</file> - <file>pause.png</file> - <file>stop.png</file> <file>qmmp.xpm</file> <file>interface.png</file> <file>playlist.png</file> <file>advanced.png</file> <file>plugins.png</file> + <file>network.png</file> <file>logo-qmmp.png</file> </qresource> </RCC> diff --git a/src/ui/images/interface.png b/src/ui/images/interface.png Binary files differnew file mode 100644 index 000000000..53174d71a --- /dev/null +++ b/src/ui/images/interface.png diff --git a/src/images/logo-qmmp.png b/src/ui/images/logo-qmmp.png Binary files differindex 7a4d6ded4..7a4d6ded4 100644 --- a/src/images/logo-qmmp.png +++ b/src/ui/images/logo-qmmp.png diff --git a/src/ui/images/network.png b/src/ui/images/network.png Binary files differnew file mode 100644 index 000000000..5f47a5fe1 --- /dev/null +++ b/src/ui/images/network.png diff --git a/src/ui/images/playlist.png b/src/ui/images/playlist.png Binary files differnew file mode 100644 index 000000000..99923dea9 --- /dev/null +++ b/src/ui/images/playlist.png diff --git a/src/ui/images/plugins.png b/src/ui/images/plugins.png Binary files differnew file mode 100644 index 000000000..e9c744e64 --- /dev/null +++ b/src/ui/images/plugins.png diff --git a/src/images/qmmp.xpm b/src/ui/images/qmmp.xpm index 85ea94fc1..85ea94fc1 100644 --- a/src/images/qmmp.xpm +++ b/src/ui/images/qmmp.xpm diff --git a/src/inlines.h b/src/ui/inlines.h index 3efccf0de..3efccf0de 100644 --- a/src/inlines.h +++ b/src/ui/inlines.h diff --git a/src/jumptotrackdialog.cpp b/src/ui/jumptotrackdialog.cpp index bcd0f308c..bcd0f308c 100644 --- a/src/jumptotrackdialog.cpp +++ b/src/ui/jumptotrackdialog.cpp diff --git a/src/jumptotrackdialog.h b/src/ui/jumptotrackdialog.h index cfe629693..cfe629693 100644 --- a/src/jumptotrackdialog.h +++ b/src/ui/jumptotrackdialog.h diff --git a/src/keyboardmanager.cpp b/src/ui/keyboardmanager.cpp index 5ad32fee7..5ad32fee7 100644 --- a/src/keyboardmanager.cpp +++ b/src/ui/keyboardmanager.cpp diff --git a/src/keyboardmanager.h b/src/ui/keyboardmanager.h index 2b33b5ef9..2b33b5ef9 100644 --- a/src/keyboardmanager.h +++ b/src/ui/keyboardmanager.h diff --git a/src/listwidget.cpp b/src/ui/listwidget.cpp index fb2173b33..fb2173b33 100644 --- a/src/listwidget.cpp +++ b/src/ui/listwidget.cpp diff --git a/src/listwidget.h b/src/ui/listwidget.h index 2f20a3bf8..2f20a3bf8 100644 --- a/src/listwidget.h +++ b/src/ui/listwidget.h diff --git a/src/logscale.cpp b/src/ui/logscale.cpp index 921004fd9..921004fd9 100644 --- a/src/logscale.cpp +++ b/src/ui/logscale.cpp diff --git a/src/logscale.h b/src/ui/logscale.h index d74d25207..d74d25207 100644 --- a/src/logscale.h +++ b/src/ui/logscale.h diff --git a/src/mainvisual.cpp b/src/ui/mainvisual.cpp index 5bdcbf5cb..5bdcbf5cb 100644 --- a/src/mainvisual.cpp +++ b/src/ui/mainvisual.cpp diff --git a/src/mainvisual.h b/src/ui/mainvisual.h index 5c5b76256..5c5b76256 100644 --- a/src/mainvisual.h +++ b/src/ui/mainvisual.h diff --git a/src/mainwindow.cpp b/src/ui/mainwindow.cpp index 2d54df4d3..d81dbce3b 100644 --- a/src/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -26,6 +26,8 @@ #include <math.h> #include <soundcore.h> +#include <qmmpui/generalhandler.h> +#include <qmmpui/general.h> #include "textscroller.h" #include "mainwindow.h" @@ -45,10 +47,11 @@ #include "filedialog.h" #include "listwidget.h" #include "visualmenu.h" +#include "commandlineoption.h" #define KEY_OFFSET 10 -MainWindow::MainWindow(const QStringList& args, QWidget *parent) +MainWindow::MainWindow(const QStringList& args,CommandLineOptionManager* option_manager, QWidget *parent) : QMainWindow(parent) { m_vis = 0; @@ -56,6 +59,7 @@ MainWindow::MainWindow(const QStringList& args, QWidget *parent) m_update = FALSE; m_paused = FALSE; m_elapsed = 0; + m_option_manager = option_manager; setWindowIcon( QIcon(":/qmmp.xpm") ); @@ -112,11 +116,6 @@ MainWindow::MainWindow(const QStringList& args, QWidget *parent) m_titlebar->show(); m_titlebar->setActive(TRUE); - m_tray = new QSystemTrayIcon( this ); - m_tray->setIcon ( QIcon(":/stop.png") ); - m_tray->setContextMenu( m_mainMenu ); - connect(m_tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason))); - readSettings(); dock->updateDock(); @@ -142,6 +141,15 @@ MainWindow::MainWindow(const QStringList& args, QWidget *parent) FileDialog::registerBuiltinFactories(); FileDialog::registerExternalFactories(); + m_generalHandler = new GeneralHandler(this); + connect(m_generalHandler, SIGNAL(playCalled()), SLOT(play())); + connect(m_generalHandler, SIGNAL(nextCalled()), SLOT(next())); + connect(m_generalHandler, SIGNAL(previousCalled()), SLOT(previous())); + connect(m_generalHandler, SIGNAL(stopCalled()), SLOT(stop())); + connect(m_generalHandler, SIGNAL(pauseCalled()), SLOT(pause())); + connect(m_generalHandler, SIGNAL(toggleVisibilityCalled()), SLOT(toggleVisibility())); + connect(m_generalHandler, SIGNAL(exitCalled()), SLOT(close())); + m_playListModel->readSettings(); char buf[PATH_MAX + 1]; QString cwd = QString::fromLocal8Bit(getcwd(buf,PATH_MAX)); @@ -312,23 +320,38 @@ void MainWindow::showOutputState(const OutputState &st) { case OutputState::Playing: { - m_tray->setIcon ( QIcon(":/play.png") ); - if (m_showMessage && m_playListModel->currentItem()) - m_tray->showMessage ( tr("Now Playing"), - m_playListModel->currentItem()->title(), - QSystemTrayIcon::Information, m_messageDelay ); - if (m_showToolTip && m_playListModel->currentItem()) - m_tray->setToolTip (m_playListModel->currentItem()->title()); + m_generalHandler->setState(General::Playing); + if (m_playListModel->currentItem()) + { + SongInfo info; + FileTag *tag = m_playListModel->currentItem()->tag(); + if (tag && !tag->isEmpty()) + { + info.setValue(SongInfo::TITLE, tag->title()); + info.setValue(SongInfo::ARTIST, tag->artist()); + info.setValue(SongInfo::ALBUM, tag->album()); + info.setValue(SongInfo::COMMENT, tag->comment()); + info.setValue(SongInfo::GENRE, tag->genre()); + info.setValue(SongInfo::YEAR, tag->year()); + info.setValue(SongInfo::TRACK, tag->track()); + info.setValue(SongInfo::LENGTH, tag->length()); + } + else + info.setValue(SongInfo::TITLE, m_playlist->currentItem()->title()); + info.setValue(SongInfo::STREAM, + m_playlist->currentItem()->path().startsWith("http://")); + m_generalHandler->setSongInfo(info); + } break; } case OutputState::Paused: { - m_tray->setIcon ( QIcon(":/pause.png") ); + m_generalHandler->setState(General::Paused); break; } case OutputState::Stopped: { - m_tray->setIcon ( QIcon(":/stop.png") ); + m_generalHandler->setState(General::Stopped); break; } case OutputState::Info: @@ -358,9 +381,26 @@ void MainWindow::showDecoderState(const DecoderState &st) qDebug("YEAR = %d", st.tag()->year()); qDebug("TRACK = %d", st.tag()->track()); qDebug("LENGTH = %d", st.tag()->length()); - - m_playlist->currentItem()->updateTags(st.tag()); - m_playlist->listWidget()->updateList(); + if (m_playlist->currentItem()) + { + if (!st.tag()->isEmpty()) + { + SongInfo info; + info.setValue(SongInfo::TITLE, st.tag()->title()); + info.setValue(SongInfo::ARTIST, st.tag()->artist()); + info.setValue(SongInfo::ALBUM, st.tag()->album()); + info.setValue(SongInfo::COMMENT, st.tag()->comment()); + info.setValue(SongInfo::GENRE, st.tag()->genre()); + info.setValue(SongInfo::YEAR, st.tag()->year()); + info.setValue(SongInfo::TRACK, st.tag()->track()); + info.setValue(SongInfo::LENGTH, st.tag()->length()); + info.setValue(SongInfo::STREAM, + m_playlist->currentItem()->path().startsWith("http://")); + m_generalHandler->setSongInfo(info); + } + m_playlist->currentItem()->updateTags(st.tag()); + m_playlist->listWidget()->updateList(); + } break; } } @@ -368,8 +408,13 @@ void MainWindow::showDecoderState(const DecoderState &st) void MainWindow::changeTitle(const QString &title) { - m_playlist->currentItem()->changeTitle(title); + if (m_playlist->currentItem()) + m_playlist->currentItem()->changeTitle(title); m_playlist->listWidget()->updateList(); + SongInfo info; + info.setValue(SongInfo::TITLE, title); + info.setValue(SongInfo::STREAM, TRUE); + m_generalHandler->setSongInfo(info); } void MainWindow::closeEvent ( QCloseEvent *) @@ -500,17 +545,6 @@ void MainWindow::readSettings() m_update = TRUE; } - //tray - settings.beginGroup("Tray"); - m_tray->setVisible(settings.value("enabled",TRUE).toBool()); - m_showMessage = settings.value("show_message",TRUE).toBool(); - m_messageDelay = settings.value("message_delay",2000).toInt(); - m_showToolTip = settings.value("show_tooltip", FALSE).toBool(); - m_hide_on_titlebar_close = settings.value("hide_on_close",FALSE).toBool(); - if (!m_showToolTip) - m_tray->setToolTip(QString()); - settings.endGroup(); - } void MainWindow::writeSettings() @@ -542,6 +576,7 @@ void MainWindow::showSettings() m_playlist->readSettings(); TextScroller::getPointer()->readSettings(); m_core->updateConfig(); + m_generalHandler->updateConfig(); m_visMenu->updateActions(); } delete m_confDialog; @@ -574,12 +609,6 @@ void MainWindow::toggleVisibility() } } -void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason) -{ - if (reason == QSystemTrayIcon::Trigger) - toggleVisibility(); -} - void MainWindow::createActions() { m_mainMenu = new QMenu(this); @@ -588,6 +617,7 @@ void MainWindow::createActions() m_mainMenu->addAction(tr("&Stop"),this, SLOT(stop()), tr("V")); m_mainMenu->addAction(tr("&Previous"),this, SLOT(previous()), tr("Z")); m_mainMenu->addAction(tr("&Next"),this, SLOT(next()), tr("B")); + m_mainMenu->addAction(tr("P&lay/Pause"),this, SLOT(playPause()), tr("Space")); m_mainMenu->addAction(tr("&Queue"),m_playListModel, SLOT(addToQueue()), tr("Q")); m_mainMenu->addSeparator(); m_mainMenu->addAction(tr("&Jump To File"),this, SLOT(jumpToFile()), tr("J")); @@ -754,29 +784,10 @@ bool MainWindow::processCommandArgs(const QStringList &slist,const QString& cwd) QString str = slist[0]; if (str.startsWith("--")) // is it a command? { - if (str == "--play") - play(); - else if (str == "--stop") + if (m_option_manager->hasOption(str)) { - stop(); - display->hideTimeDisplay(); - } - else if (str == "--pause") - pause(); - else if (str == "--next") - { - next(); - if(!m_core->isInitialized()) - play(); + m_option_manager->executeCommand(str,this); } - else if (str == "--previous") - { - previous(); - if(!m_core->isInitialized()) - play(); - } - else if (str == "--play-pause") - playPause(); else return false; } @@ -785,6 +796,7 @@ bool MainWindow::processCommandArgs(const QStringList &slist,const QString& cwd) QStringList full_path_list; foreach(QString s,slist) { + qWarning(qPrintable(cwd + "/" + s)); if (s.left(1) == "/") //is it absolute path? full_path_list << s; else @@ -807,13 +819,30 @@ void MainWindow::jumpToFile() void MainWindow::handleCloseRequest() { - if (m_hide_on_titlebar_close && m_tray->isVisible()) - toggleVisibility(); - else - QApplication::closeAllWindows(); + //if (m_hide_on_titlebar_close && m_tray->isVisible()) + /*toggleVisibility(); + else*/ + QApplication::closeAllWindows(); } void MainWindow::addUrl( ) { AddUrlDialog::popup(this,m_playListModel); } + +SoundCore * MainWindow::soundCore() const +{ + return m_core; +} + +MainDisplay * MainWindow::mainDisplay() const +{ + return display; +} + +void MainWindow::keyPressEvent(QKeyEvent *ke) +{ + QKeyEvent event = QKeyEvent(ke->type(), ke->key(), + ke->modifiers(), ke->text(),ke->isAutoRepeat(), ke->count()); + QApplication::sendEvent(m_playlist,&event); +} diff --git a/src/mainwindow.h b/src/ui/mainwindow.h index 97caed52a..25b2b3b75 100644 --- a/src/mainwindow.h +++ b/src/ui/mainwindow.h @@ -21,7 +21,7 @@ #define MAINWINDOW_H #include <QMainWindow> -#include <QSystemTrayIcon> + #include "output.h" #include "decoder.h" @@ -42,31 +42,29 @@ class Skin; class SoundCore; class JumpToTrackDialog; class VisualMenu; +class GeneralHandler; class QMenu; class QKeyEvent; - +class CommandLineOptionManager; class MainWindow : public QMainWindow { Q_OBJECT public: - MainWindow(const QStringList& args, QWidget *parent); + MainWindow(const QStringList& args,CommandLineOptionManager*, QWidget *parent); ~MainWindow(); - PlayList *getPLPointer() - { - return m_playlist; - } + PlayList *getPLPointer(){return m_playlist;} void seek(int); QMenu* menu(); void setVolume(int volume, int balance); - - bool processCommandArgs(const QStringList &slist,const QString& cwd); - + SoundCore* soundCore()const; + MainDisplay* mainDisplay()const; + bool processCommandArgs(const QStringList &list,const QString& cwd); public slots: void previous(); void play(); @@ -75,6 +73,12 @@ public slots: void stop(); void next(); void replay(); + void jumpToFile(); + void toggleVisibility(); + + void addDir(); + void addFile(); + void addUrl(); void newPlaylist(); void loadPlaylist(); @@ -85,6 +89,7 @@ public slots: protected: virtual void closeEvent ( QCloseEvent *); virtual void changeEvent ( QEvent * event ); + virtual void keyPressEvent ( QKeyEvent* ); private slots: void showOutputState(const OutputState&); @@ -94,16 +99,11 @@ private slots: void startSeek(); void endSeek(); void showSettings(); - void addDir(); - void addFile(); - void addUrl(); void updateEQ(); void updateSkin(); void forward(); void backward(); - void jumpToFile(); - void toggleVisibility(); - void trayActivated(QSystemTrayIcon::ActivationReason); + //void trayActivated(QSystemTrayIcon::ActivationReason); void about(); void handleCloseRequest(); @@ -123,7 +123,6 @@ private: EqWidget *m_equalizer; MainVisual *m_vis; QString m_lastDir; - QSystemTrayIcon *m_tray; bool m_update; bool m_showMessage; int m_messageDelay; @@ -135,6 +134,8 @@ private: bool m_hide_on_titlebar_close; int m_elapsed; VisualMenu *m_visMenu; + CommandLineOptionManager* m_option_manager; + GeneralHandler *m_generalHandler; }; #endif diff --git a/src/mediafile.cpp b/src/ui/mediafile.cpp index 24b6ce174..6ffb5514f 100644 --- a/src/mediafile.cpp +++ b/src/ui/mediafile.cpp @@ -160,3 +160,10 @@ MediaFile::FLAGS MediaFile::flag() const return m_flag; } +FileTag *MediaFile::tag() +{ + if(m_tag && m_tag->isEmpty()) + return 0; + return m_tag; +} + diff --git a/src/mediafile.h b/src/ui/mediafile.h index 7adab6603..1652bf92d 100644 --- a/src/mediafile.h +++ b/src/ui/mediafile.h @@ -60,6 +60,7 @@ public: void changeTitle(const QString&); FLAGS flag()const; void setFlag(FLAGS); + FileTag *tag(); private: void readMetadata(); diff --git a/src/monostereo.cpp b/src/ui/monostereo.cpp index 659fec7be..659fec7be 100644 --- a/src/monostereo.cpp +++ b/src/ui/monostereo.cpp diff --git a/src/monostereo.h b/src/ui/monostereo.h index be1419c5c..be1419c5c 100644 --- a/src/monostereo.h +++ b/src/ui/monostereo.h diff --git a/src/mp3player.cpp b/src/ui/mp3player.cpp index cf6b27535..cf6b27535 100644 --- a/src/mp3player.cpp +++ b/src/ui/mp3player.cpp diff --git a/src/number.cpp b/src/ui/number.cpp index 9f127965e..9f127965e 100644 --- a/src/number.cpp +++ b/src/ui/number.cpp diff --git a/src/number.h b/src/ui/number.h index 1c89f71d4..1c89f71d4 100644 --- a/src/number.h +++ b/src/ui/number.h diff --git a/src/pixmapwidget.cpp b/src/ui/pixmapwidget.cpp index a0f4ff7fd..a0f4ff7fd 100644 --- a/src/pixmapwidget.cpp +++ b/src/ui/pixmapwidget.cpp diff --git a/src/pixmapwidget.h b/src/ui/pixmapwidget.h index 24d34260e..24d34260e 100644 --- a/src/pixmapwidget.h +++ b/src/ui/pixmapwidget.h diff --git a/src/playlist.cpp b/src/ui/playlist.cpp index 282463ef0..282463ef0 100644 --- a/src/playlist.cpp +++ b/src/ui/playlist.cpp diff --git a/src/playlist.h b/src/ui/playlist.h index 4e8bdc1f8..4e8bdc1f8 100644 --- a/src/playlist.h +++ b/src/ui/playlist.h diff --git a/src/playlistcontrol.cpp b/src/ui/playlistcontrol.cpp index 8f111fe4e..8f111fe4e 100644 --- a/src/playlistcontrol.cpp +++ b/src/ui/playlistcontrol.cpp diff --git a/src/playlistcontrol.h b/src/ui/playlistcontrol.h index 26c3871d4..26c3871d4 100644 --- a/src/playlistcontrol.h +++ b/src/ui/playlistcontrol.h diff --git a/src/playlistformat.cpp b/src/ui/playlistformat.cpp index 505805c88..d9ce45b77 100644 --- a/src/playlistformat.cpp +++ b/src/ui/playlistformat.cpp @@ -169,7 +169,6 @@ QString M3UPlaylistFormat::name() const return "M3UPlaylistFormat"; } -#ifndef XSPF_PLUGIN // Needs more work - it's better use libSpiff there and put it as plugin. @@ -282,7 +281,6 @@ QString XSPFPlaylistFormat::name() const return "XSPFPlaylistFormat"; } -#endif diff --git a/src/playlistformat.h b/src/ui/playlistformat.h index 70af82764..a87018d63 100644 --- a/src/playlistformat.h +++ b/src/ui/playlistformat.h @@ -97,9 +97,6 @@ protected: }; -// Format below is made also as plugin - experimental. To enable it -// uncomment 'CONFIG += XSPF_PLUGIN' line in qmmp.pri -#ifndef XSPF_PLUGIN /*! * Class for XSPF playlist format parsing */ @@ -115,6 +112,5 @@ class XSPFPlaylistFormat : public PlaylistFormat protected: QStringList m_supported_formats; }; -#endif #endif diff --git a/src/playlistmodel.cpp b/src/ui/playlistmodel.cpp index 196608438..196608438 100644 --- a/src/playlistmodel.cpp +++ b/src/ui/playlistmodel.cpp diff --git a/src/playlistmodel.h b/src/ui/playlistmodel.h index b3ac19c04..b3ac19c04 100644 --- a/src/playlistmodel.h +++ b/src/ui/playlistmodel.h diff --git a/src/playlistslider.cpp b/src/ui/playlistslider.cpp index 098b3bcee..098b3bcee 100644 --- a/src/playlistslider.cpp +++ b/src/ui/playlistslider.cpp diff --git a/src/playlistslider.h b/src/ui/playlistslider.h index a8eb45c66..a8eb45c66 100644 --- a/src/playlistslider.h +++ b/src/ui/playlistslider.h diff --git a/src/playlisttitlebar.cpp b/src/ui/playlisttitlebar.cpp index a583065ca..a583065ca 100644 --- a/src/playlisttitlebar.cpp +++ b/src/ui/playlisttitlebar.cpp diff --git a/src/playlisttitlebar.h b/src/ui/playlisttitlebar.h index f50018371..f50018371 100644 --- a/src/playlisttitlebar.h +++ b/src/ui/playlisttitlebar.h diff --git a/src/playstate.cpp b/src/ui/playstate.cpp index 373619574..373619574 100644 --- a/src/playstate.cpp +++ b/src/ui/playstate.cpp diff --git a/src/playstate.h b/src/ui/playstate.h index e4af7fa6f..e4af7fa6f 100644 --- a/src/playstate.h +++ b/src/ui/playstate.h diff --git a/src/playstatus.cpp b/src/ui/playstatus.cpp index 913199c4f..913199c4f 100644 --- a/src/playstatus.cpp +++ b/src/ui/playstatus.cpp diff --git a/src/playstatus.h b/src/ui/playstatus.h index b050de1ca..b050de1ca 100644 --- a/src/playstatus.h +++ b/src/ui/playstatus.h diff --git a/src/pluginitem.cpp b/src/ui/pluginitem.cpp index fc32f8ab8..2ccd8e41d 100644 --- a/src/pluginitem.cpp +++ b/src/ui/pluginitem.cpp @@ -27,6 +27,8 @@ #include <effectfactory.h> #include <effect.h> #include <soundcore.h> +#include <qmmpui/generalfactory.h> +#include <qmmpui/general.h> #include "pluginitem.h" @@ -150,3 +152,31 @@ EffectFactory *EffectPluginItem::factory() { return m_factory; } + +/*General*/ +GeneralPluginItem::GeneralPluginItem(QObject *parent, GeneralFactory *fact, + const QString &filePath): QObject(parent) +{ + m_fileName = filePath.section('/',-1); + m_factory = fact; +} + + +GeneralPluginItem::~GeneralPluginItem() +{} + +void GeneralPluginItem::select(bool on) +{ + General::setEnabled(m_factory, on); +} + +bool GeneralPluginItem::isSelected() +{ + return General::isEnabled(m_factory); +} + +GeneralFactory *GeneralPluginItem::factory() +{ + return m_factory; +} + diff --git a/src/pluginitem.h b/src/ui/pluginitem.h index 11798ee25..8b3dc3b73 100644 --- a/src/pluginitem.h +++ b/src/ui/pluginitem.h @@ -30,6 +30,7 @@ class DecoderFactory; class OutputFactory; class VisualFactory; class EffectFactory; +class GeneralFactory; class InputPluginItem : public QObject { @@ -109,4 +110,23 @@ private: EffectFactory *m_factory; }; +class GeneralPluginItem : public QObject +{ + Q_OBJECT +public: + GeneralPluginItem(QObject *parent, GeneralFactory *fact, const QString &filePath); + + ~GeneralPluginItem(); + + bool isSelected(); + GeneralFactory * factory(); + +public slots: + void select(bool); + +private: + QString m_fileName; + GeneralFactory *m_factory; +}; + #endif diff --git a/src/positionbar.cpp b/src/ui/positionbar.cpp index 5431fd4f3..5431fd4f3 100644 --- a/src/positionbar.cpp +++ b/src/ui/positionbar.cpp diff --git a/src/positionbar.h b/src/ui/positionbar.h index ea03ef14a..ea03ef14a 100644 --- a/src/positionbar.h +++ b/src/ui/positionbar.h diff --git a/src/preseteditor.cpp b/src/ui/preseteditor.cpp index 1b55a229d..1b55a229d 100644 --- a/src/preseteditor.cpp +++ b/src/ui/preseteditor.cpp diff --git a/src/preseteditor.h b/src/ui/preseteditor.h index 35302b185..35302b185 100644 --- a/src/preseteditor.h +++ b/src/ui/preseteditor.h diff --git a/src/qmmpstarter.cpp b/src/ui/qmmpstarter.cpp index 56b1773b7..b04916983 100644 --- a/src/qmmpstarter.cpp +++ b/src/ui/qmmpstarter.cpp @@ -26,11 +26,13 @@ #include "mainwindow.h" #include "version.h" #include "qmmpstarter.h" +#include "commandlineoption.h" #define MAXCOMMANDSIZE 1024 QMMPStarter::QMMPStarter(int argc,char ** argv,QObject* parent) : QObject(parent),mw(NULL) { + m_option_manager = new CommandLineOptionManager(); QStringList tmp; for(int i = 1;i < argc;i++) tmp << QString::fromLocal8Bit(argv[i]); @@ -49,12 +51,7 @@ QMMPStarter::QMMPStarter(int argc,char ** argv,QObject* parent) : QObject(parent } if(argString.startsWith("--") && // command? - argString != "--play" && - argString != "--previous" && - argString != "--next" && - argString != "--stop" && - argString != "--pause" && - argString != "--play-pause" + !m_option_manager->hasOption(argString) ) { qFatal("QMMP: Unknown command..."); @@ -85,7 +82,6 @@ QMMPStarter::QMMPStarter(int argc,char ** argv,QObject* parent) : QObject(parent QMMPStarter::~ QMMPStarter() { - qWarning("QMMPStarter::~ QMMPStarter()"); if(mw) delete mw; } @@ -93,7 +89,7 @@ void QMMPStarter::startMainWindow() { connect(m_sock, SIGNAL(readyRead()),this, SLOT(readCommand())); QStringList arg_l = argString.split("\n", QString::SkipEmptyParts); - mw = new MainWindow(arg_l,0); + mw = new MainWindow(arg_l,m_option_manager,0); } void QMMPStarter::writeCommand() @@ -137,14 +133,14 @@ void QMMPStarter::printUsage() "Usage: qmmp [options] [files] \n" "Options:\n" "--------\n" - "--help Display this text and exit.\n" - "--previous Skip backwards in playlist\n" - "--play Start playing current playlist\n" - "--pause Pause current song\n" - "--play-pause Pause if playing, play otherwise\n" - "--stop Stop current song\n" - "--next Skip forward in playlist\n" - "--version Print version number and exit.\n\n" + ); + for(int i = 0; i< m_option_manager->count();i++) + { + qWarning(qPrintable((*m_option_manager)[i]->helpString())); + } + qWarning( + "--help Display this text and exit.\n" + "--version Print version number and exit.\n\n" "Ideas, patches, bugreports send to forkotov02@hotmail.ru\n" ); } diff --git a/src/qmmpstarter.h b/src/ui/qmmpstarter.h index c859496cf..010c5385f 100644 --- a/src/qmmpstarter.h +++ b/src/ui/qmmpstarter.h @@ -27,7 +27,7 @@ class UnixDomainSocket; class MainWindow; - +class CommandLineOptionManager; /*! * QMMPStarter represents wrapper object that is responsible @@ -65,6 +65,7 @@ private: MainWindow* mw; UnixDomainSocket* m_sock; QString argString; + CommandLineOptionManager* m_option_manager; }; #endif diff --git a/src/shadedbar.cpp b/src/ui/shadedbar.cpp index 63b2017c0..63b2017c0 100644 --- a/src/shadedbar.cpp +++ b/src/ui/shadedbar.cpp diff --git a/src/shadedbar.h b/src/ui/shadedbar.h index 4ea8c871f..4ea8c871f 100644 --- a/src/shadedbar.h +++ b/src/ui/shadedbar.h diff --git a/src/shadedvisual.cpp b/src/ui/shadedvisual.cpp index 2dea3d419..2dea3d419 100644 --- a/src/shadedvisual.cpp +++ b/src/ui/shadedvisual.cpp diff --git a/src/shadedvisual.h b/src/ui/shadedvisual.h index e46331ecb..e46331ecb 100644 --- a/src/shadedvisual.h +++ b/src/ui/shadedvisual.h diff --git a/src/skin.cpp b/src/ui/skin.cpp index 8bb4a63ad..b7f787ad4 100644 --- a/src/skin.cpp +++ b/src/ui/skin.cpp @@ -138,7 +138,7 @@ void Skin::loadButtons() buttons[BT_STOP_P] = pixmap->copy ( 69,18,23,18 ); buttons[BT_NEXT_N] = pixmap->copy ( 92, 0,22,18 ); - buttons[BT_NEXT_P] = pixmap->copy ( 92,16,22,18 ); + buttons[BT_NEXT_P] = pixmap->copy ( 92,18,22,18 ); buttons[BT_EJECT_N] = pixmap->copy ( 114, 0,22,16 ); buttons[BT_EJECT_P] = pixmap->copy ( 114,16,22,16 ); diff --git a/src/skin.h b/src/ui/skin.h index d981c4613..d981c4613 100644 --- a/src/skin.h +++ b/src/ui/skin.h diff --git a/src/skinreader.cpp b/src/ui/skinreader.cpp index 64e0aacc9..c29246d8d 100644 --- a/src/skinreader.cpp +++ b/src/ui/skinreader.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2008 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -23,6 +23,7 @@ #include <QFileInfo> #include <QProcess> #include <QByteArray> +#include <QApplication> #include <QFile> #include "skinreader.h" @@ -47,6 +48,9 @@ void SkinReader::updateCache() QDir dir(QDir::homePath() +"/.qmmp/skins"); dir.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks); QFileInfoList f = dir.entryInfoList(); + dir.setPath(qApp->applicationDirPath()+"/../share/qmmp/skins"); + dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks); + f << dir.entryInfoList(); //clear removed skins from cache QDir cache_dir(QDir::homePath() +"/.qmmp/cache/skins"); cache_dir.setFilter(QDir::Dirs | QDir::Hidden | QDir::NoDotAndDotDot); diff --git a/src/skinreader.h b/src/ui/skinreader.h index c6db283fa..321a5fbbf 100644 --- a/src/skinreader.h +++ b/src/ui/skinreader.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Ilya Kotov * + * Copyright (C) 2008 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * diff --git a/src/stuff.qrc b/src/ui/stuff.qrc index dfffed67d..e9c99d558 100644 --- a/src/stuff.qrc +++ b/src/ui/stuff.qrc @@ -1,7 +1,7 @@ <!DOCTYPE RCC> <RCC version="1.0"> <qresource> - <file>../COPYING</file> + <file>../../COPYING</file> <file>html/about_en.html</file> <file>html/about_ru.html</file> <file>html/authors_en.txt</file> diff --git a/src/symboldisplay.cpp b/src/ui/symboldisplay.cpp index b3942a6bb..b3942a6bb 100644 --- a/src/symboldisplay.cpp +++ b/src/ui/symboldisplay.cpp diff --git a/src/symboldisplay.h b/src/ui/symboldisplay.h index 065579b7a..065579b7a 100644 --- a/src/symboldisplay.h +++ b/src/ui/symboldisplay.h diff --git a/src/textscroller.cpp b/src/ui/textscroller.cpp index 35e4ed4eb..35e4ed4eb 100644 --- a/src/textscroller.cpp +++ b/src/ui/textscroller.cpp diff --git a/src/textscroller.h b/src/ui/textscroller.h index 7346ce29a..7346ce29a 100644 --- a/src/textscroller.h +++ b/src/ui/textscroller.h diff --git a/src/timeindicator.cpp b/src/ui/timeindicator.cpp index 9b81ba040..9b81ba040 100644 --- a/src/timeindicator.cpp +++ b/src/ui/timeindicator.cpp diff --git a/src/timeindicator.h b/src/ui/timeindicator.h index 19981a4b3..19981a4b3 100644 --- a/src/timeindicator.h +++ b/src/ui/timeindicator.h diff --git a/src/titlebar.cpp b/src/ui/titlebar.cpp index bdbd86b2e..bdbd86b2e 100644 --- a/src/titlebar.cpp +++ b/src/ui/titlebar.cpp diff --git a/src/titlebar.h b/src/ui/titlebar.h index 4428a188c..4428a188c 100644 --- a/src/titlebar.h +++ b/src/ui/titlebar.h diff --git a/src/titlebarcontrol.cpp b/src/ui/titlebarcontrol.cpp index 8238c287a..8238c287a 100644 --- a/src/titlebarcontrol.cpp +++ b/src/ui/titlebarcontrol.cpp diff --git a/src/titlebarcontrol.h b/src/ui/titlebarcontrol.h index c368b2186..c368b2186 100644 --- a/src/titlebarcontrol.h +++ b/src/ui/titlebarcontrol.h diff --git a/src/togglebutton.cpp b/src/ui/togglebutton.cpp index 86b809ef2..86b809ef2 100644 --- a/src/togglebutton.cpp +++ b/src/ui/togglebutton.cpp diff --git a/src/togglebutton.h b/src/ui/togglebutton.h index a15d7476f..a15d7476f 100644 --- a/src/togglebutton.h +++ b/src/ui/togglebutton.h diff --git a/src/translations/qmmp_cs.ts b/src/ui/translations/qmmp_cs.ts index faba9c1b9..faba9c1b9 100644 --- a/src/translations/qmmp_cs.ts +++ b/src/ui/translations/qmmp_cs.ts diff --git a/src/translations/qmmp_locales.qrc b/src/ui/translations/qmmp_locales.qrc index 64ac204fa..64ac204fa 100644 --- a/src/translations/qmmp_locales.qrc +++ b/src/ui/translations/qmmp_locales.qrc diff --git a/src/translations/qmmp_ru.qm b/src/ui/translations/qmmp_ru.qm Binary files differindex 38c82d0e8..38c82d0e8 100644 --- a/src/translations/qmmp_ru.qm +++ b/src/ui/translations/qmmp_ru.qm diff --git a/src/translations/qmmp_ru.ts b/src/ui/translations/qmmp_ru.ts index 32fdd757d..32fdd757d 100644 --- a/src/translations/qmmp_ru.ts +++ b/src/ui/translations/qmmp_ru.ts diff --git a/src/translations/qmmp_tr.qm b/src/ui/translations/qmmp_tr.qm Binary files differindex 1180e41d5..1180e41d5 100644 --- a/src/translations/qmmp_tr.qm +++ b/src/ui/translations/qmmp_tr.qm diff --git a/src/translations/qmmp_tr.ts b/src/ui/translations/qmmp_tr.ts index 73f8206d6..73f8206d6 100644 --- a/src/translations/qmmp_tr.ts +++ b/src/ui/translations/qmmp_tr.ts diff --git a/src/translations/qmmp_zh_CN.qm b/src/ui/translations/qmmp_zh_CN.qm Binary files differindex 2e3e3f2ea..2e3e3f2ea 100644 --- a/src/translations/qmmp_zh_CN.qm +++ b/src/ui/translations/qmmp_zh_CN.qm diff --git a/src/translations/qmmp_zh_CN.ts b/src/ui/translations/qmmp_zh_CN.ts index 3aeefd569..3aeefd569 100644 --- a/src/translations/qmmp_zh_CN.ts +++ b/src/ui/translations/qmmp_zh_CN.ts diff --git a/src/src.pro b/src/ui/ui.pro index 47708ec48..527c205f2 100644 --- a/src/src.pro +++ b/src/ui/ui.pro @@ -5,10 +5,11 @@ include(../qmmp.pri) -FORMS += configdialog.ui \ - preseteditor.ui \ - jumptotrackdialog.ui \ - aboutdialog.ui +FORMS += ./forms/configdialog.ui \ + ./forms/preseteditor.ui \ + ./forms/jumptotrackdialog.ui \ + ./forms/aboutdialog.ui \ + ./forms/addurldialog.ui HEADERS += mainwindow.h \ fileloader.h \ @@ -55,8 +56,14 @@ HEADERS += mainwindow.h \ timeindicator.h \ keyboardmanager.h \ filedialog.h \ - unixdomainsocket.h - + unixdomainsocket.h \ + commandlineoption.h \ + addurldialog.h \ + skinreader.h \ + visualmenu.h \ + titlebarcontrol.h \ + shadedvisual.h \ + shadedbar.h SOURCES += mainwindow.cpp \ mp3player.cpp \ @@ -90,63 +97,53 @@ SOURCES += mainwindow.cpp \ pluginitem.cpp \ volumebar.cpp \ balancebar.cpp \ - playstate.cpp \ - symboldisplay.cpp \ - playlistformat.cpp \ - playlistcontrol.cpp \ - qmmpstarter.cpp \ + playstate.cpp \ + symboldisplay.cpp \ + playlistformat.cpp \ + playlistcontrol.cpp \ + qmmpstarter.cpp \ eqpreset.cpp \ preseteditor.cpp \ - jumptotrackdialog.cpp \ - aboutdialog.cpp \ + jumptotrackdialog.cpp \ + aboutdialog.cpp \ timeindicator.cpp \ keyboardmanager.cpp \ filedialog.cpp \ - unixdomainsocket.cpp - + unixdomainsocket.cpp \ + commandlineoption.cpp \ + addurldialog.cpp \ + skinreader.cpp \ + visualmenu.cpp \ + titlebarcontrol.cpp \ + shadedvisual.cpp \ + shadedbar.cpp +#Some conf to redirect intermediate stuff in separate dirs +UI_DIR=./.build/ui/ +MOC_DIR=./.build/moc/ +OBJECTS_DIR=./.build/obj -contains(CONFIG,XSPF_PLUGIN){ - message(*********************************************) - message(* XSPF support will be compiled as plugin *) - message(*********************************************) - DEFINES += XSPF_PLUGIN -}else { - DEFINES -= XSPF_PLUGIN - message(*******************************************) - message(* XSPF support will be compiled in QMMP *) - message(*******************************************) - QT += xml -} -QT += network -TARGET = ../bin/qmmp +QT += network xml +TARGET = ../../bin/qmmp CONFIG += thread release \ warn_on -QMAKE_LIBDIR += ../lib -LIBS += -Wl,-rpath,../lib -lqmmp -INCLUDEPATH += ../lib +QMAKE_LIBDIR += ../../lib qmmpui +LIBS += -Wl,-rpath,../lib +LIBS += -L../../lib -lqmmp -lqmmpui +INCLUDEPATH += ../qmmp ../ RESOURCES = images/images.qrc \ - stuff.qrc -# translations/qmmp_locales.qrc - -#TRANSLATIONS = translations/qmmp_ru.ts \ -# translations/qmmp_tr.ts \ -# translations/qmmp_zh_CN.ts -TEMPLATE = app + stuff.qrc +TEMPLATE = app target.path = /bin INSTALLS += target -HEADERS += addurldialog.h \ - skinreader.h \ - visualmenu.h \ - titlebarcontrol.h \ - shadedvisual.h \ - shadedbar.h -SOURCES += addurldialog.cpp \ - skinreader.cpp \ - visualmenu.cpp \ - titlebarcontrol.cpp \ - shadedvisual.cpp \ - shadedbar.cpp -FORMS += addurldialog.ui + +#RESOURCES += translations/qmmp_locales.qrc + +#TRANSLATIONS = translations/qmmp_ru.ts \ +# translations/qmmp_tr.ts \ +# translations/qmmp_zh_CN.ts + + + diff --git a/src/unixdomainsocket.cpp b/src/ui/unixdomainsocket.cpp index ecf8aa6f0..5769676be 100644 --- a/src/unixdomainsocket.cpp +++ b/src/ui/unixdomainsocket.cpp @@ -7,14 +7,14 @@ UnixDomainSocket::UnixDomainSocket(QObject * parent ) : QUdpSocket(parent){ - _binded = false; + _bound = false; _s = socket(AF_UNIX, SOCK_DGRAM, 0); this->setSocketDescriptor(_s); } UnixDomainSocket::~UnixDomainSocket(){ - if(_binded){ + if(_bound){ ::unlink(_local.sun_path); } } @@ -28,7 +28,7 @@ bool UnixDomainSocket::bind(const QString& path){ len = strlen(_local.sun_path) + sizeof(_local.sun_family); bool res = !(::bind(_s, (struct sockaddr *)&_local, len)); if(res) - _binded = true; + _bound = true; return res; } @@ -49,7 +49,7 @@ bool UnixDomainSocket::alive(const QString& path) } return true; } - +// void UnixDomainSocket::writeDatagram(const char* command,const QString& path) { socklen_t len; diff --git a/src/unixdomainsocket.h b/src/ui/unixdomainsocket.h index 7538e685a..37e5a364b 100644 --- a/src/unixdomainsocket.h +++ b/src/ui/unixdomainsocket.h @@ -38,7 +38,7 @@ public slots: private: unsigned int _s; struct sockaddr_un _local; - bool _binded; + bool _bound; }; diff --git a/src/version.h b/src/ui/version.h index 61fbc902e..61fbc902e 100644 --- a/src/version.h +++ b/src/ui/version.h diff --git a/src/visualmenu.cpp b/src/ui/visualmenu.cpp index 2b0ad6797..2b0ad6797 100644 --- a/src/visualmenu.cpp +++ b/src/ui/visualmenu.cpp diff --git a/src/visualmenu.h b/src/ui/visualmenu.h index 9202a8a7d..9202a8a7d 100644 --- a/src/visualmenu.h +++ b/src/ui/visualmenu.h diff --git a/src/volumebar.cpp b/src/ui/volumebar.cpp index 15c7db867..15c7db867 100644 --- a/src/volumebar.cpp +++ b/src/ui/volumebar.cpp diff --git a/src/volumebar.h b/src/ui/volumebar.h index 51bc7ac46..51bc7ac46 100644 --- a/src/volumebar.h +++ b/src/ui/volumebar.h |
