Skip to content
Snippets Groups Projects
Commit 337f181b authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rename class and sources GUI/View/Job/JobEditor -> GUI/View/Job/JobProperetyDisplay

parent b31ab101
No related branches found
No related tags found
1 merge request!2666rename -> JobMessagesDisplay; mv properties view to JobsPanel
......@@ -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);
......
......@@ -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
......@@ -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);
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment