Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
209
Issues
209
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
27e8f7b0
Commit
27e8f7b0
authored
Jan 16, 2013
by
Stéphane Albert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: Added mvdMyWidget (similar to mvdMyClass) template files.
parent
2f5d2704
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
392 additions
and
3 deletions
+392
-3
Code/Application/mvdMainWindow.cxx
Code/Application/mvdMainWindow.cxx
+2
-0
Code/Common/mvdColorDynamicsWidget.ui
Code/Common/mvdColorDynamicsWidget.ui
+203
-0
Code/Common/mvdMyWidget.cxx
Code/Common/mvdMyWidget.cxx
+69
-0
Code/Common/mvdMyWidget.h
Code/Common/mvdMyWidget.h
+108
-0
Code/Common/mvdVectorImageModel.cxx
Code/Common/mvdVectorImageModel.cxx
+10
-3
No files found.
Code/Application/mvdMainWindow.cxx
View file @
27e8f7b0
...
...
@@ -266,6 +266,8 @@ MainWindow
// Setup color-setup controller.
colorSetupWidget
->
blockSignals
(
true
);
{
// qDebug() << vectorImageModel->GetBandNames();
colorSetupWidget
->
SetComponents
(
vectorImageModel
->
GetBandNames
()
);
for
(
int
i
=
0
;
i
<
ColorSetupWidget
::
CHANNEL_COUNT
;
++
i
)
...
...
Code/Common/mvdColorDynamicsWidget.ui
0 → 100644
View file @
27e8f7b0
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
mvd::ColorDynamicsWidget
</class>
<widget
class=
"QWidget"
name=
"mvd::ColorDynamicsWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
308
</width>
<height>
105
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<property
name=
"locale"
>
<locale
language=
"C"
country=
"AnyCountry"
/>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_3"
>
<item
row=
"0"
column=
"0"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QLabel"
name=
"m_LowLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Low
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item
row=
"0"
column=
"2"
>
<widget
class=
"QLabel"
name=
"m_HighLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
High
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"m_QuantileLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Quantile:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"m_LowQuantileSpinBox"
>
<property
name=
"frame"
>
<bool>
true
</bool>
</property>
<property
name=
"suffix"
>
<string>
%
</string>
</property>
<property
name=
"value"
>
<double>
2.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"1"
column=
"2"
>
<widget
class=
"QDoubleSpinBox"
name=
"m_HighQuantileSpinBox"
>
<property
name=
"frame"
>
<bool>
true
</bool>
</property>
<property
name=
"suffix"
>
<string>
%
</string>
</property>
<property
name=
"value"
>
<double>
2.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"1"
column=
"3"
>
<widget
class=
"QPushButton"
name=
"m_DefaultsButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Defaults
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"m_ValueLabel"
>
<property
name=
"text"
>
<string>
Value:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"m_LowValueSpinBox"
>
<property
name=
"frame"
>
<bool>
true
</bool>
</property>
<property
name=
"suffix"
>
<string/>
</property>
<property
name=
"maximum"
>
<double>
255.000000000000000
</double>
</property>
<property
name=
"value"
>
<double>
0.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"2"
column=
"2"
>
<widget
class=
"QDoubleSpinBox"
name=
"m_HighValueSpinBox"
>
<property
name=
"frame"
>
<bool>
true
</bool>
</property>
<property
name=
"suffix"
>
<string/>
</property>
<property
name=
"maximum"
>
<double>
255.000000000000000
</double>
</property>
<property
name=
"value"
>
<double>
255.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"2"
column=
"3"
>
<widget
class=
"QPushButton"
name=
"m_MinMaxButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Min/Max
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"0"
column=
"1"
>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
45
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
1
</height>
</size>
</property>
</spacer>
</item>
</layout>
<zorder>
layoutWidget
</zorder>
<zorder>
layoutWidget
</zorder>
<zorder>
layoutWidget
</zorder>
<zorder>
layoutWidget
</zorder>
<zorder>
label_28
</zorder>
<zorder>
horizontalSpacer
</zorder>
<zorder>
verticalSpacer
</zorder>
</widget>
<resources/>
<connections/>
</ui>
Code/Common/mvdMyWidget.cxx
0 → 100644
View file @
27e8f7b0
/*=========================================================================
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 "mvdMyWidget.h"
#include "ui_mvdMyWidget.h"
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
//
// System includes (sorted by alphabetic order)
//
// ITK includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
namespace
mvd
{
/*
TRANSLATOR mvd::MyWidget
Necessary for lupdate to be aware of C++ namespaces.
Context comment for translator.
*/
/*******************************************************************************/
MyWidget
::
MyWidget
(
QWidget
*
parent
,
Qt
::
WindowFlags
flags
)
:
QWidget
(
parent
,
flags
),
m_UI
(
new
mvd
::
Ui
::
MyWidget
()
)
{
m_UI
->
setupUi
(
this
);
}
/*******************************************************************************/
MyWidget
::~
MyWidget
()
{
}
/*******************************************************************************/
/* SLOTS */
/*******************************************************************************/
/*******************************************************************************/
}
// end namespace 'mvd'
Code/Common/mvdMyWidget.h
0 → 100644
View file @
27e8f7b0
/*=========================================================================
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 __mvdMyWidget_h
#define __mvdMyWidget_h
//
// Configuration include.
//// Included at first position before any other ones.
#include "ConfigureMonteverdi2.h"
//
// 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)
//
// External classes pre-declaration.
namespace
{
}
namespace
mvd
{
//
// Internal classes pre-declaration.
namespace
Ui
{
class
MyWidget
;
};
/**
* \class MyWidget
*/
class
Monteverdi2_EXPORT
MyWidget
:
public
QWidget
{
Q_OBJECT
;
//
// Public methods.
public:
/** Constructor */
MyWidget
(
QWidget
*
parent
=
NULL
,
Qt
::
WindowFlags
flags
=
0
);
/** Destructor */
virtual
~
MyWidget
();
//
// SIGNALS.
signals:
//
// Protected methods.
protected:
//
// Protected attributes.
protected:
//
// Private methods.
private:
//
// Private attributes.
private:
/**
* uic generated.
*/
Ui
::
MyWidget
*
m_UI
;
//
// SLOTS.
private
slots
:
};
}
// end namespace 'mvd'
#endif // __mvdMyWidget_h
Code/Common/mvdVectorImageModel.cxx
View file @
27e8f7b0
...
...
@@ -89,10 +89,18 @@ VectorImageModel
StringVector
stdBandNames
(
GetMetadataInterface
()
->
GetBandName
()
);
/*
qDebug() << "stdBandNames.size(): " << stdBandNames.size();
for( unsigned int i=0; i<stdBandNames.size(); ++i )
{
qDebug() << i << ": " << QString::fromStdString( stdBandNames[ i ] );
}
*/
assert
(
stdBandNames
.
empty
()
||
stdBandNames
.
size
()
==
output
->
GetNumberOfComponentsPerPixel
()
);
if
(
stdBandNames
.
empty
()
)
if
(
stdBandNames
.
size
()
!=
output
->
GetNumberOfComponentsPerPixel
()
)
{
stdBandNames
.
resize
(
output
->
GetNumberOfComponentsPerPixel
()
);
}
...
...
@@ -128,11 +136,10 @@ VectorImageModel
// Ensure default display returns valid band indices (see OTB bug).
assert
(
metaData
->
GetDefaultDisplay
().
size
()
==
3
);
/*
assert( metaData->GetDefaultDisplay()[ 0 ]
< output->GetNumberOfComponentsPerPixel() );
assert( metaData->GetDefaultDisplay()[ 1 ]
<
assert( metaData->GetDefaultDisplay()[ 1 ]
< output->GetNumberOfComponentsPerPixel() );
assert( metaData->GetDefaultDisplay()[ 2 ]
< output->GetNumberOfComponentsPerPixel() );
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment