File indexing completed on 2024-05-05 05:51:27

0001 /* This file is part of the KDE project
0002    SPDX-FileCopyrightText: 2010 Thomas Fjellstrom <thomas@fjellstrom.ca>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <KConfigGroup>
0010 #include <QColor>
0011 
0012 // Geh, should make this into a proper class, setters and getters.
0013 class KateFileTreePluginSettings
0014 {
0015 public:
0016     KateFileTreePluginSettings();
0017 
0018     void save();
0019 
0020     // TODO remove these getters/setters and just make the vars public
0021     bool shadingEnabled() const;
0022     void setShadingEnabled(bool);
0023 
0024     const QColor &viewShade() const;
0025     void setViewShade(const QColor &);
0026 
0027     const QColor &editShade() const;
0028     void setEditShade(const QColor &);
0029 
0030     bool listMode() const;
0031     void setListMode(bool);
0032 
0033     int sortRole() const;
0034     void setSortRole(int);
0035 
0036     bool showFullPathOnRoots() const;
0037     void setShowFullPathOnRoots(bool);
0038 
0039     bool showToolbar() const;
0040     void setShowToolbar(bool);
0041 
0042     bool showCloseButton() const;
0043     void setShowCloseButton(bool);
0044 
0045     bool middleClickToClose = false;
0046 
0047 private:
0048     KConfigGroup m_group;
0049 
0050     bool m_shadingEnabled;
0051     QColor m_viewShade;
0052     QColor m_editShade;
0053 
0054     bool m_listMode;
0055     int m_sortRole;
0056 
0057     bool m_showFullPathOnRoots;
0058     bool m_showToolbar;
0059     bool m_showCloseButton;
0060 };