summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/playlistwidgetgui.h
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidgetgui.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.h126
1 files changed, 126 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
new file mode 100644
index 0000000..4c8d737
--- a/dev/null
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
@@ -0,0 +1,126 @@
1/*
2                This file is part of the Opie Project
3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =.
8 .=l.
9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details.
24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA.
31
32*/
33
34#ifndef PLAY_LIST_WIDGET_GUI_H
35#define PLAY_LIST_WIDGET_GUI_H
36
37#include <qmainwindow.h>
38#include <qpe/applnk.h>
39#include <qpe/resource.h>
40#include <qpe/qpemenubar.h>
41
42#include <qtabwidget.h>
43#include <qpe/fileselector.h>
44#include <qpushbutton.h>
45#include <qpopupmenu.h>
46#include <qaction.h>
47
48
49class PlayListWidgetPrivate;
50class PlayListSelection;
51
52class Config;
53class QPEToolBar;
54class QListViewItem;
55class QListView;
56class QPoint;
57class QAction;
58class QLabel;
59
60class PlayListWidgetPrivate {
61public:
62 QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove;
63 QFrame *playListFrame;
64 FileSelector *files;
65 PlayListSelection *selectedFiles;
66 bool setDocumentUsed;
67 DocLnk *current;
68};
69
70
71class ToolButton : public QToolButton {
72public:
73 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
74 : QToolButton( parent, name ) {
75 setTextLabel( name );
76 setPixmap( Resource::loadPixmap( icon ) );
77 setAutoRaise( TRUE );
78 setFocusPolicy( QWidget::NoFocus );
79 setToggleButton( t );
80 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
81 QPEMenuToolFocusManager::manager()->addWidget( this );
82 }
83};
84
85
86class MenuItem : public QAction {
87
88public:
89 MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot )
90 : QAction( text, QString::null, 0, 0 ) {
91 connect( this, SIGNAL( activated() ), handler, slot );
92 addTo( parent );
93 }
94};
95
96class PlayListWidgetGui : public QMainWindow {
97 Q_OBJECT
98public:
99 PlayListWidgetGui( QWidget* parent=0, const char* name=0, WFlags fl=0 );
100 ~PlayListWidgetGui();
101
102protected:
103 QTabWidget * tabWidget;
104 QListView *audioView, *videoView, *playlistView;
105 QLabel *libString;
106 QPopupMenu *pmView ;
107 bool fromSetDocument;
108 bool insanityBool;
109 QString setDocFileRef;
110 // retrieve the current playlist entry (media file link)
111 QPushButton *tbDeletePlaylist;
112 int selected;
113 QPopupMenu *pmPlayList;
114 FileSelector* playLists;
115 QPopupMenu *skinsMenu;
116 PlayListWidgetPrivate *d; // Private implementation data
117 QVBox *vbox1;
118 QVBox *vbox5;
119 QPEToolBar *bar;
120 void setActiveWindow(); // need to handle this to show the right view
121 void setView( char );
122
123};
124
125#endif
126