21 #ifndef PCMANFM_SETTINGS_H
22 #define PCMANFM_SETTINGS_H
26 #include "folderview.h"
27 #include "foldermodel.h"
28 #include "desktopwindow.h"
29 #include "thumbnailloader.h"
39 bool load(QString profile =
"default");
40 bool save(QString profile = QString());
42 bool loadFile(QString filePath);
43 bool saveFile(QString filePath);
45 QString profileDir(QString profile,
bool useFallback =
false);
48 QString profileName()
const {
52 bool supportTrash()
const {
56 QString fallbackIconThemeName()
const {
57 return fallbackIconThemeName_;
60 bool useFallbackIconTheme()
const {
61 return useFallbackIconTheme_;
64 void setFallbackIconThemeName(QString iconThemeName) {
65 fallbackIconThemeName_ = iconThemeName;
68 int bookmarkOpenMethod() {
69 return bookmarkOpenMethod_;
72 void setBookmarkOpenMethod(
int bookmarkOpenMethod) {
73 bookmarkOpenMethod_ = bookmarkOpenMethod;
76 QString suCommand()
const {
80 void setSuCommand(QString suCommand) {
81 suCommand_ = suCommand;
87 void setTerminal(QString terminalCommand);
89 QString archiver()
const {
93 void setArchiver(QString archiver) {
96 g_free(fm_config->archiver);
97 fm_config->archiver = g_strdup(archiver_.toLocal8Bit().constData());
100 bool mountOnStartup()
const {
101 return mountOnStartup_;
104 void setMountOnStartup(
bool mountOnStartup) {
105 mountOnStartup_ = mountOnStartup;
108 bool mountRemovable() {
109 return mountRemovable_;
112 void setMountRemovable(
bool mountRemovable) {
113 mountRemovable_ = mountRemovable;
116 bool autoRun()
const {
120 void setAutoRun(
bool autoRun) {
124 bool closeOnUnmount()
const {
125 return closeOnUnmount_;
128 void setCloseOnUnmount(
bool value) {
129 closeOnUnmount_ = value;
132 DesktopWindow::WallpaperMode wallpaperMode()
const {
133 return DesktopWindow::WallpaperMode(wallpaperMode_);
136 void setWallpaperMode(
int wallpaperMode) {
137 wallpaperMode_ = wallpaperMode;
140 QString wallpaper()
const {
144 void setWallpaper(QString wallpaper) {
145 wallpaper_ = wallpaper;
148 const QColor& desktopBgColor()
const {
149 return desktopBgColor_;
152 void setDesktopBgColor(QColor desktopBgColor) {
153 desktopBgColor_ = desktopBgColor;
156 const QColor& desktopFgColor()
const {
157 return desktopFgColor_;
160 void setDesktopFgColor(QColor desktopFgColor) {
161 desktopFgColor_ = desktopFgColor;
164 const QColor& desktopShadowColor()
const {
165 return desktopShadowColor_;
168 void setDesktopShadowColor(QColor desktopShadowColor) {
169 desktopShadowColor_ = desktopShadowColor;
172 QFont desktopFont()
const {
176 void setDesktopFont(QFont font) {
180 bool showWmMenu()
const {
184 void setShowWmMenu(
bool value) {
188 bool desktopShowHidden()
const {
189 return desktopShowHidden_;
192 void setDesktopShowHidden(
bool desktopShowHidden) {
193 desktopShowHidden_ = desktopShowHidden;
196 Qt::SortOrder desktopSortOrder()
const {
197 return desktopSortOrder_;
200 void setDesktopSortOrder(Qt::SortOrder desktopSortOrder) {
201 desktopSortOrder_ = desktopSortOrder;
204 Fm::FolderModel::ColumnId desktopSortColumn()
const {
205 return desktopSortColumn_;
208 void setDesktopSortColumn(Fm::FolderModel::ColumnId desktopSortColumn) {
209 desktopSortColumn_ = desktopSortColumn;
212 bool alwaysShowTabs()
const {
213 return alwaysShowTabs_;
216 void setAlwaysShowTabs(
bool alwaysShowTabs) {
217 alwaysShowTabs_ = alwaysShowTabs;
220 bool showTabClose()
const {
221 return showTabClose_;
224 void setShowTabClose(
bool showTabClose) {
225 showTabClose_ = showTabClose;
228 bool rememberWindowSize()
const {
229 return rememberWindowSize_;
232 void setRememberWindowSize(
bool rememberWindowSize) {
233 rememberWindowSize_ = rememberWindowSize;
236 int windowWidth()
const {
237 if(rememberWindowSize_)
238 return lastWindowWidth_;
240 return fixedWindowWidth_;
243 int windowHeight()
const {
244 if(rememberWindowSize_)
245 return lastWindowHeight_;
247 return fixedWindowHeight_;
250 bool windowMaximized()
const {
251 if(rememberWindowSize_)
252 return lastWindowMaximized_;
257 int fixedWindowWidth()
const {
258 return fixedWindowWidth_;
261 void setFixedWindowWidth(
int fixedWindowWidth) {
262 fixedWindowWidth_ = fixedWindowWidth;
265 int fixedWindowHeight()
const {
266 return fixedWindowHeight_;
269 void setFixedWindowHeight(
int fixedWindowHeight) {
270 fixedWindowHeight_ = fixedWindowHeight;
273 void setLastWindowWidth(
int lastWindowWidth) {
274 lastWindowWidth_ = lastWindowWidth;
277 void setLastWindowHeight(
int lastWindowHeight) {
278 lastWindowHeight_ = lastWindowHeight;
281 void setLastWindowMaximized(
bool lastWindowMaximized) {
282 lastWindowMaximized_ = lastWindowMaximized;
285 int splitterPos()
const {
289 void setSplitterPos(
int splitterPos) {
290 splitterPos_ = splitterPos;
293 int sidePaneMode()
const {
294 return sidePaneMode_;
297 void setSidePaneMode(
int sidePaneMode) {
298 sidePaneMode_ = sidePaneMode;
301 Fm::FolderView::ViewMode viewMode()
const {
305 void setViewMode(Fm::FolderView::ViewMode viewMode) {
306 viewMode_ = viewMode;
309 bool showHidden()
const {
313 void setShowHidden(
bool showHidden) {
314 showHidden_ = showHidden;
317 Qt::SortOrder sortOrder()
const {
321 void setSortOrder(Qt::SortOrder sortOrder) {
322 sortOrder_ = sortOrder;
325 Fm::FolderModel::ColumnId sortColumn()
const {
329 void setSortColumn(Fm::FolderModel::ColumnId sortColumn) {
330 sortColumn_ = sortColumn;
334 bool singleClick()
const {
338 void setSingleClick(
bool singleClick) {
339 singleClick_ = singleClick;
342 int autoSelectionDelay()
const {
343 return autoSelectionDelay_;
346 void setAutoSelectionDelay(
int value) {
347 autoSelectionDelay_ = value;
350 bool useTrash()
const {
356 void setUseTrash(
bool useTrash) {
357 useTrash_ = useTrash;
360 bool confirmDelete()
const {
361 return confirmDelete_;
364 void setConfirmDelete(
bool confirmDelete) {
365 confirmDelete_ = confirmDelete;
368 bool noUsbTrash()
const {
372 void setNoUsbTrash(
bool noUsbTrash) {
373 noUsbTrash_ = noUsbTrash;
379 int bigIconSize()
const {
383 void setBigIconSize(
int bigIconSize) {
384 bigIconSize_ = bigIconSize;
387 int smallIconSize()
const {
388 return smallIconSize_;
391 void setSmallIconSize(
int smallIconSize) {
392 smallIconSize_ = smallIconSize;
395 int sidePaneIconSize()
const {
396 return sidePaneIconSize_;
399 void setSidePaneIconSize(
int sidePaneIconSize) {
400 sidePaneIconSize_ = sidePaneIconSize;
403 int thumbnailIconSize()
const {
404 return thumbnailIconSize_;
407 bool showThumbnails() {
408 return showThumbnails_;
411 void setShowThumbnails(
bool show) {
412 showThumbnails_ = show;
415 void setThumbnailLocalFilesOnly(
bool value) {
416 Fm::ThumbnailLoader::setLocalFilesOnly(value);
419 bool thumbnailLocalFilesOnly() {
420 return Fm::ThumbnailLoader::localFilesOnly();
423 int maxThumbnailFileSize() {
424 return Fm::ThumbnailLoader::maxThumbnailFileSize();
427 void setMaxThumbnailFileSize(
int size) {
428 Fm::ThumbnailLoader::setMaxThumbnailFileSize(size);
431 void setThumbnailIconSize(
int thumbnailIconSize) {
432 thumbnailIconSize_ = thumbnailIconSize;
439 void setSiUnit(
bool siUnit) {
442 fm_config->si_unit = (gboolean)siUnit_;
446 QString profileName_;
450 QString fallbackIconThemeName_;
451 bool useFallbackIconTheme_;
453 int bookmarkOpenMethod_;
456 bool mountOnStartup_;
457 bool mountRemovable_;
459 bool closeOnUnmount_;
463 QColor desktopBgColor_;
464 QColor desktopFgColor_;
465 QColor desktopShadowColor_;
469 bool desktopShowHidden_;
470 Qt::SortOrder desktopSortOrder_;
471 Fm::FolderModel::ColumnId desktopSortColumn_;
473 bool alwaysShowTabs_;
475 bool rememberWindowSize_;
476 int fixedWindowWidth_;
477 int fixedWindowHeight_;
478 int lastWindowWidth_;
479 int lastWindowHeight_;
480 bool lastWindowMaximized_;
484 Fm::FolderView::ViewMode viewMode_;
486 Qt::SortOrder sortOrder_;
487 Fm::FolderModel::ColumnId sortColumn_;
491 int autoSelectionDelay_;
496 bool showThumbnails_;
503 int sidePaneIconSize_;
504 int thumbnailIconSize_;
509 #endif // PCMANFM_SETTINGS_H
Definition: settings.h:33
Definition: application.h:38