Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
John Tourtellott
ACE3P Extensions
Commits
07ac99fb
Commit
07ac99fb
authored
Dec 23, 2019
by
John Tourtellott
Browse files
Add paraview manager to store newt session id
So that project manager can add it to the export dialog
parent
28fa919f
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugin/pqCumulusJobsPanel.cxx
View file @
07ac99fb
...
...
@@ -12,6 +12,8 @@
#include
"smtk/cumulus/jobspanel/cumuluswidget.h"
#include
"smtk/cumulus/jobspanel/job.h"
#include
"pqApplicationCore.h"
#include
<QAction>
#include
<QDebug>
#include
<QFormLayout>
...
...
@@ -38,14 +40,18 @@ public:
QPushButton
*
AuthenticateButton
;
cumulus
::
CumulusWidget
*
CumulusWidget
;
// Used to provide NEWT session info to other plugins
QObject
*
JobsPanelObject
;
};
pqCumulusJobsPanel
::
pqCumulusJobsPanelInternal
::
pqCumulusJobsPanelInternal
()
:
MainWidget
(
0
)
,
MainLayout
(
0
)
,
FirstWidget
(
0
)
,
CumulusUrlEdit
(
0
)
,
CumulusWidget
(
0
)
:
MainWidget
(
nullptr
)
,
MainLayout
(
nullptr
)
,
FirstWidget
(
nullptr
)
,
CumulusUrlEdit
(
nullptr
)
,
CumulusWidget
(
nullptr
)
,
JobsPanelObject
(
nullptr
)
{
}
...
...
@@ -103,6 +109,16 @@ pqCumulusJobsPanel::pqCumulusJobsPanel(QWidget* parent)
// Finish main widget
this
->
Internal
->
MainWidget
->
setLayout
(
this
->
Internal
->
MainLayout
);
this
->
setWidget
(
this
->
Internal
->
MainWidget
);
// Register JobsPanelInfo as a paraview manager, for use by other plugins
auto
pqCore
=
pqApplicationCore
::
instance
();
if
(
!
pqCore
)
{
qWarning
()
<<
"pqCumulusJobsPanel missing pqApplicationCore"
;
return
;
}
this
->
Internal
->
JobsPanelObject
=
new
QObject
;
pqCore
->
registerManager
(
QString
(
"jobs_panel"
),
this
->
Internal
->
JobsPanelObject
);
}
pqCumulusJobsPanel
::~
pqCumulusJobsPanel
()
...
...
@@ -165,6 +181,9 @@ void pqCumulusJobsPanel::requestSimulationResults()
void
pqCumulusJobsPanel
::
receivedNewtSessionId
(
const
QString
&
sessionId
,
int
lifetime
)
{
this
->
Internal
->
JobsPanelObject
->
setProperty
(
"newt_sessionid"
,
sessionId
);
// Todo add expiration datetime based on lifetime seconds
this
->
Internal
->
SessionIdEdit
->
setText
(
sessionId
);
bool
enable
=
sessionId
.
isEmpty
();
this
->
Internal
->
AuthenticateButton
->
setEnabled
(
enable
);
...
...
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