2 * Copyright (C) 2004 by Mark Bucciarelli <mark@hubcapconsulting.com>
3 * 2007 the ktimetracker developers
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.
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.
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.
23 #ifndef CSVEXPORTDIALOG_H
24 #define CSVEXPORTDIALOG_H
26 #include "ui_csvexportdialog_base.h"
27 #include "reportcriteria.h"
29 class CSVExportDialogBase
: public KDialog
, public Ui::CSVExportDialogBase
32 CSVExportDialogBase( QWidget
*parent
) : KDialog( parent
) {
35 setMainWidget( page
);
36 setButtons( KDialog::User1
| KDialog::Ok
| KDialog::Cancel
);
37 setButtonText( KDialog::Ok
, i18nc("@action:button", "&Export") );
38 setButtonText( KDialog::User1
, i18nc("@action:button", "E&xport to Clipboard") );
39 setButtonIcon( KDialog::User1
, KIcon( "klipper" ) );
40 enableButton( KDialog::Ok
, false );
46 class CSVExportDialog
: public CSVExportDialogBase
51 void exPortToClipBoard();
52 void exPortToCSVFile();
55 explicit CSVExportDialog( ReportCriteria::REPORTTYPE rt
,
60 Enable the "Tasks to export" question in the dialog.
62 Since ktimetracker does not have the concept of a single root task, when the user
63 requests a report on a top-level task, it is impossible to know if they
64 want all tasks or just the currently selected top-level task.
66 Stubbed for 3.3 release as CSV export of totals doesn't support this option.
68 void enableTasksToExportQuestion();
71 Return an object that encapsulates the choices the user has made.
73 ReportCriteria
reportCriteria();
78 Enable export button if export url entered.
80 void enableExportButton();