Last update of gforge repository
[tablet-suite] / src / style / styleTabletSuite.py
1 from ui.pcsuiutils import *
2
3 STYLESHEET = ''' 
4             QPushButton {
5                 min-height:33px; 
6                 min-width:64px; 
7                 max-height:33px;
8                 max-width:64px;
9                 border: none; 
10                 qproperty-icon: none; 
11                 qproperty-focusPolicy: NoFocus;
12                 background-image: url(''' + BACKUP_BUTTON_DEFAULT +''');
13             }
14             
15             QPushButton::pressed {
16                 background-image: url(''' + BACKUP_BUTTON_DEFAULT_CLICKED + ''');
17             }
18             
19             QPushButton::enabled {
20                 color:black;
21             }
22             
23             QPushButton#tsButton {
24                 color : #636060;
25                 background-image: url(''' + BUTTON_BG +''');
26                 min-height:33px; 
27                 min-width:91px;
28                 max-height:32px;
29                 max-width:93px;
30                 border: none; 
31                 qproperty-focusPolicy : NoFocus;
32                 qproperty-icon: none; 
33             }
34             
35             QPushButton#tsButton::pressed {
36                 background-image: url(''' + BUTTON_BG_CLICKED + ''');
37             }
38             
39             QPushButton#smallButton {
40                 color : gray;
41                 border-image: url(''' + BUTTON_BG +''');
42                 min-height:20px; 
43                 min-width:34px;
44                 max-height:20px;
45                 max-width:34px;
46                 border: none; 
47                 qproperty-focusPolicy : NoFocus;
48                 qproperty-icon: none; 
49                 background:transparent;
50             }
51             
52             QPushButton#smallButton::pressed {
53                 border-image: url(''' + BUTTON_BG_CLICKED + ''');
54                 background:transparent;
55             }
56             
57             QMainWindow {
58                 background-image: url(''' + BACKGROUND_IMAGE + ''');
59             }
60             
61             PcsBackup {
62                 background-image: url('''+ BACKUP_BG +''')
63             }
64             
65             PcsRestoreBackupUi {
66                 background-image: url('''+ RESTORE_BG +''')
67             }
68             
69             PcsBackupManagerUi{
70                 background-image: url('''+ MANAGER_BG +''')
71             }
72             
73             QListWidget {
74                 selection-background-color : transparent;
75             }
76             
77             QMenuBar::item {
78                 background: transparent;
79             }
80             
81             QMenuBar {
82                 background: transparent;
83             }
84             
85             QRadioButton{
86                 qproperty-focusPolicy: NoFocus;
87                 border-image: url('''+ CHECKBOX_BORDER +''');
88                 min-height: 38px; 
89                 max-height: 38px;
90             }
91             
92             QRadioButton::indicator:unchecked {
93                 image: url(''' + CHECKBOX_UNCHECKED + ''');
94             }
95             
96             QRadioButton::indicator:checked {
97                 image: url('''+ CHECKBOX_CHECKED +''');
98             }
99             
100             QCheckBox{
101                 border-image: url('''+ CHECKBOX_BORDER +''');
102                 qproperty-focusPolicy: NoFocus;
103                 spacing: 10px;
104                 min-height: 38px; 
105                 max-height: 38px;
106                 min-width: 230px; 
107                 max-width: 230px;
108             }
109             
110             QCheckBox::indicator:unchecked {
111                 image: url(''' + CHECKBOX_UNCHECKED + ''');
112             }
113             
114             QCheckBox::indicator:checked {
115                 image: url('''+ CHECKBOX_CHECKED +''');
116             }
117             
118             QScrollArea {
119                 background: none;
120                 margin-top : 0px;
121                 min-width: 270px;
122                 max-width: 270px; 
123                 min-height: 243px; 
124                 max-height: 243px;
125                 border-image :url('''+ COPY_BORDER +''');
126             }
127             
128             QScrollArea#restoreScroll {
129                 margin-top : 0px;
130                 min-width: 270px;
131                 max-width: 270px; 
132                 min-height: 150px; 
133                 max-height: 150px;
134                 border-image :url('''+ COPY_BORDER +''');
135             }
136         
137             QListWidget {
138                 border-style: inset;
139             }
140         
141             QInputDialog{
142                 background-image: url(''' + DEFAULT_BG + ''');
143             }
144       
145             QScrollBar::sub-line, QScrollBar::add-line{
146                 background:none;
147             } 
148             
149             QScrollBar::add-page, QScrollBar::sub-page{
150                 background:none;
151             }
152            
153             QScrollBar:vertical { 
154                 border-image: url(''' + SCROLL_BASE_V + '''); 
155                 background:none;
156                 margin: 0px;
157                 min-width:18px;
158                 max-width:18px;
159                 border: 1px solid grey;
160             }
161             
162             QScrollBar:handle:vertical { 
163                 border-image: url(''' + SCROLL_HANDLE_V +''');
164             }
165             
166             QScrollBar:horizontal{ 
167                 border-image: url(''' + SCROLL_BASE_H + '''); 
168                 background:none;
169                 margin: 0px;
170                 min-height:18px;
171                 max-height:18px;
172                 border: 1px solid grey;
173             }
174             
175             QScrollBar:handle:horizontal { 
176                 border-image: url(''' + SCROLL_HANDLE_H +''');
177             }
178                         
179             QPushButton#buttonBrowse {
180                 min-height:25px; 
181                 min-width:25px; 
182                 max-height:25px;
183                 max-width:25px;
184                 border: none; 
185                 qproperty-icon: none; 
186                 qproperty-focusPolicy : NoFocus;
187                 background-image: url(''' + BROWSE_BUTTON +''');
188             }
189             
190             QLineEdit {
191                 border-image: url(''' + BACKUP_NAME_BORDER +''');
192                 color: white;
193             }
194             
195             QLineEdit#backupNameField {
196                 border-image: url(''' + BACKUP_NAME_BORDER +''');
197                 color: white;
198                 min-height:20px; 
199                 min-width:171px; 
200                 max-height:20px;
201                 max-width:171px;
202             }
203             
204             QLineEdit#pathField {
205                 border-image: url(''' + PATH_BORDER +''');
206                 color: white;
207                 min-height:22px; 
208                 min-width:241px; 
209                 max-height:22px;
210                 max-width:241px;
211             }
212             
213             QLineEdit#ipField {
214                 border-image: url(''' + PATH_BORDER +''');
215                 color: white;
216                 min-height:22px; 
217                 min-width:215px; 
218                 max-height:22px;
219                 max-width:215px;
220             }
221             
222             QProgressBar#progressBarWizard {
223                 min-height: 18px; 
224                 min-width:  353px; 
225                 max-height: 18px;
226                 max-width:  353px;
227                 border-image: url(''' + PROGRESS_BAR_BORDER +''');
228             }
229             
230             QProgressBar#progressBarWizard::chunk{
231                 background-image:url(''' + PROGRESS_BAR_CHUNK +''');
232                 max-height: 18px;
233                 margin: 0px;
234             }
235             
236             QProgressBar#progressBarDialog {
237                 min-height: 18px; 
238                 min-width:  260px; 
239                 max-height: 18px;
240                 max-width:  260px;
241                 border-image: url(''' + PROGRESS_BAR_BORDER +''');
242             }
243             
244             QProgressBar#progressBarDialog::chunk{
245                 background-image:url(''' + PROGRESS_BAR_CHUNK_DIALOG +''');
246                 max-height: 18px;
247                 margin: 0px;
248             }
249             
250             QProgressDialog#progressDialog{
251                 background-image:url(''' + DEFAULT_BG +''');
252             }
253             
254             QWidget#DeviceListPanel {
255                 background-color: transparent;
256                 min-height: 265px; 
257                 min-width:  370px; 
258                 max-height: 265px;
259                 max-width:  370px;
260             }
261             
262             QTableView#ListView {
263                 border-image: url(''' + TABLE_BORDER + ''');
264                 background-color: transparent;
265                 qproperty-focusPolicy: NoFocus;
266                 color: white; 
267                 alternate-background-color: #afafaf;
268                 padding: 0px;
269                 selection-background-color: #ced1cc;
270                 selection-color: #1d544f;
271                 show-decoration-selected: 0;
272                 border: 2px;
273                 min-height: 200px; 
274                 max-height: 200px;
275                 min-width:  350px; 
276                 max-width:  350px;
277                 
278             }
279             
280             QTableView#ipList {
281                 border-image: url(''' + IP_LIST_BORDER + ''');
282                 background-color: transparent;
283                 qproperty-focusPolicy: NoFocus;
284                 color: white; 
285                 alternate-background-color: #afafaf;
286                 padding: 0px;
287                 selection-background-color: #ced1cc;
288                 selection-color: #1d544f;
289                 show-decoration-selected: 0;
290                 border: 2px;
291                 min-height: 120px; 
292                 max-height: 120px;
293                 min-width:  248px; 
294                 max-width:  248px;
295                 
296             }
297             
298             QScrollArea#listScrollArea {
299                 
300             }
301             
302             QHeaderView#listHeader {
303                 background-color: gray;
304                 
305             }
306             
307             QHeaderView#listHeader::section {
308                 border-top: 10px solid transparent;
309                 border-color: transparent;
310                 background-color: transparent;
311                 color: Black; 
312                 font: 10px;
313             }
314             
315             QTabWidget#tabBar::pane {
316                 border-top: 10px solid transparent;
317                 border-left: 40px solid transparent;
318                 background-color: transparent;
319             }
320             
321             QTabBar{
322                 background:transparent;
323                 margin: 0px;
324                 border: none;
325             }
326             
327             QTabBar::tab {
328                 background: red;
329                 border: 2px solid red;
330                 border-bottom-color: red;
331                 border-top-left-radius: 4px;
332                 border-top-right-radius: 4px;
333                 min-width: 8ex;
334                 padding: 2px;
335             }
336             
337             QTabBar::tab:selected {
338                 border-color: red;
339                 border-bottom-color: red;
340             }
341
342             
343             QTabBar#restoreTabs {
344                 qproperty-focusPolicy: NoFocus;
345             }
346             
347             QTabBar#restoreTabs::tab {
348                  background-color: transparent;
349                  border: none;
350                  min-width: 215px;
351                  max-width: 215px;
352                  padding: 0px;
353                  
354             }
355              
356             QTabBar#restoreTabs::tab:selected {
357                 color: white;
358             }
359             
360             QTabBar#restoreTabs::tab:!selected {
361                 color: black;
362             }
363
364             QTabBar#managerTabs {
365                 qproperty-focusPolicy: NoFocus;
366             }
367             
368             QTabBar#managerTabs::tab {
369                  background-color: transparent;
370                  border: none;
371                  min-width: 215px;
372                  max-width: 215px;
373                  padding: 0px;
374                  
375             }
376              
377             QTabBar#managerTabs::tab:selected {
378                 color: white;
379             }
380
381             QTabBar#managerTabs::tab:!selected {
382                 color: black;
383             }
384             
385             QDialog#connectDialog{
386                 background-image: url(''' + DEFAULT_BG + ''');
387                 border: none;
388                 min-height: 289px;
389                 max-height: 289px;
390                 min-width:  275px; 
391             }
392             
393             QDialog#viewDialog{
394                 background-image: url(''' + DEFAULT_BG + ''');
395                 border: none;
396                 min-height: 190px;
397                 max-height: 190px;
398                 min-width:  300px; 
399                 max-width:  300px;
400             }            
401             
402             QDialog#copyDialogToDevice{
403                 background-image: url(''' + DEFAULT_BG + ''');
404                 border: none;
405                 min-height: 140px;
406                 max-height: 140px;
407                 min-width:  230px; 
408                 max-width:  230px;
409             }
410             
411             QDialog#copyDialogFromDevice{
412                 background-image: url(''' + DEFAULT_BG + ''');
413                 border: none;
414                 min-height: 110px;
415                 max-height: 110px;
416                 min-width:  260px; 
417                 max-width:  260px;
418             }
419             
420             PcsRestoreDialog {
421                 background-image: url(''' + DEFAULT_BG + ''');
422                 border: none;
423                 min-height: 250px;
424                 max-height: 250px;
425                 min-width:  300px; 
426                 max-width:  300px;
427             }
428             
429             QListWidget#viewList{
430                 border-image: url(''' + VIEW_BORDER + ''');
431                 qproperty-focusPolicy: NoFocus;
432                 padding: 5px;
433             }
434             
435             PcsProgressDialog {
436                 background-image: url('''+ DEFAULT_BG +''');
437                 min-height: 150px;
438                 max-height: 150px;
439                 min-width:  295px; 
440                 max-width:  295px;                
441             }
442                    
443         '''
444         
445
446       
447         
448 BACKUP_BUTTON_STYLE = '''
449
450             QPushButton {
451                 color : gray;
452                 min-height:35px; 
453                 min-width:79px; 
454                 max-height:35px;
455                 max-width:79px;
456                 border: none; 
457                 qproperty-icon: none; 
458                 qproperty-focusPolicy : NoFocus;
459                 background-image: url(''' + BT_NEXT +''');
460             }
461             
462             QPushButton::pressed {
463                 background-image: url(''' +BT_NEXT_CLICKED + ''');
464             }
465             
466         '''
467         
468 DEFAULT_BUTTON_STYLE = '''
469
470             QPushButton {
471                 min-height:33px; 
472                 min-width:64px; 
473                 max-height:33px;
474                 max-width:64px;
475                 border: none; 
476                 qproperty-icon: none; 
477                 qproperty-focusPolicy : NoFocus;
478                 background-image: url(''' + BACKUP_BUTTON_DEFAULT +''');
479             }
480             
481             QPushButton::pressed {
482                 background-image: url(''' + BACKUP_BUTTON_DEFAULT_CLICKED + ''');
483             }
484             
485             QPushButton::enabled {
486                 color:black;
487             }
488             
489         '''
490 SMALL_DEFAULT_BUTTON_STYLE = '''
491
492             QPushButton {
493                 min-height:20px; 
494                 min-width:34px; 
495                 max-height:20px;
496                 max-width: 34px;
497                 border: none;
498                 qproperty-icon: none;
499                 qproperty-focusPolicy : NoFocus;
500                 background-image: url(''' + SMALL_DEFAULT_BUTTON + ''')
501             }
502             
503             QPushButton::pressed {
504                 background-image: url(''' + SMALL_DEFAULT_BUTTON_CLICKED + ''');
505             }
506             
507             QPushButton::enabled {
508                 color:black;
509             }
510
511             '''
512
513 SMALL_ICON_NEW_BACKUP_STYLE = '''
514             QPushButton {
515                 min-height:25px; 
516                 min-width:125px; 
517                 max-height:25px;
518                 max-width: 125px;
519                 border: none;
520                 qproperty-iconSize: 25px 25px;
521                 qproperty-focusPolicy : NoFocus;
522                 background: transparent;
523                 qproperty-icon: url(''' + SMALL_ICON_NEW_BACKUP + ''')
524             }
525
526             '''
527             
528 SMALL_ICON_NEW_BACKUP_STYLE_SELECTED = '''
529             QPushButton {
530                 color: white;
531                 min-height:25px; 
532                 min-width:125px; 
533                 max-height:25px;
534                 max-width: 125px;
535                 border: none;
536                 qproperty-iconSize: 25px 25px;
537                 qproperty-focusPolicy : NoFocus;
538                 background: transparent;
539                 qproperty-icon: url(''' + SMALL_ICON_NEW_BACKUP + ''')
540             }
541
542             '''
543             
544 SMALL_ICON_MANAGER_BACKUP_STYLE = '''
545             QPushButton {
546                 min-height:25px; 
547                 min-width:138px; 
548                 max-height:25px;
549                 max-width: 138px;
550                 border: none;
551                 qproperty-iconSize: 25px 25px;
552                 qproperty-focusPolicy : NoFocus;
553                 background: transparent;
554                 qproperty-icon: url(''' + SMALL_ICON_MANAGER_BACKUP + ''')
555             }
556
557             '''
558
559 SMALL_ICON_MANAGER_BACKUP_STYLE_SELECTED = '''
560             QPushButton {
561                 color: white;
562                 min-height:25px; 
563                 min-width:138px; 
564                 max-height:25px;
565                 max-width: 138px;
566                 border: none;
567                 qproperty-iconSize: 25px 25px;
568                 qproperty-focusPolicy : NoFocus;
569                 background: transparent;
570                 qproperty-icon: url(''' + SMALL_ICON_MANAGER_BACKUP + ''')
571             }
572
573             '''
574
575 SMALL_ICON_RESTORE_BACKUP_STYLE = '''
576             QPushButton {
577                 min-height:25px; 
578                 min-width:130px; 
579                 max-height:25px;
580                 max-width: 130px;
581                 border: none;
582                 qproperty-iconSize: 25px 25px;
583                 qproperty-focusPolicy : NoFocus;
584                 background: transparent;
585                 qproperty-icon: url(''' + SMALL_ICON_RESTORE_BACKUP + ''')
586             }
587
588             '''
589             
590 SMALL_ICON_RESTORE_BACKUP_STYLE_SELECTED = '''
591             QPushButton {
592                 color: white;
593                 min-height:25px; 
594                 min-width:130px; 
595                 max-height:25px;
596                 max-width: 130px;
597                 border: none;
598                 qproperty-iconSize: 25px 25px;
599                 qproperty-focusPolicy : NoFocus;
600                 background: transparent;
601                 qproperty-icon: url(''' + SMALL_ICON_RESTORE_BACKUP + ''')
602             }
603             '''
604 MESSAGE_BOX_DEFAULT = '''
605             
606             QMessageBox {
607                 background-image: url('''+ DEFAULT_BG +''');
608                 color: black;
609             }
610         ''' + DEFAULT_BUTTON_STYLE
611
612 MESSAGE_BOX_APP = '''
613             QMessageBox {
614                 background-image: url('''+ DEFAULT_BG +''');
615                 color: black;
616             }
617             QAbstractButton {
618                 color : #636060;
619                 background-image: url(''' + BUTTON_BG +''');
620                 min-height:33px; 
621                 min-width:91px;
622                 max-height:32px;
623                 max-width:93px;
624                 border: none; 
625                 qproperty-icon: none;
626                 qproperty-focusPolicy: NoFocus; 
627             }
628             QAbstractButton::pressed {
629                 background-image: url(''' + BUTTON_BG_CLICKED + ''');
630             }
631         '''
632