aboutsummaryrefslogtreecommitdiff
path: root/src/ui/shadedvisual.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-02-27 15:35:31 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-02-27 15:35:31 +0000
commitce3cede8e1a681db0ad13477881058f6c3c5a6c6 (patch)
tree7bfec17a579266f05968e05d2274bae7854d0f7d /src/ui/shadedvisual.h
parentd36f67b99809a6fd3ca88832a998a0a1fd0de890 (diff)
downloadqmmp-ce3cede8e1a681db0ad13477881058f6c3c5a6c6.tar.gz
qmmp-ce3cede8e1a681db0ad13477881058f6c3c5a6c6.tar.bz2
qmmp-ce3cede8e1a681db0ad13477881058f6c3c5a6c6.zip
updated Czech translation (Karel Volný)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@809 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/shadedvisual.h')
0 files changed, 0 insertions, 0 deletions
ow.cpp?id=34926703d41859a1e225638fa6d3c62e66332e65'>34926703d
2d622fd9b
4b6239e2e
3ffc8b54a
7a3c89bf2
d184b2ace
06d187781
a4da0eb5e

058812044
c2a415452
43ee25ac7
90d3aeb64
f47fcc22a
4cb1b1275
92f1159a1
4cb1b1275

2d622fd9b
2d622fd9b

2d622fd9b


fa0e5a060
86aac72c6
49ba6c2fa
24af8da3f
2d622fd9b
8b0f1481b
080507d3a
db37033dd
2d622fd9b
49ba6c2fa


2d622fd9b
11b7655bb
edfa16a7b
dd4abc389
912ee1ab6
2e6fa0a14
2d622fd9b
eac0064e6

e956dd352
24af8da3f
b8b7804fc
b2e1612aa

c08f92cd6
92f1159a1
f47fcc22a

2d622fd9b
a9d09f1a9




79340c153

a9d09f1a9



912ee1ab6
2d622fd9b

97c98d9d5


2d622fd9b
90d3aeb64
2d622fd9b



2d622fd9b
49ae26a0d
fd6e0ed37
49ae26a0d
2702b572b
f47fcc22a
f47fcc22a
2e6fa0a14
f47fcc22a




1484a13bf
f47fcc22a

2d622fd9b
92f1159a1

2d622fd9b
0e860ae0b

76095a463
c08f92cd6
bd3bb4892
06d187781
f47fcc22a
97c98d9d5

f47fcc22a
90d3aeb64
c08f92cd6
54e207710
2d622fd9b

2d622fd9b
053884732
2d622fd9b


f47fcc22a
2d622fd9b



36460a06f
90d3aeb64
2d622fd9b


080507d3a

30e11dd37
080507d3a



30e11dd37
2d622fd9b

2d622fd9b






88a5a4439
2d622fd9b
e656da41c
2d622fd9b

fedd13511
2d622fd9b
e656da41c
2d622fd9b

f47fcc22a
2d622fd9b

0e860ae0b




053884732

0e860ae0b
0e860ae0b
0e860ae0b
0e860ae0b
0e860ae0b
0e860ae0b

0e860ae0b
90d3aeb64
76095a463

eac0064e6
053884732
76095a463
eac0064e6

76095a463

43ee25ac7
2d622fd9b
2972e8742

7a1e2a811




2d622fd9b

ca4ab68d9






2d622fd9b

c08f92cd6
2d622fd9b



d44fb37b3
2d622fd9b

1484a13bf




86aac72c6
2d622fd9b


97c98d9d5
2d622fd9b




ae75e5707
fa1e4194b
034128b6d
2731ececc

2d622fd9b
2731ececc















22617b420
2731ececc




34926703d









11b7655bb
fa1e4194b
2295f52f6

22617b420
2295f52f6
fa1e4194b
2295f52f6
2d622fd9b
a6eba9ecc
2d622fd9b
fa1e4194b
f56054da3
fa1e4194b
0a9bc84fa
2d622fd9b
92f1159a1




d60ec0e8d
013ee07b5
2d622fd9b
49ba6c2fa
2295f52f6
4be19e3fd
49ba6c2fa
5ae46a29f
fa1e4194b
5ae46a29f


fa1e4194b
5ae46a29f


fa1e4194b
5ae46a29f


fa1e4194b

da7c4209e


2d622fd9b



ae75e5707
fa1e4194b
2d622fd9b
fa1e4194b

2295f52f6


632ca92a1
2d622fd9b




00a72dd68
4cb1b1275
deb8cb930

00a72dd68
4cb1b1275
00a72dd68
4cb1b1275
40c82a8a1
2d622fd9b



d28e87a85
2d622fd9b

a6eba9ecc

97c98d9d5

a42fba17b
ef849d74d




a42fba17b
a6eba9ecc

2d622fd9b

d28e87a85
2d622fd9b
46a95c311
2295f52f6
4be19e3fd
46a95c311

