Debian Codegraph @

HercStudio/FontPreferences.h

raw symbols SCIP
1 /*
2 * File: FontPreferences.h
3 *
4 * Author: Jacob Dekel
5 * Created on: Nov 9, 2009
6 *
7 * Copyright (c) 2009-2013 Jacob Dekel
8 * $Id$
9 *
10 * This class manages font preferences for one object
11 *
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *
25 */
26
27 #ifndef FONTPREFERENCES_H_
28 #define FONTPREFERENCES_H_
29
30 #include <string>
31
32 class QFile;
33
34 class FontPreferences {
35 public:
36 enum variations
37 {
38 Bold = 128,
39 Italic = 64
40 };
41 FontPreferences(std::string line);
42 virtual ~FontPreferences();
43
44 void setFontName( const std::string& fontName) ;
45 std::string& fontName () ;
46 void setFontSize( int size );
47 int fontSize();
48 void setFontBoldness( bool isBold );
49 void setFontItalic( bool isItalic );
50 bool fontIsBold();
51 bool fontIsItalic();
52 int fontVariation();
53 std::string prefLine();
54 void setPrefLine(std::string line);
55
56 private:
57 std::string mLine;
58 std::string mName;
59 int mSize;
60 bool mBold;
61 bool mItalic;
62 };
63
64 #endif /* FONTPREFERENCES_H_ */