JJ: Add question to report exports
Jaroslaw Staniek
staniek at kde.org
Tue Mar 11 14:41:21 GMT 2014
On 11 March 2014 06:22, Vishwa Modi <vishwa9694 at gmail.com> wrote:
> Hi Jaroslaw,
>
> I implemeted following function which is called in 3 fuctions:
> 1) KexiReportView::slotExportAsSpreadsheet()
> 2) KexiReportView::slotExportAsTextDocument()
> 3) KexiReportView::slotExportAsWebPage()
>
>
> void KexiReportView::openexporteddocument(KUrl destination)
> {
> const int answer =
> KMessageBox::questionYesNo(
> this,
> i18n("Do you want to open exported document?"),
> "open document",
> KGuiItem(i18n("Yes")),
> KGuiItem(i18n("No")));
>
> if (answer == KMessageBox::Yes) {
> //KStandardGuiItem::open();
> (void)new KRun(destination, this->topLevelWidget());
> }
> else{
> KStandardGuiItem::close();
> }
> }
>
Thanks for the patch, Vishwa.
Now I think it's time to use the reviewboard tool for Calligra/KDE
developers: http://community.kde.org/Calligra/Contributing_a_Patch
By having it in use here you wouldn't need to tell what code goes into
what file. Once you publish the code there I'll submit a review.
Please do not hesitate to ask if you have first-time trouble with
using the tool.
> The above function is added under the private slots in kexireportview.h
> file.
> I tested the code on my machine and it is running as it should be.
Good!
>
>
> On Tue, Mar 11, 2014 at 2:33 AM, Jaroslaw Staniek <staniek at kde.org> wrote:
>>
>> On 10 March 2014 21:22, Vishwa Modi <vishwa9694 at gmail.com> wrote:
>> > Hi Jaroslaw,
>> > correct me if I'm wrong.
>> > The current code opens the exported documents as soon as they are
>> > exported.
>> > We are required to add the code for KMessageBox::YesNo in the
>> > kexireportview.cpp file in 3 functions:
>> > 1) KexiReportView::slotExportAsSpreadsheet()
>> > 2) KexiReportView::slotExportAsTextDocument()
>> > 3) KexiReportView::slotExportAsWebPage()
>> >
>> > And the code for KMessageBox::YesNo needs to be added in the "else"
>> > section
>> > of the following snippet in above 3 functions :
>> >
>> > if (!renderer->render(cxt, m_reportDocument)) {
>> > KMessageBox::error(this,
>> > i18n("Exporting the report as text
>> > document
>> > to %1 failed.", cxt.destinationUrl.prettyUrl()),
>> > i18n("Export Failed"));
>> > } else {
>> > (void)new KRun(cxt.destinationUrl, this->topLevelWidget());
>> > }
>> >
>>
>> Hi Vishwa,
>> That's correct.
>>
>> And I propose to move the code to a common private method.
>> "(void)new KRun(cxt.destinationUrl, this->topLevelWidget())" is used
>> in exactly the same way three times.
>>
>> >
>> >
>> > On Sat, Mar 8, 2014 at 2:00 PM, Vishwa Modi <vishwa9694 at gmail.com>
>> > wrote:
>> >>
>> >> Hi Jaroslaw,
>> >> I have seen the task and I'll do it.
>> >> My first step would be to search and go through the code that
>> >> implements
>> >> the dialog while importing CSV data.
>> >>
>> >>
>> >>
>> >>
>> >> On Sat, Mar 8, 2014 at 3:47 AM, Jaroslaw Staniek <staniek at kde.org>
>> >> wrote:
>> >>>
>> >>> Hi Vishwa,
>> >>> I propose first job. Please tell if it fits.
>> >>>
>> >>>
>> >>>
>> >>> http://community.kde.org/Kexi/Junior_Jobs/Implement_%22Do_you_want_to_open%22_question_after_exporting_report
>> >>>
>> >>> You can add content to that page if you find it useful for documenting
>> >>> to
>> >>> task.
>> >>>
>> >>> This is a small new feature, so it would go to the master git branch
>> >>> of calligra, and eventually to Calligra 2.9.0.
>> >>> Info on how to build, send a patch, etc. is linked at
>> >>> http://community.kde.org/Calligra/First_Contact
>> >>>
>> >>> In this thread I'll try to guide you through this first task.
>> >>>
>> >>> --
>> >>> regards / pozdrawiam, Jaroslaw Staniek
>> >>> Kexi & Calligra & KDE | http://calligra.org/kexi | http://kde.org
>> >>> Qt for Tizen | http://qt-project.org/wiki/Tizen
>> >>> Qt Certified Specialist | http://www.linkedin.com/in/jstaniek
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> regards / pozdrawiam, Jaroslaw Staniek
>> Kexi & Calligra & KDE | http://calligra.org/kexi | http://kde.org
>> Qt for Tizen | http://qt-project.org/wiki/Tizen
>> Qt Certified Specialist | http://www.linkedin.com/in/jstaniek
>
>
--
regards / pozdrawiam, Jaroslaw Staniek
Kexi & Calligra & KDE | http://calligra.org/kexi | http://kde.org
Qt for Tizen | http://qt-project.org/wiki/Tizen
Qt Certified Specialist | http://www.linkedin.com/in/jstaniek
More information about the calligra-devel
mailing list