diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c5ee12..2c77428 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,178 +1,176 @@ project(kscd) cmake_minimum_required(VERSION 2.8.12) find_package(ECM REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH "${ECM_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake") add_definitions(-fexceptions) include(FeatureSummary) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(ECMInstallIcons) # Handle build type if(CMAKE_BUILD_TYPE MATCHES [Dd]ebug) message(STATUS "Debug build") add_definitions(-DKSCD_DEBUG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0") else() message(STATUS "Release build") add_definitions(-DNDEBUG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") endif() find_package(Qt5 REQUIRED COMPONENTS Widgets Svg) find_package(KF5 REQUIRED Config ConfigWidgets CoreAddons DBusAddons GlobalAccel I18n IconThemes - KDELibs4Support KIO Service Solid WidgetsAddons XmlGui ) find_package(Phonon4Qt5 REQUIRED) find_package(MusicBrainz5 REQUIRED) find_package(DiscId REQUIRED) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/gui ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${PHONON_INCLUDE_DIR} ${MUSICBRAINZ5_INCLUDE_DIR} ${DISCID_INCLUDE_DIR} ) if(BUILD_TESTING) find_package(Qt5Test REQUIRED) add_subdirectory(tests) endif() ########### next target ############### set(kscd_SRCS ########## # Main ########## kscd.cpp ############### # Solid/Phonon ############### hwcontroler.cpp audiocd.cpp ######################### # Music Brainz ######################### mbmanager.cpp #################### # Graphics / SVG #################### gui/kscdwindow.cpp gui/kscdwidget.cpp gui/ejectbutton.cpp gui/stopbutton.cpp gui/playbutton.cpp gui/nextbutton.cpp gui/previousbutton.cpp gui/mutebutton.cpp gui/randombutton.cpp gui/loopbutton.cpp gui/tracklistbutton.cpp gui/volumebutton.cpp gui/panel.cpp gui/titlePopUp.cpp gui/tracklistdlg.cpp gui/background.cpp gui/closebutton.cpp gui/minimizebutton.cpp #gui/seekslider.cpp gui/seekcursor.cpp gui/seekbar.cpp #################### # DBus Connection #################### dbus/PlayerDBusHandler.cpp dbus/RootDBusHandler.cpp dbus/TracklistDBusHandler.cpp ) ################################## # DBUS LINKING # ################################## qt5_add_dbus_adaptor(kscd_SRCS org.kde.kscd.cdplayer.xml kscd.h KSCD) qt5_add_dbus_adaptor( kscd_SRCS dbus/org.freedesktop.MediaPlayer.root.xml dbus/RootDBusHandler.h KsCD::RootDBusHandler RootAdaptor RootAdaptor) qt5_add_dbus_adaptor( kscd_SRCS dbus/org.freedesktop.MediaPlayer.player.xml dbus/PlayerDBusHandler.h KsCD::PlayerDBusHandler PlayerAdaptor PlayerAdaptor) qt5_add_dbus_adaptor( kscd_SRCS dbus/org.freedesktop.MediaPlayer.tracklist.xml dbus/TracklistDBusHandler.h KsCD::TracklistDBusHandler TracklistAdaptor TracklistAdaptor) ################################## # Graphics Setting # ################################## file(GLOB resource_svg "gui/skin/*.svg") ki18n_wrap_ui(kscd_SRCS gui/trackListDlgUI.ui generalSettings.ui interfaceSettings.ui) ################################## # KsCD Executable # ################################## kconfig_add_kcfg_files(kscd_SRCS prefs.kcfgc) add_executable(kscd ${kscd_SRCS}) ################################## # Libraries Linking # ################################## target_link_libraries(kscd Qt5::Svg Qt5::Widgets KF5::ConfigGui KF5::ConfigWidgets KF5::CoreAddons KF5::DBusAddons KF5::GlobalAccel KF5::I18n KF5::IconThemes - KF5::KDELibs4Support KF5::Service KF5::Solid KF5::WidgetsAddons KF5::XmlGui ${PHONON_LIBRARIES} ${MUSICBRAINZ5_LIBRARIES} ${DISCID_LIBRARIES} ) ########### install files ############### install(TARGETS kscd ${INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES ${resource_svg} DESTINATION ${DATA_INSTALL_DIR}/kscd/skin) install(PROGRAMS org.kde.kscd.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) install(FILES kscd.kcfg DESTINATION ${KCFG_INSTALL_DIR}) install(FILES kscd-play-audiocd.desktop DESTINATION ${DATA_INSTALL_DIR}/solid/actions) install(FILES org.kde.kscd.cdplayer.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR}) add_subdirectory(pics) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/gui/closebutton.cpp b/gui/closebutton.cpp index 1964dad..734d9c7 100644 --- a/gui/closebutton.cpp +++ b/gui/closebutton.cpp @@ -1,42 +1,42 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "closebutton.h" -#include +#include -CloseButton::CloseButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "close" )),parent) +CloseButton::CloseButton(QWidget * parent):KscdWidget(i18n( "close" ),parent) { } CloseButton::~CloseButton() { } diff --git a/gui/ejectbutton.cpp b/gui/ejectbutton.cpp index 0c38ee1..71211b0 100644 --- a/gui/ejectbutton.cpp +++ b/gui/ejectbutton.cpp @@ -1,43 +1,43 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "ejectbutton.h" -#include +#include -EjectButton::EjectButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "eject" )),parent) +EjectButton::EjectButton(QWidget * parent):KscdWidget(i18n( "eject" ),parent) { } EjectButton::~EjectButton() { } diff --git a/gui/loopbutton.cpp b/gui/loopbutton.cpp index 417cec7..659fe6d 100644 --- a/gui/loopbutton.cpp +++ b/gui/loopbutton.cpp @@ -1,84 +1,84 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "loopbutton.h" -#include +#include -LoopButton::LoopButton(QWidget * parent):KscdWidget(QLatin1String( "loop" ),parent) +LoopButton::LoopButton(QWidget * parent):KscdWidget(i18n( "loop" ),parent) { } LoopButton::~LoopButton() { } void LoopButton::mousePressEvent(QMouseEvent *event) { if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft())) { event->accept(); m_state = QLatin1String( "pressed" ); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(needRepaint()); } else { event->ignore(); } } void LoopButton::mouseReleaseEvent(QMouseEvent *event) { if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft())) { event->accept(); m_state = QLatin1String( "over" ); if(m_name == QLatin1String( "loop" )) { m_name = QLatin1String("looptrack"); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(buttonClicked(m_name)); } else if(m_name == QLatin1String( "looptrack" )) { m_name = QLatin1String("loopdisc"); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(buttonClicked(m_name)); } else if(m_name == QLatin1String( "loopdisc" )) { m_name = QLatin1String( "loop" ); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(buttonClicked(m_name)); } } } diff --git a/gui/minimizebutton.cpp b/gui/minimizebutton.cpp index 1306db9..bb0e8fe 100644 --- a/gui/minimizebutton.cpp +++ b/gui/minimizebutton.cpp @@ -1,43 +1,43 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "minimizebutton.h" -#include +#include -MinimizeButton::MinimizeButton(QWidget * parent):KscdWidget(QLatin1String("minimize"),parent) +MinimizeButton::MinimizeButton(QWidget * parent):KscdWidget(i18n("minimize"),parent) { } MinimizeButton::~MinimizeButton() { } diff --git a/gui/mutebutton.cpp b/gui/mutebutton.cpp index 09b745a..da57e4a 100644 --- a/gui/mutebutton.cpp +++ b/gui/mutebutton.cpp @@ -1,76 +1,76 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "mutebutton.h" -#include +#include -MuteButton::MuteButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "mute" )),parent) +MuteButton::MuteButton(QWidget * parent):KscdWidget(i18n( "mute" ),parent) { } MuteButton::~MuteButton() { } void MuteButton::mousePressEvent(QMouseEvent *event) { if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft())) { event->accept(); m_state = QLatin1String( "pressed" ); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(needRepaint()); } else { event->ignore(); } } void MuteButton::mouseReleaseEvent(QMouseEvent *event) { if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft())) { event->accept(); m_state = QLatin1String( "over" ); if(m_name==QLatin1String( "mute" )) { m_name = I18N_NOOP(QLatin1String( "unmute" )); } else { m_name = I18N_NOOP(QLatin1String( "mute" )); } m_id = m_name + QLatin1Char( '_' ) + m_state; emit(buttonClicked(m_name)); } } diff --git a/gui/nextbutton.cpp b/gui/nextbutton.cpp index 5b5b40e..08e5002 100644 --- a/gui/nextbutton.cpp +++ b/gui/nextbutton.cpp @@ -1,44 +1,44 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "nextbutton.h" -#include +#include -NextButton::NextButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "next" )),parent) +NextButton::NextButton(QWidget * parent):KscdWidget(i18n( "next" ),parent) { } NextButton::~NextButton() { } diff --git a/gui/playbutton.cpp b/gui/playbutton.cpp index e231b68..d433680 100644 --- a/gui/playbutton.cpp +++ b/gui/playbutton.cpp @@ -1,69 +1,69 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "playbutton.h" -#include +#include -PlayButton::PlayButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "play" )),parent) +PlayButton::PlayButton(QWidget * parent):KscdWidget(i18n( "play" ),parent) { } PlayButton::~PlayButton() { } void PlayButton::mousePressEvent(QMouseEvent *event) { if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft())) { event->accept(); m_state = QLatin1String( "pressed" ); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(needRepaint()); } else { event->ignore(); } } void PlayButton::mouseReleaseEvent(QMouseEvent *event) { if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft ())) { event->accept(); m_state = QLatin1String( "over" ); emit(buttonClicked(m_name)); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(needRepaint()); } } diff --git a/gui/previousbutton.cpp b/gui/previousbutton.cpp index b877d8e..f9ad50d 100644 --- a/gui/previousbutton.cpp +++ b/gui/previousbutton.cpp @@ -1,43 +1,43 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "previousbutton.h" -#include +#include -PreviousButton::PreviousButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "previous" )),parent) +PreviousButton::PreviousButton(QWidget * parent):KscdWidget(i18n( "previous" ),parent) { } PreviousButton::~PreviousButton() { } diff --git a/gui/randombutton.cpp b/gui/randombutton.cpp index f05e790..4524266 100644 --- a/gui/randombutton.cpp +++ b/gui/randombutton.cpp @@ -1,114 +1,114 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "randombutton.h" -#include +#include -RandomButton::RandomButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "random" )),parent) +RandomButton::RandomButton(QWidget * parent):KscdWidget(i18n( "random" ),parent) { } RandomButton::~RandomButton() { } void RandomButton::mousePressEvent(QMouseEvent *event) { if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft())) { event->accept(); m_state = QLatin1String( "pressed" ); if(m_name== QLatin1String( "random" )) { m_id = m_name + QLatin1Char( '_' ) + m_state; emit(needRepaint()); } } else { event->ignore(); } } void RandomButton::mouseReleaseEvent(QMouseEvent *event) { if(m_bounds->contains(event->pos()+(m_bounds->boundingRect()).topLeft())) { event->accept(); m_state = QLatin1String( "over" ); if(m_name==QLatin1String( "random" )) { m_name = QLatin1String( "p_random" ); } else { m_name = QLatin1String( "random" ); m_id = m_name + QLatin1Char( '_' ) + m_state; } emit(buttonClicked(m_name)); } else { event->ignore(); } } void RandomButton::enterEvent (QEvent * event ) { if(m_name == QLatin1String( "p_random" )) { event->ignore(); } else { event->accept(); m_state = QLatin1String( "over" ); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(needRepaint()); setToolTip( i18n( qPrintable( m_name ) ) ); } } void RandomButton::leaveEvent (QEvent * event ) { if(m_name == QLatin1String( "p_random" )) { event->ignore(); } else { event->accept(); m_state = QLatin1String( "default" ); m_id = m_name + QLatin1Char( '_' ) + m_state; emit(needRepaint()); } } diff --git a/gui/stopbutton.cpp b/gui/stopbutton.cpp index aac1d5b..0d343d7 100644 --- a/gui/stopbutton.cpp +++ b/gui/stopbutton.cpp @@ -1,42 +1,42 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "stopbutton.h" -#include +#include -StopButton::StopButton(QWidget * parent):KscdWidget(I18N_NOOP(QLatin1String( "stop" )),parent) +StopButton::StopButton(QWidget * parent):KscdWidget(i18n( "stop" ),parent) { } StopButton::~StopButton() { } diff --git a/gui/tracklistbutton.cpp b/gui/tracklistbutton.cpp index 5a32003..55892e1 100644 --- a/gui/tracklistbutton.cpp +++ b/gui/tracklistbutton.cpp @@ -1,46 +1,46 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "tracklistbutton.h" -#include +#include -TrackListButton::TrackListButton(QWidget * parent):KscdWidget(QLatin1String("tracklist"),parent) +TrackListButton::TrackListButton(QWidget * parent):KscdWidget(i18n("tracklist"),parent) { // m_bounds = new QRegion((m_renderer->boundsOnElement(getId())).toRect(),QRegion::Ellipse); // move((m_bounds->boundingRect()).x(),(m_bounds->boundingRect()).y()); // m_bounds=new QRegion(pix.mask()); } TrackListButton::~TrackListButton() { } diff --git a/gui/tracklistdlg.cpp b/gui/tracklistdlg.cpp index b8fe58b..19517ee 100644 --- a/gui/tracklistdlg.cpp +++ b/gui/tracklistdlg.cpp @@ -1,116 +1,116 @@ /* * Kscd - A simple cd player for the KDE Project * * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu * Copyright (c) 2002-2003 Aaron J. Seigo * Copyright (c) 2004 Alexander Kern * Copyright (c) 2003-2006 Richard Lärkäng * * -------------- * ISI KsCD Team : * -------------- * Stanislas KRZYWDA * Sovanramy Var * Bouchikhi Mohamed-Amine * Gastellu Sylvain * ----------------------------------------------------------------------------- * * 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #include "tracklistdlg.h" #include #include #include #include #include TrackListDlg::TrackListDlg(QWidget * parent) :QDialog(parent) { QWidget *page = new QWidget( this ); QVBoxLayout* vlay = new QVBoxLayout( page ); m_ui = new trackListDlgUI( this ); vlay->addWidget( m_ui ); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); QWidget *mainWidget = new QWidget(this); QVBoxLayout *mainLayout = new QVBoxLayout; setLayout(mainLayout); mainLayout->addWidget(page); connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); mainLayout->addWidget(buttonBox); - m_ui->trackTable->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents); - m_ui->trackTable->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch); - m_ui->trackTable->horizontalHeader()->setResizeMode(2, QHeaderView::ResizeToContents); + m_ui->trackTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents); + m_ui->trackTable->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); + m_ui->trackTable->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents); m_ui->trackTable->verticalHeader()->hide(); setSizeIncrement ( 0, 50 ); connect(m_ui->trackTable,SIGNAL(itemDoubleClicked(QTableWidgetItem*)), this,SLOT(valueDoubleCliked(QTableWidgetItem*))); } TrackListDlg::~TrackListDlg() { } void TrackListDlg::closeEvent( QCloseEvent * ) { emit trackListClosed(); } void TrackListDlg::setAlbumLbl(const QString& album) { m_ui->albumLbl->setText(album); } void TrackListDlg::setYearLbl(const QString& year) { m_ui->yearLbl->setText(year); } void TrackListDlg::addItemTrackTable(int row,int column,const QString& item) { m_ui->trackTable->setItem(row,column, new QTableWidgetItem(item)); } int TrackListDlg::numberColumnTrackTable() const { return m_ui->trackTable->columnCount(); } void TrackListDlg::setRowCount(int nRows) { m_ui->trackTable->setRowCount(nRows); } void TrackListDlg::removeRowsTrackTable() { m_ui->trackTable->setRowCount(0); } void TrackListDlg::valueDoubleCliked(QTableWidgetItem* item) { emit(itemClicked(item->row()+ 1)); } void TrackListDlg::moveTrackDialog(int x, int y) { move(x,y); } diff --git a/interfaceSettings.ui b/interfaceSettings.ui index 548e739..12eaff0 100644 --- a/interfaceSettings.ui +++ b/interfaceSettings.ui @@ -1,100 +1,95 @@ interfaceSettings 0 0 571 118 0 0 564 118 11 13 551 98 Text font: 0 0 Text color: URL: - + true false KColorButton QPushButton
kcolorbutton.h
- - KComboBox - QComboBox -
kcombobox.h
-
KFontRequester QWidget
kfontrequester.h
diff --git a/kscd.h b/kscd.h index f48387d..67d3792 100644 --- a/kscd.h +++ b/kscd.h @@ -1,175 +1,172 @@ /* Kscd - A simple cd player for the KDE Project $Id: kscd.h 818722 2008-06-09 12:01:16Z krzywda $ Copyright (c) 1997 Bernd Johannes Wuebben Copyright (c) 2002 Aaron J. Seigo Copyright (c) 2004 Alexander Kern Copyright (c) 2008 Amine Bouchikhi 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KSCD_H #define KSCD_H #include #include #include #include #include #include #include #include #include // Phonon libs #include #include #include "gui/kscdwindow.h" #include "hwcontroler.h" #include "mbmanager.h" #include -#include #include #include #include #include #include #include #include -#include #include #include #include #include -#include #include "panel.h" #include "prefs.h" #include "ui_generalSettings.h" #include "ui_interfaceSettings.h" -class KSCD : public KscdWindow, public KSessionManager { +class KSCD : public KscdWindow { Q_OBJECT public: explicit KSCD(QWidget *parent = 0); ~KSCD(); virtual bool saveState(QSessionManager& sm); void writeSettings(); HWControler * getDevices() const; protected: void setupActions(); void setupContextMenu(); signals: void picture(const QString&,const QString&); void infoPanel(const QString&); public slots: void showContextMenu( const QPoint & ); void restoreArtistLabel(); void restoreTrackinfoLabel(); void changeVolume(qreal); void playTrack(int); void ejectShortcut(); void tracklistShortcut(); void muteShortcut(); void playShortcut(); void randomShortcut(); void looptrackShortcut(); void loopdiscShortcut(); void volumeUpShortcut(); void volumeDownShortcut(); void quitShortcut(); void minimizeShortcut(); void actionButton(const QString&); void catchtime(qint64 pos); //void setNewSkin(QString); void unsetHourglass(); void configureShortcuts(); /** * Open the config window */ void optionsPreferences(); void updateSettings(); void configureKeys(); void discLookup(); void discUpload(); void discLookupFinished(); private: HWControler* devices; MBManager* m_MBManager; bool mute; bool play; bool random; bool looptrack; bool loopdisc; QMenu *contextMenu; QAction* m_configureShortcutsAction; QAction* m_configureAction; QAction* m_playPauseAction; QAction* m_stopAction; QAction* m_nextAction; QAction* m_previousAction; QAction* m_ejectAction; QAction* m_randomAction; QAction* m_looptrackAction; QAction* m_loopdiscAction; QAction* m_tracklistAction; QAction* m_muteAction; QAction* m_downloadAction; QAction* m_uploadAction; QAction* m_CDDBWindowAction; QAction* m_volumeUpAction; QAction* m_volumeDownAction; QAction* m_quitAction; QAction* m_minimizeAction; KActionCollection * m_actions; void setHourglass(); // Settings. Ui::generalSettings ui_general; Ui::interfaceSettings ui_interface; /** * Load the last settings */ void loadSettings(); }; #endif