File indexing completed on 2024-04-21 05:45:50
0001 /* 0002 -------------------------------------------------------------------- 0003 Print Options Dialog 0004 -------------------------------------------------------------------- 0005 SPDX-FileCopyrightText: 1999 Robert Berry <rjmber@ntlwolrd.com> 0006 -------------------------------------------------------------------- 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #pragma once 0011 0012 #include <QWidget> 0013 0014 class QCheckBox; 0015 0016 /** 0017 * Give the user the option to print the crontab file. 0018 * If the user is root ask if they want to print all the users. 0019 */ 0020 0021 class CrontabPrinterWidget : public QWidget 0022 { 0023 Q_OBJECT 0024 public: 0025 /** 0026 * Constructs the dialog. If root is true, the "print all users" is not disabled. 0027 */ 0028 explicit CrontabPrinterWidget(bool root = false); 0029 0030 ~CrontabPrinterWidget() override; 0031 0032 bool printCrontab(); 0033 void setPrintCrontab(bool setStatus); 0034 0035 bool printAllUsers(); 0036 void setPrintAllUsers(bool setStatus); 0037 0038 private: 0039 QCheckBox *mChkPrintCrontab = nullptr; 0040 QCheckBox *mChkPrintAllUsers = nullptr; 0041 }; 0042