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 #ifndef KMKSETTINGS_DIALOG_H
25 #define KMKSETTINGS_DIALOG_H
31 #include <qcheckbox.h>
33 #include "kmksettingsbase.h"
34 #include "kmkglobalsettings.h"
37 * @short A settings dialog, specific to KMK.
39 * @author Plamen Petrov <carpo@abv.bg>, <pvp@tk.ru.acad.bg>
42 class kmkSettingsDialog
: public kmkSettingsBase
{
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 )
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;
59 * kdDebug() << "No changes written to files"
60 * " by TagEditDialog. " << endl;
63 kmkSettingsDialog( uint
*rm_flag
);
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
79 virtual ~kmkSettingsDialog();
83 * @short Some informative description
85 * This method does something that needs to be documented
87 void slotClicked_pbSave();
89 * @short Some informative description
91 * This method does something that needs to be documented
95 void slotClicked_pbClose();
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.
107 void slotHandle_tag_change( const QString
& );
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
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
129 * @short Some informative description
131 * Something that needs to be documented
135 * @short The KmkGlobalSettings object used to get config data
137 * The pointed object is used to get settings data, e.g. debug
141 KmkGlobalSettings
* s
;