~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kplato/kptview.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
#include "kptaccountsview.h"
79
79
#include "kptaccountseditor.h"
80
80
#include "kptcalendareditor.h"
81
 
#include "kptchartview.h"
82
81
#include "kptfactory.h"
83
82
#include "kptmilestoneprogressdialog.h"
84
83
#include "kpttaskdescriptiondialog.h"
219
218
 
220
219
    // ------ View
221
220
    actionCollection()->addAction( KStandardAction::Redisplay, "view_refresh" , this, SLOT( slotRefreshView() ) );
222
 
    
 
221
 
223
222
    actionViewSelector  = new KToggleAction(i18n("Show Selector"), this);
224
223
    actionCollection()->addAction("view_show_selector", actionViewSelector );
225
224
    connect( actionViewSelector, SIGNAL( triggered( bool ) ), SLOT( slotViewSelector( bool ) ) );
263
262
    connect( actionOpenReportFile, SIGNAL( triggered( bool ) ), SLOT( slotOpenReportFile() ) );
264
263
 
265
264
    // ------ Help
266
 
    actionIntroduction  = new KAction( i18n("KPlato Introduction"), this);
 
265
    actionIntroduction  = new KAction( KIcon( "dialog-information" ), i18n("KPlato Introduction"), this);
267
266
    actionCollection()->addAction("kplato_introduction", actionIntroduction );
268
267
    connect( actionIntroduction, SIGNAL( triggered( bool ) ), SLOT( slotIntroduction() ) );
269
268
 
338
337
    connect( &m_progressBarTimer, SIGNAL( timeout() ), this, SLOT( removeProgressBarItems() ) );
339
338
 
340
339
    connect( &getProject(), SIGNAL(sigCalculationStarted(Project*, ScheduleManager*)), this, SLOT(slotCalculationStarted(Project*, ScheduleManager*)));
341
 
    
 
340
 
342
341
    connect( &getProject(), SIGNAL( scheduleChanged( MainSchedule* ) ), SLOT( slotScheduleChanged( MainSchedule* ) ) );
343
342
 
344
343
    connect( &getProject(), SIGNAL( scheduleAdded( const MainSchedule* ) ), SLOT( slotScheduleAdded( const MainSchedule* ) ) );
375
374
    KTemporaryFile tempFile;
376
375
    tempFile.setSuffix( ".kplatot" );
377
376
    //Check that creation of temp file was successful
378
 
    if ( tempFile.status() != 0 ) {
379
 
        qWarning("Creation of temprary file to store template failed.");
 
377
    if ( ! tempFile.open() ) {
 
378
        kWarning()<<"Creation of temprary file to store template failed.";
380
379
        return;
381
380
    }
382
 
 
383
 
    getPart()->saveNativeFormat( tempFile.name() );
384
 
    KoTemplateCreateDia::createTemplate( "kplato_template", Factory::global(), tempFile.name(), pix, this );
 
381
    kDebug()<<"Created temporaray file:"<<tempFile.fileName();
 
382
    getPart()->saveNativeFormat( tempFile.fileName() );
 
383
    KoTemplateCreateDia::createTemplate( "kplato_template", Factory::global(), tempFile.fileName(), pix, this );
385
384
}
386
385
 
387
386
void View::createViews()
558
557
    ViewInfo vi;
559
558
    if ( type == "CalendarEditor" ) {
560
559
        vi.name = i18n( "Work & Vacation" );
561
 
        vi.tip = i18n( "Edit working- and vacation days for resources" );
 
560
        vi.tip = i18nc( "@info:tooltip", "Edit working- and vacation days for resources" );
562
561
    } else if ( type == "AccountsEditor" ) {
563
562
        vi.name = i18n( "Cost Breakdown Structure" );
564
 
        vi.tip = i18n( "Edit cost breakdown structure." );
 
563
        vi.tip = i18nc( "@info:tooltip", "Edit cost breakdown structure." );
565
564
    } else if ( type == "ResourceEditor" ) {
566
565
        vi.name = i18n( "Resources" );
567
 
        vi.tip = i18n( "Edit resource breakdown structure" );
 
566
        vi.tip = i18nc( "@info:tooltip", "Edit resource breakdown structure" );
568
567
    } else if ( type == "TaskEditor" ) {
569
568
        vi.name = i18n( "Tasks" );
570
 
        vi.tip = i18n( "Edit work breakdown structure" );
 
569
        vi.tip = i18nc( "@info:tooltip", "Edit work breakdown structure" );
571
570
    } else if ( type == "DependencyEditor" ) {
572
571
        vi.name = i18n( "Dependencies (Graphic)" );
573
 
        vi.tip = i18n( "Edit task dependencies" );
 
572
        vi.tip = i18nc( "@info:tooltip", "Edit task dependencies" );
574
573
    } else if ( type == "PertEditor" ) {
575
574
        vi.name = i18n( "Dependencies (List)" );
576
 
        vi.tip = i18n( "Edit task dependencies" );
 
575
        vi.tip = i18nc( "@info:tooltip", "Edit task dependencies" );
577
576
    } else if ( type == "ScheduleEditor" ) {
578
577
        // This view is not used stand-alone atm
579
578
        vi.name = i18n( "Schedules" );
580
579
        vi.tip = "";
581
580
    } else if ( type == "ScheduleHandlerView" ) {
582
581
        vi.name = i18n( "Schedules" );
583
 
        vi.tip = i18n( "Calculate and analyze project schedules" );
 
582
        vi.tip = i18nc( "@info:tooltip", "Calculate and analyze project schedules" );
584
583
    } else if ( type == "ProjectStatusView" ) {
585
584
        vi.name = i18n( "Project Performance Chart" );
586
 
        vi.tip = i18n( "View project status information" );
 
585
        vi.tip = i18nc( "@info:tooltip", "View project status information" );
587
586
    } else if ( type == "TaskStatusView" ) {
588
587
        vi.name = i18n( "Task Status" );
589
 
        vi.tip = i18n( "View task progress information" );
 
588
        vi.tip = i18nc( "@info:tooltip", "View task progress information" );
590
589
    } else if ( type == "TaskView" ) {
591
590
        vi.name = i18n( "Task Execution" );
592
 
        vi.tip = i18n( "View task execution information" );
 
591
        vi.tip = i18nc( "@info:tooltip", "View task execution information" );
593
592
    } else if ( type == "TaskWorkPackageView" ) {
594
593
        vi.name = i18n( "Work Package View" );
595
 
        vi.tip = i18n( "View task work package information" );
 
594
        vi.tip = i18nc( "@info:tooltip", "View task work package information" );
596
595
    } else if ( type == "GanttView" ) {
597
596
        vi.name = i18n( "Gantt" );
598
 
        vi.tip = i18n( "View gantt chart" );
 
597
        vi.tip = i18nc( "@info:tooltip", "View gantt chart" );
599
598
    } else if ( type == "MilestoneGanttView" ) {
600
599
        vi.name = i18n( "Milestone Gantt" );
601
 
        vi.tip = i18n( "View milestone gantt chart" );
 
600
        vi.tip = i18nc( "@info:tooltip", "View milestone gantt chart" );
602
601
    } else if ( type == "ResourceAppointmentsView" ) {
603
602
        vi.name = i18n( "Resource Assignments" );
604
 
        vi.tip = i18n( "View resource assignments" );
 
603
        vi.tip = i18nc( "@info:tooltip", "View resource assignments in a table" );
605
604
    } else if ( type == "ResourceAppointmentsGanttView" ) {
606
605
        vi.name = i18n( "Resource Assignments (Gantt)" );
607
 
        vi.tip = i18n( "View resource assignments in gantt chart" );
 
606
        vi.tip = i18nc( "@info:tooltip", "View resource assignments in gantt chart" );
608
607
    } else if ( type == "AccountsView" ) {
609
608
        vi.name = i18n( "Cost Breakdown" );
610
 
        vi.tip = i18n( "View planned and actual cost" );
 
609
        vi.tip = i18nc( "@info:tooltip", "View planned and actual cost" );
611
610
    } else if ( type == "PerformanceStatusView" ) {
612
611
        vi.name = i18n( "Tasks Performance Chart" );
613
 
        vi.tip = i18n( "View tasks performance status information" );
 
612
        vi.tip = i18nc( "@info:tooltip", "View tasks performance status information" );
614
613
    } else if ( type == "ReportView" ) {
615
614
        vi.name = i18n( "Report" );
616
 
        vi.tip = i18n( "View report" );
 
615
        vi.tip = i18nc( "@info:tooltip", "View report" );
617
616
    } else  {
618
617
        kWarning()<<"Unknown viewtype: "<<type;
619
618
    }
