diff --git a/context/contextsettings.cpp b/context/contextsettings.cpp new file mode 100644 index 000000000..61912bbcc --- /dev/null +++ b/context/contextsettings.cpp @@ -0,0 +1,48 @@ +/* + * Cantata + * + * Copyright (c) 2011-2013 Craig Drummond + * + * ---- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "contextsettings.h" +#include "wikipediasettings.h" +#include "lyricsettings.h" +#include "localize.h" + +ContextSettings::ContextSettings(QWidget *p) + : QTabWidget(p) +{ + wiki=new WikipediaSettings(this); + lyrics=new LyricSettings(this); + addTab(wiki, i18n("Wikipedia Languages")); + addTab(lyrics, i18n("Lyrics Providers")); +} + +void ContextSettings::load() +{ + wiki->load(); + lyrics->load(); +} + +void ContextSettings::save() +{ + wiki->save(); + lyrics->save(); +} diff --git a/context/contextsettings.h b/context/contextsettings.h new file mode 100644 index 000000000..d5b9ac27f --- /dev/null +++ b/context/contextsettings.h @@ -0,0 +1,44 @@ +/* + * Cantata + * + * Copyright (c) 2011-2013 Craig Drummond + * + * ---- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef CONTEXTSETTINGS_H +#define CONTEXTSETTINGS_H + +#include + +class WikipediaSettings; +class LyricSettings; + +class ContextSettings : public QTabWidget { +public: + ContextSettings(QWidget *p=0); + virtual ~ContextSettings() { } + void load(); + void save(); + +private: + WikipediaSettings *wiki; + LyricSettings *lyrics; +}; + +#endif