summaryrefslogtreecommitdiffstats
path: root/kcron/ktprintopt.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit37333bf25ad9a4c538250f5af2f9f1d666362883 (patch)
treec45e8df5b9efbffe07eb3d9340df7811c7e16943 /kcron/ktprintopt.cpp
downloadtdeadmin-37333bf25ad9a4c538250f5af2f9f1d666362883.tar.gz
tdeadmin-37333bf25ad9a4c538250f5af2f9f1d666362883.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcron/ktprintopt.cpp')
-rw-r--r--kcron/ktprintopt.cpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/kcron/ktprintopt.cpp b/kcron/ktprintopt.cpp
new file mode 100644
index 0000000..68315c5
--- /dev/null
+++ b/kcron/ktprintopt.cpp
@@ -0,0 +1,68 @@
+
+/***************************************************************************
+ * -------------------------------------------------------------------- *
+ * Print Options Dialog *
+ * -------------------------------------------------------------------- *
+ * Copyright (C) 1999, Robert Berry <rjmber@ntlwolrd.com> *
+ * -------------------------------------------------------------------- *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ ***************************************************************************/
+
+#include <qcheckbox.h>
+#include <qlayout.h>
+
+#include <kdialog.h>
+#include <kaccel.h>
+#include <klocale.h>
+#include <kapplication.h>
+#include "ktprintopt.h"
+
+KTPrintOpt::KTPrintOpt(bool root) :
+ KPrintDialogPage(0, "ktprintopt")
+{
+ m_title = i18n("Cron Options");
+
+ QVBoxLayout *main_ = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+
+ chkPrintCrontab = new QCheckBox(i18n("Print cron&tab"), this, "chkPrintCrontab");
+ main_->addWidget(chkPrintCrontab);
+
+ chkPrintAllUsers = new QCheckBox(i18n("Print &all users"), this, "chkPrintAllUsers");
+ main_->addWidget(chkPrintAllUsers);
+
+ if (!root) {
+ chkPrintAllUsers->setChecked(false);
+ chkPrintAllUsers->setEnabled(false);
+ }
+}
+
+KTPrintOpt::~KTPrintOpt()
+{
+}
+
+void
+KTPrintOpt::setOptions(const QMap<QString,QString>& opts)
+{
+ QString value;
+
+ value = opts["crontab"];
+ chkPrintCrontab->setChecked(value == "true");
+
+ if (chkPrintAllUsers->isEnabled())
+ {
+ value = opts["allusers"];
+ chkPrintAllUsers->setChecked(value == "true");
+ }
+}
+
+void KTPrintOpt::getOptions(QMap<QString,QString>& opts, bool)
+{
+ opts["crontab"] = chkPrintCrontab->isChecked() ? "true" : "false";
+ opts["allusers"] = chkPrintAllUsers->isChecked() ? "true" : "false";
+}
+
+
+#include "ktprintopt.moc"