runtime debug infrastructure
[kmk.git] / src / kmksettings_dialog.h
blobe939d42c5839ec7e631b1354e0292eb2f62a1049
1 /***************************************************************************
2 * KMK - KDE Music Cataloger - the tool for personal *
3 * audio collection management *
4 * *
5 * Copyright (C) 2006,2007 by Plamen Petrov *
6 * carpo@abv.bg *
7 * *
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. *
12 * *
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. *
17 * *
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 #ifndef KMKSETTINGS_DIALOG_H
25 #define KMKSETTINGS_DIALOG_H
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
31 #include <qcheckbox.h>
33 #include "kmksettingsbase.h"
34 #include "kmkglobalsettings.h"
36 /**
37 * @short A settings dialog, specific to KMK.
39 * @author Plamen Petrov <carpo@abv.bg>, <pvp@tk.ru.acad.bg>
40 * @version 0.3
42 class kmkSettingsDialog: public kmkSettingsBase {
43 Q_OBJECT
44 public:
45 /**
46 * @param files - holds a pointer to initially filled MmDataList, containing
47 * files to be processed by kmkTagEdit
48 * @param SoN - gets passed on to the SaveOnNavigate checkbox setChecked() method
49 * @param rm_flag - a pointer to a int, used to indicate whether the hole list
50 * has saved changes ( 1 ), or hasn't been touched ( 0 )
51 * Use code like this:
52 * \code
53 * int * tags_changed = new int;
54 * new kmkTagEdit( tag_list, SaveOnNavigate, tags_changed );
55 * if( *tags_changed > 0)
56 * kdDebug() << "TagEditDialog changed"
57 * " some file(s). " << endl;
58 * else
59 * kdDebug() << "No changes written to files"
60 * " by TagEditDialog. " << endl;
61 * \endcode
63 kmkSettingsDialog( uint *rm_flag );
65 /**
66 * @short Default Destructor
68 * If the MmDataPList passed at the constructor is valid - then
69 * all items' property MmIsDir is set to FALSE, because these items
70 * are files, and if they aren't (they are folders then) - then they
71 * shouldn't have gotten in it at all, and there is a bug...
73 * Because kmkTagEdit uses MmData::MmIsDir to remember if a file was
74 * modified, the destructor sets that property of all items in
75 * the list it got handed in the constructor to FALSE
77 * @see MmData
79 virtual ~kmkSettingsDialog();
81 private slots:
82 /**
83 * @short Some informative description
85 * This method does something that needs to be documented
87 void slotClicked_pbSave();
88 /**
89 * @short Some informative description
91 * This method does something that needs to be documented
93 * @since 0.2
95 void slotClicked_pbClose();
96 /**
97 * @short Private method to handle tags changing
99 * If the user changes anything in the dialog, this method
100 * is called to mark the MmData item displayed as CHANGED,
101 * i.e. the Save button in the dialog should be enabled;
102 * As the TagEditor only works with files only, the
103 * MmData::MmIsDir property is used to store this info.
105 * @see MmData
107 void slotHandle_tag_change( const QString & );
109 private:
111 * @p any_changed is used as a return value of the exec() slot;
112 * If any of the files in the list passed to the constructor got
113 * changed - this property, used as a flag, indicates that
115 bool any_changed;
117 * @p content_changed is used internally to monitor for changes
118 * in any of the tags, to enable proper Save button activation
120 bool content_changed;
122 * @p handle_changes is a flag for the Tag edit dialog itself -
123 * it marks whether textChanged signal should be processed or
124 * discarded, as is the case when the dialog itself changes
125 * the text in the appropriate fields, for navigation
127 bool handle_changes;
129 * @short Some informative description
131 * Something that needs to be documented
133 uint * remote_flag;
135 * @short The KmkGlobalSettings object used to get config data
137 * The pointed object is used to get settings data, e.g. debug
139 * @since 0.24
141 KmkGlobalSettings * s;
144 #endif