Qt4/Qt5 neutral changes:
+ move meta types to own header to avoid double declaration
This commit is contained in:
parent
d2cb4e4af9
commit
07943d2a9a
|
@ -1046,6 +1046,7 @@ SET(FreeCADGui_SRCS
|
|||
InventorAll.h
|
||||
Macro.h
|
||||
MergeDocuments.h
|
||||
MetaTypes.h
|
||||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
Qt4All.h
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <App/Property.h>
|
||||
#include <App/Expression.h>
|
||||
#include <Base/Parameter.h>
|
||||
#include <Base/Quantity.h>
|
||||
#include <Gui/MetaTypes.h>
|
||||
#include "Widgets.h"
|
||||
#include "Window.h"
|
||||
#include "SpinBox.h"
|
||||
|
|
38
src/Gui/MetaTypes.h
Normal file
38
src/Gui/MetaTypes.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/***************************************************************************
|
||||
* Copyright (c) 2016 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef GUI_METATYPES_H
|
||||
#define GUI_METATYPES_H
|
||||
|
||||
#include <Base/Vector3D.h>
|
||||
#include <Base/Matrix.h>
|
||||
#include <Base/Placement.h>
|
||||
#include <Base/Quantity.h>
|
||||
|
||||
Q_DECLARE_METATYPE(Base::Vector3f)
|
||||
Q_DECLARE_METATYPE(Base::Vector3d)
|
||||
Q_DECLARE_METATYPE(Base::Matrix4D)
|
||||
Q_DECLARE_METATYPE(Base::Placement)
|
||||
Q_DECLARE_METATYPE(Base::Quantity)
|
||||
Q_DECLARE_METATYPE(QList<Base::Quantity>)
|
||||
|
||||
#endif // GUI_METATYPES_H
|
|
@ -25,7 +25,7 @@
|
|||
#define GUI_QUANTITYSPINBOX_H
|
||||
|
||||
#include <QAbstractSpinBox>
|
||||
#include <Base/Quantity.h>
|
||||
#include <Gui/MetaTypes.h>
|
||||
#include "ExpressionBinding.h"
|
||||
|
||||
#ifdef Q_MOC_RUN
|
||||
|
|
|
@ -38,13 +38,16 @@
|
|||
#include <App/PropertyStandard.h>
|
||||
#include <Gui/Widgets.h>
|
||||
#include <Gui/ExpressionBinding.h>
|
||||
#include <Gui/MetaTypes.h>
|
||||
|
||||
#ifdef Q_MOC_RUN
|
||||
Q_DECLARE_METATYPE(Base::Vector3f)
|
||||
Q_DECLARE_METATYPE(Base::Vector3d)
|
||||
Q_DECLARE_METATYPE(Base::Matrix4D)
|
||||
Q_DECLARE_METATYPE(Base::Placement)
|
||||
Q_DECLARE_METATYPE(Base::Quantity)
|
||||
Q_DECLARE_METATYPE(QList<Base::Quantity>)
|
||||
#endif
|
||||
|
||||
namespace Gui {
|
||||
namespace Dialog { class TaskPlacement; }
|
||||
|
|
|
@ -76,8 +76,6 @@
|
|||
|
||||
using namespace PartGui;
|
||||
|
||||
Q_DECLARE_METATYPE(Base::Quantity)
|
||||
|
||||
FilletRadiusDelegate::FilletRadiusDelegate(QObject *parent) : QItemDelegate(parent)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include <Base/Tools.h>
|
||||
|
||||
#include <Gui/propertyeditor/PropertyItem.h>
|
||||
#include <Gui/MetaTypes.h>
|
||||
#include "../App/PropertyConstraintList.h"
|
||||
#include "PropertyConstraintListItem.h"
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
using namespace SketcherGui;
|
||||
using namespace Gui::PropertyEditor;
|
||||
|
||||
TYPESYSTEM_SOURCE(SketcherGui::PropertyConstraintListItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(SketcherGui::PropertyConstraintListItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyConstraintListItem::PropertyConstraintListItem()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user