promoe/src/playlist/playlistview.h
Thomas Frauendorfer d0d07f7553 OTHER: Make the settingsdialog emit a settingsChanged Signal
It's now no longer necessary to restart promoe for new settings to take effect.
The Signal is piped through Application.
Updated the classes that are affected by settings changes
Removed some now unused code from XMMSHandler
2008-10-31 04:53:09 +01:00

81 lines
2 KiB
C++

/**
* This file is a part of Promoe, an XMMS2 Client.
*
* Copyright (C) 2005-2008 XMMS2 Team
*
* 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; version 2 of the License.
*
* 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.
*/
#ifndef __PLAYLISTVIEW_H__
#define __PLAYLISTVIEW_H__
//include "Playlist.h"
#include <xmmsclient/xmmsclient++.h>
#include "entryinfo.h"
class Skin;
#include <QObject>
#include <QAbstractItemDelegate>
#include <QListView>
#include <QPointer>
class QWidget;
class QModelIndex;
class PlaylistDelegate : public QAbstractItemDelegate {
Q_OBJECT
public:
PlaylistDelegate (QObject *parent = NULL);
~PlaylistDelegate () { }
void paint( QPainter * painter, const QStyleOptionViewItem & option,
const QModelIndex & index ) const;
QSize sizeHint ( const QStyleOptionViewItem &option,
const QModelIndex &index ) const;
};
class PlaylistView : public QListView {
Q_OBJECT
public:
PlaylistView (QWidget *parent);
~PlaylistView () {}
void setModel (QAbstractItemModel *model);
public slots:
void contextMenuEvent (QContextMenuEvent *e);
void handleStatus (const Xmms::Playback::Status st);
void invertSelection (void);
void cropSelected (void);
void removeSelected (void);
void showEntryInfo (void);
void settingsChanged (void);
void setPixmaps (Skin *skin);
protected:
void mouseDoubleClickEvent (QMouseEvent *event);
private:
Xmms::Playback::Status m_status;
QFont *m_font;
QFontMetrics *m_fontmetrics;
QColor m_color_active;
QColor m_color_selected;
QColor m_color_normal;
QColor m_color_normal_bg;
QPointer<EntryInfo> m_entry_info;
};
#endif