<commit_before>/*=========================================================================

Program:   Medical Imaging & Interaction Toolkit
Language:  C++
Date:      $Date$
Version:   $Revision: 11316 $ 

Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.

This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the above copyright notices for more information.

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

#include "QmitkSliderDialogBar.h"
#include "QmitkSliderNavigator.h"
#include "QmitkStepperAdapter.h"
#include "QmitkStdMultiWidget.h"
#include "QmitkSliderDialogBar.xpm"

#include <qaction.h>
#include <qlabel.h>
#include <qvbox.h>
#include <qgrid.h>

QmitkSliderDialogBar
::QmitkSliderDialogBar( 
  QObject *parent, const char *name, QmitkStdMultiWidget *multiWidget, 
  mitk::DataTreeIteratorBase *dataIt )
: QmitkDialogBar( "Slicer", parent, name, multiWidget, dataIt )
{
}

QmitkSliderDialogBar
::~QmitkSliderDialogBar()
{
}


QString 
QmitkSliderDialogBar
::GetFunctionalityName()
{
  return "SliderDialogBar";
}


QAction *
QmitkSliderDialogBar
::CreateAction( QObject *parent )
{
  QAction* action;
  action = new QAction( 
    tr( "Slicer" ), 
    QPixmap((const char**)QmitkSliderDialogBar_xpm), 
    tr( "Slicer" ), 
    0, 
    parent, 
    "QmitkSliderDialogBar" );

  return action;
}

QWidget *
QmitkSliderDialogBar
::CreateDialogBar( QWidget *parent )
{
  QGrid *grid = new QGrid( 2, Qt::Horizontal, parent );

  new QLabel( "Transversal", grid );
  QmitkSliderNavigator *sliderNavigator1 = new QmitkSliderNavigator( grid );

  new QLabel( "Sagittal", grid );
  QmitkSliderNavigator *sliderNavigator2 = new QmitkSliderNavigator( grid );

  new QLabel( "Coronal", grid );
  QmitkSliderNavigator *sliderNavigator3 = new QmitkSliderNavigator( grid );

  new QLabel( "Time", grid );
  QmitkSliderNavigator *sliderNavigatorTime = new QmitkSliderNavigator( grid );

  sliderNavigator1->ShowLabels( true );
  sliderNavigator2->ShowLabels( true );
  sliderNavigator3->ShowLabels( true );
  sliderNavigatorTime->ShowLabels( true );<commit_msg>STYLE: named widgets to be able to retrieve them later by name...<commit_after>/*=========================================================================

Program:   Medical Imaging & Interaction Toolkit
Language:  C++
Date:      $Date$
Version:   $Revision: 11316 $ 

Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyright.txt or http://www.mitk.org/copyright.html for details.

This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the above copyright notices for more information.

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

#include "QmitkSliderDialogBar.h"
#include "QmitkSliderNavigator.h"
#include "QmitkStepperAdapter.h"
#include "QmitkStdMultiWidget.h"
#include "QmitkSliderDialogBar.xpm"

#include <qaction.h>
#include <qlabel.h>
#include <qvbox.h>
#include <qgrid.h>

QmitkSliderDialogBar
::QmitkSliderDialogBar( 
  QObject *parent, const char *name, QmitkStdMultiWidget *multiWidget, 
  mitk::DataTreeIteratorBase *dataIt )
: QmitkDialogBar( "Slicer", parent, name, multiWidget, dataIt )
{
}

QmitkSliderDialogBar
::~QmitkSliderDialogBar()
{
}


QString 
QmitkSliderDialogBar
::GetFunctionalityName()
{
  return "SliderDialogBar";
}


QAction *
QmitkSliderDialogBar
::CreateAction( QObject *parent )
{
  QAction* action;
  action = new QAction( 
    tr( "Slicer" ), 
    QPixmap((const char**)QmitkSliderDialogBar_xpm), 
    tr( "Slicer" ), 
    0, 
    parent, 
    "QmitkSliderDialogBar" );

  return action;
}

QWidget *
QmitkSliderDialogBar
::CreateDialogBar( QWidget *parent )
{
  QGrid *grid = new QGrid( 2, Qt::Horizontal, parent );

  new QLabel( "Transversal", grid );
  QmitkSliderNavigator *sliderNavigator1 = new QmitkSliderNavigator( grid, "Transversal Slider" );

  new QLabel( "Sagittal", grid );
  QmitkSliderNavigator *sliderNavigator2 = new QmitkSliderNavigator( grid, "Sagittal Slider" );

  new QLabel( "Coronal", grid );
  QmitkSliderNavigator *sliderNavigator3 = new QmitkSliderNavigator( grid, "Coronal Slider" );

  new QLabel( "Time", grid );
  QmitkSliderNavigator *sliderNavigatorTime = new QmitkSliderNavigator( grid, "Time Slider" );

  sliderNavigator1->ShowLabels( true );
  sliderNavigator2->ShowLabels( true );
  sliderNavigator3->ShowLabels( true );
  sliderNavigatorTime->ShowLabels( true );
{'fraction_non_alphanumeric': 0.16057166876839007, 'fraction_numerical': 0.00546448087431694, 'mean_word_length': 5.582295988934993, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1780793', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1511, 'n_words': 381}