[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra] /: Reenable reports in Plan, using KReport
From:       Friedrich W. H. Kossebau <kossebau () kde ! org>
Date:       2015-08-31 23:40:03
Message-ID: E1ZWYgF-0001mo-Ag () scm ! kde ! org
[Download RAW message or body]

Git commit 18da645666d0801e779599d63a2ee7691e4b7d52 by Friedrich W. H. Kossebau.
Committed on 31/08/2015 at 23:38.
Pushed by kossebau into branch 'master'.

Reenable reports in Plan, using KReport

Fixes T450

M  +2    -0    CMakeLists.txt
M  +0    -16   plan/kptview.cpp
M  +2    -14   plan/kptviewlistdialog.cpp
M  +12   -16   plan/libs/ui/CMakeLists.txt
M  +1    -1    plan/libs/ui/reports/reportdata.cpp
M  +1    -1    plan/libs/ui/reports/reportdata.h

http://commits.kde.org/calligra/18da645666d0801e779599d63a2ee7691e4b7d52

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 174a7f3..cf8e549 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1026,6 +1026,8 @@ calligra_drop_product_on_bad_condition( APP_BRAINDUMP
 calligra_drop_product_on_bad_condition( APP_PLAN
     KGantt_FOUND "KGantt devel not found"
     KChart_FOUND "KChart devel not found"
+    KReport_FOUND "KReport not found"
+    KProperty_FOUND "KProperty not found"
 )
 
 calligra_drop_product_on_bad_condition( PLUGIN_CALLIGRAGEMINI_GIT
diff --git a/plan/kptview.cpp b/plan/kptview.cpp
index efc46ad..b724816 100644
--- a/plan/kptview.cpp
+++ b/plan/kptview.cpp
@@ -105,11 +105,8 @@
 #include "kptcolorsconfigpanel.h"
 #include "kptinsertfiledlg.h"
 #include "kpthtmlview.h"
-// QT5TODO: T450 reenable reports
-#if 0
 #include "reports/reportview.h"
 #include "reports/reportdata.h"
-#endif
 #include "about/aboutpage.h"
 #include "kptlocaleconfigmoneydialog.h"
 #include "kptflatproxymodel.h"
@@ -594,8 +591,6 @@ void View::createViews()
 
         ct = "Reports";
         cat = m_viewlist->addCategory( ct, defaultCategoryInfo( ct ).name );
-// QT5TODO: reenable reports
-#if 0
         // A little hack to get the user started...
         ReportView *rv = qobject_cast<ReportView*>( createReportView( cat, \
"ReportView", i18n( "Task Status Report" ), TIP_USE_DEFAULT_TEXT ) );  if ( rv ) {
@@ -603,7 +598,6 @@ void View::createViews()
             doc.setContent( standardTaskStatusReport() );
             rv->loadXML( doc );
         }
-#endif
     }
 }
 
@@ -1362,8 +1356,6 @@ ViewBase *View::createResourceAssignmentView( ViewListItem \
*cat, const QString &  
 ViewBase *View::createReportView( ViewListItem *cat, const QString &tag, const \
QString &name, const QString &tip, int index )  {
-// QT5TODO: reenable reports
-#if 0
     ReportView *v = new ReportView(getKoPart(), getPart(), m_tab );
     m_tab->addWidget( v );
 
@@ -1387,8 +1379,6 @@ ViewBase *View::createReportView( ViewListItem *cat, const \
                QString &tag, const Q
     connect( v, SIGNAL(guiActivated(ViewBase*,bool)), \
SLOT(slotGuiActivated(ViewBase*,bool)) );  v->updateReadWrite( m_readWrite );
     return v;
-#endif
-    return 0;
 }
 
 Project& View::getProject() const
@@ -2695,13 +2685,10 @@ void View::slotCreateReport()
 */
 void View::slotCreateReportView( ReportDesignDialog *dlg )
 {
-// QT5TODO: reenable reports
-#if 0
     QPointer<ViewListReportsDialog> vd = new ViewListReportsDialog( this, \
                *m_viewlist, dlg );
     connect( vd, SIGNAL(viewCreated(ViewBase*)), dlg, \
SLOT(slotViewCreated(ViewBase*)) );  vd->exec();
     delete vd;
-#endif
 }
 
 void View::slotOpenReportFile()
@@ -2728,8 +2715,6 @@ void View::slotOpenReportFileFinished( int result )
         KMessageBox::sorry( this, i18nc( "@info", "Cannot open \
file:<br/><filename>%1</filename>", fn ) );  return;
     }
-// QT5TODO: reenable reports
-#if 0
     QDomDocument doc;
     doc.setContent( &file );
     QDomElement e = doc.documentElement();
@@ -2742,7 +2727,6 @@ void View::slotOpenReportFileFinished( int result )
     dlg->show();
     dlg->raise();
     dlg->activateWindow();
-#endif
 }
 
 void View::slotReportDesignFinished( int /*result */)
diff --git a/plan/kptviewlistdialog.cpp b/plan/kptviewlistdialog.cpp
index 603f706..49459b62 100644
--- a/plan/kptviewlistdialog.cpp
+++ b/plan/kptviewlistdialog.cpp
@@ -21,10 +21,7 @@
 #include "kptviewlistdialog.h"
 #include "kptviewlist.h"
 #include "kptview.h"
-// QT5TODO: reenable reports
-#if 0
 #include "reports/reportview.h"
-#endif
 #include <kptdebug.h>
 
 #include <klocale.h>
@@ -91,11 +88,8 @@ AddViewPanel::AddViewPanel( View *view, ViewListWidget &viewlist, \
QWidget *paren  << "ResourceAppointmentsGanttView"
             << "AccountsView"
             << "ProjectStatusView"
-            << "PerformanceStatusView";
-// QT5TODO: reenable reports
-#if 0
+            << "PerformanceStatusView"
             << "ReportView";
-#endif
     QStringList lst;
     lst << i18n( "Resource Editor" )
             << i18n( "Task Editor" )
@@ -113,11 +107,8 @@ AddViewPanel::AddViewPanel( View *view, ViewListWidget \
&viewlist, QWidget *paren  << i18n( "Resource Assignments (Gantt)" )
             << i18n( "Cost Breakdown" )
             << i18n( "Project Performance Chart" )
-            << i18n( "Tasks Performance Chart" );
-// QT5TODO: reenable reports
-#if 0
+            << i18n( "Tasks Performance Chart" )
             << i18n( "Report" );
-#endif
 
     widget.viewtype->addItems( lst );
 
@@ -263,12 +254,9 @@ bool AddViewPanel::ok()
         case 16: { // Task Performance Chart
             v = m_view->createPerformanceStatusView( cat, m_viewtypes.value( \
viewtype ), widget.viewname->text(), widget.tooltip->text(), index );  break; }
-// QT5TODO: reenable reports
-#if 0
         case 17: { // Report view
             v = m_view->createReportView( cat, m_viewtypes.value( viewtype ), \
widget.viewname->text(), widget.tooltip->text(), index );  break; }
-#endif
         default:
             kError()<<"Unknown view type!";
             break;
diff --git a/plan/libs/ui/CMakeLists.txt b/plan/libs/ui/CMakeLists.txt
index 535a22d..efc654b 100644
--- a/plan/libs/ui/CMakeLists.txt
+++ b/plan/libs/ui/CMakeLists.txt
@@ -23,12 +23,11 @@ include_directories(
 ########### KPlato private library ###############
 
 set(kplatoui_LIB_SRCS
-# QT5TODO: reenable reports
-#     reports/reportview.cpp
-#     reports/reportdata.cpp
-#     reports/reportsourceeditor.cpp
-#     reports/reportscripts.cpp
-#     reports/reportexportpanel.cpp
+    reports/reportview.cpp
+    reports/reportdata.cpp
+    reports/reportsourceeditor.cpp
+    reports/reportscripts.cpp
+    reports/reportexportpanel.cpp
 
     kptganttitemdelegate.cpp
 
@@ -87,13 +86,12 @@ set(kplatoui_LIB_SRCS
     kptlocaleconfigmoneydialog.cpp
 )
 ki18n_wrap_ui(kplatoui_LIB_SRCS
-# QT5TODO: reenable reports
-#     reports/reportsourceeditor.ui
-#     reports/reportnavigator.ui
-#     reports/reportexportpanel.ui
-#     reports/reportsectionswidget.ui
-#     reports/reportgroupsectionswidget.ui
-#     reports/reporttoolswidget.ui
+    reports/reportsourceeditor.ui
+    reports/reportnavigator.ui
+    reports/reportexportpanel.ui
+    reports/reportsectionswidget.ui
+    reports/reportgroupsectionswidget.ui
+    reports/reporttoolswidget.ui
 
     kptresourceappointmentsdisplayoptions.ui
     kptganttchartdisplayoptions.ui
@@ -136,9 +134,7 @@ ki18n_wrap_ui(kplatoui_LIB_SRCS
 add_library(kplatoui SHARED ${kplatoui_LIB_SRCS})
 generate_export_header(kplatoui)
 
-# QT5TODO: reenable reports
-# set(KPLATO_REPORTS_LIBS KProperty KReport)
-target_link_libraries(kplatoui  ${KPLATO_REPORTS_LIBS} komain kplatokernel \
kplatomodels KChart KGantt KF5::KHtml ) +target_link_libraries(kplatoui komain \
kplatokernel kplatomodels KProperty KReport KChart KGantt KF5::KHtml )  \
if(KF5AkonadiContact_FOUND)  target_link_libraries(kplatoui KF5::AkonadiContact)
 endif()
diff --git a/plan/libs/ui/reports/reportdata.cpp \
b/plan/libs/ui/reports/reportdata.cpp index 1241cc3..133eb10 100644
--- a/plan/libs/ui/reports/reportdata.cpp
+++ b/plan/libs/ui/reports/reportdata.cpp
@@ -713,7 +713,7 @@ QStringList ChartReportData::fieldNames() const
     return names;
 }
 
-void ChartReportData::addExpression( const QString &field, const QVariant \
&/*value*/, int /*relation*/ ) +void ChartReportData::addExpression( const QString \
&field, const QVariant &/*value*/, char /*relation*/ )  {
 //     kDebug(planDbg())<<field<<value<<relation;
     QStringList lst = field.split( '=', QString::SkipEmptyParts );
diff --git a/plan/libs/ui/reports/reportdata.h b/plan/libs/ui/reports/reportdata.h
index 64b0408..0da8bcd 100644
--- a/plan/libs/ui/reports/reportdata.h
+++ b/plan/libs/ui/reports/reportdata.h
@@ -259,7 +259,7 @@ public:
     //!Return the list of field names, used for legends in a chart
     virtual QStringList fieldNames() const;
 
-    void addExpression( const QString &field, const QVariant &value, int relation = \
'=' ); +    void addExpression( const QString &field, const QVariant &value, char \
relation = '=' );  
     bool cbs;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic