[pkg-xtuple-maintainers] [openrpt] 01/02: Imported Upstream version 3.3.7

Daniel Pocock pocock at moszumanska.debian.org
Sat Oct 18 14:51:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

pocock pushed a commit to branch debian-experimental
in repository openrpt.

commit 64b2f60473d48cf76c8cfa70ee679b0c2d2d4b33
Author: Daniel Pocock <daniel at pocock.pro>
Date:   Sat Oct 18 16:44:55 2014 +0200

    Imported Upstream version 3.3.7
---
 OpenRPT/Dmtx_Library/Dmtx_Library.pro |  2 +-
 OpenRPT/renderapp/renderapp.pro       |  2 +-
 OpenRPT/renderer/orprerender.cpp      | 50 ++++++++++++++++++++++++++++-------
 OpenRPT/renderer/renderer.pro         |  2 +-
 OpenRPT/writer/writer.pro             |  2 +-
 OpenRPT/wrtembed/wrtembed.pro         |  2 +-
 common/data.cpp                       |  2 +-
 global.pri                            | 10 ++++++-
 8 files changed, 56 insertions(+), 16 deletions(-)

diff --git a/OpenRPT/Dmtx_Library/Dmtx_Library.pro b/OpenRPT/Dmtx_Library/Dmtx_Library.pro
index e0b9794..9ee5163 100644
--- a/OpenRPT/Dmtx_Library/Dmtx_Library.pro
+++ b/OpenRPT/Dmtx_Library/Dmtx_Library.pro
@@ -64,7 +64,7 @@ symbian {
     TARGET.UID3 = 0xE6F5730D
     TARGET.CAPABILITY = 
     TARGET.EPOCALLOWDLLDATA = 1
-    addFiles.sources = Dmtx_Library.dll
+    addFiles.sources = dmtx.dll
     addFiles.path = !:/sys/bin
     DEPLOYMENT += addFiles
 }
diff --git a/OpenRPT/renderapp/renderapp.pro b/OpenRPT/renderapp/renderapp.pro
index 9b17f30..bb0d8e8 100644
--- a/OpenRPT/renderapp/renderapp.pro
+++ b/OpenRPT/renderapp/renderapp.pro
@@ -32,7 +32,7 @@ MOC_DIR     = tmp
 UI_DIR      = tmp
 
 QMAKE_LIBDIR = ../../lib $$QMAKE_LIBDIR
