blob: 7652cf40907e981fa957d2c7a3183fd3b7f2f000 (
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 <qlabel.h>
#include <qlayout.h>
#include <kdialog.h>
#include <klocale.h>
#include "config.h"
Config::Config(QWidget *parent, const char *name)
: QFrame(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(QString text, QWidget *parent, const char *name)
: Config(parent, name)
{
QVBoxLayout *layout = new QVBoxLayout(this, marginHint(), spacingHint());
layout->addWidget(new QLabel(text, this));
}
DefaultConfig::DefaultConfig(QWidget *parent, const char *name)
: MessageConfig(i18n("No configuration options"), parent, name)
{
}
#include "config.moc"
|