622
621
 
623
622
void View::slotOpenUrlRequest( HtmlView *v, const KUrl &url )
624
623
{
625
 
    if ( url.url().startsWith("about:kplato") ) {
 
624
    if ( url.url().startsWith( QLatin1String( "about:kplato" ) ) ) {
626
625
        getPart()->aboutPage().generatePage( v->htmlPart(), url );
627
626
        return;
628
627
    }
1225
1224
    return resourceAssignmentView;
1226
1225
}
1227
1226
 
1228
 
ViewBase *View::createChartView( ViewListItem *cat, const QString tag, const QString &name, const QString &tip, int index )
1229
 
{
1230
 
    ChartView *v = new ChartView( getPart(), m_tab );
1231
 
    m_tab->addWidget( v );
1232
 
 
1233
 
    ViewListItem *i = m_viewlist->addView( cat, tag, name, v, getPart(), "", index );
1234
 
    ViewInfo vi = defaultViewInfo( "ChartView" );
1235
 
    if ( name.isEmpty() ) {
1236
 
        i->setText( 0, vi.name );
1237
 
    }
1238
 
    if ( tip == TIP_USE_DEFAULT_TEXT ) {
1239
 
        i->setToolTip( 0, vi.tip );
1240
 
    } else {
1241
 
        i->setToolTip( 0, tip );
1242
 
    }
1243
 
 
1244
 
    v->setProject( &( getProject() ) );
1245
 
 
1246
 
    connect( this, SIGNAL( currentScheduleManagerChanged( ScheduleManager* ) ), v, SLOT( setScheduleManager( ScheduleManager* ) ) );
1247
 
 
1248
 
    connect( v, SIGNAL( guiActivated( ViewBase*, bool ) ), SLOT( slotGuiActivated( ViewBase*, bool ) ) );
1249
 
    v->updateReadWrite( m_readWrite );
1250
 
    return v;
1251
 
 
1252
 
}
1253
 
 
1254
1227
ViewBase *View::createReportView( ViewListItem *cat, const QString tag, const QString &name, const QString &tip, int index )
1255
1228
{
1256
1229
    ReportView *v = new ReportView( getPart(), m_tab );
1269
1242
 
1270
1243
    v->setProject( &getProject() );
1271
1244
    v->setReportModels( v->createReportModels( &getProject(), currentScheduleManager(), this ) );
1272
 
    
 
1245
 
1273
1246
    connect( this, SIGNAL( currentScheduleManagerChanged( ScheduleManager* ) ), v, SLOT( setScheduleManager( ScheduleManager* ) ) );
1274
1247
    emit currentScheduleManagerChanged( currentScheduleManager() );
1275
 
    
 
1248
 
1276
1249
    connect( v, SIGNAL( guiActivated( ViewBase*, bool ) ), SLOT( slotGuiActivated( ViewBase*, bool ) ) );
1277
1250
    connect( v, SIGNAL( editReportDesign( ReportView* ) ), SLOT( slotEditReportDesign( ReportView* ) ) );
1278
1251
    v->updateReadWrite( m_readWrite );
1563
1536
        m_progressBarTimer.stop();
1564
1537
        removeProgressBarItems();
1565
1538
    }
1566
 
    QApplication::setOverrideCursor( Qt::WaitCursor );
1567
 
    CalculateScheduleCmd *cmd =  new CalculateScheduleCmd( *project, sm, i18nc( "@info:status 1=schedule name", "Calculate %1", sm->name() ) );
1568
 
    m_calculationcommands.insert( sm, cmd );
1569
 
    cmd->execute();
1570
 
    //getPart() ->addCommand( cmd );
1571
 
    QApplication::restoreOverrideCursor();
1572
 
    slotUpdate();
1573
 
}
 
