File indexing completed on 2024-04-28 04:37:04
0001 /* 0002 SPDX-FileCopyrightText: 2006 Adam Treat <treat@kde.org> 0003 SPDX-FileCopyrightText: 2007 Andreas Pakulat <apaku@gmx.de> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef KDEVPLATFORM_PROJECTCONFIGSKELETON_H 0009 #define KDEVPLATFORM_PROJECTCONFIGSKELETON_H 0010 0011 #include "projectexport.h" 0012 0013 #include <KConfigSkeleton> 0014 0015 namespace KDevelop 0016 { 0017 0018 class Path; 0019 class ProjectConfigSkeletonPrivate; 0020 0021 class KDEVPLATFORMPROJECT_EXPORT ProjectConfigSkeleton: public KConfigSkeleton 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 ~ProjectConfigSkeleton() override; 0027 0028 void setDeveloperTempFile( const QString& ); 0029 void setProjectTempFile( const QString& ); 0030 void setProjectFile( const Path& ); 0031 void setDeveloperFile( const Path& ); 0032 void setDefaults() override; 0033 bool useDefaults( bool b ) override; 0034 bool writeConfig(); 0035 0036 Path projectFile() const; 0037 Path developerFile() const; 0038 0039 protected: 0040 explicit ProjectConfigSkeleton( KSharedConfigPtr config ); 0041 /** 0042 * Constructs a new skeleton, the skeleton will write to the developer 0043 * configuration file, which is by default located in projectdir/.kdev4 0044 * The defaults will be set from the project file, which is in the projectdir 0045 * 0046 * @param configname The absolute filename of the developer configuration file 0047 */ 0048 explicit ProjectConfigSkeleton( const QString & configname ); 0049 0050 private: 0051 const QScopedPointer<class ProjectConfigSkeletonPrivate> d_ptr; 0052 Q_DECLARE_PRIVATE(ProjectConfigSkeleton) 0053 }; 0054 0055 } 0056 #endif 0057