1 /* 2 * Copyright (C) 2004 by Mark Bucciarelli <mark@hubcapconsulting.com> 3 * Copyright (C) 2019 Alexander Potashev <aspotashev@gmail.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along 16 * with this program; if not, write to the 17 * Free Software Foundation, Inc. 18 * 51 Franklin Street, Fifth Floor 19 * Boston, MA 02110-1301 USA. 20 * 21 */ 22 23 #ifndef EXPORTDIALOG_H 24 #define EXPORTDIALOG_H 25 26 #include <QDialogButtonBox> 27 28 #include "ui_exportdialog.h" 29 #include "reportcriteria.h" 30 31 class TaskView; 32 33 class ExportDialog : public QDialog 34 { 35 Q_OBJECT 36 37 public Q_SLOTS: 38 void exportToClipboard(); 39 void exportToFile(); 40 41 void updateUI(); 42 43 public: 44 explicit ExportDialog(QWidget *parent, TaskView *taskView); 45 46 /** 47 Enable the "Tasks to export" question in the dialog. 48 49 Since ktimetracker does not have the concept of a single root task, when the user 50 requests a report on a top-level task, it is impossible to know if they 51 want all tasks or just the currently selected top-level task. 52 53 Stubbed for 3.3 release as CSV export of totals doesn't support this option. 54 */ 55 void enableTasksToExportQuestion(); 56 57 /** 58 Return an object that encapsulates the choices the user has made. 59 */ 60 ReportCriteria reportCriteria(); 61 62 private: 63 Ui::ExportDialog ui; 64 TaskView *m_taskView; 65 ReportCriteria rc; 66 }; 67 68 #endif 69