From c988db9f31740427b94ea244031ad6998facab34 Mon Sep 17 00:00:00 2001 From: Thomas Frauendorfer Date: Wed, 17 Oct 2007 02:02:21 +0200 Subject: [PATCH] added myself to Authors and small cleanups --- AUTHORS | 4 ++++ TODO | 1 + lib/TODO | 2 ++ lib/xsettings.cpp | 22 +++++++++++++++++++--- lib/xsettings.h | 6 +++--- src/Playlist.cpp | 5 +++-- src/PlaylistList.cpp | 1 + src/PlaylistView.cpp | 1 - 8 files changed, 33 insertions(+), 9 deletions(-) diff --git a/AUTHORS b/AUTHORS index 955b3b5..778db28 100644 --- a/AUTHORS +++ b/AUTHORS @@ -12,6 +12,10 @@ N: Tobias Bengtsson E: tobbe@tobbe.nu D: Various widgets +N: Thomas Frauendorfer +E: Thomas.Frauendorfer@googlemail.com +D: Developer + N: Chris Gilbert E: neovanglist@neovanglist.net D: Various widgets and fixes diff --git a/TODO b/TODO index d86d981..d338dea 100644 --- a/TODO +++ b/TODO @@ -5,6 +5,7 @@ Todo: * ApplicationConfig * Balance * Playlist + + Display Playtime + Add scrollbuttons to slider + Make drag and drop work again * Jump entry to dialog diff --git a/lib/TODO b/lib/TODO index 464f267..c3aca4c 100644 --- a/lib/TODO +++ b/lib/TODO @@ -1,2 +1,4 @@ Contains a copy of some of Esperanzas src/lib/ directory Will have to be removed as soon as those files become a seperate lib + +Redo XSettings with something better diff --git a/lib/xsettings.cpp b/lib/xsettings.cpp index 936f7d4..90922c3 100644 --- a/lib/xsettings.cpp +++ b/lib/xsettings.cpp @@ -1,3 +1,19 @@ +/** + * This file is a part of Promoe, an XMMS2 Client + * + * Copyright (C) 2007 Thomas Frauendorfer + * + * 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. + */ + #include #include "xsettings.h" @@ -15,14 +31,14 @@ XSettings::XSettings (QObject *parent, XClient *client) : QObject (parent) } QString -XSettings::valueGet (QString key) +XSettings::value_get (QString key) { /* local cache should be identical to serverside config */ return m_config_cache.value (key); } void -XSettings::valueSet (QString key, QString val) +XSettings::value_get (QString key, QString val) { /* Only send change request to server here * update of local cache will be done through handle_config_value_changed @@ -31,7 +47,7 @@ XSettings::valueSet (QString key, QString val) } void -XSettings::valueRegister (QString key, QString defval) +XSettings::value_register (QString key, QString defval) { m_client->config ()->valueRegister (key.toStdString (), defval.toStdString ()); diff --git a/lib/xsettings.h b/lib/xsettings.h index 8f727d4..bce8058 100644 --- a/lib/xsettings.h +++ b/lib/xsettings.h @@ -31,9 +31,9 @@ class XSettings : public QObject public: XSettings (QObject *parent, XClient *client); - QString valueGet (QString key); - void valueSet (QString key, QString value); - void valueRegister (QString key, QString defval); + QString value_get (QString key); + void value_set (QString key, QString value); + void value_register (QString key, QString defval); signals: void configChanged(QString key, QString value); diff --git a/src/Playlist.cpp b/src/Playlist.cpp index b100970..23fbdd4 100644 --- a/src/Playlist.cpp +++ b/src/Playlist.cpp @@ -48,7 +48,7 @@ PlaylistScrollBar::mouseMoveEvent (QMouseEvent *event) setValue(tmp); - //TODO only repaint necessyry range + //TODO only repaint necessary range repaint (); } @@ -303,6 +303,7 @@ PlaylistWidget::PlaylistWidget (QWidget *parent) : QWidget (parent) m_view = new PlaylistView (this); m_view->move (10, 20); m_view->resize (size().width()-30, size().height()-20-38); + // TODO: creation of Playlistmodel should be done elsewhere m_view->setModel (XMMSHandler::getInstance().getPlaylistModel()); //m_list = new PlaylistList (m_view); @@ -313,7 +314,6 @@ PlaylistWidget::PlaylistWidget (QWidget *parent) : QWidget (parent) * QT library (as of Version 4.3 * TODO: This might in a future Qt version. Try to find a better solution */ - //m_scroller = new PlaylistScrollBar (this); m_scrollBar = new PlaylistScrollBar (this); m_view->setVerticalScrollBar (m_scrollBar); m_scrollBar->setParent(this); @@ -324,6 +324,7 @@ PlaylistWidget::PlaylistWidget (QWidget *parent) : QWidget (parent) connect (m_scrollBar, SIGNAL(valueChanged (int)), m_view, SLOT(verticalScrollbarValueChanged (int))); + m_drag = new dragButton (this); m_drag->resize (30, 30); diff --git a/src/PlaylistList.cpp b/src/PlaylistList.cpp index 0309c1c..8b681d3 100644 --- a/src/PlaylistList.cpp +++ b/src/PlaylistList.cpp @@ -1,3 +1,4 @@ +// old File, not in use any more #include #include "XMMSHandler.h" diff --git a/src/PlaylistView.cpp b/src/PlaylistView.cpp index 5169948..9d52062 100644 --- a/src/PlaylistView.cpp +++ b/src/PlaylistView.cpp @@ -70,7 +70,6 @@ PlaylistDelegate::sizeHint ( const QStyleOptionViewItem &option, /* * PlaylistView */ -//PlaylistView::PlaylistView (QWidget *parent) : QTableView (parent) PlaylistView::PlaylistView (QWidget *parent) : QListView (parent) { QSettings s;