21 #ifndef PCMANFM_SETTINGS_H 22 #define PCMANFM_SETTINGS_H 26 #include "folderview.h" 27 #include "foldermodel.h" 28 #include "desktopwindow.h" 30 #include "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 Fm::FolderView::ViewMode viewMode()
const {
313 void setViewMode(Fm::FolderView::ViewMode viewMode) {
314 viewMode_ = viewMode;
317 bool showHidden()
const {
321 void setShowHidden(
bool showHidden) {
322 showHidden_ = showHidden;
325 Qt::SortOrder sortOrder()
const {
329 void setSortOrder(Qt::SortOrder sortOrder) {
330 sortOrder_ = sortOrder;
333 Fm::FolderModel::ColumnId sortColumn()
const {
337 void setSortColumn(Fm::FolderModel::ColumnId sortColumn) {
338 sortColumn_ = sortColumn;
341 bool sortFolderFirst()
const {
342 return sortFolderFirst_;
345 void setSortFolderFirst(
bool folderFirst) {
346 sortFolderFirst_ = folderFirst;
349 bool showFilter()
const {
353 void setShowFilter(
bool value) {
358 bool singleClick()
const {
362 void setSingleClick(
bool singleClick) {
363 singleClick_ = singleClick;
366 int autoSelectionDelay()
const {
367 return autoSelectionDelay_;
370 void setAutoSelectionDelay(
int value) {
371 autoSelectionDelay_ = value;
374 bool useTrash()
const {
380 void setUseTrash(
bool useTrash) {
381 useTrash_ = useTrash;
384 bool confirmDelete()
const {
385 return confirmDelete_;
388 void setConfirmDelete(
bool confirmDelete) {
389 confirmDelete_ = confirmDelete;
392 bool noUsbTrash()
const {
396 void setNoUsbTrash(
bool noUsbTrash) {
397 noUsbTrash_ = noUsbTrash;
398 fm_config->no_usb_trash = noUsbTrash_;
401 bool confirmTrash()
const {
402 return confirmTrash_;
405 void setConfirmTrash(
bool value) {
406 confirmTrash_ = value;
409 bool quickExec()
const {
413 void setQuickExec(
bool value) {
415 fm_config->quick_exec = quickExec_;
421 int bigIconSize()
const {
425 void setBigIconSize(
int bigIconSize) {
426 bigIconSize_ = bigIconSize;
429 int smallIconSize()
const {
430 return smallIconSize_;
433 void setSmallIconSize(
int smallIconSize) {
434 smallIconSize_ = smallIconSize;
437 int sidePaneIconSize()
const {
438 return sidePaneIconSize_;
441 void setSidePaneIconSize(
int sidePaneIconSize) {
442 sidePaneIconSize_ = sidePaneIconSize;
445 int thumbnailIconSize()
const {
446 return thumbnailIconSize_;
449 bool showThumbnails() {
450 return showThumbnails_;
453 void setShowThumbnails(
bool show) {
454 showThumbnails_ = show;
457 void setThumbnailLocalFilesOnly(
bool value) {
458 Fm::ThumbnailLoader::setLocalFilesOnly(value);
461 bool thumbnailLocalFilesOnly() {
462 return Fm::ThumbnailLoader::localFilesOnly();
465 int maxThumbnailFileSize() {
466 return Fm::ThumbnailLoader::maxThumbnailFileSize();
469 void setMaxThumbnailFileSize(
int size) {
470 Fm::ThumbnailLoader::setMaxThumbnailFileSize(size);
473 void setThumbnailIconSize(
int thumbnailIconSize) {
474 thumbnailIconSize_ = thumbnailIconSize;
481 void setSiUnit(
bool siUnit) {
484 fm_config->si_unit = (gboolean)siUnit_;
487 bool backupAsHidden()
const {
488 return backupAsHidden_;
491 void setBackupAsHidden(
bool value) {
492 backupAsHidden_ = value;
493 fm_config->backup_as_hidden = backupAsHidden_;
496 bool showFullNames()
const {
497 return showFullNames_;
500 void setShowFullNames(
bool value) {
501 showFullNames_ = value;
504 bool shadowHidden()
const {
505 return shadowHidden_;
508 void setShadowHidden(
bool value) {
509 shadowHidden_ = value;
512 bool onlyUserTemplates()
const {
513 return onlyUserTemplates_;
516 void setOnlyUserTemplates(
bool value) {
517 onlyUserTemplates_ = value;
518 fm_config->only_user_templates = onlyUserTemplates_;
521 bool templateTypeOnce()
const {
522 return templateTypeOnce_;
525 void setTemplateTypeOnce(
bool value) {
526 templateTypeOnce_ = value;
527 fm_config->template_type_once = templateTypeOnce_;
530 bool templateRunApp()
const {
531 return templateRunApp_;
534 void setTemplateRunApp(
bool value) {
535 templateRunApp_ = value;
536 fm_config->template_run_app = templateRunApp_;
540 QString profileName_;
544 QString fallbackIconThemeName_;
545 bool useFallbackIconTheme_;
547 OpenDirTargetType bookmarkOpenMethod_;
550 bool mountOnStartup_;
551 bool mountRemovable_;
553 bool closeOnUnmount_;
557 QColor desktopBgColor_;
558 QColor desktopFgColor_;
559 QColor desktopShadowColor_;
563 bool desktopShowHidden_;
564 Qt::SortOrder desktopSortOrder_;
565 Fm::FolderModel::ColumnId desktopSortColumn_;
567 bool alwaysShowTabs_;
569 bool rememberWindowSize_;
570 int fixedWindowWidth_;
571 int fixedWindowHeight_;
572 int lastWindowWidth_;
573 int lastWindowHeight_;
574 bool lastWindowMaximized_;
576 Fm::SidePane::Mode sidePaneMode_;
578 Fm::FolderView::ViewMode viewMode_;
580 Qt::SortOrder sortOrder_;
581 Fm::FolderModel::ColumnId sortColumn_;
582 bool sortFolderFirst_;
587 int autoSelectionDelay_;
594 bool showThumbnails_;
598 bool backupAsHidden_;
604 int sidePaneIconSize_;
605 int thumbnailIconSize_;
607 bool onlyUserTemplates_;
608 bool templateTypeOnce_;
609 bool templateRunApp_;
614 #endif // PCMANFM_SETTINGS_H Definition: settings.h:41
Definition: application.h:39