File indexing completed on 2024-04-14 05:38:47

0001 /*******************************************************************************
0002  * Copyright (C) 2008-2013 Konstantinos Smanis <konstantinos.smanis@gmail.com> *
0003  *                                                                             *
0004  * This program is free software: you can redistribute it and/or modify it     *
0005  * under the terms of the GNU General Public License as published by the Free  *
0006  * Software Foundation, either version 3 of the License, or (at your option)   *
0007  * any later version.                                                          *
0008  *                                                                             *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT *
0010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       *
0011  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for    *
0012  * more details.                                                               *
0013  *                                                                             *
0014  * You should have received a copy of the GNU General Public License along     *
0015  * with this program. If not, see <http://www.gnu.org/licenses/>.              *
0016  *******************************************************************************/
0017 
0018 #ifndef HELPER_H
0019 #define HELPER_H
0020 
0021 //KDE
0022 #include <KAuth/ActionReply>
0023 using namespace KAuth;
0024 
0025 class Helper : public QObject
0026 {
0027     Q_OBJECT
0028 public:
0029     Helper();
0030 private:
0031     ActionReply executeCommand(const QStringList &command);
0032     bool setLang(const QString &lang);
0033 public Q_SLOTS:
0034     ActionReply defaults(QVariantMap args);
0035     ActionReply install(QVariantMap args);
0036     ActionReply load(QVariantMap args);
0037     ActionReply save(QVariantMap args);
0038 private:
0039     QString errorDescription(int errorCode, const QString &errorMessage) const;
0040 };
0041 
0042 #endif