On Monday 29 March 2010 17:02:19 Josh wrote:
> Hugo Parente Lima wrote:
> > On Monday 29 March 2010 14:31:13 Josh wrote:
> >> Hugo Parente Lima wrote:
> >>> On Monday 29 March 2010 14:09:56 Josh wrote:
> >>>> Hi all,
> >>>> 
> >>>> I'm trying to build a binding for my Qt C++ widget using shiboken.
> >>>> 
> >>>> Here's my shiboken command:
> >>>> shiboken ../data/global.h \
> >>>> 
> >>>>  --include-paths=../../VideoPlayerWidget:-I/home/josh/videoWidget/targ
> >>>>  et fs-
> >>>> 
> >>>> base/include/QtCore:-I/home/josh/videoWidget/targetfs-base/include:/us
> >>>> r/ inc lude
> >>>> 
> >>>>  --typesystem-paths=../data:/home/josh/videoWidget/targetfs-base/bindi
> >>>>  ng s --output-directory=.. ../data/typesystem_VideoPlayerWidget.xml
> >>>> 
> >>>> Make fails with  the error:
> >>>>     make: *** No rule to make target
> >>>> 
> >>>> `VideoPlayerWidget_globals_wrapper.cpp', needed by `compile'.  Stop.
> >>>> 
> >>>> Indeed, there is no "VideoPlayerWidget_globals_wrapper.cpp". Is
> >>>> shiboken supposed to generate one?
> >>>> 
> >>>> Then, I noticed that it did generate
> >>>> "videoplayerwidget_module_wrapper.cpp" and
> >>>> "videoplayerwidget_python.h". However, these names are formatted
> >>>> incorrectly. In the Makefile the
> >>>> 
> >>>> values are camel-capped, ie. they should be:
> >>>>     "VideoPlayerWidget_globals_wrapper.cpp"
> >>>>     "VideoPlayerWidget_module_wrapper.cpp"
> >>>>     "VideoPlayerWidget_wrapper.cpp"
> >>>> 
> >>>> So, is shiboken doing something wrong or have I screwed something up?
> >>>> 
> >>>> 
> >>>> The full shiboken output ends with:
> >>>> ...
> >>>> ... ( hundreds of similar warnings snipped out for brevity)
> >>>> WARNING :: type 'QFrame' is specified in typesystem, but not defined.
> >>>> This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QCDEStyle' is specified in typesystem, but not
> >>>> defined. This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QGraphicsColorizeEffect' is specified in typesystem,
> >>>> but not defined. This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QIconEngine' is specified in typesystem, but not
> >>>> defined. This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QGraphicsScene' is specified in typesystem, but not
> >>>> defined. This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QItemEditorFactory' is specified in typesystem, but
> >>>> not defined. This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QAbstractPageSetupDialog' is specified in typesystem,
> >>>> but not defined. This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QLCDNumber' is specified in typesystem, but not
> >>>> defined. This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QXmlStreamEntityDeclaration' is specified in
> >>>> typesystem, but not defined. This could potentially lead to
> >>>> compilation errors.
> >>>> WARNING :: type 'QActionGroup' is specified in typesystem, but not
> >>>> defined. This could potentially lead to compilation errors.
> >>>> WARNING :: type 'QTextCodec::ConverterState' is specified in
> >>>> typesystem, but not defined. This could potentially lead to
> >>>> compilation errors. [-] (1094/1094) Detecting inconsistencies in
> >>>> typesystem for
> >>>> QTextCodec::ConverterState
> >>>> Done, 485 warnings (1 known issues)
> >>>> make: *** No rule to make target
> >>>> `AwareVideoPlayerWidget_module_wrapper.cpp', needed by `compile'. 
> >>>> Stop.
> >>> 
> >>> Are you including QtCore and QtGui typesystem in your typesystem file?
> >> 
> >> Yes. Here's my typesystem file:
> >> 
> >> <?xml version="1.0"?>
> >> <typesystem package="VideoPlayerWidget">
> >> 
> >>     <load-typesystem name="typesystem_core.xml" generate="no"/>
> >>     <load-typesystem name="typesystem_opengl.xml" generate="no"/>
> >>     <load-typesystem name="typesystem_gui_common.xml" generate="no"/>
> >>     <load-typesystem name="typesystem_gui.xml" generate="no"/>
> >>     
> >>     <object-type name="VideoPlayerWidget"/>
> >> 
> >> </typesystem>
> >> 
> >>> See the log files generated by ApiExtractor, they can give some clue on
> >>> what's wrong.
> >> 
> >> The only thing out of the ordinary was in mjb_rejected_classes.log
> > 
> > The typesystem is ok, just make sure that you get typesystem_gui.xml from
> > the pyside build directory, not just renamed typesystem_gui.xml.in.
> 
> Yup, all my typesystem*.xml files are from my original pyside build.
> 
> >> ************************************************************************
> >> Type redefined to not be a class
> >> 
> >>      - VideoPlayerWidget
> >> 
> >> ************************************************************************
> > 
> > There's some typedef or something else on the declaration of
> > VideoPlayerWidget class?
> 
> Well, I stripped all the extraneous macros and typedefs from the header
> in an attempt to get it to at least build something.
> 
> The shiboken warnings start with:
> 
>     WARNING :: Duplicate type entry: 'VideoPlayerWidget'
>     WARNING :: type 'QFontDialog' is specified in typesystem, but not
>     defined. This could potentially lead to compilation errors.
>     WARNING :: type 'QAbstractProxyModel' is specified in typesystem,
>     but not defined. This could potentially lead to compilation errors.
> 
> 
> ... hundreds of  similar warnings....
> 
>     WARNING :: type 'QActionGroup' is specified in typesystem, but not
>     defined. This could potentially lead to compilation errors.
>     WARNING :: type 'QTextCodec::ConverterState' is specified in
>     typesystem, but not defined. This could potentially lead to
>     compilation errors.
>     WARNING :: Cyclic dependency found!
>     [-] (1093/1093) Detecting inconsistencies in typesystem for
>     QTextCodec::ConverterState
>     No C++ classes found!
> 
> 
> 
> 
> 
> My header file looks like this:
> 
>     #ifndef VIDEO_PLAYER_WIDGET_HPP
>     #define VIDEO_PLAYER_WIDGET_HPP
> 
>     #include <QGLWidget>
> 
>     class VideoPlayerWidget : public QGLWidget
>     {
>         Q_OBJECT;
> 
>     public:
> 
>         VideoPlayerWidget(QWidget *parent = 0);
>         ~VideoPlayerWidget();
> 
>         QSize minimumSizeHint() const;
>         QSize sizeHint() const;
>         void setClearColor(const QColor &color);
>         void updateFrame(unsigned int w, unsigned int h,
>                          GLenum format, unsigned char *data);
>         void designerMode(bool usingDesigner = true);
>         bool showGroundPlane() { return m_showGroundPlane; }
>         void setShowGroundPlane(bool show) { m_showGroundPlane = show; }
>         double groundPlaneAlpha() { return m_groundPlaneAlpha; }
>         void setGroundPlaneAlpha(double alpha);
>         bool waypointsVisible() { return m_waypointsVisible; }
> 
>     signals:
>         void clicked(QPoint, QSize);
> 
>     protected:
>         void initializeGL();
>         void paintGL();
>         void mouseReleaseEvent(QMouseEvent *event);
>         void paintEvent(QPaintEvent *);
> 
>     public slots:
>         void updateRobotPosition(QPointF, double);
>         void addWaypoint(long int, QPointF);
>         void removeWaypoint(long int);
>         void moveWaypoint(long int, QPointF);
>         void removeAllWaypoints();
>         void setGroundPlaneVisible(bool);
>         void setWaypointsVisible(bool);
> 
>     private:
>         void renderWaypoint(long int id, QPointF location);
> 
>         QColor m_clearColor;
>         QPoint m_lastPos;
> 
>         GLuint m_texture;
>         unsigned int m_usingDesigner;
>         unsigned int m_width;
>         unsigned int m_height;
> 
>         bool m_showGroundPlane;
>         double m_groundPlaneAlpha;
>         bool m_waypointsVisible;
> 
>         QMap<long int, QPointF> m_waypoints;
>         QPointF m_robotPosition;
>         double m_robotTheta;
>     };
> 
>     #endif // VIDEO_PLAYER_WIDGET_HPP
> 
> 
> 
> So still stuck, and kinda lost. All help apprecieated! ;)

Can you create a tarball with all code? so we can take a look.
If so, please, do not send it to the list, send to my email instead.

I also dont need the .cpp's of your widget, just the headers.

> Josh

-- 
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to