- connect(_library_form, SIGNAL(player()), this, SLOT(player()));
- connect(add_directory, SIGNAL(triggered()), this, SLOT(_add_directory()));
- connect(save_playlist, SIGNAL(triggered()), this, SLOT(_save_playlist()));
- connect(clear_playlist, SIGNAL(triggered()), this, SLOT(_clear_current_playlist()));
- connect(_library, SIGNAL(done()), this, SLOT(library()));
- connect(_library_form, SIGNAL(done()), this, SLOT(library()));
- connect(_library_form, SIGNAL(busy(QString)), this, SLOT(showBusyWidget(QString)));
- connect(ui->searchButton, SIGNAL(clicked()), this, SLOT(_toggle_search_line()));
- connect(_player_form, SIGNAL(showSearchPanel()), this, SLOT(showSearchPanel()));
- connect(_player_form, SIGNAL(hideSearchPanel()), this, SLOT(hideSearchPanel()));
- connect(ui->searchLine, SIGNAL(textChanged(QString)), this, SLOT(_search(QString)));
- connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(_nextItem()));
- connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(_prevItem()));
- hideSearchPanel();
- library();
+ connect(_library_form, SIGNAL(refreshPlayer()), this, SLOT(player()));
+ connect(ui->actionManageLibrary, SIGNAL(triggered()), this, SLOT(_manage_library()));
+ connect(ui->actionSavePlaylist, SIGNAL(triggered()), this, SLOT(_save_playlist()));
+ connect(ui->actionImport, SIGNAL(triggered()), this, SLOT(_import_playlits()));
+ connect(_player_form, SIGNAL(clearPlaylist()), this, SLOT(_clear_current_playlist()));
+ connect(ui->actionSetTimer, SIGNAL(triggered()), this, SLOT(_set_timer()));
+ connect(ui->actionEqualizer, SIGNAL(triggered()), this, SLOT(_equalizer()));
+ connect(ui->actionOnlineHelp, SIGNAL(triggered()), _about_form, SLOT(onlineHelp()));
+ connect(_library, SIGNAL(done()), _library_form, SLOT(refresh()));
+ connect(_player_form, SIGNAL(refreshLibrary()), _library_form, SLOT(refresh()));
+ connect(_manage_library_form, SIGNAL(refreshLibrary()), _library_form, SLOT(refresh()));
+ connect(_timer, SIGNAL(timeout()), this, SLOT(_timeout()));
+ connect(_equalizer_dialog, SIGNAL(valueChanged(int,int)), this, SLOT(_equalizer_value_changed(int, int)));
+ connect(_equalizer_dialog, SIGNAL(equalizerEnabled()), _player_form, SLOT(enableEqualizer()));
+ connect(_equalizer_dialog, SIGNAL(equalizerDisabled()), _player_form, SLOT(disableEqualizer()));
+ connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(_orientation_changed()));
+ connect(_player_form, SIGNAL(fullscreen(bool)), this, SLOT(_fullscreen(bool)));
+ connect(_library_form, SIGNAL(addAndPlay(Track)), _player_form, SLOT(play(Track)));
+ connect(_directory_form, SIGNAL(addAndPlay(Track)), _player_form, SLOT(play(Track)));
+ connect(_player_form, SIGNAL(dirView()), _directory_form, SLOT(show()));
+ connect(_directory_form, SIGNAL(addTracks(QList<Track>)), this, SLOT(_add_tracks(QList<Track>)));
+ connect(_directory_form, SIGNAL(clearCurrent()), this, SLOT(_clear_current()));
+ connect(_settings_form, SIGNAL(iconsChanged()), _player_form, SLOT(updateIcons()));
+ connect(_settings_form, SIGNAL(iconsChanged()), _library_form, SLOT(updateIcons()));
+ connect(_settings_form, SIGNAL(iconsChanged()), _manage_library_form, SLOT(updateIcons()));
+ connect(_settings_form, SIGNAL(iconsChanged()), _directory_form, SLOT(updateIcons()));
+ connect(_settings_form, SIGNAL(iconsChanged()), _about_form, SLOT(updateIcons()));
+ connect(_settings_form, SIGNAL(gradientChanged()), _player_form, SLOT(checkGradient()));
+ connect(_settings_form, SIGNAL(gradientChanged()), _library_form, SLOT(checkGradient()));
+ connect(_settings_form, SIGNAL(gradientChanged()), _directory_form, SLOT(checkGradient()));
+ connect(_settings_form, SIGNAL(libraryOptionsChanged()), _library_form, SLOT(refresh()));
+ connect(_settings_form, SIGNAL(orientationChanged()), this, SLOT(_change_orientation()));
+ connect(_settings_form, SIGNAL(translationChanged()), this, SLOT(updateTranslations()));
+ connect(_settings_form, SIGNAL(trackColorChanged()), _player_form, SLOT(updateTrackColor()));
+ connect(_settings_form, SIGNAL(hwZoomPolicyChanged()), this, SLOT(_hw_zoom_policy_changed()));
+ connect(&_dbus_client, SIGNAL(displayStateChanged(bool)), this, SLOT(_set_display_state(bool)));
+ connect(_settings_form, SIGNAL(fmtxSettingsChanged()), this, SLOT(_fmtx_settings_changed()));
+ _player_form->reload(true);
+ QString mode = config.getValue("ui/orientation").toString();
+ if (mode == "landscape") {
+ setAttribute(Qt::WA_Maemo5LandscapeOrientation);
+ _player_form->landscapeMode();
+ _library_form->landscapeMode();
+ _equalizer_dialog->landscapeMode();
+ _directory_form->lanscapeMode();
+ _settings_form->landscapeMode();
+ } else if (mode == "portrait") {
+ setAttribute(Qt::WA_Maemo5PortraitOrientation);
+ _player_form->portraitMode();
+ _library_form->portraitMode();
+ _equalizer_dialog->portraitMode();
+ _directory_form->portraitMode();
+ _settings_form->portraitMode();
+ } else if (mode == "auto") { // initialization in landscape
+ _player_form->landscapeMode();
+ _library_form->landscapeMode();
+ _equalizer_dialog->landscapeMode();
+ _directory_form->lanscapeMode();
+ _settings_form->landscapeMode();
+ setAttribute(Qt::WA_Maemo5AutoOrientation);
+ }
+ _library_form->updateIcons();
+ _player_form->updateIcons();
+ _manage_library_form->updateIcons();
+ _directory_form->updateIcons();
+ _player_form->checkGradient();
+ _library_form->checkGradient();
+ _directory_form->checkGradient();
+ _hw_zoom_policy_changed();
+ config.setValue("fmtx/enabled", "no");
+ setWindowTitle("SomePlayer");
+
+ QList<QWidget *> widgets = ui->centralWidget->findChildren<QWidget *>();
+ foreach (QWidget *widget, widgets) {
+ if (widget->objectName() != "searchLine") {
+ widget->installEventFilter(this);
+ }
+ }