Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Pierogi
Summary Forums Tracker Lists Tasks Docs News SCM Files
1 #include "pirsecondaryform.h"
2 #include "ui_pirsecondaryform.h"
3 #include "mainwindow.h"
4 #include "pirkeysetmanager.h"
6 PIRSecondaryForm::PIRSecondaryForm(QWidget *parent) :
7   QWidget(parent),
8   ui(new Ui::PIRSecondaryForm)
9 {
10   ui->setupUi(this);
12   mainWindow = dynamic_cast<MainWindow *>(parent);
14   setAttribute(Qt::WA_Maemo5StackedWindow);
15   setWindowFlags(windowFlags() | Qt::Window);
16 }
18 PIRSecondaryForm::~PIRSecondaryForm()
19 {
20   delete ui;
21 }
23 void PIRSecondaryForm::enableButtons(
24   const PIRKeysetManager *keyset,
25   unsigned int id)
26 {
27   // TV Tab
28   emit teletextEnabled(keyset->hasKey(id, Teletext_Key));
29   emit teletextSizeEnabled(keyset->hasKey(id, TeletextSize_Key));
30   emit favoritesEnabled(keyset->hasKey(id, Favorites_Key));
31   emit pageUpEnabled(keyset->hasKey(id, PageUp_Key));
32   emit teletextHoldEnabled(keyset->hasKey(id, TeletextHold_Key));
33   emit teletextRevealEnabled(keyset->hasKey(id, TeletextReveal_Key));
34   emit liveTVEnabled(keyset->hasKey(id, LiveTV_Key));
35   emit pageDownEnabled(keyset->hasKey(id, PageDown_Key));
36   emit pipEnabled(keyset->hasKey(id, PIP_Key));
37   emit pipSwapEnabled(keyset->hasKey(id, PIPSwap_Key));
38   emit pipMoveEnabled(keyset->hasKey(id, PIPMove_Key));
39   emit pipSourceEnabled(keyset->hasKey(id, PIPSource_Key));
40   emit pipChannelUpEnabled(keyset->hasKey(id, PIPChannelUp_Key));
41   emit pipChannelDownEnabled(keyset->hasKey(id, PIPChannelDown_Key));
42   emit pipPauseEnabled(keyset->hasKey(id, PIPPause_Key));
43   emit pipSizeEnabled(keyset->hasKey(id, PIPSize_Key));
45   // Media2 Tab
46   emit tunerBandEnabled(keyset->hasKey(id, TunerBand_Key));
47   emit programEnabled(keyset->hasKey(id, Program_Key));
48   emit memoryEnabled(keyset->hasKey(id, Memory_Key));
49   emit callEnabled(keyset->hasKey(id, Call_Key));
50   emit autoTrackingEnabled(keyset->hasKey(id, AutoTracking_Key));
51   emit trackingMinusEnabled(keyset->hasKey(id, TrackingMinus_Key));
52   emit trackingPlusEnabled(keyset->hasKey(id, TrackingPlus_Key));
53   emit vhsSpeedEnabled(keyset->hasKey(id, VHSSpeed_Key));
54   emit slowEnabled(keyset->hasKey(id, Slow_Key));
55   emit slowMinusEnabled(keyset->hasKey(id, SlowMinus_Key));
56   emit slowPlusEnabled(keyset->hasKey(id, SlowPlus_Key));
57   emit nextDiscEnabled(keyset->hasKey(id, NextDisc_Key));
58   emit repeatEnabled(keyset->hasKey(id, Repeat_Key));
59   emit repeatABEnabled(keyset->hasKey(id, RepeatAB_Key));
60   emit randomEnabled(keyset->hasKey(id, Random_Key));
61   emit discTitleEnabled(keyset->hasKey(id, DiscTitle_Key));
63   // Input Tab
64   emit cdInputEnabled(keyset->hasKey(id, CDInput_Key));
65   emit tapeInputEnabled(keyset->hasKey(id, TapeInput_Key));
66   emit phonoInputEnabled(keyset->hasKey(id, PhonoInput_Key));
67   emit tunerInputEnabled(keyset->hasKey(id, TunerInput_Key));
68   emit pcInputEnabled(keyset->hasKey(id, PCInput_Key));
69   emit hdmiInputEnabled(keyset->hasKey(id, HDMIInput_Key));
70   emit dvdInputEnabled(keyset->hasKey(id, DVDInput_Key));
71   emit vcrInputEnabled(keyset->hasKey(id, VCRInput_Key));
72   emit antennaInputEnabled(keyset->hasKey(id, AntennaInput_Key));
73   emit cableInputEnabled(keyset->hasKey(id, CableInput_Key));
74   emit satelliteInputEnabled(keyset->hasKey(id, SatInput_Key));
75   emit auxInputEnabled(keyset->hasKey(id, AuxInput_Key));
77   // Adjust Tab
78   emit bassUpEnabled(keyset->hasKey(id, BassUp_Key));
79   emit trebleUpEnabled(keyset->hasKey(id, TrebleUp_Key));
80   emit enhancedBassEnabled(keyset->hasKey(id, EnhancedBass_Key));
81   emit noiseReductionEnabled(keyset->hasKey(id, NoiseReduction_Key));
82   emit bassDownEnabled(keyset->hasKey(id, BassDown_Key));
83   emit trebleDownEnabled(keyset->hasKey(id, TrebleDown_Key));
84   emit balanceLeftEnabled(keyset->hasKey(id, BalanceLeft_Key));
85   emit balanceRightEnabled(keyset->hasKey(id, BalanceRight_Key));
86   emit soundModeEnabled(keyset->hasKey(id, SoundMode_Key));
87   emit colorUpEnabled(keyset->hasKey(id, ColorUp_Key));
88   emit brightnessUpEnabled(keyset->hasKey(id, BrightnessUp_Key));
89   emit contrastUpEnabled(keyset->hasKey(id, ContrastUp_Key));
90   emit pictureModeEnabled(keyset->hasKey(id, PictureMode_Key));
91   emit colorDownEnabled(keyset->hasKey(id, ColorDown_Key));
92   emit brightnessDownEnabled(keyset->hasKey(id, BrightnessDown_Key));
93   emit contrastDownEnabled(keyset->hasKey(id, ContrastDown_Key));
94 }
96 // TV Tab
98 void PIRSecondaryForm::on_teletextButton_pressed()
99 {
100   mainWindow->startRepeating(Teletext_Key);
103 void PIRSecondaryForm::on_teletextButton_released()
105   mainWindow->stopRepeating();
108 void PIRSecondaryForm::on_teletextSizeButton_pressed()
110   mainWindow->startRepeating(TeletextSize_Key);
113 void PIRSecondaryForm::on_teletextSizeButton_released()
115   mainWindow->stopRepeating();
118 void PIRSecondaryForm::on_favoritesButton_pressed()
120   mainWindow->startRepeating(Favorites_Key);
123 void PIRSecondaryForm::on_favoritesButton_released()
125   mainWindow->stopRepeating();
128 void PIRSecondaryForm::on_pageUpButton_pressed()
130   mainWindow->startRepeating(PageUp_Key);
133 void PIRSecondaryForm::on_pageUpButton_released()
135   mainWindow->stopRepeating();
138 void PIRSecondaryForm::on_teletextHoldButton_pressed()
140   mainWindow->startRepeating(TeletextHold_Key);
143 void PIRSecondaryForm::on_teletextHoldButton_released()
145   mainWindow->stopRepeating();
148 void PIRSecondaryForm::on_teletextRevealButton_pressed()
150   mainWindow->startRepeating(TeletextReveal_Key);
153 void PIRSecondaryForm::on_teletextRevealButton_released()
155   mainWindow->stopRepeating();
158 void PIRSecondaryForm::on_liveTVButton_pressed()
160   mainWindow->startRepeating(LiveTV_Key);
163 void PIRSecondaryForm::on_liveTVButton_released()
165   mainWindow->stopRepeating();
168 void PIRSecondaryForm::on_pageDownButton_pressed()
170   mainWindow->startRepeating(PageDown_Key);
173 void PIRSecondaryForm::on_pageDownButton_released()
175   mainWindow->stopRepeating();
178 void PIRSecondaryForm::on_pipButton_pressed()
180   mainWindow->startRepeating(PIP_Key);
183 void PIRSecondaryForm::on_pipButton_released()
185   mainWindow->stopRepeating();
188 void PIRSecondaryForm::on_pipSwapButton_pressed()
190   mainWindow->startRepeating(PIPSwap_Key);
193 void PIRSecondaryForm::on_pipSwapButton_released()
195   mainWindow->stopRepeating();
198 void PIRSecondaryForm::on_pipMoveButton_pressed()
200   mainWindow->startRepeating(PIPMove_Key);
203 void PIRSecondaryForm::on_pipMoveButton_released()
205   mainWindow->stopRepeating();
208 void PIRSecondaryForm::on_pipSourceButton_pressed()
210   mainWindow->startRepeating(PIPSource_Key);
213 void PIRSecondaryForm::on_pipSourceButton_released()
215   mainWindow->stopRepeating();
218 void PIRSecondaryForm::on_pipChannelUpButton_pressed()
220   mainWindow->startRepeating(PIPChannelUp_Key);
223 void PIRSecondaryForm::on_pipChannelUpButton_released()
225   mainWindow->stopRepeating();
228 void PIRSecondaryForm::on_pipChannelDownButton_pressed()
230   mainWindow->startRepeating(PIPChannelDown_Key);
233 void PIRSecondaryForm::on_pipChannelDownButton_released()
235   mainWindow->stopRepeating();
238 void PIRSecondaryForm::on_pipPauseButton_pressed()
240   mainWindow->startRepeating(PIPPause_Key);
243 void PIRSecondaryForm::on_pipPauseButton_released()
245   mainWindow->stopRepeating();
248 void PIRSecondaryForm::on_pipSizeButton_pressed()
250   mainWindow->startRepeating(PIPSize_Key);
253 void PIRSecondaryForm::on_pipSizeButton_released()
255   mainWindow->stopRepeating();
259 // Media 2 Tab
261 void PIRSecondaryForm::on_tunerBandButton_pressed()
263   mainWindow->startRepeating(TunerBand_Key);
266 void PIRSecondaryForm::on_tunerBandButton_released()
268   mainWindow->stopRepeating();
271 void PIRSecondaryForm::on_programButton_pressed()
273   mainWindow->startRepeating(Program_Key);
276 void PIRSecondaryForm::on_programButton_released()
278   mainWindow->stopRepeating();
281 void PIRSecondaryForm::on_memoryButton_pressed()
283   mainWindow->startRepeating(Memory_Key);
286 void PIRSecondaryForm::on_memoryButton_released()
288   mainWindow->stopRepeating();
291 void PIRSecondaryForm::on_callButton_pressed()
293   mainWindow->startRepeating(Call_Key);
296 void PIRSecondaryForm::on_callButton_released()
298   mainWindow->stopRepeating();
301 void PIRSecondaryForm::on_autoTrackingButton_pressed()
303   mainWindow->startRepeating(AutoTracking_Key);
306 void PIRSecondaryForm::on_autoTrackingButton_released()
308   mainWindow->stopRepeating();
311 void PIRSecondaryForm::on_trackingMinusButton_pressed()
313   mainWindow->startRepeating(TrackingMinus_Key);
316 void PIRSecondaryForm::on_trackingMinusButton_released()
318   mainWindow->stopRepeating();
321 void PIRSecondaryForm::on_trackingPlusButton_pressed()
323   mainWindow->startRepeating(TrackingPlus_Key);
326 void PIRSecondaryForm::on_trackingPlusButton_released()
328   mainWindow->stopRepeating();
331 void PIRSecondaryForm::on_vhsSpeedButton_pressed()
333   mainWindow->startRepeating(VHSSpeed_Key);
336 void PIRSecondaryForm::on_vhsSpeedButton_released()
338   mainWindow->stopRepeating();
341 void PIRSecondaryForm::on_slowButton_pressed()
343   mainWindow->startRepeating(Slow_Key);
346 void PIRSecondaryForm::on_slowButton_released()
348   mainWindow->stopRepeating();
351 void PIRSecondaryForm::on_slowMinusButton_pressed()
353   mainWindow->startRepeating(SlowMinus_Key);
356 void PIRSecondaryForm::on_slowMinusButton_released()
358   mainWindow->stopRepeating();
361 void PIRSecondaryForm::on_slowPlusButton_pressed()
363   mainWindow->startRepeating(SlowPlus_Key);
366 void PIRSecondaryForm::on_slowPlusButton_released()
368   mainWindow->stopRepeating();
371 void PIRSecondaryForm::on_discSelectButton_pressed()
373   mainWindow->startRepeating(NextDisc_Key);
376 void PIRSecondaryForm::on_discSelectButton_released()
378   mainWindow->stopRepeating();
381 void PIRSecondaryForm::on_repeatButton_pressed()
383   mainWindow->startRepeating(Repeat_Key);
386 void PIRSecondaryForm::on_repeatButton_released()
388   mainWindow->stopRepeating();
391 void PIRSecondaryForm::on_repeatABButton_pressed()
393   mainWindow->startRepeating(RepeatAB_Key);
396 void PIRSecondaryForm::on_repeatABButton_released()
398   mainWindow->stopRepeating();
401 void PIRSecondaryForm::on_randomButton_pressed()
403   mainWindow->startRepeating(Random_Key);
406 void PIRSecondaryForm::on_randomButton_released()
408   mainWindow->stopRepeating();
411 void PIRSecondaryForm::on_discTitleButton_pressed()
413   mainWindow->startRepeating(DiscTitle_Key);
416 void PIRSecondaryForm::on_discTitleButton_released()
418   mainWindow->stopRepeating();
422 // Input Tab
424 void PIRSecondaryForm::on_cdInputButton_pressed()
426   mainWindow->startRepeating(CDInput_Key);
429 void PIRSecondaryForm::on_cdInputButton_released()
431   mainWindow->stopRepeating();
434 void PIRSecondaryForm::on_tapeInputButton_pressed()
436   mainWindow->startRepeating(TapeInput_Key);
439 void PIRSecondaryForm::on_tapeInputButton_released()
441   mainWindow->stopRepeating();
444 void PIRSecondaryForm::on_phonoInputButton_pressed()
446   mainWindow->startRepeating(PhonoInput_Key);
449 void PIRSecondaryForm::on_phonoInputButton_released()
451   mainWindow->stopRepeating();
454 void PIRSecondaryForm::on_tunerInputButton_pressed()
456   mainWindow->startRepeating(TunerInput_Key);
459 void PIRSecondaryForm::on_tunerInputButton_released()
461   mainWindow->stopRepeating();
464 void PIRSecondaryForm::on_pcInputButton_pressed()
466   mainWindow->startRepeating(PCInput_Key);
469 void PIRSecondaryForm::on_pcInputButton_released()
471   mainWindow->stopRepeating();
474 void PIRSecondaryForm::on_hdmiInputButton_pressed()
476   mainWindow->startRepeating(HDMIInput_Key);
479 void PIRSecondaryForm::on_hdmiInputButton_released()
481   mainWindow->stopRepeating();
484 void PIRSecondaryForm::on_dvdInputButton_pressed()
486   mainWindow->startRepeating(DVDInput_Key);
489 void PIRSecondaryForm::on_dvdInputButton_released()
491   mainWindow->stopRepeating();
494 void PIRSecondaryForm::on_vcrInputButton_pressed()
496   mainWindow->startRepeating(VCRInput_Key);
499 void PIRSecondaryForm::on_vcrInputButton_released()
501   mainWindow->stopRepeating();
504 void PIRSecondaryForm::on_antennaInputButton_pressed()
506   mainWindow->startRepeating(AntennaInput_Key);
509 void PIRSecondaryForm::on_antennaInputButton_released()
511   mainWindow->stopRepeating();
514 void PIRSecondaryForm::on_cableInputButton_pressed()
516   mainWindow->startRepeating(CableInput_Key);
519 void PIRSecondaryForm::on_cableInputButton_released()
521   mainWindow->stopRepeating();
524 void PIRSecondaryForm::on_satelliteInputButton_pressed()
526   mainWindow->startRepeating(SatInput_Key);
529 void PIRSecondaryForm::on_satelliteInputButton_released()
531   mainWindow->stopRepeating();
534 void PIRSecondaryForm::on_auxInputButton_pressed()
536   mainWindow->startRepeating(AuxInput_Key);
539 void PIRSecondaryForm::on_auxInputButton_released()
541   mainWindow->stopRepeating();
545 // Adjust Tab
547 void PIRSecondaryForm::on_bassUpButton_pressed()
549   mainWindow->startRepeating(BassUp_Key);
552 void PIRSecondaryForm::on_bassUpButton_released()
554   mainWindow->stopRepeating();
557 void PIRSecondaryForm::on_trebleUpButton_pressed()
559   mainWindow->startRepeating(TrebleUp_Key);
562 void PIRSecondaryForm::on_trebleUpButton_released()
564   mainWindow->stopRepeating();
567 void PIRSecondaryForm::on_enhancedBassButton_pressed()
569   mainWindow->startRepeating(EnhancedBass_Key);
572 void PIRSecondaryForm::on_enhancedBassButton_released()
574   mainWindow->stopRepeating();
577 void PIRSecondaryForm::on_noiseReductionButton_pressed()
579   mainWindow->startRepeating(NoiseReduction_Key);
582 void PIRSecondaryForm::on_noiseReductionButton_released()
584   mainWindow->stopRepeating();
587 void PIRSecondaryForm::on_bassDownButton_pressed()
589   mainWindow->startRepeating(BassDown_Key);
592 void PIRSecondaryForm::on_bassDownButton_released()
594   mainWindow->stopRepeating();
597 void PIRSecondaryForm::on_trebleDownButton_pressed()
599   mainWindow->startRepeating(TrebleDown_Key);
602 void PIRSecondaryForm::on_trebleDownButton_released()
604   mainWindow->stopRepeating();
607 void PIRSecondaryForm::on_balanceLeftButton_pressed()
609   mainWindow->startRepeating(BalanceLeft_Key);
612 void PIRSecondaryForm::on_balanceLeftButton_released()
614   mainWindow->stopRepeating();
617 void PIRSecondaryForm::on_balanceRightButton_pressed()
619   mainWindow->startRepeating(BalanceRight_Key);
622 void PIRSecondaryForm::on_balanceRightButton_released()
624   mainWindow->stopRepeating();
627 void PIRSecondaryForm::on_soundModeButton_pressed()
629   mainWindow->startRepeating(SoundMode_Key);
632 void PIRSecondaryForm::on_soundModeButton_released()
634   mainWindow->stopRepeating();
637 void PIRSecondaryForm::on_colorUpButton_pressed()
639   mainWindow->startRepeating(ColorUp_Key);
642 void PIRSecondaryForm::on_colorUpButton_released()
644   mainWindow->stopRepeating();
647 void PIRSecondaryForm::on_brightnessUpButton_pressed()
649   mainWindow->startRepeating(BrightnessUp_Key);
652 void PIRSecondaryForm::on_brightnessUpButton_released()
654   mainWindow->stopRepeating();
657 void PIRSecondaryForm::on_contrastUpButton_pressed()
659   mainWindow->startRepeating(ContrastUp_Key);
662 void PIRSecondaryForm::on_contrastUpButton_released()
664   mainWindow->stopRepeating();
667 void PIRSecondaryForm::on_pictureModeButton_pressed()
669   mainWindow->startRepeating(PictureMode_Key);
672 void PIRSecondaryForm::on_pictureModeButton_released()
674   mainWindow->stopRepeating();
677 void PIRSecondaryForm::on_colorDownButton_pressed()
679   mainWindow->startRepeating(ColorDown_Key);
682 void PIRSecondaryForm::on_colorDownButton_released()
684   mainWindow->stopRepeating();
687 void PIRSecondaryForm::on_brightnessDownButton_pressed()
689   mainWindow->startRepeating(BrightnessDown_Key);
692 void PIRSecondaryForm::on_brightnessDownButton_released()
694   mainWindow->stopRepeating();
697 void PIRSecondaryForm::on_contrastDownButton_pressed()
699   mainWindow->startRepeating(ContrastDown_Key);
702 void PIRSecondaryForm::on_contrastDownButton_released()
704   mainWindow->stopRepeating();

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment