File indexing completed on 2024-05-05 17:33:57
0001 /* 0002 * SPDX-FileCopyrightText: 2011-2012 Matthias Fuchs <mat69@gmx.net> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef COMICINFO_H 0008 #define COMICINFO_H 0009 0010 class KConfigGroup; 0011 class QString; 0012 0013 /** 0014 * Provides access (read/write) to the directory that should be used 0015 * whenever the user is presented with a file selection dialog. 0016 */ 0017 class SavingDir 0018 { 0019 public: 0020 /** 0021 * @param config the config that should be used to retrieve 0022 * the saving directory and to store it to in case of changes 0023 */ 0024 explicit SavingDir(const KConfigGroup &config); 0025 0026 ~SavingDir(); 0027 0028 /** 0029 * @return the directory to be displayed to the user 0030 */ 0031 QString getDir() const; 0032 0033 /** 0034 * Set the directory that should be displayed to the user first 0035 * when choosing a destination. Automatically writes the directory 0036 * to the config, if one was specified in init. 0037 * @param dir the directory to display the user first 0038 * @see init 0039 */ 0040 void setDir(const QString &dir); 0041 0042 private: 0043 class SavingDirPrivate; 0044 SavingDirPrivate *d; 0045 }; 0046 0047 #endif