Author: tgoettlicher
Date: Wed Feb 6 17:22:45 2008
New Revision: 44206
URL: http://svn.opensuse.org/viewcvs/yast?rev=44206&view=rev
Log:
add
Added:
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/KCModuleProxy
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy_p.h
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.cpp
branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.h
Added: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/KCModuleProxy
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/KCModuleProxy?rev=44206&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/KCModuleProxy (added)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/KCModuleProxy Wed Feb 6 17:22:45 2008
@@ -0,0 +1 @@
+#include "../kcmoduleproxy.h"
Added: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp?rev=44206&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp (added)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.cpp Wed Feb 6 17:22:45 2008
@@ -0,0 +1,358 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Frans Englich
+ Copyright (C) 2003 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "kcmoduleproxy.h"
+#include "kcmoduleproxy_p.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+
+//#include
+#include <iostream>
+#include
+#include
+#include "yservice.h"
+#include
+#include
+
+#include
+
+#include
+
+#ifdef tg
+#include "ksettingswidgetadaptor.h"
+#endif
+
+/*
+ TODO:
+
+ - Two Layout problems in runAsRoot:
+ * lblBusy doesn't show
+ * d->kcm/d->rootInfo doesn't get it right when the user
+ presses cancel in the kdesu dialog
+
+ - Resizing horizontally is contrained; minimum size is set somewhere.
+ It appears to be somehow derived from the module's size.
+
+ - Prettify: set icon in KCMultiDialog.
+
+ */
+/***************************************************************/
+KCModule* KCModuleProxy::realModule() const
+{
+ Q_D(const KCModuleProxy);
+ /*
+ * Note, don't call any function that calls realModule() since
+ * that leads to an infinite loop.
+ */
+
+ /* Already loaded */
+ if( !d->kcm )
+ {
+ QApplication::setOverrideCursor( Qt::WaitCursor );
+ const_cast(d)->loadModule();
+ QApplication::restoreOverrideCursor();
+ }
+ return d->kcm;
+}
+
+void KCModuleProxyPrivate::loadModule()
+{
+ if( !topLayout )
+ {
+ topLayout = new QVBoxLayout( parent );
+ topLayout->setMargin( 0 );
+ topLayout->setSpacing( 0 );
+
+ QString name = modInfo.handle();
+ dbusPath = QLatin1String("/internal/KSettingsWidget/") + name;
+ dbusService = QLatin1String("org.kde.internal.KSettingsWidget-") + name;
+ }
+
+ if( QDBusConnection::sessionBus().registerService( dbusService ) || bogusOccupier )
+ { /* We got the name we requested, because no one was before us,
+ * or, it was an random application which had picked that name */
+
+ kcm = KCModuleLoader::loadModule( modInfo, KCModuleLoader::Inline, parent, args );
+
+ QObject::connect(kcm, SIGNAL(changed(bool)), parent, SLOT(_k_moduleChanged(bool)));
+ QObject::connect(kcm, SIGNAL(destroyed()), parent, SLOT(_k_moduleDestroyed()));
+ QObject::connect( kcm, SIGNAL(quickHelpChanged()), parent, SIGNAL(quickHelpChanged()) );
+ parent->setWhatsThis( kcm->quickHelp() );
+
+ if ( kcm->layout() ) {
+ kcm->layout()->setMargin( 0 );
+ }
+ topLayout->addWidget( kcm );
+#ifdef tg
+ if( !modInfo.handle().isEmpty() )
+ QDBusConnection::sessionBus().registerObject(dbusPath, new KSettingsWidgetAdaptor(parent), QDBusConnection::ExportAllSlots);
+#endif
+
+ if ( !rootInfo && /* If it's not already done */
+ kcm->useRootOnlyMessage() && /* kcm wants root message */
+ !KUser().isSuperUser() ) /* Not necessary if we're root */
+ {
+ rootInfo = new QLabel( parent );
+ topLayout->insertWidget( 0, rootInfo );
+
+ rootInfo->setFrameShape( QFrame::Box );
+ rootInfo->setFrameShadow( QFrame::Raised );
+
+ const QString message = kcm->rootOnlyMessage();
+ if( message.isEmpty() )
+ rootInfo->setText( i18n(
+ "<b>Changes in this section requires root access.</b><br />"
+ "On applying your changes you will have to supply your root "
+ "password." ) );
+ else
+ rootInfo->setText(message);
+
+ rootInfo->setWhatsThis( i18n(
+ "This section requires special permissions, probably "
+ "for system-wide changes; therefore, it is "
+ "required that you provide the root password to be "
+ "able to change the module's properties. If "
+ "you cannot provide the password, the changes of the "
+ "module cannot be saved " ) );
+ }
+ }
+ else
+ {
+ std::cout << "Module already loaded, loading KCMError" << std::endl;
+
+ /* Figure out the name of where the module is already loaded */
+ QDBusInterface proxy( dbusService, dbusPath, "org.kde.internal.KSettingsWidget" );
+ QDBusReply<QString> reply = proxy.call("applicationName");
+
+ if( reply.isValid() )
+ {
+ QObject::connect( QDBusConnection::sessionBus().interface(), SIGNAL(serviceOwnerChanged(QString,QString,QString)),
+ parent, SLOT(_k_ownerChanged(QString,QString,QString)));
+ kcm = KCModuleLoader::reportError( KCModuleLoader::Inline,
+ i18nc( "Argument is application name", "This configuration section is "
+ "already opened in %1" , reply.value() ), " ", parent );
+ topLayout->addWidget( kcm );
+ }
+ else
+ {
+ std::cout << "Calling KCModuleProxy's DBus interface for fetching the name failed." << std::endl;
+ bogusOccupier = true;
+ loadModule();
+ }
+ }
+}
+
+void KCModuleProxyPrivate::_k_ownerChanged(const QString &service, const QString &oldOwner, const QString &)
+{
+ if (service == dbusService && !oldOwner.isEmpty()) {
+ // Violence: Get rid of KCMError & CO, so that
+ // realModule() attempts to reload the module
+ delete kcm;
+ kcm = 0;
+ Q_Q(KCModuleProxy);
+ q->realModule();
+
+ Q_ASSERT(kcm);
+ kcm->show();
+ }
+}
+
+void KCModuleProxy::showEvent( QShowEvent * ev )
+{
+ Q_D(KCModuleProxy);
+
+// kDebug(711) ;
+ ( void )realModule();
+
+ /* We have no kcm, if we're in root mode */
+ if( d->kcm )
+ d->kcm->show();
+
+ QWidget::showEvent( ev );
+
+}
+
+KCModuleProxy::~KCModuleProxy()
+{
+ deleteClient();
+ KCModuleLoader::unloadModule(moduleInfo());
+
+ delete d_ptr;
+}
+
+void KCModuleProxy::deleteClient()
+{
+ Q_D(KCModuleProxy);
+ delete d->kcm;
+ d->kcm = 0;
+
+ kapp->syncX();
+}
+
+void KCModuleProxyPrivate::_k_moduleChanged(bool c)
+{
+ if(changed == c) {
+ return;
+ }
+
+ Q_Q(KCModuleProxy);
+ changed = c;
+ emit q->changed(c);
+ emit q->changed(this);
+}
+
+void KCModuleProxyPrivate::_k_moduleDestroyed()
+{
+ kcm = 0;
+}
+
+#ifdef tg
+KCModuleProxy::KCModuleProxy( const YService::Ptr& service, QWidget * parent,
+ const QStringList& args )
+ : QWidget(parent), d_ptr(new KCModuleProxyPrivate(this, KCModuleInfo(service), args))
+{
+ d_ptr->q_ptr = this;
+}
+#endif
+
+KCModuleProxy::KCModuleProxy( const KCModuleInfo& info, QWidget * parent,
+ const QStringList& args )
+ : QWidget(parent), d_ptr(new KCModuleProxyPrivate(this, info, args))
+{
+ d_ptr->q_ptr = this;
+}
+
+KCModuleProxy::KCModuleProxy( const QString& serviceName, QWidget * parent,
+ const QStringList& args )
+ : QWidget(parent), d_ptr(new KCModuleProxyPrivate(this, KCModuleInfo(serviceName), args))
+{
+ d_ptr->q_ptr = this;
+}
+
+
+void KCModuleProxy::load()
+{
+ Q_D(KCModuleProxy);
+ if( realModule() )
+ {
+ d->kcm->load();
+ d->_k_moduleChanged(false);
+ }
+}
+
+void KCModuleProxy::save()
+{
+ Q_D(KCModuleProxy);
+ if( d->changed && realModule() )
+ {
+ d->kcm->save();
+ d->_k_moduleChanged(false);
+ }
+}
+
+void KCModuleProxy::defaults()
+{
+ Q_D(KCModuleProxy);
+ if( realModule() )
+ d->kcm->defaults();
+}
+
+QString KCModuleProxy::quickHelp() const
+{
+ return realModule() ? realModule()->quickHelp() : QString();
+}
+
+const KAboutData * KCModuleProxy::aboutData() const
+{
+ return realModule() ? realModule()->aboutData() : 0;
+}
+
+KCModule::Buttons KCModuleProxy::buttons() const
+{
+ if( realModule() )
+ return realModule()->buttons();
+ return KCModule::Buttons( KCModule::Help | KCModule::Default | KCModule::Apply );
+}
+
+QString KCModuleProxy::rootOnlyMessage() const
+{
+ return realModule() ? realModule()->rootOnlyMessage() : QString();
+}
+
+bool KCModuleProxy::useRootOnlyMessage() const
+{
+ return realModule() ? realModule()->useRootOnlyMessage() : true;
+}
+
+KComponentData KCModuleProxy::componentData() const
+{
+ return realModule() ? realModule()->componentData() : KComponentData();
+}
+
+bool KCModuleProxy::changed() const
+{
+ Q_D(const KCModuleProxy);
+ return d->changed;
+}
+
+KCModuleInfo KCModuleProxy::moduleInfo() const
+{
+ Q_D(const KCModuleProxy);
+ return d->modInfo;
+}
+
+QString KCModuleProxy::dbusService() const
+{
+ Q_D(const KCModuleProxy);
+ return d->dbusService;
+}
+
+QString KCModuleProxy::dbusPath() const
+{
+ Q_D(const KCModuleProxy);
+ return d->dbusPath;
+}
+
+//X void KCModuleProxy::emitQuickHelpChanged()
+//X {
+//X emit quickHelpChanged();
+//X }
+
+/***************************************************************/
+#include "kcmoduleproxy.moc"
+
+// vim: ts=4
Added: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h?rev=44206&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h (added)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy.h Wed Feb 6 17:22:45 2008
@@ -0,0 +1,258 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Matthias Kretz
+ Copyright (C) 2004 Frans Englich
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef KUTILS_KCMODULEPROXY_H
+#define KUTILS_KCMODULEPROXY_H
+
+#include
+#include
+
+#include
+#include "yservice.h"
+//#include
+
+class KAboutData;
+class KCModuleInfo;
+class KComponentData;
+class KCModuleProxyPrivate;
+
+/**
+ *
+ * @brief Encapsulates a KCModule for embedding.
+ *
+ * KCModuleProxy is a wrapper for KCModule intended for cases where
+ * modules are to be displayed. It ensures layout is consistent
+ * and in general takes care of the details
+ * needed for making a module available in an interface. A KCModuleProxy
+ * can be treated as a QWidget, without worrying about the details specific
+ * for modules such as library loading. KCModuleProxy is not a sub class of KCModule
+ * but its API closely resembles KCModule's.\n
+ * Usually, an instance is created by passing one of the constructors a YService::Ptr,
+ * KCModuleInfo or simply the name of the module and then added to the layout as any
+ * other widget. \n
+ * When the user has changed the module, changed(bool) as well as changed(KCModuleProxy *)
+ * is emitted. KCModuleProxy does not take care of prompting for saving - if the object is deleted while
+ * changes is not saved the changes will be lost. changed() returns true if changes are unsaved. \n
+ * \n
+ * KCModuleProxy does not take care of authorization of KCModules. \n
+ * KCModuleProxy implements lazy loading, meaning the library will not be loaded or
+ * any other initialization done before its show() function is called. This means
+ * modules will only be loaded when they are actually needed as well as it is possible to
+ * load many KCModuleProxy without any speed penalty.
+ *
+ * KCModuleProxy should be used in all cases where modules are embedded in order to
+ * promote code efficiency and usability consistency.
+ *
+ * @author Frans Englich
+ * @author Matthias Kretz
+ *
+ */
+class KCModuleProxy : public QWidget
+{
+Q_DECLARE_PRIVATE(KCModuleProxy)
+Q_OBJECT
+public:
+ /**
+ * Constructs a KCModuleProxy from a KCModuleInfo class.
+ *
+ * @param info The KCModuleInfo to construct the module from.
+ * @param parent the parent QWidget.
+ * @param args This is used in the implementation and is internal.
+ * Use the default.
+ */
+ explicit KCModuleProxy( const KCModuleInfo& info, QWidget* parent = 0,
+ const QStringList& args = QStringList() );
+
+ /**
+ * Constructs a KCModuleProxy from a module's service name, which is
+ * equivalent to the desktop file for the kcm without the ".desktop" part.
+ * Otherwise equal to the one above.
+ *
+ * @param serviceName The module's service name to construct from.
+ * @param parent the parent QWidget.
+ * @param args This is used in the implementation and is internal.
+ * Use the default.
+ */
+ explicit KCModuleProxy( const QString& serviceName, QWidget* parent = 0,
+ const QStringList& args = QStringList() );
+
+ /**
+ * Constructs a KCModuleProxy from YService. Otherwise equal to the one above.
+ *
+ * @param service The YService to construct from.
+ * @param parent the parent QWidget.
+ * @param args This is used in the implementation and is internal.
+ * Use the default.
+ */
+ explicit KCModuleProxy( const YService::Ptr& service, QWidget* parent = 0,
+ const QStringList& args = QStringList() );
+
+ /**
+ * Default destructor
+ */
+ ~KCModuleProxy();
+
+ /**
+ * Calling it will cause the contained module to
+ * run its load() routine.
+ */
+ void load();
+
+ /**
+ * Calling it will cause the contained module to
+ * run its save() routine.
+ *
+ * If the module was not modified, it will not be asked
+ * to save.
+ */
+ void save();
+
+ /**
+ * @return the module's quickHelp();
+ */
+ QString quickHelp() const;
+
+ /**
+ * @return the module's aboutData()
+ */
+ const KAboutData * aboutData() const;
+
+ /**
+ * @return what buttons the module
+ * needs
+ */
+ KCModule::Buttons buttons() const;
+
+ /**
+ * @return The module's custom root
+ * message, if it has one
+ * @deprecated
+ */
+ QString rootOnlyMessage() const;
+ //KDE4 remove. There's a limit for convenience functions,
+ // this one's available via realModule()->
+
+ /**
+ * @return If the module is a root module.
+ * @deprecated
+ */
+ bool useRootOnlyMessage() const;
+ //KDE4 remove. There's a limit for convenience functions,
+ // this one's available via realModule()->
+
+ /**
+ * Returns the embedded KCModule's KComponentData.
+ * @return The module's KComponentData.
+ * @deprecated
+ */
+ KComponentData componentData() const;
+ //KDE4 remove. There's a limit for convenience functions,
+ // this one's available via realModule()
+
+ /**
+ * @return true if the module is modified
+ * and needs to be saved.
+ */
+ bool changed() const;
+
+ /**
+ * Access to the actual module. However, if the module is
+ * running in root mode, see rootMode(), this function returns
+ * a NULL pointer, since the module is in another process. It may also
+ * return NULL if anything goes wrong.
+ *
+ * @return the encapsulated module.
+ */
+ KCModule* realModule() const;
+
+ /**
+ * @return a KCModuleInfo for the encapsulated
+ * module
+ */
+ KCModuleInfo moduleInfo() const;
+
+ /**
+ * Returns the DBUS Service name
+ */
+ QString dbusService() const;
+ /**
+ * Returns the DBUS Path
+ */
+ QString dbusPath() const;
+
+public Q_SLOTS:
+
+ /**
+ * Calling it will cause the contained module to
+ * load its default values.
+ */
+ void defaults();
+
+ /**
+ * Calling this, results in deleting the contained
+ * module, and unregistering from DCOP. A similar result is achieved
+ * by deleting the KCModuleProxy itself.
+ */
+ void deleteClient();
+
+Q_SIGNALS:
+
+ /*
+ * This signal is emitted when the contained module is changed.
+ */
+ void changed( bool state );
+
+ /**
+ * This is emitted in the same situations as in the one above. Practical
+ * when several KCModuleProxys are loaded.
+ */
+ void changed( KCModuleProxy* mod );
+
+ /**
+ * When a module running with root privileges and exits, returns to normal mode, the
+ * childClosed() signal is emitted.
+ */
+ void childClosed();
+
+ /*
+ * This signal is relayed from the encapsulated module, and
+ * is equivalent to the module's own quickHelpChanged() signal.
+ */
+ void quickHelpChanged();
+
+protected:
+
+ /**
+ * Reimplemented for internal purposes. Makes sure the encapsulated
+ * module is loaded before the show event is taken care of.
+ */
+ void showEvent( QShowEvent * );
+
+protected:
+ KCModuleProxyPrivate *const d_ptr;
+
+private:
+ Q_PRIVATE_SLOT(d_func(), void _k_moduleChanged(bool))
+ Q_PRIVATE_SLOT(d_func(), void _k_moduleDestroyed())
+ Q_PRIVATE_SLOT(d_func(), void _k_ownerChanged(const QString &service, const QString &oldOwner, const QString &newOwner))
+};
+
+#endif // KUTILS_KCMODULEPROXY_H
+// vim: ts=4
Added: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy_p.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy_p.h?rev=44206&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy_p.h (added)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/kcmoduleproxy_p.h Wed Feb 6 17:22:45 2008
@@ -0,0 +1,77 @@
+/* This file is part of the KDE project
+ Copyright (C) 2007 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef KUTILS_KCMODULEPROXY_P_H
+#define KUTILS_KCMODULEPROXY_P_H
+
+#include "kcmoduleinfo.h"
+#include "kcmoduleproxy.h"
+#include
+class QVBoxLayout;
+
+class KCModuleProxyPrivate
+{
+ Q_DECLARE_PUBLIC(KCModuleProxy)
+ protected:
+ KCModuleProxyPrivate(KCModuleProxy *_parent, const KCModuleInfo &info, const QStringList &_args)
+ : args(_args), kcm(0), topLayout(0), rootInfo(0), modInfo(info),
+ changed(false), bogusOccupier(false), parent(_parent)
+ {
+ }
+
+ ~KCModuleProxyPrivate()
+ {
+ delete rootInfo; // Delete before embedWidget!
+ delete kcm;
+ }
+
+ void loadModule();
+
+ /**
+ * Makes sure the proper variables is set and signals are emitted.
+ */
+ void _k_moduleChanged(bool);
+
+ /**
+ * Zeroes d->kcm
+ */
+ void _k_moduleDestroyed();
+
+ /**
+ * Gets called by DCOP when an application closes.
+ * Is used to (try to) reload a KCM which previously
+ * was loaded.
+ */
+ void _k_ownerChanged(const QString &service, const QString &oldOwner, const QString &newOwner);
+
+ QStringList args;
+ KCModule *kcm;
+ QVBoxLayout *topLayout; /* Contains QScrollView view, and root stuff */
+ QLabel *rootInfo;
+ QString dbusService;
+ QString dbusPath;
+ KCModuleInfo modInfo;
+ bool changed;
+ bool bogusOccupier;
+ KCModuleProxy *parent;
+ KCModuleProxy *q_ptr;
+};
+
+#endif // KUTILS_KCMODULEPROXY_P_H
+// vim: sw=4 sts=4 et tw=100
Added: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.cpp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.cpp?rev=44206&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.cpp (added)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.cpp Wed Feb 6 17:22:45 2008
@@ -0,0 +1,36 @@
+#include "yservice.h"
+
+
+YService::YService()
+{
+}
+
+
+YService::~YService()
+{
+}
+
+QStringList YService::serviceTypes()
+{
+ return _serviceTypes;
+}
+
+QString YService::name()
+{
+ return _name;
+}
+
+QString YService::comment()
+{
+ return _comment;
+}
+
+QString YService::icon()
+{
+ return _icon;
+}
+
+QVariant YService::property(const QString& _name) // , QVariant::Type t) const
+{
+ return _property;
+}
Added: branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.h?rev=44206&view=auto
==============================================================================
--- branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.h (added)
+++ branches/tmp/tgoettlicher/yast2_2nd_rewrite/systemsettings/yservice.h Wed Feb 6 17:22:45 2008
@@ -0,0 +1,36 @@
+#ifndef YSERVICE_H
+#define YSERVICE_H
+
+#include <QString>
+#include <QStringList>
+#include <QVariant>
+
+
+class YService {
+public:
+ YService();
+ ~YService();
+
+ typedef YService* Ptr;
+ typedef QList<Ptr> List;
+
+ QString name();
+ QString comment();
+ QString icon();
+ QStringList serviceTypes() ;
+ QVariant property( const QString& _name); //, QVariant::Type t) const;
+
+
+ QStringList _serviceTypes;
+ QString _name;
+ QString _comment;
+ QString _icon;
+ QVariant _property;
+
+
+ int weight;
+
+
+};
+
+#endif
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org