Ticket #10092: settings-mythplugins-2012-03-09.diff
File settings-mythplugins-2012-03-09.diff, 34.6 KB (added by , 12 years ago) |
---|
-
mythplugins/mytharchive/mytharchive/archivesettings.cpp
diff --git a/mythplugins/mytharchive/mytharchive/archivesettings.cpp b/mythplugins/mytharchive/mytharchive/archivesettings.cpp index be35649..81f5bc7 100644
a b 12 12 #include "archivesettings.h" 13 13 14 14 15 static Host LineEdit*MythArchiveTempDir()15 static HostFileBrowserSetting *MythArchiveTempDir() 16 16 { 17 Host LineEdit *gc = new HostLineEdit("MythArchiveTempDir");18 gc->setLabel(QObject::tr(" MythArchive TempDirectory"));17 HostFileBrowserSetting *gc = new HostFileBrowserSetting("MythArchiveTempDir"); 18 gc->setLabel(QObject::tr("Temporary Directory")); 19 19 gc->setValue(""); 20 20 gc->setHelpText(QObject::tr("Location where MythArchive should create its " 21 21 "temporory work files. LOTS of free space required here.")); 22 gc->SetTypeFilter(QDir::AllDirs | QDir::Hidden); 22 23 return gc; 23 24 }; 24 25 25 static Host LineEdit*MythArchiveShareDir()26 static HostFileBrowserSetting *MythArchiveShareDir() 26 27 { 27 Host LineEdit *gc = new HostLineEdit("MythArchiveShareDir");28 gc->setLabel(QObject::tr(" MythArchiveShare Directory"));28 HostFileBrowserSetting *gc = new HostFileBrowserSetting("MythArchiveShareDir"); 29 gc->setLabel(QObject::tr("vShare Directory")); 29 30 gc->setValue(GetShareDir() + "mytharchive/"); 30 31 gc->setHelpText(QObject::tr("Location where MythArchive stores its scripts, " 31 32 "intro movies and theme files")); 33 gc->SetTypeFilter(QDir::AllDirs | QDir::Hidden); 32 34 return gc; 33 35 }; 34 36 35 static HostComboBox *PALNTSC()37 static HostComboBoxSetting *PALNTSC() 36 38 { 37 HostComboBox *gc = new HostComboBox("MythArchiveVideoFormat");39 HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveVideoFormat"); 38 40 gc->setLabel(QObject::tr("Video format")); 39 41 gc->addSelection("PAL"); 40 42 gc->addSelection("NTSC"); … … static HostComboBox *PALNTSC() 42 44 return gc; 43 45 }; 44 46 45 static Host LineEdit*MythArchiveFileFilter()47 static HostTextEditSetting *MythArchiveFileFilter() 46 48 { 47 Host LineEdit *gc = new HostLineEdit("MythArchiveFileFilter");49 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveFileFilter"); 48 50 gc->setLabel(QObject::tr("File Selector Filter")); 49 51 gc->setValue("*.mpg *.mov *.avi *.mpeg *.nuv"); 50 52 gc->setHelpText(QObject::tr("The file name filter to use in the file selector.")); 51 53 return gc; 52 54 }; 53 55 54 static Host LineEdit*MythArchiveDVDLocation()56 static HostFileBrowserSetting *MythArchiveDVDLocation() 55 57 { 56 Host LineEdit *gc = new HostLineEdit("MythArchiveDVDLocation");58 HostFileBrowserSetting *gc = new HostFileBrowserSetting("MythArchiveDVDLocation"); 57 59 gc->setLabel(QObject::tr("Location of DVD")); 58 60 gc->setValue("/dev/dvd"); 59 61 gc->setHelpText(QObject::tr("Which DVD drive to use when burning discs.")); 62 //TODO does not work with symlink 63 gc->SetTypeFilter(QDir::AllDirs | QDir::Hidden); 60 64 return gc; 61 65 }; 62 66 63 static HostSpinBox *MythArchiveDriveSpeed()67 static HostSpinBoxSetting *MythArchiveDriveSpeed() 64 68 { 65 HostSpinBox *gc = new HostSpinBox("MythArchiveDriveSpeed", 0, 48, 1);69 HostSpinBoxSetting *gc = new HostSpinBoxSetting("MythArchiveDriveSpeed", 0, 48, 1); 66 70 gc->setLabel(QObject::tr("DVD Drive Write Speed")); 67 71 gc->setValue(0); 68 72 gc->setHelpText(QObject::tr("This is the write speed to use when burning a DVD. " … … static HostSpinBox *MythArchiveDriveSpeed() 70 74 return gc; 71 75 }; 72 76 73 static Host LineEdit*MythArchiveDVDPlayerCmd()77 static HostTextEditSetting *MythArchiveDVDPlayerCmd() 74 78 { 75 Host LineEdit *gc = new HostLineEdit("MythArchiveDVDPlayerCmd");79 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveDVDPlayerCmd"); 76 80 gc->setLabel(QObject::tr("Command to play DVD")); 77 81 gc->setValue("Internal"); 78 82 gc->setHelpText(QObject::tr("Command to run when test playing a created DVD. " … … static HostLineEdit *MythArchiveDVDPlayerCmd() 81 85 return gc; 82 86 }; 83 87 84 static HostCheckBox *MythArchiveCopyRemoteFiles()88 static HostCheckBoxSetting *MythArchiveCopyRemoteFiles() 85 89 { 86 HostCheckBox *gc = new HostCheckBox("MythArchiveCopyRemoteFiles");90 HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveCopyRemoteFiles"); 87 91 gc->setLabel(QObject::tr("Copy remote files")); 88 92 gc->setValue(false); 89 93 gc->setHelpText(QObject::tr("If set files on remote filesystems " … … static HostCheckBox *MythArchiveCopyRemoteFiles() 92 96 return gc; 93 97 }; 94 98 95 static HostCheckBox *MythArchiveAlwaysUseMythTranscode()99 static HostCheckBoxSetting *MythArchiveAlwaysUseMythTranscode() 96 100 { 97 HostCheckBox *gc = new HostCheckBox("MythArchiveAlwaysUseMythTranscode");101 HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveAlwaysUseMythTranscode"); 98 102 gc->setLabel(QObject::tr("Always Use Mythtranscode")); 99 103 gc->setValue(true); 100 104 gc->setHelpText(QObject::tr("If set mpeg2 files will always be passed" … … static HostCheckBox *MythArchiveAlwaysUseMythTranscode() 103 107 return gc; 104 108 }; 105 109 106 static HostCheckBox *MythArchiveUseProjectX()110 static HostCheckBoxSetting *MythArchiveUseProjectX() 107 111 { 108 HostCheckBox *gc = new HostCheckBox("MythArchiveUseProjectX");112 HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveUseProjectX"); 109 113 gc->setLabel(QObject::tr("Use ProjectX")); 110 114 gc->setValue(false); 111 115 gc->setHelpText(QObject::tr("If set ProjectX will be used to cut" … … static HostCheckBox *MythArchiveUseProjectX() 114 118 return gc; 115 119 }; 116 120 117 static HostCheckBox *MythArchiveUseFIFO()121 static HostCheckBoxSetting *MythArchiveUseFIFO() 118 122 { 119 HostCheckBox *gc = new HostCheckBox("MythArchiveUseFIFO");123 HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveUseFIFO"); 120 124 gc->setLabel(QObject::tr("Use FIFOs")); 121 125 gc->setValue(true); 122 126 gc->setHelpText(QObject::tr("The script will use FIFOs to pass the output" … … static HostCheckBox *MythArchiveUseFIFO() 126 130 return gc; 127 131 }; 128 132 129 static HostCheckBox *MythArchiveAddSubtitles()133 static HostCheckBoxSetting *MythArchiveAddSubtitles() 130 134 { 131 HostCheckBox *gc = new HostCheckBox("MythArchiveAddSubtitles");135 HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveAddSubtitles"); 132 136 gc->setLabel(QObject::tr("Add Subtitles")); 133 137 gc->setValue(false); 134 138 gc->setHelpText(QObject::tr("If available this option will add subtitles " … … static HostCheckBox *MythArchiveAddSubtitles() 136 140 return gc; 137 141 }; 138 142 139 static HostComboBox *MainMenuAspectRatio()143 static HostComboBoxSetting *MainMenuAspectRatio() 140 144 { 141 HostComboBox *gc = new HostComboBox("MythArchiveMainMenuAR");145 HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveMainMenuAR"); 142 146 gc->setLabel(QObject::tr("Main Menu Aspect Ratio")); 143 147 gc->addSelection("4:3"); 144 148 gc->addSelection("16:9"); … … static HostComboBox *MainMenuAspectRatio() 147 151 return gc; 148 152 }; 149 153 150 static HostComboBox *ChapterMenuAspectRatio()154 static HostComboBoxSetting *ChapterMenuAspectRatio() 151 155 { 152 HostComboBox *gc = new HostComboBox("MythArchiveChapterMenuAR");156 HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveChapterMenuAR"); 153 157 gc->setLabel(QObject::tr("Chapter Menu Aspect Ratio")); 154 158 gc->addSelection("4:3"); 155 159 gc->addSelection("16:9"); … … static HostComboBox *ChapterMenuAspectRatio() 160 164 return gc; 161 165 }; 162 166 163 static HostComboBox *MythArchiveDateFormat()167 static HostComboBoxSetting *MythArchiveDateFormat() 164 168 { 165 HostComboBox *gc = new HostComboBox("MythArchiveDateFormat");169 HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveDateFormat"); 166 170 gc->setLabel(QObject::tr("Date format")); 167 171 168 172 QDate sampdate = QDate::currentDate(); … … static HostComboBox *MythArchiveDateFormat() 193 197 return gc; 194 198 } 195 199 196 static HostComboBox *MythArchiveTimeFormat()200 static HostComboBoxSetting *MythArchiveTimeFormat() 197 201 { 198 HostComboBox *gc = new HostComboBox("MythArchiveTimeFormat");202 HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveTimeFormat"); 199 203 gc->setLabel(QObject::tr("Time format")); 200 204 201 205 QTime samptime = QTime::currentTime(); … … static HostComboBox *MythArchiveTimeFormat() 208 212 return gc; 209 213 } 210 214 211 static HostComboBox *MythArchiveDefaultEncProfile()215 static HostComboBoxSetting *MythArchiveDefaultEncProfile() 212 216 { 213 HostComboBox *gc = new HostComboBox("MythArchiveDefaultEncProfile");217 HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveDefaultEncProfile"); 214 218 gc->setLabel(QObject::tr("Default Encoder Profile")); 215 219 216 220 gc->addSelection("HQ", "HQ"); … … static HostComboBox *MythArchiveDefaultEncProfile() 223 227 return gc; 224 228 } 225 229 226 static Host LineEdit*MythArchiveMplexCmd()230 static HostTextEditSetting *MythArchiveMplexCmd() 227 231 { 228 Host LineEdit *gc = new HostLineEdit("MythArchiveMplexCmd");232 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveMplexCmd"); 229 233 gc->setLabel(QObject::tr("mplex Command")); 230 234 gc->setValue("mplex"); 231 235 gc->setHelpText(QObject::tr("Command to run mplex")); 232 236 return gc; 233 237 }; 234 238 235 static Host LineEdit*MythArchiveDvdauthorCmd()239 static HostTextEditSetting *MythArchiveDvdauthorCmd() 236 240 { 237 Host LineEdit *gc = new HostLineEdit("MythArchiveDvdauthorCmd");241 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveDvdauthorCmd"); 238 242 gc->setLabel(QObject::tr("dvdauthor command")); 239 243 gc->setValue("dvdauthor"); 240 244 gc->setHelpText(QObject::tr("Command to run dvdauthor.")); 241 245 return gc; 242 246 }; 243 247 244 static Host LineEdit*MythArchiveMkisofsCmd()248 static HostTextEditSetting *MythArchiveMkisofsCmd() 245 249 { 246 Host LineEdit *gc = new HostLineEdit("MythArchiveMkisofsCmd");250 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveMkisofsCmd"); 247 251 gc->setLabel(QObject::tr("mkisofs command")); 248 252 gc->setValue("mkisofs"); 249 253 gc->setHelpText(QObject::tr("Command to run mkisofs. (Used to create ISO images)")); 250 254 return gc; 251 255 }; 252 256 253 static Host LineEdit*MythArchiveGrowisofsCmd()257 static HostTextEditSetting *MythArchiveGrowisofsCmd() 254 258 { 255 Host LineEdit *gc = new HostLineEdit("MythArchiveGrowisofsCmd");259 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveGrowisofsCmd"); 256 260 gc->setLabel(QObject::tr("growisofs command")); 257 261 gc->setValue("growisofs"); 258 262 gc->setHelpText(QObject::tr("Command to run growisofs. (Used to burn DVD's)")); 259 263 return gc; 260 264 }; 261 265 262 static Host LineEdit*MythArchiveM2VRequantiserCmd()266 static HostTextEditSetting *MythArchiveM2VRequantiserCmd() 263 267 { 264 Host LineEdit *gc = new HostLineEdit("MythArchiveM2VRequantiserCmd");268 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveM2VRequantiserCmd"); 265 269 gc->setLabel(QObject::tr("M2VRequantiser command")); 266 270 gc->setValue("M2VRequantiser"); 267 271 gc->setHelpText(QObject::tr("Command to run M2VRequantiser. Optional - leave blank if you don't have M2VRequantiser installed.")); 268 272 return gc; 269 273 }; 270 274 271 static Host LineEdit*MythArchiveJpeg2yuvCmd()275 static HostTextEditSetting *MythArchiveJpeg2yuvCmd() 272 276 { 273 Host LineEdit *gc = new HostLineEdit("MythArchiveJpeg2yuvCmd");277 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveJpeg2yuvCmd"); 274 278 gc->setLabel(QObject::tr("jpeg2yuv command")); 275 279 gc->setValue("jpeg2yuv"); 276 280 gc->setHelpText(QObject::tr("Command to run jpeg2yuv. Part of mjpegtools package")); 277 281 return gc; 278 282 }; 279 283 280 static Host LineEdit*MythArchiveSpumuxCmd()284 static HostTextEditSetting *MythArchiveSpumuxCmd() 281 285 { 282 Host LineEdit *gc = new HostLineEdit("MythArchiveSpumuxCmd");286 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveSpumuxCmd"); 283 287 gc->setLabel(QObject::tr("spumux command")); 284 288 gc->setValue("spumux"); 285 289 gc->setHelpText(QObject::tr("Command to run spumux. Part of dvdauthor package")); 286 290 return gc; 287 291 }; 288 292 289 static Host LineEdit*MythArchiveMpeg2encCmd()293 static HostTextEditSetting *MythArchiveMpeg2encCmd() 290 294 { 291 Host LineEdit *gc = new HostLineEdit("MythArchiveMpeg2encCmd");295 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveMpeg2encCmd"); 292 296 gc->setLabel(QObject::tr("mpeg2enc command")); 293 297 gc->setValue("mpeg2enc"); 294 298 gc->setHelpText(QObject::tr("Command to run mpeg2enc. Part of mjpegtools package")); 295 299 return gc; 296 300 }; 297 301 298 static Host LineEdit*MythArchiveProjectXCmd()302 static HostTextEditSetting *MythArchiveProjectXCmd() 299 303 { 300 Host LineEdit *gc = new HostLineEdit("MythArchiveProjectXCmd");304 HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveProjectXCmd"); 301 305 gc->setLabel(QObject::tr("projectx command")); 302 306 gc->setValue("projectx"); 303 307 gc->setHelpText(QObject::tr("Command to run ProjectX. Will be used to cut " … … static HostLineEdit *MythArchiveProjectXCmd() 307 311 308 312 ArchiveSettings::ArchiveSettings() 309 313 { 310 VerticalConfigurationGroup* vcg1 = new VerticalConfigurationGroup(false); 311 vcg1->setLabel(QObject::tr("MythArchive Settings")); 312 vcg1->addChild(MythArchiveTempDir()); 313 vcg1->addChild(MythArchiveShareDir()); 314 vcg1->addChild(PALNTSC()); 315 vcg1->addChild(MythArchiveFileFilter()); 316 vcg1->addChild(MythArchiveDVDLocation()); 317 vcg1->addChild(MythArchiveDriveSpeed()); 318 vcg1->addChild(MythArchiveDVDPlayerCmd()); 319 addChild(vcg1); 320 321 VerticalConfigurationGroup* vcg2 = new VerticalConfigurationGroup(false); 322 vcg2->setLabel(QObject::tr("MythArchive Settings (2)")); 323 vcg2->addChild(MythArchiveCopyRemoteFiles()); 324 vcg2->addChild(MythArchiveAlwaysUseMythTranscode()); 325 vcg2->addChild(MythArchiveUseProjectX()); 326 vcg2->addChild(MythArchiveAddSubtitles()); 327 vcg2->addChild(MythArchiveUseFIFO()); 328 vcg2->addChild(MythArchiveDefaultEncProfile()); 329 addChild(vcg2); 330 331 VerticalConfigurationGroup* vcg3 = new VerticalConfigurationGroup(false); 332 vcg3->setLabel(QObject::tr("DVD Menu Settings")); 333 vcg3->addChild(MainMenuAspectRatio()); 334 vcg3->addChild(ChapterMenuAspectRatio()); 335 vcg3->addChild(MythArchiveDateFormat()); 336 vcg3->addChild(MythArchiveTimeFormat()); 337 addChild(vcg3); 338 339 VerticalConfigurationGroup* vcg4 = new VerticalConfigurationGroup(false); 340 vcg4->setLabel(QObject::tr("MythArchive External Commands (1)")); 341 vcg4->addChild(MythArchiveMplexCmd()); 342 vcg4->addChild(MythArchiveDvdauthorCmd()); 343 vcg4->addChild(MythArchiveSpumuxCmd()); 344 vcg4->addChild(MythArchiveMpeg2encCmd()); 345 addChild(vcg4); 346 347 VerticalConfigurationGroup* vcg5 = new VerticalConfigurationGroup(false); 348 vcg5->setLabel(QObject::tr("MythArchive External Commands (2)")); 349 vcg5->addChild(MythArchiveMkisofsCmd()); 350 vcg5->addChild(MythArchiveGrowisofsCmd()); 351 vcg5->addChild(MythArchiveM2VRequantiserCmd()); 352 vcg5->addChild(MythArchiveJpeg2yuvCmd()); 353 vcg5->addChild(MythArchiveProjectXCmd()); 354 addChild(vcg5); 314 setLabel(QObject::tr("MythArchive Settings")); 315 addChild(MythArchiveTempDir()); 316 addChild(MythArchiveShareDir()); 317 addChild(PALNTSC()); 318 addChild(MythArchiveFileFilter()); 319 addChild(MythArchiveDVDLocation()); 320 addChild(MythArchiveDriveSpeed()); 321 addChild(MythArchiveDVDPlayerCmd()); 322 addChild(MythArchiveCopyRemoteFiles()); 323 addChild(MythArchiveAlwaysUseMythTranscode()); 324 addChild(MythArchiveUseProjectX()); 325 addChild(MythArchiveAddSubtitles()); 326 addChild(MythArchiveUseFIFO()); 327 addChild(MythArchiveDefaultEncProfile()); 328 329 GroupSetting* DVDSettings = new GroupSetting(); 330 DVDSettings->setLabel(QObject::tr("DVD Menu Settings")); 331 DVDSettings->addChild(MainMenuAspectRatio()); 332 DVDSettings->addChild(ChapterMenuAspectRatio()); 333 DVDSettings->addChild(MythArchiveDateFormat()); 334 DVDSettings->addChild(MythArchiveTimeFormat()); 335 addChild(DVDSettings); 336 337 GroupSetting* externalCmdSettings = new GroupSetting(); 338 externalCmdSettings->setLabel(QObject::tr("MythArchive External Commands")); 339 externalCmdSettings->addChild(MythArchiveMplexCmd()); 340 externalCmdSettings->addChild(MythArchiveDvdauthorCmd()); 341 externalCmdSettings->addChild(MythArchiveSpumuxCmd()); 342 externalCmdSettings->addChild(MythArchiveMpeg2encCmd()); 343 externalCmdSettings->addChild(MythArchiveMkisofsCmd()); 344 externalCmdSettings->addChild(MythArchiveGrowisofsCmd()); 345 externalCmdSettings->addChild(MythArchiveM2VRequantiserCmd()); 346 externalCmdSettings->addChild(MythArchiveJpeg2yuvCmd()); 347 externalCmdSettings->addChild(MythArchiveProjectXCmd()); 348 addChild(externalCmdSettings); 355 349 } -
mythplugins/mytharchive/mytharchive/archivesettings.h
diff --git a/mythplugins/mytharchive/mytharchive/archivesettings.h b/mythplugins/mytharchive/mytharchive/archivesettings.h index 72dfe6f..6f58baf 100644
a b 5 5 #ifndef ARCHIVESETTINGS_H 6 6 #define ARCHIVESETTINGS_H 7 7 8 #include <s ettings.h>8 #include <standardsettings.h> 9 9 10 10 11 class ArchiveSettings : public ConfigurationWizard11 class ArchiveSettings : public GroupSetting 12 12 { 13 13 public: 14 14 ArchiveSettings(); -
mythplugins/mytharchive/mytharchive/main.cpp
diff --git a/mythplugins/mytharchive/mytharchive/main.cpp b/mythplugins/mytharchive/mytharchive/main.cpp index 5eb05d7..0cffe5f 100644
a b int mythplugin_run(void) 347 347 348 348 int mythplugin_config(void) 349 349 { 350 ArchiveSettings settings; 351 settings.exec(); 350 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 351 StandardSettingDialog *ssd = new StandardSettingDialog(mainStack, "archivesettings"); 352 353 if (ssd->Create()) 354 { 355 ssd->loadSettings(new ArchiveSettings()); 356 mainStack->AddScreen(ssd); 357 } 358 else 359 delete ssd; 352 360 353 361 return 0; 354 362 } -
mythplugins/mythgallery/mythgallery/gallerysettings.cpp
diff --git a/mythplugins/mythgallery/mythgallery/gallerysettings.cpp b/mythplugins/mythgallery/mythgallery/gallerysettings.cpp index c23db74..94afac0 100644
a b 12 12 13 13 // General Settings 14 14 15 static Host LineEdit*MythGalleryFilter()15 static HostTextEditSetting *MythGalleryFilter() 16 16 { 17 Host LineEdit *gc = new HostLineEdit("GalleryFilterDirectory");17 HostTextEditSetting *gc = new HostTextEditSetting("GalleryFilterDirectory"); 18 18 gc->setLabel(QObject::tr("Directory filter")); 19 19 gc->setValue(""); 20 20 gc->setHelpText(QObject::tr("Enter directory names to be excluded in " … … static HostLineEdit *MythGalleryFilter() 23 23 return gc; 24 24 }; 25 25 26 static HostComboBox *MythGalleryFilterType()26 static HostComboBoxSetting *MythGalleryFilterType() 27 27 { 28 HostComboBox *gc = new HostComboBox("GalleryFilterType");28 HostComboBoxSetting *gc = new HostComboBoxSetting("GalleryFilterType"); 29 29 gc->setLabel(QObject::tr("Type filter")); 30 30 gc->addSelection("All", QString::number(kTypeFilterAll)); 31 31 gc->addSelection("Images only", QString::number(kTypeFilterImagesOnly)); … … static HostComboBox *MythGalleryFilterType() 35 35 return gc; 36 36 }; 37 37 38 static Host LineEdit*MythGalleryDir()38 static HostFileBrowserSetting *MythGalleryDir() 39 39 { 40 Host LineEdit *gc = new HostLineEdit("GalleryDir");40 HostFileBrowserSetting *gc = new HostFileBrowserSetting("GalleryDir"); 41 41 gc->setLabel(QObject::tr("Directory that holds images")); 42 42 #ifdef Q_WS_MACX 43 43 gc->setValue(QDir::homePath() + "/Pictures"); … … static HostLineEdit *MythGalleryDir() 49 49 return gc; 50 50 }; 51 51 52 static HostCheckBox *MythGalleryThumbnailLocation()52 static HostCheckBoxSetting *MythGalleryThumbnailLocation() 53 53 { 54 HostCheckBox *gc = new HostCheckBox("GalleryThumbnailLocation");54 HostCheckBoxSetting *gc = new HostCheckBoxSetting("GalleryThumbnailLocation"); 55 55 gc->setLabel(QObject::tr("Store thumbnails in image directory")); 56 56 gc->setValue(true); 57 57 gc->setHelpText(QObject::tr("If set, thumbnails are stored in '.thumbcache' directories within the above directory. If cleared, they are stored in your home directory.")); 58 58 return gc; 59 59 }; 60 60 61 static HostComboBox *MythGallerySortOrder()61 static HostComboBoxSetting *MythGallerySortOrder() 62 62 { 63 HostComboBox *gc = new HostComboBox("GallerySortOrder");63 HostComboBoxSetting *gc = new HostComboBoxSetting("GallerySortOrder"); 64 64 gc->setLabel(QObject::tr("Sort order when browsing")); 65 65 gc->addSelection("Unsorted", QString::number(kSortOrderUnsorted)); 66 66 gc->addSelection("Name (A-Z alpha)", QString::number(kSortOrderNameAsc)); … … static HostComboBox *MythGallerySortOrder() 83 83 return gc; 84 84 }; 85 85 86 static HostSpinBox *MythGalleryOverlayCaption()86 static HostSpinBoxSetting *MythGalleryOverlayCaption() 87 87 { 88 HostSpinBox *gc = new HostSpinBox("GalleryOverlayCaption", 0, 600, 1);88 HostSpinBoxSetting *gc = new HostSpinBoxSetting("GalleryOverlayCaption", 0, 600, 1); 89 89 gc->setLabel(QObject::tr("Overlay caption")); 90 90 gc->setValue(0); 91 91 gc->setHelpText(QObject::tr("This is the number of seconds to show a caption " … … static HostSpinBox *MythGalleryOverlayCaption() 93 93 return gc; 94 94 }; 95 95 96 static Host LineEdit*MythGalleryImportDirs()96 static HostTextEditSetting *MythGalleryImportDirs() 97 97 { 98 Host LineEdit *gc = new HostLineEdit("GalleryImportDirs");98 HostTextEditSetting *gc = new HostTextEditSetting("GalleryImportDirs"); 99 99 gc->setLabel(QObject::tr("Paths to import images from")); 100 100 gc->setValue("/mnt/cdrom:/mnt/camera"); 101 101 gc->setHelpText(QObject::tr("This is a colon separated list of paths. " … … static HostLineEdit *MythGalleryImportDirs() 104 104 return gc; 105 105 }; 106 106 107 static HostCheckBox *MythGalleryAutoLoad()107 static HostCheckBoxSetting *MythGalleryAutoLoad() 108 108 { 109 HostCheckBox *gc = new HostCheckBox("GalleryAutoLoad");109 HostCheckBoxSetting *gc = new HostCheckBoxSetting("GalleryAutoLoad"); 110 110 gc->setLabel(QObject::tr("Automatically load MythGallery to display pictures")); 111 111 gc->setValue(false); 112 112 gc->setHelpText(QObject::tr("When a new CD-Rom or removable storage device containing pictures is detected then load MythGallery to display the content.")); 113 113 return gc; 114 114 } 115 115 116 static HostComboBoxSetting *SlideShowTransitionMode() 117 { 118 //use to be a checkbox 119 HostComboBoxSetting *gc = new HostComboBoxSetting("SlideshowUseOpenGL"); 120 gc->setLabel(QObject::tr("Transition mode")); 121 gc->addSelection(QObject::tr("Standard"),"0"); 116 122 #ifdef USING_OPENGL 123 gc->addSelection(QObject::tr("OpenGL"),"1"); 124 #endif 125 return gc; 126 }; 117 127 118 static HostCheckBox *SlideshowUseOpenGL() 128 #ifdef USING_OPENGL 129 /* 130 static HostCheckBoxSetting *SlideshowUseOpenGL() 119 131 { 120 HostCheckBox *gc = new HostCheckBox("SlideshowUseOpenGL");132 HostCheckBoxSetting *gc = new HostCheckBoxSetting("SlideshowUseOpenGL"); 121 133 gc->setLabel(QObject::tr("Use OpenGL transitions")); 122 134 gc->setValue(false); 123 135 gc->setHelpText(QObject::tr("Check this to enable OpenGL " 124 136 "based slideshow transitions")); 125 137 return gc; 126 }; 138 };*/ 127 139 128 static HostComboBox *SlideshowOpenGLTransition()140 static HostComboBoxSetting *SlideshowOpenGLTransition() 129 141 { 130 HostComboBox *gc = new HostComboBox("SlideshowOpenGLTransition");142 HostComboBoxSetting *gc = new HostComboBoxSetting("SlideshowOpenGLTransition"); 131 143 gc->setLabel(QObject::tr("Type of OpenGL transition")); 132 144 gc->addSelection("none"); 133 145 gc->addSelection("blend (gl)"); … … static HostComboBox *SlideshowOpenGLTransition() 146 158 return gc; 147 159 }; 148 160 149 static HostSpinBox *SlideshowOpenGLTransitionLength()161 static HostSpinBoxSetting *SlideshowOpenGLTransitionLength() 150 162 { 151 HostSpinBox *gc = new HostSpinBox(163 HostSpinBoxSetting *gc = new HostSpinBoxSetting( 152 164 "SlideshowOpenGLTransitionLength", 500, 120000, 500); 153 165 gc->setLabel(QObject::tr("Duration of OpenGL Transition (milliseconds)")); 154 166 gc->setValue(2000); … … static HostSpinBox *SlideshowOpenGLTransitionLength() 157 169 158 170 #endif /* USING_OPENGL */ 159 171 160 static HostComboBox *SlideshowTransition()172 static HostComboBoxSetting *SlideshowTransition() 161 173 { 162 HostComboBox *gc = new HostComboBox("SlideshowTransition");174 HostComboBoxSetting *gc = new HostComboBoxSetting("SlideshowTransition"); 163 175 gc->setLabel(QObject::tr("Type of transition")); 164 176 gc->addSelection("none"); 165 177 gc->addSelection("chess board"); … … static HostComboBox *SlideshowTransition() 180 192 return gc; 181 193 }; 182 194 183 static HostComboBox *SlideshowBackground()195 static HostComboBoxSetting *SlideshowBackground() 184 196 { 185 HostComboBox *gc = new HostComboBox("SlideshowBackground");197 HostComboBoxSetting *gc = new HostComboBoxSetting("SlideshowBackground"); 186 198 gc->setLabel(QObject::tr("Type of background")); 187 199 // use names from /etc/X11/rgb.txt 188 200 gc->addSelection("theme",""); … … static HostComboBox *SlideshowBackground() 193 205 return gc; 194 206 }; 195 207 196 static HostSpinBox *SlideshowDelay()208 static HostSpinBoxSetting *SlideshowDelay() 197 209 { 198 HostSpinBox *gc = new HostSpinBox("SlideshowDelay", 0, 86400, 1);210 HostSpinBoxSetting *gc = new HostSpinBoxSetting("SlideshowDelay", 0, 86400, 1); 199 211 gc->setLabel(QObject::tr("Slideshow Delay")); 200 212 gc->setValue(5); 201 213 gc->setHelpText(QObject::tr("This is the number of seconds to display each " … … static HostSpinBox *SlideshowDelay() 203 215 return gc; 204 216 }; 205 217 206 static HostCheckBox *SlideshowRecursive()218 static HostCheckBoxSetting *SlideshowRecursive() 207 219 { 208 HostCheckBox *gc = new HostCheckBox("GalleryRecursiveSlideshow");220 HostCheckBoxSetting *gc = new HostCheckBoxSetting("GalleryRecursiveSlideshow"); 209 221 gc->setLabel(QObject::tr("Recurse into directories")); 210 222 gc->setHelpText(QObject::tr("Check this to let the slideshow recurse into " 211 223 "sub-directories.")); 212 224 return gc; 213 225 }; 214 226 215 class GalleryConfigurationGroup : public TriggeredConfigurationGroup 216 { 217 public: 218 GalleryConfigurationGroup() : 219 TriggeredConfigurationGroup(false, true, false, false) 220 { 221 setLabel(QObject::tr("MythGallery Settings (Slideshow)")); 222 setUseLabel(false); 223 227 GallerySettings::GallerySettings() 228 :GroupSetting() 229 { 230 setLabel(QObject::tr("MythGallery Settings")); 231 addChild(MythGalleryDir()); 232 addChild(MythGalleryThumbnailLocation()); 233 addChild(MythGallerySortOrder()); 234 addChild(MythGalleryImportDirs()); 235 addChild(MythGalleryAutoLoad()); 236 addChild(MythGalleryFilter()); 237 addChild(MythGalleryFilterType()); 238 239 HostComboBoxSetting* transitionMode = SlideShowTransitionMode(); 240 addChild(transitionMode); 241 //no opengl 242 transitionMode->addTargetedChild("0",MythGalleryOverlayCaption()); 243 transitionMode->addTargetedChild("0",SlideshowTransition()); 244 transitionMode->addTargetedChild("0",SlideshowBackground()); 224 245 #ifdef USING_OPENGL 225 HostCheckBox* useOpenGL = SlideshowUseOpenGL(); 226 addChild(useOpenGL); 227 setTrigger(useOpenGL); 228 229 ConfigurationGroup* openGLConfig = new VerticalConfigurationGroup(false); 230 openGLConfig->addChild(SlideshowOpenGLTransition()); 231 openGLConfig->addChild(SlideshowOpenGLTransitionLength()); 232 addTarget("1", openGLConfig); 246 transitionMode->addTargetedChild("1",SlideshowOpenGLTransition()); 247 transitionMode->addTargetedChild("1",SlideshowOpenGLTransitionLength()); 233 248 #endif 234 249 235 ConfigurationGroup* regularConfig = new VerticalConfigurationGroup(false);236 regularConfig->addChild(MythGalleryOverlayCaption());237 regularConfig->addChild(SlideshowTransition());238 regularConfig->addChild(SlideshowBackground());239 addTarget("0", regularConfig);240 241 addChild(SlideshowDelay());242 addChild(SlideshowRecursive());243 }244 245 };246 247 250 248 GallerySettings::GallerySettings()249 {250 VerticalConfigurationGroup* general = new VerticalConfigurationGroup(false);251 general->setLabel(QObject::tr("MythGallery Settings (General)"));252 general->addChild(MythGalleryDir());253 general->addChild(MythGalleryThumbnailLocation());254 general->addChild(MythGallerySortOrder());255 general->addChild(MythGalleryImportDirs());256 general->addChild(MythGalleryAutoLoad());257 general->addChild(MythGalleryFilter());258 general->addChild(MythGalleryFilterType());259 addChild(general);260 251 261 GalleryConfigurationGroup* config = new GalleryConfigurationGroup();262 addChild( config);252 addChild(SlideshowDelay()); 253 addChild(SlideshowRecursive()); 263 254 } 264 255 -
mythplugins/mythgallery/mythgallery/gallerysettings.h
diff --git a/mythplugins/mythgallery/mythgallery/gallerysettings.h b/mythplugins/mythgallery/mythgallery/gallerysettings.h index cd1d27e..82fccbc 100644
a b 1 1 #ifndef GALLERYSETTINGS_H 2 2 #define GALLERYSETTINGS_H 3 3 4 #include "mythtv/s ettings.h"4 #include "mythtv/standardsettings.h" 5 5 #include "mythtv/mythcontext.h" 6 6 7 class GallerySettings : public ConfigurationWizard7 class GallerySettings : public GroupSetting 8 8 { 9 9 public: 10 10 GallerySettings(); -
mythplugins/mythgallery/mythgallery/iconview.cpp
diff --git a/mythplugins/mythgallery/mythgallery/iconview.cpp b/mythplugins/mythgallery/mythgallery/iconview.cpp index 1e05dde..f236a00 100644
a b void IconView::DoDeleteCurrent(bool doDelete) 1051 1051 1052 1052 void IconView::HandleSettings(void) 1053 1053 { 1054 GallerySettings settings; 1055 settings.exec(); 1056 gCoreContext->ClearSettingsCache(); 1054 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 1055 StandardSettingDialog *ssd = new StandardSettingDialog(mainStack, "gallerysettings"); 1056 1057 if (ssd->Create()) 1058 { 1059 ssd->loadSettings(new GallerySettings()); 1060 mainStack->AddScreen(ssd); 1061 connect(ssd,SIGNAL(Close()),this, SLOT(ReloadSettings())); 1062 } 1063 else 1064 delete ssd; 1057 1065 1066 } 1067 1068 void IconView::ReloadSettings(void) 1069 { 1070 gCoreContext->ClearSettingsCache(); 1058 1071 // reload settings 1059 1072 m_showcaption = gCoreContext->GetNumSetting("GalleryOverlayCaption", 0); 1060 1073 m_sortorder = gCoreContext->GetNumSetting("GallerySortOrder", 0); -
mythplugins/mythgallery/mythgallery/iconview.h
diff --git a/mythplugins/mythgallery/mythgallery/iconview.h b/mythplugins/mythgallery/mythgallery/iconview.h index b9c5a33..6243394 100644
a b class IconView : public MythScreenType 88 88 void HandleDeleteCurrent(void); 89 89 void HandleSlideShow(void); 90 90 void HandleSettings(void); 91 void ReloadSettings(void); 91 92 void HandleEject(void); 92 93 void HandleImport(void); 93 94 void HandleShowDevices(void); -
mythplugins/mythgallery/mythgallery/main.cpp
diff --git a/mythplugins/mythgallery/mythgallery/main.cpp b/mythplugins/mythgallery/mythgallery/main.cpp index 396c9d6..35f7765 100644
a b int mythplugin_run(void) 162 162 163 163 int mythplugin_config(void) 164 164 { 165 GallerySettings settings;166 settings.exec();165 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 166 StandardSettingDialog *ssd = new StandardSettingDialog(mainStack, "gallerysettings"); 167 167 168 if (ssd->Create()) 169 { 170 ssd->loadSettings(new GallerySettings()); 171 mainStack->AddScreen(ssd); 172 } 173 else 174 delete ssd; 168 175 return 0; 169 176 } 170 177 -
mythplugins/mythzoneminder/mythzoneminder/main.cpp
diff --git a/mythplugins/mythzoneminder/mythzoneminder/main.cpp b/mythplugins/mythzoneminder/mythzoneminder/main.cpp index 8437437..d6e8117 100644
a b int mythplugin_run(void) 160 160 161 161 int mythplugin_config(void) 162 162 { 163 ZMSettings settings; 164 settings.exec(); 163 MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); 164 StandardSettingDialog *ssd = new StandardSettingDialog(mainStack, "zonemindersettings"); 165 166 if (ssd->Create()) 167 { 168 ssd->loadSettings(new ZMSettings()); 169 mainStack->AddScreen(ssd); 170 } 171 else 172 delete ssd; 165 173 166 174 return 0; 167 175 } -
mythplugins/mythzoneminder/mythzoneminder/zmsettings.cpp
diff --git a/mythplugins/mythzoneminder/mythzoneminder/zmsettings.cpp b/mythplugins/mythzoneminder/mythzoneminder/zmsettings.cpp index 702e434..be024cd 100644
a b 11 11 #include "zmsettings.h" 12 12 13 13 14 static Host LineEdit*ZMServerIP()14 static HostTextEditSetting *ZMServerIP() 15 15 { 16 Host LineEdit *gc = new HostLineEdit("ZoneMinderServerIP");16 HostTextEditSetting *gc = new HostTextEditSetting("ZoneMinderServerIP"); 17 17 gc->setLabel(QObject::tr("IP address of the MythZoneMinder server")); 18 18 gc->setValue("127.0.0.1"); 19 19 gc->setHelpText(QObject::tr("Enter the IP address of the MythZoneMinder server " … … static HostLineEdit *ZMServerIP() 21 21 return gc; 22 22 }; 23 23 24 static Host LineEdit*ZMServerPort()24 static HostTextEditSetting *ZMServerPort() 25 25 { 26 Host LineEdit *gc = new HostLineEdit("ZoneMinderServerPort");26 HostTextEditSetting *gc = new HostTextEditSetting("ZoneMinderServerPort"); 27 27 gc->setLabel(QObject::tr("Port the server runs on")); 28 28 gc->setValue("6548"); 29 29 gc->setHelpText(QObject::tr("Unless you've got good reason to, don't " … … static HostLineEdit *ZMServerPort() 31 31 return gc; 32 32 }; 33 33 34 static HostComboBox *ZMDateFormat()34 static HostComboBoxSetting *ZMDateFormat() 35 35 { 36 HostComboBox *gc = new HostComboBox("ZoneMinderDateFormat");36 HostComboBoxSetting *gc = new HostComboBoxSetting("ZoneMinderDateFormat"); 37 37 gc->setLabel(QObject::tr("Date format")); 38 38 39 39 QDate sampdate = QDate::currentDate(); … … static HostComboBox *ZMDateFormat() 65 65 return gc; 66 66 } 67 67 68 static HostComboBox *ZMTimeFormat()68 static HostComboBoxSetting *ZMTimeFormat() 69 69 { 70 HostComboBox *gc = new HostComboBox("ZoneMinderTimeFormat");70 HostComboBoxSetting *gc = new HostComboBoxSetting("ZoneMinderTimeFormat"); 71 71 gc->setLabel(QObject::tr("Time format")); 72 72 73 73 QTime samptime = QTime::currentTime(); … … static HostComboBox *ZMTimeFormat() 83 83 84 84 ZMSettings::ZMSettings() 85 85 { 86 VerticalConfigurationGroup* vcg1 = new VerticalConfigurationGroup(false); 87 vcg1->setLabel(QObject::tr("MythZoneMinder Settings")); 88 vcg1->addChild(ZMServerIP()); 89 vcg1->addChild(ZMServerPort()); 90 vcg1->addChild(ZMDateFormat()); 91 vcg1->addChild(ZMTimeFormat()); 92 addChild(vcg1); 86 setLabel(QObject::tr("MythZoneMinder Settings")); 87 addChild(ZMServerIP()); 88 addChild(ZMServerPort()); 89 addChild(ZMDateFormat()); 90 addChild(ZMTimeFormat()); 93 91 } -
mythplugins/mythzoneminder/mythzoneminder/zmsettings.h
diff --git a/mythplugins/mythzoneminder/mythzoneminder/zmsettings.h b/mythplugins/mythzoneminder/mythzoneminder/zmsettings.h index b6f2ad5..6c5cc7c 100644
a b 5 5 #ifndef ZMSETTINGS_H 6 6 #define ZMSETTINGS_H 7 7 8 #include <s ettings.h>8 #include <standardsettings.h> 9 9 10 class ZMSettings : public ConfigurationWizard10 class ZMSettings : public GroupSetting 11 11 { 12 12 public: 13 13 ZMSettings();