166 bool load(QString profile = QStringLiteral(
"default"));
167 bool save(QString profile = QString());
169 static QString xdgUserConfigDir();
170 static const QList<int> & iconSizes(IconType type);
171 static int wallpaperModeFromString(
const QString str);
173 QString profileDir(QString profile,
bool useFallback =
false);
176 QString profileName()
const {
180 bool supportTrash()
const {
181 return supportTrash_;
184 QString fallbackIconThemeName()
const {
185 return fallbackIconThemeName_;
188 bool useFallbackIconTheme()
const {
189 return useFallbackIconTheme_;
192 void setFallbackIconThemeName(QString iconThemeName) {
193 fallbackIconThemeName_ = iconThemeName;
196 bool singleWindowMode()
const {
197 return singleWindowMode_;
200 void setSingleWindowMode(
bool singleWindowMode) {
201 singleWindowMode_ = singleWindowMode;
204 OpenDirTargetType bookmarkOpenMethod() {
205 return bookmarkOpenMethod_;
208 void setBookmarkOpenMethod(OpenDirTargetType bookmarkOpenMethod) {
209 bookmarkOpenMethod_ = bookmarkOpenMethod;
212 QString suCommand()
const {
216 void setSuCommand(QString suCommand) {
217 suCommand_ = suCommand;
223 void setTerminal(QString terminalCommand);
225 QString archiver()
const {
229 void setArchiver(QString archiver) {
230 archiver_ = archiver;
231 Fm::Archiver::setDefaultArchiverByName(archiver_.toLocal8Bit().constData());
234 bool mountOnStartup()
const {
235 return mountOnStartup_;
238 void setMountOnStartup(
bool mountOnStartup) {
239 mountOnStartup_ = mountOnStartup;
242 bool mountRemovable() {
243 return mountRemovable_;
246 void setMountRemovable(
bool mountRemovable) {
247 mountRemovable_ = mountRemovable;
250 bool autoRun()
const {
254 void setAutoRun(
bool autoRun) {
258 bool closeOnUnmount()
const {
259 return closeOnUnmount_;
262 void setCloseOnUnmount(
bool value) {
263 closeOnUnmount_ = value;
266 DesktopWindow::WallpaperMode wallpaperMode()
const {
267 return DesktopWindow::WallpaperMode(wallpaperMode_);
270 void setWallpaperMode(
int wallpaperMode) {
271 wallpaperMode_ = wallpaperMode;
274 QString wallpaper()
const {
278 void setWallpaper(
const QString& wallpaper) {
279 wallpaper_ = wallpaper;
282 QSize wallpaperDialogSize()
const {
283 return wallpaperDialogSize_;
286 void setWallpaperDialogSize(
const QSize& size) {
287 wallpaperDialogSize_ = size;
290 int wallpaperDialogSplitterPos()
const {
291 return wallpaperDialogSplitterPos_;
294 void setWallpaperDialogSplitterPos(
int pos) {
295 wallpaperDialogSplitterPos_ = pos;
298 QString wallpaperDir()
const {
299 return wallpaperDir_;
302 void setLastSlide(QString wallpaper) {
303 lastSlide_ = wallpaper;
306 QString lastSlide()
const {
310 void setWallpaperDir(QString dir) {
314 int slideShowInterval()
const {
315 return slideShowInterval_;
318 void setSlideShowInterval(
int interval) {
319 slideShowInterval_ = interval;
322 bool wallpaperRandomize()
const {
323 return wallpaperRandomize_;
326 void setWallpaperRandomize(
bool randomize) {
327 wallpaperRandomize_ = randomize;
330 bool transformWallpaper()
const {
331 return transformWallpaper_;
334 void setTransformWallpaper(
bool tr) {
335 transformWallpaper_ = tr;
338 bool perScreenWallpaper()
const {
339 return perScreenWallpaper_;
342 void setPerScreenWallpaper(
bool tr) {
343 perScreenWallpaper_ = tr;
346 const QColor& desktopBgColor()
const {
347 return desktopBgColor_;
350 void setDesktopBgColor(QColor desktopBgColor) {
351 desktopBgColor_ = desktopBgColor;
354 const QColor& desktopFgColor()
const {
355 return desktopFgColor_;
358 void setDesktopFgColor(QColor desktopFgColor) {
359 desktopFgColor_ = desktopFgColor;
362 const QColor& desktopShadowColor()
const {
363 return desktopShadowColor_;
366 void setDesktopShadowColor(QColor desktopShadowColor) {
367 desktopShadowColor_ = desktopShadowColor;
370 QFont desktopFont()
const {
374 void setDesktopFont(QFont font) {
378 int desktopIconSize()
const {
379 return desktopIconSize_;
382 void setDesktopIconSize(
int desktopIconSize) {
383 desktopIconSize_ = desktopIconSize;
386 QStringList desktopShortcuts()
const {
387 return desktopShortcuts_;
390 void setDesktopShortcuts(
const QStringList& list) {
391 desktopShortcuts_ = list;
394 bool desktopShowHidden()
const {
395 return desktopShowHidden_;
398 void setDesktopShowHidden(
bool desktopShowHidden) {
399 desktopShowHidden_ = desktopShowHidden;
402 bool desktopHideItems()
const {
403 return desktopHideItems_;
406 void setDesktopHideItems(
bool hide) {
407 desktopHideItems_ = hide;
410 Qt::SortOrder desktopSortOrder()
const {
411 return desktopSortOrder_;
414 void setDesktopSortOrder(Qt::SortOrder desktopSortOrder) {
415 desktopSortOrder_ = desktopSortOrder;
418 Fm::FolderModel::ColumnId desktopSortColumn()
const {
419 return desktopSortColumn_;
422 void setDesktopSortColumn(Fm::FolderModel::ColumnId desktopSortColumn) {
423 desktopSortColumn_ = desktopSortColumn;
426 bool desktopSortFolderFirst()
const {
427 return desktopSortFolderFirst_;
430 void setDesktopSortFolderFirst(
bool desktopFolderFirst) {
431 desktopSortFolderFirst_ = desktopFolderFirst;
434 bool desktopSortHiddenLast()
const {
435 return desktopSortHiddenLast_;
438 void setDesktopSortHiddenLast(
bool desktopHiddenLast) {
439 desktopSortHiddenLast_ = desktopHiddenLast;
442 bool alwaysShowTabs()
const {
443 return alwaysShowTabs_;
446 void setAlwaysShowTabs(
bool alwaysShowTabs) {
447 alwaysShowTabs_ = alwaysShowTabs;
450 bool showTabClose()
const {
451 return showTabClose_;
454 void setShowTabClose(
bool showTabClose) {
455 showTabClose_ = showTabClose;
458 bool switchToNewTab()
const {
459 return switchToNewTab_;
462 void setSwitchToNewTab(
bool showTabClose) {
463 switchToNewTab_ = showTabClose;
466 bool reopenLastTabs()
const {
467 return reopenLastTabs_;
470 void setReopenLastTabs(
bool reopenLastTabs) {
471 reopenLastTabs_ = reopenLastTabs;
474 int splitViewTabsNum()
const {
475 return splitViewTabsNum_;
478 void setSplitViewTabsNum(
int n) {
479 splitViewTabsNum_ = n;
482 QStringList tabPaths()
const {
486 void setTabPaths(
const QStringList& tabPaths) {
487 tabPaths_ = tabPaths;
490 bool rememberWindowSize()
const {
491 return rememberWindowSize_;
494 void setRememberWindowSize(
bool rememberWindowSize) {
495 rememberWindowSize_ = rememberWindowSize;
498 int windowWidth()
const {
499 if(rememberWindowSize_) {
500 return lastWindowWidth_;
503 return fixedWindowWidth_;
507 int windowHeight()
const {
508 if(rememberWindowSize_) {
509 return lastWindowHeight_;
512 return fixedWindowHeight_;
516 bool windowMaximized()
const {
517 if(rememberWindowSize_) {
518 return lastWindowMaximized_;
525 int fixedWindowWidth()
const {
526 return fixedWindowWidth_;
529 void setFixedWindowWidth(
int fixedWindowWidth) {
530 fixedWindowWidth_ = fixedWindowWidth;
533 int fixedWindowHeight()
const {
534 return fixedWindowHeight_;
537 void setFixedWindowHeight(
int fixedWindowHeight) {
538 fixedWindowHeight_ = fixedWindowHeight;
541 void setLastWindowWidth(
int lastWindowWidth) {
542 lastWindowWidth_ = lastWindowWidth;
545 void setLastWindowHeight(
int lastWindowHeight) {
546 lastWindowHeight_ = lastWindowHeight;
549 void setLastWindowMaximized(
bool lastWindowMaximized) {
550 lastWindowMaximized_ = lastWindowMaximized;
553 int splitterPos()
const {
557 void setSplitterPos(
int splitterPos) {
558 splitterPos_ = splitterPos;
561 bool isSidePaneVisible()
const {
562 return sidePaneVisible_;
565 void showSidePane(
bool show) {
566 sidePaneVisible_ = show;
569 Fm::SidePane::Mode sidePaneMode()
const {
570 return sidePaneMode_;
573 void setSidePaneMode(Fm::SidePane::Mode sidePaneMode) {
574 sidePaneMode_ = sidePaneMode;
577 bool showMenuBar()
const {
581 void setShowMenuBar(
bool showMenuBar) {
582 showMenuBar_ = showMenuBar;
585 bool splitView()
const {
589 void setSplitView(
bool split) {
593 Fm::FolderView::ViewMode viewMode()
const {
597 void setViewMode(Fm::FolderView::ViewMode viewMode) {
598 viewMode_ = viewMode;
601 bool showHidden()
const {
605 void setShowHidden(
bool showHidden) {
606 showHidden_ = showHidden;
609 bool sortCaseSensitive()
const {
610 return sortCaseSensitive_;
613 void setSortCaseSensitive(
bool value) {
614 sortCaseSensitive_ = value;
617 QSet<QString> getHiddenPlaces()
const {
618 return hiddenPlaces_;
621 void setHiddenPlace(
const QString& str,
bool hide) {
623 hiddenPlaces_ << str;
626 hiddenPlaces_.remove(str);
630 Qt::SortOrder sortOrder()
const {
634 void setSortOrder(Qt::SortOrder sortOrder) {
635 sortOrder_ = sortOrder;
638 Fm::FolderModel::ColumnId sortColumn()
const {
642 void setSortColumn(Fm::FolderModel::ColumnId sortColumn) {
643 sortColumn_ = sortColumn;
646 bool sortFolderFirst()
const {
647 return sortFolderFirst_;
650 void setSortFolderFirst(
bool folderFirst) {
651 sortFolderFirst_ = folderFirst;
654 bool sortHiddenLast()
const {
655 return sortHiddenLast_;
658 void setSortHiddenLast(
bool hiddenLast) {
659 sortHiddenLast_ = hiddenLast;
662 bool showFilter()
const {
666 void setShowFilter(
bool value) {
670 bool pathBarButtons()
const {
671 return pathBarButtons_;
674 void setPathBarButtons(
bool value) {
675 pathBarButtons_ = value;
679 bool singleClick()
const {
683 void setSingleClick(
bool singleClick) {
684 singleClick_ = singleClick;
687 int autoSelectionDelay()
const {
688 return autoSelectionDelay_;
691 void setAutoSelectionDelay(
int value) {
692 autoSelectionDelay_ = value;
695 bool ctrlRightClick()
const {
696 return ctrlRightClick_;
699 void setCtrlRightClick(
bool value) {
700 ctrlRightClick_ = value;
703 bool useTrash()
const {
710 void setUseTrash(
bool useTrash) {
711 useTrash_ = useTrash;
714 bool confirmDelete()
const {
715 return confirmDelete_;
718 void setConfirmDelete(
bool confirmDelete) {
719 confirmDelete_ = confirmDelete;
722 bool noUsbTrash()
const {
726 void setNoUsbTrash(
bool noUsbTrash) {
727 noUsbTrash_ = noUsbTrash;
728 fm_config->no_usb_trash = noUsbTrash_;
731 bool confirmTrash()
const {
732 return confirmTrash_;
735 void setConfirmTrash(
bool value) {
736 confirmTrash_ = value;
739 bool quickExec()
const {
743 void setQuickExec(
bool value) {
745 fm_config->quick_exec = quickExec_;
748 bool selectNewFiles()
const {
749 return selectNewFiles_;
752 void setSelectNewFiles(
bool value) {
753 selectNewFiles_ = value;
756 int bigIconSize()
const {
760 void setBigIconSize(
int bigIconSize) {
761 bigIconSize_ = bigIconSize;
764 int smallIconSize()
const {
765 return smallIconSize_;
768 void setSmallIconSize(
int smallIconSize) {
769 smallIconSize_ = smallIconSize;
772 int sidePaneIconSize()
const {
773 return sidePaneIconSize_;
776 void setSidePaneIconSize(
int sidePaneIconSize) {
777 sidePaneIconSize_ = sidePaneIconSize;
780 int thumbnailIconSize()
const {
781 return thumbnailIconSize_;
784 QSize folderViewCellMargins()
const {
785 return folderViewCellMargins_;
788 void setFolderViewCellMargins(QSize size) {
789 folderViewCellMargins_ = size;
792 QSize desktopCellMargins()
const {
793 return desktopCellMargins_;
796 void setDesktopCellMargins(QSize size) {
797 desktopCellMargins_ = size;
800 QMargins workAreaMargins()
const {
801 return workAreaMargins_;
804 void setWorkAreaMargins(QMargins margins) {
805 workAreaMargins_ = margins;
808 bool openWithDefaultFileManager()
const {
809 return openWithDefaultFileManager_;
812 void setOpenWithDefaultFileManager(
bool open) {
813 openWithDefaultFileManager_ = open;
816 bool allSticky()
const {
820 void setAllSticky(
bool sticky) {
824 bool showThumbnails() {
825 return showThumbnails_;
828 void setShowThumbnails(
bool show) {
829 showThumbnails_ = show;
832 void setThumbnailLocalFilesOnly(
bool value) {
833 Fm::ThumbnailJob::setLocalFilesOnly(value);
836 bool thumbnailLocalFilesOnly()
const {
837 return Fm::ThumbnailJob::localFilesOnly();
840 int maxThumbnailFileSize()
const {
841 return Fm::ThumbnailJob::maxThumbnailFileSize();
844 void setMaxThumbnailFileSize(
int size) {
845 Fm::ThumbnailJob::setMaxThumbnailFileSize(size);
848 int maxExternalThumbnailFileSize()
const {
849 return Fm::ThumbnailJob::maxExternalThumbnailFileSize();
852 void setMaxExternalThumbnailFileSize(
int size) {
853 Fm::ThumbnailJob::setMaxExternalThumbnailFileSize(size);
856 void setThumbnailIconSize(
int thumbnailIconSize) {
857 thumbnailIconSize_ = thumbnailIconSize;
864 void setSiUnit(
bool siUnit) {
867 fm_config->si_unit = (gboolean)siUnit_;
870 bool backupAsHidden()
const {
871 return backupAsHidden_;
874 void setBackupAsHidden(
bool value) {
875 backupAsHidden_ = value;
876 fm_config->backup_as_hidden = backupAsHidden_;
879 bool showFullNames()
const {
880 return showFullNames_;
883 void setShowFullNames(
bool value) {
884 showFullNames_ = value;
887 bool shadowHidden()
const {
888 return shadowHidden_;
891 void setShadowHidden(
bool value) {
892 shadowHidden_ = value;
895 bool noItemTooltip()
const {
896 return noItemTooltip_;
899 void setNoItemTooltip(
bool noTooltip) {
900 noItemTooltip_ = noTooltip;
903 bool scrollPerPixel()
const {
904 return scrollPerPixel_;
907 void setScrollPerPixel(
bool perPixel) {
908 scrollPerPixel_ = perPixel;
911 bool onlyUserTemplates()
const {
912 return onlyUserTemplates_;
915 void setOnlyUserTemplates(
bool value) {
916 onlyUserTemplates_ = value;
917 fm_config->only_user_templates = onlyUserTemplates_;
920 bool templateTypeOnce()
const {
921 return templateTypeOnce_;
924 void setTemplateTypeOnce(
bool value) {
925 templateTypeOnce_ = value;
926 fm_config->template_type_once = templateTypeOnce_;
929 bool templateRunApp()
const {
930 return templateRunApp_;
933 void setTemplateRunApp(
bool value) {
934 templateRunApp_ = value;
935 fm_config->template_run_app = templateRunApp_;
939 FolderSettings loadFolderSettings(
const Fm::FilePath& path)
const;
941 void saveFolderSettings(
const Fm::FilePath& path,
const FolderSettings& settings);
943 void clearFolderSettings(
const Fm::FilePath& path)
const;
945 bool searchNameCaseInsensitive()
const {
946 return searchNameCaseInsensitive_;
949 void setSearchNameCaseInsensitive(
bool caseInsensitive) {
950 searchNameCaseInsensitive_ = caseInsensitive;
953 bool searchContentCaseInsensitive()
const {
954 return searchContentCaseInsensitive_;
957 void setsearchContentCaseInsensitive(
bool caseInsensitive) {
958 searchContentCaseInsensitive_ = caseInsensitive;
961 bool searchNameRegexp()
const {
962 return searchNameRegexp_;
965 void setSearchNameRegexp(
bool reg) {
966 searchNameRegexp_ = reg;
969 bool searchContentRegexp()
const {
970 return searchContentRegexp_;
973 void setSearchContentRegexp(
bool reg) {
974 searchContentRegexp_ = reg;
977 bool searchRecursive()
const {
978 return searchRecursive_;
981 void setSearchRecursive(
bool rec) {
982 searchRecursive_ = rec;
985 bool searchhHidden()
const {
986 return searchhHidden_;
989 void setSearchhHidden(
bool hidden) {
990 searchhHidden_ = hidden;
993 int maxSearchHistory()
const {
994 return maxSearchHistory_;
997 void setMaxSearchHistory(
int max);
999 void clearSearchHistory();
1001 QStringList namePatterns()
const {
1002 return namePatterns_;
1005 void addNamePattern(
const QString& pattern);
1007 QStringList contentPatterns()
const {
1008 return contentPatterns_;
1011 void addContentPattern(
const QString& pattern);
1013 QList<int> getCustomColumnWidths()
const {
1015 for(
auto width : std::as_const(customColumnWidths_)) {
1021 void setCustomColumnWidths(
const QList<int> &widths) {
1022 customColumnWidths_.clear();
1023 for(
auto width : widths) {
1024 customColumnWidths_ << QVariant(width);
1028 QList<int> getHiddenColumns()
const {
1030 for(
auto width : std::as_const(hiddenColumns_)) {
1036 void setHiddenColumns(
const QList<int> &columns) {
1037 hiddenColumns_.clear();
1038 for(
auto column : columns) {
1039 hiddenColumns_ << QVariant(column);
1043 int getRecentFilesNumber()
const {
1044 return recentFilesNumber_;
1046 void setRecentFilesNumber(
int n);
1048 QStringList getRecentFiles()
const {
1049 return recentFiles_;
1051 void clearRecentFiles();
1052 void addRecentFile(
const QString& file);
1054 void loadRecentFiles();
1055 void saveRecentFiles();
1058 bool loadFile(QString filePath);
1059 bool saveFile(QString filePath);
1061 int toIconSize(
int size, IconType type)
const;
1064 QString profileName_;
1068 QString fallbackIconThemeName_;
1069 bool useFallbackIconTheme_;
1071 bool singleWindowMode_;
1072 OpenDirTargetType bookmarkOpenMethod_;
1075 bool mountOnStartup_;
1076 bool mountRemovable_;
1078 bool closeOnUnmount_;
1082 QSize wallpaperDialogSize_;
1083 int wallpaperDialogSplitterPos_;
1085 QString wallpaperDir_;
1086 int slideShowInterval_;
1087 bool wallpaperRandomize_;
1088 bool transformWallpaper_;
1089 bool perScreenWallpaper_;
1090 QColor desktopBgColor_;
1091 QColor desktopFgColor_;
1092 QColor desktopShadowColor_;
1094 int desktopIconSize_;
1095 QStringList desktopShortcuts_;
1097 bool desktopShowHidden_;
1098 bool desktopHideItems_;
1099 Qt::SortOrder desktopSortOrder_;
1100 Fm::FolderModel::ColumnId desktopSortColumn_;
1101 bool desktopSortFolderFirst_;
1102 bool desktopSortHiddenLast_;
1104 bool alwaysShowTabs_;
1106 bool switchToNewTab_;
1107 bool reopenLastTabs_;
1108 int splitViewTabsNum_;
1109 QStringList tabPaths_;
1110 bool rememberWindowSize_;
1111 int fixedWindowWidth_;
1112 int fixedWindowHeight_;
1113 int lastWindowWidth_;
1114 int lastWindowHeight_;
1115 bool lastWindowMaximized_;
1117 bool sidePaneVisible_;
1118 Fm::SidePane::Mode sidePaneMode_;
1122 Fm::FolderView::ViewMode viewMode_;
1124 Qt::SortOrder sortOrder_;
1125 Fm::FolderModel::ColumnId sortColumn_;
1126 bool sortFolderFirst_;
1127 bool sortHiddenLast_;
1128 bool sortCaseSensitive_;
1130 bool pathBarButtons_;
1134 int autoSelectionDelay_;
1135 bool ctrlRightClick_;
1137 bool confirmDelete_;
1141 bool selectNewFiles_;
1143 bool showThumbnails_;
1147 bool backupAsHidden_;
1148 bool showFullNames_;
1150 bool noItemTooltip_;
1151 bool scrollPerPixel_;
1153 QSet<QString> hiddenPlaces_;
1157 int sidePaneIconSize_;
1158 int thumbnailIconSize_;
1160 bool onlyUserTemplates_;
1161 bool templateTypeOnce_;
1162 bool templateRunApp_;
1164 QSize folderViewCellMargins_;
1165 QSize desktopCellMargins_;
1166 QMargins workAreaMargins_;
1168 bool openWithDefaultFileManager_;
1173 bool searchNameCaseInsensitive_;
1174 bool searchContentCaseInsensitive_;
1175 bool searchNameRegexp_;
1176 bool searchContentRegexp_;
1177 bool searchRecursive_;
1178 bool searchhHidden_;
1179 int maxSearchHistory_;
1180 QStringList namePatterns_;
1181 QStringList contentPatterns_;
1184 QList<QVariant> customColumnWidths_;
1185 QList<QVariant> hiddenColumns_;
1188 int recentFilesNumber_;
1189 QStringList recentFiles_;