-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui_contextview.h
executable file
·127 lines (108 loc) · 3.46 KB
/
ui_contextview.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#ifndef UI_CONTEXTVIEW_H
#define UI_CONTEXTVIEW_H
#include <QWidget>
#include <QMenu>
#include <QListWidgetItem>
#include <QPushButton>
#include <QMessageBox>
#include <QInputDialog>
#include <QLabel>
//Local includes
#include "networkaccess.h"
#include "mpdalbum.h"
#include "mpdartist.h"
#include "mpdtrack.h"
#include "mpdfileentry.h"
#include "wlitrack.h"
#include "wlifile.h"
#include "ui_songinfo.h"
#include "QsKineticScroller.h"
#include "commondebug.h"
//DEFINE FOR KDE PLASMOID
//#define QMPDPLASMOID_KDE
//DEFINE FOR QMOBILEMPD don't set unless compiling qmobilempd
#define QMOBILEMPD
enum viewmode {viewmode_currentplaylist,viewmode_artistalbums,viewmode_artists,viewmode_albums,viewmode_albumtracks,viewmode_alltracks,viewmode_savedplaylists,viewmode_playlisttracks,viewmode_files,viewmode_currentsonginfo,viewmode_count};
namespace Ui {
class Ui_ContextView;
}
class Ui_ContextView : public QWidget
{
Q_OBJECT
public:
explicit Ui_ContextView(QWidget *parent = 0);
Ui_ContextView(QWidget *parent, NetworkAccess *netaccess);
~Ui_ContextView();
void setCurrentPlayingId(qint32 id,quint8 play);
bool doubleClickToSelect();
private:
Ui::Ui_ContextView *ui;
qint32 playingid;
quint32 playlistversion;
int currentmode;
QString currentartist;
QString currentalbum;
QString currentplaylist;
QString currentpath;
//Holds current tracks in playlist for performance
ui_SongInfo *songinfo;
NetworkAccess *netaccess;
QsKineticScroller *kineticscroller;
QMenu *m_contextMenu;
QAction *act_addToPlaylist;
void disconnectSelectSignals();
void setupAnimations();
//Bounces out
void slideListWidgetLeft();
//Bounces in
void slideListWidgetRight();
//Bounce Out animation
QPropertyAnimation *listoutanimation;
//Bounce In animation
QPropertyAnimation *listinanimation;
void setupContextMenu();
bool playlistchanged;
quint8 playinglaststate;
bool doubleclick;
QList<MpdTrack*> *lastplaylist;
QString backscrolltext;
void scrollTo(QString itemtext);
public slots:
void showArtists();
void showAlbums();
void showTracks();
void showFiles(QString path);
void showArtistAlbums(QListWidgetItem *item);
void showAlbumTracks(QListWidgetItem *item);
void showPlaylistTracks(QListWidgetItem *item);
void showLibrarySongInfo(QListWidgetItem *item);
void hideLibrarySongInfo();
void playSelectedSong(QListWidgetItem *item);
void showCurrentPlaylist();
void setPlaylistVersion(int version);
void setDoubleClickNeeded(bool dbl);
protected slots:
void playButtonDispatcher();
void addButtonDispatcher();
void addAlbumToPlaylist();
void backButtonDispatcher();
void afterAnimationshowArtists();
void afterAnimationshowAlbums();
void afterAnimationshowCurrentPlaylist();
void realignWidgets();
void savePlaylist();
void showPlaylists();
void clearPlaylist();
void quitApplication();
void updateStatus(status_struct tempstruct);
void disconnectedFromServer();
void connectedToServer();
void filesClickedDispatcher(QListWidgetItem *item);
void selectedDispatcher(QListWidgetItem *item);
void scrollTo();
signals:
void exitrequested();
void requestMaximised(bool);
void showCurrentSongInfo();
};
#endif // UI_CONTEXTVIEW_H