1 /* 2 * 3 * This file is a part of Libcprime. 4 * Library for saving activites and bookmarks, share file and more. 5 * Copyright 2019 CuboCore Group 6 * 7 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 3 of the License, or 12 * (at your option) any later version. 13 * 14 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 22 * 23 * You should have received a copy of the GNU General Public License 24 * along with this program; if not, vsit http://www.gnu.org/licenses/. 25 * 26 */ 27 28 29 #pragma once 30 31 #include "libcprime_global.h" 32 33 34 class QSettings; 35 36 class LIBCPRIMESHARED_EXPORT PinManage 37 { 38 39 public: 40 explicit PinManage(); 41 ~PinManage(); 42 43 void addSection(const QString §ionName); 44 void addPin(const QString §ionName, const QString &pinName, const QString &pinpath); 45 46 QStringList getPinSections(); 47 QStringList getPinNames(const QString §ionName); 48 QString piningTime(const QString §ionName, const QString &pinName); 49 QString pinPath(const QString §ionName, const QString &pinName); 50 QString checkingPinName(const QString §ion, const QString &pinName); 51 QString checkingPinPath(const QString §ion, const QString &pinPath); 52 QString checkingPinPathEx(const QString &pinpath); 53 54 void delSection(const QString §ionName); 55 void changeAll(const QString &oldSectionName, const QString &oldpinName, 56 const QString §ionName, const QString &pinName, const QString &pinValue); 57 void editPin(const QString §ionName, const QString &pinName, const QString &pinpath); 58 void delPin(const QString &pinName, const QString §ion); 59 60 private: 61 QSettings *pinSettings; 62 QString pinValues(const QString §ionName, const QString &pinName) const; 63 }; 64