1 /***************************************************************************
2 * KMK - KDE Music Cataloger - the tool for personal *
3 * audio collection management *
5 * Copyright (C) 2006,2007 by Plamen Petrov *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the *
20 * Free Software Foundation, Inc., *
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22 ***************************************************************************/
24 /* This is a modified version of K3B's k3bglobalsettings.h to suit KMK's needs*/
26 #ifndef _KMK_GLOBAL_SETTINGS_H_
27 #define _KMK_GLOBAL_SETTINGS_H_
33 /** debug constants - a byte of which bits define debug levels for
37 * KMK_DBG_CATALOG_IO 2
38 * KMK_DBG_CAT_MEM_OPS 4
39 * KMK_DBG_EXT_PLAYER 8
42 * KMK_DBG_SETTINGS 64 --need to see a more fit name/disambig. with *_CONFIG
46 #define KMK_DBG_NONE 0
47 #define KMK_DBG_CONFIG 1
48 #define KMK_DBG_CATALOG_IO 2
49 #define KMK_DBG_CAT_MEM_OPS 4
50 #define KMK_DBG_EXT_PLAYER 8
51 #define KMK_DBG_FS_OPS 16
52 #define KMK_DBG_SIGNALS 32
53 #define KMK_DBG_SETTINGS 64
54 #define KMK_DBG_OTHER 128
55 #define KMK_DBG_ALL 255
62 * The class KmkGlobalSettings defines a set of variables, which hold
63 * the current config used by KMK. Throughout the app these are accessed
66 * if ( settings_obj->saveOnNavigate() ) { // do whats needed for saveOnNavigate }
68 * and here saveOnNavigate is defined as a private variable for KmkGlobalSettings.
70 class KmkGlobalSettings
76 * This method takes care of reading the config group
78 void readSettings( KConfig
* );
81 * This method takes care of writinging the config group
83 void saveSettings( KConfig
* );
85 unsigned short dbg() const { return g_dbg
; }
86 bool saveOnNavigate() const { return g_save_on_navigate
; }
87 bool autoColumnWidth() const { return g_auto_column_width
; }
88 bool loadLast() const { return g_load_last
; }
89 bool saveGeo() const { return g_save_geo
; }
90 QString
lastCatalogUsed() const { return g_last_catalog_used
; }
92 void setDbg( const unsigned short d
) { g_dbg
= d
; }
93 void setSaveOnNavigate( const bool b
) { g_save_on_navigate
= b
; }
94 void setAutoColumnWidth( const bool b
) { g_auto_column_width
= b
; }
95 void setLoadLast( const bool b
) { g_load_last
= b
; }
96 void setSaveGeo( const bool b
) { g_save_geo
= b
; }
97 void setLastCatalogUsed( const QString s
) { g_last_catalog_used
= s
; }
100 unsigned short g_dbg
;
101 bool g_save_on_navigate
;
102 bool g_auto_column_width
;
105 QString g_last_catalog_used
;
108 #endif //_KMK_GLOBAL_SETTINGS_H_