Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
2ffad70b
Commit
2ffad70b
authored
Mar 07, 2013
by
Stéphane Albert
Browse files
ENH: Linked update of rendering settings to refresh of XML descriptor.
parent
756d6c8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Code/Common/mvdDatasetModel.cxx
View file @
2ffad70b
...
...
@@ -143,7 +143,7 @@ DatasetModel
if
(
id
<
0
)
{
//
// 2.
3
: Add image to Dataset descriptor file...
// 2.
4a
: Add image to Dataset descriptor file...
m_Descriptor
->
InsertImageModel
(
// ...providing newly calculated image-model ID.
context
.
m_Id
,
...
...
@@ -153,9 +153,21 @@ DatasetModel
);
//
// 2.
4
: Force writing descriptor with newly imported image.
// 2.
5a
: Force writing descriptor with newly imported image.
WriteDescriptor
();
}
//
// 2.6
// Connect rendering-settings updated of image-model to
// dataset-model in order to update XML descriptor.
QObject
::
connect
(
vectorImageModel
,
SIGNAL
(
SettingsUpdated
(
AbstractImageModel
*
)
),
// to:
this
,
SLOT
(
OnSettingsUpdated
(
AbstractImageModel
*
)
)
);
}
catch
(
std
::
exception
&
exc
)
{
...
...
@@ -318,5 +330,23 @@ DatasetModel
/*******************************************************************************/
/*******************************************************************************/
void
DatasetModel
::
OnSettingsUpdated
(
AbstractImageModel
*
imageModel
)
{
assert
(
imageModel
!=
NULL
);
qDebug
()
<<
"DatasetModel::OnSettingsUpdated("
<<
imageModel
->
GetId
()
<<
")"
;
VectorImageModel
*
vectorImageModel
=
qobject_cast
<
VectorImageModel
*
>
(
imageModel
);
assert
(
vectorImageModel
!=
NULL
);
m_Descriptor
->
SetImageModel
(
vectorImageModel
->
GetId
(),
&
vectorImageModel
->
GetSettings
()
);
}
}
// end namespace 'mvd'
Code/Common/mvdDatasetModel.h
View file @
2ffad70b
...
...
@@ -240,6 +240,9 @@ private:
//
// Slots.
private
slots
:
/**
*/
void
OnSettingsUpdated
(
AbstractImageModel
*
);
};
}
// end namespace 'mvd'
...
...
Code/Common/mvdVectorImageModel.cxx
View file @
2ffad70b
...
...
@@ -774,11 +774,6 @@ VectorImageModel
// Update quicklook rendering-settings.
quicklookModel
->
SetSettings
(
GetSettings
()
);
quicklookModel
->
OnModelUpdated
();
// Ensure parent model is dataset-model.
assert
(
GetDatasetModel
()
!=
NULL
);
// Get parent dataset-model.
DatasetModel
*
datasetModel
=
GetDatasetModel
();
}
// TODO: Update DatasetDescriptor.
...
...
@@ -786,7 +781,7 @@ VectorImageModel
// Emit rendering settings are updated so that display could be
// refreshed.
emit
SettingsUpdated
();
emit
SettingsUpdated
(
this
);
}
/*******************************************************************************/
...
...
Code/Common/mvdVectorImageModel.h
View file @
2ffad70b
...
...
@@ -392,10 +392,13 @@ public slots:
//
// Signals.
signals:
/** */
void
SettingsUpdated
();
/**
*/
void
SettingsUpdated
(
AbstractImageModel
*
imageModel
=
NULL
);
/** */
void
ViewportRegionChanged
(
double
,
double
);
/** */
void
CurrentIndexUpdated
(
const
QString
&
);
void
CurrentPhysicalUpdated
(
const
QString
&
);
...
...
Write
Preview
Supports
Markdown
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