New structure for project.
authoryannux <yannux@onbebop.net>
Fri, 27 Aug 2010 15:55:02 +0000 (17:55 +0200)
committeryannux <yannux@onbebop.net>
Fri, 27 Aug 2010 15:55:02 +0000 (17:55 +0200)
Delete unused files todo

102 files changed:
AboutDialog.ui [deleted file]
Maemo_VLC_remote.svg [deleted file]
TODO.txt [deleted file]
aboutdialog.cpp [deleted file]
aboutdialog.h [deleted file]
aboutdialog.ui [deleted file]
accountdialog.cpp [deleted file]
accountdialog.h [deleted file]
accountdialog.ui [deleted file]
accountnewdialog.ui [deleted file]
appsettings.cpp [deleted file]
appsettings.h [deleted file]
browsemainwindow.cpp [deleted file]
browsemainwindow.h [deleted file]
browsemainwindow.ui [deleted file]
config-vlc.jpg [deleted file]
configdialog.cpp [deleted file]
configdialog.h [deleted file]
configdialog.ui [deleted file]
favouritesmainwindow.cpp [deleted file]
favouritesmainwindow.h [deleted file]
favouritesmainwindow.ui [deleted file]
main.cpp [deleted file]
newaccountdialog.cpp [deleted file]
newaccountdialog.h [deleted file]
playermainwindow.cpp [deleted file]
playermainwindow.h [deleted file]
playermainwindow.ui [deleted file]
playlistmainwindow.cpp [deleted file]
playlistmainwindow.h [deleted file]
playlistmainwindow.ui [deleted file]
resource.qrc [deleted file]
ressources.qrc [deleted file]
scanipdialog.cpp [deleted file]
scanipdialog.h [deleted file]
scanipdialog.ui [deleted file]
src/AboutDialog.ui [new file with mode: 0644]
src/Maemo_VLC_remote.svg [new file with mode: 0644]
src/aboutdialog.cpp [new file with mode: 0644]
src/aboutdialog.h [new file with mode: 0644]
src/aboutdialog.ui [new file with mode: 0644]
src/accountdialog.cpp [new file with mode: 0644]
src/accountdialog.h [new file with mode: 0644]
src/accountdialog.ui [new file with mode: 0644]
src/accountnewdialog.ui [new file with mode: 0644]
src/appsettings.cpp [new file with mode: 0644]
src/appsettings.h [new file with mode: 0644]
src/browsemainwindow.cpp [new file with mode: 0644]
src/browsemainwindow.h [new file with mode: 0644]
src/browsemainwindow.ui [new file with mode: 0644]
src/config-vlc.jpg [new file with mode: 0644]
src/configdialog.cpp [new file with mode: 0644]
src/configdialog.h [new file with mode: 0644]
src/configdialog.ui [new file with mode: 0644]
src/data/26x26/vlc-remote.png [new file with mode: 0644]
src/data/48x48/vlc-remote.png [new file with mode: 0644]
src/data/64x64/vlc-remote.png [new file with mode: 0644]
src/favouritesmainwindow.cpp [new file with mode: 0644]
src/favouritesmainwindow.h [new file with mode: 0644]
src/favouritesmainwindow.ui [new file with mode: 0644]
src/main.cpp [new file with mode: 0644]
src/newaccountdialog.cpp [new file with mode: 0644]
src/newaccountdialog.h [new file with mode: 0644]
src/playermainwindow.cpp [new file with mode: 0644]
src/playermainwindow.h [new file with mode: 0644]
src/playermainwindow.ui [new file with mode: 0644]
src/playlistmainwindow.cpp [new file with mode: 0644]
src/playlistmainwindow.h [new file with mode: 0644]
src/playlistmainwindow.ui [new file with mode: 0644]
src/resource.qrc [new file with mode: 0644]
src/ressources.qrc [new file with mode: 0644]
src/scanipdialog.cpp [new file with mode: 0644]
src/scanipdialog.h [new file with mode: 0644]
src/scanipdialog.ui [new file with mode: 0644]
src/src.pro [new file with mode: 0644]
src/vlc-remote.desktop [new file with mode: 0644]
src/vlc-remote.png [new file with mode: 0644]
src/vlcbrowseelement.cpp [new file with mode: 0644]
src/vlcbrowseelement.h [new file with mode: 0644]
src/vlcplaylistelementsimple.cpp [new file with mode: 0644]
src/vlcplaylistelementsimple.h [new file with mode: 0644]
src/vlcremote_fr_FR.qm [new file with mode: 0644]
src/vlcremote_fr_FR.ts [new file with mode: 0644]
src/vlcstatus.cpp [new file with mode: 0644]
src/vlcstatus.h [new file with mode: 0644]
src/welcome [new file with mode: 0644]
todo.txt [deleted file]
vlc-remote.desktop [deleted file]
vlc-remote.png [deleted file]
vlc-remote.pro [new file with mode: 0644]
vlcRemote.pro [deleted file]
vlcbrowseelement.cpp [deleted file]
vlcbrowseelement.h [deleted file]
vlcplaylistelementsimple.cpp [deleted file]
vlcplaylistelementsimple.h [deleted file]
vlcremote_fr_FR.qm [deleted file]
vlcremote_fr_FR.ts [deleted file]
vlcstatus.cpp [deleted file]
vlcstatus.h [deleted file]
welcome [deleted file]
www/index.html
www/styles.css

