mirror of https://github.com/KLayout/klayout.git
WIP: further refactoring of Qt binding libs
This commit is contained in:
parent
3b144259fd
commit
f1f9132d48
|
|
@ -3041,7 +3041,71 @@ END
|
|||
|
||||
end
|
||||
|
||||
def produce_makefile
|
||||
def produce_common_header
|
||||
|
||||
src_name = "gsi#{modn}Common.h"
|
||||
src_path = $gen_dir + "/" + src_name
|
||||
|
||||
File.open(src_path, "w") do |src|
|
||||
|
||||
src.puts("/**")
|
||||
src.puts(" * Common header for Qt binding definition library")
|
||||
src.puts(" *")
|
||||
src.puts(" * DO NOT EDIT THIS FILE. ")
|
||||
src.puts(" * This file has been created automatically")
|
||||
src.puts(" */")
|
||||
|
||||
src.puts("")
|
||||
src.puts("#include \"tlDefs.h\"")
|
||||
src.puts("")
|
||||
src.puts("#define FORCE_LINK_GSI_#{modn.upcase} static void force_link_gsi#{modn}_f () { extern int force_link_gsi#{modn}; force_link_gsi#{modn} = 0; }")
|
||||
src.puts("")
|
||||
src.puts("#if !defined(HDR_gsi#{modn}Common_h)")
|
||||
src.puts("# define HDR_gsi#{modn}Common_h")
|
||||
src.puts("")
|
||||
src.puts("# ifdef MAKE_GSI_#{modn.upcase}_LIBRARY")
|
||||
src.puts("# define GSI_#{modn.upcase}_PUBLIC DEF_INSIDE_PUBLIC")
|
||||
src.puts("# define GSI_#{modn.upcase}_PUBLIC_TEMPLATE DEF_INSIDE_PUBLIC_TEMPLATE")
|
||||
src.puts("# define GSI_#{modn.upcase}_LOCAL DEF_INSIDE_LOCAL")
|
||||
src.puts("# else")
|
||||
src.puts("# define GSI_#{modn.upcase}_PUBLIC DEF_OUTSIDE_PUBLIC")
|
||||
src.puts("# define GSI_#{modn.upcase}_PUBLIC_TEMPLATE DEF_OUTSIDE_PUBLIC_TEMPLATE")
|
||||
src.puts("# define GSI_#{modn.upcase}_LOCAL DEF_OUTSIDE_LOCAL")
|
||||
src.puts("# endif")
|
||||
src.puts("")
|
||||
src.puts("#endif")
|
||||
|
||||
puts("#{src_name} written.")
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def produce_main_source
|
||||
|
||||
src_name = "gsi#{modn}Main.cc"
|
||||
src_path = $gen_dir + "/" + src_name
|
||||
|
||||
File.open(src_path, "w") do |src|
|
||||
|
||||
src.puts("/**")
|
||||
src.puts(" * Main source file for Qt binding definition library")
|
||||
src.puts(" *")
|
||||
src.puts(" * DO NOT EDIT THIS FILE. ")
|
||||
src.puts(" * This file has been created automatically")
|
||||
src.puts(" */")
|
||||
|
||||
src.puts("")
|
||||
src.puts("int force_link_gsi#{modn} = 0;")
|
||||
src.puts("")
|
||||
|
||||
puts("#{src_name} written.")
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def produce_pri
|
||||
|
||||
makefile_name = modn + ".pri"
|
||||
makefile_path = $gen_dir + "/" + makefile_name
|
||||
|
|
@ -3055,12 +3119,17 @@ END
|
|||
makefile.puts("# This file has been created automatically")
|
||||
makefile.puts("#")
|
||||
|
||||
makefile.puts("")
|
||||
makefile.puts("SOURCES += \\")
|
||||
makefile.puts(" gsi#{modn}Main.cc \\")
|
||||
if @source_files
|
||||
makefile.puts("")
|
||||
makefile.puts("SOURCES += \\")
|
||||
makefile.puts(@source_files.collect { |s| " $$PWD/" + s }.join(" \\\n"))
|
||||
end
|
||||
|
||||
makefile.puts("")
|
||||
makefile.puts("HEADERS += gsi#{modn}Common.h")
|
||||
makefile.puts("")
|
||||
|
||||
puts("#{makefile_name} written.")
|
||||
|
||||
end
|
||||
|
|
@ -3110,13 +3179,21 @@ else
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
puts("Producing class list")
|
||||
bp.produce_class_list
|
||||
|
||||
puts("Producing type traits file ..")
|
||||
bp.produce_ttfile(conf)
|
||||
|
||||
puts("Producing .pro file ..")
|
||||
bp.produce_makefile
|
||||
puts("Producing main source file ..")
|
||||
bp.produce_main_source
|
||||
|
||||
puts("Producing common header file ..")
|
||||
bp.produce_common_header
|
||||
|
||||
puts("Producing .pri file ..")
|
||||
bp.produce_pri
|
||||
|
||||
puts("Producing external declarations ..")
|
||||
bp.produce_externals
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#
|
||||
|
||||
SOURCES += \
|
||||
gsiQtCoreMain.cc \
|
||||
$$PWD/gsiDeclQAbstractItemModel.cc \
|
||||
$$PWD/gsiDeclQAbstractListModel.cc \
|
||||
$$PWD/gsiDeclQAbstractTableModel.cc \
|
||||
|
|
@ -84,3 +85,6 @@ SOURCES += \
|
|||
$$PWD/gsiDeclQt_1.cc \
|
||||
$$PWD/gsiDeclQt_2.cc \
|
||||
$$PWD/gsiDeclQt_3.cc
|
||||
|
||||
HEADERS += gsiQtCoreCommon.h
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$QTBASIC_INC
|
|||
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
|
||||
|
||||
SOURCES += \
|
||||
gsiDeclQtCoreAdd.cc
|
||||
|
||||
HEADERS += \
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,178 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "gsiQt.h"
|
||||
|
||||
#include <QPair>
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <QPoint>
|
||||
#include <QColor>
|
||||
#include <QSize>
|
||||
|
||||
namespace gsi_qt
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// QVariant::Type implementation
|
||||
// (this type is not created automatically since QVariant is implemented implicitly)
|
||||
|
||||
class QVariant_Namespace { };
|
||||
|
||||
// A dummy namespace "QVariant"
|
||||
gsi::Class<QVariant_Namespace> decl_QVariant_Namespace ("Qt", "QVariant",
|
||||
gsi::Methods(),
|
||||
"@qt\n@brief This class represents the QVariant namespace");
|
||||
|
||||
static gsi::Enum<QVariant::Type> decl_QVariant_Type_Enum ("Qt", "QVariant_Type",
|
||||
gsi::enum_const ("Invalid", QVariant::Invalid, "@brief Enum constant QVariant::Invalid") +
|
||||
gsi::enum_const ("Bool", QVariant::Bool, "@brief Enum constant QVariant::Bool") +
|
||||
gsi::enum_const ("Int", QVariant::Int, "@brief Enum constant QVariant::Int") +
|
||||
gsi::enum_const ("UInt", QVariant::UInt, "@brief Enum constant QVariant::UInt") +
|
||||
gsi::enum_const ("LongLong", QVariant::LongLong, "@brief Enum constant QVariant::LongLong") +
|
||||
gsi::enum_const ("ULongLong", QVariant::ULongLong, "@brief Enum constant QVariant::ULongLong") +
|
||||
gsi::enum_const ("Double", QVariant::Double, "@brief Enum constant QVariant::Double") +
|
||||
gsi::enum_const ("Char", QVariant::Char, "@brief Enum constant QVariant::Char") +
|
||||
gsi::enum_const ("Map", QVariant::Map, "@brief Enum constant QVariant::Map") +
|
||||
gsi::enum_const ("List", QVariant::List, "@brief Enum constant QVariant::List") +
|
||||
gsi::enum_const ("String", QVariant::String, "@brief Enum constant QVariant::String") +
|
||||
gsi::enum_const ("StringList", QVariant::StringList, "@brief Enum constant QVariant::StringList") +
|
||||
gsi::enum_const ("ByteArray", QVariant::ByteArray, "@brief Enum constant QVariant::ByteArray") +
|
||||
gsi::enum_const ("BitArray", QVariant::BitArray, "@brief Enum constant QVariant::BitArray") +
|
||||
gsi::enum_const ("Date", QVariant::Date, "@brief Enum constant QVariant::Date") +
|
||||
gsi::enum_const ("Time", QVariant::Time, "@brief Enum constant QVariant::Time") +
|
||||
gsi::enum_const ("DateTime", QVariant::DateTime, "@brief Enum constant QVariant::DateTime") +
|
||||
gsi::enum_const ("Url", QVariant::Url, "@brief Enum constant QVariant::Url") +
|
||||
gsi::enum_const ("Locale", QVariant::Locale, "@brief Enum constant QVariant::Locale") +
|
||||
gsi::enum_const ("Rect", QVariant::Rect, "@brief Enum constant QVariant::Rect") +
|
||||
gsi::enum_const ("RectF", QVariant::RectF, "@brief Enum constant QVariant::RectF") +
|
||||
gsi::enum_const ("Size", QVariant::Size, "@brief Enum constant QVariant::Size") +
|
||||
gsi::enum_const ("SizeF", QVariant::SizeF, "@brief Enum constant QVariant::SizeF") +
|
||||
gsi::enum_const ("Line", QVariant::Line, "@brief Enum constant QVariant::Line") +
|
||||
gsi::enum_const ("LineF", QVariant::LineF, "@brief Enum constant QVariant::LineF") +
|
||||
gsi::enum_const ("Point", QVariant::Point, "@brief Enum constant QVariant::Point") +
|
||||
gsi::enum_const ("PointF", QVariant::PointF, "@brief Enum constant QVariant::PointF") +
|
||||
gsi::enum_const ("RegExp", QVariant::RegExp, "@brief Enum constant QVariant::RegExp") +
|
||||
gsi::enum_const ("Hash", QVariant::Hash, "@brief Enum constant QVariant::Hash") +
|
||||
gsi::enum_const ("LastCoreType", QVariant::LastCoreType, "@brief Enum constant QVariant::LastCoreType") +
|
||||
gsi::enum_const ("Font", QVariant::Font, "@brief Enum constant QVariant::Font") +
|
||||
gsi::enum_const ("Pixmap", QVariant::Pixmap, "@brief Enum constant QVariant::Pixmap") +
|
||||
gsi::enum_const ("Brush", QVariant::Brush, "@brief Enum constant QVariant::Brush") +
|
||||
gsi::enum_const ("Color", QVariant::Color, "@brief Enum constant QVariant::Color") +
|
||||
gsi::enum_const ("Palette", QVariant::Palette, "@brief Enum constant QVariant::Palette") +
|
||||
gsi::enum_const ("Icon", QVariant::Icon, "@brief Enum constant QVariant::Icon") +
|
||||
gsi::enum_const ("Image", QVariant::Image, "@brief Enum constant QVariant::Image") +
|
||||
gsi::enum_const ("Polygon", QVariant::Polygon, "@brief Enum constant QVariant::Polygon") +
|
||||
gsi::enum_const ("Region", QVariant::Region, "@brief Enum constant QVariant::Region") +
|
||||
gsi::enum_const ("Bitmap", QVariant::Bitmap, "@brief Enum constant QVariant::Bitmap") +
|
||||
gsi::enum_const ("Cursor", QVariant::Cursor, "@brief Enum constant QVariant::Cursor") +
|
||||
gsi::enum_const ("SizePolicy", QVariant::SizePolicy, "@brief Enum constant QVariant::SizePolicy") +
|
||||
gsi::enum_const ("KeySequence", QVariant::KeySequence, "@brief Enum constant QVariant::KeySequence") +
|
||||
gsi::enum_const ("Pen", QVariant::Pen, "@brief Enum constant QVariant::Pen") +
|
||||
gsi::enum_const ("TextLength", QVariant::TextLength, "@brief Enum constant QVariant::TextLength") +
|
||||
gsi::enum_const ("TextFormat", QVariant::TextFormat, "@brief Enum constant QVariant::TextFormat") +
|
||||
gsi::enum_const ("Matrix", QVariant::Matrix, "@brief Enum constant QVariant::Matrix") +
|
||||
gsi::enum_const ("Transform", QVariant::Transform, "@brief Enum constant QVariant::Transform") +
|
||||
gsi::enum_const ("Matrix4x4", QVariant::Matrix4x4, "@brief Enum constant QVariant::Matrix4x4") +
|
||||
gsi::enum_const ("Vector2D", QVariant::Vector2D, "@brief Enum constant QVariant::Vector2D") +
|
||||
gsi::enum_const ("Vector3D", QVariant::Vector3D, "@brief Enum constant QVariant::Vector3D") +
|
||||
gsi::enum_const ("Vector4D", QVariant::Vector4D, "@brief Enum constant QVariant::Vector4D") +
|
||||
gsi::enum_const ("Quaternion", QVariant::Quaternion, "@brief Enum constant QVariant::Quaternion") +
|
||||
gsi::enum_const ("LastGuiType", QVariant::LastGuiType, "@brief Enum constant QVariant::LastGuiType") +
|
||||
gsi::enum_const ("UserType", QVariant::UserType, "@brief Enum constant QVariant::UserType") +
|
||||
gsi::enum_const ("LastType", QVariant::LastType, "@brief Enum constant QVariant::LastType"),
|
||||
"@qt\n@brief This class represents the QVariant::Type enum");
|
||||
|
||||
static gsi::QFlagsClass<QVariant::Type> decl_QVariant_Type_Enums ("QVariant_QFlags_Type",
|
||||
"@qt\n@brief This class represents the QFlags<QVariant::Type> flag set");
|
||||
|
||||
// Inject the declarations into the parent
|
||||
static gsi::ClassExt<QVariant_Namespace> inject_QVariant_Type_Enum_in_parent (decl_QVariant_Type_Enum.defs ());
|
||||
static gsi::ClassExt<QVariant_Namespace> decl_QVariant_Type_Enum_as_child (decl_QVariant_Type_Enum, "Qt", "Type");
|
||||
static gsi::ClassExt<QVariant_Namespace> decl_QVariant_Type_Enums_as_child (decl_QVariant_Type_Enums, "Qt", "QFlags_Type");
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QString, QString>
|
||||
|
||||
gsi::Class<QPair<QString, QString> > decl_QString_QPair ("Qt", "QPair_QString_QString",
|
||||
qt_gsi::pair_decl<QString, QString>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QString, QString>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QByteArray, QByteArray>
|
||||
|
||||
gsi::Class<QPair<QByteArray, QByteArray> > decl_QByteArray_QPair ("Qt", "QPair_QByteArray_QByteArray",
|
||||
qt_gsi::pair_decl<QByteArray, QByteArray>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QString, QString>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<double, double>
|
||||
|
||||
gsi::Class<QPair<double, double> > decl_double_QPair ("Qt", "QPair_double_double",
|
||||
qt_gsi::pair_decl<double, double>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<double, double>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<double, QPointf>
|
||||
|
||||
gsi::Class<QPair<double, QPointF> > decl_double_QPointF_QPair ("Qt", "QPair_double_QPointF",
|
||||
qt_gsi::pair_decl<double, QPointF>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<double, QPointF>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<double, QColor>
|
||||
|
||||
gsi::Class<QPair<double, QColor> > decl_double_QColor_QPair ("Qt", "QPair_double_QColor",
|
||||
qt_gsi::pair_decl<double, QColor>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<double, QColor>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<int, int>
|
||||
|
||||
gsi::Class<QPair<int, int> > decl_int_int_QPair ("Qt", "QPair_int_int",
|
||||
qt_gsi::pair_decl<int, int>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<int, int>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QString, QSizeF>
|
||||
|
||||
gsi::Class<QPair<QString, QSizeF> > decl_QString_QSizeF_QPair ("Qt", "QPair_QString_QSizeF",
|
||||
qt_gsi::pair_decl<QString, QSizeF>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QString, QSizeF>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<double, QVariant>
|
||||
|
||||
gsi::Class<QPair<double, QVariant> > decl_double_QVariant_QPair ("Qt", "QPair_double_QVariant",
|
||||
qt_gsi::pair_decl<double, QVariant>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<double, QVariant>"
|
||||
);
|
||||
|
||||
}
|
||||
|
|
@ -1,28 +1,14 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common header for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
#include "tlDefs.h"
|
||||
|
||||
#define FORCE_LINK_GSI_QTCORE static void force_link_gsiQtCore_f () { extern int force_link_gsiQtCore; force_link_gsiQtCore = 0; }
|
||||
|
||||
#if !defined(HDR_gsiQtCoreCommon_h)
|
||||
# define HDR_gsiQtCoreCommon_h
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Main source file for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
int force_link_gsiQtCore = 0;
|
||||
|
||||
|
|
@ -6,5 +6,9 @@
|
|||
#
|
||||
|
||||
SOURCES += \
|
||||
gsiQtDesignerMain.cc \
|
||||
$$PWD/gsiDeclQAbstractFormBuilder.cc \
|
||||
$$PWD/gsiDeclQFormBuilder.cc
|
||||
|
||||
HEADERS += gsiQtDesignerCommon.h
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,14 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common header for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
#include "tlDefs.h"
|
||||
|
||||
#define FORCE_LINK_GSI_QTDESIGNER static void force_link_gsiQtDesigner_f () { extern int force_link_gsiQtDesigner; force_link_gsiQtDesigner = 0; }
|
||||
|
||||
#if !defined(HDR_gsiQtDesignerCommon_h)
|
||||
# define HDR_gsiQtDesignerCommon_h
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Main source file for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
int force_link_gsiQtDesigner = 0;
|
||||
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
#
|
||||
|
||||
SOURCES += \
|
||||
gsiQtGuiMain.cc \
|
||||
$$PWD/gsiDeclQAbstractButton.cc \
|
||||
$$PWD/gsiDeclQAbstractGraphicsShapeItem.cc \
|
||||
$$PWD/gsiDeclQAbstractItemDelegate.cc \
|
||||
|
|
@ -371,3 +372,6 @@ SOURCES += \
|
|||
$$PWD/gsiDeclQWindowsStyle.cc \
|
||||
$$PWD/gsiDeclQWizard.cc \
|
||||
$$PWD/gsiDeclQWizardPage.cc
|
||||
|
||||
HEADERS += gsiQtGuiCommon.h
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ DEPENDPATH += $$DB_INC
|
|||
LIBS += -lklayout_db
|
||||
|
||||
SOURCES += \
|
||||
gsiDeclQtGuiAdd.cc
|
||||
|
||||
HEADERS += \
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "gsiQt.h"
|
||||
|
||||
#include <QPair>
|
||||
#include <QAccessibleInterface>
|
||||
|
||||
namespace gsi_qt
|
||||
{
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QAccessibleInterface*, QAccessible::Relation>
|
||||
|
||||
gsi::Class<QPair<QAccessibleInterface*, QAccessible::Relation> > decl_QAccessibleInterfacePtr_Relation_QPair ("Qt", "QPair_QAccessibleInterfacePtr_QAccessible_Relation",
|
||||
qt_gsi::pair_decl<QAccessibleInterface*, QAccessible::Relation>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QAccessibleInterface*, QAccessible::Relation> >"
|
||||
);
|
||||
|
||||
}
|
||||
|
|
@ -1,28 +1,14 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common header for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
#include "tlDefs.h"
|
||||
|
||||
#define FORCE_LINK_GSI_QTGUI static void force_link_gsiQtGui_f () { extern int force_link_gsiQtGui; force_link_gsiQtGui = 0; }
|
||||
|
||||
#if !defined(HDR_gsiQtGuiCommon_h)
|
||||
# define HDR_gsiQtGuiCommon_h
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Main source file for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
int force_link_gsiQtGui = 0;
|
||||
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
#
|
||||
|
||||
SOURCES += \
|
||||
gsiQtNetworkMain.cc \
|
||||
$$PWD/gsiDeclQAbstractNetworkCache.cc \
|
||||
$$PWD/gsiDeclQAbstractSocket.cc \
|
||||
$$PWD/gsiDeclQAuthenticator.cc \
|
||||
|
|
@ -38,3 +39,6 @@ SOURCES += \
|
|||
$$PWD/gsiDeclQTcpSocket.cc \
|
||||
$$PWD/gsiDeclQUdpSocket.cc \
|
||||
$$PWD/gsiDeclQUrlInfo.cc
|
||||
|
||||
HEADERS += gsiQtNetworkCommon.h
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
|
|||
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
|
||||
|
||||
SOURCES += \
|
||||
gsiDeclQtNetworkAdd.cc
|
||||
|
||||
HEADERS += \
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "gsiQt.h"
|
||||
|
||||
#include <QPair>
|
||||
#include <QHostAddress>
|
||||
|
||||
namespace gsi_qt
|
||||
{
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QHostAddress, int>
|
||||
|
||||
gsi::Class<QPair<QHostAddress, int> > decl_QHostAddress_int_QPair ("Qt", "QPair_QHostAddress_int",
|
||||
qt_gsi::pair_decl<QHostAddress, int>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QHostAddress, int>"
|
||||
);
|
||||
|
||||
}
|
||||
|
|
@ -1,28 +1,14 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common header for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
#include "tlDefs.h"
|
||||
|
||||
#define FORCE_LINK_GSI_QTNETWORK static void force_link_gsiQtNetwork_f () { extern int force_link_gsiQtNetwork; force_link_gsiQtNetwork = 0; }
|
||||
|
||||
#if !defined(HDR_gsiQtNetworkCommon_h)
|
||||
# define HDR_gsiQtNetworkCommon_h
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Main source file for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
int force_link_gsiQtNetwork = 0;
|
||||
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
#
|
||||
|
||||
SOURCES += \
|
||||
gsiQtSqlMain.cc \
|
||||
$$PWD/gsiDeclQSql.cc \
|
||||
$$PWD/gsiDeclQSqlDatabase.cc \
|
||||
$$PWD/gsiDeclQSqlDriver.cc \
|
||||
|
|
@ -20,3 +21,6 @@ SOURCES += \
|
|||
$$PWD/gsiDeclQSqlRelationalTableModel.cc \
|
||||
$$PWD/gsiDeclQSqlResult.cc \
|
||||
$$PWD/gsiDeclQSqlTableModel.cc
|
||||
|
||||
HEADERS += gsiQtSqlCommon.h
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,14 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common header for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
#include "tlDefs.h"
|
||||
|
||||
#define FORCE_LINK_GSI_QTSQL static void force_link_gsiQtSql_f () { extern int force_link_gsiQtSql; force_link_gsiQtSql = 0; }
|
||||
|
||||
#if !defined(HDR_gsiQtSqlCommon_h)
|
||||
# define HDR_gsiQtSqlCommon_h
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Main source file for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
int force_link_gsiQtSql = 0;
|
||||
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
#
|
||||
|
||||
SOURCES += \
|
||||
gsiQtXmlMain.cc \
|
||||
$$PWD/gsiDeclQDomAttr.cc \
|
||||
$$PWD/gsiDeclQDomCDATASection.cc \
|
||||
$$PWD/gsiDeclQDomCharacterData.cc \
|
||||
|
|
@ -37,3 +38,6 @@ SOURCES += \
|
|||
$$PWD/gsiDeclQXmlParseException.cc \
|
||||
$$PWD/gsiDeclQXmlReader.cc \
|
||||
$$PWD/gsiDeclQXmlSimpleReader.cc
|
||||
|
||||
HEADERS += gsiQtXmlCommon.h
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,14 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common header for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
#include "tlDefs.h"
|
||||
|
||||
#define FORCE_LINK_GSI_QTXML static void force_link_gsiQtXml_f () { extern int force_link_gsiQtXml; force_link_gsiQtXml = 0; }
|
||||
|
||||
#if !defined(HDR_gsiQtXmlCommon_h)
|
||||
# define HDR_gsiQtXmlCommon_h
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Main source file for Qt binding definition library
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* This file has been created automatically
|
||||
*/
|
||||
|
||||
int force_link_gsiQtXml = 0;
|
||||
|
||||
|
|
@ -1,210 +0,0 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "gsiQt.h"
|
||||
|
||||
#include <QPair>
|
||||
#include <QString>
|
||||
#include <QPoint>
|
||||
#include <QColor>
|
||||
#include <QAccessibleInterface>
|
||||
#include <QHostAddress>
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Generic declarations for a pair
|
||||
|
||||
namespace qt_gsi
|
||||
{
|
||||
|
||||
template <class A, class B>
|
||||
struct pair_decl
|
||||
{
|
||||
static typename qt_gsi::Converter<A>::target_type pair_first(const QPair<A, B> *pair)
|
||||
{
|
||||
return qt_gsi::Converter<A>::toc (pair->first);
|
||||
}
|
||||
|
||||
static typename qt_gsi::Converter<B>::target_type pair_second(const QPair<A, B> *pair)
|
||||
{
|
||||
return qt_gsi::Converter<B>::toc (pair->second);
|
||||
}
|
||||
|
||||
static void pair_set_first(QPair<A, B> *pair, const typename qt_gsi::Converter<A>::target_type &s)
|
||||
{
|
||||
pair->first = qt_gsi::Converter<A>::toq (s);
|
||||
}
|
||||
|
||||
static void pair_set_second(QPair<A, B> *pair, const typename qt_gsi::Converter<B>::target_type &s)
|
||||
{
|
||||
pair->second = qt_gsi::Converter<B>::toq (s);
|
||||
}
|
||||
|
||||
static bool pair_equal(const QPair<A, B> *pair, const QPair<A, B> &other)
|
||||
{
|
||||
return *pair == other;
|
||||
}
|
||||
|
||||
/* Not available for all types: (TODO: separate pair declaration for those types which do)
|
||||
static bool pair_less(const QPair<A, B> *pair, const QPair<A, B> &other)
|
||||
{
|
||||
return *pair < other;
|
||||
}
|
||||
*/
|
||||
|
||||
static QPair<A, B> *pair_default_ctor()
|
||||
{
|
||||
return new QPair<A, B>();
|
||||
}
|
||||
|
||||
static QPair<A, B> *pair_ctor(const typename qt_gsi::Converter<A>::target_type &first, const typename qt_gsi::Converter<B>::target_type &second)
|
||||
{
|
||||
return new QPair<A, B>(qt_gsi::Converter<A>::toq (first), qt_gsi::Converter<B>::toq (second));
|
||||
}
|
||||
|
||||
static gsi::Methods methods ()
|
||||
{
|
||||
return
|
||||
gsi::constructor("new", &pair_default_ctor, "@brief Creates a new pair") +
|
||||
gsi::constructor("new", &pair_ctor, "@brief Creates a new pair from the given arguments\n@args first, second") +
|
||||
gsi::method_ext("first", &pair_first, "@brief Returns the first element of the pair\n") +
|
||||
gsi::method_ext("first=", &pair_set_first, "@brief Sets the first element of the pair\n@args first") +
|
||||
gsi::method_ext("second", &pair_second, "@brief Returns the second element of the pair\n") +
|
||||
gsi::method_ext("second=", &pair_set_second, "@brief Sets the second element of the pair\n@args second") +
|
||||
gsi::method_ext("==", &pair_equal, "@brief Returns true if self is equal to the other pair\n@args other")
|
||||
// not available for all types: (TODO: separate pair declaration for those types which do)
|
||||
// gsi::method_ext("<", &pair_less, "@brief Returns true if self is less than the other pair\n@args other")
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QString, QString>
|
||||
|
||||
gsi::Class<QPair<QString, QString> > decl_QString_QPair ("Qt", "QPair_QString_QString",
|
||||
qt_gsi::pair_decl<QString, QString>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QString, QString>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QByteArray, QByteArray>
|
||||
|
||||
gsi::Class<QPair<QByteArray, QByteArray> > decl_QByteArray_QPair ("Qt", "QPair_QByteArray_QByteArray",
|
||||
qt_gsi::pair_decl<QByteArray, QByteArray>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QString, QString>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<double, double>
|
||||
|
||||
gsi::Class<QPair<double, double> > decl_double_QPair ("Qt", "QPair_double_double",
|
||||
qt_gsi::pair_decl<double, double>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<double, double>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<double, QPointf>
|
||||
|
||||
gsi::Class<QPair<double, QPointF> > decl_double_QPointF_QPair ("Qt", "QPair_double_QPointF",
|
||||
qt_gsi::pair_decl<double, QPointF>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<double, QPointF>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<double, QColor>
|
||||
|
||||
gsi::Class<QPair<double, QColor> > decl_double_QColor_QPair ("Qt", "QPair_double_QColor",
|
||||
qt_gsi::pair_decl<double, QColor>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<double, QColor>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QHostAddress, int>
|
||||
|
||||
gsi::Class<QPair<QHostAddress, int> > decl_QHostAddress_int_QPair ("Qt", "QPair_QHostAddress_int",
|
||||
qt_gsi::pair_decl<QHostAddress, int>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QHostAddress, int>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<int, int>
|
||||
|
||||
gsi::Class<QPair<int, int> > decl_int_int_QPair ("Qt", "QPair_int_int",
|
||||
qt_gsi::pair_decl<int, int>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<int, int>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QString, QSizeF>
|
||||
|
||||
gsi::Class<QPair<QString, QSizeF> > decl_QString_QSizeF_QPair ("Qt", "QPair_QString_QSizeF",
|
||||
qt_gsi::pair_decl<QString, QSizeF>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QString, QSizeF>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<double, QVariant>
|
||||
|
||||
gsi::Class<QPair<double, QVariant> > decl_double_QVariant_QPair ("Qt", "QPair_double_QVariant",
|
||||
qt_gsi::pair_decl<double, QVariant>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<double, QVariant>"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Declarations for QPair<QAccessibleInterface*, QAccessible::Relation>
|
||||
|
||||
gsi::Class<QPair<QAccessibleInterface*, QAccessible::Relation> > decl_QAccessibleInterfacePtr_Relation_QPair ("Qt", "QPair_QAccessibleInterfacePtr_QAccessible_Relation",
|
||||
qt_gsi::pair_decl<QAccessibleInterface*, QAccessible::Relation>::methods (),
|
||||
"@qt\\n@brief Represents a QPair<QAccessibleInterface*, QAccessible::Relation> >"
|
||||
);
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// Some helper functions
|
||||
|
||||
namespace qt_gsi
|
||||
{
|
||||
|
||||
std::vector<std::string>
|
||||
to_string_vector (const QStringList &sl)
|
||||
{
|
||||
std::vector<std::string> sv;
|
||||
sv.reserve (sl.size ());
|
||||
for (QStringList::const_iterator s = sl.begin (); s != sl.end (); ++s) {
|
||||
sv.push_back (tl::to_string (*s));
|
||||
}
|
||||
return sv;
|
||||
}
|
||||
|
||||
QStringList
|
||||
to_string_list (const std::vector<std::string> &sv)
|
||||
{
|
||||
QStringList sl;
|
||||
for (std::vector<std::string>::const_iterator s = sv.begin (); s != sv.end (); ++s) {
|
||||
sl.push_back (tl::to_qstring (*s));
|
||||
}
|
||||
return sl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -29,84 +29,6 @@
|
|||
namespace qt_gsi
|
||||
{
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// QVariant::Type implementation
|
||||
// (this type is not created automatically since QVariant is implemented implicitly)
|
||||
|
||||
class QVariant_Namespace { };
|
||||
|
||||
// A dummy namespace "QVariant"
|
||||
gsi::Class<QVariant_Namespace> decl_QVariant_Namespace ("Qt", "QVariant",
|
||||
gsi::Methods(),
|
||||
"@qt\n@brief This class represents the QVariant namespace");
|
||||
|
||||
static gsi::Enum<QVariant::Type> decl_QVariant_Type_Enum ("Qt", "QVariant_Type",
|
||||
gsi::enum_const ("Invalid", QVariant::Invalid, "@brief Enum constant QVariant::Invalid") +
|
||||
gsi::enum_const ("Bool", QVariant::Bool, "@brief Enum constant QVariant::Bool") +
|
||||
gsi::enum_const ("Int", QVariant::Int, "@brief Enum constant QVariant::Int") +
|
||||
gsi::enum_const ("UInt", QVariant::UInt, "@brief Enum constant QVariant::UInt") +
|
||||
gsi::enum_const ("LongLong", QVariant::LongLong, "@brief Enum constant QVariant::LongLong") +
|
||||
gsi::enum_const ("ULongLong", QVariant::ULongLong, "@brief Enum constant QVariant::ULongLong") +
|
||||
gsi::enum_const ("Double", QVariant::Double, "@brief Enum constant QVariant::Double") +
|
||||
gsi::enum_const ("Char", QVariant::Char, "@brief Enum constant QVariant::Char") +
|
||||
gsi::enum_const ("Map", QVariant::Map, "@brief Enum constant QVariant::Map") +
|
||||
gsi::enum_const ("List", QVariant::List, "@brief Enum constant QVariant::List") +
|
||||
gsi::enum_const ("String", QVariant::String, "@brief Enum constant QVariant::String") +
|
||||
gsi::enum_const ("StringList", QVariant::StringList, "@brief Enum constant QVariant::StringList") +
|
||||
gsi::enum_const ("ByteArray", QVariant::ByteArray, "@brief Enum constant QVariant::ByteArray") +
|
||||
gsi::enum_const ("BitArray", QVariant::BitArray, "@brief Enum constant QVariant::BitArray") +
|
||||
gsi::enum_const ("Date", QVariant::Date, "@brief Enum constant QVariant::Date") +
|
||||
gsi::enum_const ("Time", QVariant::Time, "@brief Enum constant QVariant::Time") +
|
||||
gsi::enum_const ("DateTime", QVariant::DateTime, "@brief Enum constant QVariant::DateTime") +
|
||||
gsi::enum_const ("Url", QVariant::Url, "@brief Enum constant QVariant::Url") +
|
||||
gsi::enum_const ("Locale", QVariant::Locale, "@brief Enum constant QVariant::Locale") +
|
||||
gsi::enum_const ("Rect", QVariant::Rect, "@brief Enum constant QVariant::Rect") +
|
||||
gsi::enum_const ("RectF", QVariant::RectF, "@brief Enum constant QVariant::RectF") +
|
||||
gsi::enum_const ("Size", QVariant::Size, "@brief Enum constant QVariant::Size") +
|
||||
gsi::enum_const ("SizeF", QVariant::SizeF, "@brief Enum constant QVariant::SizeF") +
|
||||
gsi::enum_const ("Line", QVariant::Line, "@brief Enum constant QVariant::Line") +
|
||||
gsi::enum_const ("LineF", QVariant::LineF, "@brief Enum constant QVariant::LineF") +
|
||||
gsi::enum_const ("Point", QVariant::Point, "@brief Enum constant QVariant::Point") +
|
||||
gsi::enum_const ("PointF", QVariant::PointF, "@brief Enum constant QVariant::PointF") +
|
||||
gsi::enum_const ("RegExp", QVariant::RegExp, "@brief Enum constant QVariant::RegExp") +
|
||||
gsi::enum_const ("Hash", QVariant::Hash, "@brief Enum constant QVariant::Hash") +
|
||||
gsi::enum_const ("LastCoreType", QVariant::LastCoreType, "@brief Enum constant QVariant::LastCoreType") +
|
||||
gsi::enum_const ("Font", QVariant::Font, "@brief Enum constant QVariant::Font") +
|
||||
gsi::enum_const ("Pixmap", QVariant::Pixmap, "@brief Enum constant QVariant::Pixmap") +
|
||||
gsi::enum_const ("Brush", QVariant::Brush, "@brief Enum constant QVariant::Brush") +
|
||||
gsi::enum_const ("Color", QVariant::Color, "@brief Enum constant QVariant::Color") +
|
||||
gsi::enum_const ("Palette", QVariant::Palette, "@brief Enum constant QVariant::Palette") +
|
||||
gsi::enum_const ("Icon", QVariant::Icon, "@brief Enum constant QVariant::Icon") +
|
||||
gsi::enum_const ("Image", QVariant::Image, "@brief Enum constant QVariant::Image") +
|
||||
gsi::enum_const ("Polygon", QVariant::Polygon, "@brief Enum constant QVariant::Polygon") +
|
||||
gsi::enum_const ("Region", QVariant::Region, "@brief Enum constant QVariant::Region") +
|
||||
gsi::enum_const ("Bitmap", QVariant::Bitmap, "@brief Enum constant QVariant::Bitmap") +
|
||||
gsi::enum_const ("Cursor", QVariant::Cursor, "@brief Enum constant QVariant::Cursor") +
|
||||
gsi::enum_const ("SizePolicy", QVariant::SizePolicy, "@brief Enum constant QVariant::SizePolicy") +
|
||||
gsi::enum_const ("KeySequence", QVariant::KeySequence, "@brief Enum constant QVariant::KeySequence") +
|
||||
gsi::enum_const ("Pen", QVariant::Pen, "@brief Enum constant QVariant::Pen") +
|
||||
gsi::enum_const ("TextLength", QVariant::TextLength, "@brief Enum constant QVariant::TextLength") +
|
||||
gsi::enum_const ("TextFormat", QVariant::TextFormat, "@brief Enum constant QVariant::TextFormat") +
|
||||
gsi::enum_const ("Matrix", QVariant::Matrix, "@brief Enum constant QVariant::Matrix") +
|
||||
gsi::enum_const ("Transform", QVariant::Transform, "@brief Enum constant QVariant::Transform") +
|
||||
gsi::enum_const ("Matrix4x4", QVariant::Matrix4x4, "@brief Enum constant QVariant::Matrix4x4") +
|
||||
gsi::enum_const ("Vector2D", QVariant::Vector2D, "@brief Enum constant QVariant::Vector2D") +
|
||||
gsi::enum_const ("Vector3D", QVariant::Vector3D, "@brief Enum constant QVariant::Vector3D") +
|
||||
gsi::enum_const ("Vector4D", QVariant::Vector4D, "@brief Enum constant QVariant::Vector4D") +
|
||||
gsi::enum_const ("Quaternion", QVariant::Quaternion, "@brief Enum constant QVariant::Quaternion") +
|
||||
gsi::enum_const ("LastGuiType", QVariant::LastGuiType, "@brief Enum constant QVariant::LastGuiType") +
|
||||
gsi::enum_const ("UserType", QVariant::UserType, "@brief Enum constant QVariant::UserType") +
|
||||
gsi::enum_const ("LastType", QVariant::LastType, "@brief Enum constant QVariant::LastType"),
|
||||
"@qt\n@brief This class represents the QVariant::Type enum");
|
||||
|
||||
static gsi::QFlagsClass<QVariant::Type> decl_QVariant_Type_Enums ("QVariant_QFlags_Type",
|
||||
"@qt\n@brief This class represents the QFlags<QVariant::Type> flag set");
|
||||
|
||||
// Inject the declarations into the parent
|
||||
static gsi::ClassExt<QVariant_Namespace> inject_QVariant_Type_Enum_in_parent (decl_QVariant_Type_Enum.defs ());
|
||||
static gsi::ClassExt<QVariant_Namespace> decl_QVariant_Type_Enum_as_child (decl_QVariant_Type_Enum, "Qt", "Type");
|
||||
static gsi::ClassExt<QVariant_Namespace> decl_QVariant_Type_Enums_as_child (decl_QVariant_Type_Enums, "Qt", "QFlags_Type");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// AbstractMethodCalledException implementation
|
||||
|
||||
|
|
|
|||
|
|
@ -419,9 +419,6 @@ public:
|
|||
};
|
||||
#endif
|
||||
|
||||
std::vector<std::string> to_string_vector (const QStringList &sl);
|
||||
QStringList to_string_list (const std::vector<std::string> &sv);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
template <>
|
||||
|
|
@ -507,6 +504,70 @@ inline void qt_keep (const std::vector<T *> &list)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief A helper to implement QPair bindings
|
||||
*/
|
||||
template <class A, class B>
|
||||
struct pair_decl
|
||||
{
|
||||
static typename qt_gsi::Converter<A>::target_type pair_first(const QPair<A, B> *pair)
|
||||
{
|
||||
return qt_gsi::Converter<A>::toc (pair->first);
|
||||
}
|
||||
|
||||
static typename qt_gsi::Converter<B>::target_type pair_second(const QPair<A, B> *pair)
|
||||
{
|
||||
return qt_gsi::Converter<B>::toc (pair->second);
|
||||
}
|
||||
|
||||
static void pair_set_first(QPair<A, B> *pair, const typename qt_gsi::Converter<A>::target_type &s)
|
||||
{
|
||||
pair->first = qt_gsi::Converter<A>::toq (s);
|
||||
}
|
||||
|
||||
static void pair_set_second(QPair<A, B> *pair, const typename qt_gsi::Converter<B>::target_type &s)
|
||||
{
|
||||
pair->second = qt_gsi::Converter<B>::toq (s);
|
||||
}
|
||||
|
||||
static bool pair_equal(const QPair<A, B> *pair, const QPair<A, B> &other)
|
||||
{
|
||||
return *pair == other;
|
||||
}
|
||||
|
||||
/* Not available for all types: (TODO: separate pair declaration for those types which do)
|
||||
static bool pair_less(const QPair<A, B> *pair, const QPair<A, B> &other)
|
||||
{
|
||||
return *pair < other;
|
||||
}
|
||||
*/
|
||||
|
||||
static QPair<A, B> *pair_default_ctor()
|
||||
{
|
||||
return new QPair<A, B>();
|
||||
}
|
||||
|
||||
static QPair<A, B> *pair_ctor(const typename qt_gsi::Converter<A>::target_type &first, const typename qt_gsi::Converter<B>::target_type &second)
|
||||
{
|
||||
return new QPair<A, B>(qt_gsi::Converter<A>::toq (first), qt_gsi::Converter<B>::toq (second));
|
||||
}
|
||||
|
||||
static gsi::Methods methods ()
|
||||
{
|
||||
return
|
||||
gsi::constructor("new", &pair_default_ctor, "@brief Creates a new pair") +
|
||||
gsi::constructor("new", &pair_ctor, "@brief Creates a new pair from the given arguments\n@args first, second") +
|
||||
gsi::method_ext("first", &pair_first, "@brief Returns the first element of the pair\n") +
|
||||
gsi::method_ext("first=", &pair_set_first, "@brief Sets the first element of the pair\n@args first") +
|
||||
gsi::method_ext("second", &pair_second, "@brief Returns the second element of the pair\n") +
|
||||
gsi::method_ext("second=", &pair_set_second, "@brief Sets the second element of the pair\n@args second") +
|
||||
gsi::method_ext("==", &pair_equal, "@brief Returns true if self is equal to the other pair\n@args other")
|
||||
// not available for all types: (TODO: separate pair declaration for those types which do)
|
||||
// gsi::method_ext("<", &pair_less, "@brief Returns true if self is less than the other pair\n@args other")
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
// Using this macro on a variable will supress the "unused variable" or "unused argument"
|
||||
// warning:
|
||||
#define __SUPPRESS_UNUSED_WARNING(x) (void)(x)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
# if defined(HAVE_QT5)
|
||||
# include "../qt5/QtCore/gsiQtExternals.h"
|
||||
# else
|
||||
# include "../qt4/QtCore/gsiQtExternals.h"
|
||||
# endif
|
||||
|
|
@ -20,23 +20,8 @@
|
|||
|
||||
*/
|
||||
|
||||
|
||||
#if !defined(HDR_gsiQtAllExternals_h)
|
||||
# define HDR_gsiQtAllExternals_h
|
||||
|
||||
# if defined(HAVE_QT5)
|
||||
|
||||
...
|
||||
|
||||
# include "../qt5/QtDesigner/gsiQtExternals.h"
|
||||
# else
|
||||
|
||||
# include "../qt4/QtCore/gsiQtExternals.h"
|
||||
# include "../qt4/QtGui/gsiQtExternals.h"
|
||||
# include "../qt4/QtXml/gsiQtExternals.h"
|
||||
# include "../qt4/QtSql/gsiQtExternals.h"
|
||||
# include "../qt4/QtNetwork/gsiQtExternals.h"
|
||||
# include "../qt4/QtDesigner/gsiQtExternals.h"
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
# if defined(HAVE_QT5)
|
||||
# include "../qt5/QtGui/gsiQtExternals.h"
|
||||
# else
|
||||
# include "../qt4/QtGui/gsiQtExternals.h"
|
||||
# endif
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
# if defined(HAVE_QT5)
|
||||
# include "../qt5/QtNetwork/gsiQtExternals.h"
|
||||
# else
|
||||
# include "../qt4/QtNetwork/gsiQtExternals.h"
|
||||
# endif
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
# if defined(HAVE_QT5)
|
||||
# include "../qt5/QtSql/gsiQtExternals.h"
|
||||
# else
|
||||
# include "../qt4/QtSql/gsiQtExternals.h"
|
||||
# endif
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
/*
|
||||
|
||||
KLayout Layout Viewer
|
||||
Copyright (C) 2006-2018 Matthias Koefferlein
|
||||
|
||||
This program 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 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
# if defined(HAVE_QT5)
|
||||
# include "../qt5/QtXml/gsiQtExternals.h"
|
||||
# else
|
||||
# include "../qt4/QtXml/gsiQtExternals.h"
|
||||
# endif
|
||||
|
|
@ -14,11 +14,9 @@ LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db
|
|||
|
||||
SOURCES += \
|
||||
gsiQt.cc \
|
||||
gsiDeclQtBasic.cc \
|
||||
gsiDeclQt5Basic.cc \
|
||||
gsiQtHelper.cc
|
||||
|
||||
HEADERS += \
|
||||
gsiQt.h \
|
||||
gsiQtBasicCommon.h \
|
||||
gsiQtAllExternals.h
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@
|
|||
#include "layMainWindow.h"
|
||||
#include "laySignalHandler.h"
|
||||
#include "gsiDecl.h"
|
||||
#include "gsiQtAllExternals.h"
|
||||
#include "gsiQtGuiExternals.h"
|
||||
#include "tlArch.h"
|
||||
|
||||
FORCE_LINK_GSI_QTGUI
|
||||
|
||||
namespace gsi
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@
|
|||
#include "layMainWindow.h"
|
||||
#include "laybasicCommon.h"
|
||||
#include "gsiDecl.h"
|
||||
#include "gsiQtAllExternals.h"
|
||||
#include "gsiQtGuiExternals.h"
|
||||
|
||||
FORCE_LINK_GSI_QTGUI
|
||||
|
||||
namespace tl
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,10 +22,12 @@
|
|||
|
||||
|
||||
#include "gsiDecl.h"
|
||||
#include "gsiQtAllExternals.h"
|
||||
#include "gsiSignals.h"
|
||||
#include "gsiQtGuiExternals.h"
|
||||
#include "layMainWindow.h"
|
||||
|
||||
FORCE_LINK_GSI_QTGUI
|
||||
|
||||
namespace gsi
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@
|
|||
|
||||
#include "gsiDecl.h"
|
||||
#include "gsiDeclBasic.h"
|
||||
#include "gsiQtAllExternals.h"
|
||||
|
||||
#include "gsiQtGuiExternals.h"
|
||||
#include "layBrowserDialog.h"
|
||||
#include "layBrowserPanel.h"
|
||||
|
||||
|
|
@ -35,6 +34,8 @@
|
|||
|
||||
#include <limits>
|
||||
|
||||
FORCE_LINK_GSI_QTGUI
|
||||
|
||||
namespace gsi
|
||||
{
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue