runtime debug infrastructure
[kmk.git] / src / kmksettings_dialog.cpp
blob6c053193315a159474f64b89ef44c0005af7c021
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 #include <kapplication.h>
25 #include <kdebug.h>
27 #include "kmksettings_dialog.h"
29 #define SDLG "Settings Dialog: "
31 kmkSettingsDialog::kmkSettingsDialog( uint *rm_flag )
32 :kmkSettingsBase( 0, "KMK Settings Dialog", FALSE, Qt::WType_Dialog | Qt::WDestructiveClose )
34 Q_UNUSED( rm_flag );
36 s = new KmkGlobalSettings;
37 Q_CHECK_PTR( s );
38 s->readSettings( kapp->config() );
40 if( s->dbg() & KMK_DBG_CONFIG ) kdDebug() << SDLG"constructor: read config, now will use it..." << endl;
41 cb_last->setChecked( s->loadLast() );
42 cb_geometry->setChecked( s->saveGeo() );
43 cb_autoAdj->setChecked( s->autoColumnWidth() );
45 if( s->dbg() & KMK_DBG_CONFIG ) kdDebug() << SDLG"constructor: done." << endl;
46 setModal( TRUE );
47 exec();
50 kmkSettingsDialog::~kmkSettingsDialog()
52 if( s->dbg() & KMK_DBG_CONFIG ) kdDebug() << SDLG"destructor: saving config..." << endl;
53 s->setLoadLast( cb_last->isChecked() );
54 s->setSaveGeo( cb_geometry->isChecked() );
55 s->setAutoColumnWidth( cb_autoAdj->isChecked() );
56 s->saveSettings( kapp->config() );
58 if( s->dbg() & KMK_DBG_CONFIG ) kdDebug() << SDLG"destructor: done." << endl;
59 delete s;
62 void kmkSettingsDialog::slotClicked_pbSave()
66 void kmkSettingsDialog::slotClicked_pbClose()
70 void kmkSettingsDialog::slotHandle_tag_change( const QString & m )
72 Q_UNUSED( m );
75 #include "kmksettings_dialog.moc"