Author: coolo
Date: Thu Feb 14 14:50:46 2008
New Revision: 44449
URL: http://svn.opensuse.org/viewcvs/yast?rev=44449&view=rev
Log:
readding what looks necessary to hook it into
Modified:
branches/tmp/coolo/split_qt_pkg/qt/src/CMakeLists.txt
branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.cc
branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.h
branches/tmp/coolo/split_qt_pkg/qt/src/YQOptionalWidgetFactory.cc
branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.cc
branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.h
branches/tmp/coolo/split_qt_pkg/qt/src/YQWidgetFactory.cc
Modified: branches/tmp/coolo/split_qt_pkg/qt/src/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/split_qt_pkg/qt/src/CMakeLists.txt?rev=44449&r1=44448&r2=44449&view=diff
==============================================================================
--- branches/tmp/coolo/split_qt_pkg/qt/src/CMakeLists.txt (original)
+++ branches/tmp/coolo/split_qt_pkg/qt/src/CMakeLists.txt Thu Feb 14 14:50:46 2008
@@ -86,6 +86,7 @@
ADD_LIBRARY( py2qt SHARED ${qt_yast_plugin_SRCS})
TARGET_LINK_LIBRARIES( py2qt ${YAST_LIBRARY} )
TARGET_LINK_LIBRARIES( py2qt ${YAST_YUI_LIBRARY} )
+TARGET_LINK_LIBRARIES( py2qt ${YAST_YCP_LIBRARY} )
TARGET_LINK_LIBRARIES( py2qt ${QT_QTCORE_LIBRARY} )
TARGET_LINK_LIBRARIES( py2qt ${QT_QTGUI_LIBRARY} )
TARGET_LINK_LIBRARIES( py2qt ${YAST_PLUGIN_UI_LIBRARY} )
Modified: branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.cc?rev=44449&r1=44448&r2=44449&view=diff
==============================================================================
--- branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.cc (original)
+++ branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.cc Thu Feb 14 14:50:46 2008
@@ -659,5 +659,23 @@
YQUI::ui()->makeScreenShot( fileName );
}
+YQPackageSelectorPluginStub * YQApplication::packageSelectorPlugin()
+{
+ static YQPackageSelectorPluginStub * plugin = 0;
+
+ if ( ! plugin )
+ {
+ plugin = new YQPackageSelectorPluginStub();
+
+ // This is a deliberate memory leak: If an application requires a
+ // PackageSelector, it is a package selection application by
+ // definition. In this case, the ncurses_pkg plugin is intentionally
+ // kept open to avoid repeated start-up cost of the plugin and libzypp.
+ }
+
+ return plugin;
+}
+
+
#include "YQApplication.moc"
Modified: branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.h?rev=44449&r1=44448&r2=44449&view=diff
==============================================================================
--- branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.h (original)
+++ branches/tmp/coolo/split_qt_pkg/qt/src/YQApplication.h Thu Feb 14 14:50:46 2008
@@ -24,6 +24,7 @@
#include
#include
+#include "YQPackageSelectorPluginStub.h"
#include "QY2Settings.h"
#include "YApplication.h"
@@ -202,6 +203,12 @@
const QString & headline );
/**
+ * Return the package selector plugin singleton or creates it
+ * (including loading the plugin lib) if it does not exist yet.
+ **/
+ static YQPackageSelectorPluginStub * packageSelectorPlugin();
+
+ /**
* A mouse click with the wrong mouse button was detected - e.g., a right
* click on a push button. The user might be left-handed, but his mouse
* might not (yet) be configured for left-handed use - e.g., during
Modified: branches/tmp/coolo/split_qt_pkg/qt/src/YQOptionalWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/split_qt_pkg/qt/src/YQOptionalWidgetFactory.cc?rev=44449&r1=44448&r2=44449&view=diff
==============================================================================
--- branches/tmp/coolo/split_qt_pkg/qt/src/YQOptionalWidgetFactory.cc (original)
+++ branches/tmp/coolo/split_qt_pkg/qt/src/YQOptionalWidgetFactory.cc Thu Feb 14 14:50:46 2008
@@ -249,4 +249,24 @@
return new YQTimezoneSelector( parent, pixmap, timezones );
}
+YWidget *
+YQOptionalWidgetFactory::createPatternSelector(YWidget* parent, long modeFlags)
+{
+ YQPackageSelectorPluginStub * plugin = YQApplication::packageSelectorPlugin();
+ if ( plugin )
+ return plugin->createPatternSelector( parent, modeFlags );
+ else
+ return 0;
+}
+
+YWidget *
+YQOptionalWidgetFactory::createSimplePatchSelector(YWidget* parent, long modeFlags)
+{
+ YQPackageSelectorPluginStub * plugin = YQApplication::packageSelectorPlugin();
+
+ if ( plugin )
+ return plugin->createSimplePatchSelector( parent, modeFlags );
+ else
+ return 0;
+}
Modified: branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.cc?rev=44449&r1=44448&r2=44449&view=diff
==============================================================================
--- branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.cc (original)
+++ branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.cc Thu Feb 14 14:50:46 2008
@@ -60,6 +60,19 @@
return impl->createPackageSelector( parent, modeFlags );
}
+
+YWidget * YQPackageSelectorPluginStub::createPatternSelector( YWidget * parent,
+ long modeFlags )
+{
+ return impl->createPatternSelector( parent, modeFlags );
+}
+
+YWidget * YQPackageSelectorPluginStub::createSimplePatchSelector( YWidget * parent,
+ long modeFlags )
+{
+ return impl->createSimplePatchSelector( parent, modeFlags );
+}
+
///////////////////////////////////////////////////////////////////
//
//
Modified: branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.h?rev=44449&r1=44448&r2=44449&view=diff
==============================================================================
--- branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.h (original)
+++ branches/tmp/coolo/split_qt_pkg/qt/src/YQPackageSelectorPluginStub.h Thu Feb 14 14:50:46 2008
@@ -60,6 +60,15 @@
virtual YPackageSelector * createPackageSelector( YWidget * parent,
long modeFlags );
+ // optional widget
+ virtual YWidget * createPatternSelector( YWidget * parent,
+ long modeFlags );
+
+ // optional widget
+ virtual YWidget * createSimplePatchSelector( YWidget * parent,
+ long modeFlags );
+
+
/**
* Fills the PackageSelector widget (runs the package selection).
*/
@@ -72,6 +81,7 @@
virtual YWidget * createPkgSpecial( YWidget *parent,
const string &subwidget );
+
YQPackageSelectorPluginIf *impl ;
};
Modified: branches/tmp/coolo/split_qt_pkg/qt/src/YQWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/split_qt_pkg/qt/src/YQWidgetFactory.cc?rev=44449&r1=44448&r2=44449&view=diff
==============================================================================
--- branches/tmp/coolo/split_qt_pkg/qt/src/YQWidgetFactory.cc (original)
+++ branches/tmp/coolo/split_qt_pkg/qt/src/YQWidgetFactory.cc Thu Feb 14 14:50:46 2008
@@ -289,7 +289,16 @@
return multiSelectionBox;
}
+YPackageSelector*
+YQWidgetFactory::createPackageSelector(YWidget* parent, long modeFlags)
+{
+ YQPackageSelectorPluginStub * plugin = YQApplication::packageSelectorPlugin();
+ if ( plugin )
+ return plugin->createPackageSelector( parent, modeFlags );
+ else
+ return 0;
+}
YWidget *
YQWidgetFactory::createPkgSpecial( YWidget * , const string & )
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org