Ticket #3152: filter_gui.3.patch
File filter_gui.3.patch, 82.0 KB (added by , 14 years ago) |
---|
-
mythtv/filters/linearblend/filter_linearblend.c
372 372 { 373 373 symbol: "new_filter", 374 374 name: "linearblend", 375 descript: " fast blending deinterlace filter",375 descript: "Fast blending deinterlace filter.", 376 376 formats: FmtList, 377 377 libname: NULL 378 378 }, -
mythtv/filters/quickdnr/filter_quickdnr.c
590 590 { 591 591 symbol: "new_filter", 592 592 name: "quickdnr", 593 descript: " removes noise with a fast single/double thresholded average filter",593 descript: "Removes noise with a fast single/double thresholded average filter.", 594 594 formats: FmtList, 595 595 libname: NULL 596 596 }, -
mythtv/filters/postprocess/filter_postprocess.c
134 134 { 135 135 symbol: "new_filter", 136 136 name: "postprocess", 137 descript: "FFMPEG's postprocessing filters ",137 descript: "FFMPEG's postprocessing filters.", 138 138 formats: FmtList, 139 139 libname: NULL 140 140 }, -
mythtv/filters/onefield/filter_onefield.c
97 97 { 98 98 symbol: "new_filter", 99 99 name: "onefield", 100 descript: " one-field-only deinterlace filter; parameter \"bottom\" for bottom field, otherwise top",100 descript: "One-field-only deinterlace filter.", 101 101 formats: FmtList, 102 libname: NULL ,102 libname: NULL 103 103 }, 104 104 FILT_NULL 105 105 }; -
mythtv/filters/bobdeint/filter_bobdeint.c
143 143 { 144 144 symbol: "new_filter", 145 145 name: "bobdeint", 146 descript: " bob deinterlace filter; splits fields to top and bottom of buffer",146 descript: "Bob deinterlace filter; splits fields to top and bottom of buffer.", 147 147 formats: FmtList, 148 libname: NULL ,148 libname: NULL 149 149 }, 150 150 FILT_NULL 151 151 }; -
mythtv/filters/adjust/filter_adjust.c
314 314 { 315 315 symbol: "newAdjustFilter", 316 316 name: "adjust", 317 descript: " adjust range and gamma of video",317 descript: "Adjust range and gamma of video.", 318 318 formats: FmtList, 319 319 libname: NULL 320 320 }, -
mythtv/filters/yadif/filter_yadif.c
725 725 { 726 726 symbol: "YadifDeintFilter", 727 727 name: "yadifdeint", 728 descript: " combines data from several fields to deinterlace with less motion blur",728 descript: "Combines data from several fields to deinterlace with less motion blur.", 729 729 formats: FmtList, 730 730 libname: NULL 731 731 }, 732 732 { 733 733 symbol: "YadifDeintFilter", 734 734 name: "yadifdoubleprocessdeint", 735 descript: " combines data from several fields to deinterlace with less motion blur",735 descript: "Combines data from several fields to deinterlace with less motion blur.", 736 736 formats: FmtList, 737 737 libname: NULL 738 738 },FILT_NULL -
mythtv/filters/force/filter_force.c
100 100 { 101 101 symbol: "new_force_yv12", 102 102 name: "forceyv12", 103 descript: " forces use of YV12 video format",103 descript: "Forces use of YV12 video format.", 104 104 formats: Fmt_List_YV12, 105 105 libname: NULL 106 106 }, 107 107 { 108 108 symbol: "new_force_yuv422p", 109 109 name: "forceyuv422p", 110 descript: "forces use of YUV422P video format ",110 descript: "forces use of YUV422P video format.", 111 111 formats: Fmt_List_YUV422P, 112 112 libname: NULL 113 113 }, 114 114 { 115 115 symbol: "new_force_rgb24", 116 116 name: "forcergb24", 117 descript: " forces use of RGB24 video format",117 descript: "Forces use of RGB24 video format.", 118 118 formats: Fmt_List_RGB24, 119 119 libname: NULL 120 120 }, 121 121 { 122 122 symbol: "new_force_argb32", 123 123 name: "forceargb32", 124 descript: " forces use of ARGB32 video format",124 descript: "Forces use of ARGB32 video format.", 125 125 formats: Fmt_List_ARGB32, 126 126 libname: NULL 127 127 }, -
mythtv/filters/crop/filter_crop.c
303 303 { 304 304 symbol: "new_filter", 305 305 name: "crop", 306 descript: " crops picture by macroblock intervals",306 descript: "Crops picture by macroblock intervals.", 307 307 formats: FmtList, 308 308 libname: NULL 309 309 }, -
mythtv/filters/kerneldeint/filter_kerneldeint.c
665 665 { 666 666 symbol: "NewKernelDeintFilter", 667 667 name: "kerneldeint", 668 descript: " combines data from several fields to deinterlace "669 "with less motion blur ",668 descript: "Combines data from several fields to deinterlace " 669 "with less motion blur.", 670 670 formats: FmtList, 671 671 libname: NULL 672 672 }, -
mythtv/filters/ivtc/filter_ivtc.c
253 253 { 254 254 symbol: "NewIvtcFilter", 255 255 name: "ivtc", 256 descript: " inverse telecine filter",256 descript: "Inverse telecine filter.", 257 257 formats: FmtList, 258 258 libname: NULL 259 259 }, -
mythtv/filters/invert/filter_invert.c
79 79 { 80 80 symbol: "new_filter", 81 81 name: "invert", 82 descript: " inverts the colors of the input video",82 descript: "Inverts the colors of the input video.", 83 83 formats: FmtList, 84 84 libname: NULL 85 85 }, -
mythtv/filters/greedyhdeint/filter_greedyhdeint.c
275 275 { 276 276 symbol: "GreedyHDeintFilter", 277 277 name: "greedyhdeint", 278 descript: " combines data from several fields to deinterlace with less motion blur",278 descript: "Combines data from several fields to deinterlace with less motion blur.", 279 279 formats: FmtList, 280 280 libname: NULL 281 281 }, 282 282 { 283 283 symbol: "GreedyHDeintFilter", 284 284 name: "greedyhdoubleprocessdeint", 285 descript: " combines data from several fields to deinterlace with less motion blur",285 descript: "Combines data from several fields to deinterlace with less motion blur.", 286 286 formats: FmtList, 287 287 libname: NULL 288 288 },FILT_NULL -
mythtv/filters/denoise3d/filter_denoise3d.c
473 473 { 474 474 symbol: "NewDenoise3DFilter", 475 475 name: "denoise3d", 476 descript: " removes noise with a spatial and temporal low-pass filter",476 descript: "Removes noise with a spatial and temporal low-pass filter.", 477 477 formats: FmtList, 478 478 libname: NULL 479 479 }, -
mythtv/themes/default/filters-ui.xml
1 <mythuitheme> 2 <window name="filterlist"> 3 <textarea name="heading"> 4 <area>30,10,740,40</area> 5 <font>baselarge</font> 6 <value>Filter Configuration</value> 7 </textarea> 8 9 <shape name="background"> 10 <area>10,50,780,280</area> 11 <type>roundbox</type> 12 <fill color="#000000" alpha="90" /> 13 <line color="#FFFFFF" alpha="255" width="2" /> 14 <cornerradius>12</cornerradius> 15 </shape> 16 17 <buttonlist name="filters" from="basebuttonlist2"> 18 <position>10,63</position> 19 </buttonlist> 20 21 <button name="addfilter" from="basebutton"> 22 <position>20,345</position> 23 <value>Add Filter</value> 24 </button> 25 26 <textarea name="helplabel"> 27 <area>30,400,740,30</area> 28 <font>basemedium</font> 29 </textarea> 30 <textarea name="helptext"> 31 <area>40,440,730,140</area> 32 <multiline>yes</multiline> 33 </textarea> 34 </window> 35 36 <window name ="cropscreen" > 37 <textarea name="heading"> 38 <area>30,10,740,40</area> 39 <font>baselarge</font> 40 </textarea> 41 42 <textarea name="helptext"> 43 <area>40,440,730,140</area> 44 <multiline>yes</multiline> 45 </textarea> 46 47 <button name="cancelbutton" from="basebutton"> 48 <position>30,520</position> 49 <value>Cancel</value> 50 </button> 51 52 <button name="acceptbutton" from="basebutton"> 53 <position>600,520</position> 54 <value>Accept</value> 55 </button> 56 57 <textarea name="toplabel" from="basetextarea"> 58 <area>30,70,200,25</area> 59 <value>Top:</value> 60 </textarea> 61 62 <textarea name= "leftlabel" from="toplabel"> 63 <position>30, 150</position> 64 <value>Left:</value> 65 </textarea> 66 67 <textarea name= "bottomlabel" from="toplabel"> 68 <position>30, 230</position> 69 <value>Bottom:</value> 70 </textarea> 71 72 <textarea name= "rightlabel" from="toplabel"> 73 <position>30, 310</position> 74 <value>Right:</value> 75 </textarea> 76 77 <spinbox name="topvalue" from="basespinbox"> 78 <position>240, 60</position> 79 <helptext>Amount to crop on top as number of 16 pixel blocks.</helptext> 80 </spinbox> 81 82 <spinbox name="leftvalue" from="topvalue"> 83 <position>240, 140</position> 84 <helptext>Amount to crop on left as number of 16 pixel blocks.</helptext> 85 </spinbox> 86 87 <spinbox name="bottomvalue" from="topvalue"> 88 <position>240, 220</position> 89 <helptext>Amount to crop on bottom as number of 16 pixel blocks.</helptext> 90 </spinbox> 91 92 <spinbox name="rightvalue" from="topvalue"> 93 <position>240, 300</position> 94 <helptext>Amount to crop on right as number of 16 pixel blocks.</helptext> 95 </spinbox> 96 </window> 97 98 <window name ="onefieldscreen" > 99 <textarea name="heading"> 100 <area>30,10,740,40</area> 101 <font>baselarge</font> 102 </textarea> 103 104 <textarea name="helptext"> 105 <area>40,440,730,140</area> 106 <multiline>yes</multiline> 107 </textarea> 108 109 <button name="cancelbutton" from="basebutton"> 110 <position>30,520</position> 111 <value>Cancel</value> 112 </button> 113 114 <button name="acceptbutton" from="basebutton"> 115 <position>600,520</position> 116 <value>Accept</value> 117 </button> 118 119 <textarea name="fieldlabel" from="basetextarea"> 120 <area>30,70,200,25</area> 121 <value>Keep Bottom Field:</value> 122 </textarea> 123 124 <checkbox name="fieldvalue" from="basecheckbox"> 125 <position>240, 60</position> 126 <helptext>Keep the bottom field instead of the top one.</helptext> 127 </checkbox> 128 </window> 129 130 <window name ="denoise3dscreen" > 131 <textarea name="heading"> 132 <area>30,10,740,40</area> 133 <font>baselarge</font> 134 </textarea> 135 136 <textarea name="helptext"> 137 <area>40,440,730,140</area> 138 <multiline>yes</multiline> 139 </textarea> 140 141 <button name="cancelbutton" from="basebutton"> 142 <position>30,520</position> 143 <value>Cancel</value> 144 </button> 145 146 <button name="acceptbutton" from="basebutton"> 147 <position>600,520</position> 148 <value>Accept</value> 149 </button> 150 151 <textarea name="defaultlabel" from="basetextarea"> 152 <area>30,70,200,25</area> 153 <value>Use Defaults:</value> 154 </textarea> 155 156 <checkbox name="defaultvalue" from="basecheckbox"> 157 <position>240, 65</position> 158 <helptext>Use the default parameters.</helptext> 159 </checkbox> 160 161 <textarea name="lumaspatiallabel" from="basetextarea"> 162 <area>30,150,350,25</area> 163 <value>Luma Spatial Filter Strength:</value> 164 </textarea> 165 166 <textarea name= "chromaspatiallabel" from="lumaspatiallabel"> 167 <position>30, 230</position> 168 <value>Chroma Spatial Filter Strength:</value> 169 </textarea> 170 171 <textarea name= "lumatemporallabel" from="lumaspatiallabel"> 172 <position>30, 310</position> 173 <value>Luma Temporal Filter Strength:</value> 174 </textarea> 175 176 <spinbox name="lumaspatialvalue" from="basespinbox"> 177 <position>390, 140</position> 178 <helptext>Luma spatial filter strength.</helptext> 179 </spinbox> 180 181 <spinbox name="chromaspatialvalue" from="lumaspatialvalue"> 182 <position>390, 220</position> 183 <helptext>Chroma spatial filter strength.</helptext> 184 </spinbox> 185 186 <spinbox name="lumatemporalvalue" from="lumaspatialvalue"> 187 <position>390, 300</position> 188 <helptext>Luma temporal filter strength.</helptext> 189 </spinbox> 190 </window> 191 192 <window name ="adjustscreen" > 193 <textarea name="heading"> 194 <area>30,10,740,40</area> 195 <font>baselarge</font> 196 </textarea> 197 198 <textarea name="helptext"> 199 <area>40,440,730,140</area> 200 <multiline>yes</multiline> 201 </textarea> 202 203 <button name="cancelbutton" from="basebutton"> 204 <position>30,520</position> 205 <value>Cancel</value> 206 </button> 207 208 <button name="acceptbutton" from="basebutton"> 209 <position>600,520</position> 210 <value>Accept</value> 211 </button> 212 213 <textarea name="defaultlabel" from="basetextarea"> 214 <area>30,70,200,25</area> 215 <value>Use Defaults:</value> 216 </textarea> 217 218 <checkbox name="defaultvalue" from="basecheckbox"> 219 <position>240, 65</position> 220 <helptext>Use the default parameters.</helptext> 221 </checkbox> 222 223 <textarea name="minlumalabel" from="basetextarea"> 224 <area>30,150,350,25</area> 225 <value>Min Luma:</value> 226 </textarea> 227 228 <textarea name= "maxlumalabel" from="minlumalabel"> 229 <position>30, 230</position> 230 <value>Max Luma:</value> 231 </textarea> 232 233 <textarea name= "lumagammalabel" from="minlumalabel"> 234 <position>30, 310</position> 235 <value>Luma Gamma:</value> 236 </textarea> 237 238 <textarea name="minchromalabel" from="minlumalabel"> 239 <position>390, 150</position> 240 <value>Min Chroma:</value> 241 </textarea> 242 243 <textarea name= "maxchromalabel" from="minlumalabel"> 244 <position>390, 230</position> 245 <value>Max Chroma:</value> 246 </textarea> 247 248 <textarea name= "chromagammalabel" from="minlumalabel"> 249 <position>390, 310</position> 250 <value>Chroma Gamma:</value> 251 </textarea> 252 253 <spinbox name="minlumavalue" from="basespinbox"> 254 <position>250, 140</position> 255 <helptext>Minimum luma input value.</helptext> 256 </spinbox> 257 258 <spinbox name="maxlumavalue" from="minlumavalue"> 259 <position>250, 220</position> 260 <helptext>Maximum luma input value.</helptext> 261 </spinbox> 262 263 <spinbox name="lumagammavalue" from="minlumavalue"> 264 <position>250, 300</position> 265 <helptext>Luma gamma correction.</helptext> 266 </spinbox> 267 268 <spinbox name="minchromavalue" from="minlumavalue"> 269 <position>610, 140</position> 270 <helptext>Minimum chroma input value.</helptext> 271 </spinbox> 272 273 <spinbox name="maxchromavalue" from="minlumavalue"> 274 <position>610, 220</position> 275 <helptext>Maximum chroma input value.</helptext> 276 </spinbox> 277 278 <spinbox name="chromagammavalue" from="minlumavalue"> 279 <position>610, 300</position> 280 <helptext>Chroma gamma correction.</helptext> 281 </spinbox> 282 </window> 283 284 <window name ="customfilterscreen"> 285 <area>-1,-1,580,165</area> 286 287 <imagetype name="backimg"> 288 <filename>mythprogressdialog-background.png</filename> 289 </imagetype> 290 <textarea name="heading" from="basetextarea"> 291 <area>20,20,540,30</area> 292 <align>allcenter</align> 293 </textarea> 294 295 <button name="acceptbutton" from="basebutton"> 296 <position>109,110</position> 297 <value>Accept</value> 298 </button> 299 300 <textedit name="optionsinput" from="basetextedit"> 301 <position>102,50</position> 302 </textedit> 303 </window> 304 305 </mythuitheme> -
mythtv/themes/default-wide/filters-ui.xml
1 <mythuitheme> 2 <window name="filterlist"> 3 <textarea name="heading"> 4 <area>20,5,570,40</area> 5 <font>baselarge</font> 6 <value>Filter Configuration</value> 7 </textarea> 8 9 <shape name="background"> 10 <area>20,49,1240,360</area> 11 <type>roundbox</type> 12 <fill color="#000000" alpha="90" /> 13 <line color="#FFFFFF" alpha="255" width="2" /> 14 <cornerradius>12</cornerradius> 15 </shape> 16 17 <buttonlist name="filters" from="basebuttonlist2"> 18 <position>25,56</position> 19 </buttonlist> 20 21 <button name="addfilter" from="basebutton"> 22 <position>20,430</position> 23 <value>Add Filter</value> 24 </button> 25 26 <textarea name="helplabel"> 27 <area>30,480,740,40</area> 28 <font>baselarge</font> 29 </textarea> 30 <textarea name="helptext"> 31 <area>40,520,1200,170</area> 32 <multiline>yes</multiline> 33 </textarea> 34 </window> 35 36 <window name ="cropscreen" > 37 <textarea name="heading"> 38 <area>10,10,1260,40</area> 39 <font>baselarge</font> 40 <align>center</align> 41 </textarea> 42 43 <textarea name="helptext"> 44 <area>40,490,1200,140</area> 45 <multiline>yes</multiline> 46 <font>basemedium</font> 47 <align>center</align> 48 </textarea> 49 50 <button name="cancelbutton" from="basebutton"> 51 <position>350,625</position> 52 <value>Cancel</value> 53 </button> 54 55 <button name="acceptbutton" from="basebutton"> 56 <position>780,625</position> 57 <value>Accept</value> 58 </button> 59 60 <textarea name="toplabel" from="basetextarea"> 61 <area>300,170,200,25</area> 62 <align>right</align> 63 <value>Top:</value> 64 </textarea> 65 66 <textarea name= "leftlabel" from="toplabel"> 67 <position>300, 250</position> 68 <value>Left:</value> 69 </textarea> 70 71 <textarea name= "bottomlabel" from="toplabel"> 72 <position>300, 330</position> 73 <value>Bottom:</value> 74 </textarea> 75 76 <textarea name= "rightlabel" from="toplabel"> 77 <position>300, 410</position> 78 <value>Right:</value> 79 </textarea> 80 81 <spinbox name="topvalue" from="basespinbox"> 82 <position>780, 160</position> 83 <helptext>Amount to crop on top as number of 16 pixel blocks.</helptext> 84 </spinbox> 85 86 <spinbox name="leftvalue" from="topvalue"> 87 <position>780, 240</position> 88 <helptext>Amount to crop on left as number of 16 pixel blocks.</helptext> 89 </spinbox> 90 91 <spinbox name="bottomvalue" from="topvalue"> 92 <position>780, 320</position> 93 <helptext>Amount to crop on bottom as number of 16 pixel blocks.</helptext> 94 </spinbox> 95 96 <spinbox name="rightvalue" from="topvalue"> 97 <position>780, 400</position> 98 <helptext>Amount to crop on right as number of 16 pixel blocks.</helptext> 99 </spinbox> 100 </window> 101 102 <window name ="onefieldscreen" > 103 <textarea name="heading"> 104 <area>10,10,1260,40</area> 105 <font>baselarge</font> 106 <align>center</align> 107 </textarea> 108 109 <textarea name="helptext"> 110 <area>40,490,1200,140</area> 111 <multiline>yes</multiline> 112 <font>basemedium</font> 113 <align>center</align> 114 </textarea> 115 116 <button name="cancelbutton" from="basebutton"> 117 <position>350,625</position> 118 <value>Cancel</value> 119 </button> 120 121 <button name="acceptbutton" from="basebutton"> 122 <position>780,625</position> 123 <value>Accept</value> 124 </button> 125 126 <textarea name="fieldlabel" from="basetextarea"> 127 <area>400,270,200,25</area> 128 <value>Keep Bottom Field:</value> 129 <align>right</align> 130 </textarea> 131 132 <checkbox name="fieldvalue" from="basecheckbox"> 133 <position>780, 260</position> 134 <helptext>Keep the bottom field instead of the top one.</helptext> 135 </checkbox> 136 </window> 137 138 <window name ="denoise3dscreen" > 139 <textarea name="heading"> 140 <area>10,10,1260,40</area> 141 <font>baselarge</font> 142 <align>center</align> 143 </textarea> 144 145 <textarea name="helptext"> 146 <area>40,490,1200,140</area> 147 <multiline>yes</multiline> 148 <font>basemedium</font> 149 <align>center</align> 150 </textarea> 151 152 <button name="cancelbutton" from="basebutton"> 153 <position>350,625</position> 154 <value>Cancel</value> 155 </button> 156 157 <button name="acceptbutton" from="basebutton"> 158 <position>780,625</position> 159 <value>Accept</value> 160 </button> 161 162 <textarea name="defaultlabel" from="basetextarea"> 163 <area>400,170,200,25</area> 164 <value>Use Defaults:</value> 165 </textarea> 166 167 <checkbox name="defaultvalue" from="basecheckbox"> 168 <position>610, 165</position> 169 <helptext>Use the default parameters.</helptext> 170 </checkbox> 171 172 <textarea name="lumaspatiallabel" from="basetextarea"> 173 <area>400,250,350,25</area> 174 <value>Luma Spatial Filter Strength:</value> 175 </textarea> 176 177 <textarea name= "chromaspatiallabel" from="lumaspatiallabel"> 178 <position>400, 330</position> 179 <value>Chroma Spatial Filter Strength:</value> 180 </textarea> 181 182 <textarea name= "lumatemporallabel" from="lumaspatiallabel"> 183 <position>400, 410</position> 184 <value>Luma Temporal Filter Strength:</value> 185 </textarea> 186 187 <spinbox name="lumaspatialvalue" from="basespinbox"> 188 <position>760, 240</position> 189 <helptext>Luma spatial filter strength.</helptext> 190 </spinbox> 191 192 <spinbox name="chromaspatialvalue" from="lumaspatialvalue"> 193 <position>760, 320</position> 194 <helptext>Chroma spatial filter strength.</helptext> 195 </spinbox> 196 197 <spinbox name="lumatemporalvalue" from="lumaspatialvalue"> 198 <position>760, 400</position> 199 <helptext>Luma temporal filter strength.</helptext> 200 </spinbox> 201 </window> 202 203 <window name ="adjustscreen" > 204 <textarea name="heading"> 205 <area>10,10,1260,40</area> 206 <font>baselarge</font> 207 <align>center</align> 208 </textarea> 209 210 <textarea name="helptext"> 211 <area>40,490,1200,140</area> 212 <multiline>yes</multiline> 213 <font>basemedium</font> 214 <align>center</align> 215 </textarea> 216 217 <button name="cancelbutton" from="basebutton"> 218 <position>350,625</position> 219 <value>Cancel</value> 220 </button> 221 222 <button name="acceptbutton" from="basebutton"> 223 <position>780,625</position> 224 <value>Accept</value> 225 </button> 226 227 <textarea name="defaultlabel" from="basetextarea"> 228 <area>230,170,200,25</area> 229 <value>Use Defaults:</value> 230 </textarea> 231 232 <checkbox name="defaultvalue" from="basecheckbox"> 233 <position>440, 165</position> 234 <helptext>Use the default parameters.</helptext> 235 </checkbox> 236 237 <textarea name="minlumalabel" from="basetextarea"> 238 <area>230,250,350,25</area> 239 <value>Min Luma:</value> 240 </textarea> 241 242 <textarea name= "maxlumalabel" from="minlumalabel"> 243 <position>230, 330</position> 244 <value>Max Luma:</value> 245 </textarea> 246 247 <textarea name= "lumagammalabel" from="minlumalabel"> 248 <position>230, 410</position> 249 <value>Luma Gamma:</value> 250 </textarea> 251 252 <textarea name="minchromalabel" from="minlumalabel"> 253 <position>760, 250</position> 254 <value>Min Chroma:</value> 255 </textarea> 256 257 <textarea name= "maxchromalabel" from="minlumalabel"> 258 <position>760, 330</position> 259 <value>Max Chroma:</value> 260 </textarea> 261 262 <textarea name= "chromagammalabel" from="minlumalabel"> 263 <position>760, 410</position> 264 <value>Chroma Gamma:</value> 265 </textarea> 266 267 <spinbox name="minlumavalue" from="basespinbox"> 268 <position>450, 240</position> 269 <helptext>Minimum luma input value.</helptext> 270 </spinbox> 271 272 <spinbox name="maxlumavalue" from="minlumavalue"> 273 <position>450, 320</position> 274 <helptext>Maximum luma input value.</helptext> 275 </spinbox> 276 277 <spinbox name="lumagammavalue" from="minlumavalue"> 278 <position>450, 400</position> 279 <helptext>Luma gamma correction.</helptext> 280 </spinbox> 281 282 <spinbox name="minchromavalue" from="minlumavalue"> 283 <position>980, 240</position> 284 <helptext>Minimum chroma input value.</helptext> 285 </spinbox> 286 287 <spinbox name="maxchromavalue" from="minlumavalue"> 288 <position>980, 320</position> 289 <helptext>Maximum chroma input value.</helptext> 290 </spinbox> 291 292 <spinbox name="chromagammavalue" from="minlumavalue"> 293 <position>980, 400</position> 294 <helptext>Chroma gamma correction.</helptext> 295 </spinbox> 296 </window> 297 298 <window name ="customfilterscreen" > 299 <area>-1,-1,580,165</area> 300 301 <imagetype name="backimg"> 302 <filename>mythprogressdialog-background.png</filename> 303 </imagetype> 304 <textarea name="heading"> 305 <area>20,20,540,30</area> 306 <align>allcenter</align> 307 </textarea> 308 309 <button name="acceptbutton" from="basebutton"> 310 <position>109,110</position> 311 <value>Accept</value> 312 </button> 313 314 <textedit name="optionsinput" from="basetextedit"> 315 <position>102,50</position> 316 </textedit> 317 </window> 318 </mythuitheme> -
mythtv/libs/libmythtv/filterscreen.cpp
1 2 #include "filterscreen.h" 3 #include "filtermanager.h" 4 #include "mythverbose.h" 5 6 #include <mythscreenstack.h> 7 8 /** \class FilterScreen 9 * \brief Provides an interface for configuring individual video filters. 10 * 11 * FilterScreen displays a configuration screen for modifying the parameters 12 * of a video filter. 13 */ 14 FilterScreen::FilterScreen(MythScreenStack *parent, QString filterName, QString filterParams, bool edit) : 15 MythScreenType(parent, "FilterScreen"), 16 m_filterName(filterName), 17 m_filterParams(filterParams), 18 m_edit(edit) 19 { 20 m_heading = NULL; 21 m_helpText = NULL; 22 m_cancelButton = NULL; 23 m_acceptButton = NULL; 24 } 25 26 bool FilterScreen::CreateCommon() 27 { 28 m_heading = dynamic_cast<MythUIText *>(GetChild("heading")); 29 m_helpText = dynamic_cast<MythUIText *>(GetChild("helptext")); 30 m_cancelButton = dynamic_cast<MythUIButton *>(GetChild("cancelbutton")); 31 m_acceptButton = dynamic_cast<MythUIButton *>(GetChild("acceptbutton")); 32 33 if (!m_helpText || !m_heading || !m_cancelButton || !m_acceptButton) 34 { 35 VERBOSE(VB_IMPORTANT, "FilterScreen, theme is missing " 36 "required elements"); 37 return false; 38 } 39 40 QString name(m_filterName); 41 name[0] = name[0].toUpper(); 42 m_heading->SetText(tr("Configure") + ' ' + name + ' ' + tr("Filter")); 43 44 connect(m_acceptButton, SIGNAL(Clicked()), SLOT(accept())); 45 connect(m_cancelButton, SIGNAL(Clicked()), SLOT(Close())); 46 47 return true; 48 } 49 50 void FilterScreen::setHelpText() 51 { 52 m_helpText->SetText(GetFocusWidget()->GetHelpText()); 53 } 54 55 bool CropScreen::Create() 56 { 57 if (!LoadWindowFromXML("filters-ui.xml", "cropscreen", this)) 58 return false; 59 60 m_topValue = dynamic_cast<MythUISpinBox *>(GetChild("topvalue")); 61 m_leftValue = dynamic_cast<MythUISpinBox *>(GetChild("leftvalue")); 62 m_bottomValue = dynamic_cast<MythUISpinBox *>(GetChild("bottomvalue")); 63 m_rightValue = dynamic_cast<MythUISpinBox *>(GetChild("rightvalue")); 64 65 if (!CreateCommon() || !m_topValue || !m_leftValue || !m_bottomValue || !m_rightValue) 66 { 67 VERBOSE(VB_IMPORTANT, "CropScreen, theme is missing " 68 "required elements"); 69 return false; 70 } 71 72 connect(m_topValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 73 connect(m_leftValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 74 connect(m_bottomValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 75 connect(m_rightValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 76 77 if (!Load()) 78 return false; 79 80 BuildFocusList(); 81 82 return true; 83 } 84 85 bool CropScreen::Load() 86 { 87 QStringList arguments = m_filterParams.split(':'); 88 89 QString top = "1"; 90 QString left = "1"; 91 QString bottom = "1"; 92 QString right = "1"; 93 94 if (arguments.size() > 0 && !arguments[0].isEmpty()) 95 top = arguments[0]; 96 if (arguments.size() > 1) 97 left = arguments[1]; 98 if (arguments.size() > 2) 99 bottom = arguments[2]; 100 if (arguments.size() > 3) 101 right = arguments[3]; 102 103 m_topValue->SetRange(0, 255, 1); 104 m_topValue->SetValue(top); 105 106 m_leftValue->SetRange(0, 255, 1); 107 m_leftValue->SetValue(left); 108 109 m_bottomValue->SetRange(0, 255, 1); 110 m_bottomValue->SetValue(bottom); 111 112 m_rightValue->SetRange(0, 255, 1); 113 m_rightValue->SetValue(right); 114 115 return true; 116 } 117 118 void CropScreen::accept() 119 { 120 QString filter(m_filterName); 121 filter.append('='); 122 filter.append(m_topValue->GetValue()); 123 filter.append(':'); 124 filter.append(m_leftValue->GetValue()); 125 filter.append(':'); 126 filter.append(m_bottomValue->GetValue()); 127 filter.append(':'); 128 filter.append(m_rightValue->GetValue()); 129 130 emit accepting(filter); 131 Close(); 132 } 133 134 bool Denoise3dScreen::Create() 135 { 136 if (!LoadWindowFromXML("filters-ui.xml", "denoise3dscreen", this)) 137 return false; 138 139 m_defaultValue = dynamic_cast<MythUICheckBox *>(GetChild("defaultvalue")); 140 m_lumaSpatialLabel = dynamic_cast<MythUIText *>(GetChild("lumaspatiallabel")); 141 m_chromaSpatialLabel = dynamic_cast<MythUIText *>(GetChild("chromaspatiallabel")); 142 m_lumaTemporalLabel = dynamic_cast<MythUIText *>(GetChild("lumatemporallabel")); 143 m_lumaSpatialValue = dynamic_cast<MythUISpinBox *>(GetChild("lumaspatialvalue")); 144 m_chromaSpatialValue = dynamic_cast<MythUISpinBox *>(GetChild("chromaspatialvalue")); 145 m_lumaTemporalValue = dynamic_cast<MythUISpinBox *>(GetChild("lumatemporalvalue")); 146 147 if (!CreateCommon() || !m_defaultValue || !m_lumaSpatialLabel || !m_chromaSpatialLabel || 148 !m_lumaTemporalLabel || !m_lumaSpatialValue || !m_chromaSpatialValue || !m_lumaTemporalValue) 149 { 150 VERBOSE(VB_IMPORTANT, "Denoise3dScreen, theme is missing " 151 "required elements"); 152 return false; 153 } 154 155 connect(m_defaultValue, SIGNAL(valueChanged()), SLOT(useDefaults())); 156 connect(m_defaultValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 157 connect(m_lumaSpatialValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 158 connect(m_chromaSpatialValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 159 connect(m_lumaTemporalValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 160 161 if (!Load()) 162 return false; 163 164 BuildFocusList(); 165 166 return true; 167 } 168 169 bool Denoise3dScreen::Load() 170 { 171 if (m_edit && m_filterParams.trimmed().isEmpty()) 172 { 173 m_defaultValue->SetCheckState(MythUIStateType::Full); 174 } 175 176 float lumaSpatialStrength = 0; 177 float chromaSpatialStrength = 0; 178 float lumaTemporalStrengh = 0; 179 180 QStringList arguments = m_filterParams.split(':'); 181 182 if (arguments.size() > 0 && !arguments[0].isEmpty()) 183 lumaSpatialStrength = arguments[0].toFloat() * 100; 184 if (arguments.size() > 1) 185 chromaSpatialStrength = arguments[1].toFloat() * 100; 186 if (arguments.size() > 2) 187 lumaTemporalStrengh = arguments[2].toFloat() * 100; 188 189 m_lumaSpatialValue->SetRange(0, 100, 1); 190 m_lumaSpatialValue->SetValue(lumaSpatialStrength); 191 192 m_chromaSpatialValue->SetRange(0, 100, 1); 193 m_chromaSpatialValue->SetValue(chromaSpatialStrength); 194 195 m_lumaTemporalValue->SetRange(0, 100, 1); 196 m_lumaTemporalValue->SetValue(lumaTemporalStrengh); 197 198 return true; 199 } 200 201 void Denoise3dScreen::useDefaults() 202 { 203 bool visible = m_defaultValue->GetCheckState() != MythUIStateType::Full; 204 m_lumaSpatialLabel->SetVisible(visible); 205 m_chromaSpatialLabel->SetVisible(visible); 206 m_lumaTemporalLabel->SetVisible(visible); 207 m_lumaSpatialValue->SetVisible(visible); 208 m_chromaSpatialValue->SetVisible(visible); 209 m_lumaTemporalValue->SetVisible(visible); 210 } 211 212 void Denoise3dScreen::accept() 213 { 214 QString filter(m_filterName); 215 216 if(m_defaultValue->GetCheckState() != MythUIStateType::Full) 217 { 218 filter.append('='); 219 filter.append(QString::number(m_lumaSpatialValue->GetIntValue() / 100.0, 'g', 2)); 220 filter.append(':'); 221 filter.append(QString::number(m_chromaSpatialValue->GetIntValue() / 100.0, 'g', 2)); 222 filter.append(':'); 223 filter.append(QString::number(m_lumaTemporalValue->GetIntValue() / 100.0, 'g', 2)); 224 } 225 226 emit accepting(filter); 227 Close(); 228 } 229 230 bool AdjustScreen::Create() 231 { 232 if (!LoadWindowFromXML("filters-ui.xml", "adjustscreen", this)) 233 return false; 234 235 m_defaultValue = dynamic_cast<MythUICheckBox *>(GetChild("defaultvalue")); 236 m_minLumaLabel = dynamic_cast<MythUIText *>(GetChild("minlumalabel")); 237 m_maxLumaLabel = dynamic_cast<MythUIText *>(GetChild("maxlumalabel")); 238 m_lumaGammaLabel = dynamic_cast<MythUIText *>(GetChild("lumagammalabel")); 239 m_minChromaLabel = dynamic_cast<MythUIText *>(GetChild("minchromalabel")); 240 m_maxChromaLabel = dynamic_cast<MythUIText *>(GetChild("maxchromalabel")); 241 m_chromaGammaLabel = dynamic_cast<MythUIText *>(GetChild("chromagammalabel")); 242 m_minLumaValue = dynamic_cast<MythUISpinBox *>(GetChild("minlumavalue")); 243 m_maxLumaValue = dynamic_cast<MythUISpinBox *>(GetChild("maxlumavalue")); 244 m_lumaGammaValue = dynamic_cast<MythUISpinBox *>(GetChild("lumagammavalue")); 245 m_minChromaValue = dynamic_cast<MythUISpinBox *>(GetChild("minchromavalue")); 246 m_maxChromaValue = dynamic_cast<MythUISpinBox *>(GetChild("maxchromavalue")); 247 m_chromaGammaValue = dynamic_cast<MythUISpinBox *>(GetChild("chromagammavalue")); 248 249 if (!CreateCommon() || !m_defaultValue || !m_minLumaLabel || !m_maxLumaLabel || 250 !m_lumaGammaLabel || !m_minChromaLabel || !m_maxChromaLabel || !m_chromaGammaLabel || 251 !m_minLumaValue || !m_maxLumaValue || !m_lumaGammaValue || !m_minChromaValue || 252 !m_maxChromaValue || !m_chromaGammaValue) 253 { 254 VERBOSE(VB_IMPORTANT, "AdjustScreen, theme is missing " 255 "required elements"); 256 return false; 257 } 258 259 connect(m_defaultValue, SIGNAL(valueChanged()), SLOT(useDefaults())); 260 connect(m_defaultValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 261 connect(m_minLumaValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 262 connect(m_maxLumaValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 263 connect(m_lumaGammaValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 264 connect(m_minChromaValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 265 connect(m_maxChromaValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 266 connect(m_chromaGammaValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 267 268 if (!Load()) 269 return false; 270 271 BuildFocusList(); 272 273 return true; 274 } 275 276 bool AdjustScreen::Load() 277 { 278 if (m_edit && m_filterParams.trimmed().isEmpty()) 279 { 280 m_defaultValue->SetCheckState(MythUIStateType::Full); 281 } 282 283 QString minLuma = "16"; 284 QString maxLuma = "253"; 285 float lumaGamma = 100; 286 QString minChroma = "16"; 287 QString maxChroma = "240"; 288 float chromaGamma = 100; 289 290 QStringList arguments = m_filterParams.split(':'); 291 292 if (arguments.size() > 0 && !arguments[0].isEmpty()) 293 minLuma = arguments[0]; 294 if (arguments.size() > 1) 295 maxLuma = arguments[1]; 296 if (arguments.size() > 2) 297 lumaGamma = arguments[2].toFloat() * 100; 298 if (arguments.size() > 3) 299 minChroma = arguments[3]; 300 if (arguments.size() > 4) 301 maxChroma = arguments[4]; 302 if (arguments.size() > 5) 303 chromaGamma = arguments[5].toFloat() * 100; 304 305 m_minLumaValue->SetRange(0, 255, 1); 306 m_minLumaValue->SetValue(minLuma); 307 308 m_maxLumaValue->SetRange(0, 255, 1); 309 m_maxLumaValue->SetValue(maxLuma); 310 311 m_lumaGammaValue->SetRange(0, 100, 1); 312 m_lumaGammaValue->SetValue(lumaGamma); 313 314 m_minChromaValue->SetRange(0, 255, 1); 315 m_minChromaValue->SetValue(minChroma); 316 317 m_maxChromaValue->SetRange(0, 255, 1); 318 m_maxChromaValue->SetValue(maxChroma); 319 320 m_chromaGammaValue->SetRange(0, 100, 1); 321 m_chromaGammaValue->SetValue(chromaGamma); 322 323 return true; 324 } 325 326 void AdjustScreen::useDefaults() 327 { 328 bool visible = m_defaultValue->GetCheckState() != MythUIStateType::Full; 329 330 m_minLumaLabel->SetVisible(visible); 331 m_maxLumaLabel->SetVisible(visible); 332 m_lumaGammaLabel->SetVisible(visible); 333 m_minChromaLabel->SetVisible(visible); 334 m_maxChromaLabel->SetVisible(visible); 335 m_chromaGammaLabel->SetVisible(visible); 336 m_minLumaValue->SetVisible(visible); 337 m_maxLumaValue->SetVisible(visible); 338 m_lumaGammaValue->SetVisible(visible); 339 m_minChromaValue->SetVisible(visible); 340 m_maxChromaValue->SetVisible(visible); 341 m_chromaGammaValue->SetVisible(visible); 342 } 343 344 void AdjustScreen::accept() 345 { 346 QString filter(m_filterName); 347 348 if(m_defaultValue->GetCheckState() != MythUIStateType::Full) 349 { 350 filter.append('='); 351 filter.append(m_minLumaValue->GetValue()); 352 filter.append(':'); 353 filter.append(m_maxLumaValue->GetValue()); 354 filter.append(':'); 355 filter.append(QString::number(m_lumaGammaValue->GetIntValue() / 100.0, 'g', 2)); 356 filter.append(':'); 357 filter.append(m_minChromaValue->GetValue()); 358 filter.append(':'); 359 filter.append(m_maxChromaValue->GetValue()); 360 filter.append(':'); 361 filter.append(QString::number(m_chromaGammaValue->GetIntValue() / 100.0, 'g', 2)); 362 } 363 364 emit accepting(filter); 365 Close(); 366 } 367 368 bool OneFieldScreen::Create() 369 { 370 if (!LoadWindowFromXML("filters-ui.xml", "onefieldscreen", this)) 371 return false; 372 373 m_fieldValue = dynamic_cast<MythUICheckBox *>(GetChild("fieldvalue")); 374 375 if (!CreateCommon() || !m_fieldValue) 376 { 377 VERBOSE(VB_IMPORTANT, "OneFieldScreen, theme is missing " 378 "required elements"); 379 return false; 380 } 381 382 connect(m_fieldValue, SIGNAL(TakingFocus()), SLOT(setHelpText())); 383 384 if (!Load()) 385 return false; 386 387 BuildFocusList(); 388 389 return true; 390 } 391 392 bool OneFieldScreen::Load() 393 { 394 if (m_filterParams == "bottom") 395 m_fieldValue->SetCheckState(MythUIStateType::Full); 396 397 return true; 398 } 399 400 void OneFieldScreen::accept() 401 { 402 QString filter(m_filterName); 403 404 if(m_fieldValue->GetCheckState() == MythUIStateType::Full) 405 { 406 filter.append("=bottom"); 407 } 408 409 emit accepting(filter); 410 Close(); 411 } 412 413 bool CustomFilterScreen::Create() 414 { 415 if (!LoadWindowFromXML("filters-ui.xml", "customfilterscreen", this)) 416 return false; 417 418 m_optionsInput = dynamic_cast<MythUITextEdit *>(GetChild("optionsinput")); 419 m_heading = dynamic_cast<MythUIText *>(GetChild("heading")); 420 m_acceptButton = dynamic_cast<MythUIButton *>(GetChild("acceptbutton")); 421 422 if (!m_optionsInput || !m_heading || !m_acceptButton) 423 { 424 VERBOSE(VB_IMPORTANT, "CustomFilterScreen, theme is missing " 425 "required elements"); 426 return false; 427 } 428 429 QString name(m_filterName); 430 name[0] = name[0].toUpper(); 431 m_heading->SetText(tr("Configure") + ' ' + name + ' ' + tr("Filter")); 432 connect(m_acceptButton, SIGNAL(Clicked()), SLOT(accept())); 433 434 if (!Load()) 435 return false; 436 437 BuildFocusList(); 438 439 return true; 440 } 441 442 bool CustomFilterScreen::Load() 443 { 444 m_optionsInput->SetText(m_filterParams); 445 return true; 446 } 447 448 void CustomFilterScreen::accept() 449 { 450 QString filter(m_filterName); 451 if (!m_optionsInput->GetText().trimmed().isEmpty()) 452 { 453 filter.append('='); 454 filter.append(m_optionsInput->GetText()); 455 } 456 457 emit accepting(filter); 458 Close(); 459 } 460 -
mythtv/libs/libmythtv/libmythtv.pro
238 238 HEADERS += profilegroup.h 239 239 SOURCES += profilegroup.cpp 240 240 241 # Filter configuration stuff 242 HEADERS += filterlist.h 243 HEADERS += filterscreen.h 244 SOURCES += filterlist.cpp 245 SOURCES += filterscreen.cpp 246 241 247 # XBox LED control 242 248 HEADERS += xbox.h 243 249 SOURCES += xbox.cpp -
mythtv/libs/libmythtv/recordingprofile.h
117 117 void ResizeTranscode(bool resize); 118 118 void SetLosslessTranscode(bool lossless); 119 119 void FiltersChanged(const QString &val); 120 void EditFilters(); 121 void SetFilter(QString); 120 122 121 123 private: 122 124 ID *id; -
mythtv/libs/libmythtv/filterlist.cpp
1 2 #include "filterlist.h" 3 #include "filterscreen.h" 4 #include "mythverbose.h" 5 #include "mythmainwindow.h" 6 #include "mythdialogbox.h" 7 8 Q_DECLARE_METATYPE(FilterConfiguration) 9 10 /** \class FilterList 11 * \brief Provides an interface for viewing and editing video filters. 12 * 13 * FilterList displays the chain of video processing filters that the user 14 * has configured and provides an interface for editing this chain. 15 */ 16 FilterList::FilterList(MythScreenStack *parent, QString filterString) : 17 MythScreenType(parent, "FilterList"), m_filterString(filterString) 18 { 19 m_filterList = NULL; 20 m_helpText = NULL; 21 m_helpLabel = NULL; 22 m_addButton = NULL; 23 } 24 25 bool FilterList::Create() 26 { 27 if (!LoadWindowFromXML("filters-ui.xml", "filterlist", this)) 28 return false; 29 30 m_filterList = dynamic_cast<MythUIButtonList *>(GetChild("filters")); 31 m_helpText = dynamic_cast<MythUIText *>(GetChild("helptext")); 32 m_helpLabel = dynamic_cast<MythUIText *>(GetChild("helplabel")); 33 m_addButton = dynamic_cast<MythUIButton *>(GetChild("addfilter")); 34 35 if (!m_filterList || !m_helpText || !m_addButton) 36 { 37 VERBOSE(VB_IMPORTANT, "FilterList, theme is missing " 38 "required elements"); 39 return false; 40 } 41 42 connect(m_filterList, SIGNAL(itemSelected(MythUIButtonListItem *)), 43 SLOT(setHelpText(MythUIButtonListItem *))); 44 connect(m_filterList, SIGNAL(itemClicked(MythUIButtonListItem *)), 45 SLOT(popupMenu(MythUIButtonListItem *))); 46 connect(m_addButton, SIGNAL(TakingFocus()), SLOT(selectButton())); 47 connect(m_addButton, SIGNAL(Clicked()), SLOT(addFilter())); 48 49 m_addButton->SetLockable(false); 50 51 BuildFocusList(); 52 Load(); 53 54 return true; 55 } 56 57 void FilterList::Load() 58 { 59 QStringList filters = m_filterString.split(','); 60 61 MythUIButtonListItem *item; 62 for (QStringList::Iterator filter = filters.begin(); filter != filters.end(); ++filter) 63 { 64 if (!filter->trimmed().isEmpty()) 65 { 66 FilterConfiguration configuration = parseFilter(*filter); 67 item = new MythUIButtonListItem(m_filterList, *filter, qVariantFromValue(configuration)); 68 } 69 } 70 } 71 72 void FilterList::selectButton() 73 { 74 m_helpLabel->SetText(tr("Add Filter")); 75 m_helpText->SetText(tr("Add a new filter to the end of the list.")); 76 } 77 78 void FilterList::addFilter() 79 { 80 MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); 81 MythDialogBox *addFilterPopup = new MythDialogBox(tr("Add Filter"), popupStack, "addfilterpopup"); 82 if (addFilterPopup->Create()) 83 { 84 popupStack->AddScreen(addFilterPopup); 85 addFilterPopup->SetReturnEvent(this, "add"); 86 87 // get the list of the available filters on the system 88 filter_map_t info = m_manager.GetAllFilterInfo(); 89 filter_map_t::iterator iter; 90 for (iter = info.begin(); iter != info.end(); ++iter) 91 { 92 QString name(iter->second->name); 93 addFilterPopup->AddButton(name, qVariantFromValue(name)); 94 } 95 } 96 } 97 98 void FilterList::addFilter(QString name) 99 { 100 FilterManager manager; 101 102 if (!configurable(name)) 103 { 104 FilterConfiguration configuration = parseFilter(name); 105 MythUIButtonListItem *item = new MythUIButtonListItem(m_filterList, name, 106 qVariantFromValue(configuration)); 107 } 108 else 109 { 110 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 111 FilterScreen *filterScreen; 112 113 if (name == "crop") 114 { 115 filterScreen = new CropScreen(mainStack, name, "", false); 116 } 117 else if (name == "denoise3d") 118 { 119 filterScreen = new Denoise3dScreen(mainStack, name, "", false); 120 } 121 else if (name == "adjust") 122 { 123 filterScreen = new AdjustScreen(mainStack, name, "", false); 124 } 125 else if (name == "onefield") 126 { 127 filterScreen = new OneFieldScreen(mainStack, name, "", false); 128 } 129 else 130 { 131 filterScreen = new CustomFilterScreen(mainStack, name, "", false); 132 } 133 134 connect(filterScreen, SIGNAL(accepting(QString)), this, SLOT(getAddedFilter(QString))); 135 136 if (filterScreen->Create()) 137 { 138 mainStack->AddScreen(filterScreen); 139 } 140 else 141 { 142 delete filterScreen; 143 } 144 } 145 } 146 147 bool FilterList::configurable(QString name) const 148 { 149 return name != "bobdeint" && 150 name != "fieldorderdoubleprocessdeint" && 151 name != "forceyv12" && 152 name != "forceyuv422p" && 153 name != "forcergb24" && 154 name != "forceargb32" && 155 name != "kerneldeint" && 156 name != "kerneldoubleprocessdeint" && 157 name != "greedyhdeint" && 158 name != "greedyhdoubleprocessdeint" && 159 name != "invert" && 160 name != "ivtc" && 161 name != "linearblend" && 162 name != "yadifdeint" && 163 name != "yadifdoubleprocessdeint"; 164 } 165 166 void FilterList::getAddedFilter(QString filter) 167 { 168 FilterConfiguration configuration = parseFilter(filter); 169 MythUIButtonListItem *item = new MythUIButtonListItem(m_filterList, filter, 170 qVariantFromValue(configuration)); 171 } 172 173 void FilterList::getEditedFilter(QString filter) 174 { 175 FilterConfiguration configuration = parseFilter(filter); 176 MythUIButtonListItem* current = m_filterList->GetItemCurrent(); 177 current->SetData(qVariantFromValue(configuration)); 178 current->SetText(filter); 179 m_helpText->SetText(configuration.description); 180 } 181 182 void FilterList::disableFilter(MythUIButtonListItem *item) 183 { 184 FilterConfiguration filter = qVariantValue<FilterConfiguration>(item->GetData()); 185 filter.options = "-1"; 186 item->SetData(qVariantFromValue(filter)); 187 item->SetText(filter.name + '=' + filter.options); 188 } 189 190 void FilterList::enableFilter(MythUIButtonListItem *item) 191 { 192 FilterConfiguration filter = qVariantValue<FilterConfiguration>(item->GetData()); 193 filter.options = filter.prevOptions; 194 item->SetData(qVariantFromValue(filter)); 195 196 if (!filter.options.trimmed().isEmpty()) 197 { 198 item->SetText(filter.name + '=' + filter.options); 199 } 200 } 201 202 FilterConfiguration FilterList::parseFilter(const QString &filter) const 203 { 204 FilterConfiguration configuration; 205 configuration.name = filter.section('=', 0, 0); 206 configuration.options = filter.section('=', 1, 1); 207 configuration.configurable = configurable(configuration.name); 208 configuration.canDisable = false; 209 210 if (configuration.name == "adjust") 211 configuration.canDisable = true; 212 213 if (configuration.options != "-1") 214 configuration.prevOptions = configuration.options; 215 else 216 configuration.prevOptions = ""; 217 218 const FilterInfo* info = m_manager.GetFilterInfo(configuration.name); 219 if (info) 220 { 221 configuration.description.append(info->descript); 222 } 223 return configuration; 224 } 225 226 void FilterList::setHelpText(MythUIButtonListItem *item) 227 { 228 if (!item || GetFocusWidget() != m_filterList) 229 return; 230 231 FilterConfiguration configuration = qVariantValue<FilterConfiguration>(item->GetData()); 232 m_helpText->SetText(configuration.description); 233 234 QString name(configuration.name); 235 name[0] = name[0].toUpper(); 236 m_helpLabel->SetText(name); 237 } 238 239 bool FilterList::keyPressEvent(QKeyEvent *event) 240 { 241 if (GetFocusWidget()->keyPressEvent(event)) 242 { 243 return true; 244 } 245 246 QStringList actions; 247 bool handled = GetMythMainWindow()->TranslateKeyPress("Global", event, actions); 248 249 for (int i = 0; i < actions.size() && !handled; i++) 250 { 251 handled = true; 252 QString action = actions[i]; 253 254 MythUIButtonListItem* current = m_filterList->GetItemCurrent(); 255 256 if (action == "MENU" && current != NULL) 257 { 258 popupMenu(current); 259 } 260 else if (action == "EDIT" && current != NULL) 261 { 262 editFilter(current); 263 } 264 else if (action == "DELETE" && current != NULL) 265 { 266 deleteFilter(current); 267 } 268 else if (action == "ESCAPE") 269 { 270 emit finished(buildFilterString()); 271 GetScreenStack()->PopScreen(); 272 } 273 else 274 { 275 handled = false; 276 } 277 } 278 279 if (!handled && MythScreenType::keyPressEvent(event)) 280 { 281 handled = true; 282 } 283 284 return handled; 285 } 286 287 QString FilterList::buildFilterString() 288 { 289 QString filterString = ""; 290 int count = m_filterList->GetCount(); 291 for (int i = 0; i < count; i++) 292 { 293 FilterConfiguration filter = 294 qVariantValue<FilterConfiguration>(m_filterList->GetItemAt(i)->GetData()); 295 filterString.append(filter.name); 296 297 if (!filter.options.trimmed().isEmpty()) 298 { 299 filterString.append('='); 300 filterString.append(filter.options); 301 } 302 303 if (i != count - 1) 304 filterString.append(','); 305 } 306 307 return filterString; 308 } 309 310 void FilterList::popupMenu(MythUIButtonListItem* current) 311 { 312 int position = m_filterList->GetItemPos(current); 313 FilterConfiguration filter = qVariantValue<FilterConfiguration>(current->GetData()); 314 315 MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); 316 MythDialogBox *menuPopup = new MythDialogBox(tr("Manage Filter"), popupStack, "filterpopup"); 317 318 if (menuPopup->Create()) 319 { 320 popupStack->AddScreen(menuPopup); 321 menuPopup->SetReturnEvent(this, "manage"); 322 323 if (position > 0) 324 { 325 menuPopup->AddButton(tr("Move Up")); 326 } 327 328 if (position < m_filterList->GetCount() - 1) 329 { 330 menuPopup->AddButton(tr("Move Down")); 331 } 332 333 bool disabled = filter.canDisable && filter.options == "-1"; 334 335 if (filter.configurable && !disabled) 336 { 337 menuPopup->AddButton(tr("Edit")); 338 } 339 340 if (disabled) 341 { 342 menuPopup->AddButton(tr("Enable")); 343 } 344 else if (filter.canDisable) 345 { 346 menuPopup->AddButton(tr("Disable")); 347 } 348 349 menuPopup->AddButton(tr("Delete")); 350 menuPopup->AddButton(tr("Cancel")); 351 } 352 } 353 354 void FilterList::editFilter(MythUIButtonListItem *item) 355 { 356 if (!item) 357 return; 358 359 FilterConfiguration filter = qVariantValue<FilterConfiguration>(item->GetData()); 360 361 if (!filter.configurable) 362 { 363 return; 364 } 365 366 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 367 368 FilterScreen *filterScreen; 369 if (filter.name == "crop") 370 { 371 filterScreen = new CropScreen(mainStack, filter.name, filter.options, true); 372 } 373 else if (filter.name == "denoise3d") 374 { 375 filterScreen = new Denoise3dScreen(mainStack, filter.name, filter.options, true); 376 } 377 else if (filter.name == "adjust") 378 { 379 filterScreen = new AdjustScreen(mainStack, filter.name, filter.options, true); 380 } 381 else if (filter.name == "onefield") 382 { 383 filterScreen = new OneFieldScreen(mainStack, filter.name, filter.options, true); 384 } 385 else 386 { 387 filterScreen = new CustomFilterScreen(mainStack, filter.name, filter.options, true); 388 } 389 390 connect(filterScreen, SIGNAL(accepting(QString)), this, SLOT(getEditedFilter(QString))); 391 392 if (filterScreen->Create()) 393 { 394 mainStack->AddScreen(filterScreen); 395 } 396 else 397 { 398 delete filterScreen; 399 } 400 } 401 402 void FilterList::deleteFilter(MythUIButtonListItem *item) 403 { 404 if (!item) 405 return; 406 407 m_filterList->RemoveItem(item); 408 409 if (m_filterList->GetCount() == 0) 410 { 411 m_helpLabel->Reset(); 412 m_helpText->Reset(); 413 } 414 } 415 416 void FilterList::moveFilterUp(MythUIButtonListItem *item) 417 { 418 if (!item) 419 return; 420 421 item->MoveUpDown(true); 422 } 423 424 void FilterList::moveFilterDown(MythUIButtonListItem *item) 425 { 426 if (!item) 427 return; 428 429 item->MoveUpDown(false); 430 } 431 432 void FilterList::customEvent(QEvent *event) 433 { 434 if (event->type() == kMythDialogBoxCompletionEventType) 435 { 436 DialogCompletionEvent *dce = 437 dynamic_cast<DialogCompletionEvent*>(event); 438 439 QString resultid= dce->GetId(); 440 QString resultText = dce->GetResultText(); 441 442 MythUIButtonListItem* current = m_filterList->GetItemCurrent(); 443 444 if (resultid == "manage") 445 { 446 if (resultText == tr("Delete")) 447 { 448 deleteFilter(current); 449 } 450 else if (resultText == tr("Move Up")) 451 { 452 moveFilterUp(current); 453 } 454 else if (resultText == tr("Move Down")) 455 { 456 moveFilterDown(current); 457 } 458 else if (resultText == tr("Edit")) 459 { 460 editFilter(current); 461 } 462 else if (resultText == tr("Disable")) 463 { 464 disableFilter(current); 465 } 466 else if (resultText == tr("Enable")) 467 { 468 enableFilter(current); 469 } 470 } 471 else if (resultid == "add" && dce->GetResult() != -1) 472 { 473 addFilter(qVariantValue<QString>(dce->GetData())); 474 } 475 } 476 } -
mythtv/libs/libmythtv/channelsettings.cpp
1 #include <QApplication> 2 1 3 #include "channelsettings.h" 2 4 #include "cardutil.h" 3 5 #include "channelutil.h" 6 #include "filterlist.h" 4 7 #include "programinfo.h" // for COMM_DETECT*, GetPreferredSkipTypeCombinations() 8 #include "mythcontext.h" 5 9 6 10 QString ChannelDBStorage::GetWhereClause(MSqlBindings &bindings) const 7 11 { … … 197 201 } 198 202 }; 199 203 200 class VideoFilter s : public LineEditSetting, public ChannelDBStorage204 class VideoFilterButton : public ButtonSetting, public ChannelDBStorage 201 205 { 202 206 public: 203 VideoFilter s(const ChannelID &id) :204 LineEditSetting(this), ChannelDBStorage(this, id, "videofilters")207 VideoFilterButton(const ChannelID &id) : 208 ButtonSetting(this), ChannelDBStorage(this, id, "videofilters") 205 209 { 206 setLabel(QObject::tr(" Video filters"));210 setLabel(QObject::tr("Set Video filters")); 207 211 setHelpText(QObject::tr("Filters to be used when recording " 208 212 "from this channel. Not used with " 209 213 "hardware encoding cards.")); … … 212 216 }; 213 217 214 218 215 class OutputFilter s : public LineEditSetting, public ChannelDBStorage219 class OutputFilterButton : public ButtonSetting, public ChannelDBStorage 216 220 { 217 221 public: 218 OutputFilter s(const ChannelID &id) :219 LineEditSetting(this), ChannelDBStorage(this, id, "outputfilters")222 OutputFilterButton(const ChannelID &id) : 223 ButtonSetting(this), ChannelDBStorage(this, id, "outputfilters") 220 224 { 221 setLabel(QObject::tr(" Playback filters"));225 setLabel(QObject::tr("Set Playback filters")); 222 226 setHelpText(QObject::tr("Filters to be used when recordings " 223 "from this channel are viewed. " 224 "Start with a plus to append to the " 225 "global playback filters.")); 227 "from this channel are viewed.")); 226 228 } 227 229 }; 228 230 … … 469 471 setLabel(QObject::tr("Channel Options - Filters")); 470 472 setUseLabel(false); 471 473 472 addChild(new VideoFilters(id)); 473 addChild(new OutputFilters(id)); 474 videoButton = new VideoFilterButton(id); 475 outputButton = new OutputFilterButton(id); 476 477 addChild(videoButton); 478 addChild(outputButton); 479 480 connect(videoButton, SIGNAL( pressed()), 481 this, SLOT(videoPressed())); 482 connect(outputButton, SIGNAL( pressed()), 483 this, SLOT(outputPressed())); 474 484 } 475 485 486 void ChannelOptionsFilters::videoPressed() 487 { 488 MythScreenStack *mainStack = gContext->GetMainWindow()->GetMainStack(); 489 FilterList *filterList = new FilterList(mainStack, videoButton->getValue()); 490 if (!filterList->Create()) 491 { 492 delete filterList; 493 return; 494 } 495 496 connect(filterList, SIGNAL(finished(QString)), this, SLOT(setInputFilters(QString))); 497 498 mainStack->AddScreen(filterList); 499 500 // HACK begin - remove when everything is using mythui 501 if (GetMythMainWindow()->currentWidget()) 502 { 503 QWidget *widget = GetMythMainWindow()->currentWidget(); 504 vector<QWidget *> widgetList; 505 506 while (widget) 507 { 508 widgetList.push_back(widget); 509 GetMythMainWindow()->detach(widget); 510 widget = GetMythMainWindow()->currentWidget(); 511 } 512 513 GetMythMainWindow()->GetPaintWindow()->raise(); 514 GetMythMainWindow()->GetPaintWindow()->setFocus(); 515 516 int screenCount = mainStack->TotalScreens(); 517 do 518 { 519 qApp->processEvents(); 520 usleep(5000); 521 } while (mainStack->TotalScreens() >= screenCount); 522 523 vector<QWidget*>::reverse_iterator it; 524 for (it = widgetList.rbegin(); it != widgetList.rend(); ++it) 525 { 526 GetMythMainWindow()->attach(*it); 527 } 528 } 529 // HACK end 530 } 531 532 void ChannelOptionsFilters::outputPressed() 533 { 534 MythScreenStack *mainStack = gContext->GetMainWindow()->GetMainStack(); 535 FilterList *filterList = new FilterList(mainStack, outputButton->getValue()); 536 if (!filterList->Create()) 537 { 538 delete filterList; 539 return; 540 } 541 542 connect(filterList, SIGNAL(finished(QString)), this, SLOT(setInputFilters(QString))); 543 544 mainStack->AddScreen(filterList); 545 546 // HACK begin - remove when everything is using mythui 547 if (GetMythMainWindow()->currentWidget()) 548 { 549 QWidget *widget = GetMythMainWindow()->currentWidget(); 550 vector<QWidget *> widgetList; 551 552 while (widget) 553 { 554 widgetList.push_back(widget); 555 GetMythMainWindow()->detach(widget); 556 widget = GetMythMainWindow()->currentWidget(); 557 } 558 559 GetMythMainWindow()->GetPaintWindow()->raise(); 560 GetMythMainWindow()->GetPaintWindow()->setFocus(); 561 562 int screenCount = mainStack->TotalScreens(); 563 do 564 { 565 qApp->processEvents(); 566 usleep(5000); 567 } while (mainStack->TotalScreens() >= screenCount); 568 569 vector<QWidget*>::reverse_iterator it; 570 for (it = widgetList.rbegin(); it != widgetList.rend(); ++it) 571 { 572 GetMythMainWindow()->attach(*it); 573 } 574 } 575 // HACK end 576 } 577 578 void ChannelOptionsFilters::setOutputFilters(QString filters) 579 { 580 outputButton->setValue(filters); 581 } 582 583 void ChannelOptionsFilters::setInputFilters(QString filters) 584 { 585 videoButton->setValue(filters); 586 } 587 476 588 ChannelOptionsV4L::ChannelOptionsV4L(const ChannelID& id) : 477 589 VerticalConfigurationGroup(false, true, false, false) 478 590 { -
mythtv/libs/libmythtv/filterlist.h
1 #ifndef FILTERLIST_H 2 #define FILTERLIST_H 3 4 // MythTV headers 5 #include <mythscreentype.h> 6 #include <mythuitext.h> 7 #include <mythuibuttonlist.h> 8 #include <mythuibutton.h> 9 #include "filtermanager.h" 10 11 struct FilterConfiguration 12 { 13 QString name; 14 QString options; 15 QString description; 16 QString prevOptions; 17 bool configurable; 18 bool canDisable; 19 }; 20 21 class FilterList : public MythScreenType 22 { 23 Q_OBJECT 24 25 public: 26 FilterList(MythScreenStack *parent, QString filterString); 27 ~FilterList(void) {} 28 29 bool Create(void); 30 31 signals: 32 void finished(QString string); 33 34 private slots: 35 void setHelpText(MythUIButtonListItem *item); 36 void popupMenu(MythUIButtonListItem *item); 37 void addFilter(); 38 void selectButton(); 39 void getAddedFilter(QString filter); 40 void getEditedFilter(QString filter); 41 42 private: 43 void Load(); 44 45 bool configurable(QString name) const; 46 void addFilter(QString name); 47 void deleteFilter(MythUIButtonListItem *item); 48 void moveFilterUp(MythUIButtonListItem *item); 49 void moveFilterDown(MythUIButtonListItem *item); 50 void editFilter(MythUIButtonListItem *item); 51 void enableFilter(MythUIButtonListItem *item); 52 void disableFilter(MythUIButtonListItem *item); 53 QString buildFilterString(); 54 55 bool keyPressEvent(QKeyEvent *); 56 void customEvent(QEvent *); 57 58 FilterConfiguration parseFilter(const QString &filter) const; 59 60 FilterManager m_manager; 61 MythUIText *m_helpText; 62 MythUIText *m_helpLabel; 63 MythUIButtonList *m_filterList; 64 MythUIButton *m_addButton; 65 QString m_filterString; 66 }; 67 68 #endif /* FILTERLIST_H */ 69 -
mythtv/libs/libmythtv/filtermanager.h
49 49 int &height, int &bufsize, 50 50 int max_threads = 1); 51 51 52 const FilterInfo *GetFilterInfo(const QString &name) const; 53 54 filter_map_t GetAllFilterInfo() 55 { 56 return filter_map_t(filters); 57 } 58 52 59 private: 53 60 bool LoadFilterLib(const QString &path); 54 const FilterInfo *GetFilterInfo(const QString &name) const; 55 61 56 62 library_map_t dlhandles; 57 63 filter_map_t filters; 58 64 }; -
mythtv/libs/libmythtv/filterscreen.h
1 #ifndef FILTERSCREEN_H 2 #define FILTERSCREEN_H 3 4 #include <mythscreentype.h> 5 #include <mythuitext.h> 6 #include <mythuibutton.h> 7 #include <mythuigroup.h> 8 #include <mythuicheckbox.h> 9 #include <mythuispinbox.h> 10 #include <mythuitextedit.h> 11 12 class FilterScreen : public MythScreenType 13 { 14 Q_OBJECT 15 16 public: 17 FilterScreen(MythScreenStack *parent, QString filterName, QString filterParams, bool edit); 18 ~FilterScreen(void) {} 19 20 signals: 21 void accepting(QString string); 22 23 protected slots: 24 void setHelpText(); 25 virtual void accept() = 0; 26 27 protected: 28 virtual bool Load() = 0; 29 bool CreateCommon(); 30 31 MythUIText *m_heading; 32 MythUIText *m_helpText; 33 MythUIButton *m_cancelButton; 34 MythUIButton *m_acceptButton; 35 QString m_filterName; 36 QString m_filterParams; 37 bool m_edit; 38 }; 39 40 class CropScreen : public FilterScreen 41 { 42 Q_OBJECT 43 44 public: 45 CropScreen(MythScreenStack *parent, QString filterName, QString filterParams, bool edit) : 46 FilterScreen(parent, filterName, filterParams, edit) {} 47 ~CropScreen(void) {} 48 49 bool Create(void); 50 51 protected slots: 52 void accept(); 53 54 protected: 55 bool Load(); 56 57 MythUISpinBox *m_topValue; 58 MythUISpinBox *m_leftValue; 59 MythUISpinBox *m_bottomValue; 60 MythUISpinBox *m_rightValue; 61 }; 62 63 class Denoise3dScreen : public FilterScreen 64 { 65 Q_OBJECT 66 67 public: 68 Denoise3dScreen(MythScreenStack *parent, QString filterName, QString filterParams, bool edit) : 69 FilterScreen(parent, filterName, filterParams, edit) {} 70 ~Denoise3dScreen(void) {} 71 72 bool Create(void); 73 74 protected slots: 75 void accept(); 76 void useDefaults(); 77 78 protected: 79 bool Load(); 80 81 MythUICheckBox *m_defaultValue; 82 MythUIText *m_lumaSpatialLabel; 83 MythUIText *m_chromaSpatialLabel; 84 MythUIText *m_lumaTemporalLabel; 85 MythUISpinBox *m_lumaSpatialValue; 86 MythUISpinBox *m_chromaSpatialValue; 87 MythUISpinBox *m_lumaTemporalValue; 88 }; 89 90 class AdjustScreen : public FilterScreen 91 { 92 Q_OBJECT 93 94 public: 95 AdjustScreen(MythScreenStack *parent, QString filterName, QString filterParams, bool edit) : 96 FilterScreen(parent, filterName, filterParams, edit) {} 97 ~AdjustScreen(void) {} 98 99 bool Create(void); 100 101 protected slots: 102 void accept(); 103 void useDefaults(); 104 105 protected: 106 bool Load(); 107 108 MythUICheckBox *m_defaultValue; 109 MythUIText *m_minLumaLabel; 110 MythUIText *m_maxLumaLabel; 111 MythUIText *m_lumaGammaLabel; 112 MythUIText *m_minChromaLabel; 113 MythUIText *m_maxChromaLabel; 114 MythUIText *m_chromaGammaLabel; 115 MythUISpinBox *m_minLumaValue; 116 MythUISpinBox *m_maxLumaValue; 117 MythUISpinBox *m_lumaGammaValue; 118 MythUISpinBox *m_minChromaValue; 119 MythUISpinBox *m_maxChromaValue; 120 MythUISpinBox *m_chromaGammaValue; 121 }; 122 123 class OneFieldScreen : public FilterScreen 124 { 125 Q_OBJECT 126 127 public: 128 OneFieldScreen(MythScreenStack *parent, QString filterName, QString filterParams, bool edit) : 129 FilterScreen(parent, filterName, filterParams, edit) {} 130 ~OneFieldScreen(void) {} 131 132 bool Create(void); 133 134 protected slots: 135 void accept(); 136 137 protected: 138 bool Load(); 139 140 MythUICheckBox *m_fieldValue; 141 }; 142 143 class CustomFilterScreen : public FilterScreen 144 { 145 Q_OBJECT 146 147 public: 148 CustomFilterScreen(MythScreenStack *parent, QString filterName, QString filterParams, bool edit) : 149 FilterScreen(parent, filterName, filterParams, edit) {} 150 ~CustomFilterScreen(void) {} 151 152 bool Create(void); 153 154 protected slots: 155 void accept(); 156 157 protected: 158 bool Load(); 159 160 MythUITextEdit *m_optionsInput; 161 }; 162 163 #endif /* FILTERSCREEN_H */ 164 -
mythtv/libs/libmythtv/recordingprofile.cpp
2 2 3 3 #include <QCursor> 4 4 #include <QLayout> 5 #include <QApplication> 5 6 6 7 #include "recordingprofile.h" 8 #include "filterlist.h" 7 9 #include "cardutil.h" 8 10 #include "mythcontext.h" 9 11 #include "mythdb.h" … … 1008 1010 }; 1009 1011 }; 1010 1012 1011 class TranscodeFilters : public LineEditSetting, public CodecParamStorage1013 class TranscodeFilters : public ButtonSetting, public CodecParamStorage 1012 1014 { 1013 1015 public: 1014 1016 TranscodeFilters(const RecordingProfile &parent) : 1015 LineEditSetting(this),1017 ButtonSetting(this), 1016 1018 CodecParamStorage(this, parent, "transcodefilters") 1017 1019 { 1018 setLabel(QObject::tr(" Custom Filters"));1020 setLabel(QObject::tr("Set Custom Filters")); 1019 1021 setHelpText(QObject::tr("Filters used when transcoding with this " 1020 1022 "profile. This value must be blank to perform " 1021 "lossless transcoding. Format: " 1022 "[[<filter>=<options>,]...]" 1023 "lossless transcoding." 1023 1024 )); 1024 1025 }; 1025 1026 }; … … 1285 1286 this, SLOT( SetLosslessTranscode(bool))); 1286 1287 connect(tr_filters, SIGNAL(valueChanged(const QString&)), 1287 1288 this, SLOT(FiltersChanged(const QString&))); 1289 connect(tr_filters, SIGNAL(pressed ()), 1290 this, SLOT(EditFilters())); 1288 1291 } 1289 1292 } 1290 1293 else if (type.toUpper() == "DVB") … … 1296 1299 Load(); 1297 1300 } 1298 1301 1302 void RecordingProfile::EditFilters() 1303 { 1304 MythScreenStack *mainStack = gContext->GetMainWindow()->GetMainStack(); 1305 FilterList *filterList = new FilterList(mainStack, tr_filters->getValue()); 1306 if (!filterList->Create()) 1307 { 1308 delete filterList; 1309 return; 1310 } 1311 1312 connect(filterList, SIGNAL(finished(QString)), this, SLOT(SetFilter(QString))); 1313 1314 mainStack->AddScreen(filterList); 1315 1316 // HACK begin - remove when everything is using mythui 1317 if (GetMythMainWindow()->currentWidget()) 1318 { 1319 QWidget *widget = GetMythMainWindow()->currentWidget(); 1320 vector<QWidget *> widgetList; 1321 1322 while (widget) 1323 { 1324 widgetList.push_back(widget); 1325 GetMythMainWindow()->detach(widget); 1326 widget = GetMythMainWindow()->currentWidget(); 1327 } 1328 1329 GetMythMainWindow()->GetPaintWindow()->raise(); 1330 GetMythMainWindow()->GetPaintWindow()->setFocus(); 1331 1332 int screenCount = mainStack->TotalScreens(); 1333 do 1334 { 1335 qApp->processEvents(); 1336 usleep(5000); 1337 } while (mainStack->TotalScreens() >= screenCount); 1338 1339 vector<QWidget*>::reverse_iterator it; 1340 for (it = widgetList.rbegin(); it != widgetList.rend(); ++it) 1341 { 1342 GetMythMainWindow()->attach(*it); 1343 } 1344 } 1345 // HACK end 1346 } 1347 1348 void RecordingProfile::SetFilter(QString filter) 1349 { 1350 tr_filters->setValue(filter); 1351 } 1352 1299 1353 void RecordingProfile::FiltersChanged(const QString &val) 1300 1354 { 1301 1355 if (!tr_filters || !tr_lossless) -
mythtv/libs/libmythtv/channelsettings.h
109 109 110 110 class OnAirGuide; 111 111 class XmltvID; 112 class VideoFilterButton; 113 class OutputFilterButton; 112 114 113 115 class MPUBLIC ChannelOptionsCommon: public VerticalConfigurationGroup 114 116 { … … 128 130 }; 129 131 130 132 class MPUBLIC ChannelOptionsFilters: public VerticalConfigurationGroup { 133 Q_OBJECT 131 134 public: 132 135 ChannelOptionsFilters(const ChannelID& id); 136 public slots: 137 void outputPressed(); 138 void videoPressed(); 139 void setOutputFilters(QString); 140 void setInputFilters(QString); 141 142 protected: 143 VideoFilterButton *videoButton; 144 OutputFilterButton *outputButton; 133 145 }; 134 146 135 147 class MPUBLIC ChannelOptionsV4L: public VerticalConfigurationGroup { -
mythtv/programs/mythfrontend/globalsettings.cpp
834 834 osdfade = new TransCheckBoxSetting(); 835 835 deint0 = new TransComboBoxSetting(); 836 836 deint1 = new TransComboBoxSetting(); 837 filters = new Trans LineEditSetting(true);837 filters = new TransButtonSetting(); 838 838 839 839 for (uint i = 0; i < 2; ++i) 840 840 { … … 865 865 osdfade->setLabel(tr("OSD Fade")); 866 866 deint0->setLabel(tr("Primary Deinterlacer")); 867 867 deint1->setLabel(tr("Fallback Deinterlacer")); 868 filters->setLabel(tr(" Custom Filters"));868 filters->setLabel(tr("Set Custom Filters")); 869 869 870 870 max_cpus->setHelpText( 871 871 tr("Maximum number of CPU cores used for video decoding and filtering.") + … … 906 906 addChild(page2); 907 907 908 908 connect(decoder, SIGNAL(valueChanged(const QString&)), 909 this, SLOT(decoderChanged(const QString&))); \909 this, SLOT(decoderChanged(const QString&))); 910 910 connect(vidrend, SIGNAL(valueChanged(const QString&)), 911 911 this, SLOT(vrenderChanged(const QString&))); 912 912 connect(osdrend, SIGNAL(valueChanged(const QString&)), 913 913 this, SLOT(orenderChanged(const QString&))); 914 connect(deint0, SIGNAL(valueChanged(const QString&)),914 connect(deint0, SIGNAL(valueChanged(const QString&)), 915 915 this, SLOT(deint0Changed(const QString&))); 916 connect(deint1, SIGNAL(valueChanged(const QString&)),916 connect(deint1, SIGNAL(valueChanged(const QString&)), 917 917 this, SLOT(deint1Changed(const QString&))); 918 connect(filters, SIGNAL(pressed()), 919 this, SLOT(filtersPressed())); 918 920 } 919 921 920 922 void PlaybackProfileItemConfig::Load(void) … … 978 980 deint1->setValue(pdeint1); 979 981 if (!pfilter.isEmpty()) 980 982 filters->setValue(pfilter); 983 984 filters->setHelpText(tr("Filters: ") + pfilter); 981 985 } 982 986 983 987 void PlaybackProfileItemConfig::Save(void) … … 1084 1088 VideoDisplayProfile::GetDeinterlacerHelp(deint)); 1085 1089 } 1086 1090 1091 void PlaybackProfileItemConfig::filtersPressed() 1092 { 1093 MythScreenStack *mainStack = gContext->GetMainWindow()->GetMainStack(); 1094 FilterList *filterList = new FilterList(mainStack, filters->getValue()); 1095 if (!filterList->Create()) 1096 { 1097 delete filterList; 1098 return; 1099 } 1100 1101 connect(filterList, SIGNAL(finished(QString)), this, SLOT(setFilters(QString))); 1102 1103 mainStack->AddScreen(filterList); 1104 1105 // HACK begin - remove when everything is using mythui 1106 if (GetMythMainWindow()->currentWidget()) 1107 { 1108 QWidget *widget = GetMythMainWindow()->currentWidget(); 1109 vector<QWidget *> widgetList; 1110 1111 while (widget) 1112 { 1113 widgetList.push_back(widget); 1114 GetMythMainWindow()->detach(widget); 1115 widget = GetMythMainWindow()->currentWidget(); 1116 } 1117 1118 GetMythMainWindow()->GetPaintWindow()->raise(); 1119 GetMythMainWindow()->GetPaintWindow()->setFocus(); 1120 1121 int screenCount = mainStack->TotalScreens(); 1122 do 1123 { 1124 qApp->processEvents(); 1125 usleep(5000); 1126 } while (mainStack->TotalScreens() >= screenCount); 1127 1128 vector<QWidget*>::reverse_iterator it; 1129 for (it = widgetList.rbegin(); it != widgetList.rend(); ++it) 1130 { 1131 GetMythMainWindow()->attach(*it); 1132 } 1133 } 1134 // HACK end 1135 } 1136 1137 void PlaybackProfileItemConfig::setFilters(QString filter) 1138 { 1139 filters->setValue(filter); 1140 filters->setHelpText(tr("Filters: ") + filter); 1141 } 1142 1087 1143 PlaybackProfileConfig::PlaybackProfileConfig(const QString &profilename) : 1088 1144 VerticalConfigurationGroup(false, false, true, true), 1089 1145 profile_name(profilename), needs_save(false), -
mythtv/programs/mythfrontend/globalsettings.h
4 4 #include "libmyth/settings.h" 5 5 #include "libmyth/mythcontext.h" 6 6 #include "libmythtv/videodisplayprofile.h" 7 #include "libmythtv/filterlist.h" 7 8 #include "themeinfo.h" 8 9 9 10 class ThemeSelector : public HostImageSelect … … 79 80 void orenderChanged(const QString &renderer); 80 81 void deint0Changed(const QString &deint); 81 82 void deint1Changed(const QString &deint); 83 void filtersPressed(); 84 void setFilters(QString filter); 82 85 83 86 private: 84 87 ProfileItem &item; … … 92 95 TransCheckBoxSetting *osdfade; 93 96 TransComboBoxSetting *deint0; 94 97 TransComboBoxSetting *deint1; 95 Trans LineEditSetting *filters;98 TransButtonSetting *filters; 96 99 }; 97 100 98 101 class PlaybackProfileConfig : public VerticalConfigurationGroup