summaryrefslogtreecommitdiffstats
path: root/kolf/config.cpp
blob: 7dba99fd8b693fee85c2bc40b52828b686ee505f (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 <tqlayout.h>

#include <kdialog.h>
#include <tdelocale.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"