xref: /glogg/src/persistable.h (revision bb02e0acf44ddb4e4f83d6127a1e488789162922)
1*bb02e0acSNicolas Bonnefon /*
2*bb02e0acSNicolas Bonnefon  * Copyright (C) 2011 Nicolas Bonnefon and other contributors
3*bb02e0acSNicolas Bonnefon  *
4*bb02e0acSNicolas Bonnefon  * This file is part of glogg.
5*bb02e0acSNicolas Bonnefon  *
6*bb02e0acSNicolas Bonnefon  * glogg is free software: you can redistribute it and/or modify
7*bb02e0acSNicolas Bonnefon  * it under the terms of the GNU General Public License as published by
8*bb02e0acSNicolas Bonnefon  * the Free Software Foundation, either version 3 of the License, or
9*bb02e0acSNicolas Bonnefon  * (at your option) any later version.
10*bb02e0acSNicolas Bonnefon  *
11*bb02e0acSNicolas Bonnefon  * glogg is distributed in the hope that it will be useful,
12*bb02e0acSNicolas Bonnefon  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*bb02e0acSNicolas Bonnefon  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*bb02e0acSNicolas Bonnefon  * GNU General Public License for more details.
15*bb02e0acSNicolas Bonnefon  *
16*bb02e0acSNicolas Bonnefon  * You should have received a copy of the GNU General Public License
17*bb02e0acSNicolas Bonnefon  * along with glogg.  If not, see <http://www.gnu.org/licenses/>.
18*bb02e0acSNicolas Bonnefon  */
19*bb02e0acSNicolas Bonnefon 
20*bb02e0acSNicolas Bonnefon #ifndef PERSISTABLE_H
21*bb02e0acSNicolas Bonnefon #define PERSISTABLE_H
22*bb02e0acSNicolas Bonnefon 
23*bb02e0acSNicolas Bonnefon class QSettings;
24*bb02e0acSNicolas Bonnefon 
25*bb02e0acSNicolas Bonnefon // Must be implemented by classes which could be saved to persistent
26*bb02e0acSNicolas Bonnefon // storage by PersistentInfo.
27*bb02e0acSNicolas Bonnefon class Persistable {
28*bb02e0acSNicolas Bonnefon   public:
~Persistable()29*bb02e0acSNicolas Bonnefon     virtual ~Persistable() {}
30*bb02e0acSNicolas Bonnefon 
31*bb02e0acSNicolas Bonnefon     // Must be implemented to save/retrieve from Qt Settings
32*bb02e0acSNicolas Bonnefon     virtual void saveToStorage( QSettings& settings ) const = 0;
33*bb02e0acSNicolas Bonnefon     virtual void retrieveFromStorage( QSettings& settings ) = 0;
34*bb02e0acSNicolas Bonnefon };
35*bb02e0acSNicolas Bonnefon 
36*bb02e0acSNicolas Bonnefon #endif
37