qtJobsWidget.h 1.83 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//=========================================================================
//  Copyright (c) Kitware, Inc.
//  All rights reserved.
//  See LICENSE.txt for 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 notice for more information.
//=========================================================================
#ifndef smtk_simulation_ace3p_qt_qtJobsWidget
#define smtk_simulation_ace3p_qt_qtJobsWidget

#include "smtk/simulation/ace3p/qt/Exports.h"

#include <QWidget>

#include "smtk/PublicPointerDefs.h"

class QItemSelection;

namespace Ui
{
class qtJobsWidget;
}

namespace smtk
{
namespace simulation
{
namespace ace3p
{

class qtJobsModel;

class SMTKACE3PQTEXT_EXPORT qtJobsWidget : public QWidget
{
  Q_OBJECT

public:
  qtJobsWidget(QWidget* parentWidget = nullptr);
  ~qtJobsWidget() = default;

signals:

public slots:
  // @brief set pointer to current project
  void setProject(smtk::project::ProjectPtr project);

  // @brief toggle the visibility of the jobs details panel
  void toggleDetailsVisibility(
    const QItemSelection &selected,
    const QItemSelection &deselected);

54
55
  // @brief slot called when job is created
  void onJobAdded(const QString& cumulusJobId);
56
57
58
59
60

  // @brief update the job name on manifest
  void jobNameChanged(const QString& text);

  void notesChanged();
61
62
63
64
65

protected slots:
  void pollingCheckBoxStateChanged(bool checked);

protected:
66
67
68
  // Enables polling widget if signed in and jobs exists.
  // Returns true if widgets are enabled.
  bool enablePollingWidgets();
69

70
71
72
73
74
75
76
77
78
79
80
81
82
83
private:
  // @brief pointer to UI information
  Ui::qtJobsWidget* ui;

  // @brief pointer to jobs table model
  qtJobsModel* m_jobs_model;
};


} // namespace ace3p
} // namespace simulation
} // namespace smtk

#endif