summaryrefslogtreecommitdiffstats
path: root/kolf/printdialogpage.cpp
blob: dfec9c9615551c104768fceffd59a3a978779769 (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
#include <tqcheckbox.h>
#include <tqlayout.h>
#include <tqwidget.h>

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

#include "printdialogpage.h"

PrintDialogPage::PrintDialogPage(TQWidget *tqparent, const char *name)
	: KPrintDialogPage( tqparent, name )
{
	setTitle(i18n("Kolf Options"));

	TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());

	titleCheck = new TQCheckBox(i18n("Draw title text"), this);
	titleCheck->setChecked(true);
	tqlayout->addWidget(titleCheck);
}

void PrintDialogPage::getOptions(TQMap<TQString, TQString> &opts, bool /*incldef*/)
{
	opts["kde-kolf-title"] = titleCheck->isChecked()? "true" : "false";
}

void PrintDialogPage::setOptions(const TQMap<TQString, TQString> &opts)
{
	TQString setting = opts["kde-kolf-title"];
	if (!!setting)
		titleCheck->setChecked(setting == "true");
}

#include "printdialogpage.moc"