summaryrefslogtreecommitdiffstats
path: root/kolf/printdialogpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kolf/printdialogpage.cpp')
-rw-r--r--kolf/printdialogpage.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/kolf/printdialogpage.cpp b/kolf/printdialogpage.cpp
new file mode 100644
index 00000000..1fc6ad37
--- /dev/null
+++ b/kolf/printdialogpage.cpp
@@ -0,0 +1,35 @@
+#include <qcheckbox.h>
+#include <qlayout.h>
+#include <qwidget.h>
+
+#include <klocale.h>
+#include <kdialog.h>
+#include <kdebug.h>
+
+#include "printdialogpage.h"
+
+PrintDialogPage::PrintDialogPage(QWidget *parent, const char *name)
+ : KPrintDialogPage( parent, name )
+{
+ setTitle(i18n("Kolf Options"));
+
+ QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+
+ titleCheck = new QCheckBox(i18n("Draw title text"), this);
+ titleCheck->setChecked(true);
+ layout->addWidget(titleCheck);
+}
+
+void PrintDialogPage::getOptions(QMap<QString, QString> &opts, bool /*incldef*/)
+{
+ opts["kde-kolf-title"] = titleCheck->isChecked()? "true" : "false";
+}
+
+void PrintDialogPage::setOptions(const QMap<QString, QString> &opts)
+{
+ QString setting = opts["kde-kolf-title"];
+ if (!!setting)
+ titleCheck->setChecked(setting == "true");
+}
+
+#include "printdialogpage.moc"