PCManFM-Qt
settings.h
1 /*
2 
3  Copyright (C) 2013 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 
21 #ifndef PCMANFM_SETTINGS_H
22 #define PCMANFM_SETTINGS_H
23 
24 #include <QObject>
25 #include <libfm-qt/folderview.h>
26 #include <libfm-qt/foldermodel.h>
27 #include "desktopwindow.h"
28 #include <libfm-qt/sidepane.h>
29 #include <libfm-qt/core/thumbnailjob.h>
30 #include <libfm-qt/core/archiver.h>
31 #include <libfm-qt/core/legacy/fm-config.h>
32 
33 namespace PCManFM {
34 
35 enum OpenDirTargetType {
36  OpenInCurrentTab,
37  OpenInNewTab,
38  OpenInNewWindow,
39  OpenInLastActiveWindow
40 };
41 
43 public:
45  isCustomized_(false),
46  sortOrder_(Qt::AscendingOrder),
47  sortColumn_(Fm::FolderModel::ColumnFileName),
48  viewMode_(Fm::FolderView::IconMode),
49  showHidden_(false),
50  sortFolderFirst_(true),
51  sortCaseSensitive_(true) {
52  }
53 
54  bool isCustomized() const {
55  return isCustomized_;
56  }
57 
58  void setCustomized(bool value) {
59  isCustomized_ = value;
60  }
61 
62  Qt::SortOrder sortOrder() const {
63  return sortOrder_;
64  }
65 
66  void setSortOrder(Qt::SortOrder value) {
67  sortOrder_ = value;
68  }
69 
70  Fm::FolderModel::ColumnId sortColumn() const {
71  return sortColumn_;
72  }
73 
74  void setSortColumn(Fm::FolderModel::ColumnId value) {
75  sortColumn_ = value;
76  }
77 
78  Fm::FolderView::ViewMode viewMode() const {
79  return viewMode_;
80  }
81 
82  void setViewMode(Fm::FolderView::ViewMode value) {
83  viewMode_ = value;
84  }
85 
86  bool sortFolderFirst() const {
87  return sortFolderFirst_;
88  }
89 
90  void setSortFolderFirst(bool value) {
91  sortFolderFirst_ = value;
92  }
93 
94  bool showHidden() const {
95  return showHidden_;
96  }
97 
98  void setShowHidden(bool value) {
99  showHidden_ = value;
100  }
101 
102  bool sortCaseSensitive() const {
103  return sortCaseSensitive_;
104  }
105 
106  void setSortCaseSensitive(bool value) {
107  sortCaseSensitive_ = value;
108  }
109 
110 private:
111  bool isCustomized_;
112  Qt::SortOrder sortOrder_;
113  Fm::FolderModel::ColumnId sortColumn_;
114  Fm::FolderView::ViewMode viewMode_;
115  bool showHidden_;
116  bool sortFolderFirst_;
117  bool sortCaseSensitive_;
118  // columns?
119 };
120 
121 
122 class Settings : public QObject {
123  Q_OBJECT
124 public:
125  enum IconType {
126  Small,
127  Big,
128  Thumbnail
129  };
130 
131  Settings();
132  virtual ~Settings();
133 
134  bool load(QString profile = "default");
135  bool save(QString profile = QString());
136 
137  bool loadFile(QString filePath);
138  bool saveFile(QString filePath);
139 
140  static QString xdgUserConfigDir();
141  static const QList<int> & iconSizes(IconType type);
142 
143  QString profileDir(QString profile, bool useFallback = false);
144 
145  // setter/getter functions
146  QString profileName() const {
147  return profileName_;
148  }
149 
150  bool supportTrash() const {
151  return supportTrash_;
152  }
153 
154  QString fallbackIconThemeName() const {
155  return fallbackIconThemeName_;
156  }
157 
158  bool useFallbackIconTheme() const {
159  return useFallbackIconTheme_;
160  }
161 
162  void setFallbackIconThemeName(QString iconThemeName) {
163  fallbackIconThemeName_ = iconThemeName;
164  }
165 
166  OpenDirTargetType bookmarkOpenMethod() {
167  return bookmarkOpenMethod_;
168  }
169 
170  void setBookmarkOpenMethod(OpenDirTargetType bookmarkOpenMethod) {
171  bookmarkOpenMethod_ = bookmarkOpenMethod;
172  }
173 
174  QString suCommand() const {
175  return suCommand_;
176  }
177 
178  void setSuCommand(QString suCommand) {
179  suCommand_ = suCommand;
180  }
181 
182  QString terminal() {
183  return terminal_;
184  }
185  void setTerminal(QString terminalCommand);
186 
187  QString archiver() const {
188  return archiver_;
189  }
190 
191  void setArchiver(QString archiver) {
192  archiver_ = archiver;
193  Fm::Archiver::setDefaultArchiverByName(archiver_.toLocal8Bit().constData());
194  }
195 
196  bool mountOnStartup() const {
197  return mountOnStartup_;
198  }
199 
200  void setMountOnStartup(bool mountOnStartup) {
201  mountOnStartup_ = mountOnStartup;
202  }
203 
204  bool mountRemovable() {
205  return mountRemovable_;
206  }
207 
208  void setMountRemovable(bool mountRemovable) {
209  mountRemovable_ = mountRemovable;
210  }
211 
212  bool autoRun() const {
213  return autoRun_;
214  }
215 
216  void setAutoRun(bool autoRun) {
217  autoRun_ = autoRun;
218  }
219 
220  bool closeOnUnmount() const {
221  return closeOnUnmount_;
222  }
223 
224  void setCloseOnUnmount(bool value) {
225  closeOnUnmount_ = value;
226  }
227 
228  DesktopWindow::WallpaperMode wallpaperMode() const {
229  return DesktopWindow::WallpaperMode(wallpaperMode_);
230  }
231 
232  void setWallpaperMode(int wallpaperMode) {
233  wallpaperMode_ = wallpaperMode;
234  }
235 
236  QString wallpaper() const {
237  return wallpaper_;
238  }
239 
240  void setWallpaper(QString wallpaper) {
241  wallpaper_ = wallpaper;
242  }
243 
244  QString wallpaperDir() const {
245  return wallpaperDir_;
246  }
247 
248  void setLastSlide(QString wallpaper) {
249  lastSlide_ = wallpaper;
250  }
251 
252  QString lastSlide() const {
253  return lastSlide_;
254  }
255 
256  void setWallpaperDir(QString dir) {
257  wallpaperDir_ = dir;
258  }
259 
260  int slideShowInterval() const {
261  return slideShowInterval_;
262  }
263 
264  void setSlideShowInterval(int interval) {
265  slideShowInterval_ = interval;
266  }
267 
268  bool wallpaperRandomize() const {
269  return wallpaperRandomize_;
270  }
271 
272  void setWallpaperRandomize(bool randomize) {
273  wallpaperRandomize_ = randomize;
274  }
275 
276  const QColor& desktopBgColor() const {
277  return desktopBgColor_;
278  }
279 
280  void setDesktopBgColor(QColor desktopBgColor) {
281  desktopBgColor_ = desktopBgColor;
282  }
283 
284  const QColor& desktopFgColor() const {
285  return desktopFgColor_;
286  }
287 
288  void setDesktopFgColor(QColor desktopFgColor) {
289  desktopFgColor_ = desktopFgColor;
290  }
291 
292  const QColor& desktopShadowColor() const {
293  return desktopShadowColor_;
294  }
295 
296  void setDesktopShadowColor(QColor desktopShadowColor) {
297  desktopShadowColor_ = desktopShadowColor;
298  }
299 
300  QFont desktopFont() const {
301  return desktopFont_;
302  }
303 
304  void setDesktopFont(QFont font) {
305  desktopFont_ = font;
306  }
307 
308  int desktopIconSize() const {
309  return desktopIconSize_;
310  }
311 
312  void setDesktopIconSize(int desktopIconSize) {
313  desktopIconSize_ = desktopIconSize;
314  }
315 
316  QStringList desktopShortcuts() const {
317  return desktopShortcuts_;
318  }
319 
320  void setDesktopShortcuts(const QStringList& list) {
321  desktopShortcuts_ = list;
322  }
323 
324  bool showWmMenu() const {
325  return showWmMenu_;
326  }
327 
328  void setShowWmMenu(bool value) {
329  showWmMenu_ = value;
330  }
331 
332  bool desktopShowHidden() const {
333  return desktopShowHidden_;
334  }
335 
336  void setDesktopShowHidden(bool desktopShowHidden) {
337  desktopShowHidden_ = desktopShowHidden;
338  }
339 
340  bool desktopHideItems() const {
341  return desktopHideItems_;
342  }
343 
344  void setDesktopHideItems(bool hide) {
345  desktopHideItems_ = hide;
346  }
347 
348  Qt::SortOrder desktopSortOrder() const {
349  return desktopSortOrder_;
350  }
351 
352  void setDesktopSortOrder(Qt::SortOrder desktopSortOrder) {
353  desktopSortOrder_ = desktopSortOrder;
354  }
355 
356  Fm::FolderModel::ColumnId desktopSortColumn() const {
357  return desktopSortColumn_;
358  }
359 
360  void setDesktopSortColumn(Fm::FolderModel::ColumnId desktopSortColumn) {
361  desktopSortColumn_ = desktopSortColumn;
362  }
363 
364  bool desktopSortFolderFirst() const {
365  return desktopSortFolderFirst_;
366  }
367 
368  void setDesktopSortFolderFirst(bool desktopFolderFirst) {
369  desktopSortFolderFirst_ = desktopFolderFirst;
370  }
371 
372  bool alwaysShowTabs() const {
373  return alwaysShowTabs_;
374  }
375 
376  void setAlwaysShowTabs(bool alwaysShowTabs) {
377  alwaysShowTabs_ = alwaysShowTabs;
378  }
379 
380  bool showTabClose() const {
381  return showTabClose_;
382  }
383 
384  void setShowTabClose(bool showTabClose) {
385  showTabClose_ = showTabClose;
386  }
387 
388  bool rememberWindowSize() const {
389  return rememberWindowSize_;
390  }
391 
392  void setRememberWindowSize(bool rememberWindowSize) {
393  rememberWindowSize_ = rememberWindowSize;
394  }
395 
396  int windowWidth() const {
397  if(rememberWindowSize_) {
398  return lastWindowWidth_;
399  }
400  else {
401  return fixedWindowWidth_;
402  }
403  }
404 
405  int windowHeight() const {
406  if(rememberWindowSize_) {
407  return lastWindowHeight_;
408  }
409  else {
410  return fixedWindowHeight_;
411  }
412  }
413 
414  bool windowMaximized() const {
415  if(rememberWindowSize_) {
416  return lastWindowMaximized_;
417  }
418  else {
419  return false;
420  }
421  }
422 
423  int fixedWindowWidth() const {
424  return fixedWindowWidth_;
425  }
426 
427  void setFixedWindowWidth(int fixedWindowWidth) {
428  fixedWindowWidth_ = fixedWindowWidth;
429  }
430 
431  int fixedWindowHeight() const {
432  return fixedWindowHeight_;
433  }
434 
435  void setFixedWindowHeight(int fixedWindowHeight) {
436  fixedWindowHeight_ = fixedWindowHeight;
437  }
438 
439  void setLastWindowWidth(int lastWindowWidth) {
440  lastWindowWidth_ = lastWindowWidth;
441  }
442 
443  void setLastWindowHeight(int lastWindowHeight) {
444  lastWindowHeight_ = lastWindowHeight;
445  }
446 
447  void setLastWindowMaximized(bool lastWindowMaximized) {
448  lastWindowMaximized_ = lastWindowMaximized;
449  }
450 
451  int splitterPos() const {
452  return splitterPos_;
453  }
454 
455  void setSplitterPos(int splitterPos) {
456  splitterPos_ = splitterPos;
457  }
458 
459  Fm::SidePane::Mode sidePaneMode() const {
460  return sidePaneMode_;
461  }
462 
463  void setSidePaneMode(Fm::SidePane::Mode sidePaneMode) {
464  sidePaneMode_ = sidePaneMode;
465  }
466 
467  bool showMenuBar() const {
468  return showMenuBar_;
469  }
470 
471  void setShowMenuBar(bool showMenuBar) {
472  showMenuBar_ = showMenuBar;
473  }
474 
475  bool splitView() const {
476  return splitView_;
477  }
478 
479  void setSplitView(bool split) {
480  splitView_ = split;
481  }
482 
483  Fm::FolderView::ViewMode viewMode() const {
484  return viewMode_;
485  }
486 
487  void setViewMode(Fm::FolderView::ViewMode viewMode) {
488  viewMode_ = viewMode;
489  }
490 
491  bool showHidden() const {
492  return showHidden_;
493  }
494 
495  void setShowHidden(bool showHidden) {
496  showHidden_ = showHidden;
497  }
498 
499  bool sortCaseSensitive() const {
500  return sortCaseSensitive_;
501  }
502 
503  void setSortCaseSensitive(bool value) {
504  sortCaseSensitive_ = value;
505  }
506 
507 
508  bool placesHome() const {
509  return placesHome_;
510  }
511 
512  void setPlacesHome(bool placesHome) {
513  placesHome_ = placesHome;
514  }
515 
516  bool placesDesktop() const {
517  return placesDesktop_;
518  }
519 
520  void setPlacesDesktop(bool placesDesktop) {
521  placesDesktop_ = placesDesktop;
522  }
523 
524  bool placesApplications() const {
525  return placesApplications_;
526  }
527 
528  void setPlacesApplications(bool placesApplications) {
529  placesApplications_ = placesApplications;
530  }
531 
532  bool placesTrash() const {
533  return placesTrash_;
534  }
535 
536  void setPlacesTrash(bool placesTrash) {
537  placesTrash_ = placesTrash;
538  }
539 
540  bool placesRoot() const {
541  return placesRoot_;
542  }
543 
544  void setPlacesRoot(bool placesRoot) {
545  placesRoot_ = placesRoot;
546  }
547 
548  bool placesComputer() const {
549  return placesComputer_;
550  }
551 
552  void setPlacesComputer(bool placesComputer) {
553  placesComputer_ = placesComputer;
554  }
555 
556  bool placesNetwork() const {
557  return placesNetwork_;
558  }
559 
560  void setPlacesNetwork(bool placesNetwork) {
561  placesNetwork_ = placesNetwork;
562  }
563 
564  QSet<QString> getHiddenPlaces() const {
565  return hiddenPlaces_;
566  }
567 
568  void setHiddenPlace(const QString& str, bool hide) {
569  if(hide) {
570  hiddenPlaces_ << str;
571  }
572  else {
573  hiddenPlaces_.remove(str);
574  }
575  }
576 
577 
578  Qt::SortOrder sortOrder() const {
579  return sortOrder_;
580  }
581 
582  void setSortOrder(Qt::SortOrder sortOrder) {
583  sortOrder_ = sortOrder;
584  }
585 
586  Fm::FolderModel::ColumnId sortColumn() const {
587  return sortColumn_;
588  }
589 
590  void setSortColumn(Fm::FolderModel::ColumnId sortColumn) {
591  sortColumn_ = sortColumn;
592  }
593 
594  bool sortFolderFirst() const {
595  return sortFolderFirst_;
596  }
597 
598  void setSortFolderFirst(bool folderFirst) {
599  sortFolderFirst_ = folderFirst;
600  }
601 
602  bool showFilter() const {
603  return showFilter_;
604  }
605 
606  void setShowFilter(bool value) {
607  showFilter_ = value;
608  }
609 
610  bool pathBarButtons() const {
611  return pathBarButtons_;
612  }
613 
614  void setPathBarButtons(bool value) {
615  pathBarButtons_ = value;
616  }
617 
618  // settings for use with libfm
619  bool singleClick() const {
620  return singleClick_;
621  }
622 
623  void setSingleClick(bool singleClick) {
624  singleClick_ = singleClick;
625  }
626 
627  int autoSelectionDelay() const {
628  return autoSelectionDelay_;
629  }
630 
631  void setAutoSelectionDelay(int value) {
632  autoSelectionDelay_ = value;
633  }
634 
635  bool useTrash() const {
636  if(!supportTrash_) {
637  return false;
638  }
639  return useTrash_;
640  }
641 
642  void setUseTrash(bool useTrash) {
643  useTrash_ = useTrash;
644  }
645 
646  bool confirmDelete() const {
647  return confirmDelete_;
648  }
649 
650  void setConfirmDelete(bool confirmDelete) {
651  confirmDelete_ = confirmDelete;
652  }
653 
654  bool noUsbTrash() const {
655  return noUsbTrash_;
656  }
657 
658  void setNoUsbTrash(bool noUsbTrash) {
659  noUsbTrash_ = noUsbTrash;
660  fm_config->no_usb_trash = noUsbTrash_; // also set this to libfm since FmFileOpsJob reads this config value before trashing files.
661  }
662 
663  bool confirmTrash() const {
664  return confirmTrash_;
665  }
666 
667  void setConfirmTrash(bool value) {
668  confirmTrash_ = value;
669  }
670 
671  bool quickExec() const {
672  return quickExec_;
673  }
674 
675  void setQuickExec(bool value) {
676  quickExec_ = value;
677  fm_config->quick_exec = quickExec_;
678  }
679 
680  bool selectNewFiles() const {
681  return selectNewFiles_;
682  }
683 
684  void setSelectNewFiles(bool value) {
685  selectNewFiles_ = value;
686  }
687 
688  // bool thumbnailLocal_;
689  // bool thumbnailMax;
690 
691  int bigIconSize() const {
692  return bigIconSize_;
693  }
694 
695  void setBigIconSize(int bigIconSize) {
696  bigIconSize_ = bigIconSize;
697  }
698 
699  int smallIconSize() const {
700  return smallIconSize_;
701  }
702 
703  void setSmallIconSize(int smallIconSize) {
704  smallIconSize_ = smallIconSize;
705  }
706 
707  int sidePaneIconSize() const {
708  return sidePaneIconSize_;
709  }
710 
711  void setSidePaneIconSize(int sidePaneIconSize) {
712  sidePaneIconSize_ = sidePaneIconSize;
713  }
714 
715  int thumbnailIconSize() const {
716  return thumbnailIconSize_;
717  }
718 
719  QSize folderViewCellMargins() const {
720  return folderViewCellMargins_;
721  }
722 
723  void setFolderViewCellMargins(QSize size) {
724  folderViewCellMargins_ = size;
725  }
726 
727  QSize desktopCellMargins() const {
728  return desktopCellMargins_;
729  }
730 
731  void setDesktopCellMargins(QSize size) {
732  desktopCellMargins_ = size;
733  }
734 
735 
736  bool showThumbnails() {
737  return showThumbnails_;
738  }
739 
740  void setShowThumbnails(bool show) {
741  showThumbnails_ = show;
742  }
743 
744  void setThumbnailLocalFilesOnly(bool value) {
745  Fm::ThumbnailJob::setLocalFilesOnly(value);
746  }
747 
748  bool thumbnailLocalFilesOnly() const {
749  return Fm::ThumbnailJob::localFilesOnly();
750  }
751 
752  int maxThumbnailFileSize() const {
753  return Fm::ThumbnailJob::maxThumbnailFileSize();
754  }
755 
756  void setMaxThumbnailFileSize(int size) {
757  Fm::ThumbnailJob::setMaxThumbnailFileSize(size);
758  }
759 
760  void setThumbnailIconSize(int thumbnailIconSize) {
761  thumbnailIconSize_ = thumbnailIconSize;
762  }
763 
764  bool siUnit() {
765  return siUnit_;
766  }
767 
768  void setSiUnit(bool siUnit) {
769  siUnit_ = siUnit;
770  // override libfm FmConfig settings. FIXME: should we do this?
771  fm_config->si_unit = (gboolean)siUnit_;
772  }
773 
774  bool backupAsHidden() const {
775  return backupAsHidden_;
776  }
777 
778  void setBackupAsHidden(bool value) {
779  backupAsHidden_ = value;
780  fm_config->backup_as_hidden = backupAsHidden_; // also set this to libfm since fm_file_info_is_hidden() reads this value internally.
781  }
782 
783  bool showFullNames() const {
784  return showFullNames_;
785  }
786 
787  void setShowFullNames(bool value) {
788  showFullNames_ = value;
789  }
790 
791  bool shadowHidden() const {
792  return shadowHidden_;
793  }
794 
795  void setShadowHidden(bool value) {
796  shadowHidden_ = value;
797  }
798 
799  bool onlyUserTemplates() const {
800  return onlyUserTemplates_;
801  }
802 
803  void setOnlyUserTemplates(bool value) {
804  onlyUserTemplates_ = value;
805  fm_config->only_user_templates = onlyUserTemplates_;
806  }
807 
808  bool templateTypeOnce() const {
809  return templateTypeOnce_;
810  }
811 
812  void setTemplateTypeOnce(bool value) {
813  templateTypeOnce_ = value;
814  fm_config->template_type_once = templateTypeOnce_;
815  }
816 
817  bool templateRunApp() const {
818  return templateRunApp_;
819  }
820 
821  void setTemplateRunApp(bool value) {
822  templateRunApp_ = value;
823  fm_config->template_run_app = templateRunApp_;
824  }
825 
826  // per-folder settings
827  FolderSettings loadFolderSettings(const Fm::FilePath& path) const;
828 
829  void saveFolderSettings(const Fm::FilePath& path, const FolderSettings& settings);
830 
831  void clearFolderSettings(const Fm::FilePath& path) const;
832 
833  bool searchNameCaseInsensitive() const {
834  return searchNameCaseInsensitive_;
835  }
836 
837  void setSearchNameCaseInsensitive(bool caseInsensitive) {
838  searchNameCaseInsensitive_ = caseInsensitive;
839  }
840 
841  bool searchContentCaseInsensitive() const {
842  return searchContentCaseInsensitive_;
843  }
844 
845  void setsearchContentCaseInsensitive(bool caseInsensitive) {
846  searchContentCaseInsensitive_ = caseInsensitive;
847  }
848 
849  bool searchNameRegexp() const {
850  return searchNameRegexp_;
851  }
852 
853  void setSearchNameRegexp(bool reg) {
854  searchNameRegexp_ = reg;
855  }
856 
857  bool searchContentRegexp() const {
858  return searchContentRegexp_;
859  }
860 
861  void setSearchContentRegexp(bool reg) {
862  searchContentRegexp_ = reg;
863  }
864 
865  bool searchRecursive() const {
866  return searchRecursive_;
867  }
868 
869  void setSearchRecursive(bool rec) {
870  searchRecursive_ = rec;
871  }
872 
873  bool searchhHidden() const {
874  return searchhHidden_;
875  }
876 
877  void setSearchhHidden(bool hidden) {
878  searchhHidden_ = hidden;
879  }
880 
881  QList<int> getCustomColumnWidths() const {
882  QList<int> l;
883  for(auto width : qAsConst(customColumnWidths_)) {
884  l << width.toInt();
885  }
886  return l;
887  }
888 
889  void setCustomColumnWidths(const QList<int> &widths) {
890  customColumnWidths_.clear();
891  for(auto width : widths) {
892  customColumnWidths_ << QVariant(width);
893  }
894  }
895 
896  QList<int> getHiddenColumns() const {
897  QList<int> l;
898  for(auto width : qAsConst(hiddenColumns_)) {
899  l << width.toInt();
900  }
901  return l;
902  }
903 
904  void setHiddenColumns(const QList<int> &columns) {
905  hiddenColumns_.clear();
906  for(auto column : columns) {
907  hiddenColumns_ << QVariant(column);
908  }
909  }
910 
911 private:
912  int toIconSize(int size, IconType type) const;
913 
914  QString profileName_;
915  bool supportTrash_;
916 
917  // PCManFM specific
918  QString fallbackIconThemeName_;
919  bool useFallbackIconTheme_;
920 
921  OpenDirTargetType bookmarkOpenMethod_;
922  QString suCommand_;
923  QString terminal_;
924  bool mountOnStartup_;
925  bool mountRemovable_;
926  bool autoRun_;
927  bool closeOnUnmount_;
928 
929  int wallpaperMode_;
930  QString wallpaper_;
931  QString lastSlide_;
932  QString wallpaperDir_;
933  int slideShowInterval_;
934  bool wallpaperRandomize_;
935  QColor desktopBgColor_;
936  QColor desktopFgColor_;
937  QColor desktopShadowColor_;
938  QFont desktopFont_;
939  int desktopIconSize_;
940  QStringList desktopShortcuts_;
941  bool showWmMenu_;
942 
943  bool desktopShowHidden_;
944  bool desktopHideItems_;
945  Qt::SortOrder desktopSortOrder_;
946  Fm::FolderModel::ColumnId desktopSortColumn_;
947  bool desktopSortFolderFirst_;
948 
949  bool alwaysShowTabs_;
950  bool showTabClose_;
951  bool rememberWindowSize_;
952  int fixedWindowWidth_;
953  int fixedWindowHeight_;
954  int lastWindowWidth_;
955  int lastWindowHeight_;
956  bool lastWindowMaximized_;
957  int splitterPos_;
958  Fm::SidePane::Mode sidePaneMode_;
959  bool showMenuBar_;
960  bool splitView_;
961 
962  Fm::FolderView::ViewMode viewMode_;
963  bool showHidden_;
964  Qt::SortOrder sortOrder_;
965  Fm::FolderModel::ColumnId sortColumn_;
966  bool sortFolderFirst_;
967  bool sortCaseSensitive_;
968  bool showFilter_;
969  bool pathBarButtons_;
970 
971  // settings for use with libfm
972  bool singleClick_;
973  int autoSelectionDelay_;
974  bool useTrash_;
975  bool confirmDelete_;
976  bool noUsbTrash_; // do not trash files on usb removable devices
977  bool confirmTrash_; // Confirm before moving files into "trash can"
978  bool quickExec_; // Don't ask options on launch executable file
979  bool selectNewFiles_;
980 
981  bool showThumbnails_;
982 
983  QString archiver_;
984  bool siUnit_;
985  bool backupAsHidden_;
986  bool showFullNames_;
987  bool shadowHidden_;
988 
989  bool placesHome_;
990  bool placesDesktop_;
991  bool placesApplications_;
992  bool placesTrash_;
993  bool placesRoot_;
994  bool placesComputer_;
995  bool placesNetwork_;
996  QSet<QString> hiddenPlaces_;
997 
998  int bigIconSize_;
999  int smallIconSize_;
1000  int sidePaneIconSize_;
1001  int thumbnailIconSize_;
1002 
1003  bool onlyUserTemplates_;
1004  bool templateTypeOnce_;
1005  bool templateRunApp_;
1006 
1007  QSize folderViewCellMargins_;
1008  QSize desktopCellMargins_;
1009 
1010  // search settings
1011  bool searchNameCaseInsensitive_;
1012  bool searchContentCaseInsensitive_;
1013  bool searchNameRegexp_;
1014  bool searchContentRegexp_;
1015  bool searchRecursive_;
1016  bool searchhHidden_;
1017 
1018  // detailed list columns
1019  QList<QVariant> customColumnWidths_;
1020  QList<QVariant> hiddenColumns_;
1021 };
1022 
1023 }
1024 
1025 #endif // PCMANFM_SETTINGS_H
Definition: settings.h:122
Definition: settings.h:42