mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1292 Fixed CppCheck Issues in UserInterface
This commit is contained in:
parent
1275279528
commit
bd688f7ce8
@ -51,12 +51,12 @@ template <typename T>
|
|||||||
class RiuTypedPdmObjects
|
class RiuTypedPdmObjects
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RiuTypedPdmObjects(const caf::PdmObjectGroup& objectGroup)
|
explicit RiuTypedPdmObjects(const caf::PdmObjectGroup& objectGroup)
|
||||||
{
|
{
|
||||||
objectGroup.objectsByType(&m_typedObjects);
|
objectGroup.objectsByType(&m_typedObjects);
|
||||||
}
|
}
|
||||||
|
|
||||||
RiuTypedPdmObjects(const std::vector<caf::PdmPointer<caf::PdmObjectHandle> >& objectHandles)
|
explicit RiuTypedPdmObjects(const std::vector<caf::PdmPointer<caf::PdmObjectHandle> >& objectHandles)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < objectHandles.size(); i++)
|
for (size_t i = 0; i < objectHandles.size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ class RiuMessagePanel : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuMessagePanel(QDockWidget* parent);
|
explicit RiuMessagePanel(QDockWidget* parent);
|
||||||
|
|
||||||
void addMessage(RILogLevel messageLevel, const QString& msg);
|
void addMessage(RILogLevel messageLevel, const QString& msg);
|
||||||
virtual QSize sizeHint () const;
|
virtual QSize sizeHint () const;
|
||||||
@ -60,7 +60,7 @@ private:
|
|||||||
class RiuMessagePanelLogger : public RiaLogger
|
class RiuMessagePanelLogger : public RiaLogger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RiuMessagePanelLogger(RiuMessagePanel* messagePanel);
|
explicit RiuMessagePanelLogger(RiuMessagePanel* messagePanel);
|
||||||
|
|
||||||
virtual int level() const override;
|
virtual int level() const override;
|
||||||
virtual void setLevel(int logLevel) override;
|
virtual void setLevel(int logLevel) override;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
class FileListModel: public QStringListModel
|
class FileListModel: public QStringListModel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FileListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent)
|
explicit FileListModel(QObject *parent = 0) : m_isItemsEditable(false), QStringListModel(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class RiuMultiCaseImportDialog: public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuMultiCaseImportDialog(QWidget *parent = 0);
|
explicit RiuMultiCaseImportDialog(QWidget *parent = 0);
|
||||||
virtual ~RiuMultiCaseImportDialog();
|
virtual ~RiuMultiCaseImportDialog();
|
||||||
|
|
||||||
QStringList eclipseCaseFileNames() const;
|
QStringList eclipseCaseFileNames() const;
|
||||||
|
@ -46,7 +46,7 @@ private:
|
|||||||
caf::UiProcess* m_monitoredProcess; // Pointer to the process we're monitoring. Needed to fetch text
|
caf::UiProcess* m_monitoredProcess; // Pointer to the process we're monitoring. Needed to fetch text
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuProcessMonitor(QDockWidget* pParent);
|
explicit RiuProcessMonitor(QDockWidget* pParent);
|
||||||
~RiuProcessMonitor();
|
~RiuProcessMonitor();
|
||||||
|
|
||||||
void startMonitorWorkProcess(caf::UiProcess* process);
|
void startMonitorWorkProcess(caf::UiProcess* process);
|
||||||
|
@ -12,7 +12,7 @@ class RiuQwtScalePicker : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
RiuQwtScalePicker(QwtPlot *plot);
|
explicit RiuQwtScalePicker(QwtPlot *plot);
|
||||||
|
|
||||||
virtual bool eventFilter( QObject *, QEvent * );
|
virtual bool eventFilter( QObject *, QEvent * );
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class RiuRecentFileActionProvider : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuRecentFileActionProvider(int maxActionCount = 9);
|
explicit RiuRecentFileActionProvider(int maxActionCount = 9);
|
||||||
~RiuRecentFileActionProvider();
|
~RiuRecentFileActionProvider();
|
||||||
|
|
||||||
void addFileName(const QString& fileName);
|
void addFileName(const QString& fileName);
|
||||||
|
@ -35,7 +35,7 @@ class RiuResultInfoPanel : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuResultInfoPanel(QDockWidget* parent);
|
explicit RiuResultInfoPanel(QDockWidget* parent);
|
||||||
|
|
||||||
void setInfo(const QString& info);
|
void setInfo(const QString& info);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace cvf
|
|||||||
class RiuResultQwtPlot : public QwtPlot
|
class RiuResultQwtPlot : public QwtPlot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RiuResultQwtPlot(QWidget* parent = NULL);
|
explicit RiuResultQwtPlot(QWidget* parent = NULL);
|
||||||
virtual ~RiuResultQwtPlot();
|
virtual ~RiuResultQwtPlot();
|
||||||
|
|
||||||
void addCurve(const QString& curveName, const cvf::Color3f& curveColor, const std::vector<QDateTime>& dateTimes, const std::vector<double>& timeHistoryValues);
|
void addCurve(const QString& curveName, const cvf::Color3f& curveColor, const std::vector<QDateTime>& dateTimes, const std::vector<double>& timeHistoryValues);
|
||||||
|
@ -431,9 +431,7 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigEclipseCaseData* eclips
|
|||||||
{
|
{
|
||||||
cvf::ref<RigResultAccessor> multResultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedMultResultName());
|
cvf::ref<RigResultAccessor> multResultAccessor = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, 0, RimDefines::combinedMultResultName());
|
||||||
{
|
{
|
||||||
double scalarValue = 0.0;
|
double scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I);
|
||||||
|
|
||||||
scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::POS_I);
|
|
||||||
resultInfoText->append(QString("MULTX : %1\n").arg(scalarValue));
|
resultInfoText->append(QString("MULTX : %1\n").arg(scalarValue));
|
||||||
scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::NEG_I);
|
scalarValue = multResultAccessor->cellFaceScalar(cellIndex, cvf::StructGridInterface::NEG_I);
|
||||||
resultInfoText->append(QString("MULTX- : %1\n").arg(scalarValue));
|
resultInfoText->append(QString("MULTX- : %1\n").arg(scalarValue));
|
||||||
|
@ -49,9 +49,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuSelectionManager();
|
|
||||||
~RiuSelectionManager();
|
|
||||||
|
|
||||||
static RiuSelectionManager* instance();
|
static RiuSelectionManager* instance();
|
||||||
|
|
||||||
// Returns selected items
|
// Returns selected items
|
||||||
@ -72,6 +69,10 @@ public:
|
|||||||
bool isEmpty(int role = RUI_APPLICATION_GLOBAL) const;
|
bool isEmpty(int role = RUI_APPLICATION_GLOBAL) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
RiuSelectionManager();
|
||||||
|
~RiuSelectionManager();
|
||||||
|
RiuSelectionManager(const RiuSelectionManager&) = delete;
|
||||||
|
|
||||||
void deleteAllItemsFromSelection(int role);
|
void deleteAllItemsFromSelection(int role);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
class RiuQwtPlotPicker : public QwtPlotPicker
|
class RiuQwtPlotPicker : public QwtPlotPicker
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RiuQwtPlotPicker(QWidget *canvas)
|
explicit RiuQwtPlotPicker(QWidget *canvas)
|
||||||
: QwtPlotPicker(canvas)
|
: QwtPlotPicker(canvas)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
class RiuToolTipMenu : public QMenu
|
class RiuToolTipMenu : public QMenu
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RiuToolTipMenu(QWidget * parent);
|
explicit RiuToolTipMenu(QWidget * parent);
|
||||||
|
|
||||||
bool event(QEvent* e);
|
bool event(QEvent* e);
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,7 @@ class RiuTreeViewEventFilter : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
RiuTreeViewEventFilter(QObject* parent);
|
explicit RiuTreeViewEventFilter(QObject* parent);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
@ -398,16 +398,15 @@ void RiuViewer::paintOverlayItems(QPainter* painter)
|
|||||||
{
|
{
|
||||||
m_histogramWidget->resize(columnWidth, 40);
|
m_histogramWidget->resize(columnWidth, 40);
|
||||||
m_histogramWidget->render(painter,QPoint(columnPos, yPos));
|
m_histogramWidget->render(painter,QPoint(columnPos, yPos));
|
||||||
yPos += m_histogramWidget->height() + margin;
|
//yPos += m_histogramWidget->height() + margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_showInfoText)
|
if (m_showInfoText) // Version Label
|
||||||
{
|
{
|
||||||
QSize size(m_versionInfoLabel->sizeHint().width(), m_versionInfoLabel->sizeHint().height());
|
QSize size(m_versionInfoLabel->sizeHint().width(), m_versionInfoLabel->sizeHint().height());
|
||||||
QPoint pos(this->width() - size.width() - margin, this->height() - size.height() - margin);
|
QPoint pos(this->width() - size.width() - margin, this->height() - size.height() - margin);
|
||||||
m_versionInfoLabel->resize(size.width(), size.height());
|
m_versionInfoLabel->resize(size.width(), size.height());
|
||||||
m_versionInfoLabel->render(painter, pos);
|
m_versionInfoLabel->render(painter, pos);
|
||||||
yPos += size.height() + margin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_cursorPositionDomainCoords.isUndefined())
|
if (!m_cursorPositionDomainCoords.isUndefined())
|
||||||
|
@ -50,7 +50,7 @@ class RiuViewerCommands: public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuViewerCommands(RiuViewer* ownerViewer);
|
explicit RiuViewerCommands(RiuViewer* ownerViewer);
|
||||||
~RiuViewerCommands();
|
~RiuViewerCommands();
|
||||||
|
|
||||||
void setOwnerView(RimView * owner);
|
void setOwnerView(RimView * owner);
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
class RiuWellLogTrackQwtPicker : public QwtPlotPicker
|
class RiuWellLogTrackQwtPicker : public QwtPlotPicker
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RiuWellLogTrackQwtPicker(QWidget *canvas)
|
explicit RiuWellLogTrackQwtPicker(QWidget *canvas)
|
||||||
: QwtPlotPicker(canvas)
|
: QwtPlotPicker(canvas)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user