/*==============================================================================

  Program: 3D Slicer

  Copyright (c) Kitware Inc.

  See COPYRIGHT.txt
  or http://www.slicer.org/copyright/copyright.txt for details.

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  This file was originally developed by Michael Jeulin-Lagarrigue, Kitware Inc.
  and was partially funded by NIH grant 3P41RR013218-12S1

==============================================================================*/

// QTGUI includes
#include "qSlicerApplication.h"

// Reformat Logic includes
#include <vtkSlicerReformatLogic.h>

// Reformat includes
#include "qSlicerReformatModule.h"
#include "qSlicerReformatModuleWidget.h"

//------------------------------------------------------------------------------
class qSlicerReformatModulePrivate
{
public:
  qSlicerReformatModulePrivate();
};

//------------------------------------------------------------------------------
// qSlicerReformatModulePrivate methods

//------------------------------------------------------------------------------
qSlicerReformatModulePrivate::qSlicerReformatModulePrivate() = default;

//------------------------------------------------------------------------------
// qSlicerReformatModule methods

//------------------------------------------------------------------------------
qSlicerReformatModule::qSlicerReformatModule(QObject* _parent)
  : Superclass(_parent)
  , d_ptr(new qSlicerReformatModulePrivate)
{
}

//------------------------------------------------------------------------------
qSlicerReformatModule::~qSlicerReformatModule() = default;

//------------------------------------------------------------------------------
QString qSlicerReformatModule::helpText() const
{
  QString help = tr("The Transforms Reformat Widget Module creates"
                    " and edits the Slice Node transforms.")
                 + QLatin1String("<br>");
  help += this->defaultDocumentationLink();
  return help;
}

//------------------------------------------------------------------------------
QString qSlicerReformatModule::acknowledgementText() const
{
  return tr("This work was supported by NA-MIC, NAC, BIRN, NCIGT, and the Slicer Community.");
}

//------------------------------------------------------------------------------
QIcon qSlicerReformatModule::icon() const
{
  return QIcon(":/Icons/Reformat.png");
}

//-----------------------------------------------------------------------------
QStringList qSlicerReformatModule::categories() const
{
  return QStringList() << qSlicerAbstractCoreModule::tr("Registration.Specialized");
}

//-----------------------------------------------------------------------------
QStringList qSlicerReformatModule::contributors() const
{
  QStringList moduleContributors;
  moduleContributors << QString("Michael Jeulin-Lagarrigue (Kitware)");
  return moduleContributors;
}

//------------------------------------------------------------------------------
void qSlicerReformatModule::setup()
{
  this->Superclass::setup();
}

//------------------------------------------------------------------------------
qSlicerAbstractModuleRepresentation* qSlicerReformatModule::createWidgetRepresentation()
{
  return new qSlicerReformatModuleWidget;
}

//------------------------------------------------------------------------------
vtkMRMLAbstractLogic* qSlicerReformatModule::createLogic()
{
  return vtkSlicerReformatLogic::New();
}

//-----------------------------------------------------------------------------
QStringList qSlicerReformatModule::associatedNodeTypes() const
{
  return QStringList() //
         << "vtkMRMLSliceNode"
         << "vtkMRMLSliceCompositeNode";
}