-LIBS += -lrenderer -lopenrptcommon $$LIBDMTX -lMetaSQL
+LIBS += -lrenderer -lopenrptcommon -ldmtx -lMetaSQL
 
 win32-msvc* {
   PRE_TARGETDEPS += ../../lib/renderer.$${LIBEXT} \
diff --git a/OpenRPT/renderer/orprerender.cpp b/OpenRPT/renderer/orprerender.cpp
index 677e4fd..37c89ca 100644
--- a/OpenRPT/renderer/orprerender.cpp
+++ b/OpenRPT/renderer/orprerender.cpp
@@ -107,6 +107,8 @@ class ORPreRenderPrivate {
     bool _subtotContextPageFooter;
 
     bool populateData(const ORDataData &, orData &);
+    bool populateData(const ORDataData &, orData &, const QString&);
+    bool populateColorData(const ORDataData&, orData&);
     orQuery* getQuerySource(const QString &);
 
     void createNewPage();
@@ -117,8 +119,8 @@ class ORPreRenderPrivate {
     void renderDetailSection(ORDetailSectionData &);
     qreal renderSection(const ORSectionData &);
     qreal renderTextElements(QList<ORObject*> elemList, qreal sectionHeight);
-    void addTextPrimitive(ORObject *element, QPointF pos, QSizeF size, int align, QString text, QFont font = QFont());
-    QString evaluateField(ORFieldData* f);
+    void addTextPrimitive(ORObject *element, QPointF pos, QSizeF size, int align, QString text, QFont font = QFont(), QString color = QString());
+    QString evaluateField(ORFieldData* f, QString* outColorStr);
     qreal renderSectionSize(const ORSectionData &, bool = false);
 
     // Calculate the remaining space on the page after printing the footers and applying the margins
@@ -182,12 +184,17 @@ ORPreRenderPrivate::~ORPreRenderPrivate()
 
 bool ORPreRenderPrivate::populateData(const ORDataData & dataSource, orData &dataTarget)
 {
+  return populateData(dataSource, dataTarget, dataSource.column);
+}
+
+bool ORPreRenderPrivate::populateData(const ORDataData & dataSource, orData &dataTarget, const QString& column)
+{
   for(int queryCursor = 0; queryCursor < _lstQueries.count(); queryCursor++)
   {
     if(_lstQueries.at(queryCursor)->getName() == dataSource.query)
     {
       dataTarget.setQuery(_lstQueries.at(queryCursor));
-      dataTarget.setField(dataSource.column);
+      dataTarget.setField(column);
       return true;
     }
   }
@@ -195,6 +202,15 @@ bool ORPreRenderPrivate::populateData(const ORDataData & dataSource, orData &dat
   return false;
 }
 
+// Allow for query-based color information
+bool ORPreRenderPrivate::populateColorData(const ORDataData& dataSource, orData& dataTarget)
+{
+  QString designator = "qtforegroundrole";
+  QString column = dataSource.column + "_" + designator;
+
+  return populateData(dataSource, dataTarget, column);
+}
+
 orQuery* ORPreRenderPrivate::getQuerySource(const QString & qstrQueryName)
 {
   static orQuery emptyQuery;
@@ -753,10 +769,14 @@ qreal ORPreRenderPrivate::renderSection(const ORSectionData & sectionData)
           if (!xqry)
             break;
 
-		  if (xqry->isValid() || (nbOfCol == 1 && nbOfLines == 1))
-			addTextPrimitive(elemThis, QPointF(x, y), size, f->align, evaluateField(elemThis->toField()), f->font);
-		  else 
-			break;
+          if (xqry->isValid() || (nbOfCol == 1 && nbOfLines == 1))
+          {
+            QString colorStr = QString::null;
+            QString text = evaluateField(elemThis->toField(), &colorStr);
+            addTextPrimitive(elemThis, QPointF(x, y), size, f->align, text, f->font, colorStr);
+          }
+          else 
+            break;
 
           if(nbOfCol > 1 || nbOfLines > 1 || triggerPageBreak) {
             hasNext = xqry->next();
@@ -1096,7 +1116,7 @@ qreal ORPreRenderPrivate::renderTextElements(QList<ORObject*> elemList, qreal se
     return sectionHeight;
 }
 
-void ORPreRenderPrivate::addTextPrimitive(ORObject *element, QPointF pos, QSizeF size, int align, QString text, QFont font)
+void ORPreRenderPrivate::addTextPrimitive(ORObject *element, QPointF pos, QSizeF size, int align, QString text, QFont font, QString colorStr)
 {
   OROTextBox * tb = new OROTextBox(element);
   tb->setPosition(pos);
@@ -1105,6 +1125,12 @@ void ORPreRenderPrivate::addTextPrimitive(ORObject *element, QPointF pos, QSizeF
   tb->setText(text);
   tb->setFlags(align);
   tb->setRotation(element->rotation());
+
+  if (colorStr.length() > 0)
+  {
+    tb->setPen(QPen(QColor(colorStr)));
+  }
+
   _page->addPrimitive(tb);
 
   if(text == "page_count") {
@@ -1113,7 +1139,7 @@ void ORPreRenderPrivate::addTextPrimitive(ORObject *element, QPointF pos, QSizeF
 }
 
 
-QString ORPreRenderPrivate::evaluateField(ORFieldData* f)
+QString ORPreRenderPrivate::evaluateField(ORFieldData* f, QString* outColorStr)
 {
     orData       dataThis;
 
@@ -1153,6 +1179,12 @@ QString ORPreRenderPrivate::evaluateField(ORFieldData* f)
         }
     }
 
+    // Field coloring as a result of data.
+    if (populateColorData(f->data, dataThis))
+    {
+      *outColorStr = dataThis.getValue();
+    }
+
     // formatting
     if(f->format.length()>0)
     {
diff --git a/OpenRPT/renderer/renderer.pro b/OpenRPT/renderer/renderer.pro
index 03628f5..c69c4e5 100644
--- a/OpenRPT/renderer/renderer.pro
+++ b/OpenRPT/renderer/renderer.pro
@@ -30,7 +30,7 @@ OBJECTS_DIR = tmp
 UI_DIR = tmp
 
 QMAKE_LIBDIR = ../../lib $$QMAKE_LIBDIR
-LIBS += $$LIBDMTX -lopenrptcommon -lMetaSQL
+LIBS += -ldmtx -lopenrptcommon -lMetaSQL
 
 HEADERS = openreports.h \
           barcodes.h \
diff --git a/OpenRPT/writer/writer.pro b/OpenRPT/writer/writer.pro
index 7121a40..d0cb650 100644
--- a/OpenRPT/writer/writer.pro
+++ b/OpenRPT/writer/writer.pro
@@ -33,7 +33,7 @@ OBJECTS_DIR = tmp
 
 INCLUDEPATH += ../../common ../common ../images
 QMAKE_LIBDIR = ../../lib $$QMAKE_LIBDIR
-LIBS += -lwrtembed -lopenrptcommon -lrenderer $$LIBDMTX -lMetaSQL
+LIBS += -lwrtembed -lopenrptcommon -lrenderer -ldmtx -lMetaSQL
 
 win32-msvc* {
   PRE_TARGETDEPS += ../../lib/wrtembed.$${LIBEXT}       \
diff --git a/OpenRPT/wrtembed/wrtembed.pro b/OpenRPT/wrtembed/wrtembed.pro
index 9e84b61..202f5c2 100644
--- a/OpenRPT/wrtembed/wrtembed.pro
+++ b/OpenRPT/wrtembed/wrtembed.pro
@@ -33,7 +33,7 @@ QT += xml sql widgets printsupport
 #VERSION = 0.1.0
 
 QMAKE_LIBDIR = ../../lib $$QMAKE_LIBDIR
-LIBS += $$LIBDMTX -lopenrptcommon -lrenderer
+LIBS += -ldmtx -lopenrptcommon -lrenderer
 
 #The following line was changed from FORMS to FORMS3 by qt3to4
 FORMS   += labeleditor.ui \
diff --git a/common/data.cpp b/common/data.cpp
index 2433575..720215a 100644
--- a/common/data.cpp
+++ b/common/data.cpp
@@ -25,7 +25,7 @@
 QString OpenRPT::build     = QObject::tr("%1 %2").arg(__DATE__, __TIME__);
 QString OpenRPT::copyright = QObject::tr("Copyright (c) 2002-2014, OpenMFG, LLC.");
 bool    OpenRPT::loggedIn  = false;
-QString OpenRPT::version   = QObject::tr("3.3.4");
+QString OpenRPT::version   = QObject::tr("3.3.7");
 
 LanguageOptions OpenRPT::languages(0);
 
diff --git a/global.pri b/global.pri
index 5ebcc3b..9e6f96e 100644
--- a/global.pri
+++ b/global.pri
@@ -25,11 +25,19 @@
 #
 
 CONFIG += release dll
+# TEMPORARY HACK
+win32 {
+  CONFIG -= dll
+  CONFIG += staticlib
+}
 
 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
 
 LIBEXT = $${QMAKE_EXTENSION_SHLIB}
-isEmpty( LIBEXT ) { LIBEXT = so }
+isEmpty( LIBEXT ) {
+  win32:LIBEXT = a
+  unix:LIBEXT  = so
+}
 
 LIBDMTX = -ldmtx
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/openrpt.git



More information about the pkg-xtuple-maintainers mailing list