Make it possible to use a distinct selection model in the foldertreewidget.
[kdepim.git] / messagecomposer / messagecomposersettings.cpp
blob92f418ca0baf273dcada4fa2b6b587db2ba589f9
1 /*
2 This file is part of KMail.
4 Copyright (c) 2005 David Faure <faure@kde.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2,
8 as published by the Free Software Foundation.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
25 #include "messagecomposersettings.h"
26 #include <QTimer>
28 using namespace MessageComposer;
30 MessageComposerSettings *MessageComposerSettings::mSelf = 0;
32 MessageComposerSettings *MessageComposerSettings::self()
34 if ( !mSelf ) {
35 mSelf = new MessageComposerSettings();
36 mSelf->readConfig();
39 return mSelf;
42 MessageComposerSettings::MessageComposerSettings()
44 mConfigSyncTimer = new QTimer( this );
45 mConfigSyncTimer->setSingleShot( true );
46 connect( mConfigSyncTimer, SIGNAL( timeout() ), this, SLOT( slotSyncNow() ) );
49 void MessageComposerSettings::requestSync()
51 if ( !mConfigSyncTimer->isActive() )
52 mConfigSyncTimer->start( 0 );
55 void MessageComposerSettings::slotSyncNow()
57 config()->sync();
60 MessageComposerSettings::~MessageComposerSettings()
64 #include "messagecomposersettings.moc"