Commit 423b43d7 authored by Otmane Lahlou's avatar Otmane Lahlou

ADD: subclass TreeWidgetItem to store the datasetId

parent a640b5d1
......@@ -29,6 +29,7 @@ set( Common_Gui_SOURCES
mvdDatabaseTreeWidget.cxx
mvdDatasetPropertiesWidget.cxx
mvdDatasetPropertiesController.cxx
mvdDatasetTreeWidgetItem.cxx
)
#############################################################################
......@@ -62,6 +63,7 @@ set( Common_Gui_HEADERS_MOC
mvdDatabaseTreeWidget.h
mvdDatasetPropertiesWidget.h
mvdDatasetPropertiesController.h
mvdDatasetTreeWidgetItem.h
)
#############################################################################
......
/*=========================================================================
Program: Monteverdi2
Language: C++
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See Copyright.txt for details.
Monteverdi2 is distributed under the CeCILL licence version 2. See
Licence_CeCILL_V2-en.txt or
http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt for more 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 "Gui/mvdDatasetTreeWidgetItem.h"
/*****************************************************************************/
/* INCLUDE SECTION */
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
//
// System includes (sorted by alphabetic order)
#include <cassert>
//
// ITK includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
namespace mvd
{
/*
TRANSLATOR mvd::DatasetTreeWidgetItem
Necessary for lupdate to be aware of C++ namespaces.
Context comment for translator.
*/
/*****************************************************************************/
/* CONSTANTS */
/*****************************************************************************/
/* STATIC IMPLEMENTATION SECTION */
/*****************************************************************************/
/* CLASS IMPLEMENTATION SECTION */
/*******************************************************************************/
DatasetTreeWidgetItem
::DatasetTreeWidgetItem(const QString & datasetId,
QTreeWidgetItem* parent,
const QStringList & stringList):
m_DatasetId( datasetId ),
QTreeWidgetItem( parent, stringList)
{
}
/*******************************************************************************/
DatasetTreeWidgetItem
::~DatasetTreeWidgetItem()
{
}
/*******************************************************************************/
const QString &
DatasetTreeWidgetItem
::GetDatasetId()
{
return m_DatasetId;
}
} // end namespace 'mvd'
/*=========================================================================
Program: Monteverdi2
Language: C++
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See Copyright.txt for details.
Monteverdi2 is distributed under the CeCILL licence version 2. See
Licence_CeCILL_V2-en.txt or
http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt for more 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.
=========================================================================*/
#ifndef __mvdDatasetTreeWidgetItem_h
#define __mvdDatasetTreeWidgetItem_h
//
// Configuration include.
//// Included at first position before any other ones.
#include "ConfigureMonteverdi2.h"
/*****************************************************************************/
/* INCLUDE SECTION */
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
#include <QtGui>
//
// System includes (sorted by alphabetic order)
//
// ITK includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
/*****************************************************************************/
/* PRE-DECLARATION SECTION */
//
// External classes pre-declaration.
namespace
{
}
namespace mvd
{
//
// Internal classes pre-declaration.
class BackgroundTask;
/*****************************************************************************/
/* CLASS DEFINITION SECTION */
/**
* \class DatasetTreeWidgetItem
*
* \brief
*/
class Monteverdi2_EXPORT DatasetTreeWidgetItem :
public QTreeWidgetItem
{
/*-[ PUBLIC SECTION ]------------------------------------------------------*/
//
// Public methods.
public:
/**
* \brief Constructor.
*/
DatasetTreeWidgetItem(const QString & datasetId,
QTreeWidgetItem* parent,
const QStringList & stringList
);
/**
* \brief Destructor.
*/
virtual ~DatasetTreeWidgetItem();
/**
* \brief Get the datasetID
*/
const QString & GetDatasetId();
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
//
// Public SLOTS.
public slots:
/*-[ SIGNALS SECTION ]-----------------------------------------------------*/
//
// Signals.
signals:
/*-[ PROTECTED SECTION ]---------------------------------------------------*/
//
// Protected methods.
protected:
/*-[ PRIVATE SECTION ]-----------------------------------------------------*/
//
// Protected attributes.
protected:
//
// Private methods.
private:
//
// Private attributes.
private:
QString m_DatasetId;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
//
// Slots.
private slots:
};
} // end namespace 'mvd'
#endif // __mvdDatasetTreeWidgetItem_h
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment