-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaylist.h
151 lines (118 loc) · 3.37 KB
/
playlist.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
kModPlayer - Qt-Based Mod Player
$Id$
Copyright 1996 Bernd Johannes Wuebben math.cornell.edu
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef PLAY_LIST_H
#define PLAY_LIST_H
#include <qdatetime.h>
#include <qlineedit.h>
//#include <qdialog.h>
#include <qwidget.h>
#include <qlabel.h>
#include <qstrlist.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qfiledialog.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qdir.h>
#include <qpainter.h>
#include <qapplication.h>
#include <qpopupmenu.h>
#include <qkeycode.h>
#include <kmenubar.h>
//#include <qlineedit.h>
#include <qframe.h>
#include <kmainwindow.h>
#include "kmidi.h"
class QSplitter;
class QFrame;
class MyListBoxItem : public QListBoxItem{
public:
MyListBoxItem( const QString &s, const QPixmap p )
: QListBoxItem(), pm(p)
{ setText( s ); }
protected:
virtual void paint( QPainter * );
virtual int height( const QListBox * ) const;
virtual int width( const QListBox * ) const;
virtual const QPixmap *pixmap() { return ± }
public:
QString filename;
QString size;
QString month;
QString day_and_time;
QPixmap pm;
};
class PlaylistEdit : public KMainWindow {
Q_OBJECT
public:
PlaylistEdit(const char *name=0, QStringList *playlist = 0,
int *current_playlist_ptr=0, QStringList *listplaylists = 0);
~PlaylistEdit();
//private:
// void resizeEvent(QResizeEvent *e);
private slots:
void newPlaylist();
// void help();
void savePlaylistbyName(const QString &name, bool truncate);
void removeEntry();
void addEntry();
void setFilter();
void checkList();
void clearPlist();
void select_all();
void local_file_selected(int index);
void loadPlaylist(const QString &name);
void readPlaylist(int index);
void selectPlaylist(int index);
void saveIt();
void removeIt();
void appendIt();
void invokeWhatsThis();
protected:
void parse_fileinfo(QFileInfo*, MyListBoxItem*);
void set_local_dir(const QString &dir);
void redoplist();
void redoDisplay();
//void closeEvent( QCloseEvent *e );
bool queryClose();
public:
QString current_playlist;
void redoLists();
private:
bool starting_up;
bool showmidisonly;
QDir cur_local_dir;
QPtrList<QFileInfo> cur_local_fileinfo;
QListBox *local_list;
QSplitter *hpanner, *vpanner;
QLabel *statusbar;
KMenuBar *menu;
QListBox* listbox;
QListBox* plistbox;
//QPushButton* filterButton;
//QPushButton* addButton;
//QPushButton* okButton;
//QPushButton* removeButton;
//QPushButton* cancelButton;
QWhatsThis *what;
QStringList* songlist;
QStringList* listsonglist;
int *playlist_ptr;
//QPopupMenu *savenew;
QPopupMenu *view;
};
#endif /* PLAY_LIST_H */