summaryrefslogtreecommitdiff
path: root/kcm/main.cpp
blob: 7cdfdc021fd34577da13488f6646fe5a5350849b (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
82
83
84
85
86
87
88
89
90
/*
 *  KControl module for Beryl and Aquamarine
 *
 *  Copyright (c) 2006 Dennis Kasprzyk <onestone@beryl-project.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.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 */

#include "aqsettings.h"

#include <qtabwidget.h>
#include <qlayout.h>

#include <kapplication.h>
#include <kaboutdata.h>
#include <kconfig.h>
#include <kdialog.h>
#include <kdebug.h>
#include <dcopclient.h>
#include <kgenericfactory.h>

#include "main.h"
#include "aquamarine_ui.h"

typedef KGenericFactory<KCMBeryl, QWidget> KCMBerylFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_beryl, KCMBerylFactory("kcmberyl"))

KCMBeryl::~KCMBeryl( )
{
}

KCMBeryl::KCMBeryl(QWidget *parent, const char *name, const QStringList &)
    : KCModule(KCMBerylFactory::instance(), parent, name)
{
    KAboutData *about =
    new KAboutData(I18N_NOOP("kcmberyl"), I18N_NOOP("KDE Beryl/Aquamarine Control Module"),
                  0, 0, KAboutData::License_GPL,
                  I18N_NOOP("(c) 2006 Dennis Kasprzyk"));

    about->addAuthor("Dennis Kasprzyk", 0, "onestone@beryl-project.org");

    setAboutData( about );

	m_tabs = new QTabWidget( this );


	AquamarineWidget *aq = new AquamarineWidget(m_tabs, "Aquamarine");
	m_tabs->addTab(aq, "Aquamarine");

	addConfig(AqSettings::self(),aq);

	QVBoxLayout *top = new QVBoxLayout( this, 0, KDialog::spacingHint() );
	top->addWidget( m_tabs );

	load();
}


void KCMBeryl::load()
{
	KCModule::load();
}

void KCMBeryl::save()
{
	KCModule::save();
	DCOPClient *client = kapp->dcopClient();
	if (!client->isAttached())
		client->attach();
	client->send("kwin", "KWinInterface", "reconfigure()", "");
}

void KCMBeryl::defaults()
{
	KCModule::defaults();
}