From 0b86a8e500d2afbce252d03915f7d884d83b73d7 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Wed, 28 Sep 2022 15:11:02 +0200 Subject: [PATCH] rm GUI/ba3d/widget - was unused --- GUI/ba3d/widget/widget.cpp | 74 -------------------------------------- GUI/ba3d/widget/widget.h | 51 -------------------------- 2 files changed, 125 deletions(-) delete mode 100644 GUI/ba3d/widget/widget.cpp delete mode 100644 GUI/ba3d/widget/widget.h diff --git a/GUI/ba3d/widget/widget.cpp b/GUI/ba3d/widget/widget.cpp deleted file mode 100644 index f0d70b4aa51..00000000000 --- a/GUI/ba3d/widget/widget.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/ba3d/widget/widget.cpp -//! @brief Implement Widget class -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2018 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#include "GUI/ba3d/widget/widget.h" -#include "GUI/ba3d/model/model.h" -#include "GUI/ba3d/view/canvas.h" -#include "GUI/ba3d/view/program.h" - -#include <QBoxLayout> - -namespace GUI::RealSpace { - -//------------------------------------------------------------------------------ - -Widget3D::Widget3D() - : canvas(nullptr) -{ - auto* box = new QHBoxLayout; - setLayout(box); - box->setContentsMargins(0, 0, 0, 0); - box->addWidget((canvas = new Canvas)); -} - -Widget3D::~Widget3D() = default; - -Camera& Widget3D::cam() -{ - return *canvas->cam(); -} - -void Widget3D::setBackground(QColor const& color) -{ - canvas->setBgColor(color); -} - -void Widget3D::setModel(Model* model) -{ - canvas->setModel(model); -} - -void Widget3D::defaultView() -{ - canvas->defaultView(); -} - -void Widget3D::sideView() -{ - canvas->sideView(); -} - -void Widget3D::topView() -{ - canvas->topView(); -} - -Model* Widget3D::model() -{ - return canvas->getModel(); -} - -//------------------------------------------------------------------------------ - -} // namespace GUI::RealSpace diff --git a/GUI/ba3d/widget/widget.h b/GUI/ba3d/widget/widget.h deleted file mode 100644 index 3a58f83eb3d..00000000000 --- a/GUI/ba3d/widget/widget.h +++ /dev/null @@ -1,51 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/ba3d/widget/widget.h -//! @brief Defines Widget class -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2018 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#ifndef BORNAGAIN_GUI_BA3D_WIDGET_WIDGET_H -#define BORNAGAIN_GUI_BA3D_WIDGET_WIDGET_H - -#include "GUI/ba3d/model/FloatVector3D.h" -#include <QWidget> - -namespace GUI::RealSpace { - -class Model; -class Canvas; -class Camera; -class Program; - -class Widget3D : public QWidget { - Q_OBJECT -public: - Widget3D(); - ~Widget3D() override; - - Camera& cam(); - - void setBackground(QColor const&); - void setModel(Model*); // model owned elsewhere, may be nullptr - - void defaultView(); - void sideView(); - void topView(); - - Model* model(); - -private: - Canvas* canvas; -}; - -} // namespace GUI::RealSpace - -#endif // BORNAGAIN_GUI_BA3D_WIDGET_WIDGET_H -- GitLab