Implemented settings dialog and refactored accordingly.
authordruid23 <usr@dru-id.co.uk>
Wed, 8 Sep 2010 02:06:57 +0000 (03:06 +0100)
committerdruid23 <usr@dru-id.co.uk>
Wed, 8 Sep 2010 02:06:57 +0000 (03:06 +0100)
modified:   src/appsettings.cpp
modified:   src/appsettings.h
modified:   src/playermainwindow.cpp
modified:   src/playermainwindow.h
modified:   src/playermainwindow.ui
new file:   src/settingsdialog.cpp
new file:   src/settingsdialog.h
new file:   src/settingsdialog.ui
modified:   src/src.pro

src/appsettings.cpp
src/appsettings.h
src/playermainwindow.cpp
src/playermainwindow.h
src/playermainwindow.ui
src/settingsdialog.cpp [new file with mode: 0644]
src/settingsdialog.h [new file with mode: 0644]
src/settingsdialog.ui [new file with mode: 0644]
src/src.pro

index 1a48354..0707023 100644 (file)
@@ -159,10 +159,10 @@ int AppSettings::getPingTimeout() {
     }
     return _pingTimeout;
 }
-int AppSettings::setPingTimeout(int havePingTimeout) {
+int AppSettings::setPingTimeout(int pingTimeout) {
     QSettings sets;
-    sets.setValue("config/pingTimeout", havePingTimeout);
-    _havePingTimeout = havePingTimeout;
+    sets.setValue("config/pingTimeout", pingTimeout);
+    _pingTimeout = pingTimeout;
     _havePingTimeout = true;
     return _pingTimeout;
 }
index 8280a18..1121b49 100644 (file)
@@ -32,7 +32,7 @@
 #define RETRIEVE_ART_TIMEOUT 500
 #endif
 #ifndef RETRY_NETWORK_TIMEOUT
-#define RETRY_NETWORK_TIMEOUT 20000
+#define RETRY_NETWORK_TIMEOUT 25000
 #endif
 
 #ifndef SHOW_UNKNOWN_FILETYPES
index a400cd7..f5b5d55 100644 (file)
   #include "configdialog.h"
   #include "aboutdialog.h"
   #include "accountdialog.h"
+  #include "settingsdialog.h"
   #include "appsettings.h"
 #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
 #include <QMaemo5InformationBox>
 #endif
+#include <QMessageBox>
 
   PlayerMainWindow::PlayerMainWindow(QWidget *parent) :
          QMainWindow(parent),
   #endif
 
       connect(mTimer,SIGNAL(timeout()),this,SLOT(askStatus()));
+      connect(ui->actionSettings,SIGNAL(triggered()),this,SLOT(showSettings()));
       connect(ui->actionConfiguration,SIGNAL(triggered()),this,SLOT(showConfig()));
       connect(ui->actionAbout,SIGNAL(triggered()),this,SLOT(showAbout()));
-      connect(ui->actionPortrait,SIGNAL(triggered()),this,SLOT(setPortrait()));
-      connect(ui->actionLandscape,SIGNAL(triggered()),this,SLOT(setLandscape()));
-      connect(ui->actionAutoRotate,SIGNAL(triggered()),this,SLOT(setAutoRotate()));
+      connect(ui->actionFavourites,SIGNAL(triggered()),this,SLOT(showFavourites()));
+      //connect(ui->actionPortrait,SIGNAL(triggered()),this,SLOT(setPortrait()));
+      //connect(ui->actionLandscape,SIGNAL(triggered()),this,SLOT(setLandscape()));
+      //connect(ui->actionAutoRotate,SIGNAL(triggered()),this,SLOT(setAutoRotate()));
       connect(ui->playlistButton,SIGNAL(clicked()),mPlayListMainWindow,SLOT(show()));
       connect(ui->playlistButton,SIGNAL(clicked()),mPlayListMainWindow,SLOT(showPlayList()));
       connect(ui->browseButton,SIGNAL(clicked()),mBrowserMainWindow,SLOT(show()));
       mFavouritesMainWindow->init();
   }
 
