kmail

snippetsettings.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   snippet feature from kdevelop/plugins/snippet/                        *
00003  *                                                                         * 
00004  *   Copyright (C) 2007 by Robert Gruber                                   *
00005  *   rgruber@users.sourceforge.net                                         *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #include <qstring.h>
00015 #include <klineedit.h>
00016 #include <qcheckbox.h>
00017 #include <qbuttongroup.h>
00018 
00019 #include "snippetsettings.h"
00020 #include "snippetwidget.h"
00021 
00022 
00023 SnippetSettings::SnippetSettings(QWidget *parent, const char *name)
00024  : SnippetSettingsBase(parent, name)
00025 {
00026   _widget = NULL;
00027 }
00028 
00029 SnippetSettings::SnippetSettings(SnippetWidget * w, QWidget *parent, const char *name)
00030  : SnippetSettingsBase(parent, name)
00031 {
00032   _cfg = w->getSnippetConfig();
00033   _widget = w;
00034 }
00035 
00036 
00037 SnippetSettings::~SnippetSettings()
00038 {
00039 }
00040 
00041 
00045 void SnippetSettings::slotOKClicked()
00046 {
00047     _cfg->setToolTips(cbToolTip->isChecked());
00048     _cfg->setDelimiter(leDelimiter->text());
00049     _cfg->setInputMethod(btnGroup->selectedId());
00050 }
00051 
00052 
00053 #include "snippetsettings.moc"