[Jahshaka-cvs] jah/jahwidgets/src/qt3/wrapper events.hpp, 1.1, 1.2 widget_handle.cpp, 1.28, 1.29 wi
Status: Beta
Brought to you by:
jahshaka
From: John B. <ok_...@us...> - 2007-05-22 16:15:29
|
Update of /cvsroot/jahshaka/jah/jahwidgets/src/qt3/wrapper In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30126/jahwidgets/src/qt3/wrapper Modified Files: events.hpp widget_handle.cpp widget_handle.hpp wrapper.cpp wrapper.hpp Log Message: Adding support for splash screen creation Index: widget_handle.cpp =================================================================== RCS file: /cvsroot/jahshaka/jah/jahwidgets/src/qt3/wrapper/widget_handle.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- widget_handle.cpp 14 May 2007 20:41:59 -0000 1.28 +++ widget_handle.cpp 22 May 2007 16:15:23 -0000 1.29 @@ -232,6 +232,11 @@ widget->lower(); return true; + case WH_CLOSE: + if ( widget ) + widget->close(); + return true; + case WH_PROPERTY: if ( widget ) { @@ -703,6 +708,11 @@ QApplication::postEvent( m_impl->widget, new QEvent( (QEvent::Type)WH_LOWER ) ); } +void widget_handle::close() +{ + QApplication::postEvent( m_impl->widget, new QEvent( (QEvent::Type)WH_CLOSE ) ); +} + void widget_handle::set_property( const QString& name, const QVariant& value ) { QApplication::postEvent( m_impl->widget, new PropertyEvent( name, value ) ); Index: widget_handle.hpp =================================================================== RCS file: /cvsroot/jahshaka/jah/jahwidgets/src/qt3/wrapper/widget_handle.hpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- widget_handle.hpp 14 May 2007 20:41:59 -0000 1.23 +++ widget_handle.hpp 22 May 2007 16:15:23 -0000 1.24 @@ -124,6 +124,8 @@ void raise(); void lower(); + void close(); + int globalX() const; int globalY() const; Index: events.hpp =================================================================== RCS file: /cvsroot/jahshaka/jah/jahwidgets/src/qt3/wrapper/events.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- events.hpp 14 May 2007 20:37:54 -0000 1.1 +++ events.hpp 22 May 2007 16:15:23 -0000 1.2 @@ -27,6 +27,7 @@ WH_MOVE, WH_RAISE, WH_LOWER, + WH_CLOSE, WH_PROPERTY }; Index: wrapper.hpp =================================================================== RCS file: /cvsroot/jahshaka/jah/jahwidgets/src/qt3/wrapper/wrapper.hpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- wrapper.hpp 4 May 2007 14:45:22 -0000 1.19 +++ wrapper.hpp 22 May 2007 16:15:24 -0000 1.20 @@ -18,6 +18,9 @@ #include <openpluginlib/pl/pcos/iproperty_container.hpp> #include <openpluginlib/pl/pcos/any.hpp> +// oil +#include <openimagelib/il/basic_image.hpp> + // boost #include <boost/shared_ptr.hpp> @@ -26,6 +29,7 @@ namespace jahwidgets { namespace qt3 { namespace pcos = olib::openpluginlib::pcos; +namespace il = olib::openimagelib::il; class dialog_delegate; @@ -63,6 +67,8 @@ /// The dialog is deleted before this method returns, so don't hold onto any handles to the dialog WRAPPER_DECLSPEC int create_and_exec_dialog( const char* ui, widget_handle parent, dialog_delegate* delegate ); +WRAPPER_DECLSPEC widget_handle create_splash_screen( il::image_type_ptr ); + /// for a widget hierarchy, find the widget with appropriate name WRAPPER_DECLSPEC widget_handle find( const char* name, widget_handle parent ); Index: wrapper.cpp =================================================================== RCS file: /cvsroot/jahshaka/jah/jahwidgets/src/qt3/wrapper/wrapper.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- wrapper.cpp 14 May 2007 20:41:59 -0000 1.38 +++ wrapper.cpp 22 May 2007 16:15:23 -0000 1.39 @@ -12,6 +12,7 @@ #include "widgetFactory.h" #include "utils/string_utils.hpp" #include "utils/qapp_locker.hpp" +#include "utils/image_utils.hpp" #include "property_adapter.hpp" #include "dialog_delegate.hpp" @@ -26,6 +27,7 @@ #include <qlayout.h> #include <qbuffer.h> #include <qdialog.h> +#include <qsplashscreen.h> // std #include <memory> @@ -207,6 +209,11 @@ return rc; } +widget_handle create_splash_screen( il::image_type_ptr image ) +{ + return new QSplashScreen( image_to_qimage( image ) ); +} + widget_handle find( const char* name, widget_handle parent ) { qapp_locker l; |