2d622fd9b


2d622fd9b



a6eba9ecc
2d622fd9b
a6eba9ecc
2d622fd9b

bd3bb4892

e44646900
bd3bb4892







2d622fd9b


2295f52f6





2d622fd9b
a1715a3b0
6d1217944
2295f52f6






632ca92a1
6d1217944

92f1159a1



d60ec0e8d
2295f52f6


92f1159a1
2295f52f6
92f1159a1
2295f52f6
d60ec0e8d
2295f52f6
92f1159a1
2295f52f6
6d1217944
b3e010787
e9574015d

b3e010787


86aac72c6

c08f92cd6
b3e010787
86aac72c6
2295f52f6
2d622fd9b
2295f52f6

2d622fd9b
ce067a843
080507d3a







ef0abefb6
0b96bbb6b
2d622fd9b

2d622fd9b

f40087159
2d622fd9b

46a95c311



46a95c311




2d622fd9b




2d622fd9b

c08f92cd6
2d622fd9b



c08f92cd6
2d622fd9b

2d622fd9b

0e860ae0b
f47fcc22a
2d622fd9b



a1715a3b0
2d622fd9b
dc0e3abbb
2d622fd9b

97c98d9d5
8cbd1444b
aecf85927
8cbd1444b
06d187781
06d187781

97c98d9d5
06d187781