+  void PlayerMainWindow::updateFromSettings()
+  {
+    #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    switch (AppSettings::getOrientation()) {
+      case LANDSCAPE:
+          this->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
+          break;
+      case PORTRAIT:
+          this->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+          break;
+      case AUTO_ROTATE:
+          this->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+          break;
+    }
+    #endif
+    if (AppSettings::getShowAlbumArt()) {
+        this->mIsFirstStatusCall = true;
+    }
+    mTimer->start(AppSettings::getStatusPollTimeout());
+  }
+
   void PlayerMainWindow::setPortrait()
   {
     #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
       mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=seek&val="+QString::number(value)+"%25")));
   }
 
+  void PlayerMainWindow::showSettings()
+  {
+    SettingsDialog * dialog = new SettingsDialog(this);
+    connect(dialog, SIGNAL(closeSignal()), this, SLOT(updateFromSettings()));
+    dialog->exec();
+  }
   void PlayerMainWindow::showConfig()
   {
       mTimer->stop();
           ui->playpauseButton->setIcon(QIcon::fromTheme("camera_playback"));
       }
 
-      if (STOP == mCurrentStatus.state) {
+      if (STOP == mCurrentStatus.state || !AppSettings::getShowAlbumArt()) {
           ui->labelArtPortrait->setVisible(false);
           ui->labelArtLandscape->setVisible(false);
       }
           // potential actions:
           //   rebuild display layout
           //   retrieve album art
-          mHasImage = false;
-          QTimer::singleShot(AppSettings::getRetrieveArtTimeout(), mPlayListMainWindow, SLOT(requestPlayList()));
+          if (AppSettings::getShowAlbumArt()) {
+              mHasImage = false;
+              QTimer::singleShot(AppSettings::getRetrieveArtTimeout(), mPlayListMainWindow, SLOT(requestPlayList()));
+          }
       }
       // Update the buttons on the playlist window
       if (NULL != this->mPlayListMainWindow) {
         ui->labelArtPortrait->setVisible(true);
     }
   }
+  void PlayerMainWindow::closeEvent(QCloseEvent * event) {
+      if (!AppSettings::getAlertOnClose() || PLAYING != mCurrentStatus.state) {
+          event->accept();
+      }
+      else { // handle alert
+          if (QMessageBox::Yes == QMessageBox::question(this
+                                                       , tr("Really quit?")
+                                                       , tr("You currently have media playing on your remote machine. Are you sure you wish to quit vlc-remote?")
+                                                       , QMessageBox::Yes | QMessageBox::No
+                                                       , QMessageBox::No)) {
+            event->accept();
+          }
+          else {
+            event->ignore();
+          }
+      }
+  }
 
index 85eada0..063508d 100644 (file)
@@ -39,6 +39,7 @@ public:
 
 public slots:
     void askStatus();
+    void showSettings();
     void showConfig();
     void showAbout();
     void showFavourites();
@@ -60,6 +61,7 @@ public slots:
     void finished(QNetworkReply * reply);
     void error(QNetworkReply::NetworkError code);
     void readReady();
+    void updateFromSettings();
     void orientationChanged();
     void setPortrait();
     void setLandscape();
@@ -69,8 +71,10 @@ public slots:
 
 protected slots:
     void parseXmlStatus();
+
 protected:
     void changeEvent(QEvent *e);
+    void closeEvent(QCloseEvent *);
 
 
 private:
index 44d8e65..09a3436 100644 (file)
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>794</width>
+    <width>790</width>
     <height>641</height>
    </rect>
   </property>
     <rect>
      <x>0</x>
      <y>0</y>
-     <width>794</width>
+     <width>790</width>
      <height>20</height>
     </rect>
    </property>
     <property name="title">
      <string>menu</string>
     </property>
