summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/netmeeting/netmeetingpreferences.cpp
blob: d5d7f01b2a5c631ea8f65c5545f8d4cabdd81e61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/***************************************************************************
                          Netmeetingpreferences.cpp  -  description
                             -------------------
    copyright            : (C) 2004 by Olivier Goffart
    email                : ogoffart @ kde.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include <tqlayout.h>
#include <tqcheckbox.h>

#include <kcombobox.h>
#include <klineedit.h>
#include <kparts/componentfactory.h>
#include <klocale.h>
#include <kconfig.h>
#include <kglobal.h>
#include <kcombobox.h>
#include <klistview.h>
#include <kgenericfactory.h>
#include <kcolorbutton.h>
#include <kinputdialog.h>
#include <kurlrequester.h>
#include <kregexpeditorinterface.h>
#include <kdebug.h>

#include "netmeetingplugin.h"
#include "netmeetingprefs_ui.h"
#include "netmeetingpreferences.h"

typedef KGenericFactory<NetmeetingPreferences> NetmeetingPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_netmeeting, NetmeetingPreferencesFactory( "kcm_kopete_netmeeting" )  )

NetmeetingPreferences::NetmeetingPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
							: TDECModule(NetmeetingPreferencesFactory::instance(), parent, args)
{
	( new TQVBoxLayout( this ) )->setAutoAdd( true );
	preferencesDialog = new NetmeetingPrefsUI(this);

	connect(preferencesDialog->m_app , TQT_SIGNAL(textChanged(const TQString &)) , this , TQT_SLOT(slotChanged()));

	load();
}

NetmeetingPreferences::~NetmeetingPreferences()
{
}

void NetmeetingPreferences::load()
{
	TDEConfig *config=TDEGlobal::config();
	config->setGroup("Netmeeting Plugin");
	preferencesDialog->m_app->setCurrentText(config->readEntry("NetmeetingApplication","ekiga -c callto://%1"));
	emit TDECModule::changed(false);
}

void NetmeetingPreferences::save()
{
	TDEConfig *config=TDEGlobal::config();
	config->setGroup("Netmeeting Plugin");
	config->writeEntry("NetmeetingApplication",preferencesDialog->m_app->currentText());
	emit TDECModule::changed(false);
}


void NetmeetingPreferences::slotChanged()
{
	emit TDECModule::changed(true);
}

#include "netmeetingpreferences.moc"

// vim: set noet ts=4 sts=4 sw=4: