Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
d3659af5
Commit
d3659af5
authored
13 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add message in Qt GUI
parent
1316104e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx
+19
-1
19 additions, 1 deletion
Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx
Code/Wrappers/QtWidget/otbWrapperQtWidgetView.h
+5
-0
5 additions, 0 deletions
Code/Wrappers/QtWidget/otbWrapperQtWidgetView.h
with
24 additions
and
1 deletion
Code/Wrappers/QtWidget/otbWrapperQtWidgetView.cxx
+
19
−
1
View file @
d3659af5
...
...
@@ -47,7 +47,7 @@ void QtWidgetView::CreateGui()
// Create a VBoxLayout with the header, the input widgets, and the footer
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
();
QTabWidget
*
tab
=
new
QTabWidget
();
tab
->
addTab
(
CreateInputWidgets
(),
"Parameters"
);
QTextEdit
*
log
=
new
QTextEdit
();
connect
(
m_Model
->
GetLogOutput
(),
SIGNAL
(
NewContentLog
(
QString
)),
log
,
SLOT
(
append
(
QString
)
)
);
...
...
@@ -58,8 +58,13 @@ void QtWidgetView::CreateGui()
tab
->
addTab
(
CreateDoc
(),
"Documentation"
);
mainLayout
->
addWidget
(
tab
);
m_Message
=
new
QLabel
(
"<center><font color=
\"
#FF0000
\"
>Select parameters</font></center>"
);
connect
(
m_Model
,
SIGNAL
(
SetApplicationReady
(
bool
)),
this
,
SLOT
(
UpdateMessageAfterApplicationReady
(
bool
))
);
mainLayout
->
addWidget
(
m_Message
);
QtWidgetSimpleProgressReport
*
progressReport
=
new
QtWidgetSimpleProgressReport
(
m_Model
);
progressReport
->
SetApplication
(
m_Application
);
QHBoxLayout
*
footLayout
=
new
QHBoxLayout
;
footLayout
->
addWidget
(
progressReport
);
footLayout
->
addWidget
(
CreateFooter
());
...
...
@@ -75,6 +80,18 @@ void QtWidgetView::CreateGui()
this
->
setLayout
(
finalLayout
);
}
void
QtWidgetView
::
UpdateMessageAfterExcuteClicked
()
{
m_Message
->
setText
(
"<center><font color=
\"
#FF0000
\"
>Running</font></center>"
);
}
void
QtWidgetView
::
UpdateMessageAfterApplicationReady
(
bool
val
)
{
if
(
val
==
true
)
m_Message
->
setText
(
"<center><font color=
\"
#00FF00
\"
>Ready to run</font></center>"
);
else
m_Message
->
setText
(
"<center><font color=
\"
#FF0000
\"
>Select parameters</font></center>"
);
}
QWidget
*
QtWidgetView
::
CreateInputWidgets
()
{
...
...
@@ -105,6 +122,7 @@ QWidget* QtWidgetView::CreateFooter()
m_ExecButton
->
setText
(
QObject
::
tr
(
"Execute"
));
connect
(
m_ExecButton
,
SIGNAL
(
clicked
()),
m_Model
,
SLOT
(
ExecuteAndWriteOutputSlot
()
)
);
connect
(
m_Model
,
SIGNAL
(
SetApplicationReady
(
bool
)),
m_ExecButton
,
SLOT
(
setEnabled
(
bool
))
);
connect
(
m_ExecButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
UpdateMessageAfterExcuteClicked
()
)
);
m_QuitButton
=
new
QPushButton
(
footerGroup
);
m_QuitButton
->
setText
(
QObject
::
tr
(
"Quit"
));
...
...
This diff is collapsed.
Click to expand it.
Code/Wrappers/QtWidget/otbWrapperQtWidgetView.h
+
5
−
0
View file @
d3659af5
...
...
@@ -48,6 +48,10 @@ public:
public
slots
:
void
CloseSlot
();
private
slots
:
void
UpdateMessageAfterExcuteClicked
();
void
UpdateMessageAfterApplicationReady
(
bool
val
);
signals
:
void
QuitSignal
();
...
...
@@ -77,6 +81,7 @@ private:
QPushButton
*
m_ExecButton
;
QPushButton
*
m_QuitButton
;
QLabel
*
m_Message
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment