File indexing completed on 2024-05-19 04:39:31
0001 /* 0002 SPDX-FileCopyrightText: 2006 Matt Rogers <mattr@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "projectpreferences.h" 0008 0009 #include "projectconfig.h" 0010 #include "../core.h" 0011 #include "../projectcontroller.h" 0012 0013 #include "ui_projectpreferences.h" 0014 0015 namespace KDevelop 0016 { 0017 0018 ProjectPreferences::ProjectPreferences(QWidget* parent) 0019 : ConfigPage(nullptr, ProjectSettings::self(), parent) 0020 { 0021 preferencesDialog = new Ui::ProjectPreferences; 0022 preferencesDialog->setupUi(this); 0023 } 0024 0025 ProjectPreferences::~ProjectPreferences( ) 0026 { 0027 delete preferencesDialog; 0028 } 0029 0030 void ProjectPreferences::apply() 0031 { 0032 ConfigPage::apply(); 0033 0034 Core::self()->projectControllerInternal()->loadSettings(false); 0035 } 0036 0037 void ProjectPreferences::slotSettingsChanged() 0038 { 0039 emit changed(); 0040 } 0041 0042 QString ProjectPreferences::name() const 0043 { 0044 return i18n("Projects"); 0045 } 0046 0047 QString ProjectPreferences::fullName() const 0048 { 0049 return i18n("Configure Projects"); 0050 } 0051 0052 QIcon ProjectPreferences::icon() const 0053 { 0054 return QIcon::fromTheme(QStringLiteral("project-open")); 0055 } 0056 0057 } 0058 0059 #include "moc_projectpreferences.cpp"