~smartboyhw/ubuntu/raring/calligra/2.6.0-0ubuntu1

« back to all changes in this revision

Viewing changes to kexi/plugins/reports/kexireportview.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-10-23 21:09:16 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121023210916-m82w6zxnxhaxz7va
Tags: 1:2.5.90-0ubuntu1
* New upstream alpha release (LP: #1070436)
  - Add libkactivities-dev and libopenimageio-dev to build-depends
  - Add kubuntu_build_calligraactive.diff to build calligraactive by default
  - Add package for calligraauthor and move files that are shared between
    calligrawords and calligraauthor to calligrawords-common
* Document the patches
* Remove numbers from patches so they follow the same naming scheme as
  the rest of our patches.
* calligra-data breaks replaces krita-data (<< 1:2.5.3) (LP: #1071686)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <kio/netaccess.h>
40
40
#include <KRun>
41
41
 
 
42
#include <KoIcon.h>
42
43
#include <renderobjects.h>
43
44
#include <KoReportPreRenderer.h>
44
45
 
78
79
    QAction* a;
79
80
 
80
81
#ifndef KEXI_MOBILE
81
 
    viewActions << (a = new KAction(KIcon("document-print"), i18n("Print"), this));
 
82
    viewActions << (a = new KAction(koIcon("document-print"), i18n("Print"), this));
82
83
    a->setObjectName("print_report");
83
84
    a->setToolTip(i18n("Print report"));
84
85
    a->setWhatsThis(i18n("Prints the current report."));
89
90
    viewActions << (a = new KAction(i18n("Export:"), this));
90
91
    a->setEnabled(false); //!TODO this is a bit of a dirty way to add what looks like a label to the toolbar! 
91
92
    // " ", not "", is said to be needed in maemo, the icon didn't display properly without it
92
 
    viewActions << (a = new KAction(KIcon("application-vnd.oasis.opendocument.text"), QLatin1String(" "), this));
 
93
    viewActions << (a = new KAction(koIcon("application-vnd.oasis.opendocument.text"), QLatin1String(" "), this));
93
94
#else
94
 
    viewActions << (a = new KAction(KIcon("application-vnd.oasis.opendocument.text"), i18n("Export as Text Document"), this));
 
95
    viewActions << (a = new KAction(koIcon("application-vnd.oasis.opendocument.text"), i18n("Export as Text Document"), this));
95
96
#endif
96
97
    a->setObjectName("export_as_text_document");
97
98
    a->setToolTip(i18n("Export the report as a text document (in OpenDocument Text format)"));
100
101
    connect(a, SIGNAL(triggered()), this, SLOT(slotExportAsTextDocument()));
101
102
 
102
103
#ifdef KEXI_MOBILE
103
 
    viewActions << (a = new KAction(KIcon("application-vnd.oasis.opendocument.spreadsheet"), QLatin1String(" "), this));
 
104
    viewActions << (a = new KAction(koIcon("application-vnd.oasis.opendocument.spreadsheet"), QLatin1String(" "), this));
104
105
#else
105
 
    viewActions << (a = new KAction(KIcon("application-vnd.oasis.opendocument.spreadsheet"), i18n("Export as Spreadsheet"), this));
 
106
    viewActions << (a = new KAction(koIcon("application-vnd.oasis.opendocument.spreadsheet"), i18n("Export as Spreadsheet"), this));
106
107
#endif
107
108
    a->setObjectName("export_as_spreadsheet");
108
109
    a->setToolTip(i18n("Export the report as a spreadsheet (in OpenDocument Spreadsheet format)"));
111
112
    connect(a, SIGNAL(triggered()), this, SLOT(slotExportAsSpreadsheet()));
112
113
 
113
114
#ifdef KEXI_MOBILE
114
 
    viewActions << (a = new KAction(KIcon("text-html"), QLatin1String(" "), this));
 
115
    viewActions << (a = new KAction(koIcon("text-html"), QLatin1String(" "), this));
115
116
#else
116
 
    viewActions << (a = new KAction(KIcon("text-html"), i18n("Export as Web Page"), this));
 
117
    viewActions << (a = new KAction(koIcon("text-html"), i18n("Export as Web Page"), this));
117
118
#endif
118
119
    a->setObjectName("export_as_web_page");
119
120
    a->setToolTip(i18n("Export the report as a web page (in HTML format)"));
163
164
{
164
165
    KUrl result;
165
166
 
166
 
    // loop until an url has been choosen or the file selection has been cancelled
 
167
    // loop until an url has been chosen or the file selection has been cancelled
167
168
    while (true) {
168
169
        result = KFileDialog::getSaveUrl(KUrl(), mimetype, this, caption);
169
170
 
207
208
                               i18n("Failed to export the report as spreadsheet to %1.", cxt.destinationUrl.prettyUrl()),
208
209
                               i18n("Export Failed"));
209
210
        } else {
210
 
            KRun *runner = new KRun(cxt.destinationUrl, this->topLevelWidget());
 
211
            (void)new KRun(cxt.destinationUrl, this->topLevelWidget());
211
212
        }
212
213
    }
213
214
}
231
232
                               i18n("Exporting the report as text document to %1 failed.", cxt.destinationUrl.prettyUrl()),
232
233
                               i18n("Export Failed"));
233
234
        } else {
234
 
            KRun *runner = new KRun(cxt.destinationUrl, this->topLevelWidget());
 
235
            (void)new KRun(cxt.destinationUrl, this->topLevelWidget());
235
236
        }
236
237
    }
237
238
}
269
270
                           i18n("Exporting the report as web page to %1 failed.", cxt.destinationUrl.prettyUrl()),
270
271
                           i18n("Export Failed"));
271
272
    } else {
272
 
        KRun *runner = new KRun(cxt.destinationUrl, this->topLevelWidget());
 
273
        (void)new KRun(cxt.destinationUrl, this->topLevelWidget());
273
274
    }
274
275
}
275
276
 
425
426
 
426
427
void KexiReportView::moveToRecordRequested(uint r)
427
428
{
428
 
 
 
429
    Q_UNUSED(r);
429
430
}
430
431
 
431
 
long int KexiReportView::currentRecord()
 
432
int KexiReportView::currentRecord() const
432
433
{
433
434
    return m_currentPage;
434
435
}
435
436
 
436
 
long int KexiReportView::recordCount()
 
437
int KexiReportView::recordCount() const
437
438
{
438
439
    return m_pageCount;
439
440
}