File indexing completed on 2025-01-05 03:57:14
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2003-16-10 0007 * Description : application settings interface 0008 * 0009 * SPDX-FileCopyrightText: 2003-2004 by Renchi Raju <renchi dot raju at gmail dot com> 0010 * SPDX-FileCopyrightText: 2003-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * SPDX-FileCopyrightText: 2007 by Arnd Baecker <arnd dot baecker at web dot de> 0012 * SPDX-FileCopyrightText: 2014 by Mohamed_Anwer <m_dot_anwer at gmx dot com> 0013 * SPDX-FileCopyrightText: 2014 by Veaceslav Munteanu <veaceslav dot munteanu90 at gmail dot com> 0014 * 0015 * SPDX-License-Identifier: GPL-2.0-or-later 0016 * 0017 * ============================================================ */ 0018 0019 #include "applicationsettings_p.h" 0020 0021 namespace Digikam 0022 { 0023 0024 void ApplicationSettings::setToolTipsFont(const QFont& font) 0025 { 0026 d->toolTipsFont = font; 0027 } 0028 0029 QFont ApplicationSettings::getToolTipsFont() const 0030 { 0031 return d->toolTipsFont; 0032 } 0033 0034 void ApplicationSettings::setShowToolTips(bool val) 0035 { 0036 d->showToolTips = val; 0037 } 0038 0039 bool ApplicationSettings::getShowToolTips() const 0040 { 0041 return d->showToolTips; 0042 } 0043 0044 void ApplicationSettings::setToolTipsShowFileName(bool val) 0045 { 0046 d->tooltipShowFileName = val; 0047 } 0048 0049 bool ApplicationSettings::getToolTipsShowFileName() const 0050 { 0051 return d->tooltipShowFileName; 0052 } 0053 0054 void ApplicationSettings::setToolTipsShowFileDate(bool val) 0055 { 0056 d->tooltipShowFileDate = val; 0057 } 0058 0059 bool ApplicationSettings::getToolTipsShowFileDate() const 0060 { 0061 return d->tooltipShowFileDate; 0062 } 0063 0064 void ApplicationSettings::setToolTipsShowFileSize(bool val) 0065 { 0066 d->tooltipShowFileSize = val; 0067 } 0068 0069 bool ApplicationSettings::getToolTipsShowFileSize() const 0070 { 0071 return d->tooltipShowFileSize; 0072 } 0073 0074 void ApplicationSettings::setToolTipsShowImageType(bool val) 0075 { 0076 d->tooltipShowImageType = val; 0077 } 0078 0079 bool ApplicationSettings::getToolTipsShowImageType() const 0080 { 0081 return d->tooltipShowImageType; 0082 } 0083 0084 void ApplicationSettings::setToolTipsShowImageDim(bool val) 0085 { 0086 d->tooltipShowImageDim = val; 0087 } 0088 0089 bool ApplicationSettings::getToolTipsShowImageDim() const 0090 { 0091 return d->tooltipShowImageDim; 0092 } 0093 0094 void ApplicationSettings::setToolTipsShowImageAR(bool val) 0095 { 0096 d->tooltipShowImageAR = val; 0097 } 0098 0099 bool ApplicationSettings::getToolTipsShowImageAR() const 0100 { 0101 return d->tooltipShowImageAR; 0102 } 0103 0104 void ApplicationSettings::setToolTipsShowPhotoMake(bool val) 0105 { 0106 d->tooltipShowPhotoMake = val; 0107 } 0108 0109 bool ApplicationSettings::getToolTipsShowPhotoMake() const 0110 { 0111 return d->tooltipShowPhotoMake; 0112 } 0113 0114 void ApplicationSettings::setToolTipsShowPhotoLens(bool val) 0115 { 0116 d->tooltipShowPhotoLens = val; 0117 } 0118 0119 bool ApplicationSettings::getToolTipsShowPhotoLens() const 0120 { 0121 return d->tooltipShowPhotoLens; 0122 } 0123 0124 void ApplicationSettings::setToolTipsShowPhotoDate(bool val) 0125 { 0126 d->tooltipShowPhotoDate = val; 0127 } 0128 0129 bool ApplicationSettings::getToolTipsShowPhotoDate() const 0130 { 0131 return d->tooltipShowPhotoDate; 0132 } 0133 0134 void ApplicationSettings::setToolTipsShowPhotoFocal(bool val) 0135 { 0136 d->tooltipShowPhotoFocal = val; 0137 } 0138 0139 bool ApplicationSettings::getToolTipsShowPhotoFocal() const 0140 { 0141 return d->tooltipShowPhotoFocal; 0142 } 0143 0144 void ApplicationSettings::setToolTipsShowPhotoExpo(bool val) 0145 { 0146 d->tooltipShowPhotoExpo = val; 0147 } 0148 0149 bool ApplicationSettings::getToolTipsShowPhotoExpo() const 0150 { 0151 return d->tooltipShowPhotoExpo; 0152 } 0153 0154 void ApplicationSettings::setToolTipsShowPhotoMode(bool val) 0155 { 0156 d->tooltipShowPhotoMode = val; 0157 } 0158 0159 bool ApplicationSettings::getToolTipsShowPhotoMode() const 0160 { 0161 return d->tooltipShowPhotoMode; 0162 } 0163 0164 void ApplicationSettings::setToolTipsShowPhotoFlash(bool val) 0165 { 0166 d->tooltipShowPhotoFlash = val; 0167 } 0168 0169 bool ApplicationSettings::getToolTipsShowPhotoFlash() const 0170 { 0171 return d->tooltipShowPhotoFlash; 0172 } 0173 0174 void ApplicationSettings::setToolTipsShowPhotoWB(bool val) 0175 { 0176 d->tooltipShowPhotoWb = val; 0177 } 0178 0179 bool ApplicationSettings::getToolTipsShowPhotoWB() const 0180 { 0181 return d->tooltipShowPhotoWb; 0182 } 0183 0184 void ApplicationSettings::setToolTipsShowAlbumName(bool val) 0185 { 0186 d->tooltipShowAlbumName = val; 0187 } 0188 0189 bool ApplicationSettings::getToolTipsShowAlbumName() const 0190 { 0191 return d->tooltipShowAlbumName; 0192 } 0193 0194 void ApplicationSettings::setToolTipsShowTitles(bool val) 0195 { 0196 d->tooltipShowTitles = val; 0197 } 0198 0199 bool ApplicationSettings::getToolTipsShowTitles() const 0200 { 0201 return d->tooltipShowTitles; 0202 } 0203 0204 void ApplicationSettings::setToolTipsShowComments(bool val) 0205 { 0206 d->tooltipShowComments = val; 0207 } 0208 0209 bool ApplicationSettings::getToolTipsShowComments() const 0210 { 0211 return d->tooltipShowComments; 0212 } 0213 0214 void ApplicationSettings::setToolTipsShowTags(bool val) 0215 { 0216 d->tooltipShowTags = val; 0217 } 0218 0219 bool ApplicationSettings::getToolTipsShowTags() const 0220 { 0221 return d->tooltipShowTags; 0222 } 0223 0224 void ApplicationSettings::setToolTipsShowLabelRating(bool val) 0225 { 0226 d->tooltipShowLabelRating = val; 0227 } 0228 0229 bool ApplicationSettings::getToolTipsShowLabelRating() const 0230 { 0231 return d->tooltipShowLabelRating; 0232 } 0233 0234 void ApplicationSettings::setShowAlbumToolTips(bool val) 0235 { 0236 d->showAlbumToolTips = val; 0237 } 0238 0239 bool ApplicationSettings::getShowAlbumToolTips() const 0240 { 0241 return d->showAlbumToolTips; 0242 } 0243 0244 void ApplicationSettings::setToolTipsShowAlbumTitle(bool val) 0245 { 0246 d->tooltipShowAlbumTitle = val; 0247 } 0248 0249 bool ApplicationSettings::getToolTipsShowAlbumTitle() const 0250 { 0251 return d->tooltipShowAlbumTitle; 0252 } 0253 0254 void ApplicationSettings::setToolTipsShowAlbumDate(bool val) 0255 { 0256 d->tooltipShowAlbumDate = val; 0257 } 0258 0259 bool ApplicationSettings::getToolTipsShowAlbumDate() const 0260 { 0261 return d->tooltipShowAlbumDate; 0262 } 0263 0264 void ApplicationSettings::setToolTipsShowAlbumCollection(bool val) 0265 { 0266 d->tooltipShowAlbumCollection = val; 0267 } 0268 0269 bool ApplicationSettings::getToolTipsShowAlbumCollection() const 0270 { 0271 return d->tooltipShowAlbumCollection; 0272 } 0273 0274 void ApplicationSettings::setToolTipsShowAlbumCategory(bool val) 0275 { 0276 d->tooltipShowAlbumCategory = val; 0277 } 0278 0279 bool ApplicationSettings::getToolTipsShowAlbumCategory() const 0280 { 0281 return d->tooltipShowAlbumCategory; 0282 } 0283 0284 void ApplicationSettings::setToolTipsShowAlbumCaption(bool val) 0285 { 0286 d->tooltipShowAlbumCaption = val; 0287 } 0288 0289 bool ApplicationSettings::getToolTipsShowAlbumCaption() const 0290 { 0291 return d->tooltipShowAlbumCaption; 0292 } 0293 0294 void ApplicationSettings::setToolTipsShowAlbumPreview(bool val) 0295 { 0296 d->tooltipShowAlbumPreview = val; 0297 } 0298 0299 bool ApplicationSettings::getToolTipsShowAlbumPreview() const 0300 { 0301 return d->tooltipShowAlbumPreview; 0302 } 0303 0304 void ApplicationSettings::setToolTipsShowVideoAspectRatio(bool val) 0305 { 0306 d->tooltipShowVideoAspectRatio = val; 0307 } 0308 0309 bool ApplicationSettings::getToolTipsShowVideoAspectRatio() const 0310 { 0311 return d->tooltipShowVideoAspectRatio; 0312 } 0313 0314 void ApplicationSettings::setToolTipsShowVideoAudioBitRate(bool val) 0315 { 0316 d->tooltipShowVideoAudioBitRate = val; 0317 } 0318 0319 bool ApplicationSettings::getToolTipsShowVideoAudioBitRate() const 0320 { 0321 return d->tooltipShowVideoAudioBitRate; 0322 } 0323 0324 void ApplicationSettings::setToolTipsShowVideoAudioChannelType(bool val) 0325 { 0326 d->tooltipShowVideoAudioChannelType = val; 0327 } 0328 0329 bool ApplicationSettings::getToolTipsShowVideoAudioChannelType() const 0330 { 0331 return d->tooltipShowVideoAudioChannelType; 0332 } 0333 0334 void ApplicationSettings::setToolTipsShowVideoAudioCodec(bool val) 0335 { 0336 d->tooltipShowVideoAudioCodec = val; 0337 } 0338 0339 bool ApplicationSettings::getToolTipsShowVideoAudioCodec() const 0340 { 0341 return d->tooltipShowVideoAudioCodec; 0342 } 0343 0344 void ApplicationSettings::setToolTipsShowVideoDuration(bool val) 0345 { 0346 d->tooltipShowVideoDuration = val; 0347 } 0348 0349 bool ApplicationSettings::getToolTipsShowVideoDuration() const 0350 { 0351 return d->tooltipShowVideoDuration; 0352 } 0353 0354 void ApplicationSettings::setToolTipsShowVideoFrameRate(bool val) 0355 { 0356 d->tooltipShowVideoFrameRate = val; 0357 } 0358 0359 bool ApplicationSettings::getToolTipsShowVideoFrameRate() const 0360 { 0361 return d->tooltipShowVideoFrameRate; 0362 } 0363 0364 void ApplicationSettings::setToolTipsShowVideoVideoCodec(bool val) 0365 { 0366 d->tooltipShowVideoVideoCodec = val; 0367 } 0368 0369 bool ApplicationSettings::getToolTipsShowVideoVideoCodec() const 0370 { 0371 return d->tooltipShowVideoVideoCodec; 0372 } 0373 0374 bool ApplicationSettings::showToolTipsIsValid() const 0375 { 0376 if (d->showToolTips) 0377 { 0378 if (d->tooltipShowFileName || 0379 d->tooltipShowFileDate || 0380 d->tooltipShowFileSize || 0381 d->tooltipShowImageType || 0382 d->tooltipShowImageDim || 0383 d->tooltipShowImageAR || 0384 d->tooltipShowPhotoMake || 0385 d->tooltipShowPhotoLens || 0386 d->tooltipShowPhotoDate || 0387 d->tooltipShowPhotoFocal || 0388 d->tooltipShowPhotoExpo || 0389 d->tooltipShowPhotoMode || 0390 d->tooltipShowPhotoFlash || 0391 d->tooltipShowPhotoWb || 0392 d->tooltipShowAlbumName || 0393 d->tooltipShowComments || 0394 d->tooltipShowTags || 0395 d->tooltipShowLabelRating 0396 ) 0397 { 0398 return true; 0399 } 0400 } 0401 0402 return false; 0403 } 0404 0405 bool ApplicationSettings::showAlbumToolTipsIsValid() const 0406 { 0407 if (d->showAlbumToolTips) 0408 { 0409 if ( 0410 d->tooltipShowAlbumTitle || 0411 d->tooltipShowAlbumDate || 0412 d->tooltipShowAlbumCollection || 0413 d->tooltipShowAlbumCaption || 0414 d->tooltipShowAlbumCategory 0415 ) 0416 { 0417 return true; 0418 } 0419 } 0420 0421 return false; 0422 } 0423 0424 } // namespace Digikam