#include <QMutex>
#include <QtGui/QMessageBox>
#include <QSettings>
+#include <QMaemo5InformationBox>
#include "pirkeysetwidgetitem.h"
#include "pirselectkeysetform.h"
emit volumeDownEnabled(myKeysets->hasKey(currentKeyset, VolumeDown_Key));
emit channelUpEnabled(myKeysets->hasKey(currentKeyset, ChannelUp_Key));
emit channelDownEnabled(myKeysets->hasKey(currentKeyset, ChannelDown_Key));
+ emit muteEnabled(myKeysets->hasKey(currentKeyset, Mute_Key));
// Main tab labels:
emit keysetMakeChanged(
emit greenEnabled(myKeysets->hasKey(currentKeyset, Green_Key));
emit yellowEnabled(myKeysets->hasKey(currentKeyset, Yellow_Key));
emit blueEnabled(myKeysets->hasKey(currentKeyset, Blue_Key));
+ emit pictureModeEnabled(myKeysets->hasKey(currentKeyset, PictureMode_Key));
+ emit soundModeEnabled(myKeysets->hasKey(currentKeyset, SoundMode_Key));
emit aspectRatioEnabled(myKeysets->hasKey(currentKeyset, AspectRatio_Key));
- emit surroundEnabled(myKeysets->hasKey(currentKeyset, Surround_Key));
+// emit surroundEnabled(myKeysets->hasKey(currentKeyset, Surround_Key));
emit audioEnabled(myKeysets->hasKey(currentKeyset, Audio_Key));
emit infoEnabled(myKeysets->hasKey(currentKeyset, Info_Key));
emit captionsEnabled(myKeysets->hasKey(currentKeyset, Captions_Key));
emit sleepEnabled(myKeysets->hasKey(currentKeyset, Sleep_Key));
emit inputEnabled(myKeysets->hasKey(currentKeyset, Input_Key));
- emit muteEnabled(myKeysets->hasKey(currentKeyset, Mute_Key));
// Keypad keys
emit zeroEnabled(myKeysets->hasKey(currentKeyset, Zero_Key));
stopRepeating();
}
+void MainWindow::on_muteButton_pressed()
+{
+ startRepeating(Mute_Key);
+}
+
+void MainWindow::on_muteButton_released()
+{
+ stopRepeating();
+}
+
// Utility tab buttons:
stopRepeating();
}
+void MainWindow::on_pictureModeButton_pressed()
+{
+ startRepeating(PictureMode_Key);
+}
+
+void MainWindow::on_pictureModeButton_released()
+{
+ stopRepeating();
+}
+
+void MainWindow::on_soundModeButton_pressed()
+{
+ startRepeating(SoundMode_Key);
+}
+
+void MainWindow::on_soundModeButton_released()
+{
+ stopRepeating();
+}
+
void MainWindow::on_aspectRatioButton_pressed()
{
startRepeating(AspectRatio_Key);
stopRepeating();
}
+/*
void MainWindow::on_surroundButton_pressed()
{
startRepeating(Surround_Key);
{
stopRepeating();
}
+*/
void MainWindow::on_audioButton_pressed()
{
stopRepeating();
}
-void MainWindow::on_muteButton_pressed()
-{
- startRepeating(Mute_Key);
-}
-
-void MainWindow::on_muteButton_released()
-{
- stopRepeating();
-}
-
// Keypad tab buttons:
stopRepeatingFlag = true;
}
+
+QWidget *MainWindow::getSecondaryWindow()
+{
+ return secondaryForm;
+}
+
+
+void MainWindow::selectPrevFavKeyset()
+{
+ int size = ui->favoriteKeysetsWidget->count();
+
+ if (size == 0)
+ {
+ // No favorites, so nothing to do!
+ return;
+ }
+
+ int position = ui->favoriteKeysetsWidget->currentRow();
+
+ --position;
+ if (position < 0)
+ {
+ position = size - 1;
+ }
+
+ ui->favoriteKeysetsWidget->setCurrentRow(
+ position,
+ QItemSelectionModel::ClearAndSelect);
+
+ // Tell the user about the change:
+ QMaemo5InformationBox::information(
+ 0,
+ ui->favoriteKeysetsWidget->item(position)->text());
+}
+
+
+void MainWindow::selectNextFavKeyset()
+{
+ int size = ui->favoriteKeysetsWidget->count();
+
+ if (size == 0)
+ {
+ // No favorites, so just return:
+ return;
+ }
+
+ int position = ui->favoriteKeysetsWidget->currentRow();
+
+ ++position;
+ if (position == size)
+ {
+ position = 0;
+ }
+
+ ui->favoriteKeysetsWidget->setCurrentRow(
+ position,
+ QItemSelectionModel::ClearAndSelect);
+
+ // Tell the user about the change:
+ QMaemo5InformationBox::information(
+ 0,
+ ui->favoriteKeysetsWidget->item(position)->text());
+}