Change playlist to use Esperanza's playlistmodel
This commit is contained in:
parent
85cf6a8d1c
commit
503385309b
96 changed files with 2010 additions and 412 deletions
|
@ -1,57 +0,0 @@
|
|||
#ifndef __SERVER_BROWSER_H__
|
||||
#define __SERVER_BROWSER_H__
|
||||
|
||||
#include "XMMSHandler.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QListWidget>
|
||||
#include <QMainWindow>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <avahi-client/client.h>
|
||||
#include <avahi-client/lookup.h>
|
||||
#include <avahi-common/malloc.h>
|
||||
#include <avahi-common/error.h>
|
||||
#include <avahi-qt4/qt-watch.h>
|
||||
|
||||
class ServerItem : public QListWidgetItem {
|
||||
public:
|
||||
ServerItem (QIcon i, const QString &name, const QString &path, QListWidget *parent) :
|
||||
QListWidgetItem (i, name, parent) {
|
||||
m_path = path;
|
||||
setToolTip (m_path);
|
||||
}
|
||||
QString path (void) const { return m_path; }
|
||||
private:
|
||||
QString m_path;
|
||||
};
|
||||
|
||||
class ServerBrowserList : public QListWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ServerBrowserList (QWidget *parent);
|
||||
~ServerBrowserList ();
|
||||
void addServer (const QString &, const QString &);
|
||||
bool setupAvahi (void);
|
||||
AvahiClient *client (void) const { return m_client; }
|
||||
|
||||
public slots:
|
||||
void connectServer (QListWidgetItem *);
|
||||
|
||||
private:
|
||||
const AvahiPoll *m_poll;
|
||||
AvahiClient *m_client;
|
||||
AvahiServiceBrowser *m_sb;
|
||||
};
|
||||
|
||||
class ServerBrowserWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ServerBrowserWindow (QWidget *parent);
|
||||
~ServerBrowserWindow () {}
|
||||
private:
|
||||
ServerBrowserList *m_list;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue