Moved CAF to Fwk/AppFwk and moved/renamed VisualizationModules to Fwk/VizFwk

This commit is contained in:
sigurdp
2013-09-20 16:01:20 +02:00
parent 7ea10201ec
commit f64d9b7e64
505 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
cmake_minimum_required (VERSION 2.8)
project (cafPdmCvf)
include_directories(
${cafProjectDataModel_SOURCE_DIR}
${cafUserInterface_SOURCE_DIR}
)
add_library( ${PROJECT_NAME}
cafPdmFieldCvfColor.cpp
cafPdmFieldCvfColor.h
cafPdmFieldCvfMat4d.cpp
cafPdmFieldCvfMat4d.h
)

View File

@@ -0,0 +1,66 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include <QTextStream>
#include "cvfBase.h"
// Includes needed for field editor registration
#include "cvfColor3.h"
#include "cafPdmUiColorEditor.h"
#include "cafPdmField.h"
CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR(caf::PdmUiColorEditor, cvf::Color3f);
void operator >> (QTextStream& str, cvf::Color3f& value)
{
QString text;
double r, g, b;
str >> r;
str >> g;
str >> b;
value.set(r, g, b);
}
void operator << (QTextStream& str, const cvf::Color3f& value)
{
str << value.r() << " " << value.g() << " " << value.b();
}

View File

@@ -0,0 +1,98 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <QVariant>
#include <QList>
#include <QTextStream>
#include "cafPdmFieldImpl.h"
#include "cvfBase.h"
#include "cvfColor3.h"
namespace caf
{
// Forward declarations
template <typename T> class PdmField;
//==================================================================================================
/// Partial specialization for PdmField< cvf::Color3f >
//==================================================================================================
template <>
class PdmFieldTypeSpecialization < cvf::Color3f >
{
public:
/// Convert the field value into a QVariant
static QVariant convert(const cvf::Color3f& value)
{
QColor col;
col.setRgbF(value.r(), value.g(), value.b());
return col;
}
/// Set the field value from a QVariant
static void setFromVariant(const QVariant& variantValue, cvf::Color3f& value)
{
QColor col = variantValue.value<QColor>();
value.set(col.redF(), col.greenF(), col.blueF());
}
/// Methods to get a list of options for a field
static QList<PdmOptionItemInfo> valueOptions( bool* useOptionsOnly, const cvf::Color3f& )
{
return QList<PdmOptionItemInfo>();
}
/// Methods to retrieve the possible PdmObject pointed to by a field
static void childObjects(const PdmField< cvf::Color3f >& field, std::vector<PdmObject*>* objects)
{ }
};
}
//==================================================================================================
/// QTextStream Stream operator for cvf::Color3f
//==================================================================================================
void operator >> (QTextStream& str, cvf::Color3f& value);
void operator << (QTextStream& str, const cvf::Color3f& value);

View File

@@ -0,0 +1,71 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#include <QTextStream>
// Includes needed for field editor registration
#include "cvfAssert.h"
#include "cvfMatrix4.h"
//#include "cafPdmUiMatrixEditor.h"
//#include "cafPdmField.h"
//CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR(caf::PdmUiMatrixEditor, cvf::Mat4d);
void operator >> (QTextStream& str, cvf::Mat4d& value)
{
for (int r = 0; r < 4 ; ++r)
{
for (int c = 0; c < 4 ; ++c)
{
str >> value(r, c);
}
}
}
void operator << (QTextStream& str, const cvf::Mat4d& value)
{
for (int r = 0; r < 4 ; ++r)
{
for (int c = 0; c < 4 ; ++c)
{
str << value(r, c) << " " ;
}
}
}

View File

@@ -0,0 +1,99 @@
//##################################################################################################
//
// Custom Visualization Core library
// Copyright (C) 2011-2013 Ceetron AS
//
// This library may be used under the terms of either the GNU General Public License or
// the GNU Lesser General Public License as follows:
//
// GNU General Public License Usage
// This library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <<http://www.gnu.org/licenses/gpl.html>>
// for more details.
//
// GNU Lesser General Public License Usage
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
// for more details.
//
//##################################################################################################
#pragma once
#include <QVariant>
#include <QList>
//#include <QStringList>
//#include <QXmlStreamReader>
//#include <QXmlStreamWriter>
#include <QTextStream>
//#include "cafPdmUiItem.h"
//#include "cafPdmObjectFactory.h"
#include "cafPdmFieldImpl.h"
#include "cvfAssert.h"
#include "cvfMatrix4.h"
namespace caf
{
// Forward declarations
template <typename T> class PdmField;
//==================================================================================================
/// Partial specialization for PdmField< cvf::Mat4d >
//==================================================================================================
template <>
class PdmFieldTypeSpecialization < cvf::Mat4d >
{
public:
/// Convert the field value into a QVariant
static QVariant convert(const cvf::Mat4d& value)
{
return QVariant();
}
/// Set the field value from a QVariant
static void setFromVariant(const QVariant& variantValue, cvf::Mat4d& value)
{
}
/// Methods to get a list of options for a field
static QList<PdmOptionItemInfo> valueOptions( bool* useOptionsOnly, const cvf::Mat4d& )
{
return QList<PdmOptionItemInfo>();
}
/// Methods to retrieve the possible PdmObject pointed to by a field
static void childObjects(const PdmField< cvf::Mat4d >& field, std::vector<PdmObject*>* objects)
{ }
};
}
//==================================================================================================
/// QTextStream Stream operator for cvf::Color3f
//==================================================================================================
void operator >> (QTextStream& str, cvf::Mat4d& value);
void operator << (QTextStream& str, const cvf::Mat4d& value);