21 #ifndef PCMANFM_SETTINGS_H 22 #define PCMANFM_SETTINGS_H 26 #include <libfm-qt/folderview.h> 27 #include <libfm-qt/foldermodel.h> 28 #include "desktopwindow.h" 29 #include <libfm-qt/sidepane.h> 30 #include <libfm-qt/thumbnailloader.h> 34 enum OpenDirTargetType {
38 OpenInLastActiveWindow
47 bool load(QString profile =
"default");
48 bool save(QString profile = QString());
50 bool loadFile(QString filePath);
51 bool saveFile(QString filePath);
53 QString profileDir(QString profile,
bool useFallback =
false);
56 QString profileName()
const {
60 bool supportTrash()
const {
64 QString fallbackIconThemeName()
const {
65 return fallbackIconThemeName_;
68 bool useFallbackIconTheme()
const {
69 return useFallbackIconTheme_;
72 void setFallbackIconThemeName(QString iconThemeName) {
73 fallbackIconThemeName_ = iconThemeName;
76 OpenDirTargetType bookmarkOpenMethod() {
77 return bookmarkOpenMethod_;
80 void setBookmarkOpenMethod(OpenDirTargetType bookmarkOpenMethod) {
81 bookmarkOpenMethod_ = bookmarkOpenMethod;
84 QString suCommand()
const {
88 void setSuCommand(QString suCommand) {
89 suCommand_ = suCommand;
95 void setTerminal(QString terminalCommand);
97 QString archiver()
const {
101 void setArchiver(QString archiver) {
102 archiver_ = archiver;
104 g_free(fm_config->archiver);
105 fm_config->archiver = g_strdup(archiver_.toLocal8Bit().constData());
108 bool mountOnStartup()
const {
109 return mountOnStartup_;
112 void setMountOnStartup(
bool mountOnStartup) {
113 mountOnStartup_ = mountOnStartup;
116 bool mountRemovable() {
117 return mountRemovable_;
120 void setMountRemovable(
bool mountRemovable) {
121 mountRemovable_ = mountRemovable;
124 bool autoRun()
const {
128 void setAutoRun(
bool autoRun) {
132 bool closeOnUnmount()
const {
133 return closeOnUnmount_;
136 void setCloseOnUnmount(
bool value) {
137 closeOnUnmount_ = value;
140 DesktopWindow::WallpaperMode wallpaperMode()
const {
141 return DesktopWindow::WallpaperMode(wallpaperMode_);
144 void setWallpaperMode(
int wallpaperMode) {
145 wallpaperMode_ = wallpaperMode;
148 QString wallpaper()
const {
152 void setWallpaper(QString wallpaper) {
153 wallpaper_ = wallpaper;
156 const QColor& desktopBgColor()
const {
157 return desktopBgColor_;
160 void setDesktopBgColor(QColor desktopBgColor) {
161 desktopBgColor_ = desktopBgColor;
164 const QColor& desktopFgColor()
const {
165 return desktopFgColor_;
168 void setDesktopFgColor(QColor desktopFgColor) {
169 desktopFgColor_ = desktopFgColor;
172 const QColor& desktopShadowColor()
const {
173 return desktopShadowColor_;
176 void setDesktopShadowColor(QColor desktopShadowColor) {
177 desktopShadowColor_ = desktopShadowColor;
180 QFont desktopFont()
const {
184 void setDesktopFont(QFont font) {
188 bool showWmMenu()
const {
192 void setShowWmMenu(
bool value) {
196 bool desktopShowHidden()
const {
197 return desktopShowHidden_;
200 void setDesktopShowHidden(
bool desktopShowHidden) {
201 desktopShowHidden_ = desktopShowHidden;
204 Qt::SortOrder desktopSortOrder()
const {
205 return desktopSortOrder_;
208 void setDesktopSortOrder(Qt::SortOrder desktopSortOrder) {
209 desktopSortOrder_ = desktopSortOrder;
212 Fm::FolderModel::ColumnId desktopSortColumn()
const {
213 return desktopSortColumn_;
216 void setDesktopSortColumn(Fm::FolderModel::ColumnId desktopSortColumn) {
217 desktopSortColumn_ = desktopSortColumn;
220 bool alwaysShowTabs()
const {
221 return alwaysShowTabs_;
224 void setAlwaysShowTabs(
bool alwaysShowTabs) {
225 alwaysShowTabs_ = alwaysShowTabs;
228 bool showTabClose()
const {
229 return showTabClose_;
232 void setShowTabClose(
bool showTabClose) {
233 showTabClose_ = showTabClose;
236 bool rememberWindowSize()
const {
237 return rememberWindowSize_;
240 void setRememberWindowSize(
bool rememberWindowSize) {
241 rememberWindowSize_ = rememberWindowSize;
244 int windowWidth()
const {
245 if(rememberWindowSize_)
246 return lastWindowWidth_;
248 return fixedWindowWidth_;
251 int windowHeight()
const {
252 if(rememberWindowSize_)
253 return lastWindowHeight_;
255 return fixedWindowHeight_;
258 bool windowMaximized()
const {
259 if(rememberWindowSize_)
260 return lastWindowMaximized_;
265 int fixedWindowWidth()
const {
266 return fixedWindowWidth_;
269 void setFixedWindowWidth(
int fixedWindowWidth) {
270 fixedWindowWidth_ = fixedWindowWidth;
273 int fixedWindowHeight()
const {
274 return fixedWindowHeight_;
277 void setFixedWindowHeight(
int fixedWindowHeight) {
278 fixedWindowHeight_ = fixedWindowHeight;
281 void setLastWindowWidth(
int lastWindowWidth) {
282 lastWindowWidth_ = lastWindowWidth;
285 void setLastWindowHeight(
int lastWindowHeight) {
286 lastWindowHeight_ = lastWindowHeight;
289 void setLastWindowMaximized(
bool lastWindowMaximized) {
290 lastWindowMaximized_ = lastWindowMaximized;
293 int splitterPos()
const {
297 void setSplitterPos(
int splitterPos) {
298 splitterPos_ = splitterPos;
301 Fm::SidePane::Mode sidePaneMode()
const {
302 return sidePaneMode_;
305 void setSidePaneMode(Fm::SidePane::Mode sidePaneMode) {
306 sidePaneMode_ = sidePaneMode;
309 bool showMenuBar()
const {
313 void setShowMenuBar(
bool showMenuBar) {
314 showMenuBar_ = showMenuBar;
317 bool fullWidthTabBar()
const {
318 return fullWidthTabBar_;
321 void setFullWidthTabBar(
bool fullWith) {
322 fullWidthTabBar_ = fullWith;
325 Fm::FolderView::ViewMode viewMode()
const {
329 void setViewMode(Fm::FolderView::ViewMode viewMode) {
330 viewMode_ = viewMode;
333 bool showHidden()
const {
337 void setShowHidden(
bool showHidden) {
338 showHidden_ = showHidden;
341 bool placesHome()
const {
345 void setPlacesHome(
bool placesHome) {
346 placesHome_ = placesHome;
349 bool placesDesktop()
const {
350 return placesDesktop_;
353 void setPlacesDesktop(
bool placesDesktop) {
354 placesDesktop_ = placesDesktop;
357 bool placesApplications()
const {
358 return placesApplications_;
361 void setPlacesApplications(
bool placesApplications) {
362 placesApplications_ = placesApplications;
365 bool placesTrash()
const {
369 void setPlacesTrash(
bool placesTrash) {
370 placesTrash_ = placesTrash;
373 bool placesRoot()
const {
377 void setPlacesRoot(
bool placesRoot) {
378 placesRoot_ = placesRoot;
381 bool placesComputer()
const {
382 return placesComputer_;
385 void setPlacesComputer(
bool placesComputer) {
386 placesComputer_ = placesComputer;
389 bool placesNetwork()
const {
390 return placesNetwork_;
393 void setPlacesNetwork(
bool placesNetwork) {
394 placesNetwork_ = placesNetwork;
398 Qt::SortOrder sortOrder()
const {
402 void setSortOrder(Qt::SortOrder sortOrder) {
403 sortOrder_ = sortOrder;
406 Fm::FolderModel::ColumnId sortColumn()
const {
410 void setSortColumn(Fm::FolderModel::ColumnId sortColumn) {
411 sortColumn_ = sortColumn;
414 bool sortFolderFirst()
const {
415 return sortFolderFirst_;
418 void setSortFolderFirst(
bool folderFirst) {
419 sortFolderFirst_ = folderFirst;
422 bool showFilter()
const {
426 void setShowFilter(
bool value) {
431 bool singleClick()
const {
435 void setSingleClick(
bool singleClick) {
436 singleClick_ = singleClick;
439 int autoSelectionDelay()
const {
440 return autoSelectionDelay_;
443 void setAutoSelectionDelay(
int value) {
444 autoSelectionDelay_ = value;
447 bool useTrash()
const {
453 void setUseTrash(
bool useTrash) {
454 useTrash_ = useTrash;
457 bool confirmDelete()
const {
458 return confirmDelete_;
461 void setConfirmDelete(
bool confirmDelete) {
462 confirmDelete_ = confirmDelete;
465 bool noUsbTrash()
const {
469 void setNoUsbTrash(
bool noUsbTrash) {
470 noUsbTrash_ = noUsbTrash;
471 fm_config->no_usb_trash = noUsbTrash_;
474 bool confirmTrash()
const {
475 return confirmTrash_;
478 void setConfirmTrash(
bool value) {
479 confirmTrash_ = value;
482 bool quickExec()
const {
486 void setQuickExec(
bool value) {
488 fm_config->quick_exec = quickExec_;
494 int bigIconSize()
const {
498 void setBigIconSize(
int bigIconSize) {
499 bigIconSize_ = bigIconSize;
502 int smallIconSize()
const {
503 return smallIconSize_;
506 void setSmallIconSize(
int smallIconSize) {
507 smallIconSize_ = smallIconSize;
510 int sidePaneIconSize()
const {
511 return sidePaneIconSize_;
514 void setSidePaneIconSize(
int sidePaneIconSize) {
515 sidePaneIconSize_ = sidePaneIconSize;
518 int thumbnailIconSize()
const {
519 return thumbnailIconSize_;
522 QSize folderViewCellMargins()
const {
523 return folderViewCellMargins_;
526 void setFolderViewCellMargins(QSize size) {
527 folderViewCellMargins_ = size;
530 QSize desktopCellMargins()
const {
531 return desktopCellMargins_;
534 void setDesktopCellMargins(QSize size) {
535 desktopCellMargins_ = size;
539 bool showThumbnails() {
540 return showThumbnails_;
543 void setShowThumbnails(
bool show) {
544 showThumbnails_ = show;
547 void setThumbnailLocalFilesOnly(
bool value) {
548 Fm::ThumbnailLoader::setLocalFilesOnly(value);
551 bool thumbnailLocalFilesOnly() {
552 return Fm::ThumbnailLoader::localFilesOnly();
555 int maxThumbnailFileSize() {
556 return Fm::ThumbnailLoader::maxThumbnailFileSize();
559 void setMaxThumbnailFileSize(
int size) {
560 Fm::ThumbnailLoader::setMaxThumbnailFileSize(size);
563 void setThumbnailIconSize(
int thumbnailIconSize) {
564 thumbnailIconSize_ = thumbnailIconSize;
571 void setSiUnit(
bool siUnit) {
574 fm_config->si_unit = (gboolean)siUnit_;
577 bool backupAsHidden()
const {
578 return backupAsHidden_;
581 void setBackupAsHidden(
bool value) {
582 backupAsHidden_ = value;
583 fm_config->backup_as_hidden = backupAsHidden_;
586 bool showFullNames()
const {
587 return showFullNames_;
590 void setShowFullNames(
bool value) {
591 showFullNames_ = value;
594 bool shadowHidden()
const {
595 return shadowHidden_;
598 void setShadowHidden(
bool value) {
599 shadowHidden_ = value;
602 bool onlyUserTemplates()
const {
603 return onlyUserTemplates_;
606 void setOnlyUserTemplates(
bool value) {
607 onlyUserTemplates_ = value;
608 fm_config->only_user_templates = onlyUserTemplates_;
611 bool templateTypeOnce()
const {
612 return templateTypeOnce_;
615 void setTemplateTypeOnce(
bool value) {
616 templateTypeOnce_ = value;
617 fm_config->template_type_once = templateTypeOnce_;
620 bool templateRunApp()
const {
621 return templateRunApp_;
624 void setTemplateRunApp(
bool value) {
625 templateRunApp_ = value;
626 fm_config->template_run_app = templateRunApp_;
631 QString profileName_;
635 QString fallbackIconThemeName_;
636 bool useFallbackIconTheme_;
638 OpenDirTargetType bookmarkOpenMethod_;
641 bool mountOnStartup_;
642 bool mountRemovable_;
644 bool closeOnUnmount_;
648 QColor desktopBgColor_;
649 QColor desktopFgColor_;
650 QColor desktopShadowColor_;
654 bool desktopShowHidden_;
655 Qt::SortOrder desktopSortOrder_;
656 Fm::FolderModel::ColumnId desktopSortColumn_;
658 bool alwaysShowTabs_;
660 bool rememberWindowSize_;
661 int fixedWindowWidth_;
662 int fixedWindowHeight_;
663 int lastWindowWidth_;
664 int lastWindowHeight_;
665 bool lastWindowMaximized_;
667 Fm::SidePane::Mode sidePaneMode_;
669 bool fullWidthTabBar_;
671 Fm::FolderView::ViewMode viewMode_;
673 Qt::SortOrder sortOrder_;
674 Fm::FolderModel::ColumnId sortColumn_;
675 bool sortFolderFirst_;
680 int autoSelectionDelay_;
687 bool showThumbnails_;
691 bool backupAsHidden_;
697 bool placesApplications_;
700 bool placesComputer_;
705 int sidePaneIconSize_;
706 int thumbnailIconSize_;
708 bool onlyUserTemplates_;
709 bool templateTypeOnce_;
710 bool templateRunApp_;
712 QSize folderViewCellMargins_;
713 QSize desktopCellMargins_;
718 #endif // PCMANFM_SETTINGS_H Definition: settings.h:41
Definition: application.cpp:55