+    <addaction name="actionSettings"/>
     <addaction name="actionConfiguration"/>
     <addaction name="actionAbout"/>
-    <addaction name="actionPortrait"/>
-    <addaction name="actionLandscape"/>
-    <addaction name="actionAutoRotate"/>
+    <addaction name="actionFavourites"/>
    </widget>
    <addaction name="menuMenu"/>
   </widget>
     <string>Auto Rotate</string>
    </property>
   </action>
+  <action name="actionSettings">
+   <property name="text">
+    <string>Settings</string>
+   </property>
+  </action>
+  <action name="actionFavourites">
+   <property name="text">
+    <string>Favourites</string>
+   </property>
+  </action>
  </widget>
  <resources/>
  <connections/>
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp
new file mode 100644 (file)
index 0000000..5686f0d
--- /dev/null
@@ -0,0 +1,127 @@
+/*   VLC-REMOTE for MAEMO 5
+*   Copyright (C) 2010 Schutz Sacha <istdasklar@gmail.com>, Dru Moore <usr@dru-id.co.uk>, Yann Nave <yannux@onbebop.net>
+*   This program is free software; you can redistribute it and/or modify
+*   it under the terms of the GNU General Public License version 2,
+*   or (at your option) any later version, as published by the Free
+*   Software Foundation
+*
+*   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 "settingsdialog.h"
+#include "ui_settingsdialog.h"
+#include "appsettings.h"
+
+
+
+SettingsDialog::SettingsDialog(QWidget *parent) :
+        QDialog(parent),
+        ui(new Ui::SettingsDialog)
+{
+    ui->setupUi(this);
+    ui->scrollArea->setWidget(ui->scrollAreaWidgetContents);
+    connect(ui->radioButtonAutoRotate, SIGNAL(released()), this, SLOT(setOrientationAutoRotate()));
+    connect(ui->radioButtonLandscape, SIGNAL(released()), this, SLOT(setOrientationLandscape()));
+    connect(ui->radioButtonPortrait, SIGNAL(released()), this, SLOT(setOrientationPortrait()));
+    connect(ui->checkBoxAlertOnClose, SIGNAL(toggled(bool)), this, SLOT(setAlertOnClose(bool)));
+    connect(ui->checkBoxShowArt, SIGNAL(toggled(bool)), this, SLOT(setShowAlbumArt(bool)));
+    connect(ui->checkBoxUnknownFiles, SIGNAL(toggled(bool)), this, SLOT(setShowUnknownFileTypes(bool)));
+    connect(ui->comboBoxPollFrequency, SIGNAL(currentIndexChanged(int)), this, SLOT(setStatusPollTimeout(int)));
+    connect(ui->comboBoxPingTimeout, SIGNAL(currentIndexChanged(int)), this, SLOT(setPingTimeout(int)));
+    connect(ui->comboBoxConnectionTimeout, SIGNAL(currentIndexChanged(int)), this, SLOT(setConnectionTimeout(int)));
+    connect(ui->comboBoxRetryNetworkDelay, SIGNAL(currentIndexChanged(int)), this, SLOT(setRetryNetworkTimeout(int)));
+    connect(ui->comboBoxRetrieveArtDelay, SIGNAL(currentIndexChanged(int)), this, SLOT(setRetrieveArtTimeout(int)));
+    init();
+
+}
+
+SettingsDialog::~SettingsDialog()
+{
+    delete ui;
+}
+
+void SettingsDialog::init()
+{
+    switch (AppSettings::getOrientation()) {
+    case LANDSCAPE:
+        ui->radioButtonLandscape->setChecked(true);
+        break;
+    case PORTRAIT:
+        ui->radioButtonPortrait->setChecked(true);
+        break;
+    case AUTO_ROTATE:
+    default:
+        ui->radioButtonAutoRotate->setChecked(true);
+        break;
+    }
+
+    ui->checkBoxAlertOnClose->setChecked(AppSettings::getAlertOnClose());
+    ui->checkBoxShowArt->setChecked(AppSettings::getShowAlbumArt());
+    ui->checkBoxUnknownFiles->setChecked(AppSettings::getShowUnknownFileTypes());
+    int idx = -1;
+    idx = ui->comboBoxPollFrequency->findText(QString::number(AppSettings::getStatusPollTimeout()));
+    ui->comboBoxPollFrequency->setCurrentIndex(-1 < idx ? idx : 0);
+    idx = ui->comboBoxConnectionTimeout->findText(QString::number(AppSettings::getConnectionTimeout()));
+    ui->comboBoxConnectionTimeout->setCurrentIndex(-1 < idx ? idx : 0);
+    idx = ui->comboBoxPingTimeout->findText(QString::number(AppSettings::getPingTimeout()));
+    ui->comboBoxPingTimeout->setCurrentIndex(-1 < idx ? idx : 0);
+    idx = ui->comboBoxRetryNetworkDelay->findText(QString::number(AppSettings::getRetryNetworkTimeout()));
+    ui->comboBoxRetryNetworkDelay->setCurrentIndex(-1 < idx ? idx : 0);
+    idx = ui->comboBoxRetrieveArtDelay->findText(QString::number(AppSettings::getRetrieveArtTimeout()));
+    ui->comboBoxRetrieveArtDelay->setCurrentIndex(-1 < idx ? idx : 0);
+}
+
+void SettingsDialog::setOrientationLandscape() {
+    setOrientation(LANDSCAPE);
+}
+void SettingsDialog::setOrientationPortrait() {
+    setOrientation(PORTRAIT);
+}
+void SettingsDialog::setOrientationAutoRotate() {
+    setOrientation(AUTO_ROTATE);
+}
+void SettingsDialog::setOrientation(Orientation orientation) {
+    AppSettings::setOrientation(orientation);
+}
+void SettingsDialog::setStatusPollTimeout(int idx) {
+    Q_UNUSED(idx);
+    AppSettings::setStatusPollTimeout(ui->comboBoxPollFrequency->currentText().toInt());
+}
+void SettingsDialog::setPingTimeout(int idx) {
+    Q_UNUSED(idx);
+    AppSettings::setPingTimeout(ui->comboBoxPingTimeout->currentText().toInt());
+}
+void SettingsDialog::setConnectionTimeout(int idx) {
+    Q_UNUSED(idx);
+    AppSettings::setConnectionTimeout(ui->comboBoxConnectionTimeout->currentText().toInt());
+}
+void SettingsDialog::setRetrieveArtTimeout(int idx) {
+    Q_UNUSED(idx);
+    AppSettings::setRetrieveArtTimeout(ui->comboBoxRetrieveArtDelay->currentText().toInt());
+}
+void SettingsDialog::setRetryNetworkTimeout(int idx) {
+    Q_UNUSED(idx);
+    AppSettings::setRetryNetworkTimeout(ui->comboBoxRetryNetworkDelay->currentText().toInt());
+}
+void SettingsDialog::setShowUnknownFileTypes(bool state) {
+    AppSettings::setShowUnknownFileTypes(state);
+}
+void SettingsDialog::setShowAlbumArt(bool state) {
+    AppSettings::setShowAlbumArt(state);
+}
+void SettingsDialog::setAlertOnClose(bool state) {
+    AppSettings::setAlertOnClose(state);
+}
+
+void SettingsDialog::closeEvent(QCloseEvent * event) {
+    Q_UNUSED(event);
+    emit closeSignal();
+    this->close();
+}
diff --git a/src/settingsdialog.h b/src/settingsdialog.h
new file mode 100644 (file)
index 0000000..ae6c10a
--- /dev/null
@@ -0,0 +1,64 @@
+/*   VLC-REMOTE for MAEMO 5
+*   Copyright (C) 2010 Schutz Sacha <istdasklar@gmail.com>, Dru Moore <usr@dru-id.co.uk>, Yann Nave <yannux@onbebop.net>
+*   This program is free software; you can redistribute it and/or modify
+*   it under the terms of the GNU General Public License version 2,
+*   or (at your option) any later version, as published by the Free
+*   Software Foundation
+*
+*   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.
+*/
+#ifndef SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include <QDialog>
+#include "appsettings.h"
+
+namespace Ui {
+    class SettingsDialog;
+}
+
+class SettingsDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit SettingsDialog(QWidget *parent = 0);
+    ~SettingsDialog();
+
+
+//static QString  currentIp();
+
+public slots:
+    void init();
+    void setOrientationLandscape();
+    void setOrientationPortrait();
+    void setOrientationAutoRotate();
+    void setStatusPollTimeout(int);
+    void setPingTimeout(int);
+    void setConnectionTimeout(int);
+    void setRetrieveArtTimeout(int);
+    void setRetryNetworkTimeout(int);
+    void setShowUnknownFileTypes(bool);
+    void setShowAlbumArt(bool);
+    void setAlertOnClose(bool);
+
+protected:
+    void closeEvent(QCloseEvent *);
+    void setOrientation(Orientation);
+
+private:
+    Ui::SettingsDialog *ui;
+
+signals:
+    void closeSignal();
+};
+
+#endif // SETTINGSDIALOG_H
diff --git a/src/settingsdialog.ui b/src/settingsdialog.ui
new file mode 100644 (file)
index 0000000..85cf589
--- /dev/null
@@ -0,0 +1,488 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SettingsDialog</class>
+ <widget class="QDialog" name="SettingsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>803</width>
+    <height>450</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Application Settings</string>
+  </property>
+  <widget class="QWidget" name="verticalLayoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>781</width>
+     <height>391</height>
+    </rect>
+   </property>
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <property name="sizeConstraint">
+     <enum>QLayout::SetDefaultConstraint</enum>
+    </property>
+    <item>
+     <widget class="QScrollArea" name="scrollArea">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="horizontalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOff</enum>
+      </property>
+      <property name="widgetResizable">
+       <bool>false</bool>
+      </property>
+      <widget class="QWidget" name="scrollAreaWidgetContents">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>0</y>
+         <width>700</width>
+         <height>1000</height>
+        </rect>
+       </property>
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <widget class="QWidget" name="verticalLayoutWidget_2">
+        <property name="geometry">
+         <rect>
+          <x>0</x>
+          <y>0</y>
+          <width>681</width>
+          <height>471</height>
+         </rect>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout_2">
+         <property name="sizeConstraint">
+          <enum>QLayout::SetMinAndMaxSize</enum>
+         </property>
+         <item>
+          <widget class="QLabel" name="labelOrientation">
+           <property name="text">
+            <string>Orientation</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout">
+           <item>
+            <widget class="QRadioButton" name="radioButtonLandscape">
+             <property name="text">
+              <string>Landscape</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QRadioButton" name="radioButtonPortrait">
+             <property name="text">
+              <string>Portrait</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QRadioButton" name="radioButtonAutoRotate">
+             <property name="text">
+              <string>Auto Rotate</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <widget class="QLabel" name="labelBehaviour">
+           <property name="text">
+            <string>Behaviour</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_2">
+           <item>
+            <widget class="QCheckBox" name="checkBoxShowArt">
+             <property name="layoutDirection">
+              <enum>Qt::LeftToRight</enum>
+             </property>
+             <property name="text">
+              <string>Show album art?</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_3">
+           <item>
+            <widget class="QCheckBox" name="checkBoxUnknownFiles">
+             <property name="text">
+              <string>Show unknown filetypes?</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_6">
+           <item>
+            <widget class="QCheckBox" name="checkBoxAlertOnClose">
+             <property name="text">
+              <string>Alert on close when media playing?</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <widget class="QLabel" name="labelAdvanced">
+           <property name="text">
+            <string>Advanced settings</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <layout class="QFormLayout" name="formLayout">
+           <property name="fieldGrowthPolicy">
+            <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+           </property>
+           <property name="labelAlignment">
+            <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
+           </property>
+           <item row="8" column="0">
+            <widget class="QLabel" name="labelRetryNetwok">
+             <property name="text">
+              <string>Retry network delay (ms)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="8" column="1">
+            <widget class="QComboBox" name="comboBoxRetryNetworkDelay">
+             <item>
+              <property name="text">
+               <string>1000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>2500</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>5000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>10000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>25000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>50000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>100000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>250000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>500000</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+           <item row="5" column="1">
+            <widget class="QComboBox" name="comboBoxPollFrequency">
+             <item>
+              <property name="text">
+               <string>1000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>2500</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>5000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>10000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>25000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>50000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>100000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>250000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>500000</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+           <item row="5" column="0">
+            <widget class="QLabel" name="labelPollFrequency">
+             <property name="text">
+              <string>Update frequency (ms)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="6" column="0">
+            <widget class="QLabel" name="labelPingTimeout">
+             <property name="text">
+              <string>Ping timeout (ms)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="6" column="1">
+            <widget class="QComboBox" name="comboBoxPingTimeout">
+             <item>
+              <property name="text">
+               <string>100</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>250</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>500</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>1000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>2500</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>5000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>10000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>25000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>50000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>100000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>250000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>500000</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+           <item row="7" column="0">
+            <widget class="QLabel" name="labelConnectionTimeout">
+             <property name="text">
+              <string>Connection timeout (ms)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="7" column="1">
+            <widget class="QComboBox" name="comboBoxConnectionTimeout">
+             <item>
+              <property name="text">
+               <string>1000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>2500</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>5000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>7500</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>10000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>25000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>50000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>100000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>250000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>500000</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+           <item row="9" column="0">
+            <widget class="QLabel" name="labelRetrieveArtDelay">
+             <property name="text">
+              <string>Retrieve Art Delay</string>
+             </property>
+            </widget>
+           </item>
+           <item row="9" column="1">
+            <widget class="QComboBox" name="comboBoxRetrieveArtDelay">
+             <item>
+              <property name="text">
+               <string>100</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>250</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>500</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>1000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>2500</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>5000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>10000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>25000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>50000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>100000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>250000</string>
+              </property>
+             </item>
+             <item>
+              <property name="text">
+               <string>500000</string>
+              </property>
+             </item>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index 35196ae..a13c497 100644 (file)
@@ -20,7 +20,8 @@ SOURCES += main.cpp \
     vlcplaylistelementsimple.cpp \
     vlcstatus.cpp \
     appsettings.cpp \
-    favouritesmainwindow.cpp
+    favouritesmainwindow.cpp \
+    settingsdialog.cpp
 HEADERS += playlistmainwindow.h \
     playermainwindow.h \
     configdialog.h \
@@ -32,14 +33,16 @@ HEADERS += playlistmainwindow.h \
     vlcplaylistelementsimple.h \
     vlcstatus.h \
     appsettings.h \
-    favouritesmainwindow.h
+    favouritesmainwindow.h \
+    settingsdialog.h
 FORMS += playlistmainwindow.ui \
     playermainwindow.ui \
     configdialog.ui \
     aboutdialog.ui \
     accountdialog.ui \
     browsemainwindow.ui \
-    favouritesmainwindow.ui
+    favouritesmainwindow.ui \
+    settingsdialog.ui
 OTHER_FILES += vlc-remote.desktop
 RESOURCES += ressources.qrc
 TRANSLATIONS = vlcremote_fr_FR.ts