1539
//    m_calculationcommands.insert( sm, cmd );
1574
1540
 
1575
 
void View::slotCalculationStarted( Project *project, ScheduleManager *sm )
1576
 
{
1577
 
    //qDebug()<<"View::slotCalculationStarted:"<<sm<<sm->name();
1578
1541
    if ( m_progressBarTimer.isActive() ) {
1579
1542
        m_progressBarTimer.stop();
1580
1543
        removeProgressBarItems();
1581
1544
    }
1582
 
    removeStatusBarItem( m_estlabel );
1583
 
    if ( sm == currentScheduleManager() ) {
1584
 
        connect( project, SIGNAL( projectCalculated( ScheduleManager* ) ), this, SLOT( slotProjectCalculated( ScheduleManager* ) ) );
1585
 
    }
1586
 
    if ( sm == currentScheduleManager() ) {
1587
 
        connect( project, SIGNAL( projectCalculated( ScheduleManager* ) ), this, SLOT( slotProjectCalculated( ScheduleManager* ) ) );
1588
 
    }
1589
 
    m_text = new QLabel( i18nc( "@info:status 1=schedule name", "%1: Calculating...", sm->name() ) );
1590
 
    addStatusBarItem( m_text, 0, true );
 
1545
//    removeStatusBarItem( m_estlabel );
 
1546
    if ( sm == currentScheduleManager() ) {
 
1547
        connect( project, SIGNAL( projectCalculated( ScheduleManager* ) ), this, SLOT( slotProjectCalculated( ScheduleManager* ) ) );
 
1548
    }
 
1549
    if ( sm == currentScheduleManager() ) {
 
1550
        connect( project, SIGNAL( projectCalculated( ScheduleManager* ) ), this, SLOT( slotProjectCalculated( ScheduleManager* ) ) );
 
1551
    }
 
1552
//    m_text = new QLabel( i18nc( "@info:status 1=schedule name", "%1: Calculating...", sm->name() ) );
 
1553
//    addStatusBarItem( m_text, 0, true );
1591
1554
    m_progress = new QProgressBar();
1592
1555
    m_progress->setMaximumHeight(statusBar()->fontMetrics().height());
1593
 
    addStatusBarItem( m_progress, 0, true );
1594
 
    
1595
 
    connect( project, SIGNAL( maxProgress( int ) ), m_progress, SLOT( setMaximum( int ) ) );
1596
 
    connect( project, SIGNAL( sigProgress( int ) ), m_progress, SLOT( setValue( int ) ) );
 
1556
//    addStatusBarItem( m_progress, 0, true );
 
1557
 
 
1558
    connect( project, SIGNAL( maxProgress( int ) ), this, SLOT( slotMaxProgress( int ) ) );
 
1559
    connect( project, SIGNAL( sigProgress( int ) ), this, SLOT( slotSetProgress( int ) ) );
1597
1560
    connect( project, SIGNAL( sigCalculationFinished( Project*, ScheduleManager* ) ), this, SLOT( slotCalculationFinished( Project*, ScheduleManager* ) ) );
 
1561
 
 
1562
    CalculateScheduleCmd *cmd =  new CalculateScheduleCmd( *project, sm, i18nc( "@info:status 1=schedule name", "Calculate %1", sm->name() ) );
 
1563
    getPart() ->addCommand( cmd );
 
1564
    slotUpdate();
 
1565
}
 
