File: config.h

package info (click to toggle)
kchmviewer 5.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,868 kB
  • ctags: 918
  • sloc: cpp: 10,002; sh: 165; makefile: 2
file content (90 lines) | stat: -rw-r--r-- 2,498 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/**************************************************************************
 *  Kchmviewer - a CHM file viewer with broad language support            *
 *  Copyright (C) 2004-2010 George Yunaev, kchmviewer@ulduzsoft.com       *
 *                                                                        *
 *  This program is free software: you can redistribute it and/or modify  *
 *  it under the terms of the GNU General Public License as published by  *
 *  the Free Software Foundation, either version 3 of the License, or     *
 *  (at your option) any later version.                                   *
 *																	      *
 *  This program is distributed in the hope that it will be useful,       *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *  GNU General Public License for more details.                          *
 *                                                                        *
 *  You should have received a copy of the GNU General Public License     *
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 **************************************************************************/

#ifndef CONFIG_H
#define CONFIG_H

#include <QString>
#include <QStringList>

#include "recentfiles.h"

extern const char * APP_PATHINUSERDIR;

class Config
{
	public:
		enum choose_action_t
		{
			ACTION_ALWAYS_OPEN,
			ACTION_ASK_USER,
			ACTION_DONT_OPEN
		};
		
		enum UsedBrowser
		{
			BROWSER_QTEXTBROWSER = 0,
   			BROWSER_KHTMLPART,
	  		BROWSER_QTWEBKIT
		};

		enum ToolbarMode
		{
			TOOLBAR_SMALLICONS,
			TOOLBAR_LARGEICONS,
			TOOLBAR_LARGEICONSTEXT,
			TOOLBAR_TEXTONLY
		};
		
		enum StartupMode
		{
			STARTUP_DO_NOTHING,
			STARTUP_LOAD_LAST_FILE,
			STARTUP_POPUP_OPENFILE
		};

		Config();
		void	save();
				
	public:
		QString				m_datapath;
		QString				m_lastOpenedDir;
		
		StartupMode			m_startupMode;
		choose_action_t		m_onNewChmClick;
		choose_action_t		m_onExternalLinkClick;
		int					m_numOfRecentFiles;
		bool				m_HistoryStoreExtra;
		int					m_usedBrowser;
		ToolbarMode			m_toolbarMode;
		
		bool				m_kdeEnableJS;
		bool				m_kdeEnableJava;
		bool				m_kdeEnablePlugins;
		bool				m_kdeEnableRefresh;
		
		bool				m_advUseInternalEditor;
		QString				m_advExternalEditorPath;
		bool				m_advLayoutDirectionRL;
		bool				m_advAutodetectEncoding;
		bool				m_advCheckNewVersion;
};

extern Config * pConfig;

#endif