-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index 49f1786..30be4ba 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | |||
@@ -74,119 +74,119 @@ PlayListWidgetGui::PlayListWidgetGui(QWidget* parent, const char* name ) | |||
74 | pmPlayList = new QPopupMenu( this ); | 74 | pmPlayList = new QPopupMenu( this ); |
75 | menu->insertItem( tr( "File" ), pmPlayList ); | 75 | menu->insertItem( tr( "File" ), pmPlayList ); |
76 | 76 | ||
77 | pmView = new QPopupMenu( this ); | 77 | pmView = new QPopupMenu( this ); |
78 | menu->insertItem( tr( "View" ), pmView ); | 78 | menu->insertItem( tr( "View" ), pmView ); |
79 | pmView->isCheckable(); | 79 | pmView->isCheckable(); |
80 | 80 | ||
81 | skinsMenu = new QPopupMenu( this ); | 81 | skinsMenu = new QPopupMenu( this ); |
82 | pmView->insertItem( tr( "Skins" ), skinsMenu ); | 82 | pmView->insertItem( tr( "Skins" ), skinsMenu ); |
83 | skinsMenu->isCheckable(); | 83 | skinsMenu->isCheckable(); |
84 | 84 | ||
85 | gammaMenu = new QPopupMenu( this ); | 85 | gammaMenu = new QPopupMenu( this ); |
86 | pmView->insertItem( tr( "Gamma (Video)" ), gammaMenu ); | 86 | pmView->insertItem( tr( "Gamma (Video)" ), gammaMenu ); |
87 | 87 | ||
88 | gammaSlider = new QSlider( QSlider::Vertical, gammaMenu ); | 88 | gammaSlider = new QSlider( QSlider::Vertical, gammaMenu ); |
89 | gammaSlider->setRange( -40, 40 ); | 89 | gammaSlider->setRange( -40, 40 ); |
90 | gammaSlider->setTickmarks( QSlider::Left ); | 90 | gammaSlider->setTickmarks( QSlider::Left ); |
91 | gammaSlider->setTickInterval( 20 ); | 91 | gammaSlider->setTickInterval( 20 ); |
92 | gammaSlider->setFocusPolicy( QWidget::StrongFocus ); | 92 | gammaSlider->setFocusPolicy( QWidget::StrongFocus ); |
93 | gammaSlider->setValue( 0 ); | 93 | gammaSlider->setValue( 0 ); |
94 | gammaSlider->setMinimumHeight( 50 ); | 94 | gammaSlider->setMinimumHeight( 50 ); |
95 | 95 | ||
96 | gammaLCD = new QLCDNumber( 3, gammaMenu ); | 96 | gammaLCD = new QLCDNumber( 3, gammaMenu ); |
97 | gammaLCD-> setFrameShape ( QFrame::NoFrame ); | 97 | gammaLCD-> setFrameShape ( QFrame::NoFrame ); |
98 | gammaLCD-> setSegmentStyle ( QLCDNumber::Flat ); | 98 | gammaLCD-> setSegmentStyle ( QLCDNumber::Flat ); |
99 | 99 | ||
100 | gammaMenu->insertItem( gammaSlider ); | 100 | gammaMenu->insertItem( gammaSlider ); |
101 | gammaMenu->insertItem( gammaLCD ); | 101 | gammaMenu->insertItem( gammaLCD ); |
102 | 102 | ||
103 | connect( gammaSlider, SIGNAL( valueChanged(int) ), gammaLCD, SLOT( display(int) ) ); | 103 | connect( gammaSlider, SIGNAL( valueChanged(int) ), gammaLCD, SLOT( display(int) ) ); |
104 | 104 | ||
105 | vbox5 = new QVBox( this ); | 105 | vbox5 = new QVBox( this ); |
106 | QVBox *vbox4 = new QVBox( vbox5 ); | 106 | QVBox *vbox4 = new QVBox( vbox5 ); |
107 | QHBox *hbox6 = new QHBox( vbox4 ); | 107 | QHBox *hbox6 = new QHBox( vbox4 ); |
108 | 108 | ||
109 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); | 109 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); |
110 | 110 | ||
111 | playListTab = new QWidget( tabWidget, "PlayListTab" ); | 111 | playListTab = new QWidget( tabWidget, "PlayListTab" ); |
112 | tabWidget->insertTab( playListTab, "Playlist"); | 112 | tabWidget->insertTab( playListTab, "Playlist"); |
113 | 113 | ||
114 | QGridLayout *Playout = new QGridLayout( playListTab ); | 114 | QGridLayout *Playout = new QGridLayout( playListTab ); |
115 | Playout->setSpacing( 2); | 115 | Playout->setSpacing( 2); |
116 | Playout->setMargin( 2); | 116 | Playout->setMargin( 2); |
117 | 117 | ||
118 | // Add the playlist area | 118 | // Add the playlist area |
119 | QVBox *vbox3 = new QVBox( playListTab ); | 119 | QVBox *vbox3 = new QVBox( playListTab ); |
120 | d->playListFrame = vbox3; | 120 | d->playListFrame = vbox3; |
121 | 121 | ||
122 | QHBox *hbox2 = new QHBox( vbox3 ); | 122 | QHBox *hbox2 = new QHBox( vbox3 ); |
123 | d->selectedFiles = new PlayListSelection( hbox2 ); | 123 | d->selectedFiles = new PlayListSelection( hbox2 ); |
124 | 124 | ||
125 | vbox1 = new QVBox( hbox2 ); | 125 | vbox1 = new QVBox( hbox2 ); |
126 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold ); | 126 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold ); |
127 | QVBox *stretch1 = new QVBox( vbox1 ); // add stretch | 127 | QVBox *stretch1 = new QVBox( vbox1 ); // add stretch |
128 | 128 | ||
129 | Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 ); | 129 | Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 ); |
130 | 130 | ||
131 | QWidget *aTab; | 131 | QWidget *aTab; |
132 | aTab = new QWidget( tabWidget, "aTab" ); | 132 | aTab = new QWidget( tabWidget, "aTab" ); |
133 | 133 | ||
134 | QGridLayout *Alayout = new QGridLayout( aTab ); | 134 | QGridLayout *Alayout = new QGridLayout( aTab ); |
135 | Alayout->setSpacing( 2 ); | 135 | Alayout->setSpacing( 2 ); |
136 | Alayout->setMargin( 2 ); | 136 | Alayout->setMargin( 2 ); |
137 | // no m3u's here please | 137 | // no m3u's here please |
138 | audioView = new PlayListFileView( "audio/mpeg;audio/x-wav;application/ogg", "opieplayer2/musicfile", aTab, "Audioview" ); | 138 | audioView = new PlayListFileView( "audio/mpeg;audio/x-wav;audio/x-ogg;application/ogg", "opieplayer2/musicfile", aTab, "Audioview" ); |
139 | Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 ); | 139 | Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 ); |
140 | tabWidget->insertTab( aTab, tr( "Audio" ) ); | 140 | tabWidget->insertTab( aTab, tr( "Audio" ) ); |
141 | 141 | ||
142 | QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold ); | 142 | QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold ); |
143 | 143 | ||
144 | QWidget *vTab; | 144 | QWidget *vTab; |
145 | vTab = new QWidget( tabWidget, "vTab" ); | 145 | vTab = new QWidget( tabWidget, "vTab" ); |
146 | 146 | ||
147 | QGridLayout *Vlayout = new QGridLayout( vTab ); | 147 | QGridLayout *Vlayout = new QGridLayout( vTab ); |
148 | Vlayout->setSpacing( 2 ); | 148 | Vlayout->setSpacing( 2 ); |
149 | Vlayout->setMargin( 2 ); | 149 | Vlayout->setMargin( 2 ); |
150 | videoView = new PlayListFileView( "video/*", "opieplayer2/videofile", vTab, "Videoview" ); | 150 | videoView = new PlayListFileView( "video/*", "opieplayer2/videofile", vTab, "Videoview" ); |
151 | Vlayout->addMultiCellWidget( videoView, 0, 0, 0, 1 ); | 151 | Vlayout->addMultiCellWidget( videoView, 0, 0, 0, 1 ); |
152 | 152 | ||
153 | QPEApplication::setStylusOperation( videoView->viewport(), QPEApplication::RightOnHold ); | 153 | QPEApplication::setStylusOperation( videoView->viewport(), QPEApplication::RightOnHold ); |
154 | 154 | ||
155 | tabWidget->insertTab( vTab, tr( "Video" ) ); | 155 | tabWidget->insertTab( vTab, tr( "Video" ) ); |
156 | 156 | ||
157 | //playlists list | 157 | //playlists list |
158 | QWidget *LTab; | 158 | QWidget *LTab; |
159 | LTab = new QWidget( tabWidget, "LTab" ); | 159 | LTab = new QWidget( tabWidget, "LTab" ); |
160 | QGridLayout *Llayout = new QGridLayout( LTab ); | 160 | QGridLayout *Llayout = new QGridLayout( LTab ); |
161 | Llayout->setSpacing( 2 ); | 161 | Llayout->setSpacing( 2 ); |
162 | Llayout->setMargin( 2 ); | 162 | Llayout->setMargin( 2 ); |
163 | 163 | ||
164 | playLists = new FileSelector( "playlist/plain;audio/x-mpegurl", LTab, "fileselector" , FALSE, FALSE ); | 164 | playLists = new FileSelector( "playlist/plain;audio/x-mpegurl", LTab, "fileselector" , FALSE, FALSE ); |
165 | Llayout->addMultiCellWidget( playLists, 0, 0, 0, 1 ); | 165 | Llayout->addMultiCellWidget( playLists, 0, 0, 0, 1 ); |
166 | 166 | ||
167 | tabWidget->insertTab( LTab, tr( "Lists" ) ); | 167 | tabWidget->insertTab( LTab, tr( "Lists" ) ); |
168 | 168 | ||
169 | setCentralWidget( vbox5 ); | 169 | setCentralWidget( vbox5 ); |
170 | } | 170 | } |
171 | 171 | ||
172 | 172 | ||
173 | 173 | ||
174 | PlayListWidgetGui::~PlayListWidgetGui() { | 174 | PlayListWidgetGui::~PlayListWidgetGui() { |
175 | } | 175 | } |
176 | 176 | ||
177 | void PlayListWidgetGui::setView( char view ) { | 177 | void PlayListWidgetGui::setView( char view ) { |
178 | if ( view == 'l' ) | 178 | if ( view == 'l' ) |
179 | showMaximized(); | 179 | showMaximized(); |
180 | else | 180 | else |
181 | hide(); | 181 | hide(); |
182 | } | 182 | } |
183 | 183 | ||
184 | 184 | ||
185 | void PlayListWidgetGui::setActiveWindow() { | 185 | void PlayListWidgetGui::setActiveWindow() { |
186 | // When we get raised we need to ensure that it switches views | 186 | // When we get raised we need to ensure that it switches views |
187 | MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType(); | 187 | MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType(); |
188 | mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate | 188 | mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate |
189 | mediaPlayerState->setDisplayType( origDisplayType ); // now switch back | 189 | mediaPlayerState->setDisplayType( origDisplayType ); // now switch back |
190 | } | 190 | } |
191 | 191 | ||
192 | 192 | ||