summaryrefslogtreecommitdiffstats
path: root/kolf/config.cpp
blob: b67e12cdbc598504491114fc1482ba360e736a6b (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
#include <tqlabel.h>
#include <layout.h>

#include <kdialog.h>
#include <klocale.h>

#include "config.h"

Config::Config(TQWidget *parent, const char *name)
	: TQFrame(parent, name)
{
	startedUp = false;
}

void Config::ctorDone()
{
	startedUp = true;
}

int Config::spacingHint()
{
	return KDialog::spacingHint() / 2;
}

int Config::marginHint()
{
	return KDialog::marginHint();
}

void Config::changed()
{
	if (startedUp)
		emit modified();
}

MessageConfig::MessageConfig(TQString text, TQWidget *parent, const char *name)
	: Config(parent, name)
{
	TQVBoxLayout *layout = new TQVBoxLayout(this, marginHint(), spacingHint());
	layout->addWidget(new TQLabel(text, this));
}

DefaultConfig::DefaultConfig(TQWidget *parent, const char *name)
	: MessageConfig(i18n("No configuration options"), parent, name)
{
}

#include "config.moc"