summaryrefslogtreecommitdiff
path: root/qt-recordmydesktop/src
diff options
context:
space:
mode:
Diffstat (limited to 'qt-recordmydesktop/src')
-rw-r--r--qt-recordmydesktop/src/Makefile.am40
-rw-r--r--qt-recordmydesktop/src/__init__.py4
-rw-r--r--qt-recordmydesktop/src/media-playback-pause.svg283
-rw-r--r--qt-recordmydesktop/src/media-playback-stop.svg267
-rw-r--r--qt-recordmydesktop/src/media-record.svg261
-rw-r--r--qt-recordmydesktop/src/qt-recordMyDesktop.in50
-rw-r--r--qt-recordmydesktop/src/qt-recordmydesktop.desktop12
-rw-r--r--qt-recordmydesktop/src/qt-recordmydesktop.pngbin4623 -> 0 bytes
-rw-r--r--qt-recordmydesktop/src/qt-recordmydesktop.svg102
-rw-r--r--qt-recordmydesktop/src/rmdConfig.py.in38
-rw-r--r--qt-recordmydesktop/src/rmdFrame.py120
-rw-r--r--qt-recordmydesktop/src/rmdMonitor.py120
-rw-r--r--qt-recordmydesktop/src/rmdPrefsWidget.py395
-rw-r--r--qt-recordmydesktop/src/rmdSelect.py83
-rw-r--r--qt-recordmydesktop/src/rmdSelectThumb.py168
-rw-r--r--qt-recordmydesktop/src/rmdSimple.py497
-rw-r--r--qt-recordmydesktop/src/rmdStrings.py137
-rw-r--r--qt-recordmydesktop/src/rmdTrayIcon.py349
-rw-r--r--qt-recordmydesktop/src/rmdTrayPopup.py70
19 files changed, 0 insertions, 2996 deletions
diff --git a/qt-recordmydesktop/src/Makefile.am b/qt-recordmydesktop/src/Makefile.am
deleted file mode 100644
index d94f4e3..0000000
--- a/qt-recordmydesktop/src/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-
-bin_SCRIPTS=qt-recordMyDesktop
-
-qt_recordMyDesktopdir=$(pythondir)/qt_recordMyDesktop
-
-qt_recordMyDesktop_PYTHON = \
- rmdSelect.py\
- rmdTrayIcon.py\
- rmdSelectThumb.py\
- rmdTrayPopup.py\
- rmdPrefsWidget.py\
- rmdSimple.py\
- rmdConfig.py\
- rmdMonitor.py\
- rmdFrame.py\
- rmdStrings.py\
- __init__.py
-
-desktopdir = $(datadir)/applications
-
-desktop_DATA =qt-recordmydesktop.desktop
-
-pixmapdir = $(datadir)/pixmaps
-pixmap_DATA = qt-recordmydesktop.png\
- media-playback-pause.svg\
- media-playback-stop.svg\
- media-record.svg
-
-
-
-EXTRA_DIST= qt-recordMyDesktop.in\
- qt-recordmydesktop.desktop\
- qt-recordmydesktop.png\
- qt-recordmydesktop.svg\
- media-playback-pause.svg\
- media-playback-stop.svg\
- media-record.svg
-
-clean-local:
- rm -rf *.pyc *.pyo
diff --git a/qt-recordmydesktop/src/__init__.py b/qt-recordmydesktop/src/__init__.py
deleted file mode 100644
index 7262f15..0000000
--- a/qt-recordmydesktop/src/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-#
-#
-
diff --git a/qt-recordmydesktop/src/media-playback-pause.svg b/qt-recordmydesktop/src/media-playback-pause.svg
deleted file mode 100644
index e255387..0000000
--- a/qt-recordmydesktop/src/media-playback-pause.svg
+++ /dev/null
@@ -1,283 +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://web.resource.org/cc/"
- 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="128"
- height="128"
- id="svg3186"
- sodipodi:version="0.32"
- inkscape:version="0.45"
- version="1.0"
- sodipodi:docname="player_stop.svg"
- sodipodi:docbase="/home/david/Progetti/sandbox"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- sodipodi:modified="true">
- <defs
- id="defs3188">
- <radialGradient
- inkscape:collect="always"
- xlink:href="#radialGradient3163"
- id="radialGradient5074"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.263109,4.7377213e-8,-1.5110247e-8,0.7519296,26.861176,12.61245)"
- cx="80.342453"
- cy="68.340897"
- r="40.0294"
- fx="80.342453"
- fy="68.340897" />
- <radialGradient
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
- r="40.0294"
- cy="59.1865"
- cx="53.1978"
- id="radialGradient3163">
- <stop
- id="stop3165"
- style="stop-color:#000000;stop-opacity:1;"
- offset="0" />
- <stop
- id="stop3175"
- style="stop-color:#666666;stop-opacity:1;"
- offset="1" />
- </radialGradient>
- <linearGradient
- id="XMLID_9_"
- gradientUnits="userSpaceOnUse"
- x1="11.9487"
- y1="34"
- x2="104.0518"
- y2="34"
- gradientTransform="translate(559.14286,-264.28571)">
- <stop
- offset="0"
- style="stop-color:#FFFFFF"
- id="stop56" />
- <stop
- offset="0.80000001"
- style="stop-color:#ffffff;stop-opacity:0;"
- id="stop58" />
- </linearGradient>
- <radialGradient
- id="XMLID_8_"
- cx="53.1978"
- cy="59.1865"
- r="40.0294"
- gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
- gradientUnits="userSpaceOnUse">
- <stop
- offset="0"
- style="stop-color:#323232"
- id="stop41" />
- <stop
- offset="0.2083"
- style="stop-color:#363636"
- id="stop43" />
- <stop
- offset="0.4278"
- style="stop-color:#434343"
- id="stop45" />
- <stop
- offset="0.6526"
- style="stop-color:#585858"
- id="stop47" />
- <stop
- offset="0.8796"
- style="stop-color:#757575"
- id="stop49" />
- <stop
- offset="1"
- style="stop-color:#888888"
- id="stop51" />
- </radialGradient>
- <radialGradient
- id="XMLID_7_"
- cx="58"
- cy="58"
- r="48"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(559.14286,-264.28571)">
- <stop
- offset="0"
- style="stop-color:#FFFFFF"
- id="stop26" />
- <stop
- offset="0.574"
- style="stop-color:#FFFFFF"
- id="stop28" />
- <stop
- offset="0.6842"
- style="stop-color:#FBFBFB"
- id="stop30" />
- <stop
- offset="0.8001"
- style="stop-color:#EEEEEE"
- id="stop32" />
- <stop
- offset="0.9"
- style="stop-color:#DDDDDD"
- id="stop34" />
- <stop
- offset="1"
- style="stop-color:#BBBBBB"
- id="stop36" />
- </radialGradient>
- <filter
- id="AI_Sfocatura_4">
- <feGaussianBlur
- stdDeviation="4"
- id="feGaussianBlur6" />
- </filter>
- <linearGradient
- id="XMLID_6_"
- gradientUnits="userSpaceOnUse"
- x1="58.0005"
- y1="116"
- x2="58.0005"
- y2="4.882812e-04">
- <stop
- offset="0"
- style="stop-color:#555555"
- id="stop9" />
- <stop
- offset="0.2736"
- style="stop-color:#595959"
- id="stop11" />
- <stop
- offset="0.562"
- style="stop-color:#666666"
- id="stop13" />
- <stop
- offset="0.8561"
- style="stop-color:#7B7B7B"
- id="stop15" />
- <stop
- offset="1"
- style="stop-color:#888888"
- id="stop17" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#XMLID_9_"
- id="linearGradient3242"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6.0000006,6.0000006)"
- x1="11.9487"
- y1="34"
- x2="104.0518"
- y2="34" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#XMLID_7_"
- id="radialGradient3246"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0833333,0,0,1.0833333,1.1666673,1.1666673)"
- cx="58"
- cy="58"
- r="48" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#XMLID_6_"
- id="linearGradient3251"
- gradientUnits="userSpaceOnUse"
- x1="58.0005"
- y1="116"
- x2="58.0005"
- y2="4.882812e-04" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#radialGradient3163"
- id="radialGradient2197"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.263109,4.7377213e-8,-1.5110247e-8,0.7519296,58.861176,12.61245)"
- cx="80.342453"
- cy="68.340897"
- fx="80.342453"
- fy="68.340897"
- r="40.0294" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="4"
- inkscape:cx="62"
- inkscape:cy="56.281828"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- width="128px"
- height="128px"
- showgrid="true"
- gridspacingx="8px"
- gridspacingy="8px"
- inkscape:window-width="792"
- inkscape:window-height="581"
- inkscape:window-x="225"
- inkscape:window-y="112" />
- <metadata
- id="metadata3191">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <circle
- cx="58"
- cy="58"
- r="58"
- id="circle19"
- style="fill:url(#linearGradient3251)"
- sodipodi:cx="58"
- sodipodi:cy="58"
- sodipodi:rx="58"
- sodipodi:ry="58"
- transform="matrix(1.1034483,0,0,1.1034483,0,-2.8e-6)" />
- <g
- id="g21"
- transform="matrix(1.0833333,0,0,1.0833333,1.1666686,1.1666686)"
- style="filter:url(#AI_Sfocatura_4);opacity:0.8">
- <path
- d="M 10,58 C 10,84.467 31.533,106 58,106 C 84.467,106 106,84.467 106,58 C 106,31.533 84.467,10 58,10 C 31.533,10 10,31.533 10,58 z "
- id="path23" />
- </g>
- <path
- d="M 12,63.999999 C 12,92.672581 35.327414,116 63.999998,116 C 92.672584,116 116,92.672581 116,63.999999 C 116,35.327415 92.672584,12 63.999998,12 C 35.327414,12 12,35.327415 12,63.999999 z "
- id="path38"
- style="fill:url(#radialGradient3246)" />
- <path
- style="fill:url(#radialGradient5074);fill-opacity:1"
- d="M 40,40 L 56,40.38871 L 55.989472,87.95798 L 40.101777,88 L 40,40 z "
- id="path2618"
- sodipodi:nodetypes="ccccc" />
- <path
- sodipodi:nodetypes="ccccc"
- id="path2195"
- d="M 72,40 L 88,40.38871 L 87.989472,87.95798 L 72.101777,88 L 72,40 z "
- style="fill:url(#radialGradient2197);fill-opacity:1" />
- <path
- d="M 63.999998,63.999999 C 81.788999,63.999999 97.967006,58.87 110.05199,50.491 C 104.19999,30.582 85.775999,16 63.999998,16 C 42.222999,16 23.798999,30.582999 17.949,50.491 C 30.032,58.87 46.209999,63.999999 63.999998,63.999999 z "
- id="path60"
- style="opacity:0.5;fill:url(#linearGradient3242)" />
- </g>
-</svg>
diff --git a/qt-recordmydesktop/src/media-playback-stop.svg b/qt-recordmydesktop/src/media-playback-stop.svg
deleted file mode 100644
index 2019ccb..0000000
--- a/qt-recordmydesktop/src/media-playback-stop.svg
+++ /dev/null
@@ -1,267 +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://web.resource.org/cc/"
- 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="128"
- height="128"
- id="svg3186"
- sodipodi:version="0.32"
- inkscape:version="0.45"
- version="1.0"
- sodipodi:docname="player_stop.svg"
- sodipodi:docbase="/home/david/Progetti/sandbox"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- sodipodi:modified="true">
- <defs
- id="defs3188">
- <radialGradient
- inkscape:collect="always"
- xlink:href="#radialGradient3163"
- id="radialGradient5074"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.7893271,4.7377213e-8,-4.5330742e-8,0.7519296,0.583528,12.61245)"
- cx="80.342453"
- cy="68.340897"
- r="40.0294"
- fx="80.342453"
- fy="68.340897" />
- <radialGradient
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
- r="40.0294"
- cy="59.1865"
- cx="53.1978"
- id="radialGradient3163">
- <stop
- id="stop3165"
- style="stop-color:#000000;stop-opacity:1;"
- offset="0" />
- <stop
- id="stop3175"
- style="stop-color:#666666;stop-opacity:1;"
- offset="1" />
- </radialGradient>
- <linearGradient
- id="XMLID_9_"
- gradientUnits="userSpaceOnUse"
- x1="11.9487"
- y1="34"
- x2="104.0518"
- y2="34"
- gradientTransform="translate(559.14286,-264.28571)">
- <stop
- offset="0"
- style="stop-color:#FFFFFF"
- id="stop56" />
- <stop
- offset="0.80000001"
- style="stop-color:#ffffff;stop-opacity:0;"
- id="stop58" />
- </linearGradient>
- <radialGradient
- id="XMLID_8_"
- cx="53.1978"
- cy="59.1865"
- r="40.0294"
- gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
- gradientUnits="userSpaceOnUse">
- <stop
- offset="0"
- style="stop-color:#323232"
- id="stop41" />
- <stop
- offset="0.2083"
- style="stop-color:#363636"
- id="stop43" />
- <stop
- offset="0.4278"
- style="stop-color:#434343"
- id="stop45" />
- <stop
- offset="0.6526"
- style="stop-color:#585858"
- id="stop47" />
- <stop
- offset="0.8796"
- style="stop-color:#757575"
- id="stop49" />
- <stop
- offset="1"
- style="stop-color:#888888"
- id="stop51" />
- </radialGradient>
- <radialGradient
- id="XMLID_7_"
- cx="58"
- cy="58"
- r="48"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(559.14286,-264.28571)">
- <stop
- offset="0"
- style="stop-color:#FFFFFF"
- id="stop26" />
- <stop
- offset="0.574"
- style="stop-color:#FFFFFF"
- id="stop28" />
- <stop
- offset="0.6842"
- style="stop-color:#FBFBFB"
- id="stop30" />
- <stop
- offset="0.8001"
- style="stop-color:#EEEEEE"
- id="stop32" />
- <stop
- offset="0.9"
- style="stop-color:#DDDDDD"
- id="stop34" />
- <stop
- offset="1"
- style="stop-color:#BBBBBB"
- id="stop36" />
- </radialGradient>
- <filter
- id="AI_Sfocatura_4">
- <feGaussianBlur
- stdDeviation="4"
- id="feGaussianBlur6" />
- </filter>
- <linearGradient
- id="XMLID_6_"
- gradientUnits="userSpaceOnUse"
- x1="58.0005"
- y1="116"
- x2="58.0005"
- y2="4.882812e-04">
- <stop
- offset="0"
- style="stop-color:#555555"
- id="stop9" />
- <stop
- offset="0.2736"
- style="stop-color:#595959"
- id="stop11" />
- <stop
- offset="0.562"
- style="stop-color:#666666"
- id="stop13" />
- <stop
- offset="0.8561"
- style="stop-color:#7B7B7B"
- id="stop15" />
- <stop
- offset="1"
- style="stop-color:#888888"
- id="stop17" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#XMLID_9_"
- id="linearGradient3242"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6.0000006,6.0000006)"
- x1="11.9487"
- y1="34"
- x2="104.0518"
- y2="34" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#XMLID_7_"
- id="radialGradient3246"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0833333,0,0,1.0833333,1.1666673,1.1666673)"
- cx="58"
- cy="58"
- r="48" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#XMLID_6_"
- id="linearGradient3251"
- gradientUnits="userSpaceOnUse"
- x1="58.0005"
- y1="116"
- x2="58.0005"
- y2="4.882812e-04" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="4"
- inkscape:cx="62"
- inkscape:cy="56.281828"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- width="128px"
- height="128px"
- showgrid="true"
- gridspacingx="8px"
- gridspacingy="8px"
- inkscape:window-width="792"
- inkscape:window-height="581"
- inkscape:window-x="225"
- inkscape:window-y="112" />
- <metadata
- id="metadata3191">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <circle
- cx="58"
- cy="58"
- r="58"
- id="circle19"
- style="fill:url(#linearGradient3251)"
- sodipodi:cx="58"
- sodipodi:cy="58"
- sodipodi:rx="58"
- sodipodi:ry="58"
- transform="matrix(1.1034483,0,0,1.1034483,0,-2.8e-6)" />
- <g
- id="g21"
- transform="matrix(1.0833333,0,0,1.0833333,1.1666686,1.1666686)"
- style="filter:url(#AI_Sfocatura_4);opacity:0.8">
- <path
- d="M 10,58 C 10,84.467 31.533,106 58,106 C 84.467,106 106,84.467 106,58 C 106,31.533 84.467,10 58,10 C 31.533,10 10,31.533 10,58 z "
- id="path23" />
- </g>
- <path
- d="M 12,63.999999 C 12,92.672581 35.327414,116 63.999998,116 C 92.672584,116 116,92.672581 116,63.999999 C 116,35.327415 92.672584,12 63.999998,12 C 35.327414,12 12,35.327415 12,63.999999 z "
- id="path38"
- style="fill:url(#radialGradient3246)" />
- <path
- style="fill:url(#radialGradient5074);fill-opacity:1.0"
- d="M 40,40 L 88,40.38871 L 87.968415,87.95798 L 40.30533,88 L 40,40 z "
- id="path2618"
- sodipodi:nodetypes="ccccc" />
- <path
- d="M 63.999998,63.999999 C 81.788999,63.999999 97.967006,58.87 110.05199,50.491 C 104.19999,30.582 85.775999,16 63.999998,16 C 42.222999,16 23.798999,30.582999 17.949,50.491 C 30.032,58.87 46.209999,63.999999 63.999998,63.999999 z "
- id="path60"
- style="opacity:0.5;fill:url(#linearGradient3242)" />
- </g>
-</svg>
diff --git a/qt-recordmydesktop/src/media-record.svg b/qt-recordmydesktop/src/media-record.svg
deleted file mode 100644
index afe5368..0000000
--- a/qt-recordmydesktop/src/media-record.svg
+++ /dev/null
@@ -1,261 +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://web.resource.org/cc/"
- 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="128"
- height="128"
- id="svg3186"
- sodipodi:version="0.32"
- inkscape:version="0.45"
- version="1.0"
- sodipodi:docname="player_stop.svg"
- sodipodi:docbase="/home/david/Progetti/sandbox"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- sodipodi:modified="true">
- <defs
- id="defs3188">
- <radialGradient
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
- r="40.0294"
- cy="59.1865"
- cx="53.1978"
- id="radialGradient3163">
- <stop
- id="stop3165"
- style="stop-color:#f40000;stop-opacity:0.94117647;"
- offset="0" />
- <stop
- id="stop3175"
- style="stop-color:#cb0006;stop-opacity:1;"
- offset="1" />
- </radialGradient>
- <linearGradient
- id="XMLID_9_"
- gradientUnits="userSpaceOnUse"
- x1="11.9487"
- y1="34"
- x2="104.0518"
- y2="34"
- gradientTransform="translate(559.14286,-264.28571)">
- <stop
- offset="0"
- style="stop-color:#FFFFFF"
- id="stop56" />
- <stop
- offset="0.80000001"
- style="stop-color:#ffffff;stop-opacity:0;"
- id="stop58" />
- </linearGradient>
- <radialGradient
- id="XMLID_8_"
- cx="53.1978"
- cy="59.1865"
- r="40.0294"
- gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
- gradientUnits="userSpaceOnUse">
- <stop
- offset="0"
- style="stop-color:#323232"
- id="stop41" />
- <stop
- offset="0.2083"
- style="stop-color:#363636"
- id="stop43" />
- <stop
- offset="0.4278"
- style="stop-color:#434343"
- id="stop45" />
- <stop
- offset="0.6526"
- style="stop-color:#585858"
- id="stop47" />
- <stop
- offset="0.8796"
- style="stop-color:#757575"
- id="stop49" />
- <stop
- offset="1"
- style="stop-color:#888888"
- id="stop51" />
- </radialGradient>
- <radialGradient
- id="XMLID_7_"
- cx="58"
- cy="58"
- r="48"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(559.14286,-264.28571)">
- <stop
- offset="0"
- style="stop-color:#FFFFFF"
- id="stop26" />
- <stop
- offset="0.574"
- style="stop-color:#FFFFFF"
- id="stop28" />
- <stop
- offset="0.6842"
- style="stop-color:#FBFBFB"
- id="stop30" />
- <stop
- offset="0.8001"
- style="stop-color:#EEEEEE"
- id="stop32" />
- <stop
- offset="0.9"
- style="stop-color:#DDDDDD"
- id="stop34" />
- <stop
- offset="1"
- style="stop-color:#BBBBBB"
- id="stop36" />
- </radialGradient>
- <filter
- id="AI_Sfocatura_4">
- <feGaussianBlur
- stdDeviation="4"
- id="feGaussianBlur6" />
- </filter>
- <linearGradient
- id="XMLID_6_"
- gradientUnits="userSpaceOnUse"
- x1="58.0005"
- y1="116"
- x2="58.0005"
- y2="4.882812e-04">
- <stop
- offset="0"
- style="stop-color:#555555"
- id="stop9" />
- <stop
- offset="1"
- style="stop-color:#888888"
- id="stop17" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#XMLID_9_"
- id="linearGradient3242"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(6.0000006,6.0000006)"
- x1="11.9487"
- y1="34"
- x2="104.0518"
- y2="34" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#XMLID_7_"
- id="radialGradient3246"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.0833333,0,0,1.0833333,1.1666673,1.1666673)"
- cx="58"
- cy="58"
- r="48" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#XMLID_6_"
- id="linearGradient3251"
- gradientUnits="userSpaceOnUse"
- x1="58.0005"
- y1="116"
- x2="58.0005"
- y2="4.882812e-04" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#radialGradient3163"
- id="radialGradient4148"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.9948454,0,0.3292526)"
- cx="63.75"
- cy="63.875"
- fx="63.75"
- fy="63.875"
- r="24.25"
- spreadMethod="pad" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- gridtolerance="10000"
- guidetolerance="10"
- objecttolerance="10"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="5.6568542"
- inkscape:cx="62"
- inkscape:cy="56.281828"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- width="128px"
- height="128px"
- showgrid="true"
- gridspacingx="8px"
- gridspacingy="8px"
- inkscape:window-width="792"
- inkscape:window-height="581"
- inkscape:window-x="225"
- inkscape:window-y="112" />
- <metadata
- id="metadata3191">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <circle
- cx="58"
- cy="58"
- r="58"
- id="circle19"
- style="fill:url(#linearGradient3251)"
- sodipodi:cx="58"
- sodipodi:cy="58"
- sodipodi:rx="58"
- sodipodi:ry="58"
- transform="matrix(1.1034483,0,0,1.1034483,0,-2.8e-6)" />
- <g
- id="g21"
- transform="matrix(1.0833333,0,0,1.0833333,1.1666686,1.1666686)"
- style="filter:url(#AI_Sfocatura_4);opacity:0.8">
- <path
- d="M 10,58 C 10,84.467 31.533,106 58,106 C 84.467,106 106,84.467 106,58 C 106,31.533 84.467,10 58,10 C 31.533,10 10,31.533 10,58 z "
- id="path23" />
- </g>
- <path
- d="M 12,63.999999 C 12,92.672581 35.327414,116 63.999998,116 C 92.672584,116 116,92.672581 116,63.999999 C 116,35.327415 92.672584,12 63.999998,12 C 35.327414,12 12,35.327415 12,63.999999 z "
- id="path38"
- style="fill:url(#radialGradient3246)" />
- <path
- sodipodi:type="arc"
- style="opacity:1;fill:url(#radialGradient4148);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path2195"
- sodipodi:cx="63.75"
- sodipodi:cy="63.875"
- sodipodi:rx="24.25"
- sodipodi:ry="24.125"
- d="M 88 63.875 A 24.25 24.125 0 1 1 39.5,63.875 A 24.25 24.125 0 1 1 88 63.875 z"
- transform="matrix(0.9896907,0,0,0.9948187,0.9072173,0.4559585)" />
- <path
- d="M 63.999998,63.999999 C 81.788999,63.999999 97.967006,58.87 110.05199,50.491 C 104.19999,30.582 85.775999,16 63.999998,16 C 42.222999,16 23.798999,30.582999 17.949,50.491 C 30.032,58.87 46.209999,63.999999 63.999998,63.999999 z "
- id="path60"
- style="opacity:0.5;fill:url(#linearGradient3242)" />
- </g>
-</svg>
diff --git a/qt-recordmydesktop/src/qt-recordMyDesktop.in b/qt-recordmydesktop/src/qt-recordMyDesktop.in
deleted file mode 100644
index 1a0823d..0000000
--- a/qt-recordmydesktop/src/qt-recordMyDesktop.in
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/python
-
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-from PyQt4 import QtGui,QtCore
-import sys
-
-#this is the installation direcotry,
-#which is determined during configuration
-#default /usr/local/lib/python<version>/site-packages
-PYTHONDIR='@PYTHONDIR@'
-sys.path.append(PYTHONDIR)
-from qt_recordMyDesktop import rmdSimple
-
-def main():
- app=QtGui.QApplication(sys.argv)
- app.setQuitOnLastWindowClosed(False)
- tr=rmdSimple.simpleWidget()
- app.exec_()
-
-main()
-
-
-
-
-
-
-
diff --git a/qt-recordmydesktop/src/qt-recordmydesktop.desktop b/qt-recordmydesktop/src/qt-recordmydesktop.desktop
deleted file mode 100644
index 03adf88..0000000
--- a/qt-recordmydesktop/src/qt-recordmydesktop.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Encoding=UTF-8
-Name=qt-recordMyDesktop
-Comment=Frontend for recordMyDesktop
-Comment[fr]=Interface pour recordmydesktop
-Exec=qt-recordMyDesktop
-Terminal=false
-Type=Application
-Icon=qt-recordmydesktop.png
-Categories=AudioVideo;Recorder;
-StartupNotify=false
diff --git a/qt-recordmydesktop/src/qt-recordmydesktop.png b/qt-recordmydesktop/src/qt-recordmydesktop.png
deleted file mode 100644
index be5e71c..0000000
--- a/qt-recordmydesktop/src/qt-recordmydesktop.png
+++ /dev/null
Binary files differ
diff --git a/qt-recordmydesktop/src/qt-recordmydesktop.svg b/qt-recordmydesktop/src/qt-recordmydesktop.svg
deleted file mode 100644
index 7f65eae..0000000
--- a/qt-recordmydesktop/src/qt-recordmydesktop.svg
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- 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"
- version="1.0"
- width="468pt"
- height="468pt"
- viewBox="0 0 468 468"
- preserveAspectRatio="xMidYMid meet"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.44.1"
- sodipodi:docname="qt-recordmydesktop.svg"
- sodipodi:docbase="/home/iovar/workspace/recordMyDesktop/qt-recordmydesktop/src"
- inkscape:export-filename="/home/iovar/workspace/recordMyDesktop/qt-recordmydesktop/src/qt-recordmydesktop.png"
- inkscape:export-xdpi="9.8500004"
- inkscape:export-ydpi="9.8500004">
- <defs
- id="defs13">
- <linearGradient
- id="linearGradient2764">
- <stop
- style="stop-color:#32000c;stop-opacity:1;"
- offset="0"
- id="stop2776" />
- <stop
- id="stop2769"
- offset="0.54000002"
- style="stop-color:#4579e8;stop-opacity:1;" />
- <stop
- style="stop-color:#292681;stop-opacity:1;"
- offset="1"
- id="stop2768" />
- </linearGradient>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient2764"
- id="radialGradient2770"
- cx="330.83143"
- cy="238.79865"
- fx="330.83143"
- fy="238.79865"
- r="61.69674"
- gradientTransform="matrix(1,0,0,0.988932,0,2.643133)"
- gradientUnits="userSpaceOnUse" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient2764"
- id="radialGradient2772"
- cx="233.28449"
- cy="256.5222"
- fx="233.28449"
- fy="256.5222"
- r="222.42589"
- gradientTransform="matrix(1,0,0,0.950779,0,12.62635)"
- gradientUnits="userSpaceOnUse" />
- </defs>
- <sodipodi:namedview
- inkscape:window-height="583"
- inkscape:window-width="931"
- inkscape:pageshadow="2"
- inkscape:pageopacity="0.0"
- guidetolerance="10.0"
- gridtolerance="10.0"
- objecttolerance="10.0"
- borderopacity="1.0"
- bordercolor="#666666"
- pagecolor="#ffffff"
- id="base"
- inkscape:zoom="0.64786325"
- inkscape:cx="292.5"
- inkscape:cy="290.18469"
- inkscape:window-x="0"
- inkscape:window-y="25"
- inkscape:current-layer="svg2" />
- <metadata
- id="metadata4">
-Created by potrace 1.7, written by Peter Selinger 2001-2005
-<rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
-</rdf:RDF>
-</metadata>
- <path
- style="fill:url(#radialGradient2772);stroke:none;fill-opacity:1.0"
- id="path8"
- d="M 124.3125,64.35 C -4.3875,121.3875 -29.25,270.5625 78.975,340.7625 C 127.2375,372.9375 127.2375,389.025 80.4375,400.725 C -11.7,424.125 86.2875,468 231.075,468 C 333.45,468 418.275,444.6 429.975,413.8875 C 434.3625,403.65 429.975,394.875 419.7375,394.875 C 368.55,393.4125 364.1625,368.55 408.0375,324.675 C 495.7875,238.3875 457.7625,106.7625 331.9875,59.9625 C 276.4125,38.025 178.425,40.95 124.3125,64.35 z M 381.7125,111.15 C 466.5375,153.5625 457.7625,289.575 370.0125,323.2125 C 282.2625,356.85 225.225,310.05 232.5375,212.0625 L 235.4625,168.1875 L 191.5875,219.375 C 152.1,267.6375 147.7125,269.1 111.15,250.0875 C 59.9625,222.3 62.8875,195.975 124.3125,137.475 C 194.5125,71.6625 286.65,61.425 381.7125,111.15 z M 383.175,429.975 C 345.15,451.9125 137.475,460.6875 125.775,440.2125 C 118.4625,428.5125 143.325,424.125 207.675,424.125 C 263.25,422.6625 310.05,415.35 327.6,402.1875 C 348.075,386.1 359.775,386.1 381.7125,399.2625 C 406.575,415.35 406.575,416.8125 383.175,429.975 z " />
- <path
- style="fill:url(#radialGradient2770);stroke:none;fill-opacity:1.0"
- id="path10"
- d="M 277.875,195.975 C 261.7875,216.45 266.175,219.375 305.6625,219.375 C 348.075,219.375 351,222.3 342.225,258.8625 L 331.9875,299.8125 L 364.1625,272.025 C 409.5,231.075 399.2625,184.275 342.225,178.425 C 314.4375,175.5 289.575,182.8125 277.875,195.975 z " />
-</svg>
diff --git a/qt-recordmydesktop/src/rmdConfig.py.in b/qt-recordmydesktop/src/rmdConfig.py.in
deleted file mode 100644
index bb046c9..0000000
--- a/qt-recordmydesktop/src/rmdConfig.py.in
+++ /dev/null
@@ -1,38 +0,0 @@
-import os
-VERSION='@VERSION@'
-PREFIX='@PREFIX@'
-pixmapdir=os.path.join('@DATADIR@'.replace("${prefix}",PREFIX), 'pixmaps')
-locale_install_dir=os.path.join('@DATADIR@'.replace("${prefix}",PREFIX), 'locale')
-
-#binary values expressed with 1 and zero instead of True and False
-#are upside down. That means 0 is enabled and 1 disabled
-
-default_values=[15, #framerate
- 0, #cursor
- True, #sound
- 1, #full shots,0 on 1 off
- os.path.join(os.getenv('HOME'),'out.ogv'), #filename
- [-1,-1,-1,-1], #recording area(<0 means auto)
- 0, #delay ,unused on 0.3
- 1, #no of channels
- 22050, #frequency
- 'DEFAULT', #device
- 63, #video quality
- 10, #audio quality
- "$DISPLAY", #display, this is not interpreted as an env variable
- #but when the value is set to this the argument is omitted
- 0, #shared memory,0 on 1 off
- 0, #reset recording area ,0 on 1 off
- 1, #follow mouse,0 on 1 off
- 1, #quick subsampling,0 on 1 off
- "/tmp", #working directory
- 1, #on the fly encoding,0 on 1 off
- 0, #zero compression,0 on 1 off
- False, #overwrite existing files
- 0, #include window decorations, 0 on 1 off
- False, #Use jack
- [], #jack ports
- 0, #tooltips,0 on 1 off
- 0, #draw an on-screen frame, surrounding the capture area,0 on 1 off
- "", #extra options
- ]
diff --git a/qt-recordmydesktop/src/rmdFrame.py b/qt-recordmydesktop/src/rmdFrame.py
deleted file mode 100644
index 758200c..0000000
--- a/qt-recordmydesktop/src/rmdFrame.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-
-class rmdFrame:
- borderwidth=6
- outlinewidth=1
-
- def __init__(self,x,y,w,h,parent):
- self.window=QtGui.QWidget(None,QtCore.Qt.X11BypassWindowManagerHint|QtCore.Qt.WindowStaysOnTopHint)
- self.x=x
- self.y=y
- self.w=w
- self.h=h
- self.parent=parent
- self.mask = QtGui.QBitmap(self.w+self.borderwidth*2,
- self.h+self.borderwidth*2)
- self.mask.fill(QtCore.Qt.color1)
-
- self.window.paintEvent=self.paintEvent
- self.window.setWindowTitle("qt-recordMyDesktop frame")
-
- self.window.setFixedSize(self.w+self.borderwidth*2,
- self.h+self.borderwidth*2)
-
- self.window.move(self.x-self.borderwidth,
- self.y-self.borderwidth)
- self.window.show()
- self.timer=QtCore.QTimer(None)
- self.timer.connect(self.timer,QtCore.SIGNAL("timeout()"),
- self.moveFrame)
- self.timer.start(100)
- self.screen_width=QtGui.qApp.desktop().width()
- self.screen_height=QtGui.qApp.desktop().height()
-
- def moveFrame(self):
- if self.parent.values[15]==0 and self.window.isVisible() :
- npos=QtGui.QCursor.pos()
- x=npos.x()-self.w/2
- y=npos.y()-self.h/2
- x=(x>>1)<<1
- y=(y>>1)<<1
- if x<0:x=0
- if y<0:y=0
- if x+self.w>self.screen_width:x=self.screen_width-self.w
- if y+self.h>self.screen_height:y=self.screen_height-self.h
- if(x!=self.x or y!= self.y):
- self.x=x
- self.y=y
- self.window.move(self.x-(self.borderwidth),self.y-(self.borderwidth))
-
-
- def paintEvent(self,Event):
- painterw= QtGui.QPainter(self.window)
- painterw.fillRect(0,0,self.w+self.borderwidth*2,
- self.h+self.borderwidth*2,
- QtGui.QBrush(QtCore.Qt.white,
- QtCore.Qt.SolidPattern))
- painterw.fillRect(self.outlinewidth,
- self.outlinewidth,
- self.w+(self.borderwidth-
- self.outlinewidth)*2,
- self.h+(self.borderwidth-
- self.outlinewidth)*2,
- QtGui.QBrush(QtCore.Qt.black,
- QtCore.Qt.SolidPattern))
- painterw.fillRect(self.borderwidth-self.outlinewidth,
- self.borderwidth-self.outlinewidth,
- self.w+self.outlinewidth*2,
- self.h+self.outlinewidth*2,
- QtGui.QBrush(QtCore.Qt.white,
- QtCore.Qt.SolidPattern))
- if self.window.mask().isEmpty():
- painter = QtGui.QPainter(self.mask)
- painter.fillRect(self.borderwidth,
- self.borderwidth,
- self.w,self.h,
- QtGui.QBrush(QtCore.Qt.color0,
- QtCore.Qt.SolidPattern))
- self.window.setMask(self.mask)
- def pass_e(self):
- pass
-
- def destroy(self):
- self.timer.stop()
- try:
- self.window.close()
- except:
- pass
-
-if __name__ == "__main__":
- import sys
-
- app=QtGui.QApplication(sys.argv)
- app.values=[[-1,-1,-1,-1]]
- w = rmdFrame(100,100,340,260)
- app.exec_()
diff --git a/qt-recordmydesktop/src/rmdMonitor.py b/qt-recordmydesktop/src/rmdMonitor.py
deleted file mode 100644
index a647e9c..0000000
--- a/qt-recordmydesktop/src/rmdMonitor.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-import locale, gettext
-import rmdConfig
-def _(s):
- return QtCore.QString.fromUtf8(gettext.gettext(s))
-
-gettext.textdomain('qt-recordMyDesktop')
-gettext.bindtextdomain('qt-recordMyDesktop',rmdConfig.locale_install_dir)
-import popen2
-import os,fcntl,signal
-from rmdStrings import *
-
-class rmdMonitor(QtGui.QDialog):
- labeString=monStrings['PleaseWait']
-
- counter_fraction=0.0
-
- def closeEvent(self,Event=None):
- self.timed_id.stop()
- self.stop_encoding()
- def destroy(self,Event=None):
- self.close()
- exit_ret=os.waitpid(self.rmdPid,0)
- self.parent.show()
- def update_counter(self):
- strstdout=""
- try:
- strstdout=self.stdout.read()
- if strstdout =='':
- self.destroy()
- except:
- return True
- try:
- string=strstdout.replace("[","").replace("%] ","").replace("\n","").split("\r")
- self.counter_fraction=max(self.counter_fraction,int(string.pop()))
- if self.counter_fraction>100:
- self.counter_fraction=100
- self.progressbar.setValue(self.counter_fraction)
- self.progressbar.update()
- except:
- pass
-
- return True
- def stop_encoding(self,Event=None):
- try:
- os.kill(self.rmdPid,signal.SIGINT)
- except:
- pass
- def __init__(self,out_stream,childPid,parent):
- self.parent=parent
- flags = fcntl.fcntl(out_stream, fcntl.F_GETFL)
- fcntl.fcntl(out_stream, fcntl.F_SETFL, flags | os.O_NONBLOCK)
- self.rmdPid=childPid
- self.stdout=out_stream
-
- #self.window = QtGui.QDialog()
- QtGui.QDialog.__init__(self)
- #self.closeEvent=self.destroy_and_kill
-
- self.setWindowTitle("recordMyDesktop-encoder")
-
- #self.frame=QtGui.QFrame()
- self.label=QtGui.QLabel(self.labeString)
-
- self.label.setAlignment(QtCore.Qt.AlignHCenter)
-
- self.progressbar=QtGui.QProgressBar()
- self.counter_fraction=0
- self.progressbar.setValue(self.counter_fraction)
- self.stopbutton=QtGui.QPushButton(monStrings['Cancel'],self)
- self.stopbutton.connect(self.stopbutton,QtCore.SIGNAL("clicked()"),
- self.stop_encoding)
- self.box=QtGui.QVBoxLayout()
- self.box.addWidget(self.label,0)
- self.box.addWidget(self.progressbar,0)
- self.box.addWidget(self.stopbutton,0)
-
-
- #self.stopbutton.show()
- self.setLayout(self.box)
- #self.window.setCentralWidget(self.frame)
- #self.label.show()
- #self.progressbar.show()
- #self.window.show()
-
- self.timed_id=QtCore.QTimer(None)
- self.timed_id.connect(self.timed_id,QtCore.SIGNAL("timeout()"),
- self.update_counter)
- self.timed_id.start(100)
-
-
-
-
-
-
diff --git a/qt-recordmydesktop/src/rmdPrefsWidget.py b/qt-recordmydesktop/src/rmdPrefsWidget.py
deleted file mode 100644
index 3a785a7..0000000
--- a/qt-recordmydesktop/src/rmdPrefsWidget.py
+++ /dev/null
@@ -1,395 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-import locale, gettext
-import rmdConfig
-def _(s):
- return QtCore.QString.fromUtf8(gettext.gettext(s))
-def htmlize(s):
- return "<html><body>"+s.replace("\n","<br>")+"</html></body>"
-gettext.textdomain('qt-recordMyDesktop')
-gettext.bindtextdomain('qt-recordMyDesktop',rmdConfig.locale_install_dir)
-import os
-from rmdStrings import *
-
-
-
-
-class prefsWidget(object):
- def __tooltips__(self):
- for i in range(19):
- self.labels[i].setToolTip(htmlize(prefTooltipLabels[i]))
- self.jack_button.setToolTip(htmlize(prefJacktip))
- self.jack_lsp_label.setToolTip(htmlize(prefJacktip))
- self.jack_lss_label.setToolTip(htmlize(prefJacktip))
- self.jack_lsp_liststore.setToolTip(htmlize(prefJacktip))
- self.jack_lsp_listSave.setToolTip(htmlize(prefJacktip))
-
- def __tButToBox__(self,checkbox):
- if checkbox.checkState()==QtCore.Qt.Checked:
- return 0
- else:
- return 1
- def __rCheckState__(self,val):
- if val==0:
- return QtCore.Qt.Checked
- else:
- return QtCore.Qt.Unchecked
-
-
- def destroy(self,Event=None):
- self.values[0]=self.fpsSpinButton.value()
- self.values[1]=self.mouseComboBox.currentIndex()
- self.values[3]=self.__tButToBox__(self.fullComboBox)
- self.values[7]=self.channelsSpinButton.value()
- self.values[8]=self.freqSpinButton.value()
- self.values[9]=self.deviceEntry.text().replace(' ','')
- self.values[12]=self.displayEntry.text().replace(' ','')
- self.values[13]=self.__tButToBox__(self.sharedComboBox)
- self.values[14]=self.__tButToBox__(self.areaResetComboBox)
- self.values[15]=self.__tButToBox__(self.followMouseComboBox)
- self.values[16]=self.__tButToBox__(self.quickComboBox)
- self.values[17]=self.workdirEntry.text()
- self.values[18]=self.__tButToBox__(self.onTheFlyComboBox)
- self.values[19]=self.__tButToBox__(self.zeroCmpComboBox)
- if self.overwriteFilesButton.checkState()==QtCore.Qt.Checked:
- self.values[20]=True
- else:
- self.values[20]=False
- self.values[21]=self.__tButToBox__(self.winDecoComboBox)
- if self.jack_button.checkState()==QtCore.Qt.Checked:
- self.values[22]=True
- else:
- self.values[22]=False
- self.__getSelectedPorts__()
- self.values[24]=self.__tButToBox__(self.tooltipsComboBox)
- self.values[25]=self.__tButToBox__(self.rFrameComboBox)
- self.values[26]=str(self.extraOptsEntry.text().trimmed())
- self.optionsOpen[0]=0
-
-
- def __getSelectedPorts__(self):
- iters_t=[]
- self.values[23]=[]
- sel_rows=self.jack_lsp_listSave.count()
- for i in range(sel_rows):
- self.values[23].append(self.jack_lsp_listSave.item(i).text())
- if sel_rows==0:
- self.values[22]=False
-
- def __subWidgets__(self):
- self.labels={}
- self.boxes={}
- self.labelbox={}
- self.tabWidgets={}
- self.notebook = QtGui.QTabWidget(self.window)
- self.baseLayout=QtGui.QVBoxLayout(self.window)
- self.baseLayout.setSpacing(0)
- try:
- self.baseLayout.setContentsMargins(0,9,0,0)
- except:
- self.baseLayout.setMargin(0)
- self.window.setLayout(self.baseLayout)
-
- for i in range(4):
- self.tabWidgets[i]=QtGui.QWidget(self.notebook)
- self.labelbox[i]=QtGui.QVBoxLayout(self.tabWidgets[i])
-#Files page
- for i in range(2):
- self.labels[i]=QtGui.QLabel(prefLabelStrings[i],self.tabWidgets[0])
- self.labels[i].setAlignment(QtCore.Qt.AlignLeft)
- self.boxes[i]=QtGui.QHBoxLayout()
- self.boxes[i].insertWidget(-1,self.labels[i])
- self.boxes[i].insertSpacing(-1,40)
- self.boxes[i].insertStretch(-1,0)
- self.labelbox[0].insertLayout(-1,self.boxes[i])
- self.labelbox[0].insertSpacing(-1,(1-i)*30+10)
- self.workdir_layout=QtGui.QHBoxLayout()
-
- self.workdirEntry= QtGui.QLineEdit(self.values[17],self.tabWidgets[0])
- self.workdir_layout.insertWidget(-1,self.workdirEntry)
- style=QtGui.QApplication.style()
- self.workdir_button=QtGui.QPushButton(QtGui.QIcon(style.standardPixmap(QtGui.QStyle.SP_DialogSaveButton)),"")
- self.workdir_layout.insertWidget(-1,self.workdir_button)
-
- self.labelbox[0].insertLayout(-1,self.workdir_layout)
- self.labelbox[0].insertSpacing(-1,20)
- self.labelbox[0].insertStretch(-1,0)
-
- self.labelbox[0].setSizeConstraint(QtGui.QLayout.SetMaximumSize)
-
-
- self.overwriteFilesButton=QtGui.QCheckBox(self.tabWidgets[0])
- if self.values[20]:
- self.overwriteFilesButton.setCheckState(QtCore.Qt.Checked)
- else:
- self.overwriteFilesButton.setCheckState(QtCore.Qt.Unchecked)
- self.boxes[0].insertWidget(-1,self.overwriteFilesButton)
-
-
-
-
-
-
-#Performance page
- for i in xrange(2,7):
- self.labels[i]=QtGui.QLabel(prefLabelStrings[i],self.tabWidgets[1])
- self.labels[i].setAlignment(QtCore.Qt.AlignLeft)
- self.boxes[i]=QtGui.QHBoxLayout()
- self.boxes[i].insertWidget(-1,self.labels[i])
- self.boxes[i].insertSpacing(-1,40)
- self.boxes[i].insertStretch(-1,0)
- self.labelbox[1].insertLayout(-1,self.boxes[i])
- self.labelbox[1].insertSpacing(-1,20)
- self.labelbox[1].setSizeConstraint(QtGui.QLayout.SetMaximumSize)
-
- self.fpsSpinButton= QtGui.QSpinBox(self.tabWidgets[1])
- self.fpsSpinButton.setRange(1,50)
- self.fpsSpinButton.setValue(self.values[0])
- self.boxes[2].insertWidget(-1,self.fpsSpinButton)
-
- self.onTheFlyComboBox = QtGui.QCheckBox(self.tabWidgets[1])
- self.onTheFlyComboBox.setCheckState(self.__rCheckState__(self.values[18]))
- self.boxes[3].insertWidget(-1,self.onTheFlyComboBox)
-
- self.zeroCmpComboBox = QtGui.QCheckBox(self.tabWidgets[1])
- self.zeroCmpComboBox.setCheckState(self.__rCheckState__(self.values[19]))
- self.boxes[4].insertWidget(-1,self.zeroCmpComboBox)
-
- self.quickComboBox = QtGui.QCheckBox(self.tabWidgets[1])
- self.quickComboBox.setCheckState(self.__rCheckState__(self.values[16]))
- self.boxes[5].insertWidget(-1,self.quickComboBox)
-
- self.fullComboBox = QtGui.QCheckBox(self.tabWidgets[1])
- self.fullComboBox.setCheckState(self.__rCheckState__(self.values[3]))
- self.boxes[6].insertWidget(-1,self.fullComboBox)
-
-#sound page
- for i in xrange(7,10):
- self.labels[i]=QtGui.QLabel(prefLabelStrings[i],self.tabWidgets[2])
- self.labels[i].setAlignment(QtCore.Qt.AlignLeft)
- self.boxes[i]=QtGui.QHBoxLayout()
- self.boxes[i].insertWidget(-1,self.labels[i])
- self.boxes[i].insertSpacing(-1,40)
- self.boxes[i].insertStretch(-1,0)
- self.labelbox[2].insertLayout(-1,self.boxes[i])
- self.labelbox[2].insertSpacing(-1,20)
- self.labelbox[2].setSizeConstraint(QtGui.QLayout.SetMaximumSize)
-
- self.labelbox[2].insertSpacing(-1,15)
- self.jack_button= QtGui.QCheckBox(prefStrings['UseJack'],self.tabWidgets[2])
- self.jack_lsp_label=QtGui.QLabel(prefStrings['AvailablePortsAdd'],self.tabWidgets[2])
- self.jack_lss_label=QtGui.QLabel(prefStrings['SelectedPortsRemove'],self.tabWidgets[2])
- self.jack_lsp_liststore=QtGui.QListWidget(self.tabWidgets[2])
- self.jack_lsp_liststore.setFixedHeight(100)
- self.jack_lsp_listSave=QtGui.QListWidget(self.tabWidgets[2])
- self.jack_lsp_listSave.setFixedHeight(100)
-
-
- self.jack_lsp_refresh=QtGui.QPushButton(prefStrings['Refresh'],self.tabWidgets[2])
- self.jack_box=QtGui.QVBoxLayout()
- self.jack_box.insertWidget(-1,self.jack_button)
- self.jack_box.insertWidget(-1,self.jack_lsp_label)
- self.jack_box.insertWidget(-1,self.jack_lsp_liststore)
- self.jack_box.insertWidget(-1,self.jack_lss_label)
- self.jack_box.insertWidget(-1,self.jack_lsp_listSave)
- self.jack_box.insertWidget(-1,self.jack_lsp_refresh)
- self.labelbox[2].insertLayout(-1,self.jack_box)
-
-
- if self.values[22]==True:
- self.jack_button.setCheckState(QtCore.Qt.Checked)
- else:
- self.jack_button.setCheckState(QtCore.Qt.Unchecked)
-
- self.channelsSpinButton= QtGui.QSpinBox(self.tabWidgets[2])
- self.channelsSpinButton.setRange(1,2)
- self.channelsSpinButton.setValue(self.values[7])
- self.boxes[7].insertWidget(-1,self.channelsSpinButton)
-
-
- self.freqSpinButton= QtGui.QSpinBox(self.tabWidgets[2])
- self.freqSpinButton.setRange(0,48000)
- self.freqSpinButton.setSingleStep(100)
- self.freqSpinButton.setValue(self.values[8])
- self.boxes[8].insertWidget(-1,self.freqSpinButton)
-
- self.deviceEntry= QtGui.QLineEdit(self.values[9],self.tabWidgets[2])
- self.boxes[9].insertWidget(-1,self.deviceEntry)
-
-#misc page
- for i in xrange(10,19):
- self.labels[i]=QtGui.QLabel(prefLabelStrings[i],self.tabWidgets[3])
- self.labels[i].setAlignment(QtCore.Qt.AlignLeft)
- self.boxes[i]=QtGui.QHBoxLayout()
- self.boxes[i].insertWidget(-1,self.labels[i])
- self.boxes[i].insertSpacing(-1,40)
- self.boxes[i].insertStretch(-1,0)
- self.labelbox[3].insertLayout(-1,self.boxes[i])
- self.labelbox[3].insertSpacing(-1,20)
- self.labelbox[3].setSizeConstraint(QtGui.QLayout.SetMaximumSize)
-
- self.displayEntry= QtGui.QLineEdit(self.values[12])
- self.boxes[10].insertWidget(-1,self.displayEntry)
-
- self.mouseComboBox = QtGui.QComboBox(self.tabWidgets[3])
- for i in range(4):
- self.mouseComboBox.addItem(prefMouseStrings[i])
- self.mouseComboBox.setCurrentIndex(self.values[1])
- self.boxes[11].insertWidget(-1,self.mouseComboBox)
-
- self.followMouseComboBox = QtGui.QCheckBox(self.tabWidgets[3])
- self.followMouseComboBox.setCheckState(self.__rCheckState__(self.values[15]))
- self.boxes[12].insertWidget(-1,self.followMouseComboBox)
-
- self.sharedComboBox = QtGui.QCheckBox(self.tabWidgets[3])
- self.sharedComboBox.setCheckState(self.__rCheckState__(self.values[13]))
- self.boxes[13].insertWidget(-1,self.sharedComboBox)
-
- self.winDecoComboBox = QtGui.QCheckBox(self.tabWidgets[3])
- self.winDecoComboBox.setCheckState(self.__rCheckState__(self.values[21]))
- self.boxes[14].insertWidget(-1,self.winDecoComboBox)
-
- self.tooltipsComboBox = QtGui.QCheckBox(self.tabWidgets[3])
- self.tooltipsComboBox.setCheckState(self.__rCheckState__(self.values[24]))
- self.boxes[15].insertWidget(-1,self.tooltipsComboBox)
-
-
- self.rFrameComboBox = QtGui.QCheckBox(self.tabWidgets[3])
- self.rFrameComboBox.setCheckState(self.__rCheckState__(self.values[25]))
- self.boxes[16].insertWidget(-1,self.rFrameComboBox)
-
- self.areaResetComboBox = QtGui.QCheckBox(self.tabWidgets[3])
- self.areaResetComboBox.setCheckState(self.__rCheckState__(self.values[14]))
- self.boxes[17].insertWidget(-1,self.areaResetComboBox)
-
- self.extraOptsEntry= QtGui.QLineEdit(self.values[26])
- self.boxes[18].insertWidget(-1,self.extraOptsEntry)
-
- for i in range(4):
- self.tabWidgets[i].setLayout(self.labelbox[i])
- self.notebook.insertTab(-1,self.tabWidgets[i],prefTabStrings[i])
-
- self.baseLayout.addWidget(self.notebook)
- return
-
- def addPort(self,lwi):
- pli=lwi.clone()
- self.jack_lsp_listSave.insertItem(-1,pli)
- def remPort(self,lwi):
- self.jack_lsp_listSave.takeItem(self.jack_lsp_listSave.row(lwi))
-
- def __runJackLSP__(self,button=None):
- self.ports=[]
- failed=0
- (stdin,stdout,stderr)=os.popen3(['jack_lsp'],'t')
- ports=stdout.readlines()
- stdin.close()
- stdout.close()
- stderr.close()
- self.jack_lsp_liststore.clear()
-
- if ports!=[]:
- for i in ports:
- self.ports.append(i.replace('\n',""))
- self.jack_lsp_liststore.setEnabled(True)
- else:
- failed=1
- self.ports.append(prefStrings['JackLspS1'])
- self.ports.append(prefStrings['JackLspS2'])
- self.jack_lsp_liststore.setEnabled(False)
- self.jack_lsp_listSave.setEnabled(False)
- self.values[23]=[]
- for i in self.ports:
- self.jack_lsp_liststore.insertItem(-1,QtGui.QListWidgetItem(i))
-
- def __workdirSelect__(self,Event=None):
- tpath=QtGui.QFileDialog.getExistingDirectory(self.window,'',self.workdirEntry.text())
- if tpath!= '':
- self.workdirEntry.setText(tpath)
-
- def __makeCons__(self):
- self.jack_button.connect(self.jack_button,QtCore.SIGNAL("clicked()"),self.__jack_enabled_check__)
- self.jack_lsp_refresh.connect(self.jack_lsp_refresh,QtCore.SIGNAL("clicked()"),self.__runJackLSP__)
- self.jack_lsp_liststore.connect(self.jack_lsp_liststore,QtCore.SIGNAL("itemDoubleClicked(QListWidgetItem *)"),self.addPort)
- self.jack_lsp_listSave.connect(self.jack_lsp_listSave,QtCore.SIGNAL("itemDoubleClicked(QListWidgetItem *)"),self.remPort)
- self.workdir_button.connect(self.workdir_button,QtCore.SIGNAL("clicked()"),self.__workdirSelect__)
-
- def __jack_enabled_check__(self):
- val=False
- if self.jack_button.checkState()==QtCore.Qt.Checked:
- val=True
- else:
- val=False
- self.channelsSpinButton.setEnabled(not val)
- self.freqSpinButton.setEnabled(not val)
- self.deviceEntry.setEnabled(not val)
- self.jack_lsp_liststore.setEnabled(val)
- self.jack_lsp_listSave.setEnabled(val)
- self.jack_lsp_refresh.setEnabled(val)
- if(val):
- self.__runJackLSP__()
- def __register_shortcuts__(self):
- esc_sh=QtGui.QShortcut(QtGui.QKeySequence("Esc"),self.window)
- self.window.connect(esc_sh,
- QtCore.SIGNAL("activated()"),
- self.window,
- QtCore.SLOT("close()"))
- adv_sh=QtGui.QShortcut(QtGui.QKeySequence("Ctrl+p"),self.window)
- self.window.connect(adv_sh,
- QtCore.SIGNAL("activated()"),
- self.window,
- QtCore.SLOT("close()"))
-
- def __init__(self,values,optionsOpen):
- self.values=values
- self.ports=[]
- self.optionsOpen=optionsOpen
- self.window = QtGui.QWidget()
- self.window.closeEvent= self.destroy
- self.window.setWindowTitle("recordMyDesktop: "+smplButtonStrings[0])
- self.__subWidgets__()
- self.__makeCons__()
- self.__register_shortcuts__()
- self.__runJackLSP__()
- self.__jack_enabled_check__()
- for i in self.values[23]:
- self.jack_lsp_listSave.insertItem(-1,QtGui.QListWidgetItem(i))
-
-
- if self.values[24]==0:
- self.__tooltips__()
- self.window.show()
-
-
-
-
-
-
-
-
-
-
diff --git a/qt-recordmydesktop/src/rmdSelect.py b/qt-recordmydesktop/src/rmdSelect.py
deleted file mode 100644
index bd46bde..0000000
--- a/qt-recordmydesktop/src/rmdSelect.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-
-class QtAreaSelector(QtGui.QLabel):
- def __init__(self,area_return):
- self.area_return=area_return
- QtGui.QLabel.__init__(self,None,QtCore.Qt.WindowStaysOnTopHint)
- self.x1=self.y1=-1
- self.x2=self.y2=0
- self.pix=QtGui.QPixmap.grabWindow(QtGui.QX11Info().appRootWindow())
- siz=QtGui.QApplication.desktop().screenGeometry()
- (self.width, self.height)=(siz.width(),siz.height())
- def paintEvent(self, event):
- painter = QtGui.QPainter(self)
- painter.drawPixmap(0,0,self.pix)
- if self.x1 >= 0:
- x = min(self.x1, self.x2)
- y = min(self.y1, self.y2)
- w = max(self.x1, self.x2) - x
- h = max(self.y1, self.y2) - y
- painter.fillRect(x,y,w,h,QtGui.QBrush(QtCore.Qt.red,QtCore.Qt.CrossPattern))
- def mouseMoveEvent(self, event):
- if self.x1 >= 0:
- rect = QtCore.QRect()
- rect.x = min(self.x1, min(self.x2, event.x() + 1))
- rect.width = max(self.x1, max(self.x2, event.x() + 1)) - rect.x
- rect.y = min(self.y1, min(self.y2, event.y() + 1))
- rect.height = max(self.y1, max(self.y2, event.y() + 1)) - rect.y
-
- self.x2 = event.x() + 1
- self.y2 = event.y() + 1
- self.update()
- def mouseReleaseEvent(self, event):
- if event.button() == 1 and self.x1 >= 0:
- self.x2 = event.x() + 1
- self.y2 = event.y() + 1
- self.area_return[0]=min(int(self.x1),int(self.x2))
- self.area_return[1]=min(int(self.y1),int(self.y2))
- self.area_return[2]=max(int(self.x1),int(self.x2))
- self.area_return[3]=max(int(self.y1),int(self.y2))
- self.close()
- def mousePressEvent(self, event):
- if event.button() != 1:
- self.x1 = self.y1 = -1
- self.close()
- self.x1 = event.x()
- self.y1 = event.y()
-
-
-if __name__ == "__main__":
- import sys
- p=[[-1,-1,-1,-1]]
- app=QtGui.QApplication(sys.argv)
- w = QtAreaSelector(p[0])
- w.showFullScreen()
- app.exec_()
- print p[0]
-
-
diff --git a/qt-recordmydesktop/src/rmdSelectThumb.py b/qt-recordmydesktop/src/rmdSelectThumb.py
deleted file mode 100644
index ed1418d..0000000
--- a/qt-recordmydesktop/src/rmdSelectThumb.py
+++ /dev/null
@@ -1,168 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-import sys
-import rmdConfig
-from rmdFrame import *
-
-class QtThumbSelector(QtGui.QLabel):
- def __init__(self,parent,caller,area_return,hidden,update_interval=500):
- self.area_return=area_return
- self.selecting=0
- self.realFrame=None
- self.caller=caller
- self.hidden=hidden
- QtGui.QLabel.__init__(self,parent)
- self.x1=self.y1=-1
- self.x2 = self.y2 = -1
- #self.root=QtGui.QApplication.desktop().winId()
- self.root=QtGui.QX11Info().appRootWindow()
-
- self.pix=QtGui.QPixmap.grabWindow(self.root)
- siz=QtGui.QApplication.desktop().screenGeometry()
- (self.wwidth, self.wheight)=(siz.width(),siz.height())
-
- self.factor=1;
- twidth=self.wwidth
- while twidth>320 or self.factor<4:
- twidth/=2
- self.factor*=2
- self.setFixedSize(self.wwidth/self.factor,self.wheight/self.factor)
- self.setSizePolicy(QtGui.QSizePolicy.Preferred,QtGui.QSizePolicy.Preferred)
- self.timed_id=QtCore.QTimer(None)
- self.timed_id.connect(self.timed_id,QtCore.SIGNAL("timeout()"),
- self.update_image)
- self.timed_id.start(update_interval)
- self.capPos=0
- self.pixt=None
- self.pixflag=0
- self.fragSize=64
- def update_image(self):
- if self.selecting==0 and self.hidden[0]==0:
- self.pixt=QtGui.QPixmap.grabWindow(self.root,0,self.capPos,self.wwidth,self.fragSize)
- self.pixflag=1
- self.update()
-
- def update(self):
- QtGui.QLabel.update(self)
- if self.realFrame!=None:
- if (((self.area_return[0]!=self.realFrame.x or
- self.area_return[1]!=self.realFrame.y) and
- self.caller.values[15]==1) or
- self.area_return[2]-self.area_return[0]!=self.realFrame.w or
- self.area_return[3]-self.area_return[1]!=self.realFrame.h or
- self.caller.values[25]):
- self.realFrame.destroy()
- self.realFrame=None
- if self.realFrame==None and self.caller.values[25]==0 :
- self.__draw_frame__()
-
- def paintEvent(self, event):
-
- if self.pixt!=None and self.pixflag==1:
- self.pixflag=0
- painter2 = QtGui.QPainter(self.pix)
- painter2.drawPixmap(0,self.capPos,self.wwidth,self.fragSize,self.pixt)
- if self.capPos<self.wheight:
- self.capPos+=self.fragSize
- if self.capPos>self.wheight:
- self.capPos=self.wheight-self.fragSize
- else:
- self.capPos=0
-
- painter = QtGui.QPainter(self)
- painter.drawPixmap(0,0,self.wwidth/self.factor,self.wheight/self.factor,self.pix)
- if self.selecting==1 or self.caller.values[15]==1:
- if self.x1 >= 0:
- x = min(self.x1, self.x2)
- y = min(self.y1, self.y2)
- w = max(self.x1, self.x2) - x
- h = max(self.y1, self.y2) - y
- painter.fillRect(x,y,w,h,QtGui.QBrush(QtCore.Qt.red,QtCore.Qt.CrossPattern))
- elif self.area_return[0]>=0 or self.area_return[1]>=0 or self.area_return[2]>=0 or self.area_return[3]>=0:
- x = max(0, self.area_return[0])/self.factor
- y = max(0, self.area_return[1])/self.factor
- w = min(self.wwidth, self.area_return[2])/self.factor - x
- h = min(self.wheight, self.area_return[3])/self.factor - y
- painter.fillRect(x,y,w,h,QtGui.QBrush(QtCore.Qt.red,QtCore.Qt.CrossPattern))
- def mouseMoveEvent(self, event):
- if self.x1 >= 0:
- rect = QtCore.QRect()
- rect.x = min(self.x1, min(self.x2, event.x() + 1))
- rect.width = max(self.x1, max(self.x2, event.x() + 1)) - rect.x
- rect.y = min(self.y1, min(self.y2, event.y() + 1))
- rect.height = max(self.y1, max(self.y2, event.y() + 1)) - rect.y
-
- self.x2 = event.x() + 1
- self.y2 = event.y() + 1
- self.update()
- def mouseReleaseEvent(self, event):
- if event.button() == 1:
- self.selecting=0
- if self.x1 >= 0:
- self.x2 = event.x() + 1
- self.y2 = event.y() + 1
- self.area_return[0]=max(0,min(int(self.x1),int(self.x2))*self.factor)
- self.area_return[1]=max(0,min(int(self.y1),int(self.y2))*self.factor)
- self.area_return[2]=min(self.wwidth,max(int(self.x1),int(self.x2))*self.factor)
- self.area_return[3]=min(self.wheight,max(int(self.y1),int(self.y2))*self.factor)
- self.update()
- def mousePressEvent(self, event):
- if event.button() != 1:
- self.x1 = self.y1 =-1
- self.area_return[0]=-1
- self.area_return[1]=-1
- self.area_return[2]=-1
- self.area_return[3]=-1
- self.update()
- elif event.button() == 1:
- self.selecting=1
- self.x1 = event.x()
- self.y1 = event.y()
- def __draw_frame__(self):
- if self.area_return[0]!=-1:
- self.realFrame=rmdFrame(self.area_return[0],
- self.area_return[1],
- self.area_return[2]-self.area_return[0],
- self.area_return[3]-self.area_return[1],
- self.caller)
- def closeEvent(self,event):
- self.realFrame.destroy()
- QtGui.QLabel.close(self)
-
-if __name__ == "__main__":
- import sys
- p=[[-1,-1,-1,-1]]
- hidden=[0]
- app=QtGui.QApplication(sys.argv)
- app.values=rmdConfig.default_values
- w = QtThumbSelector(None,app,p[0],hidden)
- w.show()
- app.exec_()
- print p[0]
-
-
-
diff --git a/qt-recordmydesktop/src/rmdSimple.py b/qt-recordmydesktop/src/rmdSimple.py
deleted file mode 100644
index 1dee275..0000000
--- a/qt-recordmydesktop/src/rmdSimple.py
+++ /dev/null
@@ -1,497 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-import locale, gettext
-import rmdConfig
-def _(s):
- return QtCore.QString.fromUtf8(gettext.gettext(s))
-def htmlize(s):
- return "<html><body>"+s.replace("\n","<br>")+"</html></body>"
-gettext.textdomain('qt-recordMyDesktop')
-gettext.bindtextdomain('qt-recordMyDesktop',rmdConfig.locale_install_dir)
-import os,sys
-
-from rmdTrayIcon import *
-import rmdPrefsWidget as pW
-import rmdSelectThumb as sT
-from rmdStrings import *
-
-class simpleWidget(object):
- hidden=[0]
-
- options=None
- optionsOpen=[0]
- def __subWidgets__(self):
- self.labelbox=QtGui.QVBoxLayout()
-
- self.NBox=QtGui.QHBoxLayout()
- self.NEBox=QtGui.QVBoxLayout()
- self.NEVQBox=QtGui.QHBoxLayout()
- self.NESQBox=QtGui.QHBoxLayout()
- self.NETABox=QtGui.QVBoxLayout()
- self.NWBox=QtGui.QVBoxLayout()
-
-
-
- self.NBox.insertLayout(-1,self.NWBox)
- self.NBox.insertSpacing(-1,20)
- self.NBox.insertLayout(-1,self.NEBox)
- self.NEBox.insertLayout(-1,self.NEVQBox)
- self.NEBox.insertLayout(-1,self.NESQBox)
- self.NEBox.insertSpacing(-1,10)
- self.NEBox.insertLayout(-1,self.NETABox)
-
- self.SBox=QtGui.QHBoxLayout()
- self.SEBox=QtGui.QHBoxLayout()
- self.SWBox=QtGui.QHBoxLayout()
- self.SBox.insertLayout(-1,self.SWBox)
- self.SBox.insertStretch(-1,0)
- self.SBox.insertLayout(-1,self.SEBox)
-
- self.labelbox.insertLayout(-1,self.NBox)
- self.labelbox.insertLayout(-1,self.SBox)
-
- self.image=sT.QtThumbSelector(self.window,self,self.values[5],self.hidden)
-
- self.NWBox.insertWidget(-1,self.image)
- self.NWBox.setGeometry(QtCore.QRect(0,0,self.image.width(),self.image.height()))
- #quality
- self.v_quality=QtGui.QSlider(self.window)
- self.v_quality.setMaximum(100)
- self.v_quality.setMinimum(0)
- self.v_quality.setTracking(True)
- self.v_quality.setValue(int(round((float(self.values[10])*100.0)/63.0)))
- self.v_quality.setOrientation(QtCore.Qt.Horizontal)
-
-
- self.s_button= QtGui.QCheckBox(self.window)
- if self.values[2]:
- self.s_button.setCheckState(QtCore.Qt.Checked)
- else:
- self.s_button.setCheckState(QtCore.Qt.Unchecked)
- self.s_quality=QtGui.QSlider(self.window)
- self.s_quality.setMaximum(100)
- self.s_quality.setMinimum(0)
- self.s_quality.setTracking(True)
- self.s_quality.setValue(int(round(float(self.values[11])*10.0)))
- self.s_quality.setOrientation(QtCore.Qt.Horizontal)
- self.s_quality.setEnabled(self.values[2])
-
- self.v_label=QtGui.QLabel(" "+smplLabelStrings[0],self.window)
- self.s_label=QtGui.QLabel(smplLabelStrings[1],self.window)
-
- self.advanced_button=QtGui.QPushButton(smplButtonStrings[0],self.window)
- self.tipLabel=QtGui.QLabel(smplTipLabelStrings[0],self.window)
-
- self.NEVQBox.insertWidget(-1,self.v_label)
- self.NEVQBox.insertWidget(-1,self.v_quality)
- self.NESQBox.insertWidget(-1,self.s_button)
- self.NESQBox.insertWidget(-1,self.s_label)
- self.NESQBox.insertWidget(-1,self.s_quality)
- self.NETABox.insertWidget(-1,self.advanced_button)
- self.NETABox.insertWidget(-1,self.tipLabel)
- style=QtGui.QApplication.style()
- icon_rec_pxm=QtGui.QPixmap(os.path.join(rmdConfig.pixmapdir,"media-record.svg"))
-
- self.win_button=QtGui.QPushButton(smplButtonStrings[1],self.window)
- self.start_button=QtGui.QPushButton(QtGui.QIcon(icon_rec_pxm),smplStrings['Record'],self.window)
- self.file_button=QtGui.QPushButton(QtGui.QIcon(style.standardPixmap(QtGui.QStyle.SP_DialogSaveButton)),smplStrings['SaveAs'],self.window)
- self.quit_button=QtGui.QPushButton(QtGui.QIcon(style.standardPixmap(QtGui.QStyle.SP_DialogCloseButton)),smplStrings['Quit'],self.window)
- self.SWBox.insertWidget(-1,self.win_button)
- self.SWBox.insertWidget(-1,self.start_button)
- self.SEBox.insertWidget(-1,self.file_button)
- self.SEBox.insertWidget(-1,self.quit_button)
-
-
- self.win_button.show()
- self.start_button.show()
- self.file_button.show()
- self.quit_button.show()
-
- self.v_quality.show()
- self.s_button.show()
- self.s_quality.show()
- self.v_label.show()
- self.s_label.show()
- self.tipLabel.show()
- self.advanced_button.show()
-
- self.window.setLayout(self.labelbox)
- def __tooltips__(self):
- self.win_button.setToolTip(htmlize(smplTooltipLabels[0]))
- self.start_button.setToolTip(htmlize(smplTooltipLabels[1]))
- self.file_button.setToolTip(htmlize(smplTooltipLabels[2]))
- self.quit_button.setToolTip(htmlize(smplTooltipLabels[3]))
- self.v_quality.setToolTip(htmlize(smplTooltipLabels[4]))
- self.v_label.setToolTip(htmlize(smplTooltipLabels[4]))
- self.s_button.setToolTip(htmlize(smplTooltipLabels[5]))
- self.s_quality.setToolTip(htmlize(smplTooltipLabels[6]))
- self.s_label.setToolTip(htmlize(smplTooltipLabels[6]))
- self.advanced_button.setToolTip(htmlize(smplTooltipLabels[7]))
-
- def __exit__(self,Event=None):
- if self.exited==0:
- self.update()
- self.exited=1
- self.optionsOpen[0]=0
- if self.save_prefs()==False:
- print "Warning!!!Couldn't save preferences"
- sys.exit()
- def hide(self,Event=None):
- if self.image.realFrame != None and self.values[25]==0:
- self.image.realFrame.window.hide()
- self.window.hide()
- self.hidden[0]=1
- def show(self,Event=None):
- if self.image.realFrame != None and self.values[25]==0:
- self.image.realFrame.window.show()
- self.window.show()
- self.hidden[0]=0
- def __swap_visibility__(self,event=None):
- if event.type()==QtCore.QEvent.WindowStateChange:
- if self.window.windowState() == QtCore.Qt.WindowMinimized:
- self.hidden[0]=self.minimized=1
- else:
- self.hidden[0]=self.minimized=0
-
- def advanced(self,button=None):
- if self.optionsOpen[0] ==0:
- self.optionsOpen[0]=1
- self.options=pW.prefsWidget(self.values,self.optionsOpen)
- else:
- if self.options != None:
- self.options.window.close()
- self.optionsOpen[0]=0
- def close_advanced(self):
- if self.options != None:
- if self.optionsOpen[0] ==1:
- self.options.window.close()
- self.optionsOpen[0]=0
-
- def __fileSelect__(self,Event=None):
- tfilename=QtGui.QFileDialog.getSaveFileName(self.window,'',self.values[4],"*.ogv *.ogv.*;; *.ogg *.ogg.*;; *.*")
- if tfilename!= '':
- self.values[4]=tfilename
- def __select_window__(self,button=None):
- xwininfo_com=['xwininfo','-frame']
- if self.values[21]==1:
- xwininfo_com=['xwininfo']
- (stdin,stdout,stderr)=os.popen3(xwininfo_com,'t')
- wid=stdout.readlines()
- stdin.close()
- stdout.close()
- stderr.close()
- x=y=width=height=None
- for i in wid:
- if i.lstrip().startswith('Absolute upper-left X:'):
- x=int(i.split(' ')[len(i.split(' '))-1])
- elif i.lstrip().startswith('Absolute upper-left Y'):
- y=int(i.split(' ')[len(i.split(' '))-1])
- elif i.lstrip().startswith('Width:'):
- width=int(i.split(' ')[len(i.split(' '))-1])
- elif i.lstrip().startswith('Height:'):
- height=int(i.split(' ')[len(i.split(' '))-1])
- if x<0:
- width+=x
- x=0
- if y<0:
- height+=y
- y=0
- if width+x>self.wwidth: width=self.wwidth-x
- if height+y>self.wheight: height=self.wheight-y
- self.values[5][0]=x
- self.values[5][1]=y
- self.values[5][2]=width+x
- self.values[5][3]=height+y
- self.image.x1=-1
- self.image.update()
-
- def __makeCons__(self):
- self.advanced_button.connect(self.advanced_button,QtCore.SIGNAL("clicked()"),self.advanced)
- self.file_button.connect(self.file_button,QtCore.SIGNAL("clicked()"),self.__fileSelect__)
- self.quit_button.connect(self.quit_button,QtCore.SIGNAL("clicked()"),self.__exit__)
- self.start_button.connect(self.start_button,QtCore.SIGNAL("clicked()"),self.trayIcon.record_ext)
- self.s_button.connect(self.s_button,QtCore.SIGNAL("clicked()"),self.__sound_check__)
- self.win_button.connect(self.win_button,QtCore.SIGNAL("clicked()"),self.__select_window__)
- def __register_shortcuts__(self):
- exit_sh=QtGui.QShortcut(QtGui.QKeySequence("Ctrl+q"),self.window)
- self.window.connect(exit_sh,
- QtCore.SIGNAL("activated()"),
- self.window,
- QtCore.SLOT("close()"))
- rec_sh=QtGui.QShortcut(QtGui.QKeySequence("Ctrl+r"),self.window)
- self.window.connect(rec_sh,
- QtCore.SIGNAL("activated()"),
- self.trayIcon.record_ext)
- adv_sh=QtGui.QShortcut(QtGui.QKeySequence("Ctrl+p"),self.window)
- self.window.connect(adv_sh,
- QtCore.SIGNAL("activated()"),
- self.advanced)
- save_sh=QtGui.QShortcut(QtGui.QKeySequence("Ctrl+s"),self.window)
- self.window.connect(save_sh,
- QtCore.SIGNAL("activated()"),
- self.__fileSelect__)
- hide_sh=QtGui.QShortcut(QtGui.QKeySequence("Ctrl+h"),self.window)
- self.window.connect(hide_sh,
- QtCore.SIGNAL("activated()"),
- self.trayIcon.tray_popup._prefs_widget)
- esc_sh=QtGui.QShortcut(QtGui.QKeySequence("Esc"),self.window)
- self.window.connect(esc_sh,
- QtCore.SIGNAL("activated()"),
- self.trayIcon.tray_popup._prefs_widget)
-
-
- def __sound_check__(self,widget=None):
- self.s_quality.setEnabled(self.values[2])
- if self.s_button.checkState()==QtCore.Qt.Checked:
- self.values[2]=True
- else:
- self.values[2]=False
-
- def update(self) :
- self.values[10]=int(round((float(self.v_quality.value())*63.0)/100.0))
- self.values[11]=int(round(float(self.s_quality.value())/10.0))
- if self.values[10]>63:
- self.values[10]=63
- if self.values[11]>10:
- self.values[11]=10
- def load_prefs(self):
- path=os.path.join(os.getenv("HOME"),".qt-recordmydesktop")
- try:
- self.values=[]
- savefile=open(path,"r")
- #the header
- savefile.readline()
- savefile.readline()
- #the options,each has a coment above
- for i in range(2):
- savefile.readline()
- self.values.append(int(savefile.readline()))
- savefile.readline()
- self.values.append(int(savefile.readline())==1)
- savefile.readline()
- self.values.append(int(savefile.readline()))
- savefile.readline()
- self.values.append(savefile.readline().replace("\n",""))
- #recording area is not saved
- self.values.append([])
- for i in range(3):
- savefile.readline()
- self.values.append(int(savefile.readline()))
- savefile.readline()
- self.values.append(savefile.readline().replace("\n",""))
- for i in range(2):
- savefile.readline()
- self.values.append(int(savefile.readline()))
- savefile.readline()
- self.values.append(savefile.readline().replace("\n",""))
- for i in range(2):
- savefile.readline()
- self.values.append(int(savefile.readline()))
- savefile.readline()
- areastring=savefile.readline()
- try:
- as1=areastring.replace('\n','').split(',')
- for i in range(4):
- self.values[5].append(int(as1[i]))
- except:
- self.values[5]=[]
- for i in rmdConfig.default_values[5]:
- self.values[5].append(i)
- #loaded further bellow
- self.values.append(0)
- savefile.readline()
- self.values.append(int(savefile.readline()))
- savefile.readline()
- self.values.append(savefile.readline().replace("\n",""))
- for i in range(2):
- savefile.readline()
- self.values.append(int(savefile.readline()))
- savefile.readline()
- self.values.append(int(savefile.readline())==1)
- #new options for 0.3.3
- p=savefile.readline()
- if p=='':
- self.values.append(rmdConfig.default_values[21])
- else:
- self.values.append(int(savefile.readline()))
- p=savefile.readline()
- if p=='':
- self.values.append(rmdConfig.default_values[22])
- self.values.append(rmdConfig.default_values[23])
- else:
- self.values.append(int(savefile.readline())==1)
- p=savefile.readline()
- if p=='':
- self.values.append(rmdConfig.default_values[23])
- else:
- ports_t=savefile.readline().split(' ')
- #get rid of the trailing \n
- ports_t.pop()
- self.values.append(ports_t)
- p=savefile.readline()
- if p=='':
- self.values.append(rmdConfig.default_values[24])
- else:
- self.values.append(int(savefile.readline()))
- p=savefile.readline()
- if p=='':
- self.values.append(rmdConfig.default_values[25])
- else:
- self.values.append(int(savefile.readline()))
- p=savefile.readline()
- if p=='':
- self.values.append(rmdConfig.default_values[26])
- else:
- self.values.append(savefile.readline().replace("\n",""))
- p=savefile.readline()
- if p=='':
- self.values[15]=rmdConfig.default_values[15]
- else:
- t_followmouse=int(savefile.readline())
- if t_followmouse>1: t_followmouse=1
- self.values[15]=t_followmouse
- return True
- except:
- return False
- def save_prefs(self):
- try:
- path=os.path.join(os.getenv("HOME"),".qt-recordmydesktop")
- savefile=open(path,"w")
- savefile.write("#Order and overall number of lines must be preserved\n")
- savefile.write("#For this file to be read correctly\n")
- savefile.write("#Framerate\n")
- savefile.write("%d\n"%self.values[0])
- savefile.write("#Cursor(0 xfixes,1 white,2 black,3 none)\n")
- savefile.write("%d\n"%self.values[1])
- savefile.write("#Sound,0 disabled 1 enabled\n")
- savefile.write("%d\n"%self.values[2])
- savefile.write("#Full shots,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[3])
- savefile.write("#Filename\n")
- savefile.write("%s\n"%self.values[4])
- savefile.write("#Delay,seconds\n")
- savefile.write("%d\n"%self.values[6])
- savefile.write("#Number of channels\n")
- savefile.write("%d\n"%self.values[7])
- savefile.write("#Frequency\n")
- savefile.write("%d\n"%self.values[8])
- savefile.write("#Sound-device\n")
- savefile.write("%s\n"%self.values[9])
- savefile.write("#Video quality(0-63)\n")
- savefile.write("%d\n"%self.values[10])
- savefile.write("#Audio quality(0-10)\n")
- savefile.write("%d\n"%self.values[11])
- savefile.write("#Display\n")
- savefile.write("%s\n"%self.values[12])
- savefile.write("#Shared memory,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[13])
- savefile.write("#Reset capture area,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[14])
- savefile.write("#Recording area\n")
- if(self.values[14]):
- savefile.write("%d,%d,%d,%d\n"%(self.values[5][0],self.values[5][1],self.values[5][2],self.values[5][3]))
- else:
- savefile.write("%d,%d,%d,%d\n"%(rmdConfig.default_values[5][0],rmdConfig.default_values[5][1],rmdConfig.default_values[5][2],rmdConfig.default_values[5][3]))
- savefile.write("#Quick subsampling,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[16])
- savefile.write("#Working directory(temporary files)\n")
- savefile.write("%s\n"%self.values[17])
- savefile.write("#On the fly encoding,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[18])
- savefile.write("#Zero compression,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[19])
- savefile.write("#overwrite existing files,0 disabled 1 enabled\n")
- savefile.write("%d\n"%self.values[20])
- savefile.write("#Include window decorations,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[21])
- savefile.write("#Use jack\n")
- savefile.write("%d\n"%self.values[22])
- savefile.write("#last used jack ports\n")
- for i in self.values[23]:
- savefile.write("%s "%i)
- savefile.write("\n")
- savefile.write("#Tooltips,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[24])
- savefile.write("#draw an on-screen frame, surrounding the capture area\n")
- savefile.write("%d\n"%self.values[25])
- savefile.write("#Extra options\n")
- savefile.write("%s\n"%self.values[26])
- savefile.write("#Follow mouse,1 disabled 0 enabled\n")
- savefile.write("%d\n"%self.values[15])
- savefile.flush()
- savefile.close()
- return True
- except:
- return False
-
- def __init__(self):
- if self.load_prefs()==False:
- self.values= rmdConfig.default_values
- self.optionsOpen=[0]
- self.minimized=0
- self.exited=0
- self.window = QtGui.QWidget()
-
- self.window.closeEvent= self.__exit__
- self.window.changeEvent=self.__swap_visibility__
- self.window.setWindowTitle("recordMyDesktop")
-
- siz=QtGui.QApplication.desktop().screenGeometry()
- (self.wwidth, self.wheight)=(siz.width(),siz.height())
- self.factor=1;
- twidth=self.wwidth
- while twidth>320 or self.factor<4:
- twidth/=2
- self.factor*=2
-
- self.__subWidgets__()
-
- self.trayIcon=trayIcon(self)
- self.__makeCons__()
- self.__register_shortcuts__()
-
- if self.values[24]==0:
- self.__tooltips__()
-
- self.window.show()
-
-
-
-if __name__ == "__main__":
- import sys
-
- app=QtGui.QApplication(sys.argv)
- w = simpleWidget()
- app.exec_()
-
-
-
-
-
-
-
-
diff --git a/qt-recordmydesktop/src/rmdStrings.py b/qt-recordmydesktop/src/rmdStrings.py
deleted file mode 100644
index 0b5398c..0000000
--- a/qt-recordmydesktop/src/rmdStrings.py
+++ /dev/null
@@ -1,137 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-import rmdConfig
-import locale, gettext
-def _(s):
- return QtCore.QString.fromUtf8(gettext.gettext(s))
-
-gettext.textdomain('qt-recordMyDesktop')
-gettext.bindtextdomain('qt-recordMyDesktop',rmdConfig.locale_install_dir)
-
-TpmStr={'ShowHide':_("Show/hide Main Window"),
- 'SelectOnScreen':_("_Select Area On Screen"),
- 'Quit':_("Quit"),
- 'ProgDesc':_('a graphical frontend for recordMyDesktop'),
- 'Copyright': _('Copyright (C) John Varouhakis\nPortions Copyright (C) 2005-6 Zaheer Abbas Merali, John N. Laliberte\nPortions Copyright (C) Fluendo S.L.'),
- 'TranslatorCredits': _('Translator Credits And Information(Replace with your info)')
- }
-
-rmdErrStr={
- 0:_('Success'),
- 1*256:_('Error while parsing the arguments.'),
- 2*256:_('Initializing the encoder failed(either vorbis or theora)'),
- 3*256:_('Could not open/configure sound card.'),
- 4*256:_('Xdamage extension not present.'),
- 5*256:_('Shared memory extension not present.'),
- 6*256:_('Xfixes extension not present.'),
- 7*256:_('XInitThreads failed.'),
- 8*256:_('No $DISPLAY environment variable and none specified as argument.'),
- 9*256:_('Cannot connect to Xserver.'),
- 10*256:_('Color depth is not 24bpp.'),
- 11*256:_('Improper window specification.'),
- 12*256:_('Cannot attach shared memory to proccess.'),
- 13*256:_('Cannot open file for writting.'),
- 14*256:_('Cannot load the Jack library (dlopen/dlsym error on libjack.so).'),
- 15*256:_('Cannot create new client.'),
- 16*256:_('Cannot activate client.'),
- 17*256:_('Port registration/connection failure.'),
- 11:_('Segmentation Fault')
- }
-TrayIconStr={
- 'RecFinishedKnown':_("Recording is finished.\nrecordMyDesktop has exited with status"),
- 'ErrDesc':_("Description"),
- 'RecFinishedUnknown':_("Recording is finished.\nrecordMyDesktop has exited with uknown\nerror code")
- }
-
-
-smplLabelStrings=[_('Video Quality'),_('Sound Quality')]
-smplButtonStrings=[_('Advanced'),_('Select Window')]
-smplTooltipLabels=[_('Click here to select a window to record'),
- _('Click to start the recording.\nThis window will hide itself.'),
- _('Click to choose a filename and location.\nDefault is out.ogv in your home folder.\nIf the file already exists, the new one\nwill have a number attached on its name\n(this behavior can be changed )'),
- _('Click to exit the program.'),
- _('Select the video quality of your recording.\n(Lower quality will require more proccessing power,\nso it\'s recommended, when encoding on the fly,\nto leave at 100)'),
- _('Enable/Disable sound recording.'),
- _('Select the audio quality of your recording.'),
- _('Click here to access more options.')]
-smplTipLabelStrings=[_('\nLeft click and drag, on the preview image,\nto select an area for recording.\nRight click on it, to reset the area.')]
-
-smplStrings={ 'Record':_("Record"),
- 'SaveAs':_("Save As"),
- 'Quit':_("Quit")
- }
-
-monStrings={'Cancel':_("Cancel"),
- 'PleaseWait':_("Please wait while your recording is being encoded\nWARNING!!!\nIf you press Cancel or close this window,\nthis proccess cannot be resumed!"),
- 'complete':_("complete")
- }
-
-prefLabelStrings=[_('Overwite Existing Files'),_('Working Directory'),
- _('Frames Per Second'),_('Encode On the Fly'),_('Zero Compression'),
- _('Quick Subsampling'),_('Full shots at every frame'),
- _('Channels'),_('Frequency'),_('Device'),_('Display'),_('Mouse Cursor'),
- _('Follow Mouse'),_('MIT-Shm extension'),_('Include Window Decorations'),
- _('Tooltips'),_('Outline Capture Area On Screen'),
- _('Reset Capture Area'),
- _('Extra Options'),
- _('Video Quality'),_('Sound Quality'),
- _('Drop Frames(encoder)'),_('Startup Delay(secs)'),]
-prefMouseStrings=[_('Normal'),_('White'),_('Black'),_('None')]
-prefStateStrings=[_('Enabled'),_('Disabled')]#0,1
-prefTabStrings=[_('Files'),_('Performance'),_('Sound'),_('Misc')]
-prefTooltipLabels=[_('By default, if you try to save under a filename that already\nexists, the new file will be renamed\n(for example if you try to save as out.ogv and that file exists, your file will be named out.ogv.1).\nBy checking this box, this behavior is disabled and the old file is overwritten.\n'),
- _('Directory where temporary files will be saved.'),
- _('Frames Per Second'),
- _('Encode simultaneously with the recording.\nThis will require a lot more processing power.\n'),
- _('Do not apply compression on the temporary files.\nIf enabled, the program will need less processing power,\nin the expense of hard disk space.\nThis option is valid only when encoding on the fly is disabled.'),
- _('This option, if enabled, will cause the program to require less\nprocessing power, but it might make the colors look a bit more blurry.'),
- _('This option should be enabled when recording 3d windows.\nIt is also auto-enabled when recording a\nknown 3d compositing window manager.\n '),
- _('Number of audio channels.'),
- _('Sound frequency.'),
- _('ALSA sound device, that is used for sound recording.'),
- _('Connection to the Xserver.'),
- _('The mouse cursor that will be drawn.\nNormal is for the real cursor that you see while recording,\nwhile black and white are fake cursors, drawn by the program.\nYou can also disable cursor drawing.'),
- _('When This option is enabled, the capture\narea will follow your mouse cursor.\nEnabling this option will also enable full shots at\nevery frame, so it\'s not recommended\nfor large capture areas.'),
- _('Use the MIT-Shared memory extension, whenever appropriate,\n depending on the rest of the program settings.\nDisabling this option is not recommended,\nas it may severely slow down the program.'),
- _('When selecting a window via the "Select Window" button,\ninclude that window\'s decorations in the recording area.'),
- _('Enable or disable tooltips, like this one.\n(Requires restart)'),
- _('Draw a frame on the screen, around the area\nthat will get captured.\n(This frame will remain throughout the recording.)'),
- _('Reset capture area after every recording\nand at program shutdown.'),
- _('Extra commandline options that will get\npassed to recordMyDesktop during initialization.\nThese options must be entered the same way\nthey would in the commandline (i.e. separated with spaces).\nConsult the manpage for more information on using them.')]
-prefJacktip=_("Enable this option to record audio through\nJACK. The Jack server must be running in order to\nobtain the ports that will be recorded.\nThe audio recorded from each one\nwill be written on a channel of its own.\nrecordMyDesktop must be compiled with JACK\nsupport for this option to work.")
-
-prefStrings={ 'UseJack':_("Use Jack for audio capture."),
- 'SelectPorts':_("Select the ports you want to record from\n"
- "(hold Ctrl to select multiple entries):"),
- 'AvailablePorts':_("Available Ports"),
- 'JackLspS1':_("jack_lsp returned no ports."),
- 'JackLspS2':_("Make sure that jackd is running."),
- 'AvailablePortsAdd':_("Available ports (double click to add):"),
- 'SelectedPortsRemove':_("Selected ports (double click to remove):"),
- 'Refresh':_("Refresh")
-}
-
diff --git a/qt-recordmydesktop/src/rmdTrayIcon.py b/qt-recordmydesktop/src/rmdTrayIcon.py
deleted file mode 100644
index 002c589..0000000
--- a/qt-recordmydesktop/src/rmdTrayIcon.py
+++ /dev/null
@@ -1,349 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-import locale, gettext
-import rmdConfig
-import re
-
-def _(s):
- return QtCore.QString.fromUtf8(gettext.gettext(s))
-gettext.textdomain('qt-recordMyDesktop')
-gettext.bindtextdomain('qt-recordMyDesktop',rmdConfig.locale_install_dir)
-
-import rmdTrayPopup as iTP
-import rmdMonitor as imon
-import os,signal,popen2,fcntl
-from rmdStrings import *
-#values struct:
-
-#0 fps
-#1 mouse
-#2 sound on/off
-#3 full
-#4 path
-#5 area
-#6 delay
-#7 channels
-#8 frequency
-#9 device
-#10 v_quality
-#11 s_quality
-#12 display
-#13 shared memory
-#14 drop-frames
-#15 shared threshold
-#16 quick subsampling
-
-
-class trayIcon(object):
- state=0#0 stopped,1 recording,2 paused
- rmdPid=None
- optionsOpen=[1]
- reopen=0
- timed_id=None
-
- def __set_icon__(self,widget,icon):
- widget.setIcon(QtGui.QIcon(self.__get_icon_location__(icon)))
-
-
- def __buttonPress__(self,ActivationReason):
-
- button=0
- if ActivationReason==QtGui.QSystemTrayIcon.Trigger:
- button=1
- elif ActivationReason==QtGui.QSystemTrayIcon.Context:
- button=3
- #print button
- if button==1 and self.state>=0:
- if self.state == 0:
- if self.optionsOpen[0]==1:
- self.parent.hide()
- self.optionsOpen[0]=0
- self.reopen=1
- self.__set_icon__(self.trayIcon,"stop")
- self.state=1
- self.__execRMD__()
- elif self.state== 1:
- self.__set_icon__(self.trayIcon,"start")
- self.state=0
- self.__stopRMD__()
- elif self.state == 2 :
- self.__set_icon__(self.trayIcon,"stop")
- self.state=1
- self.__pauseRMD__()
-
-
- elif button == 3 and self.state>=0:
- if self.state == 0:
- pass
- self.tray_popup.popupmenu.popup(QtGui.QCursor.pos())
- elif self.state == 1:
- self.__set_icon__(self.trayIcon,"pause")
- self.state=2
- self.__pauseRMD__()
- elif self.state ==2:
- self.__set_icon__(self.trayIcon,"stop")
- self.state=1
- self.__pauseRMD__()
- def record_ext(self,button=None):
- if self.state == 0:
- if self.optionsOpen[0]==1:
- self.parent.hide()
- self.optionsOpen[0]=0
- self.reopen=1
- self.__set_icon__(self.trayIcon,"stop")
- self.state=1
- self.__execRMD__()
-
- def __execRMD__(self):
- self.parent.close_advanced()
- self.parent.update()
- self.ch_err=""
- self.execargs=["recordmydesktop","-o",'%s'%self.parent.values[4],
- "--fps","%d"%self.parent.values[0]]
- if self.parent.values[2]==False :
- self.execargs.append("--no-sound")
- if self.parent.values[1] == 1:
- self.execargs.append("--dummy-cursor")
- self.execargs.append("white")
- elif self.parent.values[1] == 2:
- self.execargs.append("--dummy-cursor")
- self.execargs.append("black")
- elif self.parent.values[1] == 3:
- self.execargs.append("--no-cursor")
-
- if self.parent.values[3] == 0:
- self.execargs.append("--full-shots")
- if self.parent.values[13] == 1:
- self.execargs.append("--no-shared")
-
- if self.parent.values[15]==1:
- if self.parent.values[5][0]>0 :
- self.execargs.append('-x')
- self.execargs.append('%d'%self.parent.values[5][0])
- if self.parent.values[5][1]>0:
- self.execargs.append('-y')
- self.execargs.append('%d'%self.parent.values[5][1])
- if self.parent.values[5][2]>0 and self.parent.values[5][3]>0:
- self.execargs.append('--width')
- self.execargs.append('%d'%(self.parent.values[5][2]-self.parent.values[5][0]))
- self.execargs.append('--height')
- self.execargs.append('%d'%(self.parent.values[5][3]-self.parent.values[5][1]))
- if(not self.parent.values[14]):
- for i in range(4):
- self.parent.values[5][i]=-1
- if self.parent.values[6]>0:
- self.execargs.append('--delay')
- self.execargs.append('%d'%self.parent.values[6])
- self.execargs.append('--channels')
- self.execargs.append('%d'%self.parent.values[7])
- self.execargs.append('--freq')
- self.execargs.append('%d'%self.parent.values[8])
- if self.parent.values[9]!='DEFAULT':
- self.execargs.append('--device')
- self.execargs.append('%s'%self.parent.values[9])
- self.execargs.append('--v_quality')
- self.execargs.append('%d'%self.parent.values[10])
- self.execargs.append('--s_quality')
- self.execargs.append('%d'%self.parent.values[11])
- if self.parent.values[12] != "$DISPLAY":
- self.execargs.append('--display')
- self.execargs.append('%s'%self.parent.values[12])
- if self.parent.values[16] == 0:
- self.execargs.append('--quick-subsampling')
- self.execargs.append('--workdir')
- self.execargs.append('%s'%self.parent.values[17])
- if self.parent.values[18] == 0:
- self.execargs.append('--on-the-fly-encoding')
- if self.parent.values[19] == 1:
- self.execargs.append('--compress-cache')
- if self.parent.values[20] == True:
- self.execargs.append('--overwrite')
- if self.parent.values[15] == 0:
- self.execargs.append('--follow-mouse')
- if self.parent.values[22] == True:
- self.execargs.append('--use-jack')
- for i in self.parent.values[23]:
- self.execargs.append(i)
- if self.parent.values[25] == 1:
- self.execargs.append('--no-frame')
- if self.parent.values[26] != "":
- for i in self.parent.values[26].split(" "):
- if i!="":
- self.execargs.append(i)
- #print execargs
-
-
-
- self.childP=popen2.Popen3(self.execargs,"t",0)
- flags = fcntl.fcntl(self.childP.childerr, fcntl.F_GETFL)
- fcntl.fcntl(self.childP.childerr, fcntl.F_SETFL, flags | os.O_NONBLOCK)
- self.rmdPid=self.childP.pid
- self.timed_id=QtCore.QTimer(None)
- self.timed_id.connect(self.timed_id,QtCore.SIGNAL("timeout()"),
- self.__check_status__)
- self.timed_id.start(1000)
-
- def __exit_status_dialog(self,status):
- #first try to write down a log for examination
- try:
- error_log=open(os.path.join(os.getenv("HOME"),"qt-recordMyDesktop-crash.log"),"w")
- error_log.write("#This is the command given at initialization:\n")
- for i in self.execargs:
- error_log.write("%s "%i)
- error_log.write("\n\n\n#recordMyDesktop stderror output:\n")
- error_log.write(self.ch_err)
- try:
- for err_line in self.childP.childerr.readlines():
- error_log.write(err_line)
- except:
- error_log.write("Couldn't write stderror of recordMyDesktop!\n")
- self.childP.childerr.close()
- except:
- print "Couldn't write error log.\n"
- self.dialog = QtGui.QWidget()
- self.label1=None
- try:
- self.label1 = QtGui.QLabel("\t\t"+TrayIconStr['RecFinishedKnown'] +
- ": %d\n"%(status) + TrayIconStr['ErrDesc'] + ":" +
- (rmdErrStr[int(status)]) + "\n")
- except:
- self.label1 = QtGui.QLabel("\t\t"+TrayIconStr['RecFinishedUnknown']+": %d \n"%(status))
- self.label1.setAlignment(QtCore.Qt.AlignHCenter)
- self.dialogbutton = QtGui.QPushButton("Ok",self.dialog)
- self.dialogbutton.connect(self.dialogbutton,QtCore.SIGNAL("clicked()"),self.dialog.close )
- self.dialogLayout=QtGui.QVBoxLayout()
- self.dialogLayout.addWidget(self.label1)
- self.dialogLayout.addWidget(self.dialogbutton)
-
- self.label1.show()
- self.dialogbutton.show()
- self.dialog.setLayout(self.dialogLayout)
- self.dialog.resize(300,128)
- self.dialog.show()
-
- def __pauseRMD__(self):
- os.kill(self.rmdPid,signal.SIGUSR1)
-
- def __stopRMD__(self,need_kill=True):
- if self.timed_id!=None:
- self.timed_id.stop()
- self.timed_id=None
- exit_ret=os.waitpid(self.rmdPid,os.WNOHANG)
- if exit_ret[0] == 0:
- if need_kill:
- os.kill(self.rmdPid,signal.SIGTERM)
- self.state=-1
- monitor=imon.rmdMonitor(self.childP.fromchild,self.rmdPid,self.parent)
- monitor.exec_()
- self.state=0
- else:
- self.__exit_status_dialog(exit_ret[1])
- self.parent.show()
- self.rmdPid=None
- if self.reopen==1:
- self.optionsOpen[0]=1
- self.reopen=0
-
- #print exit_ret
- def __check_status__(self):
- if self.rmdPid!=None:
- exit_ret=os.waitpid(self.rmdPid,os.WNOHANG)
- if exit_ret[0] != 0:
- self.state=0
- self.__set_icon__(self.trayIcon,"start")
- self.__exit_status_dialog(exit_ret[1])
- self.rmdPid=None
- if self.reopen==1:
- self.parent.show()
- self.optionsOpen[0]=1
- self.reopen=0
- self.timed_id.stop()
- return False
- else:
- new_stderr=""
- #try:
- while True:
- try:
- err_line=self.childP.childerr.readline()
- new_stderr+=err_line
- except:
- break
-
- self.ch_err+=new_stderr
- if(self.ch_err.find("STATE:RECORDING")>=0):
- rp=re.compile("STATE:RECORDING")
- self.ch_err=rp.sub("",self.ch_err)
- print "EXTERNAL STATE CHANGE:RECORDING"
- self.__set_icon__(self.trayIcon,"stop")
- self.state=1
- elif(self.ch_err.find("STATE:PAUSED")>=0):
- rp=re.compile("STATE:PAUSED")
- self.ch_err=rp.sub("",self.ch_err)
- print "EXTERNAL STATE CHANGE:PAUSED"
- self.__set_icon__(self.trayIcon,"pause")
- self.state=2
- elif(self.ch_err.find("STATE:ENCODING")>=0):
- rp=re.compile("STATE:ENCODING")
- self.ch_err=rp.sub("",self.ch_err)
- print "EXTERNAL STATE CHANGE:ENCODING"
- self.__stopRMD__(False)
-
- return True
-
- else:
- self.timed_id.stop()
- return False
- def __get_icon_location__(self,name):
- if name=="start":
- return os.path.join(rmdConfig.pixmapdir,"media-record.svg")
- elif name=="stop":
- return os.path.join(rmdConfig.pixmapdir,"media-playback-stop.svg")
- elif name=="pause":
- return os.path.join(rmdConfig.pixmapdir,"media-playback-pause.svg")
-
- def __init__(self,parent):
- self.parent=parent
- self.trayIcon=QtGui.QSystemTrayIcon(None)
- self.__set_icon__(self.trayIcon,"start")
- self.tray_popup=iTP.TrayPopupMenu(self.parent,self.parent.values,self.optionsOpen)
- self.trayIcon.connect(self.trayIcon,QtCore.SIGNAL("activated(QSystemTrayIcon::ActivationReason)"),self.__buttonPress__)
- self.trayIcon.show()
-
-
-if __name__ == "__main__":
- import sys
-
- app=QtGui.QApplication(sys.argv)
- app.values=rmdConfig.default_values
- w = trayIcon(app)
- app.exec_()
-
-
-
-
-
-
diff --git a/qt-recordmydesktop/src/rmdTrayPopup.py b/qt-recordmydesktop/src/rmdTrayPopup.py
deleted file mode 100644
index 3b6b3ab..0000000
--- a/qt-recordmydesktop/src/rmdTrayPopup.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#/******************************************************************************
-#* qt-recordMyDesktop *
-#*******************************************************************************
-#* *
-#* Copyright (C) 2007, 2008 John Varouhakis *
-#* *
-#* *
-#* This program is free software: you can redistribute it and/or modify *
-#* it under the terms of the GNU General Public License as published by *
-#* the Free Software Foundation, either version 3 of the License, or *
-#* (at your option) any later version. *
-#* *
-#* 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, see <http://www.gnu.org/licenses/>. *
-#* *
-#* *
-#* For further information contact me at johnvarouhakis@gmail.com *
-#******************************************************************************/
-
-
-from PyQt4 import QtGui,QtCore
-import locale, gettext
-import rmdConfig
-def _(s):
- return QtCore.QString.fromUtf8(gettext.gettext(s))
-gettext.textdomain('qt-recordMyDesktop')
-gettext.bindtextdomain('qt-recordMyDesktop',rmdConfig.locale_install_dir)
-
-import rmdSelect as iSel
-from rmdStrings import *
-import sys
-#import rmdPrefsWidget as pW
-
-class TrayPopupMenu:
- options=None
- def __init__(self,parent,values,optionsOpen):
- self.parent=parent
- self.optionsOpen=optionsOpen
- self.values=values
- self._setup_popup_menu()
- self.selector = None
- def _setup_popup_menu(self):
- self.popupmenu = QtGui.QMenu()
- self.popupmenu.addAction(TpmStr['ShowHide'],self._prefs_widget)
- self.popupmenu.addAction(TpmStr['SelectOnScreen'].replace("_",""),self._select_area_cb)
- self.popupmenu.addAction(TpmStr['Quit'],self.parent.window.close)
-
- def _prefs_widget(self):
- if self.optionsOpen[0] ==0:
- self.optionsOpen[0]=1
- self.parent.show()
- else:
- self.parent.hide()
- self.optionsOpen[0]=0
-
- def _select_area_cb(self):
- self.popupmenu.hide()
- self.selector = iSel.QtAreaSelector(self.values[5])
- self.selector.showFullScreen()
- self.parent.image.x1=-1
- def show(self):
- QtGui.QMenu.show(self.popupmenu)
- def hide(self):
- self.popupmenu.hide()
-
© All Rights Reserved