2e6fa0a14




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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
                                                                            
                                                                            
                                                                            













                                                                            
                                                                            
                                                                             



                      
                         
                 
                           
                        
                                 
                            
                           

                                  
                                      
                              
                                 
                                   
                               
                                
                                  

                            
                       

                     


                       
                       
                       
                         
                          
 
                        
 
                                                             
 


                                                                                            
              
                     
                                                         
                                                                                                       
 
                         
 

                                                      
                            
 
                                       

                                               
                                      
                                               

                    
                            




                                                              

                                                             



                                                                  
 

                                


                                      
 
                                                  



                                     
 
                    
                           
                                                               
                                   
                       
                 
                                                                              




                                                                
                                                           

                                                                     
 

                                                                                                   
 

                                                                                      
                                                                    
                                                                                    
                                                                              
 
                   

                                  
                       
                                                               
                                                         
                           

 
                         
  


                       
                     



                         
           
                                                                     


           

                          
                                                 



                           
                                                                  

 






                            
                     
 
 

                       
                     
 
 

                           
                         

 




                                             

                                                                                                            
              
                      
              
                       
                                

              
 
 

                               
                                                                           
                                                                     
     

                                                       

 
                                           
 

                                                           




                             

 






                                         

                         
                                   



                          
                               

 




                                
                                             


                                                  
                                               




                               
                                                                 
                                   
                                                                                                       

                 
     















                                                                                                
 




                                                                                                     









                                                                                                   
                                                                       
                                                           

                                                                       
                                                                     
         
                                                                                           
                                                                                     
               
                              
                    
                                                                           
                              
                                                                            
                              
                         




                                                                                            
                                                                                               
                        
     
               
                                                                                          
                                                        
      
                                          
                                                                  


                                   
                                                           


                                                 
                                                           


                                                

                                                                    


                                                                               



                                
                                                                 
                                   
              

                                             


                                                                                              
                                                                                           




                               
                                                      
                                                                 

                                                                                                   
                       
                                     
                              
                     
                                             



                                   
                                    

               

                         

                                                                 
               




                                                              
      

                              

                          
                         
         
               
                                                                                              
                                                            

                


        



                                     
               
     
                          

 

                               
                                   







                           


                                 





                                                                                          
                               
                                                                                      
                               






                                                                                                    
                                                                                                  

                                                        



                                                                                                              
                                                                    


                                                                                                
                                                               
                                                                       
                                                                 
                                                                         
                                                                   
                                                                          
                                                        
                                                                    
 
                                                        

                                                                                         


                                                                                                         

                                     
                                                                                         
 
                               
                                                                                           
                               

                                                                                      
                               
                                                                                     







                                                                    
                                                                           
                                                                       

 

                        
                            

 



                                 




                                   




                         

                               
                                   



                               
                                   

 

                            
                                         
                        



               
                              
 
                                  

 
                         
 
                             
 
 

                                             
                     







                                                                                             




                                     
/***************************************************************************
 *   Copyright (C) 2006-2017 by Ilya Kotov                                 *
 *   forkotov02@ya.ru                                                      *
 *                                                                         *
 *   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 of the License, 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.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/
#include <QFileDialog>
#include <QDir>
#include <QAction>
#include <QMenu>
#include <QDesktopWidget>
#include <math.h>
#include <qmmp/soundcore.h>
#include <qmmp/visual.h>
#include <qmmp/metadatamanager.h>
#include <qmmpui/uihelper.h>
#include <qmmpui/general.h>
#include <qmmpui/playlistparser.h>
#include <qmmpui/playlistformat.h>
#include <qmmpui/commandlinemanager.h>
#include <qmmpui/filedialog.h>
#include <qmmpui/playlistmodel.h>
#include <qmmpui/playlistmanager.h>
#include <qmmpui/mediaplayer.h>
#include <qmmpui/configdialog.h>
#include <qmmpui/qmmpuisettings.h>
#include "hotkeyeditor.h"
#include "skinnedsettings.h"
#include "mainwindow.h"
#include "skin.h"
#include "playlist.h"
#include "dock.h"
#include "eqwidget.h"
#include "mainvisual.h"
#include "listwidget.h"
#include "visualmenu.h"
#include "windowsystem.h"
#include "actionmanager.h"

#define KEY_OFFSET 10000

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
#ifdef Q_WS_X11
    qDebug("MainWindow: detected wm: %s", qPrintable(WindowSystem::netWindowManagerName()));
#endif
    m_vis = 0;
    m_update = false;
    setWindowFlags(Qt::Window | Qt::FramelessWindowHint |
                   Qt::WindowCloseButtonHint | Qt::WindowMinMaxButtonsHint | Qt::WindowSystemMenuHint);

    restoreWindowTitle();

    m_titleFormatter.setPattern("%if(%p,%p - %t,%t)");

    new ActionManager(this);

    m_player = MediaPlayer::instance();
    m_core = SoundCore::instance();
    m_pl_manager = PlayListManager::instance();
    m_uiHelper = UiHelper::instance();
    m_ui_settings = QmmpUiSettings::instance();

    //user interface
    m_skin = new Skin(this);
#ifdef Q_WS_X11
    QString wm_name = WindowSystem::netWindowManagerName();
    if(wm_name.contains("metacity", Qt::CaseInsensitive) ||
            wm_name.contains("marko", Qt::CaseInsensitive) ||
            wm_name.contains("mutter", Qt::CaseInsensitive) ||
            wm_name.contains("gnome", Qt::CaseInsensitive) ||
            wm_name.contains("fvwm", Qt::CaseInsensitive))
        resize(275 * m_skin->ratio(),116 * m_skin->ratio());
    else
#endif
        setFixedSize(275 * m_skin->ratio(),116 * m_skin->ratio());

    Dock *dock = new Dock(this);
    dock->setMainWidget(this);
    m_display = new MainDisplay(this);
    setCentralWidget(m_display);
    m_display->setFocus ();

    m_playlist = new PlayList(m_pl_manager, this);
    dock->addWidget(m_playlist);

    m_equalizer = new EqWidget(this);
    dock->addWidget(m_equalizer);

    createActions();
    //prepare visualization
    Visual::initialize(this, m_visMenu, SLOT(updateActions()));
    m_vis = MainVisual::instance();
    Visual::add(m_vis);
    //connections
    connect (m_player,SIGNAL(playbackFinished()), SLOT(restoreWindowTitle()));
    connect (m_playlist,SIGNAL(next()),SLOT(next()));
    connect (m_playlist,SIGNAL(prev()),SLOT(previous()));
    connect (m_playlist,SIGNAL(play()),SLOT(play()));
    connect (m_playlist,SIGNAL(pause()), m_core ,SLOT(pause()));
    connect (m_playlist,SIGNAL(stop()),SLOT(stop()));
    connect (m_playlist,SIGNAL(eject()),SLOT(playFiles()));
    connect (m_playlist,SIGNAL(loadPlaylist()),SLOT(loadPlaylist()));
    connect (m_playlist,SIGNAL(savePlaylist()),SLOT(savePlaylist()));

    connect(m_display,SIGNAL(shuffleToggled(bool)),m_ui_settings,SLOT(setShuffle(bool)));
    connect(m_display,SIGNAL(repeatableToggled(bool)),m_ui_settings,SLOT(setRepeatableList(bool)));

    connect(m_core, SIGNAL(stateChanged(Qmmp::State)), SLOT(showState(Qmmp::State)));
    connect(m_core, SIGNAL(elapsedChanged(qint64)),m_playlist, SLOT(setTime(qint64)));
    connect(m_core, SIGNAL(metaDataChanged()),SLOT(showMetaData()));
    connect(m_uiHelper, SIGNAL(toggleVisibilityCalled()), SLOT(toggleVisibility()));
    connect(m_uiHelper, SIGNAL(showMainWindowCalled()), SLOT(showAndRaise()));

    readSettings();
    m_display->setEQ(m_equalizer);
    m_display->setPL(m_playlist);
    dock->updateDock();
    m_pl_manager->currentPlayList()->doCurrentVisibleRequest();
    if (m_startHidden && m_uiHelper->visibilityControl())
        toggleVisibility();
}

MainWindow::~MainWindow()
{}

void MainWindow::play()
{
    m_player->play();
}

void MainWindow::replay()
{
    stop();