Debian Codegraph @

src/importers/banshee/BansheeConfigWidget.cpp

raw
1 /****************************************************************************************
2 * Copyright (c) 2013 Konrad Zemek <[email protected]> *
3 * *
4 * This program is free software; you can redistribute it and/or modify it under *
5 * the terms of the GNU General Public License as published by the Free Software *
6 * Foundation; either version 2 of the License, or (at your option) any later *
7 * version. *
8 * *
9 * This program is distributed in the hope that it will be useful, but WITHOUT ANY *
10 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
11 * PARTICULAR PURPOSE. See the GNU General Public License for more details. *
12 * *
13 * You should have received a copy of the GNU General Public License along with *
14 * this program. If not, see <http://www.gnu.org/licenses/>. *
15 ****************************************************************************************/
16
17 #include "BansheeConfigWidget.h"
18
19 #include <KLocalizedString>
20 #include <KUrlRequester>
21
22 #include <QDir>
23
24 using namespace StatSyncing;
25
26 BansheeConfigWidget::BansheeConfigWidget( const QVariantMap &config, QWidget *parent,
27 Qt::WindowFlags f )
28 : SimpleImporterConfigWidget( QStringLiteral("Banshee"), config, parent, f )
29 {
30 const QString defaultPath = QDir::toNativeSeparators(
31 QDir::homePath() + QStringLiteral("/.config/banshee-1/banshee.db") );
32
33 KUrlRequester *dbField = new KUrlRequester( QUrl::fromLocalFile(defaultPath) );
34 dbField->setNameFilter( QStringLiteral("banshee.db") );
35 addField( QStringLiteral("dbPath"), i18n( "Database location" ), dbField, QStringLiteral("text") );
36 }
37
38 BansheeConfigWidget::~BansheeConfigWidget()
39 {
40 }