Changeset View
Changeset View
Standalone View
Standalone View
settings/javapreferences.cpp
Show All 13 Lines | |||||
14 | * | 14 | * | ||
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
18 | * 02110-1301, USA. | 18 | * 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "javapreferences.h" | 21 | #include "javapreferences.h" | ||
22 | | ||||
23 | #include <QVBoxLayout> | | |||
24 | | ||||
25 | #include <kgenericfactory.h> | | |||
26 | #include <kaboutdata.h> | | |||
27 | | ||||
28 | #include "javaconfig.h" | 22 | #include "javaconfig.h" | ||
29 | 23 | | |||
24 | #include <KUrlRequester> | ||||
30 | #include "ui_javasettings.h" | 25 | #include "ui_javasettings.h" | ||
31 | 26 | | |||
32 | namespace KDevelop | 27 | JavaPreferences::JavaPreferences(QWidget* parent) | ||
28 | : ConfigPage(nullptr, JavaSettings::self(), parent) | ||||
29 | , m_settings(new Ui::JavaSettings) | ||||
33 | { | 30 | { | ||
31 | m_settings->setupUi(this); | ||||
32 | } | ||||
34 | 33 | | |||
35 | K_PLUGIN_FACTORY(JavaPreferencesFactory, registerPlugin<JavaPreferences>();) | 34 | JavaPreferences::~JavaPreferences( ) | ||
36 | K_EXPORT_PLUGIN(JavaPreferencesFactory( KAboutData("kcm_kdev_bgsettings", "kdevplatform", ki18n("Java Support Settings"), "0.1"))) | 35 | {} | ||
37 | | ||||
38 | 36 | | |||
39 | JavaPreferences::JavaPreferences( QWidget *parent, const QVariantList &args ) | 37 | QString JavaPreferences::name() const | ||
40 | : KCModule( JavaPreferencesFactory::componentData(), parent, args ) | | |||
41 | { | 38 | { | ||
42 | 39 | return i18n("Java Support"); | |||
43 | QVBoxLayout * l = new QVBoxLayout( this ); | | |||
44 | QWidget* w = new QWidget; | | |||
45 | preferencesDialog = new Ui::JavaSettings; | | |||
46 | preferencesDialog->setupUi( w ); | | |||
47 | | ||||
48 | l->addWidget( w ); | | |||
49 | | ||||
50 | addConfig( JavaSettings::self(), w ); | | |||
51 | | ||||
52 | load(); | | |||
53 | } | 40 | } | ||
54 | 41 | | |||
55 | JavaPreferences::~JavaPreferences( ) | 42 | QString JavaPreferences::fullName() const | ||
56 | { | 43 | { | ||
57 | delete preferencesDialog; | 44 | return i18n("Configure Java Support settings"); | ||
58 | } | 45 | } | ||
59 | 46 | | |||
60 | void JavaPreferences::save() | 47 | QIcon JavaPreferences::icon() const | ||
61 | { | 48 | { | ||
62 | KCModule::save(); | 49 | return QIcon::fromTheme(QStringLiteral("application-x-java")); | ||
63 | } | 50 | } | ||
64 | 51 | | |||
65 | } | | |||
66 | 52 | | |||
67 | #include "javapreferences.moc" | 53 | KDevelop::ConfigPage::ConfigPageType JavaPreferences::configPageType() const | ||
54 | { | ||||
55 | return ConfigPage::LanguageConfigPage; | ||||
56 | } | ||||
68 | 57 | |