More consistent naming for Qt-derived classes in CAF

This commit is contained in:
Gaute Lindkvist
2019-04-07 17:48:49 +02:00
parent 22880d511b
commit 4e92a7e44a
18 changed files with 43 additions and 43 deletions

View File

@@ -44,7 +44,7 @@ set (MOC_HEADER_FILES
cafPdmUiTreeViewEditor.h
cafUiProcess.h
QMinimizePanel.h
cafShortenedQLabel.h
cafQShortenedLabel.h
cafQStyledProgressBar.h
cafPdmUiTreeSelectionEditor.h
cafPdmUiTreeSelectionQModel.h
@@ -151,8 +151,8 @@ set( PROJECT_FILES
cafUiProcess.h
QMinimizePanel.cpp
QMinimizePanel.h
cafShortenedQLabel.cpp
cafShortenedQLabel.h
cafQShortenedLabel.cpp
cafQShortenedLabel.h
cafQStyledProgressBar.cpp
cafQStyledProgressBar.h
cafQTreeViewStateSerializer.h

View File

@@ -42,7 +42,7 @@
#include "cafPdmObject.h"
#include "cafPdmUiFieldEditorHandle.h"
#include "cafPdmUiOrdering.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include "cafFactory.h"
@@ -98,7 +98,7 @@ QWidget* PdmUiCheckBoxEditor::createEditorWidget(QWidget* parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiCheckBoxEditor::createLabelWidget(QWidget* parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -8,7 +8,7 @@
#include "cafPdmUiFieldEditorHandle.h"
#include "cafPdmUiOrdering.h"
#include "cafPdmField.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include "cafFactory.h"
#include "cafTristate.h"
@@ -67,7 +67,7 @@ QWidget* PdmUiCheckBoxTristateEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiCheckBoxTristateEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -43,7 +43,7 @@
#include "cafPdmUiFieldEditorHandle.h"
#include "cafPdmUiOrdering.h"
#include "cafPdmField.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include "cafFactory.h"
@@ -120,7 +120,7 @@ QWidget* PdmUiColorEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiColorEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -42,7 +42,7 @@
#include "cafPdmField.h"
#include "cafFactory.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QApplication>
#include <QComboBox>
@@ -388,7 +388,7 @@ QWidget* PdmUiComboBoxEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiComboBoxEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -44,7 +44,7 @@
#include "cafPdmUiFieldEditorHandle.h"
#include "cafPdmUiOrdering.h"
#include "cafSelectionManager.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QApplication>
#include <QDate>
@@ -107,7 +107,7 @@ QWidget* PdmUiDateEditor::createEditorWidget(QWidget* parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiDateEditor::createLabelWidget(QWidget* parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -40,7 +40,7 @@
#include "cafPdmField.h"
#include "cafPdmUiFieldHandle.h"
#include "cafPdmUiObjectHandle.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QHBoxLayout>
#include <QDoubleValidator>
@@ -147,7 +147,7 @@ QWidget* PdmUiDoubleSliderEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiDoubleSliderEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -42,7 +42,7 @@
#include "cafPdmUiFieldEditorHandle.h"
#include "cafFactory.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QDoubleValidator>
#include <QHBoxLayout>
@@ -119,7 +119,7 @@ QWidget* PdmUiDoubleValueEditor::createEditorWidget(QWidget* parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiDoubleValueEditor::createLabelWidget(QWidget* parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -43,7 +43,7 @@
#include "cafPdmUiDefaultObjectEditor.h"
#include "cafPdmUiFieldEditorHandle.h"
#include "cafPdmUiOrdering.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QBoxLayout>
#include <QDir>
@@ -117,7 +117,7 @@ QWidget* PdmUiFilePathEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiFilePathEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -38,7 +38,7 @@
#include "cafPdmUiLineEditor.h"
#include "cafFactory.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include "cafPdmUiDefaultObjectEditor.h"
@@ -78,7 +78,7 @@ QWidget* PdmUiLineEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiLineEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -42,7 +42,7 @@
#include "cafPdmField.h"
#include "cafFactory.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QApplication>
#include <QBoxLayout>
@@ -317,7 +317,7 @@ QWidget* PdmUiListEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiListEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -45,7 +45,7 @@
#include "cafPdmField.h"
#include "cafFactory.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QBoxLayout>
@@ -158,7 +158,7 @@ QWidget* PdmUiPushButtonEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiPushButtonEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -43,7 +43,7 @@
#include "cafPdmField.h"
#include "cafFactory.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QLineEdit>
#include <QLabel>
@@ -126,7 +126,7 @@ QWidget* PdmUiSliderEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiSliderEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -43,7 +43,7 @@
#include "cafPdmUiTableViewDelegate.h"
#include "cafPdmUiTableViewQModel.h"
#include "cafSelectionManager.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QApplication>
#include <QEvent>
@@ -116,12 +116,12 @@ QWidget* PdmUiTableViewEditor::createLabelWidget(QWidget * parent)
{
if (m_tableHeading.isNull())
{
m_tableHeading = new ShortenedQLabel(parent);
m_tableHeading = new QShortenedLabel(parent);
}
if (m_tableHeadingIcon.isNull())
{
m_tableHeadingIcon = new ShortenedQLabel(parent);
m_tableHeadingIcon = new QShortenedLabel(parent);
}
QHBoxLayout* layoutForIconLabel = new QHBoxLayout();

View File

@@ -42,7 +42,7 @@
#include "cafPdmUiDefaultObjectEditor.h"
#include "cafPdmUiFieldEditorHandle.h"
#include "cafPdmUiOrdering.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QTextEdit>
#include <QLabel>
@@ -196,7 +196,7 @@ QWidget* PdmUiTextEditor::createEditorWidget(QWidget * parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiTextEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -40,7 +40,7 @@
#include "cafPdmObject.h"
#include "cafPdmUiCommandSystemProxy.h"
#include "cafPdmUiTreeSelectionQModel.h"
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QBoxLayout>
#include <QCheckBox>
@@ -407,7 +407,7 @@ QWidget* PdmUiTreeSelectionEditor::createEditorWidget(QWidget* parent)
//--------------------------------------------------------------------------------------------------
QWidget* PdmUiTreeSelectionEditor::createLabelWidget(QWidget * parent)
{
m_label = new ShortenedQLabel(parent);
m_label = new QShortenedLabel(parent);
return m_label;
}

View File

@@ -33,7 +33,7 @@
// for more details.
//
//##################################################################################################
#include "cafShortenedQLabel.h"
#include "cafQShortenedLabel.h"
#include <QApplication>
#include <QFontMetrics>
@@ -44,7 +44,7 @@ using namespace caf;
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
ShortenedQLabel::ShortenedQLabel(QWidget* parent /*= nullptr*/, Qt::WindowFlags f /*= Qt::WindowFlags()*/)
QShortenedLabel::QShortenedLabel(QWidget* parent /*= nullptr*/, Qt::WindowFlags f /*= Qt::WindowFlags()*/)
: QLabel(parent, f)
{
}
@@ -52,7 +52,7 @@ ShortenedQLabel::ShortenedQLabel(QWidget* parent /*= nullptr*/, Qt::WindowFlags
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize ShortenedQLabel::minimumSizeHint() const
QSize QShortenedLabel::minimumSizeHint() const
{
int minimumWidth = 0;
@@ -77,7 +77,7 @@ QSize ShortenedQLabel::minimumSizeHint() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize ShortenedQLabel::sizeHint() const
QSize QShortenedLabel::sizeHint() const
{
QFontMetrics fontMetrics = QApplication::fontMetrics();
QString labelText = fullText();
@@ -89,7 +89,7 @@ QSize ShortenedQLabel::sizeHint() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void ShortenedQLabel::resizeEvent(QResizeEvent* event)
void QShortenedLabel::resizeEvent(QResizeEvent* event)
{
QString labelText = fullText();
QFontMetrics fontMetrics = QApplication::fontMetrics();
@@ -109,7 +109,7 @@ void ShortenedQLabel::resizeEvent(QResizeEvent* event)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void ShortenedQLabel::setDisplayText(const QString& shortText)
void QShortenedLabel::setDisplayText(const QString& shortText)
{
// Store original text if we haven't already done so.
if (m_fullLengthText.isEmpty())
@@ -122,7 +122,7 @@ void ShortenedQLabel::setDisplayText(const QString& shortText)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString ShortenedQLabel::fullText() const
QString QShortenedLabel::fullText() const
{
if (!m_fullLengthText.isEmpty())
{

View File

@@ -39,11 +39,11 @@
namespace caf
{
class ShortenedQLabel : public QLabel
class QShortenedLabel : public QLabel
{
Q_OBJECT
public:
explicit ShortenedQLabel(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
explicit QShortenedLabel(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
QSize minimumSizeHint() const override;
QSize sizeHint() const override;