diff --git a/AboutDialog.ui b/AboutDialog.ui
deleted file mode 100644 (file)
index 2cf6ba0..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Dialog</class>
- <widget class="QDialog" name="Dialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>400</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>Dialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>Dialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/Maemo_VLC_remote.svg b/Maemo_VLC_remote.svg
deleted file mode 100644 (file)
index 83ad807..0000000
+++ /dev/null
@@ -1,453 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="64px"
-   height="64px"
-   id="svg2816"
-   version="1.1"
-   inkscape:version="0.47 r22583"
-   sodipodi:docname="Maemo_VLC_remote.svg"
-   inkscape:export-filename="/home/eugene/Downloads/likalo/icons/Maemo_VLC_remote.png"
-   inkscape:export-xdpi="90"
-   inkscape:export-ydpi="90">
-  <defs
-     id="defs2818">
-    <linearGradient
-       inkscape:collect="always"
-       id="linearGradient3979">
-      <stop
-         style="stop-color:#e6eff7;stop-opacity:1;"
-         offset="0"
-         id="stop3981" />
-      <stop
-         style="stop-color:#e6eff7;stop-opacity:0;"
-         offset="1"
-         id="stop3983" />
-    </linearGradient>
-    <linearGradient
-       inkscape:collect="always"
-       id="linearGradient3791">
-      <stop
-         style="stop-color:#8b8b8b;stop-opacity:1"
-         offset="0"
-         id="stop3793" />
-      <stop
-         style="stop-color:#050505;stop-opacity:1"
-         offset="1"
-         id="stop3795" />
-    </linearGradient>
-    <linearGradient
-       inkscape:collect="always"
-       id="linearGradient3687">
-      <stop
-         style="stop-color:#f2f2f2;stop-opacity:1;"
-         offset="0"
-         id="stop3689" />
-      <stop
-         style="stop-color:#f2f2f2;stop-opacity:0;"
-         offset="1"
-         id="stop3691" />
-    </linearGradient>
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 32 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="64 : 32 : 1"
-       inkscape:persp3d-origin="32 : 21.333333 : 1"
-       id="perspective2824" />
-    <filter
-       inkscape:collect="always"
-       id="filter3756"
-       x="-0.1344"
-       width="1.2688"
-       y="-0.336"
-       height="1.672">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="1.68"
-         id="feGaussianBlur3758" />
-    </filter>
-    <inkscape:perspective
-       id="perspective3840"
-       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
-       inkscape:vp_z="1 : 0.5 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_x="0 : 0.5 : 1"
-       sodipodi:type="inkscape:persp3d" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3687"
-       id="linearGradient3854"
-       gradientUnits="userSpaceOnUse"
-       x1="32"
-       y1="22"
-       x2="32"
-       y2="52.066593"
-       gradientTransform="matrix(1.111111,0,0,1,-3.5555554,-1)" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3791"
-       id="linearGradient3865"
-       gradientUnits="userSpaceOnUse"
-       spreadMethod="pad"
-       x1="44"
-       y1="-30"
-       x2="48"
-       y2="-32" />
-    <filter
-       inkscape:collect="always"
-       id="filter3949"
-       x="-0.17035383"
-       width="1.3407077"
-       y="-0.045646171"
-       height="1.0912923">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="0.91101842"
-         id="feGaussianBlur3951" />
-    </filter>
-    <filter
-       inkscape:collect="always"
-       id="filter3959"
-       x="-0.055835792"
-       width="1.1116716"
-       y="-0.34203537"
-       height="1.6840707">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="0.11718901"
-         id="feGaussianBlur3961" />
-    </filter>
-    <filter
-       inkscape:collect="always"
-       id="filter3969">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="0.32"
-         id="feGaussianBlur3971" />
-    </filter>
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3979"
-       id="radialGradient3987"
-       cx="34.5"
-       cy="32.5"
-       fx="26.331987"
-       fy="28.26091"
-       r="20.5"
-       gradientTransform="matrix(1.0286932,-0.00554309,4.8548147e-4,0.09009624,-1.0056937,29.763108)"
-       gradientUnits="userSpaceOnUse" />
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3979"
-       id="radialGradient3991"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(0.62725195,-0.00554309,2.9602529e-4,0.09009624,23.850187,10.763108)"
-       cx="34.5"
-       cy="32.5"
-       fx="26.331987"
-       fy="28.26091"
-       r="20.5" />
-    <filter
-       inkscape:collect="always"
-       id="filter4001"
-       x="-0.024585366"
-       width="1.0491707"
-       y="-1.008"
-       height="3.016">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="0.42"
-         id="feGaussianBlur4003" />
-    </filter>
-    <filter
-       inkscape:collect="always"
-       id="filter4009"
-       x="-0.624"
-       width="2.248"
-       y="-0.02496"
-       height="1.04992">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="0.26"
-         id="feGaussianBlur4011" />
-    </filter>
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3687"
-       id="linearGradient4020"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.111111,0,0,1,0.4444446,-1)"
-       x1="32"
-       y1="22"
-       x2="32"
-       y2="52.066593" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3791"
-       id="linearGradient4026"
-       gradientUnits="userSpaceOnUse"
-       spreadMethod="pad"
-       x1="44"
-       y1="-30"
-       x2="48"
-       y2="-32"
-       gradientTransform="translate(0,-4)" />
-    <inkscape:perspective
-       id="perspective2875"
-       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
-       inkscape:vp_z="1 : 0.5 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_x="0 : 0.5 : 1"
-       sodipodi:type="inkscape:persp3d" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3791"
-       id="linearGradient2937"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="translate(0,-4)"
-       spreadMethod="pad"
-       x1="44"
-       y1="-30"
-       x2="48"
-       y2="-32" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3687"
-       id="linearGradient2939"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.111111,0,0,1,0.4444446,-1)"
-       x1="32"
-       y1="22"
-       x2="32"
-       y2="52.066593" />
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3979"
-       id="radialGradient2941"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(1.0286932,-0.00554309,4.8548147e-4,0.09009624,-1.0056937,29.763108)"
-       cx="34.5"
-       cy="32.5"
-       fx="26.331987"
-       fy="28.26091"
-       r="20.5" />
-    <radialGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient3979"
-       id="radialGradient2943"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(0.62725195,-0.00554309,2.9602529e-4,0.09009624,23.850187,10.763108)"
-       cx="34.5"
-       cy="32.5"
-       fx="26.331987"
-       fy="28.26091"
-       r="20.5" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="9.671875"
-     inkscape:cx="28.015642"
-     inkscape:cy="25.696712"
-     inkscape:current-layer="layer1"
-     showgrid="true"
-     inkscape:document-units="px"
-     inkscape:grid-bbox="true"
-     showguides="true"
-     inkscape:guide-bbox="true"
-     inkscape:snap-global="true"
-     inkscape:window-width="1640"
-     inkscape:window-height="1027"
-     inkscape:window-x="36"
-     inkscape:window-y="-4"
-     inkscape:window-maximized="1">
-    <sodipodi:guide
-       orientation="1,0"
-       position="4,52.545455"
-       id="guide2826" />
-    <sodipodi:guide
-       orientation="1,0"
-       position="60,40"
-       id="guide2828" />
-    <sodipodi:guide
-       orientation="0,1"
-       position="31,61"
-       id="guide2830" />
-    <sodipodi:guide
-       orientation="0,1"
-       position="45.454545,4"
-       id="guide2832" />
-    <inkscape:grid
-       type="xygrid"
-       id="grid2836" />
-  </sodipodi:namedview>
-  <metadata
-     id="metadata2821">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     id="layer1"
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer">
-    <g
-       id="g2912"
-       transform="matrix(0.99828455,0,0,1.016587,0.00669673,-0.97863428)"
-       inkscape:export-filename="/home/schutz/programmation/git-vlc-remote/vlc-remote.png"
-       inkscape:export-xdpi="116"
-       inkscape:export-ydpi="116">
-      <path
-         id="path3885"
-         d="m 29.124008,4 -18.030258,49.555556 -6.010086,0 c -0.6536613,0 -1.1798942,0.526232 -1.1798942,1.179894 l 0,1.179894 c 0,0.653661 0.5262329,1.179895 1.1798942,1.179895 l 4.7195768,0 42.4761912,0 4.719576,0 c 0.653661,0 1.179894,-0.526234 1.179894,-1.179895 l 0,-1.179894 c 0,-0.653662 -0.526233,-1.179894 -1.179894,-1.179894 l -6.08383,0 L 32,4 29.124008,4 z"
-         style="fill:#e97f02;stroke:none" />
-      <path
-         sodipodi:nodetypes="cccccccccc"
-         id="path3913"
-         d="M 31,4 34.1875,54 35,57 57.46875,57 c 0.423766,-0.178644 0.71875,-0.603504 0.71875,-1.09375 l 0,-1.15625 c 0,-0.653662 -0.533839,-1.1875 -1.1875,-1.1875 l -6.09375,0 L 32,4 31,4 z"
-         style="fill:#eb6841;stroke:none" />
-      <path
-         sodipodi:nodetypes="cccc"
-         id="path3963"
-         d="M 32,6 48,54 43,54 32,6 z"
-         style="fill:#cc333f;stroke:none;filter:url(#filter3969)" />
-      <path
-         id="rect3908"
-         d="m 3.90625,55.657986 0,0.62145 c 0,0.44824 0.5338387,0.814314 1.1875,0.814314 l 4.71875,0 42.46875,0 4.71875,0 c 0.653661,0 1.1875,-0.366074 1.1875,-0.814314 l 0,-0.62145 -54.28125,0 z"
-         style="fill:#8e6c11;fill-opacity:1;fill-rule:nonzero;stroke:none" />
-      <path
-         style="fill:#f8ca00;fill-opacity:1;fill-rule:nonzero;stroke:none"
-         d="m 27.562279,9 -1.683727,5 9.579819,0 -1.770816,-5 -6.125276,0 z M 24.165796,19 22.482071,24 39,24 37.229184,19 24.165796,19 z m -3.36745,10 -1.683725,5 23.427008,0 -1.770813,-5 -19.97247,0 z"
-         id="path3906" />
-      <path
-         sodipodi:nodetypes="cccc"
-         id="path3918"
-         d="M 29.053312,6.1001616 16.218589,54 24,54 29.053312,6.1001616 z"
-         style="fill:#f0db92;stroke:none;filter:url(#filter3949)" />
-      <path
-         id="rect3896"
-         d="m 27.961923,9 -1.477687,5 8.407527,0 -1.554119,-5 -5.375721,0 z M 24.981072,19 23.503386,24 38,24 36.445881,19 24.981072,19 z m -2.955373,10 -1.477686,5 20.560224,0 -1.554118,-5 -17.52842,0 z"
-         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
-      <path
-         id="path3953"
-         d="M 4.9628433,54.177706 10,54.177706 9.779667,55 5,55 4.9628433,54.177706 z"
-         style="fill:#f8ca00;stroke:none;filter:url(#filter3959)" />
-      <g
-         id="g4028">
-        <g
-           id="g2889">
-          <rect
-             transform="matrix(0,1,-1,0,0,0)"
-             ry="2"
-             rx="2"
-             y="-60"
-             x="31"
-             height="48"
-             width="28"
-             id="rect2834"
-             style="fill:url(#linearGradient2937);fill-opacity:1;fill-rule:nonzero;stroke:none" />
-          <rect
-             ry="1"
-             rx="1"
-             transform="matrix(0,1,-1,0,0,0)"
-             style="fill:#4a4a4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
-             id="rect3610"
-             width="26"
-             height="46"
-             x="32"
-             y="-59" />
-          <rect
-             ry="2"
-             rx="2.181818"
-             y="-58"
-             x="-57"
-             height="44"
-             width="24"
-             id="rect3676"
-             style="fill:#050505;fill-opacity:1;fill-rule:nonzero;stroke:none"
-             transform="matrix(0,-1,-1,0,0,0)" />
-          <rect
-             y="-55"
-             x="-55"
-             height="38"
-             width="20"
-             id="rect3711"
-             style="fill:#303030;fill-opacity:1;fill-rule:nonzero;stroke:none"
-             transform="matrix(0,-1,-1,0,0,0)" />
-          <path
-             id="path3726"
-             d="M 16,34 16,46.21875 56,39.78125 56,34 16,34 z"
-             style="opacity:0.5;fill:url(#linearGradient2939);fill-opacity:1;fill-rule:nonzero;stroke:none" />
-          <path
-             style="fill:#69d2e7;fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter3756)"
-             d="m 34,41 0,12 6,-6 -6,-6 z m -13,3 0,5 2,0 0,-5 -2,0 z m 3,0 0,5 2,0 0,-5 -2,0 z m 22,0 0,5 5,0 0,-5 -5,0 z"
-             id="path3742" />
-          <path
-             id="rect3719"
-             d="m 34,41 0,12 6,-6 -6,-6 z m -13,3 0,5 2,0 0,-5 -2,0 z m 3,0 0,5 2,0 0,-5 -2,0 z m 22,0 0,5 5,0 0,-5 -5,0 z"
-             style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
-          <path
-             id="rect3768"
-             d="m 29.125,38 0,17 0.875,0 0,-17 -0.875,0 z M 43,38 l 0,17 0.875,0 0,-17 L 43,38 z"
-             style="fill:#1a1a21;fill-opacity:1;fill-rule:nonzero;stroke:none" />
-          <rect
-             y="35"
-             x="17"
-             height="1.0000023"
-             width="38"
-             id="rect3867"
-             style="opacity:0.5;fill:#1a1a21;fill-opacity:1;fill-rule:nonzero;stroke:none" />
-          <rect
-             y="32"
-             x="14"
-             height="1"
-             width="41"
-             id="rect3977"
-             style="opacity:0.5;fill:url(#radialGradient2941);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter4001)" />
-          <rect
-             transform="matrix(0,1,1,0,-0.31017771,0)"
-             style="fill:url(#radialGradient2943);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter4009)"
-             id="rect3989"
-             width="25"
-             height="1"
-             x="33"
-             y="13" />
-          <rect
-             y="31.48435"
-             x="17"
-             height="1.5156504"
-             width="6.0000005"
-             id="rect3773"
-             style="fill:#bdbdbd;fill-opacity:1;fill-rule:nonzero;stroke:none" />
-          <rect
-             y="34"
-             x="16"
-             height="2"
-             width="2"
-             id="rect3713"
-             style="fill:#69d2e7;fill-opacity:1;fill-rule:nonzero;stroke:none" />
-        </g>
-      </g>
-    </g>
-  </g>
-</svg>
diff --git a/TODO.txt b/TODO.txt
deleted file mode 100644 (file)
index 3bdf506..0000000
--- a/TODO.txt
+++ /dev/null
@@ -1 +0,0 @@
-TODO 
diff --git a/aboutdialog.cpp b/aboutdialog.cpp
deleted file mode 100644 (file)
index e1606ea..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*   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 "aboutdialog.h"
-#include "ui_aboutdialog.h"
-
-AboutDialog::AboutDialog(QWidget *parent) :
-    QDialog(parent),
-    ui(new Ui::AboutDialog)
-{
-    ui->setupUi(this);
-}
-
-AboutDialog::~AboutDialog()
-{
-    delete ui;
-}
-
-void AboutDialog::changeEvent(QEvent *e)
-{
-    QDialog::changeEvent(e);
-    switch (e->type()) {
-    case QEvent::LanguageChange:
-        ui->retranslateUi(this);
-        break;
-    default:
-        break;
-    }
-}
diff --git a/aboutdialog.h b/aboutdialog.h
deleted file mode 100644 (file)
index c92ce70..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*   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 ABOUTDIALOG_H
-#define ABOUTDIALOG_H
-
-#include <QDialog>
-
-namespace Ui {
-    class AboutDialog;
-}
-
-class AboutDialog : public QDialog {
-    Q_OBJECT
-public:
-    explicit AboutDialog(QWidget *parent = 0);
-    ~AboutDialog();
-
-protected:
-    void changeEvent(QEvent *e);
-
-private:
-    Ui::AboutDialog *ui;
-};
-
-#endif // ABOUTDIALOG_H
diff --git a/aboutdialog.ui b/aboutdialog.ui
deleted file mode 100644 (file)
index ad5fdd1..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>AboutDialog</class>
- <widget class="QDialog" name="AboutDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>400</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;table style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
-&lt;tr&gt;
-&lt;td style=&quot;border: none;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;OMed &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Application by Sacha schutz &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;istdasklar@gmail.com&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://omedsoft.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>AboutDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>AboutDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/accountdialog.cpp b/accountdialog.cpp
deleted file mode 100644 (file)
index ecdb02f..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/*   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 "accountdialog.h"
-#include "ui_accountdialog.h"
-#include "newaccountdialog.h"
-#include <QDebug>
-#include <QInputDialog>
-#include <QSettings>
-#include <QTcpSocket>
-#include <QFuture>
-#include <QtConcurrentMap>
-
-
-
-QListWidgetItem asyncTestItem(const QListWidgetItem &item)
-{
-
-    QListWidgetItem item2= item;
-    item2.setText("boby");
-
-    return item;
-
-}
-
-
-
-
-AccountDialog::AccountDialog(QWidget *parent) :
-        QDialog(parent),
-        ui(new Ui::AccountDialog)
-{
-    ui->setupUi(this);
-
-    mFuturWatcher = new QFutureWatcher<QListWidgetItem>(this);
-    connect(mFuturWatcher,SIGNAL(resultReadyAt(int)),this,SLOT(setAsyncItem(int)));
-
-    connect(ui->addButton,SIGNAL(clicked()),this,SLOT(add()));
-    connect(ui->editButton,SIGNAL(clicked()),this,SLOT(edit()));
-    connect(ui->remButton,SIGNAL(clicked()),this,SLOT(rem()));
-    connect(ui->useButton,SIGNAL(clicked()),this,SLOT(use()));
-    connect(ui->listWidget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(enableUi()));
-
-    load();
-
-}
-
-AccountDialog::~AccountDialog()
-{
-    delete ui;
-}
-
-void AccountDialog::add()
-{
-
-    NewAccountDialog *dialog = new NewAccountDialog(this);
-    dialog->exec();
-    load();
-}
-QString AccountDialog::currentIp()
-{
-
-    QSettings settings;
-    QString useKey = settings.value("config/currentKey").toString();
-    QString useIp ;
-    if ( !useKey.isEmpty())
-        useIp = settings.value("account/"+useKey).toString();
-
-    else return QString();
-
-    return useIp;
-}
-
-void AccountDialog::load()
-{
-    ui->editButton->setEnabled(false);
-    ui->remButton->setEnabled(false);
-    ui->useButton->setEnabled(false);
-    ui->listWidget->clear(); // tjr effacer , sinon on rajoute
-
-    QSettings settings;
-
-    QString useKey = settings.value("config/currentKey").toString();
-
-    QList <QListWidgetItem> asycItems;
-
-    settings.beginGroup("account");
-    foreach ( QString key, settings.allKeys())
-    {
-        QListWidgetItem * item = new QListWidgetItem;
-
-        item->setText(key);
-        item->setData(Qt::UserRole, settings.value(key));
-        if (useKey == key) {
-            QFont font = item->font();
-            font.setBold(true);
-            item->setFont(font);
-        }
-        ui->listWidget->addItem(item);
-        asycItems.append(*item);
-    }
-    settings.endGroup();    
-
-
-    // ... create and add in the list widget
-
-    //  QFuture<QListWidgetItem> itemFutur = QtConcurrent::mapped(asycItems, asyncTestItem);
-
-
-    mFuturWatcher->setFuture(QtConcurrent::mapped(asycItems, asyncTestItem));
-}
-
-QListWidgetItem AccountDialog::asyncTestItem(const QListWidgetItem& item)
-{
-    //==========> NEED TO USE POINTER TO AVOID setAsyncItem! But I don't know how;..
-    QListWidgetItem newItem = item;
-
-    QTcpSocket * socket = new QTcpSocket;
-    QSettings settings;
-    QString host = settings.value("account/"+item.text()).toString();
-
-    if(host.contains(":"))
-    {
-        QStringList hostSplit = host.split(":");
-        QString ip   = hostSplit.at(0);
-        QString port = hostSplit.at(1);
-        socket->connectToHost(ip,port.toInt());
-    }
-
-    else
-        socket->connectToHost(host,8080);
-
-    if (socket->waitForConnected(1000))
-        newItem.setIcon(QIcon::fromTheme("widgets_tickmark_list"));
-    else
-        newItem.setIcon(QIcon::fromTheme("statusarea_presence_busy_error"));
-
-    return newItem;
-
-
-}
-
-
-
-void AccountDialog::setAsyncItem(int row)  // EDIT THE ROW AFTER ASYNC FUNCTION FINISHED
-{
-    QListWidgetItem newItem = mFuturWatcher->resultAt(row);
-    QListWidgetItem * item = ui->listWidget->item(row);
-
-    item->setIcon(newItem.icon());
-
-
-
-}
-
-
-
-void AccountDialog::edit()
-{
-    QString currentIp = ui->listWidget->currentItem()->data(Qt::UserRole).toString();
-    QString currentKey = ui->listWidget->currentItem()->text();
-
-    NewAccountDialog *dialog = new NewAccountDialog(this);
-    dialog->edit(currentKey, currentIp);
-    dialog->exec();
-
-    load();
-}
-
-void AccountDialog::rem()
-{
-    QString key = ui->listWidget->currentItem()->text();
-
-    QSettings settings;
-    settings.beginGroup("account");
-    settings.remove(key);
-    settings.endGroup();
-
-    load(); // On recharge les compte
-}
-
-void AccountDialog::use()
-{
-    QString currentKey = ui->listWidget->currentItem()->text();
-    QSettings settings;
-    settings.setValue("config/currentKey", currentKey);
-    load();
-    emit accept();
-}
-
-void AccountDialog::enableUi()
-{
-    ui->editButton->setEnabled(true);
-    ui->remButton->setEnabled(true);
-    ui->useButton->setEnabled(true);
-}
diff --git a/accountdialog.h b/accountdialog.h
deleted file mode 100644 (file)
index e9468dd..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*   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 ACCOUNTDIALOG_H
-#define ACCOUNTDIALOG_H
-
-#include <QDialog>
-#include <QListWidget>
-#include <QFutureWatcher>
-namespace Ui {
-    class AccountDialog;
-}
-
-class AccountDialog : public QDialog
-{
-    Q_OBJECT
-
-public:
-    explicit AccountDialog(QWidget *parent = 0);
-    ~AccountDialog();
-     static QListWidgetItem asyncTestItem(const QListWidgetItem& item);
-
-
-static QString  currentIp();
-
-public slots:
-    void add();
-    void edit();
-    void rem();
-    void use();
-    void load();
-    void enableUi();
- void setAsyncItem(int row);
-private:
-    Ui::AccountDialog *ui;
-    QFutureWatcher <QListWidgetItem> * mFuturWatcher;
-};
-
-#endif // ACCOUNTDIALOG_H
diff --git a/accountdialog.ui b/accountdialog.ui
deleted file mode 100644 (file)
index 8b0dd97..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>AccountDialog</class>
- <widget class="QDialog" name="AccountDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>400</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Accounts</string>
-  </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
-   <item>
-    <widget class="QListWidget" name="listWidget">
-     <item>
-      <property name="text">
-       <string>test</string>
-      </property>
-     </item>
-    </widget>
-   </item>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout">
-     <item>
-      <widget class="QPushButton" name="addButton">
-       <property name="text">
-        <string>Add</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="editButton">
-       <property name="enabled">
-        <bool>false</bool>
-       </property>
-       <property name="text">
-        <string>Edit</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="remButton">
-       <property name="enabled">
-        <bool>false</bool>
-       </property>
-       <property name="text">
-        <string>Remove</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <layout class="QHBoxLayout" name="horizontalLayout_2"/>
-     </item>
-     <item>
-      <spacer name="verticalSpacer">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>40</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="useButton">
-       <property name="enabled">
-        <bool>false</bool>
-       </property>
-       <property name="text">
-        <string>Use</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/accountnewdialog.ui b/accountnewdialog.ui
deleted file mode 100644 (file)
index 0ac856e..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<ui version="4.0" >
- <class>Dialog</class>
- <widget class="QDialog" name="Dialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>320</width>
-    <height>240</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Dialog</string>
-  </property>
-  <widget class="QDialogButtonBox" name="buttonBox" >
-   <property name="geometry" >
-    <rect>
-     <x>10</x>
-     <y>200</y>
-     <width>301</width>
-     <height>32</height>
-    </rect>
-   </property>
-   <property name="orientation" >
-    <enum>Qt::Horizontal</enum>
-   </property>
-   <property name="standardButtons" >
-    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-   </property>
-  </widget>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>Dialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>Dialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/appsettings.cpp b/appsettings.cpp
deleted file mode 100644 (file)
index babef8c..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*   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 <QStringList>
-#include "appsettings.h"
-
-AppSettings::AppSettings() {
-}
-
-AppSettings::~AppSettings() {
-    ;
-}
-
-QString AppSettings::getCurrentKey() {
-    QSettings sets;
-    return sets.value("config/currentKey", "").toString();
-}
-QString AppSettings::getCurrentIp() {
-    QSettings sets;
-    return sets.value("account/" + getCurrentKey(), "").toString();
-}
-VlcDirectory AppSettings::getHomeDirectory() {
-    QSettings sets;
-    VlcDirectory home;
-    home.name = sets.value("config/accounts/" + getCurrentKey() + "/homeDirName", "Default").toString();
-    home.path = sets.value("config/accounts/" + getCurrentKey() + "/homeDirPath", "~/").toString();
-    return home;
-}
-bool AppSettings::setHomeDirectory(VlcDirectory dir) {
-    QSettings sets;
-    sets.setValue("config/accounts/" + getCurrentKey() + "/homeDirName", dir.name);
-    sets.setValue("config/accounts/" + getCurrentKey() + "/homeDirPath", dir.path);
-    return true;
-}
-QList<VlcDirectory>* AppSettings::getFavourites() {
-    QSettings sets;
-    QList<VlcDirectory> * favourites = new QList<VlcDirectory>();
-
-    sets.beginGroup("config/accounts/" + getCurrentKey() + "/favourites");
-    foreach ( QString key, sets.allKeys())
-    {
-        VlcDirectory dir;
-        // key is name
-        dir.name = key;
-        // value is path
-        dir.path = sets.value(key, "~/").toString();
-        favourites->append(dir);
-    }
-    sets.endGroup();
-    return favourites;
-}
-bool AppSettings::addFavourite(VlcDirectory dir) {
-    QSettings sets;
-    // should check for existing first otherwise it overwrites
-    if (0 < sets.value("config/accounts/" + getCurrentKey() + "/favourites/" + dir.name, "").toString().length()) {
-        dir.name = "_" + dir.name;
-        return addFavourite(dir);
-    }
-    sets.setValue("config/accounts/" + getCurrentKey() + "/favourites/" + dir.name, dir.path);
-    return true;
-}
-bool AppSettings::deleteFavourite(VlcDirectory dir) {
-    QSettings sets;
-    sets.remove("config/accounts/" + getCurrentKey() + "/favourites/" + dir.name);
-    return true;
-}
-Orientation AppSettings::setOrientation(Orientation orientation) {
-    QSettings sets;
-    sets.setValue("config/orientation", (int)orientation);
-    return orientation;
-}
-Orientation AppSettings::getOrientation() {
-    QSettings sets;
-    return (Orientation)(sets.value("config/orientation", AUTO_ROTATE).toInt());
-}
-
diff --git a/appsettings.h b/appsettings.h
deleted file mode 100644 (file)
index 407b5a2..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*   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 APPSETTINGS_H
-#define APPSETTINGS_H
-#include <QSettings>
-
-struct VlcDirectory {
-    QString name;
-    QString path;
-};
-enum Orientation {
-    AUTO_ROTATE = 0,
-    LANDSCAPE,
-    PORTRAIT
-};
-
-class AppSettings {
-public:
-    explicit AppSettings();
-    ~AppSettings();
-    static QString getCurrentKey();
-    static QString getCurrentIp();
-    static VlcDirectory getHomeDirectory();
-    static QList<VlcDirectory>* getFavourites();
-    static bool addFavourite(VlcDirectory dir);
-    static bool deleteFavourite(VlcDirectory dir);
-    static bool setHomeDirectory(VlcDirectory dir);
-    static Orientation setOrientation(Orientation orientation);
-    static Orientation getOrientation();
-//private:
-    //static QSettings settings;
-};
-
-#endif // APPSETTINGS_H
diff --git a/browsemainwindow.cpp b/browsemainwindow.cpp
deleted file mode 100644 (file)
index a07b131..0000000
+++ /dev/null
@@ -1,427 +0,0 @@
-/*   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 "browsemainwindow.h"
-#include "ui_browsemainwindow.h"
-#include <QSettings>
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-#include <QMaemo5InformationBox>
-#endif
-#include "configdialog.h"
-#include "aboutdialog.h"
-#include "vlcbrowseelement.h"
-#include "appsettings.h"
-#include "favouritesmainwindow.h"
-
-BrowseMainWindow::BrowseMainWindow(QWidget *parent) :
-        QMainWindow(parent),
-        ui(new Ui::BrowseMainWindow)
-{
-
-    ui->setupUi(this);
-    mFavouritesMainWindow = new FavouritesMainWindow;
-    mCurrentDir = "~/"; //AppSettings::getHomeDirectory().path; // This works on win as well as linux, would guess mac too.
-    setWindowTitle("Vlc remote");
-
-
-    mNetManager = new QNetworkAccessManager(this);
-
-    mContents = new QList<VlcBrowseElement>();
-
-    ui->listWidget->setTextElideMode(Qt::ElideMiddle);
-    ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
-    ui->playButton->setIcon(QIcon::fromTheme("camera_playback"));
-    ui->addButton->setIcon(QIcon::fromTheme("general_add"));
-    ui->browseButton->setIcon(QIcon::fromTheme("filemanager_media_folder"));
-    ui->browseButton->setDisabled(true);
-    ui->playButton->setDisabled(true);
-    ui->addButton->setDisabled(true);
-
-
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-
-    mFavouritesMainWindow->setParent(this);
-    mFavouritesMainWindow->setAttribute(Qt::WA_Maemo5StackedWindow, true);
-    setAttribute(Qt::WA_Maemo5StackedWindow, true);
-    mFavouritesMainWindow->setWindowFlags(mFavouritesMainWindow->windowFlags() | Qt::Window);
-
-#endif
-
-    connect(ui->browseButton,SIGNAL(clicked()),this,SLOT(onBrowse()));
-    connect(ui->addButton,SIGNAL(clicked()),this,SLOT(onAddToPlaylist()));
-    connect(ui->playButton,SIGNAL(clicked()),this,SLOT(onPlay()));
-    connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
-
-    connect(ui->actionGoUserHome, SIGNAL(triggered()), this, SLOT(showUserHomeFolder()));
-    connect(ui->actionGoHome, SIGNAL(triggered()), this, SLOT(showHomeFolder()));
-    connect(ui->actionSetHome, SIGNAL(triggered()), this, SLOT(setHomeFolder()));
-    connect(ui->actionViewFavourites, SIGNAL(triggered()), this, SLOT(showFavourites()));
-    connect(ui->actionSetFavourite, SIGNAL(triggered()), this, SLOT(setFavourite()));
-
-    connect(this->mFavouritesMainWindow, SIGNAL(browseDirectory(QString)), this, SLOT(browseDirectory(QString)));
-
-    init();
-
-
-}
-void BrowseMainWindow::init()  // THIS METHOD IS CALLED WHEN CONFIG CHANGED...
-{
-    mIp = AppSettings::getCurrentIp(); // AccountDialog::currentIp();
-    setHomeDirectory();
-}
-void BrowseMainWindow::setHomeDirectory()
-{
-    mCurrentDir = AppSettings::getHomeDirectory().path;
-}
-void BrowseMainWindow::showCurrentDirectory()  // THIS METHOD IS CALLED WHEN WINDOW IS OPENED...
-{
-    browseDirectory(mCurrentDir);
-}
-
-BrowseMainWindow::~BrowseMainWindow()
-{
-    delete ui;
-}
-
-void BrowseMainWindow::changeEvent(QEvent *e)
-{
-    QMainWindow::changeEvent(e);
-    switch (e->type()) {
-    case QEvent::LanguageChange:
-        ui->retranslateUi(this);
-        break;
-    default:
-        break;
-    }
-}
-
-void BrowseMainWindow::showHomeFolder() {
-    browseDirectory(AppSettings::getHomeDirectory().path);
-}
-void BrowseMainWindow::showUserHomeFolder() {
-    browseDirectory("~/");
-}
-void BrowseMainWindow::setHomeFolder() {
-    if (0 < mCurrentElement.name.length() && (0 == QString::compare("directory", mCurrentElement.type) || 0 == QString::compare("dir", mCurrentElement.type))) {
-        VlcDirectory dir;
-        dir.name = mCurrentElement.name;
-        dir.path = mCurrentElement.path;
-        AppSettings::setHomeDirectory(dir);
-    }
-    else if (0 < mCurrentDir.length()) {
-        VlcDirectory dir;
-        QString name = mCurrentDir;
-        int idx = mCurrentDir.lastIndexOf('/');
-        if (0 > idx) idx = mCurrentDir.lastIndexOf('\\');
-        if (0 < idx) {
-            name = mCurrentDir.right(mCurrentDir.length() - (idx + 1));
-        }
-        dir.name = name;
-        dir.path = mCurrentDir;
-        AppSettings::setHomeDirectory(dir);
-    }
-}
-void BrowseMainWindow::showFavourites() {
-    mFavouritesMainWindow->show();
-    mFavouritesMainWindow->init();
-}
-void BrowseMainWindow::setFavourite() {
-    if (0 < mCurrentElement.name.length() && (0 == QString::compare("directory", mCurrentElement.type) || 0 == QString::compare("dir", mCurrentElement.type))) {
-        VlcDirectory dir;
-        dir.name = mCurrentElement.name;
-        dir.path = mCurrentElement.path;
-        AppSettings::addFavourite(dir);
-    }
-    else if (0 < mCurrentDir.length()) {
-        VlcDirectory dir;
-        QString name = mCurrentDir;
-        int idx = mCurrentDir.lastIndexOf('/');
-        if (0 > idx) idx = mCurrentDir.lastIndexOf('\\');
-        if (0 < idx) {
-            name = mCurrentDir.right(mCurrentDir.length() - (idx + 1));
-        }
-        dir.name = name;
-        dir.path = mCurrentDir;
-        AppSettings::addFavourite(dir);
-    }
-}
-
-void BrowseMainWindow::onListSelectionChanged() {
-    QList<QListWidgetItem *> items = ui->listWidget->selectedItems();
-    if (0 < items.count()) {
-        mCurrentElement = getElementFromText(items.at(0)->text());
-        // are we up dir?
-        if (0 == QString::compare("..", mCurrentElement.name)) {
-            ui->browseButton->setDisabled(true);
-            ui->playButton->setDisabled(true);
-            ui->addButton->setDisabled(true);
-            mCurrentDir = mCurrentElement.path;
-            browseDirectory(mCurrentDir);
-        }
-        else {
-            // can we browse?
-            if (0 == QString::compare("directory", mCurrentElement.type) || 0 == QString::compare("dir", mCurrentElement.type)) {
-                ui->browseButton->setDisabled(false);
-            }
-            else {
-                ui->browseButton->setDisabled(true);
-            }
-            // can we play?
-            ui->playButton->setDisabled(false);
-            // can we playlist?
-            ui->addButton->setDisabled(false);
-        }
-    }
-}
-
-VlcBrowseElement BrowseMainWindow::getElementFromText(QString text) {
-    for (int idx = 0; idx < mContents->count(); ++idx) {
-        if (0 == QString::compare(text, mContents->at(idx).name)) {
-            return mContents->at(idx);
-        }
-    }
-    return *(new VlcBrowseElement());
-}
-
-void BrowseMainWindow::onBrowse() {
-    // check for directory
-    if (0 == QString::compare("directory", mCurrentElement.type) || 0 == QString::compare("dir", mCurrentElement.type)) {
-        // call browseDirectory
-        mCurrentDir = mCurrentElement.path;
-        browseDirectory(mCurrentDir);
-    }
-    else {
-        ui->browseButton->setDisabled(true);
-    }
-}
-
-void BrowseMainWindow::onAddToPlaylist() {
-    QUrl url = QUrl("http://"+mIp+"/requests/status.xml?command=in_enqueue");
-    url.addEncodedQueryItem(QByteArray("input"), QUrl::toPercentEncoding(mCurrentElement.path.replace("\\", "\\\\").replace("'", "\\'")));
-    mNetManager->get(QNetworkRequest(url));
-    //mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=in_enqueue&input=" + mCurrentElement.path.replace("\\", "\\\\"))));
-}
-
-void BrowseMainWindow::onPlay() {
-    QUrl url = QUrl("http://"+mIp+"/requests/status.xml?command=in_play");
-    url.addEncodedQueryItem(QByteArray("input"), QUrl::toPercentEncoding(mCurrentElement.path.replace("\\", "\\\\").replace("'", "\\'")));
-    mNetManager->get(QNetworkRequest(url));
-    //mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=in_play&input=" + mCurrentElement.path.replace("\\", "\\\\"))));
-}
-
-void BrowseMainWindow::browseDirectory(QString dir) {
-    if (mFavouritesMainWindow) {
-        setParent(this->parentWidget());
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-        setAttribute(Qt::WA_Maemo5StackedWindow, true);
-#endif
-        mFavouritesMainWindow->hide();
-    }
-    mResponse.clear();
-    QUrl url = QUrl("http://"+mIp+"/requests/browse.xml");
-    url.addEncodedQueryItem(QByteArray("dir"), QUrl::toPercentEncoding(dir));
-    QNetworkReply * reply = mNetManager->get(QNetworkRequest(url));
-    //QNetworkReply * reply =  mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/browse.xml?dir=" + dir.replace("&", "%26").replace("\\", "\\\\"))));
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-    this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
-#endif
-    connect(reply,SIGNAL(readyRead()),this,SLOT(readReady()));
-    connect(reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(error(QNetworkReply::NetworkError)));
-    connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
-}
-void BrowseMainWindow::error(QNetworkReply::NetworkError code) {
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-    this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
-#endif
-    qDebug() << code;
-}
-void BrowseMainWindow::readReady() {
-    QNetworkReply * reply = qobject_cast<QNetworkReply*>(sender());
-    // append to buffer
-    mResponse += reply->readAll();
-}
-void BrowseMainWindow::finished(QNetworkReply * reply) {
-    // now we can call parseXmlDirectory to process the full buffers
-    this->parseXmlDirectory();
-    // only interested in finished signals
-    disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-    this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
-#endif
-    delete reply;
-}
-void BrowseMainWindow::parseXmlDirectory() {
-    QDomDocument doc;
-    doc.setContent(this->mResponse);
-    QDomElement docElem = doc.documentElement();
-    QDomNodeList elements = docElem.elementsByTagName("element");
-    // we can sort by folders then files alphabetically by running to lists and appending them at the end
-    // vlc alpha sorts everything in the incoming stream, we just need to seperate files from folders.
-    if (0 < elements.count()) {
-        QList<VlcBrowseElement>* files = new QList<VlcBrowseElement>();
-        int idx = 0;
-        mContents->clear();
-        do {
-            QDomNode node = elements.at(idx);
-            VlcBrowseElement* dir = new VlcBrowseElement();
-            dir->type = node.attributes().namedItem("type").nodeValue();
-            dir->size = node.attributes().namedItem("size").nodeValue().toInt();
-            dir->date = QDate::fromString(node.attributes().namedItem("date").nodeValue());
-            dir->path = node.attributes().namedItem("path").nodeValue();
-            dir->name = node.attributes().namedItem("name").nodeValue();
-            dir->extension = getExtension(dir->path, node.attributes().namedItem("extension").nodeValue());
-            ++idx;
-            if (0 != QString::compare("directory", dir->type) && 0 != QString::compare("dir", dir->type)) {
-                files->append(*dir);
-            }
-            else if (0 == QString::compare("..", dir->name)) {
-                this->mContents->prepend(*dir);
-            }
-            else {
-                this->mContents->append(*dir);
-            }
-            delete dir;
-        } while (idx < elements.count());
-        if (0 < files->count()) {
-            mContents->append(*files);
-        }
-        delete files;
-        // Update UI
-        this->updateList();
-    }
-    else {
-        // alert user of error / empty directory
-        qDebug() << "can't browse dir: " << mCurrentDir;
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-        QMaemo5InformationBox::information(this, tr("Directory could not be browsed!"), QMaemo5InformationBox::DefaultTimeout);
-#endif
-    }
-    mResponse.clear();
-
-}
-
-QString BrowseMainWindow::getExtension(QString path, QString extension) {
-    // return extension if exists
-    if (!extension.isNull() && !extension.isEmpty()) return extension;
-    // return blank if no path
-    if (path.isNull() || path.isEmpty()) return "";
-    // otherwise extract the extension
-    int dot_pos = path.lastIndexOf('.');
-    if (0 < dot_pos) {
-        return path.right(path.length() - (dot_pos + 1));
-    }
-    else { // no dot
-        return "";
-    }
-}
-
-void BrowseMainWindow::updateList() {
-    ui->listWidget->clear();
-    int ct = this->mContents->count();
-    if (0 < ct) {
-        QIcon icon_up     = QIcon::fromTheme("filemanager_folder_up");
-        QIcon icon_folder = QIcon::fromTheme("general_folder");
-        QIcon icon_audio  = QIcon::fromTheme("general_audio_file");
-        QIcon icon_video  = QIcon::fromTheme("general_video_file");
-        QIcon icon_image  = QIcon::fromTheme("general_image");
-        QIcon icon_flash  = QIcon::fromTheme("filemanager_flash_file");
-        QIcon icon_real   = QIcon::fromTheme("filemanager_real_music");
-        QIcon icon_playl  = QIcon::fromTheme("filemanager_playlist");
-        QIcon icon_unknown= QIcon::fromTheme("filemanager_unknown_file");
-        for (int idx = 0; idx < ct; ++idx) {
-            VlcBrowseElement dir = mContents->at(idx);
-            QListWidgetItem* item;
-            bool item_good = false;
-            if (0 == QString::compare("directory", dir.type) || 0 == QString::compare("dir", dir.type)) {
-                if (0 == QString::compare("..", dir.name)) {
-                    item = new QListWidgetItem(icon_up, dir.name, ui->listWidget, 0);
-                    item_good = true;
-                }
-                else {
-                    item = new QListWidgetItem(icon_folder, dir.name, ui->listWidget, 0);
-                    item_good = true;
-                }
-            }
-            else if (0 == QString::compare("file", dir.type)) {
-                if ( 0 == QString::compare(dir.extension, "jpg")  ||
-                     0 == QString::compare(dir.extension, "jpeg") ||
-                     0 == QString::compare(dir.extension, "gif")  ||
-                     0 == QString::compare(dir.extension, "png")  ||
-                     0 == QString::compare(dir.extension, "bmp")  ) {
-                    item_good = true;
-                    item = new QListWidgetItem(icon_image, dir.name, ui->listWidget, 0); // .jpg, .jpeg, .gif, .png, .bmp
-                }
-                else if ( 0 == QString::compare(dir.extension, "mp3")  ||
-                          0 == QString::compare(dir.extension, "m4a")  ||
-                          0 == QString::compare(dir.extension, "ogg")  ||
-                          0 == QString::compare(dir.extension, "oga")  ||
-                          0 == QString::compare(dir.extension, "wav")  ||
-                          0 == QString::compare(dir.extension, "flac")  ) {
-                    item_good = true;
-                    item = new QListWidgetItem(icon_audio, dir.name, ui->listWidget, 0); // .mp3, .m4a, .ogg, .oga, .wav, .flac
-                }
-                else if ( 0 == QString::compare(dir.extension, "m3u")  ||
-                          0 == QString::compare(dir.extension, "wpl")  ||
-                          0 == QString::compare(dir.extension, "pls")  ||
-                          0 == QString::compare(dir.extension, "asx")  ||
-                          0 == QString::compare(dir.extension, "xspf") ||
-                          0 == QString::compare(dir.extension, "cmml")  ) {
-                    item_good = true;
-                    item = new QListWidgetItem(icon_playl, dir.name, ui->listWidget, 0); // .m3u, .wpl, .pls, .asx, .xspf, .cmml
-                }
-                else if ( 0 == QString::compare(dir.extension, "avi")  ||
-                          0 == QString::compare(dir.extension, "mpeg") ||
-                          0 == QString::compare(dir.extension, "mpg")  ||
-                          0 == QString::compare(dir.extension, "mov")  ||
-                          0 == QString::compare(dir.extension, "mp4")  ||
-                          0 == QString::compare(dir.extension, "m4v")  ||
-                          0 == QString::compare(dir.extension, "wmv")  ||
-                          0 == QString::compare(dir.extension, "mkv")  ||
-                          0 == QString::compare(dir.extension, "ogv")  ) {
-                    item_good = true;
-                    item = new QListWidgetItem(icon_video, dir.name, ui->listWidget, 0); // .avi, .mpg, .mpeg, .mov, .mp4, .m4v, .wmv, .mkv, .ogv
-                }
-                else if ( 0 == QString::compare(dir.extension, "rm")  ||
-                          0 == QString::compare(dir.extension, "ra")  ||
-                          0 == QString::compare(dir.extension, "ram")  ) {
-                    item = new QListWidgetItem(icon_real, dir.name, ui->listWidget, 0); // .ram, 'rm, 'ra
-                }
-                else if ( 0 == QString::compare(dir.extension, "flv")  ) {
-                    item_good = true;
-                    item = new QListWidgetItem(icon_flash, dir.name, ui->listWidget, 0); // .flv
-                }
-                else {
-                    if (dir.name.startsWith("Flash")) {
-                        item_good = true;
-                        item = new QListWidgetItem(icon_flash, dir.name, ui->listWidget, 0);
-                    }
-                    else {
-                        item_good = false;
-                        //item = new QListWidgetItem(icon_unknown, dir.name, ui->listWidget, 0);
-                    }
-                }
-            }
-            if (item_good) {
-                ui->listWidget->addItem(item);
-            }
-            // other types ignored
-        }
-    }
-}
-
-
diff --git a/browsemainwindow.h b/browsemainwindow.h
deleted file mode 100644 (file)
index 052421a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*   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 BROWSEMAINWINDOW_H
-#define BROWSEMAINWINDOW_H
-
-#include <QMainWindow>
-#include <QtNetwork>
-#include <QtXml>
-#include <QListWidgetItem>
-#include "vlcbrowseelement.h"
-#include "favouritesmainwindow.h"
-
-namespace Ui {
-    class BrowseMainWindow;
-}
-
-class BrowseMainWindow : public QMainWindow {
-    Q_OBJECT
-public:
-    explicit BrowseMainWindow(QWidget *parent = 0);
-    ~BrowseMainWindow();
-
-public slots:
-    void init();
-    void browseDirectory(QString);
-    void onBrowse();
-    void onPlay();
-    void onAddToPlaylist();
-    void onListSelectionChanged();
-    void finished(QNetworkReply * reply);
-    void readReady();
-    void error(QNetworkReply::NetworkError code);
-    void showCurrentDirectory();
-    void setHomeFolder();
-    void showHomeFolder();
-    void showUserHomeFolder();
-    void setFavourite();
-    void showFavourites();
-    void setHomeDirectory();
-
-protected slots:
-    void parseXmlDirectory();
-    void updateList();
-
-protected:
-    void changeEvent(QEvent *e);
-    VlcBrowseElement getElementFromText(QString text);
-    QString getExtension(QString path, QString extension);
-
-private:
-    Ui::BrowseMainWindow *ui;
-    FavouritesMainWindow *mFavouritesMainWindow;
-    QNetworkAccessManager * mNetManager;
-    QString mCurrentDir;
-    QString mIp;
-    QList<VlcBrowseElement>* mContents;
-    VlcBrowseElement mCurrentElement;
-    QByteArray mResponse;
-};
-
-#endif // BROWSEMAINWINDOW_H
diff --git a/browsemainwindow.ui b/browsemainwindow.ui
deleted file mode 100644 (file)
index 6ae1aee..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>BrowseMainWindow</class>
- <widget class="QMainWindow" name="BrowseMainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>800</width>
-    <height>600</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>MainWindow</string>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QListWidget" name="listWidget">
-     </widget>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <widget class="QPushButton" name="playButton">
-        <property name="text">
-         <string>Play</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="addButton">
-        <property name="text">
-         <string>Enqueue</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="browseButton">
-        <property name="text">
-         <string>Browse</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>800</width>
-     <height>27</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuMenu">
-    <property name="title">
-     <string>menu</string>
-    </property>
-   </widget>
-   <addaction name="actionGoUserHome"/>
-   <addaction name="actionGoHome"/>
-   <addaction name="actionSetHome"/>
-   <addaction name="actionViewFavourites"/>
-   <addaction name="actionSetFavourite"/>
-  </widget>
-  <action name="actionGoUserHome">
-   <property name="text">
-    <string>User Folder</string>
-   </property>
-  </action>
-  <action name="actionGoHome">
-   <property name="text">
-    <string>Home</string>
-   </property>
-  </action>
-  <action name="actionSetHome">
-   <property name="text">
-    <string>Set as Home</string>
-   </property>
-  </action>
-  <action name="actionViewFavourites">
-   <property name="text">
-    <string>Favourites</string>
-   </property>
-  </action>
-  <action name="actionSetFavourite">
-   <property name="text">
-    <string>Add to Favourite</string>
-   </property>
-  </action>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/config-vlc.jpg b/config-vlc.jpg
deleted file mode 100644 (file)
index b4610f0..0000000
Binary files a/config-vlc.jpg and /dev/null differ
diff --git a/configdialog.cpp b/configdialog.cpp
deleted file mode 100644 (file)
index 9888666..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*   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 "configdialog.h"
-#include "ui_configdialog.h"
-#include <QSettings>
-
-ConfigDialog::ConfigDialog(QWidget *parent) :
-        QDialog(parent),
-        ui(new Ui::ConfigDialog)
-{
-    ui->setupUi(this);
-    load();
-    connect(ui->buttonBox,SIGNAL(accepted()),this,SLOT(save()));
-}
-
-ConfigDialog::~ConfigDialog()
-{
-    delete ui;
-}
-
-void ConfigDialog::changeEvent(QEvent *e)
-{
-    QDialog::changeEvent(e);
-    switch (e->type()) {
-    case QEvent::LanguageChange:
-        ui->retranslateUi(this);
-        break;
-    default:
-        break;
-    }
-}
-void ConfigDialog::load()
-{
-    QSettings settings;
-    ui->lineEdit->setText(settings.value("ip").toString());
-
-}
-
-void ConfigDialog::save()
-{
-
-    QSettings settings;
-    settings.setValue("ip",ui->lineEdit->text());
-
-    emit accept();
-}
diff --git a/configdialog.h b/configdialog.h
deleted file mode 100644 (file)
index e6c4f67..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*   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 CONFIGDIALOG_H
-#define CONFIGDIALOG_H
-
-#include <QDialog>
-
-namespace Ui {
-    class ConfigDialog;
-}
-
-class ConfigDialog : public QDialog {
-    Q_OBJECT
-public:
-    explicit ConfigDialog(QWidget *parent = 0);
-    ~ConfigDialog();
-public slots:
-void load();
-void save();
-protected:
-    void changeEvent(QEvent *e);
-
-private:
-    Ui::ConfigDialog *ui;
-};
-
-#endif // CONFIGDIALOG_H
diff --git a/configdialog.ui b/configdialog.ui
deleted file mode 100644 (file)
index c3dd6f0..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ConfigDialog</class>
- <widget class="QDialog" name="ConfigDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>442</width>
-    <height>304</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
-&lt;tr&gt;
-&lt;td style=&quot;border: none;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Enter IP of VLC server.  &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Example : &lt;span style=&quot; font-weight:600;&quot;&gt;192.168.0.8:8080&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Be sure  you have properly configured Vlc&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; and allows connection by adding this IP in /vlc/http/.hosts&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;More information on my blog : &lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;omed.blogspot.com&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QLineEdit" name="lineEdit"/>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>ConfigDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>295</x>
-     <y>284</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/favouritesmainwindow.cpp b/favouritesmainwindow.cpp
deleted file mode 100644 (file)
index a578deb..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*   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 "favouritesmainwindow.h"
-#include "ui_favouritesmainwindow.h"
-#include <QSettings>
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-#include <QMaemo5InformationBox>
-#endif
-#include "appsettings.h"
-//#include "browsemainwindow.h"
-
-FavouritesMainWindow::FavouritesMainWindow(QWidget *parent) :
-        QMainWindow(parent),
-        ui(new Ui::FavouritesMainWindow)
-{
-
-    ui->setupUi(this);
-
-    setWindowTitle("Vlc remote");
-    mCurrentItemIndex = -1;
-
-    ui->listWidget->setTextElideMode(Qt::ElideMiddle);
-    ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
-    ui->deleteButton->setIcon(QIcon::fromTheme("general_delete"));
-    ui->editButton->setIcon(QIcon::fromTheme("general_sketch"));
-    ui->browseButton->setIcon(QIcon::fromTheme("filemanager_media_folder"));
-    ui->saveButton->setIcon(QIcon::fromTheme("notes_save"));
-    ui->browseButton->setDisabled(true);
-    ui->editButton->setDisabled(true);
-    ui->deleteButton->setDisabled(true);
-    ui->actionSetHome->setDisabled(true);
-    ui->label->setVisible(false);
-    ui->lineEdit->setVisible(false);
-    ui->saveButton->setVisible(false);
-    ui->saveButton->setDisabled(true);
-
-    connect(ui->browseButton,SIGNAL(clicked()),this,SLOT(onBrowse()));
-    connect(ui->deleteButton,SIGNAL(clicked()),this,SLOT(onDelete()));
-    connect(ui->editButton,SIGNAL(clicked()),this,SLOT(onEdit()));
-    connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
-    connect(ui->actionSetHome, SIGNAL(triggered()), this, SLOT(setHomeFolder()));
-    connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(onEditSave()));
-    connect(ui->lineEdit, SIGNAL(textChanged(QString)), this, SLOT(onLineEditTextChanged(QString)));
-
-    init();
-
-
-}
-void FavouritesMainWindow::init()  // THIS METHOD IS CALLED WHEN CONFIG CHANGED AND WINDOW SHOWN...
-{
-    mFavourites = AppSettings::getFavourites();
-    updateList();
-}
-
-FavouritesMainWindow::~FavouritesMainWindow()
-{
-    delete mFavourites;
-    delete ui;
-}
-
-void FavouritesMainWindow::changeEvent(QEvent *e)
-{
-    QMainWindow::changeEvent(e);
-    switch (e->type()) {
-    case QEvent::LanguageChange:
-        ui->retranslateUi(this);
-        break;
-    default:
-        break;
-    }
-}
-void FavouritesMainWindow::updateList() {
-    ui->listWidget->clear();
-    if (NULL != mFavourites && 0 < mFavourites->count()) {
-        for (int idx = 0; idx < mFavourites->count(); ++idx) {
-            QListWidgetItem* item = new QListWidgetItem(QIcon::fromTheme("imageviewer_favourite"), mFavourites->at(idx).name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + idx);
-            ui->listWidget->addItem(item);
-        }
-    }
-}
-void FavouritesMainWindow::setHomeFolder() {
-    if (-1 < mCurrentItemIndex) {
-        AppSettings::setHomeDirectory(mCurrentFavourite);
-    }
-}
-void FavouritesMainWindow::onListSelectionChanged() {
-    ui->label->setVisible(false);
-    ui->lineEdit->setVisible(false);
-    ui->saveButton->setVisible(false);
-    ui->saveButton->setDisabled(true);
-    QList<QListWidgetItem *> items = ui->listWidget->selectedItems();
-    if (0 < items.count()) {
-        mCurrentItemIndex = ui->listWidget->currentIndex().row();
-        mCurrentFavourite = mFavourites->at(items.at(0)->type() - LIST_ITEM_TYPE_OFFSET); // Qt reserves types up to 1000, we use an offset beyond that for index tracking. May prove to be too hacky!
-        ui->browseButton->setDisabled(false);
-        ui->editButton->setDisabled(false);
-        ui->deleteButton->setDisabled(false);
-        ui->actionSetHome->setDisabled(false);
-    }
-    else {
-        mCurrentItemIndex = -1;
-        ui->browseButton->setDisabled(true);
-        ui->editButton->setDisabled(true);
-        ui->deleteButton->setDisabled(true);
-        ui->actionSetHome->setDisabled(true);
-    }
-}
-void FavouritesMainWindow::onLineEditTextChanged(QString text) {
-    if (0 < text.length()) {
-        ui->saveButton->setDisabled(false);
-    }
-    else {
-        ui->saveButton->setDisabled(true);
-    }
-}
-void FavouritesMainWindow::onEditSave() {
-    if (-1 < mCurrentItemIndex && 0 < ui->lineEdit->text().length()) {
-        ui->label->setVisible(false);
-        ui->lineEdit->setVisible(false);
-        ui->saveButton->setVisible(false);
-        ui->saveButton->setDisabled(true);
-        AppSettings::deleteFavourite(mCurrentFavourite);
-        mCurrentFavourite.name = ui->lineEdit->text();
-        AppSettings::addFavourite(mCurrentFavourite);
-        ui->lineEdit->setText("");
-        ui->listWidget->itemAt(mCurrentItemIndex, 0)->setText(mCurrentFavourite.name);
-        init();
-    }
-}
-void FavouritesMainWindow::onEdit() {
-    if (-1 < mCurrentItemIndex) {
-        ui->label->setVisible(true);
-        ui->lineEdit->setVisible(true);
-        ui->saveButton->setVisible(true);
-        ui->saveButton->setDisabled(false);
-        ui->lineEdit->setText(mCurrentFavourite.name);
-        ui->browseButton->setDisabled(true);
-        ui->editButton->setDisabled(true);
-        ui->deleteButton->setDisabled(true);
-    }
-}
-void FavouritesMainWindow::onBrowse() {
-    if (-1 < mCurrentItemIndex) {
-        emit browseDirectory(mCurrentFavourite.path);
-        //this->close();
-        //((BrowseMainWindow *)this->parent())->browseDirectory(mCurrentFavourite.path);
-    }
-}
-void FavouritesMainWindow::onDelete() {
-    if (-1 < mCurrentItemIndex) {
-        AppSettings::deleteFavourite(mCurrentFavourite);
-        init();
-    }
-}
diff --git a/favouritesmainwindow.h b/favouritesmainwindow.h
deleted file mode 100644 (file)
index 76964b0..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*   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 FAVOURITESMAINWINDOW_H
-#define FAVOURITESMAINWINDOW_H
-
-#include <QMainWindow>
-#include <QtNetwork>
-#include <QtXml>
-#include <QListWidgetItem>
-#include "appsettings.h"
-
-#ifndef LIST_ITEM_TYPE_OFFSET
-#define LIST_ITEM_TYPE_OFFSET 1000
-#endif
-
-namespace Ui {
-    class FavouritesMainWindow;
-}
-
-class FavouritesMainWindow : public QMainWindow {
-    Q_OBJECT
-public:
-    explicit FavouritesMainWindow(QWidget *parent = 0);
-    ~FavouritesMainWindow();
-
-public slots:
-    void init();
-    void onListSelectionChanged();
-    void onLineEditTextChanged(QString text);
-    void onBrowse();
-    void onEdit();
-    void onDelete();
-    void setHomeFolder();
-    void onEditSave();
-
-protected slots:
-
-signals:
-    void browseDirectory(QString path);
-
-protected:
-    void changeEvent(QEvent *e);
-    void updateList();
-
-private:
-    Ui::FavouritesMainWindow *ui;
-    int mCurrentItemIndex;
-    QList<VlcDirectory>* mFavourites;
-    VlcDirectory mCurrentFavourite;
-};
-
-#endif // FAVOURITESMAINWINDOW_H
diff --git a/favouritesmainwindow.ui b/favouritesmainwindow.ui
deleted file mode 100644 (file)
index b379237..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>FavouritesMainWindow</class>
- <widget class="QMainWindow" name="FavouritesMainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>798</width>
-    <height>598</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>MainWindow</string>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QListWidget" name="listWidget"/>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_2">
-      <item>
-       <widget class="QLabel" name="label">
-        <property name="text">
-         <string>Name</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QLineEdit" name="lineEdit"/>
-      </item>
-      <item>
-       <widget class="QPushButton" name="saveButton">
-        <property name="text">
-         <string>Save</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <widget class="QPushButton" name="deleteButton">
-        <property name="text">
-         <string>Delete</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="editButton">
-        <property name="text">
-         <string>Edit</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="browseButton">
-        <property name="text">
-         <string>Browse</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>798</width>
-     <height>20</height>
-    </rect>
-   </property>
-   <addaction name="actionSetHome"/>
-  </widget>
-  <action name="actionSetHome">
-   <property name="text">
-    <string>Set as Home</string>
-   </property>
-  </action>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/main.cpp b/main.cpp
deleted file mode 100644 (file)
index 8e21758..0000000
--- a/main.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*   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 <QtGui/QApplication>
-#include <QSettings>
-#include <QLocale>
-#include <QTextCodec>
-#include <QTranslator>
-#include <QDebug>
-#include "playermainwindow.h"
-#include "appsettings.h"
-int main(int argc, char *argv[])
-{
-    QApplication a(argc, argv);
-
-    QCoreApplication::setOrganizationName("Omed");
-    QCoreApplication::setOrganizationDomain("medsoft.blogspot.com/");
-    QCoreApplication::setApplicationName("Maemo VLC remote");
-
-    QString locale = QLocale::system().name();
-    QTranslator translator;
-    translator.load(QString(":/languages/vlcremote_") + locale);
-    a.installTranslator(&translator);
-
-    QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
-
-
-    qDebug() << AppSettings::getCurrentIp();
-
-
-  PlayerMainWindow * mainwindow = new PlayerMainWindow;
-
-  //mainwindow->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
-  //mainwindow->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
-  //mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
-
-  mainwindow->showMaximized();
- #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-  Orientation o = AppSettings::getOrientation();
-  switch (o) {
-      case AUTO_ROTATE:
-      mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
-          break;
-      case LANDSCAPE:
-          mainwindow->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
-          break;
-      case PORTRAIT:
-          mainwindow->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
-          break;
-      default:
-          mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
-          break;
-  }
-#endif
-    return a.exec();
-}
diff --git a/newaccountdialog.cpp b/newaccountdialog.cpp
deleted file mode 100644 (file)
index 3a3acd3..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*   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 "newaccountdialog.h"
-#include <QFormLayout>
-#include <QDebug>
-#include <QSettings>
-//#include <QMaemo5InformationBox>
-
-NewAccountDialog::NewAccountDialog(QWidget *parent)
-{
-    Q_UNUSED(parent);
-    this->setWindowTitle(tr("Add account"));
-
-    mKeyLineEdit = new QLineEdit;
-    mIpLineEdit = new QLineEdit;
-    mPortLineEdit = new QLineEdit;
-    mPortLineEdit->setText("8080");
-    mPortLineEdit->setReadOnly(false);
-
-    mButtonBox = new QDialogButtonBox;
-    mButtonBox->addButton(QDialogButtonBox::Save);
-    mButtonBox->addButton(QDialogButtonBox::Cancel);
-
-    connect(mButtonBox, SIGNAL(accepted()), this, SLOT(save()));
-    connect(mButtonBox, SIGNAL(rejected()), this, SLOT(reject()));
-
-    QFormLayout *layout = new QFormLayout;
-    layout->expandingDirections();
-    layout->addRow(tr("Name:"), mKeyLineEdit);
-    layout->addRow(tr("Ip:"), mIpLineEdit);
-    layout->addRow(tr("Port:"), mPortLineEdit);
-    layout->addWidget(mButtonBox);
-
-    setLayout(layout);
-}
-
-void NewAccountDialog::save()
-{
-    QString myKey = mKeyLineEdit->text();
-    QString myIp = mIpLineEdit->text();
-    QString myPort = mPortLineEdit->text();
-
-    QSettings settings;
-    settings.beginGroup("account");
-    if (!mEditKey.isEmpty()) {
-        settings.remove(mEditKey);
-    }
-
-    if (!myIp.isEmpty() && !myKey.isEmpty()) {
-        if (myPort.isEmpty()) {
-            myPort = "8080";
-        }
-        settings.setValue(myKey, myIp+":"+myPort);
-        // Rajouter des tests pour vérifier qu'on est sur Maemo
-        //QMaemo5InformationBox::information(this, tr("Account saved"), QMaemo5InformationBox::DefaultTimeout);
-    }
-    settings.endGroup();
-
-    emit accept();
-}
-
-void NewAccountDialog::edit(QString &key, QString &ip)
-{
-    Q_UNUSED(ip);
-    this->setWindowTitle(tr("Edit account"));
-
-    QSettings settings;
-    settings.beginGroup("account");
-    QString value = settings.value(key).toString();
-    settings.endGroup();
-
-    QStringList values = value.split(":");
-
-    mEditKey = key;
-    mEditIp = values.first();
-    mEditPort = values.last();
-
-    mKeyLineEdit->setText(mEditKey);
-    mKeyLineEdit->setDisabled(true);
-    mIpLineEdit->setText(mEditIp);
-    mPortLineEdit->setText(mEditPort);
-}
-
diff --git a/newaccountdialog.h b/newaccountdialog.h
deleted file mode 100644 (file)
index 70794ab..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*   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 NEWACCOUNTDIALOG_H
-#define NEWACCOUNTDIALOG_H
-
-#include <QDialog>
-#include <QLineEdit>
-#include <QLabel>
-#include <QDialogButtonBox>
-
-class NewAccountDialog : public QDialog
-{
-    Q_OBJECT
-
-public:
-    explicit NewAccountDialog(QWidget *parent = 0);
-    void edit(QString &key, QString &ip);
-
-public slots:
-    void save();
-
-private:
-    QLineEdit *mKeyLineEdit;
-    QLineEdit *mIpLineEdit;
-    QLineEdit *mPortLineEdit;
-    QPushButton *mSavePushButton;
-    QPushButton *mCancelPushButton;
-    QDialogButtonBox *mButtonBox;
-
-    QString mEditKey;
-    QString mEditIp;
-    QString mEditPort;
-};
-
-#endif // NEWACCOUNTDIALOG_H
diff --git a/playermainwindow.cpp b/playermainwindow.cpp
deleted file mode 100644 (file)
index 33d001c..0000000
+++ /dev/null
@@ -1,511 +0,0 @@
-  /*   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 <QDebug>
-  #include <QTime>
-  #include <QtGui>
-  #include "playermainwindow.h"
-  #include "ui_playermainwindow.h"
-  #include "configdialog.h"
-  #include "aboutdialog.h"
-  #include "accountdialog.h"
-  #include "appsettings.h"
-  //#include "vlcstatus.h"
-
-  PlayerMainWindow::PlayerMainWindow(QWidget *parent) :
-         QMainWindow(parent),
-         ui(new Ui::PlayerMainWindow)
-  {
-      ui->setupUi(this);
-      setWindowTitle("Vlc remote");
-
-
-
-      mTimer = new QTimer(this);
-      mNetManager = new QNetworkAccessManager(this);
-      mPlayListMainWindow = new PlayListMainWindow;
-      mBrowserMainWindow = new BrowseMainWindow;
-
-      mVolume = 100;
-      mMuted = false;
-
-      mIsLandscape = true;
-
-      ui->playlistButton->setIcon(QIcon::fromTheme("notes_bullets"));
-      ui->browseButton->setIcon(QIcon::fromTheme("filemanager_media_folder"));
-
-      ui->previousButton->setIcon(QIcon::fromTheme("pdf_viewer_first_page"));
-      ui->nextButton->setIcon(QIcon::fromTheme("pdf_viewer_last_page"));
-      ui->playpauseButton->setIcon(QIcon::fromTheme("camera_playback"));
-      ui->stopButton->setIcon(QIcon::fromTheme("camera_video_stop"));
-      //ui->pauseButton->setIcon(QIcon::fromTheme("camera_video_pause"));
-      ui->fullscreenButton->setIcon(QIcon::fromTheme("general_fullsize"));
-      ui->volDown->setIcon(QIcon::fromTheme("statusarea_volumelevel1"));
-      ui->volUp->setIcon(QIcon::fromTheme("statusarea_volumelevel4"));
-      ui->volMute->setIcon(QIcon::fromTheme("statusarea_volume_mute"));
-
-      ui->labelArtPortrait->setVisible(false);
-      ui->labelArtLandscape->setVisible(false);
-
-      ui->labelTitle->setTextFormat(Qt::RichText);
-      ui->labelArtist->setTextFormat(Qt::RichText);
-      ui->labelAlbum->setTextFormat(Qt::RichText);
-
-
-  #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-
-      mPlayListMainWindow->setParent(this);
-      mPlayListMainWindow->setAttribute(Qt::WA_Maemo5StackedWindow, true);
-      setAttribute(Qt::WA_Maemo5StackedWindow, true);
-      mPlayListMainWindow->setWindowFlags(mPlayListMainWindow->windowFlags() | Qt::Window);
-
-      mBrowserMainWindow->setParent(this);
-      mBrowserMainWindow->setAttribute(Qt::WA_Maemo5StackedWindow, true);
-      setAttribute(Qt::WA_Maemo5StackedWindow, true);
-      mBrowserMainWindow->setWindowFlags(mBrowserMainWindow->windowFlags() | Qt::Window);
-
-      connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
-
-  #endif
-
-      connect(mTimer,SIGNAL(timeout()),this,SLOT(askStatus()));
-      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->playlistButton,SIGNAL(clicked()),mPlayListMainWindow,SLOT(show()));
-      connect(ui->playlistButton,SIGNAL(clicked()),mPlayListMainWindow,SLOT(showPlayList()));
-      connect(ui->browseButton,SIGNAL(clicked()),mBrowserMainWindow,SLOT(show()));
-      connect(ui->browseButton,SIGNAL(clicked()),mBrowserMainWindow,SLOT(showCurrentDirectory()));
-
-      connect(ui->playpauseButton,SIGNAL(clicked()),this,SLOT(playpause()));
-      connect(ui->stopButton,SIGNAL(clicked()),this,SLOT(stop()));
-      connect(ui->previousButton,SIGNAL(clicked()),this,SLOT(previous()));
-      connect(ui->nextButton,SIGNAL(clicked()),this,SLOT(next()));
-      connect(ui->fullscreenButton,SIGNAL(clicked()),this,SLOT(fullscreen()));
-      connect(ui->volUp,SIGNAL(clicked()),this,SLOT(volUp()));
-      connect(ui->volDown,SIGNAL(clicked()),this,SLOT(volDown()));
-      connect(ui->volMute,SIGNAL(clicked()),this,SLOT(volMute()));
-      connect(ui->slider,SIGNAL(sliderMoved(int)),this,SLOT(slide(int)));
-
-      connect(mPlayListMainWindow, SIGNAL(idUpdated(int,bool,QString)), this, SLOT(playlistIdUpdated(int, bool, QString)));
-
-
-      // check if last used connection is still valid or showConfig
-      QSettings settings;
-      QString last_ip = AccountDialog::currentIp();
-      if (!last_ip.isNull() && !last_ip.isEmpty()) {
-          QTcpSocket * socket = new QTcpSocket;
-          if(last_ip.contains(":"))
-          {
-              QStringList hostSplit = last_ip.split(":");
-              QString ip   = hostSplit.at(0);
-              QString port = hostSplit.at(1);
-              socket->connectToHost(ip,port.toInt());
-          }
-          else {
-              socket->connectToHost(last_ip,8080);
-          }
-          if (!socket->waitForConnected(1000)) {
-                 showConfig();
-             }
-          else {
-              mIp= last_ip;
-
-             mPlayListMainWindow->init();
-             mBrowserMainWindow->init();
-             mTimer->start(5000);
-             askStatus();
-          }
-          delete socket;
-      }
-      else {
-        showConfig();
-      }
-
-
-  }
-  
-
-  PlayerMainWindow::~PlayerMainWindow()
-  {
-      delete ui;
-  }
-
-  void PlayerMainWindow::changeEvent(QEvent *e)
-  {
-      QMainWindow::changeEvent(e);
-      switch (e->type()) {
-      case QEvent::LanguageChange:
-         ui->retranslateUi(this);
-         break;
-      default:
-         break;
-      }
-  }
-
-  void PlayerMainWindow::setPortrait()
-  {
-    #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-      AppSettings::setOrientation(PORTRAIT);
-    this->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
-    #endif
-  }
-
-  void PlayerMainWindow::setLandscape()
-  {
-    #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-      AppSettings::setOrientation(LANDSCAPE);
-    this->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
-    #endif
-  }
-
-  void PlayerMainWindow::setAutoRotate()
-  {
-    #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-      AppSettings::setOrientation(AUTO_ROTATE);
-    this->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
-    #endif
-  }
-
-  void PlayerMainWindow::orientationChanged() {
-      QRect screenGeometry = QApplication::desktop()->screenGeometry();
-      mIsLandscape = (screenGeometry.width() > screenGeometry.height());
-      if (mHasImage) {
-          if (mIsLandscape) {
-              ui->labelArtPortrait->setVisible(false);
-              ui->labelArtLandscape->setVisible(true);
-          }
-          else {
-              ui->labelArtLandscape->setVisible(false);
-              ui->labelArtPortrait->setVisible(true);
-          }
-      }
-      else {
-          ui->labelArtLandscape->setVisible(false);
-          ui->labelArtPortrait->setVisible(false);
-      }
-  }
-
-  void PlayerMainWindow::playpause()
-  {
-      // NB. There is no guarentee that our current state is the real current state.
-      // This is due to the polling frequency and possibility of user interaction directly on the server.
-      // Still this is probably better than nothing and our next real poll will set us straight again.
-      if (PAUSED == mCurrentStatus.state) {
-        mCurrentStatus.state = PLAYING;
-        pause();
-        updateUiWithCurrentStatus();
-      }
-      else if (PLAYING == mCurrentStatus.state) {
-        mCurrentStatus.state = PAUSED;
-        pause();
-        updateUiWithCurrentStatus();
-      }
-      else {
-        // could be STOP or UNKNOWN, either way there is no guarentee we will enter a playing state next.
-        // So don't update the current state or UI
-        // Ideally we would try to find a way to check the current state again but this could lead to an infinite loop!
-        play();
-      }
-  }
-  void PlayerMainWindow::play()
-  {
-      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_play")));
-  }
-  void PlayerMainWindow::stop()
-  {
-      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_stop")));
-  }
-  void PlayerMainWindow::pause()
-  {
-      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_pause")));
-  }
-  void PlayerMainWindow::previous()
-  {
-      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_previous")));
-  }
-  void PlayerMainWindow::next()
-  {
-      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_next")));
-  }
-  void PlayerMainWindow::fullscreen()
-  {
-      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=fullscreen")));
-  }
-  void PlayerMainWindow::volUp()
-  {
-      QUrl url = QUrl("http://"+mIp+"/requests/status.xml?command=volume");
-      url.addEncodedQueryItem(QByteArray("val"), QByteArray("%2B10"));
-      mNetManager->get(QNetworkRequest(url));
-  }
-  void PlayerMainWindow::volDown()
-  {
-      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=volume&val=-10")));
-  }
-  void PlayerMainWindow::volMute()
-  {
-      this->mMuted = !this->mMuted;
-      if (this->mMuted) {
-         mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=volume&val=0")));
-      }
-      else {
-         mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=volume&val="+QString::number(this->mVolume))));
-      }
-  }
-  void PlayerMainWindow::slide(int value)
-  {
-      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=seek&val="+QString::number(value)+"%25")));
-  }
-
-  void PlayerMainWindow::showConfig()
-  {
-      mTimer->stop();
-      AccountDialog * dialog = new AccountDialog;
-      dialog->exec();
-     
-       mIp= AccountDialog::currentIp();
-
-      mPlayListMainWindow->init();
-      mBrowserMainWindow->init();
-      mTimer->start(5000);
-      askStatus();
-  }
-  void PlayerMainWindow::showAbout()
-  {
-
-      AboutDialog * dialog = new AboutDialog;
-      dialog->exec();
-
-  }
-
-  void PlayerMainWindow::askStatus()
-  {
-      //qDebug() << "Status requested. at:" << QTime::currentTime().toString("hh::mm:ss");
-      QNetworkReply * reply =  mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml")));
-      connect(reply,SIGNAL(readyRead()),this,SLOT(parseXmlStatus()));
-  }
-
-  void PlayerMainWindow::parseXmlStatus()
-  {
-      QNetworkReply * reply = qobject_cast<QNetworkReply*>(sender());
-      QDomDocument doc;
-      doc.setContent(reply->readAll());
-      delete reply;
-      QDomElement docElem = doc.documentElement();
-      // Get the raw values
-      int volume = docElem.namedItem("volume").toElement().text().toInt();
-      int length = docElem.namedItem("length").toElement().text().toInt();
-      int time = docElem.namedItem("time").toElement().text().toInt();
-      int position = docElem.namedItem("position").toElement().text().toInt();
-      int random = docElem.namedItem("random").toElement().text().toInt();
-      int loop = docElem.namedItem("loop").toElement().text().toInt();
-      int repeat = docElem.namedItem("repeat").toElement().text().toInt();
-      QString state = docElem.namedItem("state").toElement().text();
-      QDomNode infoNode =  docElem.namedItem("information");
-      QDomNode metaInfoNode =  infoNode.namedItem("meta-information");
-      QString title = metaInfoNode.namedItem("title").toElement().text().replace("\\\\", "\\");
-      // if it's a file style title fix it up
-      if (40 < title.length()) {
-          if (0 < title.lastIndexOf("\\")) {
-              title = title.right(title.length() - (title.lastIndexOf("\\") + 1));
-          }
-          else if (0 < title.lastIndexOf("/")) {
-              title = title.right(title.length() - (title.lastIndexOf("/") + 1));
-          }
-      }
-      QString artist = metaInfoNode.namedItem("artist").toElement().text();
-      QString album = metaInfoNode.namedItem("album").toElement().text();
-      QString now_playing = metaInfoNode.namedItem("now_playing").toElement().text();
-      QString art_url = metaInfoNode.namedItem("art_url").toElement().text();
-      //metaInfoNode.clear();
-      //infoNode.clear();
-      //docElem.clear();
-      //doc.clear();
-      // Populate the current status structure
-      // now would be a good time to work out if we are a new track / file or not.
-      // key if we are going to look for album art later
-      // for now we check length and title this will require further examination later
-      mCurrentStatus.newtrack = true;
-      if (mCurrentStatus.length == length && !mCurrentStatus.title.isNull() && 0 == QString::compare(mCurrentStatus.title, title)) {
-        mCurrentStatus.newtrack = false;
-      }
-      mCurrentStatus.volume = volume;
-      mCurrentStatus.length = length;
-      mCurrentStatus.time = time;
-      mCurrentStatus.position = position;
-      mCurrentStatus.random = (1 == random);
-      mCurrentStatus.loop = (1 == loop);
-      mCurrentStatus.repeat = (1 == repeat);
-      mCurrentStatus.title = title;
-      mCurrentStatus.artist = artist;
-      mCurrentStatus.album = album;
-      mCurrentStatus.nowplaying = now_playing;
-      mCurrentStatus.hasart = (!art_url.isNull() && !art_url.isEmpty());
-      if (!state.isNull() && !state.isEmpty()) {
-          if (0 == QString::compare("playing", state, Qt::CaseInsensitive)) {
-            mCurrentStatus.state = PLAYING;
-          }
-          else if (0 == QString::compare("paused", state, Qt::CaseInsensitive)) {
-            mCurrentStatus.state = PAUSED;
-          }
-          else if (0 == QString::compare("stop", state, Qt::CaseInsensitive)) {
-            mCurrentStatus.state = STOP;
-          }
-          else {
-            mCurrentStatus.state = UNKNOWN;
-          }
-      }
-      else {
-          mCurrentStatus.state = UNKNOWN;
-      }
-      // What's our mute status?
-      if (0 < mCurrentStatus.volume) {
-          this->mVolume = mCurrentStatus.volume;
-         this->mMuted = false;
-      }
-      else {
-         this->mMuted = true;
-      }
-      // Update the UI
-      updateUiWithCurrentStatus();
-
-  }
-
-  void PlayerMainWindow::updateUiWithCurrentStatus() {
-      // position
-      QTime timePosition(0,0,0) ;
-      timePosition =  timePosition.addSecs(mCurrentStatus.time);
-
-      ui->timeLabel->setText(timePosition.toString("h:mm:ss"));
-
-      // duration
-      if (0 < mCurrentStatus.length) {
-          QTime timeDuration(0,0,0) ;
-          timeDuration =  timeDuration.addSecs(mCurrentStatus.length);
-
-          ui->durationLabel->setText(timeDuration.toString("h:mm:ss"));
-      }
-      else {
-          ui->durationLabel->setText("0:00:00");
-      }
-
-
-      if (mCurrentStatus.position >= 0 && mCurrentStatus.position <= 100) {
-          ui->slider->blockSignals(true);
-          ui->slider->setValue(mCurrentStatus.position);
-          ui->slider->blockSignals(false);
-      }
-
-      ui->labelTitle->setText(mCurrentStatus.title);
-      ui->labelArtist->setText(mCurrentStatus.artist);
-      ui->labelAlbum->setText(mCurrentStatus.album);
-
-      if (PLAYING == mCurrentStatus.state) {
-          ui->playpauseButton->setIcon(QIcon::fromTheme("camera_video_pause"));
-      }
-      else {
-          ui->playpauseButton->setIcon(QIcon::fromTheme("camera_playback"));
-      }
-
-      if (mCurrentStatus.newtrack) {
-          // potential actions:
-          //   rebuild display layout
-          //   retrieve album art
-          mHasImage = false;
-          QTimer::singleShot(500, mPlayListMainWindow, SLOT(requestPlayList()));
-      }
-      // Update the buttons on the playlist window
-      if (NULL != this->mPlayListMainWindow) {
-        this->mPlayListMainWindow->updateUiWithCurrentStatus(& mCurrentStatus);
-      }
-
-  }
-  void PlayerMainWindow::playlistIdUpdated(int id, bool hasart, QString extension) {
-      Q_UNUSED(extension);
-      if (hasart) {
-          getCoverArt(id);
-      }
-      else {
-          ui->labelArtLandscape->setVisible(false);
-          ui->labelArtPortrait->setVisible(false);
-          // could use a default graphic from extension here!
-          // setCoverArtFromPixmap();
-      }
-  }
-  void PlayerMainWindow::error(QNetworkReply::NetworkError code) {
-      qDebug() << "Error Code: " << code;
-  }
-  void PlayerMainWindow::readReady() {
-    QNetworkReply * reply = qobject_cast<QNetworkReply*>(sender());
-    // append to buffer
-    mResponse += reply->readAll();
-  }
-  void PlayerMainWindow::finished(QNetworkReply * reply) {
-    // now we can call setCoverArt to process the full buffers
-    this->setCoverArt(mResponse);
-    // only interested in finished signals
-    disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
-    delete reply;
-  }
-  void PlayerMainWindow::getCoverArt(int id) {
-      qDebug() << "getCoverArt id=!" << id;
-    mResponse.clear();
-    QNetworkReply * reply =  mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/art?id=" + QString::number(id))));
-    connect(reply,SIGNAL(readyRead()),this,SLOT(readReady()));
-    connect(reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(error(QNetworkReply::NetworkError)));
-    connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
-
-  }
-  void PlayerMainWindow::setCoverArt(const QByteArray data) {
-    QPixmap* image = new QPixmap();
-    if (image->loadFromData(data)) {
-        mHasImage = true;
-        ui->labelArtLandscape->setPixmap(image->scaledToHeight(120, Qt::SmoothTransformation));
-        ui->labelArtPortrait->setPixmap(image->scaledToHeight(310, Qt::SmoothTransformation));
-        if (mIsLandscape) {
-            ui->labelArtPortrait->setVisible(false);
-            ui->labelArtLandscape->setVisible(true);
-        }
-        else {
-            ui->labelArtLandscape->setVisible(false);
-            ui->labelArtPortrait->setVisible(true);
-        }
-    }
-    else {
-        qDebug() << "image load failed!";
-        qDebug() << "data.length" << data.length();
-        ui->labelArtPortrait->setVisible(false);
-        ui->labelArtLandscape->setVisible(false);
-    }
-    delete image;
-  }
-  void PlayerMainWindow::setCoverArtFromPixmap(QPixmap image) {
-    mHasImage = true;
-    ui->labelArtLandscape->setPixmap(image.scaledToHeight(120, Qt::SmoothTransformation));
-    ui->labelArtPortrait->setPixmap(image.scaledToHeight(320, Qt::SmoothTransformation));
-    if (mIsLandscape) {
-        ui->labelArtPortrait->setVisible(false);
-        ui->labelArtLandscape->setVisible(true);
-    }
-    else {
-        ui->labelArtLandscape->setVisible(false);
-        ui->labelArtPortrait->setVisible(true);
-    }
-  }
-
diff --git a/playermainwindow.h b/playermainwindow.h
deleted file mode 100644 (file)
index 73c22b2..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*   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 PLAYERMAINWINDOW_H
-#define PLAYERMAINWINDOW_H
-
-#include <QMainWindow>
-#include <QtNetwork>
-#include <QtXml>
-#include <QTimer>
-#include "playlistmainwindow.h"
-#include "browsemainwindow.h"
-#include "vlcstatus.h"
-
-namespace Ui {
-    class PlayerMainWindow;
-}
-
-class PlayerMainWindow : public QMainWindow {
-    Q_OBJECT
-public:
-    explicit PlayerMainWindow(QWidget *parent = 0);
-    ~PlayerMainWindow();
-
-public slots:
-    void askStatus();
-    void showConfig();
-    void showAbout();
-    void play();
-    void playpause();
-    void stop();
-    void pause();
-    void previous();
-    void next();
-    void fullscreen();
-    void volUp();
-    void volDown();
-    void volMute();
-    void slide(int value);
-    void updateUiWithCurrentStatus();
-    void setCoverArt(const QByteArray data);
-    void setCoverArtFromPixmap(QPixmap image);
-    void getCoverArt(int id);
-    void finished(QNetworkReply * reply);
-    void error(QNetworkReply::NetworkError code);
-    void readReady();
-    void orientationChanged();
-    void setPortrait();
-    void setLandscape();
-    void setAutoRotate();
-    void playlistIdUpdated(int id, bool hasart, QString extension);
-
-
-protected slots:
-    void parseXmlStatus();
-protected:
-    void changeEvent(QEvent *e);
-
-
-private:
-    Ui::PlayerMainWindow *ui;
-    PlayListMainWindow * mPlayListMainWindow;
-    BrowseMainWindow * mBrowserMainWindow;
-    QNetworkAccessManager * mNetManager;
-    QString mIp;
-    QTimer * mTimer;
-    int mVolume;
-    int mMuted;
-    VlcStatus mCurrentStatus;
-    QByteArray mResponse;
-    bool mIsLandscape;
-    bool mHasImage;
-
-};
-
-#endif // PLAYERMAINWINDOW_H
diff --git a/playermainwindow.ui b/playermainwindow.ui
deleted file mode 100644 (file)
index a9d9065..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PlayerMainWindow</class>
- <widget class="QMainWindow" name="PlayerMainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>796</width>
-    <height>631</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Vlc-Remote</string>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QLabel" name="labelArtPortrait">
-      <property name="minimumSize">
-       <size>
-        <width>380</width>
-        <height>350</height>
-       </size>
-      </property>
-      <property name="maximumSize">
-       <size>
-        <width>380</width>
-        <height>350</height>
-       </size>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayoutDetails">
-      <item>
-       <layout class="QVBoxLayout" name="verticalLayoutDetails">
-        <item>
-         <widget class="QLabel" name="labelTitle">
-          <property name="minimumSize">
-           <size>
-            <width>0</width>
-            <height>30</height>
-           </size>
-          </property>
-          <property name="text">
-           <string>Information</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLabel" name="labelArtist">
-          <property name="minimumSize">
-           <size>
-            <width>0</width>
-            <height>30</height>
-           </size>
-          </property>
-          <property name="text">
-           <string>Information</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLabel" name="labelAlbum">
-          <property name="minimumSize">
-           <size>
-            <width>0</width>
-            <height>30</height>
-           </size>
-          </property>
-          <property name="text">
-           <string>Information</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-      <item>
-       <widget class="QLabel" name="labelArtLandscape">
-        <property name="minimumSize">
-         <size>
-          <width>140</width>
-          <height>140</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>140</width>
-          <height>140</height>
-         </size>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <spacer name="verticalSpacer">
-      <property name="orientation">
-       <enum>Qt::Vertical</enum>
-      </property>
-      <property name="sizeHint" stdset="0">
-       <size>
-        <width>20</width>
-        <height>100</height>
-       </size>
-      </property>
-     </spacer>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayoutTime">
-      <item>
-       <widget class="QLabel" name="timeLabel">
-        <property name="styleSheet">
-         <string notr="true">color: rgb(201, 201, 201);</string>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QLabel" name="durationLabel">
-        <property name="styleSheet">
-         <string notr="true">color: rgb(201, 201, 201);</string>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <widget class="QSlider" name="slider">
-      <property name="enabled">
-       <bool>true</bool>
-      </property>
-      <property name="maximum">
-       <number>100</number>
-      </property>
-      <property name="orientation">
-       <enum>Qt::Horizontal</enum>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <widget class="QToolButton" name="previousButton">
-        <property name="text">
-         <string>&lt;</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="playpauseButton">
-        <property name="text">
-         <string>Play/Pause</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="nextButton">
-        <property name="text">
-         <string>&gt;</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="stopButton">
-        <property name="text">
-         <string>Stop</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <spacer name="horizontalSpacer1">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QToolButton" name="fullscreenButton">
-        <property name="text">
-         <string>FS</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <spacer name="horizontalSpacer2">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QToolButton" name="volUp">
-        <property name="text">
-         <string>V+</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="volDown">
-        <property name="text">
-         <string>V-</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="volMute">
-        <property name="text">
-         <string>Mute</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_2">
-      <item>
-       <widget class="QPushButton" name="playlistButton">
-        <property name="text">
-         <string>PlayList</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="browseButton">
-        <property name="text">
-         <string>Browse</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>796</width>
-     <height>20</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuMenu">
-    <property name="title">
-     <string>menu</string>
-    </property>
-    <addaction name="actionConfiguration"/>
-    <addaction name="actionAbout"/>
-    <addaction name="actionPortrait"/>
-    <addaction name="actionLandscape"/>
-    <addaction name="actionAutoRotate"/>
-   </widget>
-   <addaction name="menuMenu"/>
-  </widget>
-  <action name="actionConfiguration">
-   <property name="text">
-    <string>Configuration</string>
-   </property>
-  </action>
-  <action name="actionAbout">
-   <property name="text">
-    <string>About</string>
-   </property>
-  </action>
-  <action name="actionPortrait">
-   <property name="text">
-    <string>Portrait Mode</string>
-   </property>
-  </action>
-  <action name="actionLandscape">
-   <property name="text">
-    <string>Landscape Mode</string>
-   </property>
-  </action>
-  <action name="actionAutoRotate">
-   <property name="text">
-    <string>Auto Rotate</string>
-   </property>
-  </action>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/playlistmainwindow.cpp b/playlistmainwindow.cpp
deleted file mode 100644 (file)
index a6c8a5c..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-/*   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 "playlistmainwindow.h"
-#include "ui_playlistmainwindow.h"
-#include <QPushButton>
-#include <QSettings>
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-#include <QMaemo5InformationBox>
-#endif
-#include "configdialog.h"
-#include "aboutdialog.h"
-#include "appsettings.h"
-//#include "vlcstatus.h"
-
-PlayListMainWindow::PlayListMainWindow(QWidget *parent) :
-        QMainWindow(parent),
-        ui(new Ui::PlayListMainWindow)
-{
-
-    ui->setupUi(this);
-    mTimer = new QTimer(this);
-    setWindowTitle("Vlc remote");
-
-    mCurrentDepth = 0;
-    mCurrentVlcIndex = 0;
-
-
-    mNetManager = new QNetworkAccessManager(this);
-
-    mContents = new QList<VlcPlayListElementSimple>();
-
-    ui->listWidget->setTextElideMode(Qt::ElideLeft);
-    ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
-    ui->playButton->setIcon(QIcon::fromTheme("camera_playback"));
-    ui->clearButton->setIcon(QIcon::fromTheme("general_delete"));
-    ui->shuffleButton->setIcon(QIcon::fromTheme("mediaplayer_default_shuffle"));
-    ui->loopButton->setIcon(QIcon::fromTheme("general_refresh"));
-    ui->repeatButton->setIcon(QIcon::fromTheme("general_redo"));
-    ui->removeButton->setIcon(QIcon::fromTheme("general_close"));
-
-    ui->clearButton->setDisabled(false);
-    ui->shuffleButton->setDisabled(false);
-    ui->loopButton->setDisabled(false);
-    ui->repeatButton->setDisabled(false);
-    ui->removeButton->setDisabled(true);
-    ui->playButton->setDisabled(true);
-
-    connect(ui->playButton,SIGNAL(clicked()),this,SLOT(onPlay()));
-    connect(ui->removeButton,SIGNAL(clicked()),this,SLOT(onRemove()));
-    connect(ui->repeatButton,SIGNAL(clicked()),this,SLOT(onRepeat()));
-    connect(ui->loopButton,SIGNAL(clicked()),this,SLOT(onLoop()));
-    connect(ui->shuffleButton,SIGNAL(clicked()),this,SLOT(onShuffle()));
-    connect(ui->clearButton,SIGNAL(clicked()),this,SLOT(onClear()));
-    connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
-
-    init();
-
-}
-void PlayListMainWindow::init()  // CALL WHEN CONFIG CHANGES
-{
-    mIp = AppSettings::getCurrentIp(); // AccountDialog::currentIp();
-}
-void PlayListMainWindow::showPlayList()  // CALL WHEN SHOWN
-{
-    requestPlayList();
-}
-
-PlayListMainWindow::~PlayListMainWindow()
-{
-    delete ui;
-}
-
-void PlayListMainWindow::changeEvent(QEvent *e)
-{
-    QMainWindow::changeEvent(e);
-    switch (e->type()) {
-    case QEvent::LanguageChange:
-        ui->retranslateUi(this);
-        break;
-    default:
-        break;
-    }
-}
-
-void PlayListMainWindow::onListSelectionChanged() {
-    QList<QListWidgetItem *> items = ui->listWidget->selectedItems();
-    if (0 < items.count()) {
-        // TODO VLC doesn't seem to support removing nodes!
-        // Playing nodes works fine, however.
-        // should check to see if it is a leaf or not and disable the remove button
-        mCurrentVlcIndex = items.at(0)->type() - LIST_ITEM_TYPE_OFFSET; // Qt reserves types up to 1000, we use an offset beyond that for index tracking. May prove to be too hacky!
-        mCurrentElement = getElementFromId(mCurrentVlcIndex);
-        if (0 == QString::compare("node", mCurrentElement.type)) {
-            ui->removeButton->setDisabled(true);
-            ui->playButton->setDisabled(false);
-        }
-        else {
-            ui->removeButton->setDisabled(false);
-            ui->playButton->setDisabled(false);
-        }
-    }
-    else {
-        mCurrentVlcIndex = 0;
-        ui->removeButton->setDisabled(true);
-        ui->playButton->setDisabled(true);
-    }
-}
-
-void PlayListMainWindow::onRemove() {
-    if (0 < this->mCurrentVlcIndex) {
-        mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_delete&id=" + QString::number(this->mCurrentVlcIndex))));
-        //connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
-        // don't refresh just clear the item!
-        delete ui->listWidget->takeItem(ui->listWidget->currentRow());
-    }
-}
-void PlayListMainWindow::onPlay() {
-    if (0 < this->mCurrentVlcIndex) {
-        mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_play&id=" + QString::number(this->mCurrentVlcIndex))));
-    }
-}
-void PlayListMainWindow::onRepeat() {
-    mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_repeat")));
-}
-void PlayListMainWindow::onLoop() {
-    mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_loop")));
-}
-void PlayListMainWindow::onShuffle() {
-    mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_random")));
-}
-void PlayListMainWindow::onClear() {
-    mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_empty")));
-    mContents->clear();
-    ui->listWidget->clear();
-    //connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
-}
-void PlayListMainWindow::requestPlayList() {
-  mResponse.clear();
-  ui->removeButton->setDisabled(true);
-  ui->playButton->setDisabled(true);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-  this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
-#endif
-  QNetworkReply * reply =  mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/playlist.xml")));
-  disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
-  connect(reply,SIGNAL(readyRead()),this,SLOT(readReady()));
-  connect(reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(error(QNetworkReply::NetworkError)));
-  connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
-}
-void PlayListMainWindow::error(QNetworkReply::NetworkError code) {
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-  this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
-#endif
-  qDebug() << code;
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-  QMaemo5InformationBox::information(this, tr("Playlist could not be retrieved."), QMaemo5InformationBox::DefaultTimeout);
-#endif
-}
-void PlayListMainWindow::readReady() {
-  QNetworkReply * reply = qobject_cast<QNetworkReply*>(sender());
-  // append to buffer
-  mResponse += reply->readAll();
-}
-void PlayListMainWindow::finished(QNetworkReply * reply) {
-  // now we can call parseXmlList to process the full buffers
-  this->parseXmlPlayList();
-  // only interested in finished signals
-  disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-  this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
-#endif
-  delete reply;
-}
-
-void PlayListMainWindow::parseXmlPlayList() {
-  mContents->clear();
-  QDomDocument doc;
-  doc.setContent(this->mResponse);
-  QDomElement docElem = doc.documentElement();
-  QDomNodeList nodes = docElem.elementsByTagName("node");
-  int depth = 0;
-
-  int currentLeafId = 0;
-  bool hasArt = false;
-  QString extension = "";
-
-  int ct = nodes.count();
-  for (int idx = 0; idx < ct; ++idx) {
-    QDomNode node = nodes.at(idx);
-    QString current = "";
-    //QString name = node.attributes().namedItem("name").nodeValue().replace("\\\\", "\\");
-    int id = node.attributes().namedItem("id").nodeValue().toInt();
-    if (4 > id && 0 == QString::compare(node.attributes().namedItem("ro").nodeValue(), "ro")) {
-      // got the main playlist, let's build it up
-      if (node.hasChildNodes()) {
-        QDomNodeList leafs = node.childNodes();
-        int leafct = leafs.count();
-        if (0 < leafct) {
-          depth = 1;
-          for (int jdx = 0; jdx < leafct; ++jdx) {
-            QDomNode leaf = leafs.at(jdx);
-            parsePlayListItem(&leaf, &extension, &hasArt, &currentLeafId, 1);
-          }
-        }
-      }
-
-    }
-  }
-
-  mResponse.clear();
-
-  emit this->idUpdated(currentLeafId, hasArt, extension);
-  this->updateList();
-
-
-}
-
-
-int PlayListMainWindow::parsePlayListItem(QDomNode *node, QString *extension, bool *hasArt, int *currentLeafId, int depth) {
-    int leafCt = 0;
-    if (NULL != node) {
-        QString current;
-        VlcPlayListElementSimple* el = new VlcPlayListElementSimple();
-        el->id = node->attributes().namedItem("id").nodeValue().toInt();
-        el->path = node->attributes().namedItem("uri").nodeValue();
-        el->name = node->attributes().namedItem("name").nodeValue().replace("\\\\", "\\");
-        current = node->attributes().namedItem("current").nodeValue();
-        el->playing = (0 < current.length());
-        el->depth = depth;
-        if (0 != QString::compare(node->nodeName(), "node")) {
-            el->type = "leaf";
-            el->extension = getExtension(el->path, NULL);
-            if (el->playing) {
-                *currentLeafId = el->id;
-                QString art = node->toElement().namedItem("art_url").toElement().text();
-                *hasArt = (!art.isNull() && !art.isEmpty());
-                *extension = getExtension(el->path, NULL);
-            }
-            QString title = node->toElement().namedItem("title").toElement().text();
-            QString artist = node->toElement().namedItem("artist").toElement().text();
-            QString album = node->toElement().namedItem("album").toElement().text();
-            if (0 < artist.length() || 0 < album.length()) {
-                el->name = "" + title + "\n" + artist + " - " + album;
-            }
-            this->mContents->append(*el);
-            ++leafCt;
-            delete el;
-        }
-        else {
-            el->type = "node";
-            el->extension = getExtension(el->path, NULL);
-            // empty nodes appear in the playlist when they can't be played!
-            if (node->hasChildNodes()) {
-                this->mContents->append(*el);
-                ++leafCt;
-            }
-            delete el;
-            // now parse the child nodes as leaf.
-            if (node->hasChildNodes()) {
-                QDomNodeList items = node->childNodes();
-                int itemct = items.count();
-                int added = 0;
-                if (0 < itemct) {
-                  ++depth;
-                  for (int kdx = 0; kdx < itemct; ++kdx) {
-                    QDomNode item = items.at(kdx);
-                    added += parsePlayListItem(&item, extension, hasArt, currentLeafId, depth);
-                  }
-                  if (1 > added) {
-                      // should remove the last PlayListElement
-                      this->mContents->removeLast();
-                      --leafCt;
-                  }
-                  else {
-                      leafCt += added;
-                  }
-                }
-            }
-        }
-    }
-    return leafCt;
-}
-
-QString PlayListMainWindow::getExtension(QString path, QString extension) {
-    // return extension if exists
-    if (!extension.isNull() && !extension.isEmpty()) return extension;
-    // return blank if no path
-    if (path.isNull() || path.isEmpty()) return "";
-    // otherwise extract the extension
-    int dot_pos = path.lastIndexOf('.');
-    if (0 < dot_pos) {
-        return path.right(path.length() - (dot_pos + 1));
-    }
-    else { // no dot
-        return "";
-    }
-}
-
-VlcPlayListElementSimple PlayListMainWindow::getElementFromId(int id) {
-  //if (0 != QString::compare("", text)) {
-    for (int idx = 0; idx < mContents->count(); ++idx) {
-      if (0 < id && (id == mContents->at(idx).id)) {
-        return mContents->at(idx);
-      }
-    }
-    //}
-    return *(new VlcPlayListElementSimple());
-}
-
-void PlayListMainWindow::updateList() {
-  ui->listWidget->clear();
-  int ct = this->mContents->count();
-  if (0 < ct) {
-    QIcon icon_audio  = QIcon::fromTheme("general_audio_file");
-    QIcon icon_video  = QIcon::fromTheme("general_video_file");
-    QIcon icon_image  = QIcon::fromTheme("general_image");
-    QIcon icon_flash  = QIcon::fromTheme("filemanager_flash_file");
-    QIcon icon_media  = QIcon::fromTheme("filemanager_media_folder");
-    QIcon icon_real   = QIcon::fromTheme("filemanager_real_music");
-    QIcon icon_playl  = QIcon::fromTheme("filemanager_playlist");
-    QIcon icon_unknown= QIcon::fromTheme("filemanager_unknown_file");
-    for (int idx = 0; idx < ct; ++idx) {
-      VlcPlayListElementSimple el = mContents->at(idx);
-      QListWidgetItem* item;
-      if (0 == QString::compare("node", el.type)) {
-        item = new QListWidgetItem(icon_media, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id);
-      }
-      else {
-          if ( 0 == QString::compare(el.extension, "jpg")  ||
-               0 == QString::compare(el.extension, "jpeg") ||
-               0 == QString::compare(el.extension, "gif")  ||
-               0 == QString::compare(el.extension, "png")  ||
-               0 == QString::compare(el.extension, "bmp")  ) {
-              item = new QListWidgetItem(icon_image, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .jpg, .jpeg, .gif, .png, .bmp
-          }
-          else if ( 0 == QString::compare(el.extension, "mp3")  ||
-                    0 == QString::compare(el.extension, "m4a")  ||
-                    0 == QString::compare(el.extension, "ogg")  ||
-                    0 == QString::compare(el.extension, "oga")  ||
-                    0 == QString::compare(el.extension, "wav")  ||
-                    0 == QString::compare(el.extension, "flac")  ) {
-              item = new QListWidgetItem(icon_audio, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .mp3, .m4a, .ogg, .oga, .wav, .flac
-          }
-          else if ( 0 == QString::compare(el.extension, "m3u")  ||
-                    0 == QString::compare(el.extension, "wpl")  ||
-                    0 == QString::compare(el.extension, "pls")  ||
-                    0 == QString::compare(el.extension, "asx")  ||
-                    0 == QString::compare(el.extension, "xspf") ||
-                    0 == QString::compare(el.extension, "cmml")  ) {
-              item = new QListWidgetItem(icon_playl, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .m3u, .wpl, .pls, .asx, .xspf, .cmml
-          }
-          else if ( 0 == QString::compare(el.extension, "avi")  ||
-                    0 == QString::compare(el.extension, "mpeg") ||
-                    0 == QString::compare(el.extension, "mpg")  ||
-                    0 == QString::compare(el.extension, "mov")  ||
-                    0 == QString::compare(el.extension, "mp4")  ||
-                    0 == QString::compare(el.extension, "m4v")  ||
-                    0 == QString::compare(el.extension, "wmv")  ||
-                    0 == QString::compare(el.extension, "mkv")  ||
-                    0 == QString::compare(el.extension, "ogv")  ) {
-              item = new QListWidgetItem(icon_video, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .avi, .mpg, .mpeg, .mov, .m4v, .mp4, .wmv, .mkv, .ogv
-          }
-          else if ( 0 == QString::compare(el.extension, "rm")  ||
-                    0 == QString::compare(el.extension, "ra")  ||
-                    0 == QString::compare(el.extension, "ram")  ) {
-              item = new QListWidgetItem(icon_real, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .ram, 'rm, 'ra
-          }
-          else if ( 0 == QString::compare(el.extension, "flv")  ) {
-              item = new QListWidgetItem(icon_flash, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .flv
-          }
-          //else if ( 0 == QString::compare(el.extension, "")  ) {
-          //    item = new QListWidgetItem(icon_unknown, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .flv
-          //}
-          else {
-              if (el.name.contains("Flash")) {
-                  item = new QListWidgetItem(icon_flash, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id);
-              }
-              else {
-                  item = new QListWidgetItem(icon_media, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id);
-              }
-          }
-      }
-      item->setSelected(el.playing);
-      ui->listWidget->addItem(item);
-      if (el.playing) {
-          ui->listWidget->scrollToItem(item, QAbstractItemView::PositionAtCenter);
-      }
-    }
-  }
-}
-void PlayListMainWindow::updateUiWithCurrentStatus(VlcStatus * status) {
-    ui->loopButton->setChecked(status->loop);
-    ui->repeatButton->setChecked(status->repeat);
-    ui->shuffleButton->setChecked(status->random);
-}
diff --git a/playlistmainwindow.h b/playlistmainwindow.h
deleted file mode 100644 (file)
index a6a444f..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*   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 PLAYLISTMAINWINDOW_H
-#define PLAYLISTMAINWINDOW_H
-
-#include <QMainWindow>
-#include <QTimer>
-#include <QtNetwork>
-#include <QtXml>
-#include "vlcplaylistelementsimple.h"
-#include "vlcstatus.h"
-
-#ifndef LIST_ITEM_TYPE_OFFSET
-#define LIST_ITEM_TYPE_OFFSET 1000
-#endif
-
-namespace Ui {
-    class PlayListMainWindow;
-}
-
-class PlayListMainWindow : public QMainWindow {
-    Q_OBJECT
-public:
-    explicit PlayListMainWindow(QWidget *parent = 0);
-    ~PlayListMainWindow();
-    void init();
-public slots:
-    void onClear();
-    void onShuffle();
-    void onLoop();
-    void onPlay();
-    void onRepeat();
-    void onRemove();
-    void requestPlayList();
-    void onListSelectionChanged();
-    void finished(QNetworkReply * reply);
-    void readReady();
-    void error(QNetworkReply::NetworkError code);
-    void showPlayList();
-    void updateUiWithCurrentStatus(VlcStatus * status);
-
-protected slots:
-    void parseXmlPlayList();
-    void updateList();
-    int parsePlayListItem(QDomNode *node, QString *extension, bool *hasArt, int *currentLeafId, int depth);
-
-signals:
-    void idUpdated(int id, bool hasArt, QString extension);
-
-protected:
-    void changeEvent(QEvent *e);
-    VlcPlayListElementSimple getElementFromId(int id);
-    QString getExtension(QString path, QString extension);
-
-private:
-    Ui::PlayListMainWindow *ui;
-    QTimer * mTimer;
-    QString mIp;
-    QNetworkAccessManager * mNetManager;
-    QList<VlcPlayListElementSimple>* mContents;
-    VlcPlayListElementSimple mCurrentElement;
-    int mCurrentVlcIndex;
-    int mCurrentDepth;
-    QByteArray mResponse;
-};
-
-#endif // PLAYLISTMAINWINDOW_H
diff --git a/playlistmainwindow.ui b/playlistmainwindow.ui
deleted file mode 100644 (file)
index c98d800..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PlayListMainWindow</class>
- <widget class="QMainWindow" name="PlayListMainWindow">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>800</width>
-    <height>600</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Playlist</string>
-  </property>
-  <widget class="QWidget" name="centralwidget">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QListWidget" name="listWidget">
-      <item>
-       <property name="text">
-        <string>not yet done</string>
-       </property>
-      </item>
-      <item>
-       <property name="text">
-        <string>not yet done</string>
-       </property>
-      </item>
-      <item>
-       <property name="text">
-        <string>not yet done</string>
-       </property>
-      </item>
-     </widget>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <widget class="QToolButton" name="playButton">
-        <property name="text">
-         <string>Play</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="shuffleButton">
-        <property name="text">
-         <string>Shuffle</string>
-        </property>
-        <property name="checkable">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="loopButton">
-        <property name="text">
-         <string>Loop</string>
-        </property>
-        <property name="checkable">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="repeatButton">
-        <property name="text">
-         <string>Repeat</string>
-        </property>
-        <property name="checkable">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <spacer name="horizontalSpacer">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-     </layout>
-    </item>
-    <item>
-     <layout class="QHBoxLayout" name="horizontalLayout_2">
-      <item>
-       <widget class="QPushButton" name="clearButton">
-        <property name="text">
-         <string>Clear all</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="removeButton">
-        <property name="text">
-         <string>Remove</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QMenuBar" name="menubar">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>800</width>
-     <height>25</height>
-    </rect>
-   </property>
-   <widget class="QMenu" name="menuMenu">
-    <property name="title">
-     <string>menu</string>
-    </property>
-   </widget>
-   <addaction name="menuMenu"/>
-  </widget>
-  <action name="actionPortrait">
-   <property name="text">
-    <string>Portrait Mode</string>
-   </property>
-  </action>
-  <action name="actionLandscape">
-   <property name="text">
-    <string>Landscape Mode</string>
-   </property>
-  </action>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/resource.qrc b/resource.qrc
deleted file mode 100644 (file)
index aeea2b6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
-    <qresource prefix="/">
-        <file>config-vlc.jpg</file>
-    </qresource>
-</RCC>
diff --git a/ressources.qrc b/ressources.qrc
deleted file mode 100644 (file)
index 0821e0c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
-    <qresource prefix="/languages">
-        <file>vlcremote_fr_FR.qm</file>
-    </qresource>
-</RCC>
diff --git a/scanipdialog.cpp b/scanipdialog.cpp
deleted file mode 100644 (file)
index 4de0efe..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "scanipdialog.h"
-#include "ui_scanipdialog.h"
-
-ScanIPDialog::ScanIPDialog(QWidget *parent) :
-    QDialog(parent),
-    ui(new Ui::ScanIPDialog)
-{
-    ui->setupUi(this);
-}
-
-ScanIPDialog::~ScanIPDialog()
-{
-    delete ui;
-}
-
-void ScanIPDialog::changeEvent(QEvent *e)
-{
-    QDialog::changeEvent(e);
-    switch (e->type()) {
-    case QEvent::LanguageChange:
-        ui->retranslateUi(this);
-        break;
-    default:
-        break;
-    }
-}
diff --git a/scanipdialog.h b/scanipdialog.h
deleted file mode 100644 (file)
index 0e3cdf4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef SCANIPDIALOG_H
-#define SCANIPDIALOG_H
-
-#include <QDialog>
-
-namespace Ui {
-    class ScanIPDialog;
-}
-
-class ScanIPDialog : public QDialog {
-    Q_OBJECT
-public:
-    explicit ScanIPDialog(QWidget *parent = 0);
-    ~ScanIPDialog();
-
-protected:
-    void changeEvent(QEvent *e);
-
-private:
-    Ui::ScanIPDialog *ui;
-};
-
-#endif // SCANIPDIALOG_H
diff --git a/scanipdialog.ui b/scanipdialog.ui
deleted file mode 100644 (file)
index e5aa69a..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ScanIPDialog</class>
- <widget class="QDialog" name="ScanIPDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>422</width>
-    <height>360</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout_2">
-     <item>
-      <layout class="QGridLayout" name="gridLayout">
-       <item row="0" column="0">
-        <widget class="QLabel" name="label">
-         <property name="text">
-          <string>name</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="1">
-        <widget class="QLineEdit" name="lineEdit"/>
-       </item>
-       <item row="1" column="0">
-        <widget class="QLabel" name="label_2">
-         <property name="text">
-          <string>IP</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QLineEdit" name="lineEdit_2"/>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <widget class="QListWidget" name="listWidget"/>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <widget class="QPushButton" name="pushButton_2">
-       <property name="text">
-        <string>Scan</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="pushButton">
-       <property name="text">
-        <string>Done</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/AboutDialog.ui b/src/AboutDialog.ui
new file mode 100644 (file)
index 0000000..2cf6ba0
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/Maemo_VLC_remote.svg b/src/Maemo_VLC_remote.svg
new file mode 100644 (file)
index 0000000..83ad807
--- /dev/null
@@ -0,0 +1,453 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64px"
+   height="64px"
+   id="svg2816"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="Maemo_VLC_remote.svg"
+   inkscape:export-filename="/home/eugene/Downloads/likalo/icons/Maemo_VLC_remote.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs2818">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3979">
+      <stop
+         style="stop-color:#e6eff7;stop-opacity:1;"
+         offset="0"
+         id="stop3981" />
+      <stop
+         style="stop-color:#e6eff7;stop-opacity:0;"
+         offset="1"
+         id="stop3983" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3791">
+      <stop
+         style="stop-color:#8b8b8b;stop-opacity:1"
+         offset="0"
+         id="stop3793" />
+      <stop
+         style="stop-color:#050505;stop-opacity:1"
+         offset="1"
+         id="stop3795" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3687">
+      <stop
+         style="stop-color:#f2f2f2;stop-opacity:1;"
+         offset="0"
+         id="stop3689" />
+      <stop
+         style="stop-color:#f2f2f2;stop-opacity:0;"
+         offset="1"
+         id="stop3691" />
+    </linearGradient>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 32 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="64 : 32 : 1"
+       inkscape:persp3d-origin="32 : 21.333333 : 1"
+       id="perspective2824" />
+    <filter
+       inkscape:collect="always"
+       id="filter3756"
+       x="-0.1344"
+       width="1.2688"
+       y="-0.336"
+       height="1.672">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="1.68"
+         id="feGaussianBlur3758" />
+    </filter>
+    <inkscape:perspective
+       id="perspective3840"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3687"
+       id="linearGradient3854"
+       gradientUnits="userSpaceOnUse"
+       x1="32"
+       y1="22"
+       x2="32"
+       y2="52.066593"
+       gradientTransform="matrix(1.111111,0,0,1,-3.5555554,-1)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3791"
+       id="linearGradient3865"
+       gradientUnits="userSpaceOnUse"
+       spreadMethod="pad"
+       x1="44"
+       y1="-30"
+       x2="48"
+       y2="-32" />
+    <filter
+       inkscape:collect="always"
+       id="filter3949"
+       x="-0.17035383"
+       width="1.3407077"
+       y="-0.045646171"
+       height="1.0912923">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.91101842"
+         id="feGaussianBlur3951" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       id="filter3959"
+       x="-0.055835792"
+       width="1.1116716"
+       y="-0.34203537"
+       height="1.6840707">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.11718901"
+         id="feGaussianBlur3961" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       id="filter3969">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.32"
+         id="feGaussianBlur3971" />
+    </filter>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3979"
+       id="radialGradient3987"
+       cx="34.5"
+       cy="32.5"
+       fx="26.331987"
+       fy="28.26091"
+       r="20.5"
+       gradientTransform="matrix(1.0286932,-0.00554309,4.8548147e-4,0.09009624,-1.0056937,29.763108)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3979"
+       id="radialGradient3991"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.62725195,-0.00554309,2.9602529e-4,0.09009624,23.850187,10.763108)"
+       cx="34.5"
+       cy="32.5"
+       fx="26.331987"
+       fy="28.26091"
+       r="20.5" />
+    <filter
+       inkscape:collect="always"
+       id="filter4001"
+       x="-0.024585366"
+       width="1.0491707"
+       y="-1.008"
+       height="3.016">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.42"
+         id="feGaussianBlur4003" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       id="filter4009"
+       x="-0.624"
+       width="2.248"
+       y="-0.02496"
+       height="1.04992">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.26"
+         id="feGaussianBlur4011" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3687"
+       id="linearGradient4020"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.111111,0,0,1,0.4444446,-1)"
+       x1="32"
+       y1="22"
+       x2="32"
+       y2="52.066593" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3791"
+       id="linearGradient4026"
+       gradientUnits="userSpaceOnUse"
+       spreadMethod="pad"
+       x1="44"
+       y1="-30"
+       x2="48"
+       y2="-32"
+       gradientTransform="translate(0,-4)" />
+    <inkscape:perspective
+       id="perspective2875"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3791"
+       id="linearGradient2937"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,-4)"
+       spreadMethod="pad"
+       x1="44"
+       y1="-30"
+       x2="48"
+       y2="-32" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3687"
+       id="linearGradient2939"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.111111,0,0,1,0.4444446,-1)"
+       x1="32"
+       y1="22"
+       x2="32"
+       y2="52.066593" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3979"
+       id="radialGradient2941"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0286932,-0.00554309,4.8548147e-4,0.09009624,-1.0056937,29.763108)"
+       cx="34.5"
+       cy="32.5"
+       fx="26.331987"
+       fy="28.26091"
+       r="20.5" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3979"
+       id="radialGradient2943"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.62725195,-0.00554309,2.9602529e-4,0.09009624,23.850187,10.763108)"
+       cx="34.5"
+       cy="32.5"
+       fx="26.331987"
+       fy="28.26091"
+       r="20.5" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="9.671875"
+     inkscape:cx="28.015642"
+     inkscape:cy="25.696712"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:document-units="px"
+     inkscape:grid-bbox="true"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:snap-global="true"
+     inkscape:window-width="1640"
+     inkscape:window-height="1027"
+     inkscape:window-x="36"
+     inkscape:window-y="-4"
+     inkscape:window-maximized="1">
+    <sodipodi:guide
+       orientation="1,0"
+       position="4,52.545455"
+       id="guide2826" />
+    <sodipodi:guide
+       orientation="1,0"
+       position="60,40"
+       id="guide2828" />
+    <sodipodi:guide
+       orientation="0,1"
+       position="31,61"
+       id="guide2830" />
+    <sodipodi:guide
+       orientation="0,1"
+       position="45.454545,4"
+       id="guide2832" />
+    <inkscape:grid
+       type="xygrid"
+       id="grid2836" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata2821">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       id="g2912"
+       transform="matrix(0.99828455,0,0,1.016587,0.00669673,-0.97863428)"
+       inkscape:export-filename="/home/schutz/programmation/git-vlc-remote/vlc-remote.png"
+       inkscape:export-xdpi="116"
+       inkscape:export-ydpi="116">
+      <path
+         id="path3885"
+         d="m 29.124008,4 -18.030258,49.555556 -6.010086,0 c -0.6536613,0 -1.1798942,0.526232 -1.1798942,1.179894 l 0,1.179894 c 0,0.653661 0.5262329,1.179895 1.1798942,1.179895 l 4.7195768,0 42.4761912,0 4.719576,0 c 0.653661,0 1.179894,-0.526234 1.179894,-1.179895 l 0,-1.179894 c 0,-0.653662 -0.526233,-1.179894 -1.179894,-1.179894 l -6.08383,0 L 32,4 29.124008,4 z"
+         style="fill:#e97f02;stroke:none" />
+      <path
+         sodipodi:nodetypes="cccccccccc"
+         id="path3913"
+         d="M 31,4 34.1875,54 35,57 57.46875,57 c 0.423766,-0.178644 0.71875,-0.603504 0.71875,-1.09375 l 0,-1.15625 c 0,-0.653662 -0.533839,-1.1875 -1.1875,-1.1875 l -6.09375,0 L 32,4 31,4 z"
+         style="fill:#eb6841;stroke:none" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3963"
+         d="M 32,6 48,54 43,54 32,6 z"
+         style="fill:#cc333f;stroke:none;filter:url(#filter3969)" />
+      <path
+         id="rect3908"
+         d="m 3.90625,55.657986 0,0.62145 c 0,0.44824 0.5338387,0.814314 1.1875,0.814314 l 4.71875,0 42.46875,0 4.71875,0 c 0.653661,0 1.1875,-0.366074 1.1875,-0.814314 l 0,-0.62145 -54.28125,0 z"
+         style="fill:#8e6c11;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+      <path
+         style="fill:#f8ca00;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 27.562279,9 -1.683727,5 9.579819,0 -1.770816,-5 -6.125276,0 z M 24.165796,19 22.482071,24 39,24 37.229184,19 24.165796,19 z m -3.36745,10 -1.683725,5 23.427008,0 -1.770813,-5 -19.97247,0 z"
+         id="path3906" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path3918"
+         d="M 29.053312,6.1001616 16.218589,54 24,54 29.053312,6.1001616 z"
+         style="fill:#f0db92;stroke:none;filter:url(#filter3949)" />
+      <path
+         id="rect3896"
+         d="m 27.961923,9 -1.477687,5 8.407527,0 -1.554119,-5 -5.375721,0 z M 24.981072,19 23.503386,24 38,24 36.445881,19 24.981072,19 z m -2.955373,10 -1.477686,5 20.560224,0 -1.554118,-5 -17.52842,0 z"
+         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+      <path
+         id="path3953"
+         d="M 4.9628433,54.177706 10,54.177706 9.779667,55 5,55 4.9628433,54.177706 z"
+         style="fill:#f8ca00;stroke:none;filter:url(#filter3959)" />
+      <g
+         id="g4028">
+        <g
+           id="g2889">
+          <rect
+             transform="matrix(0,1,-1,0,0,0)"
+             ry="2"
+             rx="2"
+             y="-60"
+             x="31"
+             height="48"
+             width="28"
+             id="rect2834"
+             style="fill:url(#linearGradient2937);fill-opacity:1;fill-rule:nonzero;stroke:none" />
+          <rect
+             ry="1"
+             rx="1"
+             transform="matrix(0,1,-1,0,0,0)"
+             style="fill:#4a4a4a;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             id="rect3610"
+             width="26"
+             height="46"
+             x="32"
+             y="-59" />
+          <rect
+             ry="2"
+             rx="2.181818"
+             y="-58"
+             x="-57"
+             height="44"
+             width="24"
+             id="rect3676"
+             style="fill:#050505;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="matrix(0,-1,-1,0,0,0)" />
+          <rect
+             y="-55"
+             x="-55"
+             height="38"
+             width="20"
+             id="rect3711"
+             style="fill:#303030;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="matrix(0,-1,-1,0,0,0)" />
+          <path
+             id="path3726"
+             d="M 16,34 16,46.21875 56,39.78125 56,34 16,34 z"
+             style="opacity:0.5;fill:url(#linearGradient2939);fill-opacity:1;fill-rule:nonzero;stroke:none" />
+          <path
+             style="fill:#69d2e7;fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter3756)"
+             d="m 34,41 0,12 6,-6 -6,-6 z m -13,3 0,5 2,0 0,-5 -2,0 z m 3,0 0,5 2,0 0,-5 -2,0 z m 22,0 0,5 5,0 0,-5 -5,0 z"
+             id="path3742" />
+          <path
+             id="rect3719"
+             d="m 34,41 0,12 6,-6 -6,-6 z m -13,3 0,5 2,0 0,-5 -2,0 z m 3,0 0,5 2,0 0,-5 -2,0 z m 22,0 0,5 5,0 0,-5 -5,0 z"
+             style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+          <path
+             id="rect3768"
+             d="m 29.125,38 0,17 0.875,0 0,-17 -0.875,0 z M 43,38 l 0,17 0.875,0 0,-17 L 43,38 z"
+             style="fill:#1a1a21;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+          <rect
+             y="35"
+             x="17"
+             height="1.0000023"
+             width="38"
+             id="rect3867"
+             style="opacity:0.5;fill:#1a1a21;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+          <rect
+             y="32"
+             x="14"
+             height="1"
+             width="41"
+             id="rect3977"
+             style="opacity:0.5;fill:url(#radialGradient2941);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter4001)" />
+          <rect
+             transform="matrix(0,1,1,0,-0.31017771,0)"
+             style="fill:url(#radialGradient2943);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter4009)"
+             id="rect3989"
+             width="25"
+             height="1"
+             x="33"
+             y="13" />
+          <rect
+             y="31.48435"
+             x="17"
+             height="1.5156504"
+             width="6.0000005"
+             id="rect3773"
+             style="fill:#bdbdbd;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+          <rect
+             y="34"
+             x="16"
+             height="2"
+             width="2"
+             id="rect3713"
+             style="fill:#69d2e7;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+        </g>
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/src/aboutdialog.cpp b/src/aboutdialog.cpp
new file mode 100644 (file)
index 0000000..e1606ea
--- /dev/null
@@ -0,0 +1,43 @@
+/*   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 "aboutdialog.h"
+#include "ui_aboutdialog.h"
+
+AboutDialog::AboutDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::AboutDialog)
+{
+    ui->setupUi(this);
+}
+
+AboutDialog::~AboutDialog()
+{
+    delete ui;
+}
+
+void AboutDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
diff --git a/src/aboutdialog.h b/src/aboutdialog.h
new file mode 100644 (file)
index 0000000..c92ce70
--- /dev/null
@@ -0,0 +1,40 @@
+/*   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 ABOUTDIALOG_H
+#define ABOUTDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class AboutDialog;
+}
+
+class AboutDialog : public QDialog {
+    Q_OBJECT
+public:
+    explicit AboutDialog(QWidget *parent = 0);
+    ~AboutDialog();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::AboutDialog *ui;
+};
+
+#endif // ABOUTDIALOG_H
diff --git a/src/aboutdialog.ui b/src/aboutdialog.ui
new file mode 100644 (file)
index 0000000..ad5fdd1
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AboutDialog</class>
+ <widget class="QDialog" name="AboutDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;OMed &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Application by Sacha schutz &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;istdasklar@gmail.com&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://omedsoft.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>AboutDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>AboutDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/accountdialog.cpp b/src/accountdialog.cpp
new file mode 100644 (file)
index 0000000..ecdb02f
--- /dev/null
@@ -0,0 +1,210 @@
+/*   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 "accountdialog.h"
+#include "ui_accountdialog.h"
+#include "newaccountdialog.h"
+#include <QDebug>
+#include <QInputDialog>
+#include <QSettings>
+#include <QTcpSocket>
+#include <QFuture>
+#include <QtConcurrentMap>
+
+
+
+QListWidgetItem asyncTestItem(const QListWidgetItem &item)
+{
+
+    QListWidgetItem item2= item;
+    item2.setText("boby");
+
+    return item;
+
+}
+
+
+
+
+AccountDialog::AccountDialog(QWidget *parent) :
+        QDialog(parent),
+        ui(new Ui::AccountDialog)
+{
+    ui->setupUi(this);
+
+    mFuturWatcher = new QFutureWatcher<QListWidgetItem>(this);
+    connect(mFuturWatcher,SIGNAL(resultReadyAt(int)),this,SLOT(setAsyncItem(int)));
+
+    connect(ui->addButton,SIGNAL(clicked()),this,SLOT(add()));
+    connect(ui->editButton,SIGNAL(clicked()),this,SLOT(edit()));
+    connect(ui->remButton,SIGNAL(clicked()),this,SLOT(rem()));
+    connect(ui->useButton,SIGNAL(clicked()),this,SLOT(use()));
+    connect(ui->listWidget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(enableUi()));
+
+    load();
+
+}
+
+AccountDialog::~AccountDialog()
+{
+    delete ui;
+}
+
+void AccountDialog::add()
+{
+
+    NewAccountDialog *dialog = new NewAccountDialog(this);
+    dialog->exec();
+    load();
+}
+QString AccountDialog::currentIp()
+{
+
+    QSettings settings;
+    QString useKey = settings.value("config/currentKey").toString();
+    QString useIp ;
+    if ( !useKey.isEmpty())
+        useIp = settings.value("account/"+useKey).toString();
+
+    else return QString();
+
+    return useIp;
+}
+
+void AccountDialog::load()
+{
+    ui->editButton->setEnabled(false);
+    ui->remButton->setEnabled(false);
+    ui->useButton->setEnabled(false);
+    ui->listWidget->clear(); // tjr effacer , sinon on rajoute
+
+    QSettings settings;
+
+    QString useKey = settings.value("config/currentKey").toString();
+
+    QList <QListWidgetItem> asycItems;
+
+    settings.beginGroup("account");
+    foreach ( QString key, settings.allKeys())
+    {
+        QListWidgetItem * item = new QListWidgetItem;
+
+        item->setText(key);
+        item->setData(Qt::UserRole, settings.value(key));
+        if (useKey == key) {
+            QFont font = item->font();
+            font.setBold(true);
+            item->setFont(font);
+        }
+        ui->listWidget->addItem(item);
+        asycItems.append(*item);
+    }
+    settings.endGroup();    
+
+
+    // ... create and add in the list widget
+
+    //  QFuture<QListWidgetItem> itemFutur = QtConcurrent::mapped(asycItems, asyncTestItem);
+
+
+    mFuturWatcher->setFuture(QtConcurrent::mapped(asycItems, asyncTestItem));
+}
+
+QListWidgetItem AccountDialog::asyncTestItem(const QListWidgetItem& item)
+{
+    //==========> NEED TO USE POINTER TO AVOID setAsyncItem! But I don't know how;..
+    QListWidgetItem newItem = item;
+
+    QTcpSocket * socket = new QTcpSocket;
+    QSettings settings;
+    QString host = settings.value("account/"+item.text()).toString();
+
+    if(host.contains(":"))
+    {
+        QStringList hostSplit = host.split(":");
+        QString ip   = hostSplit.at(0);
+        QString port = hostSplit.at(1);
+        socket->connectToHost(ip,port.toInt());
+    }
+
+    else
+        socket->connectToHost(host,8080);
+
+    if (socket->waitForConnected(1000))
+        newItem.setIcon(QIcon::fromTheme("widgets_tickmark_list"));
+    else
+        newItem.setIcon(QIcon::fromTheme("statusarea_presence_busy_error"));
+
+    return newItem;
+
+
+}
+
+
+
+void AccountDialog::setAsyncItem(int row)  // EDIT THE ROW AFTER ASYNC FUNCTION FINISHED
+{
+    QListWidgetItem newItem = mFuturWatcher->resultAt(row);
+    QListWidgetItem * item = ui->listWidget->item(row);
+
+    item->setIcon(newItem.icon());
+
+
+
+}
+
+
+
+void AccountDialog::edit()
+{
+    QString currentIp = ui->listWidget->currentItem()->data(Qt::UserRole).toString();
+    QString currentKey = ui->listWidget->currentItem()->text();
+
+    NewAccountDialog *dialog = new NewAccountDialog(this);
+    dialog->edit(currentKey, currentIp);
+    dialog->exec();
+
+    load();
+}
+
+void AccountDialog::rem()
+{
+    QString key = ui->listWidget->currentItem()->text();
+
+    QSettings settings;
+    settings.beginGroup("account");
+    settings.remove(key);
+    settings.endGroup();
+
+    load(); // On recharge les compte
+}
+
+void AccountDialog::use()
+{
+    QString currentKey = ui->listWidget->currentItem()->text();
+    QSettings settings;
+    settings.setValue("config/currentKey", currentKey);
+    load();
+    emit accept();
+}
+
+void AccountDialog::enableUi()
+{
+    ui->editButton->setEnabled(true);
+    ui->remButton->setEnabled(true);
+    ui->useButton->setEnabled(true);
+}
diff --git a/src/accountdialog.h b/src/accountdialog.h
new file mode 100644 (file)
index 0000000..e9468dd
--- /dev/null
@@ -0,0 +1,53 @@
+/*   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 ACCOUNTDIALOG_H
+#define ACCOUNTDIALOG_H
+
+#include <QDialog>
+#include <QListWidget>
+#include <QFutureWatcher>
+namespace Ui {
+    class AccountDialog;
+}
+
+class AccountDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit AccountDialog(QWidget *parent = 0);
+    ~AccountDialog();
+     static QListWidgetItem asyncTestItem(const QListWidgetItem& item);
+
+
+static QString  currentIp();
+
+public slots:
+    void add();
+    void edit();
+    void rem();
+    void use();
+    void load();
+    void enableUi();
+ void setAsyncItem(int row);
+private:
+    Ui::AccountDialog *ui;
+    QFutureWatcher <QListWidgetItem> * mFuturWatcher;
+};
+
+#endif // ACCOUNTDIALOG_H
diff --git a/src/accountdialog.ui b/src/accountdialog.ui
new file mode 100644 (file)
index 0000000..8b0dd97
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AccountDialog</class>
+ <widget class="QDialog" name="AccountDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Accounts</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout">
+   <item>
+    <widget class="QListWidget" name="listWidget">
+     <item>
+      <property name="text">
+       <string>test</string>
+      </property>
+     </item>
+    </widget>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QPushButton" name="addButton">
+       <property name="text">
+        <string>Add</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="editButton">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>Edit</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="remButton">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>Remove</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout_2"/>
+     </item>
+     <item>
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>40</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="useButton">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>Use</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/accountnewdialog.ui b/src/accountnewdialog.ui
new file mode 100644 (file)
index 0000000..0ac856e
--- /dev/null
@@ -0,0 +1,67 @@
+<ui version="4.0" >
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>320</width>
+    <height>240</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Dialog</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox" >
+   <property name="geometry" >
+    <rect>
+     <x>10</x>
+     <y>200</y>
+     <width>301</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation" >
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons" >
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/appsettings.cpp b/src/appsettings.cpp
new file mode 100644 (file)
index 0000000..babef8c
--- /dev/null
@@ -0,0 +1,90 @@
+/*   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 <QStringList>
+#include "appsettings.h"
+
+AppSettings::AppSettings() {
+}
+
+AppSettings::~AppSettings() {
+    ;
+}
+
+QString AppSettings::getCurrentKey() {
+    QSettings sets;
+    return sets.value("config/currentKey", "").toString();
+}
+QString AppSettings::getCurrentIp() {
+    QSettings sets;
+    return sets.value("account/" + getCurrentKey(), "").toString();
+}
+VlcDirectory AppSettings::getHomeDirectory() {
+    QSettings sets;
+    VlcDirectory home;
+    home.name = sets.value("config/accounts/" + getCurrentKey() + "/homeDirName", "Default").toString();
+    home.path = sets.value("config/accounts/" + getCurrentKey() + "/homeDirPath", "~/").toString();
+    return home;
+}
+bool AppSettings::setHomeDirectory(VlcDirectory dir) {
+    QSettings sets;
+    sets.setValue("config/accounts/" + getCurrentKey() + "/homeDirName", dir.name);
+    sets.setValue("config/accounts/" + getCurrentKey() + "/homeDirPath", dir.path);
+    return true;
+}
+QList<VlcDirectory>* AppSettings::getFavourites() {
+    QSettings sets;
+    QList<VlcDirectory> * favourites = new QList<VlcDirectory>();
+
+    sets.beginGroup("config/accounts/" + getCurrentKey() + "/favourites");
+    foreach ( QString key, sets.allKeys())
+    {
+        VlcDirectory dir;
+        // key is name
+        dir.name = key;
+        // value is path
+        dir.path = sets.value(key, "~/").toString();
+        favourites->append(dir);
+    }
+    sets.endGroup();
+    return favourites;
+}
+bool AppSettings::addFavourite(VlcDirectory dir) {
+    QSettings sets;
+    // should check for existing first otherwise it overwrites
+    if (0 < sets.value("config/accounts/" + getCurrentKey() + "/favourites/" + dir.name, "").toString().length()) {
+        dir.name = "_" + dir.name;
+        return addFavourite(dir);
+    }
+    sets.setValue("config/accounts/" + getCurrentKey() + "/favourites/" + dir.name, dir.path);
+    return true;
+}
+bool AppSettings::deleteFavourite(VlcDirectory dir) {
+    QSettings sets;
+    sets.remove("config/accounts/" + getCurrentKey() + "/favourites/" + dir.name);
+    return true;
+}
+Orientation AppSettings::setOrientation(Orientation orientation) {
+    QSettings sets;
+    sets.setValue("config/orientation", (int)orientation);
+    return orientation;
+}
+Orientation AppSettings::getOrientation() {
+    QSettings sets;
+    return (Orientation)(sets.value("config/orientation", AUTO_ROTATE).toInt());
+}
+
diff --git a/src/appsettings.h b/src/appsettings.h
new file mode 100644 (file)
index 0000000..407b5a2
--- /dev/null
@@ -0,0 +1,49 @@
+/*   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 APPSETTINGS_H
+#define APPSETTINGS_H
+#include <QSettings>
+
+struct VlcDirectory {
+    QString name;
+    QString path;
+};
+enum Orientation {
+    AUTO_ROTATE = 0,
+    LANDSCAPE,
+    PORTRAIT
+};
+
+class AppSettings {
+public:
+    explicit AppSettings();
+    ~AppSettings();
+    static QString getCurrentKey();
+    static QString getCurrentIp();
+    static VlcDirectory getHomeDirectory();
+    static QList<VlcDirectory>* getFavourites();
+    static bool addFavourite(VlcDirectory dir);
+    static bool deleteFavourite(VlcDirectory dir);
+    static bool setHomeDirectory(VlcDirectory dir);
+    static Orientation setOrientation(Orientation orientation);
+    static Orientation getOrientation();
+//private:
+    //static QSettings settings;
+};
+
+#endif // APPSETTINGS_H
diff --git a/src/browsemainwindow.cpp b/src/browsemainwindow.cpp
new file mode 100644 (file)
index 0000000..a07b131
--- /dev/null
@@ -0,0 +1,427 @@
+/*   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 "browsemainwindow.h"
+#include "ui_browsemainwindow.h"
+#include <QSettings>
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+#include <QMaemo5InformationBox>
+#endif
+#include "configdialog.h"
+#include "aboutdialog.h"
+#include "vlcbrowseelement.h"
+#include "appsettings.h"
+#include "favouritesmainwindow.h"
+
+BrowseMainWindow::BrowseMainWindow(QWidget *parent) :
+        QMainWindow(parent),
+        ui(new Ui::BrowseMainWindow)
+{
+
+    ui->setupUi(this);
+    mFavouritesMainWindow = new FavouritesMainWindow;
+    mCurrentDir = "~/"; //AppSettings::getHomeDirectory().path; // This works on win as well as linux, would guess mac too.
+    setWindowTitle("Vlc remote");
+
+
+    mNetManager = new QNetworkAccessManager(this);
+
+    mContents = new QList<VlcBrowseElement>();
+
+    ui->listWidget->setTextElideMode(Qt::ElideMiddle);
+    ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+    ui->playButton->setIcon(QIcon::fromTheme("camera_playback"));
+    ui->addButton->setIcon(QIcon::fromTheme("general_add"));
+    ui->browseButton->setIcon(QIcon::fromTheme("filemanager_media_folder"));
+    ui->browseButton->setDisabled(true);
+    ui->playButton->setDisabled(true);
+    ui->addButton->setDisabled(true);
+
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+
+    mFavouritesMainWindow->setParent(this);
+    mFavouritesMainWindow->setAttribute(Qt::WA_Maemo5StackedWindow, true);
+    setAttribute(Qt::WA_Maemo5StackedWindow, true);
+    mFavouritesMainWindow->setWindowFlags(mFavouritesMainWindow->windowFlags() | Qt::Window);
+
+#endif
+
+    connect(ui->browseButton,SIGNAL(clicked()),this,SLOT(onBrowse()));
+    connect(ui->addButton,SIGNAL(clicked()),this,SLOT(onAddToPlaylist()));
+    connect(ui->playButton,SIGNAL(clicked()),this,SLOT(onPlay()));
+    connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
+
+    connect(ui->actionGoUserHome, SIGNAL(triggered()), this, SLOT(showUserHomeFolder()));
+    connect(ui->actionGoHome, SIGNAL(triggered()), this, SLOT(showHomeFolder()));
+    connect(ui->actionSetHome, SIGNAL(triggered()), this, SLOT(setHomeFolder()));
+    connect(ui->actionViewFavourites, SIGNAL(triggered()), this, SLOT(showFavourites()));
+    connect(ui->actionSetFavourite, SIGNAL(triggered()), this, SLOT(setFavourite()));
+
+    connect(this->mFavouritesMainWindow, SIGNAL(browseDirectory(QString)), this, SLOT(browseDirectory(QString)));
+
+    init();
+
+
+}
+void BrowseMainWindow::init()  // THIS METHOD IS CALLED WHEN CONFIG CHANGED...
+{
+    mIp = AppSettings::getCurrentIp(); // AccountDialog::currentIp();
+    setHomeDirectory();
+}
+void BrowseMainWindow::setHomeDirectory()
+{
+    mCurrentDir = AppSettings::getHomeDirectory().path;
+}
+void BrowseMainWindow::showCurrentDirectory()  // THIS METHOD IS CALLED WHEN WINDOW IS OPENED...
+{
+    browseDirectory(mCurrentDir);
+}
+
+BrowseMainWindow::~BrowseMainWindow()
+{
+    delete ui;
+}
+
+void BrowseMainWindow::changeEvent(QEvent *e)
+{
+    QMainWindow::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+
+void BrowseMainWindow::showHomeFolder() {
+    browseDirectory(AppSettings::getHomeDirectory().path);
+}
+void BrowseMainWindow::showUserHomeFolder() {
+    browseDirectory("~/");
+}
+void BrowseMainWindow::setHomeFolder() {
+    if (0 < mCurrentElement.name.length() && (0 == QString::compare("directory", mCurrentElement.type) || 0 == QString::compare("dir", mCurrentElement.type))) {
+        VlcDirectory dir;
+        dir.name = mCurrentElement.name;
+        dir.path = mCurrentElement.path;
+        AppSettings::setHomeDirectory(dir);
+    }
+    else if (0 < mCurrentDir.length()) {
+        VlcDirectory dir;
+        QString name = mCurrentDir;
+        int idx = mCurrentDir.lastIndexOf('/');
+        if (0 > idx) idx = mCurrentDir.lastIndexOf('\\');
+        if (0 < idx) {
+            name = mCurrentDir.right(mCurrentDir.length() - (idx + 1));
+        }
+        dir.name = name;
+        dir.path = mCurrentDir;
+        AppSettings::setHomeDirectory(dir);
+    }
+}
+void BrowseMainWindow::showFavourites() {
+    mFavouritesMainWindow->show();
+    mFavouritesMainWindow->init();
+}
+void BrowseMainWindow::setFavourite() {
+    if (0 < mCurrentElement.name.length() && (0 == QString::compare("directory", mCurrentElement.type) || 0 == QString::compare("dir", mCurrentElement.type))) {
+        VlcDirectory dir;
+        dir.name = mCurrentElement.name;
+        dir.path = mCurrentElement.path;
+        AppSettings::addFavourite(dir);
+    }
+    else if (0 < mCurrentDir.length()) {
+        VlcDirectory dir;
+        QString name = mCurrentDir;
+        int idx = mCurrentDir.lastIndexOf('/');
+        if (0 > idx) idx = mCurrentDir.lastIndexOf('\\');
+        if (0 < idx) {
+            name = mCurrentDir.right(mCurrentDir.length() - (idx + 1));
+        }
+        dir.name = name;
+        dir.path = mCurrentDir;
+        AppSettings::addFavourite(dir);
+    }
+}
+
+void BrowseMainWindow::onListSelectionChanged() {
+    QList<QListWidgetItem *> items = ui->listWidget->selectedItems();
+    if (0 < items.count()) {
+        mCurrentElement = getElementFromText(items.at(0)->text());
+        // are we up dir?
+        if (0 == QString::compare("..", mCurrentElement.name)) {
+            ui->browseButton->setDisabled(true);
+            ui->playButton->setDisabled(true);
+            ui->addButton->setDisabled(true);
+            mCurrentDir = mCurrentElement.path;
+            browseDirectory(mCurrentDir);
+        }
+        else {
+            // can we browse?
+            if (0 == QString::compare("directory", mCurrentElement.type) || 0 == QString::compare("dir", mCurrentElement.type)) {
+                ui->browseButton->setDisabled(false);
+            }
+            else {
+                ui->browseButton->setDisabled(true);
+            }
+            // can we play?
+            ui->playButton->setDisabled(false);
+            // can we playlist?
+            ui->addButton->setDisabled(false);
+        }
+    }
+}
+
+VlcBrowseElement BrowseMainWindow::getElementFromText(QString text) {
+    for (int idx = 0; idx < mContents->count(); ++idx) {
+        if (0 == QString::compare(text, mContents->at(idx).name)) {
+            return mContents->at(idx);
+        }
+    }
+    return *(new VlcBrowseElement());
+}
+
+void BrowseMainWindow::onBrowse() {
+    // check for directory
+    if (0 == QString::compare("directory", mCurrentElement.type) || 0 == QString::compare("dir", mCurrentElement.type)) {
+        // call browseDirectory
+        mCurrentDir = mCurrentElement.path;
+        browseDirectory(mCurrentDir);
+    }
+    else {
+        ui->browseButton->setDisabled(true);
+    }
+}
+
+void BrowseMainWindow::onAddToPlaylist() {
+    QUrl url = QUrl("http://"+mIp+"/requests/status.xml?command=in_enqueue");
+    url.addEncodedQueryItem(QByteArray("input"), QUrl::toPercentEncoding(mCurrentElement.path.replace("\\", "\\\\").replace("'", "\\'")));
+    mNetManager->get(QNetworkRequest(url));
+    //mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=in_enqueue&input=" + mCurrentElement.path.replace("\\", "\\\\"))));
+}
+
+void BrowseMainWindow::onPlay() {
+    QUrl url = QUrl("http://"+mIp+"/requests/status.xml?command=in_play");
+    url.addEncodedQueryItem(QByteArray("input"), QUrl::toPercentEncoding(mCurrentElement.path.replace("\\", "\\\\").replace("'", "\\'")));
+    mNetManager->get(QNetworkRequest(url));
+    //mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=in_play&input=" + mCurrentElement.path.replace("\\", "\\\\"))));
+}
+
+void BrowseMainWindow::browseDirectory(QString dir) {
+    if (mFavouritesMainWindow) {
+        setParent(this->parentWidget());
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+        setAttribute(Qt::WA_Maemo5StackedWindow, true);
+#endif
+        mFavouritesMainWindow->hide();
+    }
+    mResponse.clear();
+    QUrl url = QUrl("http://"+mIp+"/requests/browse.xml");
+    url.addEncodedQueryItem(QByteArray("dir"), QUrl::toPercentEncoding(dir));
+    QNetworkReply * reply = mNetManager->get(QNetworkRequest(url));
+    //QNetworkReply * reply =  mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/browse.xml?dir=" + dir.replace("&", "%26").replace("\\", "\\\\"))));
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
+#endif
+    connect(reply,SIGNAL(readyRead()),this,SLOT(readReady()));
+    connect(reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(error(QNetworkReply::NetworkError)));
+    connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
+}
+void BrowseMainWindow::error(QNetworkReply::NetworkError code) {
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
+#endif
+    qDebug() << code;
+}
+void BrowseMainWindow::readReady() {
+    QNetworkReply * reply = qobject_cast<QNetworkReply*>(sender());
+    // append to buffer
+    mResponse += reply->readAll();
+}
+void BrowseMainWindow::finished(QNetworkReply * reply) {
+    // now we can call parseXmlDirectory to process the full buffers
+    this->parseXmlDirectory();
+    // only interested in finished signals
+    disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
+#endif
+    delete reply;
+}
+void BrowseMainWindow::parseXmlDirectory() {
+    QDomDocument doc;
+    doc.setContent(this->mResponse);
+    QDomElement docElem = doc.documentElement();
+    QDomNodeList elements = docElem.elementsByTagName("element");
+    // we can sort by folders then files alphabetically by running to lists and appending them at the end
+    // vlc alpha sorts everything in the incoming stream, we just need to seperate files from folders.
+    if (0 < elements.count()) {
+        QList<VlcBrowseElement>* files = new QList<VlcBrowseElement>();
+        int idx = 0;
+        mContents->clear();
+        do {
+            QDomNode node = elements.at(idx);
+            VlcBrowseElement* dir = new VlcBrowseElement();
+            dir->type = node.attributes().namedItem("type").nodeValue();
+            dir->size = node.attributes().namedItem("size").nodeValue().toInt();
+            dir->date = QDate::fromString(node.attributes().namedItem("date").nodeValue());
+            dir->path = node.attributes().namedItem("path").nodeValue();
+            dir->name = node.attributes().namedItem("name").nodeValue();
+            dir->extension = getExtension(dir->path, node.attributes().namedItem("extension").nodeValue());
+            ++idx;
+            if (0 != QString::compare("directory", dir->type) && 0 != QString::compare("dir", dir->type)) {
+                files->append(*dir);
+            }
+            else if (0 == QString::compare("..", dir->name)) {
+                this->mContents->prepend(*dir);
+            }
+            else {
+                this->mContents->append(*dir);
+            }
+            delete dir;
+        } while (idx < elements.count());
+        if (0 < files->count()) {
+            mContents->append(*files);
+        }
+        delete files;
+        // Update UI
+        this->updateList();
+    }
+    else {
+        // alert user of error / empty directory
+        qDebug() << "can't browse dir: " << mCurrentDir;
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+        QMaemo5InformationBox::information(this, tr("Directory could not be browsed!"), QMaemo5InformationBox::DefaultTimeout);
+#endif
+    }
+    mResponse.clear();
+
+}
+
+QString BrowseMainWindow::getExtension(QString path, QString extension) {
+    // return extension if exists
+    if (!extension.isNull() && !extension.isEmpty()) return extension;
+    // return blank if no path
+    if (path.isNull() || path.isEmpty()) return "";
+    // otherwise extract the extension
+    int dot_pos = path.lastIndexOf('.');
+    if (0 < dot_pos) {
+        return path.right(path.length() - (dot_pos + 1));
+    }
+    else { // no dot
+        return "";
+    }
+}
+
+void BrowseMainWindow::updateList() {
+    ui->listWidget->clear();
+    int ct = this->mContents->count();
+    if (0 < ct) {
+        QIcon icon_up     = QIcon::fromTheme("filemanager_folder_up");
+        QIcon icon_folder = QIcon::fromTheme("general_folder");
+        QIcon icon_audio  = QIcon::fromTheme("general_audio_file");
+        QIcon icon_video  = QIcon::fromTheme("general_video_file");
+        QIcon icon_image  = QIcon::fromTheme("general_image");
+        QIcon icon_flash  = QIcon::fromTheme("filemanager_flash_file");
+        QIcon icon_real   = QIcon::fromTheme("filemanager_real_music");
+        QIcon icon_playl  = QIcon::fromTheme("filemanager_playlist");
+        QIcon icon_unknown= QIcon::fromTheme("filemanager_unknown_file");
+        for (int idx = 0; idx < ct; ++idx) {
+            VlcBrowseElement dir = mContents->at(idx);
+            QListWidgetItem* item;
+            bool item_good = false;
+            if (0 == QString::compare("directory", dir.type) || 0 == QString::compare("dir", dir.type)) {
+                if (0 == QString::compare("..", dir.name)) {
+                    item = new QListWidgetItem(icon_up, dir.name, ui->listWidget, 0);
+                    item_good = true;
+                }
+                else {
+                    item = new QListWidgetItem(icon_folder, dir.name, ui->listWidget, 0);
+                    item_good = true;
+                }
+            }
+            else if (0 == QString::compare("file", dir.type)) {
+                if ( 0 == QString::compare(dir.extension, "jpg")  ||
+                     0 == QString::compare(dir.extension, "jpeg") ||
+                     0 == QString::compare(dir.extension, "gif")  ||
+                     0 == QString::compare(dir.extension, "png")  ||
+                     0 == QString::compare(dir.extension, "bmp")  ) {
+                    item_good = true;
+                    item = new QListWidgetItem(icon_image, dir.name, ui->listWidget, 0); // .jpg, .jpeg, .gif, .png, .bmp
+                }
+                else if ( 0 == QString::compare(dir.extension, "mp3")  ||
+                          0 == QString::compare(dir.extension, "m4a")  ||
+                          0 == QString::compare(dir.extension, "ogg")  ||
+                          0 == QString::compare(dir.extension, "oga")  ||
+                          0 == QString::compare(dir.extension, "wav")  ||
+                          0 == QString::compare(dir.extension, "flac")  ) {
+                    item_good = true;
+                    item = new QListWidgetItem(icon_audio, dir.name, ui->listWidget, 0); // .mp3, .m4a, .ogg, .oga, .wav, .flac
+                }
+                else if ( 0 == QString::compare(dir.extension, "m3u")  ||
+                          0 == QString::compare(dir.extension, "wpl")  ||
+                          0 == QString::compare(dir.extension, "pls")  ||
+                          0 == QString::compare(dir.extension, "asx")  ||
+                          0 == QString::compare(dir.extension, "xspf") ||
+                          0 == QString::compare(dir.extension, "cmml")  ) {
+                    item_good = true;
+                    item = new QListWidgetItem(icon_playl, dir.name, ui->listWidget, 0); // .m3u, .wpl, .pls, .asx, .xspf, .cmml
+                }
+                else if ( 0 == QString::compare(dir.extension, "avi")  ||
+                          0 == QString::compare(dir.extension, "mpeg") ||
+                          0 == QString::compare(dir.extension, "mpg")  ||
+                          0 == QString::compare(dir.extension, "mov")  ||
+                          0 == QString::compare(dir.extension, "mp4")  ||
+                          0 == QString::compare(dir.extension, "m4v")  ||
+                          0 == QString::compare(dir.extension, "wmv")  ||
+                          0 == QString::compare(dir.extension, "mkv")  ||
+                          0 == QString::compare(dir.extension, "ogv")  ) {
+                    item_good = true;
+                    item = new QListWidgetItem(icon_video, dir.name, ui->listWidget, 0); // .avi, .mpg, .mpeg, .mov, .mp4, .m4v, .wmv, .mkv, .ogv
+                }
+                else if ( 0 == QString::compare(dir.extension, "rm")  ||
+                          0 == QString::compare(dir.extension, "ra")  ||
+                          0 == QString::compare(dir.extension, "ram")  ) {
+                    item = new QListWidgetItem(icon_real, dir.name, ui->listWidget, 0); // .ram, 'rm, 'ra
+                }
+                else if ( 0 == QString::compare(dir.extension, "flv")  ) {
+                    item_good = true;
+                    item = new QListWidgetItem(icon_flash, dir.name, ui->listWidget, 0); // .flv
+                }
+                else {
+                    if (dir.name.startsWith("Flash")) {
+                        item_good = true;
+                        item = new QListWidgetItem(icon_flash, dir.name, ui->listWidget, 0);
+                    }
+                    else {
+                        item_good = false;
+                        //item = new QListWidgetItem(icon_unknown, dir.name, ui->listWidget, 0);
+                    }
+                }
+            }
+            if (item_good) {
+                ui->listWidget->addItem(item);
+            }
+            // other types ignored
+        }
+    }
+}
+
+
diff --git a/src/browsemainwindow.h b/src/browsemainwindow.h
new file mode 100644 (file)
index 0000000..052421a
--- /dev/null
@@ -0,0 +1,76 @@
+/*   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 BROWSEMAINWINDOW_H
+#define BROWSEMAINWINDOW_H
+
+#include <QMainWindow>
+#include <QtNetwork>
+#include <QtXml>
+#include <QListWidgetItem>
+#include "vlcbrowseelement.h"
+#include "favouritesmainwindow.h"
+
+namespace Ui {
+    class BrowseMainWindow;
+}
+
+class BrowseMainWindow : public QMainWindow {
+    Q_OBJECT
+public:
+    explicit BrowseMainWindow(QWidget *parent = 0);
+    ~BrowseMainWindow();
+
+public slots:
+    void init();
+    void browseDirectory(QString);
+    void onBrowse();
+    void onPlay();
+    void onAddToPlaylist();
+    void onListSelectionChanged();
+    void finished(QNetworkReply * reply);
+    void readReady();
+    void error(QNetworkReply::NetworkError code);
+    void showCurrentDirectory();
+    void setHomeFolder();
+    void showHomeFolder();
+    void showUserHomeFolder();
+    void setFavourite();
+    void showFavourites();
+    void setHomeDirectory();
+
+protected slots:
+    void parseXmlDirectory();
+    void updateList();
+
+protected:
+    void changeEvent(QEvent *e);
+    VlcBrowseElement getElementFromText(QString text);
+    QString getExtension(QString path, QString extension);
+
+private:
+    Ui::BrowseMainWindow *ui;
+    FavouritesMainWindow *mFavouritesMainWindow;
+    QNetworkAccessManager * mNetManager;
+    QString mCurrentDir;
+    QString mIp;
+    QList<VlcBrowseElement>* mContents;
+    VlcBrowseElement mCurrentElement;
+    QByteArray mResponse;
+};
+
+#endif // BROWSEMAINWINDOW_H
diff --git a/src/browsemainwindow.ui b/src/browsemainwindow.ui
new file mode 100644 (file)
index 0000000..6ae1aee
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>BrowseMainWindow</class>
+ <widget class="QMainWindow" name="BrowseMainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QListWidget" name="listWidget">
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QPushButton" name="playButton">
+        <property name="text">
+         <string>Play</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="addButton">
+        <property name="text">
+         <string>Enqueue</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="browseButton">
+        <property name="text">
+         <string>Browse</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>800</width>
+     <height>27</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuMenu">
+    <property name="title">
+     <string>menu</string>
+    </property>
+   </widget>
+   <addaction name="actionGoUserHome"/>
+   <addaction name="actionGoHome"/>
+   <addaction name="actionSetHome"/>
+   <addaction name="actionViewFavourites"/>
+   <addaction name="actionSetFavourite"/>
+  </widget>
+  <action name="actionGoUserHome">
+   <property name="text">
+    <string>User Folder</string>
+   </property>
+  </action>
+  <action name="actionGoHome">
+   <property name="text">
+    <string>Home</string>
+   </property>
+  </action>
+  <action name="actionSetHome">
+   <property name="text">
+    <string>Set as Home</string>
+   </property>
+  </action>
+  <action name="actionViewFavourites">
+   <property name="text">
+    <string>Favourites</string>
+   </property>
+  </action>
+  <action name="actionSetFavourite">
+   <property name="text">
+    <string>Add to Favourite</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/config-vlc.jpg b/src/config-vlc.jpg
new file mode 100644 (file)
index 0000000..b4610f0
Binary files /dev/null and b/src/config-vlc.jpg differ
diff --git a/src/configdialog.cpp b/src/configdialog.cpp
new file mode 100644 (file)
index 0000000..9888666
--- /dev/null
@@ -0,0 +1,61 @@
+/*   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 "configdialog.h"
+#include "ui_configdialog.h"
+#include <QSettings>
+
+ConfigDialog::ConfigDialog(QWidget *parent) :
+        QDialog(parent),
+        ui(new Ui::ConfigDialog)
+{
+    ui->setupUi(this);
+    load();
+    connect(ui->buttonBox,SIGNAL(accepted()),this,SLOT(save()));
+}
+
+ConfigDialog::~ConfigDialog()
+{
+    delete ui;
+}
+
+void ConfigDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+void ConfigDialog::load()
+{
+    QSettings settings;
+    ui->lineEdit->setText(settings.value("ip").toString());
+
+}
+
+void ConfigDialog::save()
+{
+
+    QSettings settings;
+    settings.setValue("ip",ui->lineEdit->text());
+
+    emit accept();
+}
diff --git a/src/configdialog.h b/src/configdialog.h
new file mode 100644 (file)
index 0000000..e6c4f67
--- /dev/null
@@ -0,0 +1,42 @@
+/*   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 CONFIGDIALOG_H
+#define CONFIGDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class ConfigDialog;
+}
+
+class ConfigDialog : public QDialog {
+    Q_OBJECT
+public:
+    explicit ConfigDialog(QWidget *parent = 0);
+    ~ConfigDialog();
+public slots:
+void load();
+void save();
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::ConfigDialog *ui;
+};
+
+#endif // CONFIGDIALOG_H
diff --git a/src/configdialog.ui b/src/configdialog.ui
new file mode 100644 (file)
index 0000000..c3dd6f0
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ConfigDialog</class>
+ <widget class="QDialog" name="ConfigDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>442</width>
+    <height>304</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Enter IP of VLC server.  &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Example : &lt;span style=&quot; font-weight:600;&quot;&gt;192.168.0.8:8080&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Be sure  you have properly configured Vlc&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; and allows connection by adding this IP in /vlc/http/.hosts&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;More information on my blog : &lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;omed.blogspot.com&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLineEdit" name="lineEdit"/>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>ConfigDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>295</x>
+     <y>284</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
diff --git a/src/data/26x26/vlc-remote.png b/src/data/26x26/vlc-remote.png
new file mode 100644 (file)
index 0000000..eb65d6f
Binary files /dev/null and b/src/data/26x26/vlc-remote.png differ
diff --git a/src/data/48x48/vlc-remote.png b/src/data/48x48/vlc-remote.png
new file mode 100644 (file)
index 0000000..0df71f9
Binary files /dev/null and b/src/data/48x48/vlc-remote.png differ
diff --git a/src/data/64x64/vlc-remote.png b/src/data/64x64/vlc-remote.png
new file mode 100644 (file)
index 0000000..1814fca
Binary files /dev/null and b/src/data/64x64/vlc-remote.png differ
diff --git a/src/favouritesmainwindow.cpp b/src/favouritesmainwindow.cpp
new file mode 100644 (file)
index 0000000..a578deb
--- /dev/null
@@ -0,0 +1,170 @@
+/*   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 "favouritesmainwindow.h"
+#include "ui_favouritesmainwindow.h"
+#include <QSettings>
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+#include <QMaemo5InformationBox>
+#endif
+#include "appsettings.h"
+//#include "browsemainwindow.h"
+
+FavouritesMainWindow::FavouritesMainWindow(QWidget *parent) :
+        QMainWindow(parent),
+        ui(new Ui::FavouritesMainWindow)
+{
+
+    ui->setupUi(this);
+
+    setWindowTitle("Vlc remote");
+    mCurrentItemIndex = -1;
+
+    ui->listWidget->setTextElideMode(Qt::ElideMiddle);
+    ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+    ui->deleteButton->setIcon(QIcon::fromTheme("general_delete"));
+    ui->editButton->setIcon(QIcon::fromTheme("general_sketch"));
+    ui->browseButton->setIcon(QIcon::fromTheme("filemanager_media_folder"));
+    ui->saveButton->setIcon(QIcon::fromTheme("notes_save"));
+    ui->browseButton->setDisabled(true);
+    ui->editButton->setDisabled(true);
+    ui->deleteButton->setDisabled(true);
+    ui->actionSetHome->setDisabled(true);
+    ui->label->setVisible(false);
+    ui->lineEdit->setVisible(false);
+    ui->saveButton->setVisible(false);
+    ui->saveButton->setDisabled(true);
+
+    connect(ui->browseButton,SIGNAL(clicked()),this,SLOT(onBrowse()));
+    connect(ui->deleteButton,SIGNAL(clicked()),this,SLOT(onDelete()));
+    connect(ui->editButton,SIGNAL(clicked()),this,SLOT(onEdit()));
+    connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
+    connect(ui->actionSetHome, SIGNAL(triggered()), this, SLOT(setHomeFolder()));
+    connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(onEditSave()));
+    connect(ui->lineEdit, SIGNAL(textChanged(QString)), this, SLOT(onLineEditTextChanged(QString)));
+
+    init();
+
+
+}
+void FavouritesMainWindow::init()  // THIS METHOD IS CALLED WHEN CONFIG CHANGED AND WINDOW SHOWN...
+{
+    mFavourites = AppSettings::getFavourites();
+    updateList();
+}
+
+FavouritesMainWindow::~FavouritesMainWindow()
+{
+    delete mFavourites;
+    delete ui;
+}
+
+void FavouritesMainWindow::changeEvent(QEvent *e)
+{
+    QMainWindow::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+void FavouritesMainWindow::updateList() {
+    ui->listWidget->clear();
+    if (NULL != mFavourites && 0 < mFavourites->count()) {
+        for (int idx = 0; idx < mFavourites->count(); ++idx) {
+            QListWidgetItem* item = new QListWidgetItem(QIcon::fromTheme("imageviewer_favourite"), mFavourites->at(idx).name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + idx);
+            ui->listWidget->addItem(item);
+        }
+    }
+}
+void FavouritesMainWindow::setHomeFolder() {
+    if (-1 < mCurrentItemIndex) {
+        AppSettings::setHomeDirectory(mCurrentFavourite);
+    }
+}
+void FavouritesMainWindow::onListSelectionChanged() {
+    ui->label->setVisible(false);
+    ui->lineEdit->setVisible(false);
+    ui->saveButton->setVisible(false);
+    ui->saveButton->setDisabled(true);
+    QList<QListWidgetItem *> items = ui->listWidget->selectedItems();
+    if (0 < items.count()) {
+        mCurrentItemIndex = ui->listWidget->currentIndex().row();
+        mCurrentFavourite = mFavourites->at(items.at(0)->type() - LIST_ITEM_TYPE_OFFSET); // Qt reserves types up to 1000, we use an offset beyond that for index tracking. May prove to be too hacky!
+        ui->browseButton->setDisabled(false);
+        ui->editButton->setDisabled(false);
+        ui->deleteButton->setDisabled(false);
+        ui->actionSetHome->setDisabled(false);
+    }
+    else {
+        mCurrentItemIndex = -1;
+        ui->browseButton->setDisabled(true);
+        ui->editButton->setDisabled(true);
+        ui->deleteButton->setDisabled(true);
+        ui->actionSetHome->setDisabled(true);
+    }
+}
+void FavouritesMainWindow::onLineEditTextChanged(QString text) {
+    if (0 < text.length()) {
+        ui->saveButton->setDisabled(false);
+    }
+    else {
+        ui->saveButton->setDisabled(true);
+    }
+}
+void FavouritesMainWindow::onEditSave() {
+    if (-1 < mCurrentItemIndex && 0 < ui->lineEdit->text().length()) {
+        ui->label->setVisible(false);
+        ui->lineEdit->setVisible(false);
+        ui->saveButton->setVisible(false);
+        ui->saveButton->setDisabled(true);
+        AppSettings::deleteFavourite(mCurrentFavourite);
+        mCurrentFavourite.name = ui->lineEdit->text();
+        AppSettings::addFavourite(mCurrentFavourite);
+        ui->lineEdit->setText("");
+        ui->listWidget->itemAt(mCurrentItemIndex, 0)->setText(mCurrentFavourite.name);
+        init();
+    }
+}
+void FavouritesMainWindow::onEdit() {
+    if (-1 < mCurrentItemIndex) {
+        ui->label->setVisible(true);
+        ui->lineEdit->setVisible(true);
+        ui->saveButton->setVisible(true);
+        ui->saveButton->setDisabled(false);
+        ui->lineEdit->setText(mCurrentFavourite.name);
+        ui->browseButton->setDisabled(true);
+        ui->editButton->setDisabled(true);
+        ui->deleteButton->setDisabled(true);
+    }
+}
+void FavouritesMainWindow::onBrowse() {
+    if (-1 < mCurrentItemIndex) {
+        emit browseDirectory(mCurrentFavourite.path);
+        //this->close();
+        //((BrowseMainWindow *)this->parent())->browseDirectory(mCurrentFavourite.path);
+    }
+}
+void FavouritesMainWindow::onDelete() {
+    if (-1 < mCurrentItemIndex) {
+        AppSettings::deleteFavourite(mCurrentFavourite);
+        init();
+    }
+}
diff --git a/src/favouritesmainwindow.h b/src/favouritesmainwindow.h
new file mode 100644 (file)
index 0000000..76964b0
--- /dev/null
@@ -0,0 +1,67 @@
+/*   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 FAVOURITESMAINWINDOW_H
+#define FAVOURITESMAINWINDOW_H
+
+#include <QMainWindow>
+#include <QtNetwork>
+#include <QtXml>
+#include <QListWidgetItem>
+#include "appsettings.h"
+
+#ifndef LIST_ITEM_TYPE_OFFSET
+#define LIST_ITEM_TYPE_OFFSET 1000
+#endif
+
+namespace Ui {
+    class FavouritesMainWindow;
+}
+
+class FavouritesMainWindow : public QMainWindow {
+    Q_OBJECT
+public:
+    explicit FavouritesMainWindow(QWidget *parent = 0);
+    ~FavouritesMainWindow();
+
+public slots:
+    void init();
+    void onListSelectionChanged();
+    void onLineEditTextChanged(QString text);
+    void onBrowse();
+    void onEdit();
+    void onDelete();
+    void setHomeFolder();
+    void onEditSave();
+
+protected slots:
+
+signals:
+    void browseDirectory(QString path);
+
+protected:
+    void changeEvent(QEvent *e);
+    void updateList();
+
+private:
+    Ui::FavouritesMainWindow *ui;
+    int mCurrentItemIndex;
+    QList<VlcDirectory>* mFavourites;
+    VlcDirectory mCurrentFavourite;
+};
+
+#endif // FAVOURITESMAINWINDOW_H
diff --git a/src/favouritesmainwindow.ui b/src/favouritesmainwindow.ui
new file mode 100644 (file)
index 0000000..b379237
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FavouritesMainWindow</class>
+ <widget class="QMainWindow" name="FavouritesMainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>798</width>
+    <height>598</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QListWidget" name="listWidget"/>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Name</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit"/>
+      </item>
+      <item>
+       <widget class="QPushButton" name="saveButton">
+        <property name="text">
+         <string>Save</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QPushButton" name="deleteButton">
+        <property name="text">
+         <string>Delete</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="editButton">
+        <property name="text">
+         <string>Edit</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="browseButton">
+        <property name="text">
+         <string>Browse</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>798</width>
+     <height>20</height>
+    </rect>
+   </property>
+   <addaction name="actionSetHome"/>
+  </widget>
+  <action name="actionSetHome">
+   <property name="text">
+    <string>Set as Home</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644 (file)
index 0000000..8e21758
--- /dev/null
@@ -0,0 +1,70 @@
+/*   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 <QtGui/QApplication>
+#include <QSettings>
+#include <QLocale>
+#include <QTextCodec>
+#include <QTranslator>
+#include <QDebug>
+#include "playermainwindow.h"
+#include "appsettings.h"
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+
+    QCoreApplication::setOrganizationName("Omed");
+    QCoreApplication::setOrganizationDomain("medsoft.blogspot.com/");
+    QCoreApplication::setApplicationName("Maemo VLC remote");
+
+    QString locale = QLocale::system().name();
+    QTranslator translator;
+    translator.load(QString(":/languages/vlcremote_") + locale);
+    a.installTranslator(&translator);
+
+    QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
+
+
+    qDebug() << AppSettings::getCurrentIp();
+
+
+  PlayerMainWindow * mainwindow = new PlayerMainWindow;
+
+  //mainwindow->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
+  //mainwindow->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+  //mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+
+  mainwindow->showMaximized();
+ #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+  Orientation o = AppSettings::getOrientation();
+  switch (o) {
+      case AUTO_ROTATE:
+      mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+          break;
+      case LANDSCAPE:
+          mainwindow->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
+          break;
+      case PORTRAIT:
+          mainwindow->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+          break;
+      default:
+          mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+          break;
+  }
+#endif
+    return a.exec();
+}
diff --git a/src/newaccountdialog.cpp b/src/newaccountdialog.cpp
new file mode 100644 (file)
index 0000000..3a3acd3
--- /dev/null
@@ -0,0 +1,98 @@
+/*   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 "newaccountdialog.h"
+#include <QFormLayout>
+#include <QDebug>
+#include <QSettings>
+//#include <QMaemo5InformationBox>
+
+NewAccountDialog::NewAccountDialog(QWidget *parent)
+{
+    Q_UNUSED(parent);
+    this->setWindowTitle(tr("Add account"));
+
+    mKeyLineEdit = new QLineEdit;
+    mIpLineEdit = new QLineEdit;
+    mPortLineEdit = new QLineEdit;
+    mPortLineEdit->setText("8080");
+    mPortLineEdit->setReadOnly(false);
+
+    mButtonBox = new QDialogButtonBox;
+    mButtonBox->addButton(QDialogButtonBox::Save);
+    mButtonBox->addButton(QDialogButtonBox::Cancel);
+
+    connect(mButtonBox, SIGNAL(accepted()), this, SLOT(save()));
+    connect(mButtonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+    QFormLayout *layout = new QFormLayout;
+    layout->expandingDirections();
+    layout->addRow(tr("Name:"), mKeyLineEdit);
+    layout->addRow(tr("Ip:"), mIpLineEdit);
+    layout->addRow(tr("Port:"), mPortLineEdit);
+    layout->addWidget(mButtonBox);
+
+    setLayout(layout);
+}
+
+void NewAccountDialog::save()
+{
+    QString myKey = mKeyLineEdit->text();
+    QString myIp = mIpLineEdit->text();
+    QString myPort = mPortLineEdit->text();
+
+    QSettings settings;
+    settings.beginGroup("account");
+    if (!mEditKey.isEmpty()) {
+        settings.remove(mEditKey);
+    }
+
+    if (!myIp.isEmpty() && !myKey.isEmpty()) {
+        if (myPort.isEmpty()) {
+            myPort = "8080";
+        }
+        settings.setValue(myKey, myIp+":"+myPort);
+        // Rajouter des tests pour vérifier qu'on est sur Maemo
+        //QMaemo5InformationBox::information(this, tr("Account saved"), QMaemo5InformationBox::DefaultTimeout);
+    }
+    settings.endGroup();
+
+    emit accept();
+}
+
+void NewAccountDialog::edit(QString &key, QString &ip)
+{
+    Q_UNUSED(ip);
+    this->setWindowTitle(tr("Edit account"));
+
+    QSettings settings;
+    settings.beginGroup("account");
+    QString value = settings.value(key).toString();
+    settings.endGroup();
+
+    QStringList values = value.split(":");
+
+    mEditKey = key;
+    mEditIp = values.first();
+    mEditPort = values.last();
+
+    mKeyLineEdit->setText(mEditKey);
+    mKeyLineEdit->setDisabled(true);
+    mIpLineEdit->setText(mEditIp);
+    mPortLineEdit->setText(mEditPort);
+}
+
diff --git a/src/newaccountdialog.h b/src/newaccountdialog.h
new file mode 100644 (file)
index 0000000..70794ab
--- /dev/null
@@ -0,0 +1,50 @@
+/*   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 NEWACCOUNTDIALOG_H
+#define NEWACCOUNTDIALOG_H
+
+#include <QDialog>
+#include <QLineEdit>
+#include <QLabel>
+#include <QDialogButtonBox>
+
+class NewAccountDialog : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit NewAccountDialog(QWidget *parent = 0);
+    void edit(QString &key, QString &ip);
+
+public slots:
+    void save();
+
+private:
+    QLineEdit *mKeyLineEdit;
+    QLineEdit *mIpLineEdit;
+    QLineEdit *mPortLineEdit;
+    QPushButton *mSavePushButton;
+    QPushButton *mCancelPushButton;
+    QDialogButtonBox *mButtonBox;
+
+    QString mEditKey;
+    QString mEditIp;
+    QString mEditPort;
+};
+
+#endif // NEWACCOUNTDIALOG_H
diff --git a/src/playermainwindow.cpp b/src/playermainwindow.cpp
new file mode 100644 (file)
index 0000000..33d001c
--- /dev/null
@@ -0,0 +1,511 @@
+  /*   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 <QDebug>
+  #include <QTime>
+  #include <QtGui>
+  #include "playermainwindow.h"
+  #include "ui_playermainwindow.h"
+  #include "configdialog.h"
+  #include "aboutdialog.h"
+  #include "accountdialog.h"
+  #include "appsettings.h"
+  //#include "vlcstatus.h"
+
+  PlayerMainWindow::PlayerMainWindow(QWidget *parent) :
+         QMainWindow(parent),
+         ui(new Ui::PlayerMainWindow)
+  {
+      ui->setupUi(this);
+      setWindowTitle("Vlc remote");
+
+
+
+      mTimer = new QTimer(this);
+      mNetManager = new QNetworkAccessManager(this);
+      mPlayListMainWindow = new PlayListMainWindow;
+      mBrowserMainWindow = new BrowseMainWindow;
+
+      mVolume = 100;
+      mMuted = false;
+
+      mIsLandscape = true;
+
+      ui->playlistButton->setIcon(QIcon::fromTheme("notes_bullets"));
+      ui->browseButton->setIcon(QIcon::fromTheme("filemanager_media_folder"));
+
+      ui->previousButton->setIcon(QIcon::fromTheme("pdf_viewer_first_page"));
+      ui->nextButton->setIcon(QIcon::fromTheme("pdf_viewer_last_page"));
+      ui->playpauseButton->setIcon(QIcon::fromTheme("camera_playback"));
+      ui->stopButton->setIcon(QIcon::fromTheme("camera_video_stop"));
+      //ui->pauseButton->setIcon(QIcon::fromTheme("camera_video_pause"));
+      ui->fullscreenButton->setIcon(QIcon::fromTheme("general_fullsize"));
+      ui->volDown->setIcon(QIcon::fromTheme("statusarea_volumelevel1"));
+      ui->volUp->setIcon(QIcon::fromTheme("statusarea_volumelevel4"));
+      ui->volMute->setIcon(QIcon::fromTheme("statusarea_volume_mute"));
+
+      ui->labelArtPortrait->setVisible(false);
+      ui->labelArtLandscape->setVisible(false);
+
+      ui->labelTitle->setTextFormat(Qt::RichText);
+      ui->labelArtist->setTextFormat(Qt::RichText);
+      ui->labelAlbum->setTextFormat(Qt::RichText);
+
+
+  #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+
+      mPlayListMainWindow->setParent(this);
+      mPlayListMainWindow->setAttribute(Qt::WA_Maemo5StackedWindow, true);
+      setAttribute(Qt::WA_Maemo5StackedWindow, true);
+      mPlayListMainWindow->setWindowFlags(mPlayListMainWindow->windowFlags() | Qt::Window);
+
+      mBrowserMainWindow->setParent(this);
+      mBrowserMainWindow->setAttribute(Qt::WA_Maemo5StackedWindow, true);
+      setAttribute(Qt::WA_Maemo5StackedWindow, true);
+      mBrowserMainWindow->setWindowFlags(mBrowserMainWindow->windowFlags() | Qt::Window);
+
+      connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
+
+  #endif
+
+      connect(mTimer,SIGNAL(timeout()),this,SLOT(askStatus()));
+      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->playlistButton,SIGNAL(clicked()),mPlayListMainWindow,SLOT(show()));
+      connect(ui->playlistButton,SIGNAL(clicked()),mPlayListMainWindow,SLOT(showPlayList()));
+      connect(ui->browseButton,SIGNAL(clicked()),mBrowserMainWindow,SLOT(show()));
+      connect(ui->browseButton,SIGNAL(clicked()),mBrowserMainWindow,SLOT(showCurrentDirectory()));
+
+      connect(ui->playpauseButton,SIGNAL(clicked()),this,SLOT(playpause()));
+      connect(ui->stopButton,SIGNAL(clicked()),this,SLOT(stop()));
+      connect(ui->previousButton,SIGNAL(clicked()),this,SLOT(previous()));
+      connect(ui->nextButton,SIGNAL(clicked()),this,SLOT(next()));
+      connect(ui->fullscreenButton,SIGNAL(clicked()),this,SLOT(fullscreen()));
+      connect(ui->volUp,SIGNAL(clicked()),this,SLOT(volUp()));
+      connect(ui->volDown,SIGNAL(clicked()),this,SLOT(volDown()));
+      connect(ui->volMute,SIGNAL(clicked()),this,SLOT(volMute()));
+      connect(ui->slider,SIGNAL(sliderMoved(int)),this,SLOT(slide(int)));
+
+      connect(mPlayListMainWindow, SIGNAL(idUpdated(int,bool,QString)), this, SLOT(playlistIdUpdated(int, bool, QString)));
+
+
+      // check if last used connection is still valid or showConfig
+      QSettings settings;
+      QString last_ip = AccountDialog::currentIp();
+      if (!last_ip.isNull() && !last_ip.isEmpty()) {
+          QTcpSocket * socket = new QTcpSocket;
+          if(last_ip.contains(":"))
+          {
+              QStringList hostSplit = last_ip.split(":");
+              QString ip   = hostSplit.at(0);
+              QString port = hostSplit.at(1);
+              socket->connectToHost(ip,port.toInt());
+          }
+          else {
+              socket->connectToHost(last_ip,8080);
+          }
+          if (!socket->waitForConnected(1000)) {
+                 showConfig();
+             }
+          else {
+              mIp= last_ip;
+
+             mPlayListMainWindow->init();
+             mBrowserMainWindow->init();
+             mTimer->start(5000);
+             askStatus();
+          }
+          delete socket;
+      }
+      else {
+        showConfig();
+      }
+
+
+  }
+  
+
+  PlayerMainWindow::~PlayerMainWindow()
+  {
+      delete ui;
+  }
+
+  void PlayerMainWindow::changeEvent(QEvent *e)
+  {
+      QMainWindow::changeEvent(e);
+      switch (e->type()) {
+      case QEvent::LanguageChange:
+         ui->retranslateUi(this);
+         break;
+      default:
+         break;
+      }
+  }
+
+  void PlayerMainWindow::setPortrait()
+  {
+    #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+      AppSettings::setOrientation(PORTRAIT);
+    this->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+    #endif
+  }
+
+  void PlayerMainWindow::setLandscape()
+  {
+    #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+      AppSettings::setOrientation(LANDSCAPE);
+    this->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
+    #endif
+  }
+
+  void PlayerMainWindow::setAutoRotate()
+  {
+    #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+      AppSettings::setOrientation(AUTO_ROTATE);
+    this->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+    #endif
+  }
+
+  void PlayerMainWindow::orientationChanged() {
+      QRect screenGeometry = QApplication::desktop()->screenGeometry();
+      mIsLandscape = (screenGeometry.width() > screenGeometry.height());
+      if (mHasImage) {
+          if (mIsLandscape) {
+              ui->labelArtPortrait->setVisible(false);
+              ui->labelArtLandscape->setVisible(true);
+          }
+          else {
+              ui->labelArtLandscape->setVisible(false);
+              ui->labelArtPortrait->setVisible(true);
+          }
+      }
+      else {
+          ui->labelArtLandscape->setVisible(false);
+          ui->labelArtPortrait->setVisible(false);
+      }
+  }
+
+  void PlayerMainWindow::playpause()
+  {
+      // NB. There is no guarentee that our current state is the real current state.
+      // This is due to the polling frequency and possibility of user interaction directly on the server.
+      // Still this is probably better than nothing and our next real poll will set us straight again.
+      if (PAUSED == mCurrentStatus.state) {
+        mCurrentStatus.state = PLAYING;
+        pause();
+        updateUiWithCurrentStatus();
+      }
+      else if (PLAYING == mCurrentStatus.state) {
+        mCurrentStatus.state = PAUSED;
+        pause();
+        updateUiWithCurrentStatus();
+      }
+      else {
+        // could be STOP or UNKNOWN, either way there is no guarentee we will enter a playing state next.
+        // So don't update the current state or UI
+        // Ideally we would try to find a way to check the current state again but this could lead to an infinite loop!
+        play();
+      }
+  }
+  void PlayerMainWindow::play()
+  {
+      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_play")));
+  }
+  void PlayerMainWindow::stop()
+  {
+      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_stop")));
+  }
+  void PlayerMainWindow::pause()
+  {
+      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_pause")));
+  }
+  void PlayerMainWindow::previous()
+  {
+      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_previous")));
+  }
+  void PlayerMainWindow::next()
+  {
+      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_next")));
+  }
+  void PlayerMainWindow::fullscreen()
+  {
+      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=fullscreen")));
+  }
+  void PlayerMainWindow::volUp()
+  {
+      QUrl url = QUrl("http://"+mIp+"/requests/status.xml?command=volume");
+      url.addEncodedQueryItem(QByteArray("val"), QByteArray("%2B10"));
+      mNetManager->get(QNetworkRequest(url));
+  }
+  void PlayerMainWindow::volDown()
+  {
+      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=volume&val=-10")));
+  }
+  void PlayerMainWindow::volMute()
+  {
+      this->mMuted = !this->mMuted;
+      if (this->mMuted) {
+         mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=volume&val=0")));
+      }
+      else {
+         mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=volume&val="+QString::number(this->mVolume))));
+      }
+  }
+  void PlayerMainWindow::slide(int value)
+  {
+      mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=seek&val="+QString::number(value)+"%25")));
+  }
+
+  void PlayerMainWindow::showConfig()
+  {
+      mTimer->stop();
+      AccountDialog * dialog = new AccountDialog;
+      dialog->exec();
+     
+       mIp= AccountDialog::currentIp();
+
+      mPlayListMainWindow->init();
+      mBrowserMainWindow->init();
+      mTimer->start(5000);
+      askStatus();
+  }
+  void PlayerMainWindow::showAbout()
+  {
+
+      AboutDialog * dialog = new AboutDialog;
+      dialog->exec();
+
+  }
+
+  void PlayerMainWindow::askStatus()
+  {
+      //qDebug() << "Status requested. at:" << QTime::currentTime().toString("hh::mm:ss");
+      QNetworkReply * reply =  mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml")));
+      connect(reply,SIGNAL(readyRead()),this,SLOT(parseXmlStatus()));
+  }
+
+  void PlayerMainWindow::parseXmlStatus()
+  {
+      QNetworkReply * reply = qobject_cast<QNetworkReply*>(sender());
+      QDomDocument doc;
+      doc.setContent(reply->readAll());
+      delete reply;
+      QDomElement docElem = doc.documentElement();
+      // Get the raw values
+      int volume = docElem.namedItem("volume").toElement().text().toInt();
+      int length = docElem.namedItem("length").toElement().text().toInt();
+      int time = docElem.namedItem("time").toElement().text().toInt();
+      int position = docElem.namedItem("position").toElement().text().toInt();
+      int random = docElem.namedItem("random").toElement().text().toInt();
+      int loop = docElem.namedItem("loop").toElement().text().toInt();
+      int repeat = docElem.namedItem("repeat").toElement().text().toInt();
+      QString state = docElem.namedItem("state").toElement().text();
+      QDomNode infoNode =  docElem.namedItem("information");
+      QDomNode metaInfoNode =  infoNode.namedItem("meta-information");
+      QString title = metaInfoNode.namedItem("title").toElement().text().replace("\\\\", "\\");
+      // if it's a file style title fix it up
+      if (40 < title.length()) {
+          if (0 < title.lastIndexOf("\\")) {
+              title = title.right(title.length() - (title.lastIndexOf("\\") + 1));
+          }
+          else if (0 < title.lastIndexOf("/")) {
+              title = title.right(title.length() - (title.lastIndexOf("/") + 1));
+          }
+      }
+      QString artist = metaInfoNode.namedItem("artist").toElement().text();
+      QString album = metaInfoNode.namedItem("album").toElement().text();
+      QString now_playing = metaInfoNode.namedItem("now_playing").toElement().text();
+      QString art_url = metaInfoNode.namedItem("art_url").toElement().text();
+      //metaInfoNode.clear();
+      //infoNode.clear();
+      //docElem.clear();
+      //doc.clear();
+      // Populate the current status structure
+      // now would be a good time to work out if we are a new track / file or not.
+      // key if we are going to look for album art later
+      // for now we check length and title this will require further examination later
+      mCurrentStatus.newtrack = true;
+      if (mCurrentStatus.length == length && !mCurrentStatus.title.isNull() && 0 == QString::compare(mCurrentStatus.title, title)) {
+        mCurrentStatus.newtrack = false;
+      }
+      mCurrentStatus.volume = volume;
+      mCurrentStatus.length = length;
+      mCurrentStatus.time = time;
+      mCurrentStatus.position = position;
+      mCurrentStatus.random = (1 == random);
+      mCurrentStatus.loop = (1 == loop);
+      mCurrentStatus.repeat = (1 == repeat);
+      mCurrentStatus.title = title;
+      mCurrentStatus.artist = artist;
+      mCurrentStatus.album = album;
+      mCurrentStatus.nowplaying = now_playing;
+      mCurrentStatus.hasart = (!art_url.isNull() && !art_url.isEmpty());
+      if (!state.isNull() && !state.isEmpty()) {
+          if (0 == QString::compare("playing", state, Qt::CaseInsensitive)) {
+            mCurrentStatus.state = PLAYING;
+          }
+          else if (0 == QString::compare("paused", state, Qt::CaseInsensitive)) {
+            mCurrentStatus.state = PAUSED;
+          }
+          else if (0 == QString::compare("stop", state, Qt::CaseInsensitive)) {
+            mCurrentStatus.state = STOP;
+          }
+          else {
+            mCurrentStatus.state = UNKNOWN;
+          }
+      }
+      else {
+          mCurrentStatus.state = UNKNOWN;
+      }
+      // What's our mute status?
+      if (0 < mCurrentStatus.volume) {
+          this->mVolume = mCurrentStatus.volume;
+         this->mMuted = false;
+      }
+      else {
+         this->mMuted = true;
+      }
+      // Update the UI
+      updateUiWithCurrentStatus();
+
+  }
+
+  void PlayerMainWindow::updateUiWithCurrentStatus() {
+      // position
+      QTime timePosition(0,0,0) ;
+      timePosition =  timePosition.addSecs(mCurrentStatus.time);
+
+      ui->timeLabel->setText(timePosition.toString("h:mm:ss"));
+
+      // duration
+      if (0 < mCurrentStatus.length) {
+          QTime timeDuration(0,0,0) ;
+          timeDuration =  timeDuration.addSecs(mCurrentStatus.length);
+
+          ui->durationLabel->setText(timeDuration.toString("h:mm:ss"));
+      }
+      else {
+          ui->durationLabel->setText("0:00:00");
+      }
+
+
+      if (mCurrentStatus.position >= 0 && mCurrentStatus.position <= 100) {
+          ui->slider->blockSignals(true);
+          ui->slider->setValue(mCurrentStatus.position);
+          ui->slider->blockSignals(false);
+      }
+
+      ui->labelTitle->setText(mCurrentStatus.title);
+      ui->labelArtist->setText(mCurrentStatus.artist);
+      ui->labelAlbum->setText(mCurrentStatus.album);
+
+      if (PLAYING == mCurrentStatus.state) {
+          ui->playpauseButton->setIcon(QIcon::fromTheme("camera_video_pause"));
+      }
+      else {
+          ui->playpauseButton->setIcon(QIcon::fromTheme("camera_playback"));
+      }
+
+      if (mCurrentStatus.newtrack) {
+          // potential actions:
+          //   rebuild display layout
+          //   retrieve album art
+          mHasImage = false;
+          QTimer::singleShot(500, mPlayListMainWindow, SLOT(requestPlayList()));
+      }
+      // Update the buttons on the playlist window
+      if (NULL != this->mPlayListMainWindow) {
+        this->mPlayListMainWindow->updateUiWithCurrentStatus(& mCurrentStatus);
+      }
+
+  }
+  void PlayerMainWindow::playlistIdUpdated(int id, bool hasart, QString extension) {
+      Q_UNUSED(extension);
+      if (hasart) {
+          getCoverArt(id);
+      }
+      else {
+          ui->labelArtLandscape->setVisible(false);
+          ui->labelArtPortrait->setVisible(false);
+          // could use a default graphic from extension here!
+          // setCoverArtFromPixmap();
+      }
+  }
+  void PlayerMainWindow::error(QNetworkReply::NetworkError code) {
+      qDebug() << "Error Code: " << code;
+  }
+  void PlayerMainWindow::readReady() {
+    QNetworkReply * reply = qobject_cast<QNetworkReply*>(sender());
+    // append to buffer
+    mResponse += reply->readAll();
+  }
+  void PlayerMainWindow::finished(QNetworkReply * reply) {
+    // now we can call setCoverArt to process the full buffers
+    this->setCoverArt(mResponse);
+    // only interested in finished signals
+    disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
+    delete reply;
+  }
+  void PlayerMainWindow::getCoverArt(int id) {
+      qDebug() << "getCoverArt id=!" << id;
+    mResponse.clear();
+    QNetworkReply * reply =  mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/art?id=" + QString::number(id))));
+    connect(reply,SIGNAL(readyRead()),this,SLOT(readReady()));
+    connect(reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(error(QNetworkReply::NetworkError)));
+    connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
+
+  }
+  void PlayerMainWindow::setCoverArt(const QByteArray data) {
+    QPixmap* image = new QPixmap();
+    if (image->loadFromData(data)) {
+        mHasImage = true;
+        ui->labelArtLandscape->setPixmap(image->scaledToHeight(120, Qt::SmoothTransformation));
+        ui->labelArtPortrait->setPixmap(image->scaledToHeight(310, Qt::SmoothTransformation));
+        if (mIsLandscape) {
+            ui->labelArtPortrait->setVisible(false);
+            ui->labelArtLandscape->setVisible(true);
+        }
+        else {
+            ui->labelArtLandscape->setVisible(false);
+            ui->labelArtPortrait->setVisible(true);
+        }
+    }
+    else {
+        qDebug() << "image load failed!";
+        qDebug() << "data.length" << data.length();
+        ui->labelArtPortrait->setVisible(false);
+        ui->labelArtLandscape->setVisible(false);
+    }
+    delete image;
+  }
+  void PlayerMainWindow::setCoverArtFromPixmap(QPixmap image) {
+    mHasImage = true;
+    ui->labelArtLandscape->setPixmap(image.scaledToHeight(120, Qt::SmoothTransformation));
+    ui->labelArtPortrait->setPixmap(image.scaledToHeight(320, Qt::SmoothTransformation));
+    if (mIsLandscape) {
+        ui->labelArtPortrait->setVisible(false);
+        ui->labelArtLandscape->setVisible(true);
+    }
+    else {
+        ui->labelArtLandscape->setVisible(false);
+        ui->labelArtPortrait->setVisible(true);
+    }
+  }
+
diff --git a/src/playermainwindow.h b/src/playermainwindow.h
new file mode 100644 (file)
index 0000000..73c22b2
--- /dev/null
@@ -0,0 +1,90 @@
+/*   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 PLAYERMAINWINDOW_H
+#define PLAYERMAINWINDOW_H
+
+#include <QMainWindow>
+#include <QtNetwork>
+#include <QtXml>
+#include <QTimer>
+#include "playlistmainwindow.h"
+#include "browsemainwindow.h"
+#include "vlcstatus.h"
+
+namespace Ui {
+    class PlayerMainWindow;
+}
+
+class PlayerMainWindow : public QMainWindow {
+    Q_OBJECT
+public:
+    explicit PlayerMainWindow(QWidget *parent = 0);
+    ~PlayerMainWindow();
+
+public slots:
+    void askStatus();
+    void showConfig();
+    void showAbout();
+    void play();
+    void playpause();
+    void stop();
+    void pause();
+    void previous();
+    void next();
+    void fullscreen();
+    void volUp();
+    void volDown();
+    void volMute();
+    void slide(int value);
+    void updateUiWithCurrentStatus();
+    void setCoverArt(const QByteArray data);
+    void setCoverArtFromPixmap(QPixmap image);
+    void getCoverArt(int id);
+    void finished(QNetworkReply * reply);
+    void error(QNetworkReply::NetworkError code);
+    void readReady();
+    void orientationChanged();
+    void setPortrait();
+    void setLandscape();
+    void setAutoRotate();
+    void playlistIdUpdated(int id, bool hasart, QString extension);
+
+
+protected slots:
+    void parseXmlStatus();
+protected:
+    void changeEvent(QEvent *e);
+
+
+private:
+    Ui::PlayerMainWindow *ui;
+    PlayListMainWindow * mPlayListMainWindow;
+    BrowseMainWindow * mBrowserMainWindow;
+    QNetworkAccessManager * mNetManager;
+    QString mIp;
+    QTimer * mTimer;
+    int mVolume;
+    int mMuted;
+    VlcStatus mCurrentStatus;
+    QByteArray mResponse;
+    bool mIsLandscape;
+    bool mHasImage;
+
+};
+
+#endif // PLAYERMAINWINDOW_H
diff --git a/src/playermainwindow.ui b/src/playermainwindow.ui
new file mode 100644 (file)
index 0000000..a9d9065
--- /dev/null
@@ -0,0 +1,320 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PlayerMainWindow</class>
+ <widget class="QMainWindow" name="PlayerMainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>796</width>
+    <height>631</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Vlc-Remote</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QLabel" name="labelArtPortrait">
+      <property name="minimumSize">
+       <size>
+        <width>380</width>
+        <height>350</height>
+       </size>
+      </property>
+      <property name="maximumSize">
+       <size>
+        <width>380</width>
+        <height>350</height>
+       </size>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayoutDetails">
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayoutDetails">
+        <item>
+         <widget class="QLabel" name="labelTitle">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
+          <property name="text">
+           <string>Information</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="labelArtist">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
+          <property name="text">
+           <string>Information</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLabel" name="labelAlbum">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
+          <property name="text">
+           <string>Information</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <widget class="QLabel" name="labelArtLandscape">
+        <property name="minimumSize">
+         <size>
+          <width>140</width>
+          <height>140</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>140</width>
+          <height>140</height>
+         </size>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <spacer name="verticalSpacer">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>100</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayoutTime">
+      <item>
+       <widget class="QLabel" name="timeLabel">
+        <property name="styleSheet">
+         <string notr="true">color: rgb(201, 201, 201);</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLabel" name="durationLabel">
+        <property name="styleSheet">
+         <string notr="true">color: rgb(201, 201, 201);</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QSlider" name="slider">
+      <property name="enabled">
+       <bool>true</bool>
+      </property>
+      <property name="maximum">
+       <number>100</number>
+      </property>
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QToolButton" name="previousButton">
+        <property name="text">
+         <string>&lt;</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="playpauseButton">
+        <property name="text">
+         <string>Play/Pause</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="nextButton">
+        <property name="text">
+         <string>&gt;</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="stopButton">
+        <property name="text">
+         <string>Stop</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer1">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QToolButton" name="fullscreenButton">
+        <property name="text">
+         <string>FS</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer2">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QToolButton" name="volUp">
+        <property name="text">
+         <string>V+</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="volDown">
+        <property name="text">
+         <string>V-</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="volMute">
+        <property name="text">
+         <string>Mute</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QPushButton" name="playlistButton">
+        <property name="text">
+         <string>PlayList</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="browseButton">
+        <property name="text">
+         <string>Browse</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>796</width>
+     <height>20</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuMenu">
+    <property name="title">
+     <string>menu</string>
+    </property>
+    <addaction name="actionConfiguration"/>
+    <addaction name="actionAbout"/>
+    <addaction name="actionPortrait"/>
+    <addaction name="actionLandscape"/>
+    <addaction name="actionAutoRotate"/>
+   </widget>
+   <addaction name="menuMenu"/>
+  </widget>
+  <action name="actionConfiguration">
+   <property name="text">
+    <string>Configuration</string>
+   </property>
+  </action>
+  <action name="actionAbout">
+   <property name="text">
+    <string>About</string>
+   </property>
+  </action>
+  <action name="actionPortrait">
+   <property name="text">
+    <string>Portrait Mode</string>
+   </property>
+  </action>
+  <action name="actionLandscape">
+   <property name="text">
+    <string>Landscape Mode</string>
+   </property>
+  </action>
+  <action name="actionAutoRotate">
+   <property name="text">
+    <string>Auto Rotate</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/playlistmainwindow.cpp b/src/playlistmainwindow.cpp
new file mode 100644 (file)
index 0000000..a6c8a5c
--- /dev/null
@@ -0,0 +1,411 @@
+/*   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 "playlistmainwindow.h"
+#include "ui_playlistmainwindow.h"
+#include <QPushButton>
+#include <QSettings>
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+#include <QMaemo5InformationBox>
+#endif
+#include "configdialog.h"
+#include "aboutdialog.h"
+#include "appsettings.h"
+//#include "vlcstatus.h"
+
+PlayListMainWindow::PlayListMainWindow(QWidget *parent) :
+        QMainWindow(parent),
+        ui(new Ui::PlayListMainWindow)
+{
+
+    ui->setupUi(this);
+    mTimer = new QTimer(this);
+    setWindowTitle("Vlc remote");
+
+    mCurrentDepth = 0;
+    mCurrentVlcIndex = 0;
+
+
+    mNetManager = new QNetworkAccessManager(this);
+
+    mContents = new QList<VlcPlayListElementSimple>();
+
+    ui->listWidget->setTextElideMode(Qt::ElideLeft);
+    ui->listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+    ui->playButton->setIcon(QIcon::fromTheme("camera_playback"));
+    ui->clearButton->setIcon(QIcon::fromTheme("general_delete"));
+    ui->shuffleButton->setIcon(QIcon::fromTheme("mediaplayer_default_shuffle"));
+    ui->loopButton->setIcon(QIcon::fromTheme("general_refresh"));
+    ui->repeatButton->setIcon(QIcon::fromTheme("general_redo"));
+    ui->removeButton->setIcon(QIcon::fromTheme("general_close"));
+
+    ui->clearButton->setDisabled(false);
+    ui->shuffleButton->setDisabled(false);
+    ui->loopButton->setDisabled(false);
+    ui->repeatButton->setDisabled(false);
+    ui->removeButton->setDisabled(true);
+    ui->playButton->setDisabled(true);
+
+    connect(ui->playButton,SIGNAL(clicked()),this,SLOT(onPlay()));
+    connect(ui->removeButton,SIGNAL(clicked()),this,SLOT(onRemove()));
+    connect(ui->repeatButton,SIGNAL(clicked()),this,SLOT(onRepeat()));
+    connect(ui->loopButton,SIGNAL(clicked()),this,SLOT(onLoop()));
+    connect(ui->shuffleButton,SIGNAL(clicked()),this,SLOT(onShuffle()));
+    connect(ui->clearButton,SIGNAL(clicked()),this,SLOT(onClear()));
+    connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
+
+    init();
+
+}
+void PlayListMainWindow::init()  // CALL WHEN CONFIG CHANGES
+{
+    mIp = AppSettings::getCurrentIp(); // AccountDialog::currentIp();
+}
+void PlayListMainWindow::showPlayList()  // CALL WHEN SHOWN
+{
+    requestPlayList();
+}
+
+PlayListMainWindow::~PlayListMainWindow()
+{
+    delete ui;
+}
+
+void PlayListMainWindow::changeEvent(QEvent *e)
+{
+    QMainWindow::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+
+void PlayListMainWindow::onListSelectionChanged() {
+    QList<QListWidgetItem *> items = ui->listWidget->selectedItems();
+    if (0 < items.count()) {
+        // TODO VLC doesn't seem to support removing nodes!
+        // Playing nodes works fine, however.
+        // should check to see if it is a leaf or not and disable the remove button
+        mCurrentVlcIndex = items.at(0)->type() - LIST_ITEM_TYPE_OFFSET; // Qt reserves types up to 1000, we use an offset beyond that for index tracking. May prove to be too hacky!
+        mCurrentElement = getElementFromId(mCurrentVlcIndex);
+        if (0 == QString::compare("node", mCurrentElement.type)) {
+            ui->removeButton->setDisabled(true);
+            ui->playButton->setDisabled(false);
+        }
+        else {
+            ui->removeButton->setDisabled(false);
+            ui->playButton->setDisabled(false);
+        }
+    }
+    else {
+        mCurrentVlcIndex = 0;
+        ui->removeButton->setDisabled(true);
+        ui->playButton->setDisabled(true);
+    }
+}
+
+void PlayListMainWindow::onRemove() {
+    if (0 < this->mCurrentVlcIndex) {
+        mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_delete&id=" + QString::number(this->mCurrentVlcIndex))));
+        //connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
+        // don't refresh just clear the item!
+        delete ui->listWidget->takeItem(ui->listWidget->currentRow());
+    }
+}
+void PlayListMainWindow::onPlay() {
+    if (0 < this->mCurrentVlcIndex) {
+        mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_play&id=" + QString::number(this->mCurrentVlcIndex))));
+    }
+}
+void PlayListMainWindow::onRepeat() {
+    mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_repeat")));
+}
+void PlayListMainWindow::onLoop() {
+    mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_loop")));
+}
+void PlayListMainWindow::onShuffle() {
+    mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_random")));
+}
+void PlayListMainWindow::onClear() {
+    mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_empty")));
+    mContents->clear();
+    ui->listWidget->clear();
+    //connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
+}
+void PlayListMainWindow::requestPlayList() {
+  mResponse.clear();
+  ui->removeButton->setDisabled(true);
+  ui->playButton->setDisabled(true);
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+  this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
+#endif
+  QNetworkReply * reply =  mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/playlist.xml")));
+  disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList()));
+  connect(reply,SIGNAL(readyRead()),this,SLOT(readReady()));
+  connect(reply,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(error(QNetworkReply::NetworkError)));
+  connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
+}
+void PlayListMainWindow::error(QNetworkReply::NetworkError code) {
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+  this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
+#endif
+  qDebug() << code;
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+  QMaemo5InformationBox::information(this, tr("Playlist could not be retrieved."), QMaemo5InformationBox::DefaultTimeout);
+#endif
+}
+void PlayListMainWindow::readReady() {
+  QNetworkReply * reply = qobject_cast<QNetworkReply*>(sender());
+  // append to buffer
+  mResponse += reply->readAll();
+}
+void PlayListMainWindow::finished(QNetworkReply * reply) {
+  // now we can call parseXmlList to process the full buffers
+  this->parseXmlPlayList();
+  // only interested in finished signals
+  disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *)));
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+  this->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
+#endif
+  delete reply;
+}
+
+void PlayListMainWindow::parseXmlPlayList() {
+  mContents->clear();
+  QDomDocument doc;
+  doc.setContent(this->mResponse);
+  QDomElement docElem = doc.documentElement();
+  QDomNodeList nodes = docElem.elementsByTagName("node");
+  int depth = 0;
+
+  int currentLeafId = 0;
+  bool hasArt = false;
+  QString extension = "";
+
+  int ct = nodes.count();
+  for (int idx = 0; idx < ct; ++idx) {
+    QDomNode node = nodes.at(idx);
+    QString current = "";
+    //QString name = node.attributes().namedItem("name").nodeValue().replace("\\\\", "\\");
+    int id = node.attributes().namedItem("id").nodeValue().toInt();
+    if (4 > id && 0 == QString::compare(node.attributes().namedItem("ro").nodeValue(), "ro")) {
+      // got the main playlist, let's build it up
+      if (node.hasChildNodes()) {
+        QDomNodeList leafs = node.childNodes();
+        int leafct = leafs.count();
+        if (0 < leafct) {
+          depth = 1;
+          for (int jdx = 0; jdx < leafct; ++jdx) {
+            QDomNode leaf = leafs.at(jdx);
+            parsePlayListItem(&leaf, &extension, &hasArt, &currentLeafId, 1);
+          }
+        }
+      }
+
+    }
+  }
+
+  mResponse.clear();
+
+  emit this->idUpdated(currentLeafId, hasArt, extension);
+  this->updateList();
+
+
+}
+
+
+int PlayListMainWindow::parsePlayListItem(QDomNode *node, QString *extension, bool *hasArt, int *currentLeafId, int depth) {
+    int leafCt = 0;
+    if (NULL != node) {
+        QString current;
+        VlcPlayListElementSimple* el = new VlcPlayListElementSimple();
+        el->id = node->attributes().namedItem("id").nodeValue().toInt();
+        el->path = node->attributes().namedItem("uri").nodeValue();
+        el->name = node->attributes().namedItem("name").nodeValue().replace("\\\\", "\\");
+        current = node->attributes().namedItem("current").nodeValue();
+        el->playing = (0 < current.length());
+        el->depth = depth;
+        if (0 != QString::compare(node->nodeName(), "node")) {
+            el->type = "leaf";
+            el->extension = getExtension(el->path, NULL);
+            if (el->playing) {
+                *currentLeafId = el->id;
+                QString art = node->toElement().namedItem("art_url").toElement().text();
+                *hasArt = (!art.isNull() && !art.isEmpty());
+                *extension = getExtension(el->path, NULL);
+            }
+            QString title = node->toElement().namedItem("title").toElement().text();
+            QString artist = node->toElement().namedItem("artist").toElement().text();
+            QString album = node->toElement().namedItem("album").toElement().text();
+            if (0 < artist.length() || 0 < album.length()) {
+                el->name = "" + title + "\n" + artist + " - " + album;
+            }
+            this->mContents->append(*el);
+            ++leafCt;
+            delete el;
+        }
+        else {
+            el->type = "node";
+            el->extension = getExtension(el->path, NULL);
+            // empty nodes appear in the playlist when they can't be played!
+            if (node->hasChildNodes()) {
+                this->mContents->append(*el);
+                ++leafCt;
+            }
+            delete el;
+            // now parse the child nodes as leaf.
+            if (node->hasChildNodes()) {
+                QDomNodeList items = node->childNodes();
+                int itemct = items.count();
+                int added = 0;
+                if (0 < itemct) {
+                  ++depth;
+                  for (int kdx = 0; kdx < itemct; ++kdx) {
+                    QDomNode item = items.at(kdx);
+                    added += parsePlayListItem(&item, extension, hasArt, currentLeafId, depth);
+                  }
+                  if (1 > added) {
+                      // should remove the last PlayListElement
+                      this->mContents->removeLast();
+                      --leafCt;
+                  }
+                  else {
+                      leafCt += added;
+                  }
+                }
+            }
+        }
+    }
+    return leafCt;
+}
+
+QString PlayListMainWindow::getExtension(QString path, QString extension) {
+    // return extension if exists
+    if (!extension.isNull() && !extension.isEmpty()) return extension;
+    // return blank if no path
+    if (path.isNull() || path.isEmpty()) return "";
+    // otherwise extract the extension
+    int dot_pos = path.lastIndexOf('.');
+    if (0 < dot_pos) {
+        return path.right(path.length() - (dot_pos + 1));
+    }
+    else { // no dot
+        return "";
+    }
+}
+
+VlcPlayListElementSimple PlayListMainWindow::getElementFromId(int id) {
+  //if (0 != QString::compare("", text)) {
+    for (int idx = 0; idx < mContents->count(); ++idx) {
+      if (0 < id && (id == mContents->at(idx).id)) {
+        return mContents->at(idx);
+      }
+    }
+    //}
+    return *(new VlcPlayListElementSimple());
+}
+
+void PlayListMainWindow::updateList() {
+  ui->listWidget->clear();
+  int ct = this->mContents->count();
+  if (0 < ct) {
+    QIcon icon_audio  = QIcon::fromTheme("general_audio_file");
+    QIcon icon_video  = QIcon::fromTheme("general_video_file");
+    QIcon icon_image  = QIcon::fromTheme("general_image");
+    QIcon icon_flash  = QIcon::fromTheme("filemanager_flash_file");
+    QIcon icon_media  = QIcon::fromTheme("filemanager_media_folder");
+    QIcon icon_real   = QIcon::fromTheme("filemanager_real_music");
+    QIcon icon_playl  = QIcon::fromTheme("filemanager_playlist");
+    QIcon icon_unknown= QIcon::fromTheme("filemanager_unknown_file");
+    for (int idx = 0; idx < ct; ++idx) {
+      VlcPlayListElementSimple el = mContents->at(idx);
+      QListWidgetItem* item;
+      if (0 == QString::compare("node", el.type)) {
+        item = new QListWidgetItem(icon_media, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id);
+      }
+      else {
+          if ( 0 == QString::compare(el.extension, "jpg")  ||
+               0 == QString::compare(el.extension, "jpeg") ||
+               0 == QString::compare(el.extension, "gif")  ||
+               0 == QString::compare(el.extension, "png")  ||
+               0 == QString::compare(el.extension, "bmp")  ) {
+              item = new QListWidgetItem(icon_image, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .jpg, .jpeg, .gif, .png, .bmp
+          }
+          else if ( 0 == QString::compare(el.extension, "mp3")  ||
+                    0 == QString::compare(el.extension, "m4a")  ||
+                    0 == QString::compare(el.extension, "ogg")  ||
+                    0 == QString::compare(el.extension, "oga")  ||
+                    0 == QString::compare(el.extension, "wav")  ||
+                    0 == QString::compare(el.extension, "flac")  ) {
+              item = new QListWidgetItem(icon_audio, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .mp3, .m4a, .ogg, .oga, .wav, .flac
+          }
+          else if ( 0 == QString::compare(el.extension, "m3u")  ||
+                    0 == QString::compare(el.extension, "wpl")  ||
+                    0 == QString::compare(el.extension, "pls")  ||
+                    0 == QString::compare(el.extension, "asx")  ||
+                    0 == QString::compare(el.extension, "xspf") ||
+                    0 == QString::compare(el.extension, "cmml")  ) {
+              item = new QListWidgetItem(icon_playl, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .m3u, .wpl, .pls, .asx, .xspf, .cmml
+          }
+          else if ( 0 == QString::compare(el.extension, "avi")  ||
+                    0 == QString::compare(el.extension, "mpeg") ||
+                    0 == QString::compare(el.extension, "mpg")  ||
+                    0 == QString::compare(el.extension, "mov")  ||
+                    0 == QString::compare(el.extension, "mp4")  ||
+                    0 == QString::compare(el.extension, "m4v")  ||
+                    0 == QString::compare(el.extension, "wmv")  ||
+                    0 == QString::compare(el.extension, "mkv")  ||
+                    0 == QString::compare(el.extension, "ogv")  ) {
+              item = new QListWidgetItem(icon_video, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .avi, .mpg, .mpeg, .mov, .m4v, .mp4, .wmv, .mkv, .ogv
+          }
+          else if ( 0 == QString::compare(el.extension, "rm")  ||
+                    0 == QString::compare(el.extension, "ra")  ||
+                    0 == QString::compare(el.extension, "ram")  ) {
+              item = new QListWidgetItem(icon_real, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .ram, 'rm, 'ra
+          }
+          else if ( 0 == QString::compare(el.extension, "flv")  ) {
+              item = new QListWidgetItem(icon_flash, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .flv
+          }
+          //else if ( 0 == QString::compare(el.extension, "")  ) {
+          //    item = new QListWidgetItem(icon_unknown, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id); // .flv
+          //}
+          else {
+              if (el.name.contains("Flash")) {
+                  item = new QListWidgetItem(icon_flash, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id);
+              }
+              else {
+                  item = new QListWidgetItem(icon_media, el.name, ui->listWidget, LIST_ITEM_TYPE_OFFSET + el.id);
+              }
+          }
+      }
+      item->setSelected(el.playing);
+      ui->listWidget->addItem(item);
+      if (el.playing) {
+          ui->listWidget->scrollToItem(item, QAbstractItemView::PositionAtCenter);
+      }
+    }
+  }
+}
+void PlayListMainWindow::updateUiWithCurrentStatus(VlcStatus * status) {
+    ui->loopButton->setChecked(status->loop);
+    ui->repeatButton->setChecked(status->repeat);
+    ui->shuffleButton->setChecked(status->random);
+}
diff --git a/src/playlistmainwindow.h b/src/playlistmainwindow.h
new file mode 100644 (file)
index 0000000..a6a444f
--- /dev/null
@@ -0,0 +1,82 @@
+/*   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 PLAYLISTMAINWINDOW_H
+#define PLAYLISTMAINWINDOW_H
+
+#include <QMainWindow>
+#include <QTimer>
+#include <QtNetwork>
+#include <QtXml>
+#include "vlcplaylistelementsimple.h"
+#include "vlcstatus.h"
+
+#ifndef LIST_ITEM_TYPE_OFFSET
+#define LIST_ITEM_TYPE_OFFSET 1000
+#endif
+
+namespace Ui {
+    class PlayListMainWindow;
+}
+
+class PlayListMainWindow : public QMainWindow {
+    Q_OBJECT
+public:
+    explicit PlayListMainWindow(QWidget *parent = 0);
+    ~PlayListMainWindow();
+    void init();
+public slots:
+    void onClear();
+    void onShuffle();
+    void onLoop();
+    void onPlay();
+    void onRepeat();
+    void onRemove();
+    void requestPlayList();
+    void onListSelectionChanged();
+    void finished(QNetworkReply * reply);
+    void readReady();
+    void error(QNetworkReply::NetworkError code);
+    void showPlayList();
+    void updateUiWithCurrentStatus(VlcStatus * status);
+
+protected slots:
+    void parseXmlPlayList();
+    void updateList();
+    int parsePlayListItem(QDomNode *node, QString *extension, bool *hasArt, int *currentLeafId, int depth);
+
+signals:
+    void idUpdated(int id, bool hasArt, QString extension);
+
+protected:
+    void changeEvent(QEvent *e);
+    VlcPlayListElementSimple getElementFromId(int id);
+    QString getExtension(QString path, QString extension);
+
+private:
+    Ui::PlayListMainWindow *ui;
+    QTimer * mTimer;
+    QString mIp;
+    QNetworkAccessManager * mNetManager;
+    QList<VlcPlayListElementSimple>* mContents;
+    VlcPlayListElementSimple mCurrentElement;
+    int mCurrentVlcIndex;
+    int mCurrentDepth;
+    QByteArray mResponse;
+};
+
+#endif // PLAYLISTMAINWINDOW_H
diff --git a/src/playlistmainwindow.ui b/src/playlistmainwindow.ui
new file mode 100644 (file)
index 0000000..c98d800
--- /dev/null
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PlayListMainWindow</class>
+ <widget class="QMainWindow" name="PlayListMainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Playlist</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QListWidget" name="listWidget">
+      <item>
+       <property name="text">
+        <string>not yet done</string>
+       </property>
+      </item>
+      <item>
+       <property name="text">
+        <string>not yet done</string>
+       </property>
+      </item>
+      <item>
+       <property name="text">
+        <string>not yet done</string>
+       </property>
+      </item>
+     </widget>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QToolButton" name="playButton">
+        <property name="text">
+         <string>Play</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="shuffleButton">
+        <property name="text">
+         <string>Shuffle</string>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="loopButton">
+        <property name="text">
+         <string>Loop</string>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QToolButton" name="repeatButton">
+        <property name="text">
+         <string>Repeat</string>
+        </property>
+        <property name="checkable">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QPushButton" name="clearButton">
+        <property name="text">
+         <string>Clear all</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="removeButton">
+        <property name="text">
+         <string>Remove</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>800</width>
+     <height>25</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuMenu">
+    <property name="title">
+     <string>menu</string>
+    </property>
+   </widget>
+   <addaction name="menuMenu"/>
+  </widget>
+  <action name="actionPortrait">
+   <property name="text">
+    <string>Portrait Mode</string>
+   </property>
+  </action>
+  <action name="actionLandscape">
+   <property name="text">
+    <string>Landscape Mode</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/resource.qrc b/src/resource.qrc
new file mode 100644 (file)
index 0000000..aeea2b6
--- /dev/null
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/">
+        <file>config-vlc.jpg</file>
+    </qresource>
+</RCC>
diff --git a/src/ressources.qrc b/src/ressources.qrc
new file mode 100644 (file)
index 0000000..0821e0c
--- /dev/null
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/languages">
+        <file>vlcremote_fr_FR.qm</file>
+    </qresource>
+</RCC>
diff --git a/src/scanipdialog.cpp b/src/scanipdialog.cpp
new file mode 100644 (file)
index 0000000..4de0efe
--- /dev/null
@@ -0,0 +1,26 @@
+#include "scanipdialog.h"
+#include "ui_scanipdialog.h"
+
+ScanIPDialog::ScanIPDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::ScanIPDialog)
+{
+    ui->setupUi(this);
+}
+
+ScanIPDialog::~ScanIPDialog()
+{
+    delete ui;
+}
+
+void ScanIPDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
diff --git a/src/scanipdialog.h b/src/scanipdialog.h
new file mode 100644 (file)
index 0000000..0e3cdf4
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef SCANIPDIALOG_H
+#define SCANIPDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class ScanIPDialog;
+}
+
+class ScanIPDialog : public QDialog {
+    Q_OBJECT
+public:
+    explicit ScanIPDialog(QWidget *parent = 0);
+    ~ScanIPDialog();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::ScanIPDialog *ui;
+};
+
+#endif // SCANIPDIALOG_H
diff --git a/src/scanipdialog.ui b/src/scanipdialog.ui
new file mode 100644 (file)
index 0000000..e5aa69a
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ScanIPDialog</class>
+ <widget class="QDialog" name="ScanIPDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>422</width>
+    <height>360</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>name</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1">
+        <widget class="QLineEdit" name="lineEdit"/>
+       </item>
+       <item row="1" column="0">
+        <widget class="QLabel" name="label_2">
+         <property name="text">
+          <string>IP</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1">
+        <widget class="QLineEdit" name="lineEdit_2"/>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <widget class="QListWidget" name="listWidget"/>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QPushButton" name="pushButton_2">
+       <property name="text">
+        <string>Scan</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton">
+       <property name="text">
+        <string>Done</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/src.pro b/src/src.pro
new file mode 100644 (file)
index 0000000..35196ae
--- /dev/null
@@ -0,0 +1,45 @@
+# -------------------------------------------------
+# Project created by QtCreator 2010-07-29T19:02:39
+# -------------------------------------------------
+QT += core \
+    gui \
+    network \
+    xml \
+    maemo5
+TARGET = vlc-remote
+TEMPLATE = app
+SOURCES += main.cpp \
+    playlistmainwindow.cpp \
+    playermainwindow.cpp \
+    configdialog.cpp \
+    aboutdialog.cpp \
+    accountdialog.cpp \
+    newaccountdialog.cpp \
+    browsemainwindow.cpp \
+    vlcbrowseelement.cpp \
+    vlcplaylistelementsimple.cpp \
+    vlcstatus.cpp \
+    appsettings.cpp \
+    favouritesmainwindow.cpp
+HEADERS += playlistmainwindow.h \
+    playermainwindow.h \
+    configdialog.h \
+    aboutdialog.h \
+    accountdialog.h \
+    newaccountdialog.h \
+    browsemainwindow.h \
+    vlcbrowseelement.h \
+    vlcplaylistelementsimple.h \
+    vlcstatus.h \
+    appsettings.h \
+    favouritesmainwindow.h
+FORMS += playlistmainwindow.ui \
+    playermainwindow.ui \
+    configdialog.ui \
+    aboutdialog.ui \
+    accountdialog.ui \
+    browsemainwindow.ui \
+    favouritesmainwindow.ui
+OTHER_FILES += vlc-remote.desktop
+RESOURCES += ressources.qrc
+TRANSLATIONS = vlcremote_fr_FR.ts
diff --git a/src/vlc-remote.desktop b/src/vlc-remote.desktop
new file mode 100644 (file)
index 0000000..82f4514
--- /dev/null
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=0.2
+Type=Application
+Terminal=true
+Name=vlc-remote
+Exec=/usr/bin/vlc-remote
+Icon=
+#X-Window-Icon=timerwidget
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/src/vlc-remote.png b/src/vlc-remote.png
new file mode 100644 (file)
index 0000000..7f58140
Binary files /dev/null and b/src/vlc-remote.png differ
diff --git a/src/vlcbrowseelement.cpp b/src/vlcbrowseelement.cpp
new file mode 100644 (file)
index 0000000..f865632
--- /dev/null
@@ -0,0 +1,19 @@
+/*   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 "vlcbrowseelement.h"
+
diff --git a/src/vlcbrowseelement.h b/src/vlcbrowseelement.h
new file mode 100644 (file)
index 0000000..b263b10
--- /dev/null
@@ -0,0 +1,33 @@
+/*   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 VLCBROWSEELEMENT_H
+#define VLCBROWSEELEMENT_H
+#include <QString>
+#include <QDate>
+
+struct VlcBrowseElement {
+    QString type;
+    int size;
+    QDate date;
+    QString path;
+    QString name;
+    QString extension;
+} ;
+
+
+#endif // VLCBROWSEELEMENT_H
diff --git a/src/vlcplaylistelementsimple.cpp b/src/vlcplaylistelementsimple.cpp
new file mode 100644 (file)
index 0000000..08eb506
--- /dev/null
@@ -0,0 +1,18 @@
+/*   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 "vlcplaylistelementsimple.h"
diff --git a/src/vlcplaylistelementsimple.h b/src/vlcplaylistelementsimple.h
new file mode 100644 (file)
index 0000000..a49dea8
--- /dev/null
@@ -0,0 +1,33 @@
+/*   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 VLCPLAYLISTELEMENTSIMPLE_H
+#define VLCPLAYLISTELEMENTSIMPLE_H
+
+#include <QString>
+
+struct VlcPlayListElementSimple {
+    int id; // vlc playlist item id
+    int depth; // how deep in the tree
+    bool playing; // currently playing item
+    QString type; // node or leaf
+    QString extension; // file extension
+    QString path; // Only used for leaf - repeat name otherwise
+    QString name; // name or metadata title if available
+} ;
+
+#endif // VLCPLAYLISTELEMENTSIMPLE_H
diff --git a/src/vlcremote_fr_FR.qm b/src/vlcremote_fr_FR.qm
new file mode 100644 (file)
index 0000000..7ce38ca
Binary files /dev/null and b/src/vlcremote_fr_FR.qm differ
diff --git a/src/vlcremote_fr_FR.ts b/src/vlcremote_fr_FR.ts
new file mode 100644 (file)
index 0000000..5204e2a
--- /dev/null
@@ -0,0 +1,433 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+    <name>AboutDialog</name>
+    <message>
+        <location filename="aboutdialog.ui" line="14"/>
+        <source>Dialog</source>
+        <translation>À propos</translation>
+    </message>
+    <message>
+        <location filename="aboutdialog.ui" line="20"/>
+        <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;DejaVu Sans&apos;; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;OMed &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Application by Sacha schutz &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;istdasklar@gmail.com&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://omedsoft.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;DejaVu Sans&apos;; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;OMed &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Application par Sacha schutz &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;istdasklar@gmail.com&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://omedsoft.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>AccountDialog</name>
+    <message>
+        <location filename="accountdialog.ui" line="14"/>
+        <source>Accounts</source>
+        <translation>Comptes</translation>
+    </message>
+    <message>
+        <location filename="accountdialog.ui" line="21"/>
+        <source>test</source>
+        <translation>test</translation>
+    </message>
+    <message>
+        <location filename="accountdialog.ui" line="31"/>
+        <source>Add</source>
+        <translation>Ajouter</translation>
+    </message>
+    <message>
+        <location filename="accountdialog.ui" line="41"/>
+        <source>Edit</source>
+        <translation>Éditer</translation>
+    </message>
+    <message>
+        <location filename="accountdialog.ui" line="51"/>
+        <source>Remove</source>
+        <translation>Supprimer</translation>
+    </message>
+    <message>
+        <location filename="accountdialog.ui" line="77"/>
+        <source>Use</source>
+        <translation>Utiliser</translation>
+    </message>
+</context>
+<context>
+    <name>BrowseMainWindow</name>
+    <message>
+        <location filename="browsemainwindow.ui" line="14"/>
+        <source>MainWindow</source>
+        <translation>Vlc remote</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="27"/>
+        <source>Play</source>
+        <translation>Lire</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="34"/>
+        <source>Enqueue</source>
+        <translation>Ajouter</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="41"/>
+        <source>Browse</source>
+        <translation>Ouvrir</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="60"/>
+        <source>menu</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="71"/>
+        <source>User Folder</source>
+        <translation>Utiliser</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="76"/>
+        <source>Home</source>
+        <translation>Dossier d&apos;accueil</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="81"/>
+        <source>Set as Home</source>
+        <translation>Marquer comme dossier d&apos;accueil</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="86"/>
+        <source>Favourites</source>
+        <translation>Favoris</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.ui" line="91"/>
+        <source>Add to Favourite</source>
+        <translation>Ajouter aux favoris</translation>
+    </message>
+    <message>
+        <source>configuration</source>
+        <translation type="obsolete">Configuration</translation>
+    </message>
+    <message>
+        <source>About</source>
+        <translation type="obsolete">À propos</translation>
+    </message>
+    <message>
+        <location filename="browsemainwindow.cpp" line="311"/>
+        <source>Directory could not be browsed!</source>
+        <translation>Le dossier ne peux être listé !</translation>
+    </message>
+</context>
+<context>
+    <name>ConfigDialog</name>
+    <message>
+        <location filename="configdialog.ui" line="14"/>
+        <source>Dialog</source>
+        <translation>Configuration</translation>
+    </message>
+    <message>
+        <location filename="configdialog.ui" line="20"/>
+        <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;DejaVu Sans&apos;; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Enter IP of VLC server.  &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Example : &lt;span style=&quot; font-weight:600;&quot;&gt;192.168.0.8:8080&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Be sure  you have properly configured Vlc&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; and allows connection by adding this IP in /vlc/http/.hosts&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;More information on my blog : &lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;omed.blogspot.com&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</source>
+        <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;DejaVu Sans&apos;; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Mettre l&apos;ip du Serveur VLC.&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Exemple : &lt;span style=&quot; font-weight:600;&quot;&gt;192.168.0.8:8080&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Vous devez avoir configurer VLC correctement&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; et autoriser les connexions en ajoutant l&apos;ip de votre N900 dans /vlc/http/.hosts&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Plus d&apos;informations sur mon blog : &lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;omed.blogspot.com&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>FavouritesMainWindow</name>
+    <message>
+        <location filename="favouritesmainwindow.ui" line="14"/>
+        <source>MainWindow</source>
+        <translation>Vlc remote</translation>
+    </message>
+    <message>
+        <location filename="favouritesmainwindow.ui" line="26"/>
+        <source>Name</source>
+        <translation>Nom</translation>
+    </message>
+    <message>
+        <location filename="favouritesmainwindow.ui" line="36"/>
+        <source>Save</source>
+        <translation>Sauvegarder</translation>
+    </message>
+    <message>
+        <location filename="favouritesmainwindow.ui" line="47"/>
+        <source>Delete</source>
+        <translation>Supprimer</translation>
+    </message>
+    <message>
+        <location filename="favouritesmainwindow.ui" line="54"/>
+        <source>Edit</source>
+        <translation>Éditer</translation>
+    </message>
+    <message>
+        <location filename="favouritesmainwindow.ui" line="61"/>
+        <source>Browse</source>
+        <translation>Ouvrir</translation>
+    </message>
+    <message>
+        <location filename="favouritesmainwindow.ui" line="82"/>
+        <source>Set as Home</source>
+        <translation>Dossier d&apos;accueil</translation>
+    </message>
+</context>
+<context>
+    <name>NewAccountDialog</name>
+    <message>
+        <location filename="newaccountdialog.cpp" line="27"/>
+        <source>Add account</source>
+        <translation>Ajouter un compte</translation>
+    </message>
+    <message>
+        <location filename="newaccountdialog.cpp" line="44"/>
+        <source>Name:</source>
+        <translation>Nom : </translation>
+    </message>
+    <message>
+        <location filename="newaccountdialog.cpp" line="45"/>
+        <source>Ip:</source>
+        <translation>Ip : </translation>
+    </message>
+    <message>
+        <location filename="newaccountdialog.cpp" line="46"/>
+        <source>Port:</source>
+        <translation>Port : </translation>
+    </message>
+    <message>
+        <location filename="newaccountdialog.cpp" line="80"/>
+        <source>Edit account</source>
+        <translation>Édition d&apos;un compte</translation>
+    </message>
+</context>
+<context>
+    <name>PlayListMainWindow</name>
+    <message>
+        <source>MainWindow</source>
+        <translation type="obsolete">Vlc remote</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="14"/>
+        <source>Playlist</source>
+        <translation>Liste de lecture</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="22"/>
+        <location filename="playlistmainwindow.ui" line="27"/>
+        <location filename="playlistmainwindow.ui" line="32"/>
+        <source>not yet done</source>
+        <translation>fonctions pas encore développée</translation>
+    </message>
+    <message>
+        <source>Clear</source>
+        <translation type="obsolete">Vider</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="42"/>
+        <source>Play</source>
+        <translation>Lire</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="49"/>
+        <source>Shuffle</source>
+        <translation>Aléatoire</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="59"/>
+        <source>Loop</source>
+        <translation>Boucler</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="69"/>
+        <source>Repeat</source>
+        <translation>Répéter</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="96"/>
+        <source>Clear all</source>
+        <translation>Vider</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="103"/>
+        <source>Remove</source>
+        <translation>Supprimer</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="122"/>
+        <source>menu</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="129"/>
+        <source>Portrait Mode</source>
+        <translation>Mode Portrait</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.ui" line="134"/>
+        <source>Landscape Mode</source>
+        <translation>Mode Paysage</translation>
+    </message>
+    <message>
+        <source>configuration</source>
+        <translation type="obsolete">Configuration</translation>
+    </message>
+    <message>
+        <source>About</source>
+        <translation type="obsolete">À propos</translation>
+    </message>
+    <message>
+        <location filename="playlistmainwindow.cpp" line="172"/>
+        <source>Playlist could not be retrieved.</source>
+        <translation>Impossible de récupérer la liste de lecture.</translation>
+    </message>
+</context>
+<context>
+    <name>PlayerMainWindow</name>
+    <message>
+        <source>MainWindow</source>
+        <translation type="obsolete">Vlc remote</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="14"/>
+        <source>Vlc-Remote</source>
+        <translation>Vlc-Remote</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="50"/>
+        <location filename="playermainwindow.ui" line="66"/>
+        <location filename="playermainwindow.ui" line="82"/>
+        <source>Information</source>
+        <translation>Information</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="170"/>
+        <source>&lt;</source>
+        <translation>&lt;</translation>
+    </message>
+    <message>
+        <source>play</source>
+        <translation type="obsolete">Lire</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="184"/>
+        <source>&gt;</source>
+        <translation>&gt;</translation>
+    </message>
+    <message>
+        <source>Pause</source>
+        <translation type="obsolete">Pause</translation>
+    </message>
+    <message>
+        <source>play/pause</source>
+        <translation type="obsolete">Lire/Pause</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="191"/>
+        <source>Stop</source>
+        <translation>Stop</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="211"/>
+        <source>FS</source>
+        <translation>FS</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="231"/>
+        <source>V+</source>
+        <translation>V+</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="238"/>
+        <source>V-</source>
+        <translation>V-</translation>
+    </message>
+    <message>
+        <source>mute</source>
+        <translation type="obsolete">Couper le son</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="177"/>
+        <source>Play/Pause</source>
+        <translation>Lecture/Pause</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="245"/>
+        <source>Mute</source>
+        <translation>Couper le son</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="256"/>
+        <source>PlayList</source>
+        <translation>Liste de lecture</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="263"/>
+        <source>Browse</source>
+        <translation>Ouvrir</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="282"/>
+        <source>menu</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="294"/>
+        <source>Configuration</source>
+        <translation>Configuration</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="299"/>
+        <source>About</source>
+        <translation>À propos</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="304"/>
+        <source>Portrait Mode</source>
+        <translation>Mode Portrait</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="309"/>
+        <source>Landscape Mode</source>
+        <translation>Mode Paysage</translation>
+    </message>
+    <message>
+        <location filename="playermainwindow.ui" line="314"/>
+        <source>Auto Rotate</source>
+        <translation>À propos de l&apos;orientation</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/vlcstatus.cpp b/src/vlcstatus.cpp
new file mode 100644 (file)
index 0000000..0857f0b
--- /dev/null
@@ -0,0 +1,18 @@
+/*   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 "vlcstatus.h"
diff --git a/src/vlcstatus.h b/src/vlcstatus.h
new file mode 100644 (file)
index 0000000..738780a
--- /dev/null
@@ -0,0 +1,46 @@
+/*   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 VLCSTATUS_H
+#define VLCSTATUS_H
+#include <QString>
+
+enum VlcStatusState {
+    UNKNOWN,
+    STOP,
+    PLAYING,
+    PAUSED
+};
+
+struct VlcStatus {
+    bool newtrack;
+    bool random;
+    bool loop;
+    bool repeat;
+    bool hasart;
+    int volume;
+    int length;
+    int time;
+    int position;
+    VlcStatusState state;
+    QString title;
+    QString artist;
+    QString album;
+    QString nowplaying;
+};
+
+#endif // VLCSTATUS_H
diff --git a/src/welcome b/src/welcome
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/todo.txt b/todo.txt
deleted file mode 100644 (file)
index 9daeafb..0000000
--- a/todo.txt
+++ /dev/null
@@ -1 +0,0 @@
-test
diff --git a/vlc-remote.desktop b/vlc-remote.desktop
deleted file mode 100644 (file)
index 82f4514..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=0.2
-Type=Application
-Terminal=true
-Name=vlc-remote
-Exec=/usr/bin/vlc-remote
-Icon=
-#X-Window-Icon=timerwidget
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/vlc-remote.png b/vlc-remote.png
deleted file mode 100644 (file)
index 7f58140..0000000
Binary files a/vlc-remote.png and /dev/null differ
diff --git a/vlc-remote.pro b/vlc-remote.pro
new file mode 100644 (file)
index 0000000..d97061d
--- /dev/null
@@ -0,0 +1,8 @@
+QMAKEVERSION = $$[QMAKE_VERSION]
+ISQT4 = $$find(QMAKEVERSION, ^[2-9])
+isEmpty( ISQT4 ) {
+error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4");
+}
+
+TEMPLATE = subdirs
+SUBDIRS  = src
diff --git a/vlcRemote.pro b/vlcRemote.pro
deleted file mode 100644 (file)
index 35196ae..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# -------------------------------------------------
-# Project created by QtCreator 2010-07-29T19:02:39
-# -------------------------------------------------
-QT += core \
-    gui \
-    network \
-    xml \
-    maemo5
-TARGET = vlc-remote
-TEMPLATE = app
-SOURCES += main.cpp \
-    playlistmainwindow.cpp \
-    playermainwindow.cpp \
-    configdialog.cpp \
-    aboutdialog.cpp \
-    accountdialog.cpp \
-    newaccountdialog.cpp \
-    browsemainwindow.cpp \
-    vlcbrowseelement.cpp \
-    vlcplaylistelementsimple.cpp \
-    vlcstatus.cpp \
-    appsettings.cpp \
-    favouritesmainwindow.cpp
-HEADERS += playlistmainwindow.h \
-    playermainwindow.h \
-    configdialog.h \
-    aboutdialog.h \
-    accountdialog.h \
-    newaccountdialog.h \
-    browsemainwindow.h \
-    vlcbrowseelement.h \
-    vlcplaylistelementsimple.h \
-    vlcstatus.h \
-    appsettings.h \
-    favouritesmainwindow.h
-FORMS += playlistmainwindow.ui \
-    playermainwindow.ui \
-    configdialog.ui \
-    aboutdialog.ui \
-    accountdialog.ui \
-    browsemainwindow.ui \
-    favouritesmainwindow.ui
-OTHER_FILES += vlc-remote.desktop
-RESOURCES += ressources.qrc
-TRANSLATIONS = vlcremote_fr_FR.ts
diff --git a/vlcbrowseelement.cpp b/vlcbrowseelement.cpp
deleted file mode 100644 (file)
index f865632..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*   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 "vlcbrowseelement.h"
-
diff --git a/vlcbrowseelement.h b/vlcbrowseelement.h
deleted file mode 100644 (file)
index b263b10..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*   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 VLCBROWSEELEMENT_H
-#define VLCBROWSEELEMENT_H
-#include <QString>
-#include <QDate>
-
-struct VlcBrowseElement {
-    QString type;
-    int size;
-    QDate date;
-    QString path;
-    QString name;
-    QString extension;
-} ;
-
-
-#endif // VLCBROWSEELEMENT_H
diff --git a/vlcplaylistelementsimple.cpp b/vlcplaylistelementsimple.cpp
deleted file mode 100644 (file)
index 08eb506..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*   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 "vlcplaylistelementsimple.h"
diff --git a/vlcplaylistelementsimple.h b/vlcplaylistelementsimple.h
deleted file mode 100644 (file)
index a49dea8..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*   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 VLCPLAYLISTELEMENTSIMPLE_H
-#define VLCPLAYLISTELEMENTSIMPLE_H
-
-#include <QString>
-
-struct VlcPlayListElementSimple {
-    int id; // vlc playlist item id
-    int depth; // how deep in the tree
-    bool playing; // currently playing item
-    QString type; // node or leaf
-    QString extension; // file extension
-    QString path; // Only used for leaf - repeat name otherwise
-    QString name; // name or metadata title if available
-} ;
-
-#endif // VLCPLAYLISTELEMENTSIMPLE_H
diff --git a/vlcremote_fr_FR.qm b/vlcremote_fr_FR.qm
deleted file mode 100644 (file)
index 7ce38ca..0000000
Binary files a/vlcremote_fr_FR.qm and /dev/null differ
diff --git a/vlcremote_fr_FR.ts b/vlcremote_fr_FR.ts
deleted file mode 100644 (file)
index 5204e2a..0000000
+++ /dev/null
@@ -1,433 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="fr_FR">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="aboutdialog.ui" line="14"/>
-        <source>Dialog</source>
-        <translation>À propos</translation>
-    </message>
-    <message>
-        <location filename="aboutdialog.ui" line="20"/>
-        <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;DejaVu Sans&apos;; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;table style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
-&lt;tr&gt;
-&lt;td style=&quot;border: none;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;OMed &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Application by Sacha schutz &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;istdasklar@gmail.com&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://omedsoft.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;DejaVu Sans&apos;; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;table style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
-&lt;tr&gt;
-&lt;td style=&quot;border: none;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;OMed &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Application par Sacha schutz &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;istdasklar@gmail.com&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://omedsoft.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-</context>
-<context>
-    <name>AccountDialog</name>
-    <message>
-        <location filename="accountdialog.ui" line="14"/>
-        <source>Accounts</source>
-        <translation>Comptes</translation>
-    </message>
-    <message>
-        <location filename="accountdialog.ui" line="21"/>
-        <source>test</source>
-        <translation>test</translation>
-    </message>
-    <message>
-        <location filename="accountdialog.ui" line="31"/>
-        <source>Add</source>
-        <translation>Ajouter</translation>
-    </message>
-    <message>
-        <location filename="accountdialog.ui" line="41"/>
-        <source>Edit</source>
-        <translation>Éditer</translation>
-    </message>
-    <message>
-        <location filename="accountdialog.ui" line="51"/>
-        <source>Remove</source>
-        <translation>Supprimer</translation>
-    </message>
-    <message>
-        <location filename="accountdialog.ui" line="77"/>
-        <source>Use</source>
-        <translation>Utiliser</translation>
-    </message>
-</context>
-<context>
-    <name>BrowseMainWindow</name>
-    <message>
-        <location filename="browsemainwindow.ui" line="14"/>
-        <source>MainWindow</source>
-        <translation>Vlc remote</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="27"/>
-        <source>Play</source>
-        <translation>Lire</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="34"/>
-        <source>Enqueue</source>
-        <translation>Ajouter</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="41"/>
-        <source>Browse</source>
-        <translation>Ouvrir</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="60"/>
-        <source>menu</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="71"/>
-        <source>User Folder</source>
-        <translation>Utiliser</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="76"/>
-        <source>Home</source>
-        <translation>Dossier d&apos;accueil</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="81"/>
-        <source>Set as Home</source>
-        <translation>Marquer comme dossier d&apos;accueil</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="86"/>
-        <source>Favourites</source>
-        <translation>Favoris</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.ui" line="91"/>
-        <source>Add to Favourite</source>
-        <translation>Ajouter aux favoris</translation>
-    </message>
-    <message>
-        <source>configuration</source>
-        <translation type="obsolete">Configuration</translation>
-    </message>
-    <message>
-        <source>About</source>
-        <translation type="obsolete">À propos</translation>
-    </message>
-    <message>
-        <location filename="browsemainwindow.cpp" line="311"/>
-        <source>Directory could not be browsed!</source>
-        <translation>Le dossier ne peux être listé !</translation>
-    </message>
-</context>
-<context>
-    <name>ConfigDialog</name>
-    <message>
-        <location filename="configdialog.ui" line="14"/>
-        <source>Dialog</source>
-        <translation>Configuration</translation>
-    </message>
-    <message>
-        <location filename="configdialog.ui" line="20"/>
-        <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;DejaVu Sans&apos;; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
-&lt;tr&gt;
-&lt;td style=&quot;border: none;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Enter IP of VLC server.  &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Example : &lt;span style=&quot; font-weight:600;&quot;&gt;192.168.0.8:8080&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Be sure  you have properly configured Vlc&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; and allows connection by adding this IP in /vlc/http/.hosts&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;More information on my blog : &lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;omed.blogspot.com&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;DejaVu Sans&apos;; font-size:14pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
-&lt;tr&gt;
-&lt;td style=&quot;border: none;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Mettre l&apos;ip du Serveur VLC.&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Exemple : &lt;span style=&quot; font-weight:600;&quot;&gt;192.168.0.8:8080&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Vous devez avoir configurer VLC correctement&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; et autoriser les connexions en ajoutant l&apos;ip de votre N900 dans /vlc/http/.hosts&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Plus d&apos;informations sur mon blog : &lt;a href=&quot;http://omedsoft.blogspot.com/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;omed.blogspot.com&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-</context>
-<context>
-    <name>FavouritesMainWindow</name>
-    <message>
-        <location filename="favouritesmainwindow.ui" line="14"/>
-        <source>MainWindow</source>
-        <translation>Vlc remote</translation>
-    </message>
-    <message>
-        <location filename="favouritesmainwindow.ui" line="26"/>
-        <source>Name</source>
-        <translation>Nom</translation>
-    </message>
-    <message>
-        <location filename="favouritesmainwindow.ui" line="36"/>
-        <source>Save</source>
-        <translation>Sauvegarder</translation>
-    </message>
-    <message>
-        <location filename="favouritesmainwindow.ui" line="47"/>
-        <source>Delete</source>
-        <translation>Supprimer</translation>
-    </message>
-    <message>
-        <location filename="favouritesmainwindow.ui" line="54"/>
-        <source>Edit</source>
-        <translation>Éditer</translation>
-    </message>
-    <message>
-        <location filename="favouritesmainwindow.ui" line="61"/>
-        <source>Browse</source>
-        <translation>Ouvrir</translation>
-    </message>
-    <message>
-        <location filename="favouritesmainwindow.ui" line="82"/>
-        <source>Set as Home</source>
-        <translation>Dossier d&apos;accueil</translation>
-    </message>
-</context>
-<context>
-    <name>NewAccountDialog</name>
-    <message>
-        <location filename="newaccountdialog.cpp" line="27"/>
-        <source>Add account</source>
-        <translation>Ajouter un compte</translation>
-    </message>
-    <message>
-        <location filename="newaccountdialog.cpp" line="44"/>
-        <source>Name:</source>
-        <translation>Nom : </translation>
-    </message>
-    <message>
-        <location filename="newaccountdialog.cpp" line="45"/>
-        <source>Ip:</source>
-        <translation>Ip : </translation>
-    </message>
-    <message>
-        <location filename="newaccountdialog.cpp" line="46"/>
-        <source>Port:</source>
-        <translation>Port : </translation>
-    </message>
-    <message>
-        <location filename="newaccountdialog.cpp" line="80"/>
-        <source>Edit account</source>
-        <translation>Édition d&apos;un compte</translation>
-    </message>
-</context>
-<context>
-    <name>PlayListMainWindow</name>
-    <message>
-        <source>MainWindow</source>
-        <translation type="obsolete">Vlc remote</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="14"/>
-        <source>Playlist</source>
-        <translation>Liste de lecture</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="22"/>
-        <location filename="playlistmainwindow.ui" line="27"/>
-        <location filename="playlistmainwindow.ui" line="32"/>
-        <source>not yet done</source>
-        <translation>fonctions pas encore développée</translation>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="obsolete">Vider</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="42"/>
-        <source>Play</source>
-        <translation>Lire</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="49"/>
-        <source>Shuffle</source>
-        <translation>Aléatoire</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="59"/>
-        <source>Loop</source>
-        <translation>Boucler</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="69"/>
-        <source>Repeat</source>
-        <translation>Répéter</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="96"/>
-        <source>Clear all</source>
-        <translation>Vider</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="103"/>
-        <source>Remove</source>
-        <translation>Supprimer</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="122"/>
-        <source>menu</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="129"/>
-        <source>Portrait Mode</source>
-        <translation>Mode Portrait</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.ui" line="134"/>
-        <source>Landscape Mode</source>
-        <translation>Mode Paysage</translation>
-    </message>
-    <message>
-        <source>configuration</source>
-        <translation type="obsolete">Configuration</translation>
-    </message>
-    <message>
-        <source>About</source>
-        <translation type="obsolete">À propos</translation>
-    </message>
-    <message>
-        <location filename="playlistmainwindow.cpp" line="172"/>
-        <source>Playlist could not be retrieved.</source>
-        <translation>Impossible de récupérer la liste de lecture.</translation>
-    </message>
-</context>
-<context>
-    <name>PlayerMainWindow</name>
-    <message>
-        <source>MainWindow</source>
-        <translation type="obsolete">Vlc remote</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="14"/>
-        <source>Vlc-Remote</source>
-        <translation>Vlc-Remote</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="50"/>
-        <location filename="playermainwindow.ui" line="66"/>
-        <location filename="playermainwindow.ui" line="82"/>
-        <source>Information</source>
-        <translation>Information</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="170"/>
-        <source>&lt;</source>
-        <translation>&lt;</translation>
-    </message>
-    <message>
-        <source>play</source>
-        <translation type="obsolete">Lire</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="184"/>
-        <source>&gt;</source>
-        <translation>&gt;</translation>
-    </message>
-    <message>
-        <source>Pause</source>
-        <translation type="obsolete">Pause</translation>
-    </message>
-    <message>
-        <source>play/pause</source>
-        <translation type="obsolete">Lire/Pause</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="191"/>
-        <source>Stop</source>
-        <translation>Stop</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="211"/>
-        <source>FS</source>
-        <translation>FS</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="231"/>
-        <source>V+</source>
-        <translation>V+</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="238"/>
-        <source>V-</source>
-        <translation>V-</translation>
-    </message>
-    <message>
-        <source>mute</source>
-        <translation type="obsolete">Couper le son</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="177"/>
-        <source>Play/Pause</source>
-        <translation>Lecture/Pause</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="245"/>
-        <source>Mute</source>
-        <translation>Couper le son</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="256"/>
-        <source>PlayList</source>
-        <translation>Liste de lecture</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="263"/>
-        <source>Browse</source>
-        <translation>Ouvrir</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="282"/>
-        <source>menu</source>
-        <translation></translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="294"/>
-        <source>Configuration</source>
-        <translation>Configuration</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="299"/>
-        <source>About</source>
-        <translation>À propos</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="304"/>
-        <source>Portrait Mode</source>
-        <translation>Mode Portrait</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="309"/>
-        <source>Landscape Mode</source>
-        <translation>Mode Paysage</translation>
-    </message>
-    <message>
-        <location filename="playermainwindow.ui" line="314"/>
-        <source>Auto Rotate</source>
-        <translation>À propos de l&apos;orientation</translation>
-    </message>
-</context>
-</TS>
diff --git a/vlcstatus.cpp b/vlcstatus.cpp
deleted file mode 100644 (file)
index 0857f0b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*   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 "vlcstatus.h"
diff --git a/vlcstatus.h b/vlcstatus.h
deleted file mode 100644 (file)
index 738780a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*   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 VLCSTATUS_H
-#define VLCSTATUS_H
-#include <QString>
-
-enum VlcStatusState {
-    UNKNOWN,
-    STOP,
-    PLAYING,
-    PAUSED
-};
-
-struct VlcStatus {
-    bool newtrack;
-    bool random;
-    bool loop;
-    bool repeat;
-    bool hasart;
-    int volume;
-    int length;
-    int time;
-    int position;
-    VlcStatusState state;
-    QString title;
-    QString artist;
-    QString album;
-    QString nowplaying;
-};
-
-#endif // VLCSTATUS_H
diff --git a/welcome b/welcome
deleted file mode 100644 (file)
index e69de29..0000000
index d1ce30c..8281167 100644 (file)
             <p>Les procèdures sont similaires suivant votre système d'exploitation ( Windows/Linux/Mac OS)</p>
             <p>Nous considèrons ici que vous avez déjà installé VLC sur votre ordinateur</p>
             <h4>Linux</h4>
-            <ol>
+            <ol class="instructions">
                 <li>Démarrez VLC</li>
                 <li>Cliquez sur le menu <em>Outils</em></li>
                 <li>Cliquez sur <em>Préférences</em>, vous avez une fenêtre similaire à celle ci :
-                    <img width="90%" src="images/screenshots/vlc-linux-preferences-simple.jpeg" alt="VLC - Outils -Préférences" /></li>
+                    <img src="images/screenshots/vlc-linux-preferences-simple.jpeg" alt="VLC - Outils -Préférences" /></li>
                 <li>Cliquez sur <em>Tous</em> en bas à gauche de la fenêtre,
                     la colonne de gauche contient maintenant une arboressence de menu
                 </li>
-                <li>Double cliquez sur <em>Interface</em>, puis sur <em>Interfaces Principales</em>
-                <img width="90%" src="images/screenshots/vlc-linux-interfaces-principales-http-checked.jpeg" alt="VLC - Outils -Préférences - Interfaces principales http" /></li></li>
-
+                <li>Double cliquez sur <em>Interface</em>, puis sur <em>Interfaces Principales</em>.<br />
+                    Cocher la case <em>Interface de commande à distance HTTP</em>.
+                    <img src="images/screenshots/vlc-linux-interfaces-principales-http-checked.jpeg" alt="VLC - Outils -Préférences - Interfaces principales http" /></li>
+                <li>
+                    Dans l'arborescence à gauche cliquez sur <em>HTTP</em> en dessous d'<em>Interfaces principales</em>.<br />
+                    Cochez la case <em>Exporter la jaquette vers &laquo; /art &raquo;</em><br />
+                    Cliquez sur Enregistrer pour valider les paramètres et fermer la fenêtre, puis redémarez VLC.
+                    <img src="images/screenshots/vlc-linux-interfaces-principales-http-art.jpeg" alt="VLC - Outils -Préférences - Interfaces principales http - art" />
+                </li>
             </ol>
             <h4>Windows</h4>
             <h4>Mac OS</h4>
+
+            
             <h3>Configurer Vlc-remote sur votre mobile</h3>
             <p>Lorsque vous démarez l'application la fenêtre de gestion de compte apparait.<br/>
                 Elle vous permet d'enregistrer plusieurs machines, ainsi vous pouvez facilement accèder
             </p>
 
             <h4>Gestionnaire de compte</h4>
-
             <img src="" alt="Copite d'écran du gestionnaire de compte" />
-
-            <ol>
+            <ol class="instructions">
                 <li><strong>Ajouter</strong>
                     <p>Un compte contient les éléments suivants : </p>
                     <ol>
                 </li>
             </ol>
 
+            <h3>Utiliser</h3>
+            <p>L'affichage principale permet de controler la vidéo en cours
+                de lecture, de consulter la playlist et de naviguer dans les
+                repertoires de l'ordinateur sur leque Vlc est en cours d'éxecution.
+            </p>
             <p><a href="#menu">Retour menu</a></p>
 
             <h2 id="licence">4. Licence</h2>
index 8886fd8..9c41fe6 100644 (file)
@@ -117,4 +117,8 @@ a:hover {
        text-decoration: underline;\r
 }\r
 \r
-p { margin-left: 1em; }
\ No newline at end of file
+p { margin-left: 1em; }\r
+\r
+.instructions img{\r
+    width: 90%;\r
+}
\ No newline at end of file