[opengtl-commits] [615] add missing files

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 615
Author:   cyrille
Date:     2009-03-14 11:09:20 +0100 (Sat, 14 Mar 2009)

Log Message:
-----------
add missing files

Added Paths:
-----------
    trunk/libQtGTL/QtShiva/KernelParametersWidget.cpp
    trunk/libQtGTL/QtShiva/KernelParametersWidget.h
    trunk/libQtGTL/QtShiva/SourceParametersWidget.cpp
    trunk/libQtGTL/QtShiva/SourceParametersWidget.h


Added: trunk/libQtGTL/QtShiva/KernelParametersWidget.cpp
===================================================================
--- trunk/libQtGTL/QtShiva/KernelParametersWidget.cpp	                        (rev 0)
+++ trunk/libQtGTL/QtShiva/KernelParametersWidget.cpp	2009-03-14 10:09:20 UTC (rev 615)
@@ -0,0 +1,86 @@
+/*
+ *  Copyright (c) 2009 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2 of the license.
+ *
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "KernelParametersWidget.h"
+
+#include "ParametersWidgetBase_p.h"
+
+#include <GTLCore/Value.h>
+#include <OpenShiva/Kernel.h>
+#include <OpenShiva/Metadata.h>
+
+using namespace QtShiva;
+
+class KernelParametersWidget::KernelParametrisation : public ParametersWidgetBase::Parametrisation {
+  public:
+    KernelParametrisation() : m_kernel(0) {}
+    virtual const GTLCore::Metadata::Group* parameters() const;
+    virtual const GTLCore::String& name() const;
+    virtual void setParameter( const GTLCore::String& _name, GTLCore::Value );
+    void setKernel( OpenShiva::Kernel* _kernel );
+  private:
+    OpenShiva::Kernel* m_kernel;
+};
+
+const GTLCore::Metadata::Group* KernelParametersWidget::KernelParametrisation::parameters() const
+{
+  if( m_kernel and m_kernel->metadata() )
+  {
+    return m_kernel->metadata()->parameters();
+  } else {
+    return 0;
+  }
+}
+
+const GTLCore::String& KernelParametersWidget::KernelParametrisation::name() const
+{
+  return m_kernel->name();
+}
+
+void KernelParametersWidget::KernelParametrisation::setParameter( const GTLCore::String& _name, GTLCore::Value _value)
+{
+  m_kernel->setParameter(_name, _value);
+  p->regenerateWidget();
+}
+
+void KernelParametersWidget::KernelParametrisation::setKernel( OpenShiva::Kernel* _kernel )
+{
+  m_kernel = _kernel;
+}
+
+struct KernelParametersWidget::Private {
+  KernelParametrisation* parametrisation;
+};
+
+
+KernelParametersWidget::KernelParametersWidget( QWidget* parent ) : ParametersWidgetBase(parent), d(new Private)
+{
+  d->parametrisation = new KernelParametrisation;
+  setParametrisation(d->parametrisation);
+}
+
+KernelParametersWidget::~KernelParametersWidget()
+{
+  delete d;
+}
+
+void KernelParametersWidget::setKernel( OpenShiva::Kernel* _kernel )
+{
+  d->parametrisation->setKernel(_kernel);
+}

Added: trunk/libQtGTL/QtShiva/KernelParametersWidget.h
===================================================================
--- trunk/libQtGTL/QtShiva/KernelParametersWidget.h	                        (rev 0)
+++ trunk/libQtGTL/QtShiva/KernelParametersWidget.h	2009-03-14 10:09:20 UTC (rev 615)
@@ -0,0 +1,40 @@
+/*
+ *  Copyright (c) 2009 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2 of the license.
+ *
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _OPENSHIVA_KERNEL_PARAMETERS_WIDGET_H_
+#define _OPENSHIVA_KERNEL_PARAMETERS_WIDGET_H_
+
+#include <QtShiva/ParametersWidgetBase.h>
+
+namespace QtShiva {
+  
+  class KernelParametersWidget : public ParametersWidgetBase {
+    class KernelParametrisation;
+    public:
+      KernelParametersWidget( QWidget* );
+      ~KernelParametersWidget();
+    public:
+      void setKernel( OpenShiva::Kernel* _kernel );
+    private:
+      struct Private;
+      Private* const d;
+  };
+};
+
+#endif

Added: trunk/libQtGTL/QtShiva/SourceParametersWidget.cpp
===================================================================
--- trunk/libQtGTL/QtShiva/SourceParametersWidget.cpp	                        (rev 0)
+++ trunk/libQtGTL/QtShiva/SourceParametersWidget.cpp	2009-03-14 10:09:20 UTC (rev 615)
@@ -0,0 +1,37 @@
+/*
+ *  Copyright (c) 2009 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2 of the license.
+ *
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "SourceParametersWidget.h"
+
+using namespace QtShiva;
+
+struct SourceParametersWidget::Private {
+  
+};
+
+
+SourceParametersWidget::SourceParametersWidget( QWidget* parent ) : ParametersWidgetBase(parent), d(new Private)
+{
+}
+
+SourceParametersWidget::~SourceParametersWidget()
+{
+  delete d;
+}
+

Added: trunk/libQtGTL/QtShiva/SourceParametersWidget.h
===================================================================
--- trunk/libQtGTL/QtShiva/SourceParametersWidget.h	                        (rev 0)
+++ trunk/libQtGTL/QtShiva/SourceParametersWidget.h	2009-03-14 10:09:20 UTC (rev 615)
@@ -0,0 +1,37 @@
+/*
+ *  Copyright (c) 2009 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2 of the license.
+ *
+ * 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _OPENSHIVA_SOURCE_PARAMETERS_WIDGET_H_
+#define _OPENSHIVA_SOURCE_PARAMETERS_WIDGET_H_
+
+#include <QtShiva/ParametersWidgetBase.h>
+
+namespace QtShiva {
+  
+  class SourceParametersWidget : public ParametersWidgetBase {
+    public:
+      SourceParametersWidget( QWidget* );
+      ~SourceParametersWidget();
+    private:
+      struct Private;
+      Private* const d;
+  };
+};
+
+#endif


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/