diff --git a/GUI/View/Job/JobEditor.cpp b/GUI/View/Job/JobProperetyDisplay.cpp similarity index 81% rename from GUI/View/Job/JobEditor.cpp rename to GUI/View/Job/JobProperetyDisplay.cpp index b6aadf4783216a919909f733b2ab4516a485d8e4..ce041d1684c46c0af1c36390a4b2084edfb3764f 100644 --- a/GUI/View/Job/JobEditor.cpp +++ b/GUI/View/Job/JobProperetyDisplay.cpp @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Job/JobEditor.cpp -//! @brief Implements class JobEditor. +//! @file GUI/View/Job/JobProperetyDisplay.cpp +//! @brief Implements class JobProperetyDisplay. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,14 +12,14 @@ // // ************************************************************************************************ -#include "GUI/View/Job/JobEditor.h" +#include "GUI/View/Job/JobProperetyDisplay.h" #include "GUI/Model/Job/BatchInfo.h" #include "GUI/Model/Job/JobItem.h" #include "GUI/Model/Job/JobStatus.h" #include <QLabel> #include <QVBoxLayout> -JobEditor::JobEditor(QWidget* parent, Qt::WindowFlags f) +JobProperetyDisplay::JobProperetyDisplay(QWidget* parent, Qt::WindowFlags f) : QWidget(parent, f) , m_comments_editor(new QTextEdit(this)) , m_job_item(nullptr) @@ -34,19 +34,20 @@ JobEditor::JobEditor(QWidget* parent, Qt::WindowFlags f) layout->addWidget(new QLabel("Messages")); layout->addWidget(m_comments_editor); - connect(m_comments_editor, &QTextEdit::textChanged, this, &JobEditor::onCommentsEdited); + connect(m_comments_editor, &QTextEdit::textChanged, this, + &JobProperetyDisplay::onCommentsEdited); setMinimumWidth(10); setMinimumHeight(190); } -JobEditor::~JobEditor() +JobProperetyDisplay::~JobProperetyDisplay() { if (m_job_item) disconnect(m_job_item, nullptr, this, nullptr); } -void JobEditor::setJobItem(JobItem* jobItem) +void JobProperetyDisplay::setJobItem(JobItem* jobItem) { if (m_job_item) { disconnect(m_job_item, nullptr, this, nullptr); @@ -68,7 +69,7 @@ void JobEditor::setJobItem(JobItem* jobItem) m_comments_editor->clear(); } -void JobEditor::onCommentsEdited() +void JobProperetyDisplay::onCommentsEdited() { if (m_job_item) { m_job_item->blockSignals(true); diff --git a/GUI/View/Job/JobEditor.h b/GUI/View/Job/JobProperetyDisplay.h similarity index 64% rename from GUI/View/Job/JobEditor.h rename to GUI/View/Job/JobProperetyDisplay.h index be9407748b90579f37af74766696450add1cd26d..558aa249eed899b4bf04b6359b669072e6453734 100644 --- a/GUI/View/Job/JobEditor.h +++ b/GUI/View/Job/JobProperetyDisplay.h @@ -2,8 +2,8 @@ // // BornAgain: simulate and fit reflection and scattering // -//! @file GUI/View/Job/JobEditor.h -//! @brief Defines class JobEditor. +//! @file GUI/View/Job/JobProperetyDisplay.h +//! @brief Defines class JobProperetyDisplay. //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBEDITOR_H -#define BORNAGAIN_GUI_VIEW_JOB_JOBEDITOR_H +#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBPROPERETYDISPLAY_H +#define BORNAGAIN_GUI_VIEW_JOB_JOBPROPERETYDISPLAY_H #include <QTextEdit> @@ -21,11 +21,11 @@ class JobItem; //! Holds tabs for properties view and comments editor. -class JobEditor : public QWidget { +class JobProperetyDisplay : public QWidget { Q_OBJECT public: - explicit JobEditor(QWidget* parent = nullptr, Qt::WindowFlags f = {}); - ~JobEditor() override; + explicit JobProperetyDisplay(QWidget* parent = nullptr, Qt::WindowFlags f = {}); + ~JobProperetyDisplay() override; void setJobItem(JobItem* jobItem); private slots: @@ -36,4 +36,4 @@ private: JobItem* m_job_item; }; -#endif // BORNAGAIN_GUI_VIEW_JOB_JOBEDITOR_H +#endif // BORNAGAIN_GUI_VIEW_JOB_JOBPROPERETYDISPLAY_H diff --git a/GUI/View/Job/JobsPanel.cpp b/GUI/View/Job/JobsPanel.cpp index 18c815527436a3e51715519f457f1f8054711104..e96c4adf3266fd0319b6a06523a34cc4b73bd42c 100644 --- a/GUI/View/Job/JobsPanel.cpp +++ b/GUI/View/Job/JobsPanel.cpp @@ -15,7 +15,7 @@ #include "GUI/View/Job/JobsPanel.h" #include "Base/Util/Assert.h" #include "GUI/View/Base/mainwindow_constants.h" -#include "GUI/View/Job/JobEditor.h" +#include "GUI/View/Job/JobProperetyDisplay.h" #include "GUI/View/Job/JobparQModel.h" #include "GUI/View/Job/JobsListing.h" #include <QHeaderView> @@ -49,7 +49,7 @@ JobsPanel::JobsPanel(QWidget* parent) , m_splitter(new QSplitter(Qt::Vertical, this)) , m_properties_view(new QTreeView(this)) , m_properties_model(new JobparQModel(this)) - , m_job_editor(new JobEditor(this)) + , m_job_editor(new JobProperetyDisplay(this)) { setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding); setMinimumWidth(80); diff --git a/GUI/View/Job/JobsPanel.h b/GUI/View/Job/JobsPanel.h index 493ee1740f830fe68bdcff546717bc5e4eebc782..b18d2ad96fe89e7ff80a6f431680f842141b4e34 100644 --- a/GUI/View/Job/JobsPanel.h +++ b/GUI/View/Job/JobsPanel.h @@ -18,12 +18,12 @@ #include <QSplitter> #include <QTreeView> -class JobEditor; +class JobProperetyDisplay; class JobItem; class JobparQModel; class JobsListing; -//! A panel with a JobsListing on top and a JobEditor an bottom. +//! A panel with a JobsListing on top and a JobProperetyDisplay an bottom. class JobsPanel : public QWidget { Q_OBJECT @@ -52,7 +52,7 @@ private: JobsListing* m_listing; QTreeView* m_properties_view; JobparQModel* m_properties_model; - JobEditor* m_job_editor; + JobProperetyDisplay* m_job_editor; }; #endif // BORNAGAIN_GUI_VIEW_JOB_JOBSPANEL_H