1566
 
 
1567
void View::slotMaxProgress( int p )
 
1568
{
 
1569
    if ( m_progress ) {
 
1570
        m_progress->setMaximum( p );
 
1571
    }
 
1572
}
 
1573
void View::slotSetProgress( int p )
 
1574
{
 
1575
    if ( m_progress ) {
 
1576
        m_progress->setValue( p );
 
1577
    }
 
1578
}
 
1579
 
 
1580
void View::slotCalculationStarted( Project */*project*/, ScheduleManager */*sm */)
 
1581
{
1598
1582
}
1599
1583
 
1600
1584
void View::slotCalculationFinished( Project *project, ScheduleManager *sm )
1601
1585
{
1602
1586
    switch ( sm->calculationResult() ) {
1603
1587
        case ScheduleManager::CalculationStopped:
1604
 
            m_text->setText( i18nc( "@info:status 1=schedule name", "%1: Calculation stopped", sm->name() ) );
 
1588
            //m_text->setText( i18nc( "@info:status 1=schedule name", "%1: Calculation stopped", sm->name() ) );
1605
1589
            break;
1606
1590
        case ScheduleManager::CalculationCanceled:
1607
 
            m_text->setText( i18nc( "@info:status 1=schedule name", "%1: Calculation canceled", sm->name() ) );
 
1591
            //m_text->setText( i18nc( "@info:status 1=schedule name", "%1: Calculation canceled", sm->name() ) );
1608
1592
            break;
1609
1593
        case ScheduleManager::CalculationError:
1610
 
            m_text->setText( i18nc( "@info:status 1=schedule name", "%1: Calculation error", sm->name() ) );
 
1594
            //m_text->setText( i18nc( "@info:status 1=schedule name", "%1: Calculation error", sm->name() ) );
1611
1595
            break;
1612
1596
        default: {
1613
 
            m_text->setText( i18nc( "@info:status 1=schedule name", "%1: Calculating done", sm->name() ) );
 
1597
            //m_text->setText( i18nc( "@info:status 1=schedule name", "%1: Calculation done", sm->name() ) );
1614
1598
            // if multiple views open, only the view that started calculation has a cmd
1615
 
            if ( m_calculationcommands.contains( sm ) ) {
1616
 
                CalculateScheduleCmd *cmd = m_calculationcommands.value( sm );
1617
 
                m_calculationcommands.remove( sm );
1618
 
                Q_ASSERT( cmd );
1619
 
                MacroCommand *m = new MacroCommand( cmd->text() );
1620
 
                getPart()->addCommand( m );
1621
 
                m->addCommand( cmd );
1622
 
            }
1623
1599
            break;
1624
1600
        }
1625
1601
    }
1626
 
    // if command is not used, clean up
1627
 
    if ( m_calculationcommands.contains( sm ) ) {
1628
 
        // let command finish before we delete it!
1629
 
        m_undocommands.append( m_calculationcommands.value( sm ) );
1630
 
        m_calculationcommands.remove( sm );
1631
 
        QTimer::singleShot( 0, this, SLOT( slotRemoveCommands() ) ); 
 
1602
    if ( m_progress ) {
 
1603
        //m_progressBarTimer.start( 2000 );
1632
1604
    }
 
1605
 
1633
1606
    disconnect( project, SIGNAL( sigProgress( int ) ), m_progress, SLOT(setValue( int ) ) );
1634
1607
    disconnect( project, SIGNAL( maxProgress( int ) ), m_progress, SLOT( setMaximum( int ) ) );
1635
1608
    disconnect( project, SIGNAL( sigCalculationFinished( Project*, ScheduleManager* ) ), this, SLOT( slotCalculationFinished( Project*, ScheduleManager* ) ) );
1636
 
    sm->setScheduling( false );
1637
 
    m_progressBarTimer.start( 2000 );
1638
 
 
1639
1609
    disconnect( project, SIGNAL( projectCalculated( ScheduleManager* ) ), this, SLOT( slotProjectCalculated( ScheduleManager* ) ) );
1640
1610
}
1641
1611
 
1686
1656
        return;
1687
1657
    }
1688
1658
    ScheduleManager *sm = project->createScheduleManager();
1689
 
    AddScheduleManagerCmd *cmd =  new AddScheduleManagerCmd( *project, sm, i18n( "Add schedule %1", sm->name() ) );
 
1659
    AddScheduleManagerCmd *cmd =  new AddScheduleManagerCmd( *project, sm, -1, i18n( "Add schedule %1", sm->name() ) );
1690
1660
    getPart() ->addCommand( cmd );
1691
1661
}
1692
1662
 
1836
1806
/*    connect(dialog, SIGNAL(settingsChanged(const QString&)), mainWidget, SLOT(loadSettings()));
1837
1807
    connect(dialog, SIGNAL(settingsChanged(const QString&)), this, SLOT(loadSettings()));*/
1838
1808
    dialog->show();
1839
 
    
 
1809
 
1840
1810
}
1841
1811
 
1842
1812
void View::slotIntroduction()
2460
2430
        }
2461
2431
        return;
2462
2432
    }
2463
 
    int num = 0;
 
2433
//    int num = 0;
2464
2434
    MacroCommand *cmd = 0, *rc = 0, *gc = 0;
2465
2435
    foreach ( QObject *o, lst ) {
2466
2436
        Resource *r = qobject_cast<Resource*>( o );
2611
2581
void View::slotCreateReport()
2612
2582
{
2613
2583
    ReportView v( getPart(), 0 );
2614
 
    ReportDesignDialog *dlg = new ReportDesignDialog( &(getProject()), currentScheduleManager(), QDomElement(), v.reportModels(), this );
 
2584
    ReportDesignDialog *dlg = new ReportDesignDialog( &(getProject()), currentScheduleManager(), QDomElement(), v.createReportModels( &getProject(), currentScheduleManager() ), this );
2615
2585
    // The ReportDesignDialog can not know how to create and insert views,
2616
2586
    // so faciclitate this in the slotCreateReportView() slot.
2617
2587
    connect( dlg, SIGNAL( createReportView(ReportDesignDialog* ) ), SLOT( slotCreateReportView(ReportDesignDialog*)));
2682
2652
    dlg->activateWindow();
2683
2653
}
2684
2654
 
2685
 
void View::slotReportDesignFinished( int result )
 
2655
void View::slotReportDesignFinished( int /*result */)
2686
2656
{
2687
2657
    if ( sender() ) {
2688
2658
        sender()->deleteLater();
2972
2942
    s += "<select-from resourceassignments=\"unchecked\" tasks=\"unchecked\" taskstatus=\"checked\" resourcesandgroups=\"unchecked\" />";
2973
2943
    s += "</data-source>";
2974
2944
    s += "<report:content xmlns:report=\"http://kexi-project.org/report/2.0\" xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" >";
2975
 
    s += "<report:title>Report</report:title>";
 
2945
    s += "<report:title>" + i18n( "Report" ) + "</report:title>";
2976
2946
    s += "<report:script report:script-interpreter=\"javascript\" ></report:script>";
2977
2947
    s += "<report:grid report:grid-divisions=\"4\" report:grid-snap=\"1\" report:page-unit=\"cm\" report:grid-visible=\"1\" />";
2978
2948
    s += "<report:page-style report:print-orientation=\"portrait\" fo:margin-bottom=\"1,00cm\" fo:margin-top=\"1,00cm\" fo:margin-left=\"1,00cm\" fo:margin-right=\"1,00cm\" report:page-size=\"A4\" >predefined</report:page-style>";
2982
2952
    s += "<report:text-style fo:font-weight=\"bold\" fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"10\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
2983
2953
    s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
2984
2954
    s += "</report:field>";
2985
 
    s += "<report:label report:name=\"label16\" report:horizontal-align=\"left\" svg:x=\"13cm\" svg:width=\"2.5cm\" svg:y=\"0cm\" report:caption=\"Manager:\" report:vertical-align=\"center\" svg:height=\"0.4cm\" report:z-index=\"0\" >";
 
2955
    s += "<report:label report:name=\"label16\" report:horizontal-align=\"left\" svg:x=\"13cm\" svg:width=\"2.5cm\" svg:y=\"0cm\" report:caption=\"" + i18nc( "Project manager", "Manager:" ) + "\" report:vertical-align=\"center\" svg:height=\"0.4cm\" report:z-index=\"0\" >";
2986
2956
    s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:font-style=\"italic\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
2987
2957
    s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
2988
2958
    s += "</report:label>";
2990
2960
    s += "<report:text-style fo:font-weight=\"bold\" fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"10\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
2991
2961
    s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
2992
2962
    s += "</report:field>";
2993
 
    s += "<report:label report:name=\"label18\" report:horizontal-align=\"left\" svg:x=\"0cm\" svg:width=\"2.5cm\" svg:y=\"0cm\" report:caption=\"Project:\" report:vertical-align=\"center\" svg:height=\"0.4cm\" report:z-index=\"0\" >";
 
2963
    s += "<report:label report:name=\"label18\" report:horizontal-align=\"left\" svg:x=\"0cm\" svg:width=\"2.5cm\" svg:y=\"0cm\" report:caption=\"" + i18n( "Project:" ) + "\" report:vertical-align=\"center\" svg:height=\"0.4cm\" report:z-index=\"0\" >";
2994
2964
    s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:font-style=\"italic\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
2995
2965
    s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
2996
2966
    s += "</report:label>";
2999
2969
    s += "</report:line>";
3000
2970
    s += "</report:section>";
3001
2971
    s += "<report:section svg:height=\"1,50cm\" fo:background-color=\"#ffffff\" report:section-type=\"header-report\" >";
3002
 
    s += "<report:label report:name=\"label17\" report:horizontal-align=\"left\" svg:x=\"0cm\" svg:width=\"18.25cm\" svg:y=\"0cm\" report:caption=\"Task Status Report\" report:vertical-align=\"center\" svg:height=\"1.25cm\" report:z-index=\"0\" >";
 
2972
    s += "<report:label report:name=\"label17\" report:horizontal-align=\"left\" svg:x=\"0cm\" svg:width=\"18.25cm\" svg:y=\"0cm\" report:caption=\"" + i18n( "Task Status Report" ) + "\" report:vertical-align=\"center\" svg:height=\"1.25cm\" report:z-index=\"0\" >";
3003
2973
    s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"10\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
3004
2974
    s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
3005
2975
    s += "</report:label>";
3013
2983
    s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
3014
2984
    s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
3015
2985
    s += "</report:field>";
3016
 
    s += "<report:label report:name=\"label12\" report:horizontal-align=\"center\" svg:x=\"7.5cm\" svg:width=\"0.75cm\" svg:y=\"0.25cm\" report:caption=\"of\" report:vertical-align=\"center\" svg:height=\"0.75cm\" report:z-index=\"0\" >";
 
2986
    s += "<report:label report:name=\"label12\" report:horizontal-align=\"center\" svg:x=\"7.5cm\" svg:width=\"0.75cm\" svg:y=\"0.25cm\" report:caption=\"" + i18nc( "As in: Page 1 of 2", "of" ) + "\" report:vertical-align=\"center\" svg:height=\"0.75cm\" report:z-index=\"0\" >";
3017
2987
    s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:font-style=\"italic\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
3018
2988
    s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
3019
2989
    s += "</report:label>";
3020
 
    s += "<report:label report:name=\"label13\" report:horizontal-align=\"right\" svg:x=\"5.75cm\" svg:width=\"1cm\" svg:y=\"0.25cm\" report:caption=\"Page\" report:vertical-align=\"center\" svg:height=\"0.75cm\" report:z-index=\"0\" >";
 
2990
    s += "<report:label report:name=\"label13\" report:horizontal-align=\"right\" svg:x=\"5.75cm\" svg:width=\"1cm\" svg:y=\"0.25cm\" report:caption=\"" + i18n( "Page" ) + "\" report:vertical-align=\"center\" svg:height=\"0.75cm\" report:z-index=\"0\" >";
3021
2991
    s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:font-style=\"italic\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
3022
2992
    s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
3023
2993
    s += "</report:label>";
3028
2998
    s += "<report:detail>";
3029
2999
    s += "<report:group report:group-sort=\"ascending\" report:group-column=\"Parent\" >";
3030
3000
    s += "<report:section svg:height=\"2,50cm\" fo:background-color=\"#ffffff\" report:section-type=\"group-header\" >";
3031
 
    s += "<report:label report:name=\"label6\" report:horizontal-align=\"left\" svg:x=\"0.5cm\" svg:width=\"3.75cm\" svg:y=\"1.75cm\" report:caption=\"Name\" report:vertical-align=\"center\" svg:height=\"0.75cm\" report:z-index=\"0\" >";
 
3001
    s += "<report:label report:name=\"label6\" report:horizontal-align=\"left\" svg:x=\"0.5cm\" svg:width=\"3.75cm\" svg:y=\"1.75cm\" report:caption=\"" + i18nc( "Task name", "Name" ) + "\" report:vertical-align=\"center\" svg:height=\"0.75cm\" report:z-index=\"0\" >";
3032
3002
        s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
3033
3003
        s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
3034
3004
    s += "</report:label>";
3036
3006
        s += "<report:text-style fo:font-weight=\"bold\" fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
3037
3007
        s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
3038
3008
    s += "</report:field>";
3039
 
    s += "<report:label report:name=\"label8\" report:horizontal-align=\"center\" svg:x=\"4.25cm\" svg:width=\"4.25cm\" svg:y=\"1.75cm\" report:caption=\"Completion (%)\" report:vertical-align=\"center\" svg:height=\"0.75cm\" report:z-index=\"0\" >";
 
3009
    s += "<report:label report:name=\"label8\" report:horizontal-align=\"center\" svg:x=\"4.25cm\" svg:width=\"4.25cm\" svg:y=\"1.75cm\" report:caption=\"" + i18nc( "Task completion", "Completion (%)" ) + "\" report:vertical-align=\"center\" svg:height=\"0.75cm\" report:z-index=\"0\" >";
3040
3010
        s += "<report:text-style fo:letter-spacing=\"0%\" style:letter-kerning=\"true\" fo:font-size=\"8\" fo:foreground-color=\"#000000\" fo:font-family=\"DejaVu Sans\" fo:background-color=\"#ffffff\" fo:background-opacity=\"100%\" />";
3041
3011
        s += "<report:line-style report:line-style=\"nopen\" report:line-weight=\"1\" report:line-color=\"#000000\" />";
3042
3012
    s += "</report:label>";
3090
3060
    QDate date = QDate::currentDate();
3091
3061
    KDateTime z( date, QTime(0,0,0), KDateTime::UTC );
3092
3062
    KDateTime t( date, QTime(0,0,0), KDateTime::LocalZone );
3093
 
    
 
3063
 
3094
3064
    qDebug()<<"Offset:"<<date<<z<<t<<z.secsTo_long( t );
3095
3065
    getPart() ->getProject().printCalendarDebug( "" );
3096
3066
}