mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
clang-tidy : Remove redundant 'virtual' and add 'override'
clang-tidy : Remove redundant 'virtual' and add 'override'
This commit is contained in:
parent
3569b3f375
commit
764fb65e8e
@ -1,5 +1,5 @@
|
||||
---
|
||||
Checks: '-*,modernize-use-nullptr'
|
||||
Checks: '-*,modernize-use-nullptr,modernize-use-override'
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
...
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
setText(m_executeCommand->name());
|
||||
}
|
||||
|
||||
~UndoRedoWrapper()
|
||||
~UndoRedoWrapper() override
|
||||
{
|
||||
delete m_executeCommand;
|
||||
}
|
||||
@ -65,7 +65,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void undo()
|
||||
void undo() override
|
||||
{
|
||||
m_executeCommand->undo();
|
||||
}
|
||||
@ -73,7 +73,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void redo()
|
||||
void redo() override
|
||||
{
|
||||
m_executeCommand->redo();
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class CmdFeature : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
CmdFeature();
|
||||
virtual ~CmdFeature();
|
||||
~CmdFeature() override;
|
||||
|
||||
QAction* action();
|
||||
QAction* actionWithCustomText(const QString& customText);
|
||||
|
@ -60,7 +60,7 @@ class CmdFeatureManager : public QObject
|
||||
|
||||
public:
|
||||
static CmdFeatureManager* instance();
|
||||
virtual ~CmdFeatureManager();
|
||||
~CmdFeatureManager() override;
|
||||
|
||||
QAction* action(const QString& commandId);
|
||||
QAction* action(const QString& commandId, const QString& customActionText);
|
||||
|
@ -77,14 +77,14 @@ class CmdFieldChangeExec : public CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
explicit CmdFieldChangeExec(NotificationCenter* notificationCenter);
|
||||
virtual ~CmdFieldChangeExec();
|
||||
~CmdFieldChangeExec() override;
|
||||
|
||||
|
||||
CmdFieldChangeExecData* commandData();
|
||||
|
||||
virtual QString name();
|
||||
virtual void redo();
|
||||
virtual void undo();
|
||||
QString name() override;
|
||||
void redo() override;
|
||||
void undo() override;
|
||||
|
||||
private:
|
||||
void readFieldValueFromValidXmlDocument(QXmlStreamReader& xmlStream, PdmXmlFieldHandle* xmlFieldHandle);
|
||||
|
@ -78,13 +78,13 @@ class CmdSelectionChangeExec : public CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
explicit CmdSelectionChangeExec(NotificationCenter* notificationCenter);
|
||||
virtual ~CmdSelectionChangeExec();;
|
||||
~CmdSelectionChangeExec() override;;
|
||||
|
||||
CmdSelectionChangeExecData* commandData();
|
||||
|
||||
virtual QString name();
|
||||
virtual void redo();
|
||||
virtual void undo();
|
||||
QString name() override;
|
||||
void redo() override;
|
||||
void undo() override;
|
||||
|
||||
private:
|
||||
CmdSelectionChangeExecData* m_commandData;
|
||||
|
@ -50,8 +50,8 @@ class CmdUiCommandSystemImpl : public PdmUiCommandSystemInterface
|
||||
public:
|
||||
CmdUiCommandSystemImpl();
|
||||
|
||||
virtual void fieldChangedCommand(const std::vector<PdmFieldHandle*>& fieldsToUpdate, const QVariant& newUiValue);
|
||||
virtual void populateMenuWithDefaultCommands(const QString& uiConfigName, QMenu* menu);
|
||||
void fieldChangedCommand(const std::vector<PdmFieldHandle*>& fieldsToUpdate, const QVariant& newUiValue) override;
|
||||
void populateMenuWithDefaultCommands(const QString& uiConfigName, QMenu* menu) override;
|
||||
|
||||
bool isUndoEnabled();
|
||||
void enableUndoFeature(bool enable);
|
||||
|
@ -52,13 +52,13 @@ class CmdAddItemExec : public CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
explicit CmdAddItemExec(NotificationCenter* notificationCenter);
|
||||
virtual ~CmdAddItemExec();;
|
||||
~CmdAddItemExec() override;;
|
||||
|
||||
CmdAddItemExecData* commandData();
|
||||
|
||||
virtual QString name();
|
||||
virtual void redo();
|
||||
virtual void undo();
|
||||
QString name() override;
|
||||
void redo() override;
|
||||
void undo() override;
|
||||
|
||||
private:
|
||||
CmdAddItemExecData* m_commandData;
|
||||
|
@ -53,9 +53,9 @@ class CmdAddItemFeature : public CmdFeature
|
||||
protected:
|
||||
CmdExecuteCommand* createExecuteCommand();
|
||||
|
||||
virtual bool isCommandEnabled();
|
||||
virtual void onActionTriggered( bool isChecked );
|
||||
virtual void setupActionLook( QAction* actionToSetup );
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
};
|
||||
|
||||
|
@ -52,14 +52,14 @@ class CmdDeleteItemExec : public CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
explicit CmdDeleteItemExec(NotificationCenter* notificationCenter);
|
||||
virtual ~CmdDeleteItemExec() {};
|
||||
~CmdDeleteItemExec() override {};
|
||||
|
||||
|
||||
CmdDeleteItemExecData* commandData();
|
||||
|
||||
virtual QString name();
|
||||
virtual void redo();
|
||||
virtual void undo();
|
||||
QString name() override;
|
||||
void redo() override;
|
||||
void undo() override;
|
||||
|
||||
private:
|
||||
CmdDeleteItemExecData* m_commandData;
|
||||
|
@ -52,9 +52,9 @@ protected:
|
||||
CmdExecuteCommand* createExecuteCommand();
|
||||
|
||||
// Overrides
|
||||
virtual bool isCommandEnabled();
|
||||
virtual void onActionTriggered( bool isChecked );
|
||||
virtual void setupActionLook( QAction* actionToSetup );
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ class PdmChildArrayFieldHandle : public PdmPtrArrayFieldHandle
|
||||
{
|
||||
public:
|
||||
PdmChildArrayFieldHandle() {}
|
||||
virtual ~PdmChildArrayFieldHandle() {}
|
||||
~PdmChildArrayFieldHandle() override {}
|
||||
|
||||
virtual void deleteAllChildObjects() = 0;
|
||||
|
||||
@ -51,20 +51,21 @@ class PdmChildArrayField<DataType*> : public PdmChildArrayFieldHandle
|
||||
typedef DataType* DataTypePtr;
|
||||
public:
|
||||
PdmChildArrayField() { }
|
||||
virtual ~PdmChildArrayField();
|
||||
~PdmChildArrayField() override;
|
||||
|
||||
PdmChildArrayField& operator() () { return *this; }
|
||||
const PdmChildArrayField& operator() () const { return *this; }
|
||||
|
||||
// Reimplementation of PdmPointersFieldHandle methods
|
||||
|
||||
virtual size_t size() const { return m_pointers.size(); }
|
||||
virtual bool empty() const { return m_pointers.empty(); }
|
||||
virtual void clear();
|
||||
virtual void deleteAllChildObjects();
|
||||
size_t size() const override { return m_pointers.size(); }
|
||||
bool empty() const override { return m_pointers.empty(); }
|
||||
void clear() override;
|
||||
void deleteAllChildObjects() override;
|
||||
void insertAt(int indexAfter, PdmObjectHandle* obj) override;
|
||||
PdmObjectHandle* at(size_t index) override;
|
||||
|
||||
virtual void deleteAllChildObjectsAsync();
|
||||
virtual void insertAt(int indexAfter, PdmObjectHandle* obj);
|
||||
virtual PdmObjectHandle* at(size_t index);
|
||||
|
||||
// std::vector-like access
|
||||
|
||||
@ -76,7 +77,7 @@ public:
|
||||
void insert(size_t indexAfter, const std::vector<PdmPointer<DataType> >& objects);
|
||||
size_t count(const DataType* pointer) const;
|
||||
|
||||
void erase(size_t index);
|
||||
void erase(size_t index) override;
|
||||
size_t index(const DataType* pointer) const;
|
||||
|
||||
typename std::vector< PdmPointer<DataType> >::iterator begin() { return m_pointers.begin(); };
|
||||
@ -89,8 +90,8 @@ public:
|
||||
// Child objects
|
||||
std::vector<DataType*> childObjects() const;
|
||||
|
||||
virtual void childObjects(std::vector<PdmObjectHandle*>* objects);
|
||||
virtual void removeChildObject(PdmObjectHandle* object);
|
||||
void childObjects(std::vector<PdmObjectHandle*>* objects) override;
|
||||
void removeChildObject(PdmObjectHandle* object) override;
|
||||
|
||||
private: //To be disabled
|
||||
PDM_DISABLE_COPY_AND_ASSIGN(PdmChildArrayField);
|
||||
|
@ -14,7 +14,7 @@ class PdmPtrArrayFieldHandle : public PdmFieldHandle
|
||||
{
|
||||
public:
|
||||
PdmPtrArrayFieldHandle() {}
|
||||
virtual ~PdmPtrArrayFieldHandle() {}
|
||||
~PdmPtrArrayFieldHandle() override {}
|
||||
|
||||
virtual size_t size() const = 0;
|
||||
virtual bool empty() const = 0;
|
||||
|
@ -140,7 +140,7 @@ class PdmObject : public PdmObjectHandle, public PdmXmlObjectHandle, public PdmU
|
||||
{
|
||||
public:
|
||||
PdmObject() : PdmObjectHandle(), PdmXmlObjectHandle(this, false), PdmUiObjectHandle(this, false) {}
|
||||
virtual ~PdmObject() {}
|
||||
~PdmObject() override {}
|
||||
|
||||
/// Adds field to the internal data structure and sets the file keyword and Ui information
|
||||
/// Consider this method private. Please use the CAF_PDM_InitField() macro instead
|
||||
|
@ -18,7 +18,7 @@ class PdmObjectGroup : public PdmObject
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
PdmObjectGroup();
|
||||
~PdmObjectGroup();
|
||||
~PdmObjectGroup() override;
|
||||
|
||||
std::vector<PdmObjectHandle*> objects;
|
||||
|
||||
@ -73,7 +73,7 @@ class PdmObjectCollection : public PdmObject
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
PdmObjectCollection();
|
||||
~PdmObjectCollection();
|
||||
~PdmObjectCollection() override;
|
||||
|
||||
caf::PdmChildArrayField<PdmObjectHandle*> objects;
|
||||
};
|
||||
|
@ -54,7 +54,7 @@ class PdmUiEditorHandle : public QObject
|
||||
{
|
||||
public:
|
||||
PdmUiEditorHandle();
|
||||
virtual ~PdmUiEditorHandle();
|
||||
~PdmUiEditorHandle() override;
|
||||
|
||||
public:
|
||||
void updateUi(const QString& uiConfigName);;
|
||||
@ -92,7 +92,7 @@ class PdmUiProxyEditorHandle: public PdmUiEditorHandle
|
||||
{
|
||||
public:
|
||||
explicit PdmUiProxyEditorHandle(PdmUiEditorHandle* mainEditorHandle) : PdmUiEditorHandle() { m_mainEditorHandle = mainEditorHandle; }
|
||||
virtual ~PdmUiProxyEditorHandle() {};
|
||||
~PdmUiProxyEditorHandle() override {};
|
||||
|
||||
protected: // Interface to override:
|
||||
|
||||
|
@ -88,7 +88,7 @@ class PdmUiFieldEditorHandle : public PdmUiEditorHandle
|
||||
public:
|
||||
|
||||
PdmUiFieldEditorHandle();
|
||||
~PdmUiFieldEditorHandle();
|
||||
~PdmUiFieldEditorHandle() override;
|
||||
|
||||
PdmUiFieldHandle* uiField();
|
||||
void setUiField(PdmUiFieldHandle* uiFieldHandle);
|
||||
|
@ -12,7 +12,7 @@ class PdmUiFieldHandle : public PdmUiItem, public PdmFieldCapability, public Pdm
|
||||
{
|
||||
public:
|
||||
PdmUiFieldHandle(PdmFieldHandle* owner, bool giveOwnership);
|
||||
virtual ~PdmUiFieldHandle();
|
||||
~PdmUiFieldHandle() override;
|
||||
|
||||
PdmFieldHandle* fieldHandle();
|
||||
|
||||
|
@ -59,7 +59,7 @@ class PdmUiObjectEditorHandle : public PdmUiEditorHandle
|
||||
{
|
||||
public:
|
||||
PdmUiObjectEditorHandle();
|
||||
virtual ~PdmUiObjectEditorHandle();
|
||||
~PdmUiObjectEditorHandle() override;
|
||||
|
||||
QWidget* getOrCreateWidget(QWidget* parent);
|
||||
QWidget* widget() const;
|
||||
|
@ -20,7 +20,7 @@ class PdmUiObjectHandle : public PdmUiItem, public PdmObjectCapability
|
||||
{
|
||||
public:
|
||||
PdmUiObjectHandle(PdmObjectHandle* owner, bool giveOwnership);
|
||||
virtual ~PdmUiObjectHandle() { }
|
||||
~PdmUiObjectHandle() override { }
|
||||
|
||||
PdmObjectHandle* objectHandle() { return m_owner; }
|
||||
const PdmObjectHandle* objectHandle() const { return m_owner; }
|
||||
|
@ -14,8 +14,8 @@ public:
|
||||
|
||||
// Xml Serializing
|
||||
public:
|
||||
virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory);
|
||||
virtual void writeFieldData(QXmlStreamWriter& xmlStream) const;
|
||||
void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory) override;
|
||||
void writeFieldData(QXmlStreamWriter& xmlStream) const override;
|
||||
private:
|
||||
FieldType* m_field;
|
||||
};
|
||||
@ -38,9 +38,9 @@ public:
|
||||
|
||||
// Xml Serializing
|
||||
public:
|
||||
virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory);
|
||||
virtual void writeFieldData(QXmlStreamWriter& xmlStream) const;
|
||||
virtual void resolveReferences();
|
||||
void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory) override;
|
||||
void writeFieldData(QXmlStreamWriter& xmlStream) const override;
|
||||
void resolveReferences() override;
|
||||
|
||||
private:
|
||||
FieldType* m_field;
|
||||
@ -67,9 +67,9 @@ public:
|
||||
|
||||
// Xml Serializing
|
||||
public:
|
||||
virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory);
|
||||
virtual void writeFieldData(QXmlStreamWriter& xmlStream) const;
|
||||
virtual void resolveReferences();
|
||||
void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory) override;
|
||||
void writeFieldData(QXmlStreamWriter& xmlStream) const override;
|
||||
void resolveReferences() override;
|
||||
|
||||
private:
|
||||
FieldType* m_field;
|
||||
@ -91,8 +91,8 @@ public:
|
||||
|
||||
// Xml Serializing
|
||||
public:
|
||||
virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory);
|
||||
virtual void writeFieldData(QXmlStreamWriter& xmlStream) const;
|
||||
void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory) override;
|
||||
void writeFieldData(QXmlStreamWriter& xmlStream) const override;
|
||||
private:
|
||||
FieldType* m_field;
|
||||
};
|
||||
@ -109,8 +109,8 @@ public:
|
||||
|
||||
// Xml Serializing
|
||||
public:
|
||||
virtual void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory);
|
||||
virtual void writeFieldData(QXmlStreamWriter& xmlStream) const;
|
||||
void readFieldData(QXmlStreamReader& xmlStream, PdmObjectFactory* objectFactory) override;
|
||||
void writeFieldData(QXmlStreamWriter& xmlStream) const override;
|
||||
private:
|
||||
FieldType* m_field;
|
||||
};
|
||||
|
@ -62,7 +62,7 @@ class PdmDefaultObjectFactory : public PdmObjectFactory
|
||||
public:
|
||||
static PdmDefaultObjectFactory * instance();
|
||||
|
||||
virtual PdmObjectHandle* create(const QString& classNameKeyword);
|
||||
PdmObjectHandle* create(const QString& classNameKeyword) override;
|
||||
|
||||
template< typename PdmObjectBaseDerivative >
|
||||
bool registerCreator()
|
||||
@ -89,7 +89,7 @@ public:
|
||||
|
||||
private:
|
||||
PdmDefaultObjectFactory() {}
|
||||
~PdmDefaultObjectFactory() { /* Could clean up, but ... */ }
|
||||
~PdmDefaultObjectFactory() override { /* Could clean up, but ... */ }
|
||||
|
||||
// Internal helper classes
|
||||
|
||||
@ -105,7 +105,7 @@ private:
|
||||
class PdmObjectCreator : public PdmObjectCreatorBase
|
||||
{
|
||||
public:
|
||||
virtual PdmObjectHandle * create() { return new PdmObjectBaseDerivative(); }
|
||||
PdmObjectHandle * create() override { return new PdmObjectBaseDerivative(); }
|
||||
};
|
||||
|
||||
// Map to store factory
|
||||
|
@ -23,7 +23,7 @@ class PdmXmlFieldHandle : public PdmFieldCapability
|
||||
{
|
||||
public:
|
||||
PdmXmlFieldHandle(PdmFieldHandle* owner , bool giveOwnership);
|
||||
virtual ~PdmXmlFieldHandle() { }
|
||||
~PdmXmlFieldHandle() override { }
|
||||
|
||||
PdmFieldHandle* fieldHandle() { return m_owner; }
|
||||
const PdmFieldHandle* fieldHandle() const { return m_owner; }
|
||||
|
@ -27,7 +27,7 @@ class PdmXmlObjectHandle : public PdmObjectCapability
|
||||
public:
|
||||
|
||||
PdmXmlObjectHandle(PdmObjectHandle* owner, bool giveOwnership);
|
||||
virtual ~PdmXmlObjectHandle() { }
|
||||
~PdmXmlObjectHandle() override { }
|
||||
|
||||
/// The classKeyword method is overridden in subclasses by the CAF_PDM_XML_HEADER_INIT macro
|
||||
virtual QString classKeyword() const = 0;
|
||||
|
@ -66,7 +66,7 @@ class CustomObjectEditor : public PdmUiFormLayoutObjectEditor
|
||||
Q_OBJECT
|
||||
public:
|
||||
CustomObjectEditor();
|
||||
~CustomObjectEditor();
|
||||
~CustomObjectEditor() override;
|
||||
|
||||
void defineGridLayout(int rowCount, int columnCount);
|
||||
|
||||
@ -77,8 +77,8 @@ public:
|
||||
void addBlankCell(int row, int column);
|
||||
|
||||
private:
|
||||
virtual QWidget* createWidget(QWidget* parent) override;
|
||||
virtual void recursivelyConfigureAndUpdateTopLevelUiOrdering(const PdmUiOrdering& topLevelUiOrdering,
|
||||
QWidget* createWidget(QWidget* parent) override;
|
||||
void recursivelyConfigureAndUpdateTopLevelUiOrdering(const PdmUiOrdering& topLevelUiOrdering,
|
||||
const QString& uiConfigName) override;
|
||||
|
||||
bool isAreaAvailable(int row, int column, int rowSpan, int columnSpan) const;
|
||||
|
@ -116,12 +116,12 @@ public:
|
||||
|
||||
|
||||
caf::PdmField<bool> m_toggleField;
|
||||
virtual caf::PdmFieldHandle* objectToggleField()
|
||||
caf::PdmFieldHandle* objectToggleField() override
|
||||
{
|
||||
return &m_toggleField;
|
||||
}
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override
|
||||
{
|
||||
if (changedField == &m_toggleField)
|
||||
{
|
||||
@ -136,7 +136,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
@ -201,7 +201,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void defineCustomContextMenu(const caf::PdmFieldHandle* fieldNeedingMenu,
|
||||
void defineCustomContextMenu(const caf::PdmFieldHandle* fieldNeedingMenu,
|
||||
QMenu* menu,
|
||||
QWidget* fieldEditorWidget) override
|
||||
{
|
||||
@ -216,7 +216,7 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override
|
||||
{
|
||||
uiOrdering.add(&m_doubleField);
|
||||
uiOrdering.add(&m_intField);
|
||||
@ -323,7 +323,7 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override
|
||||
{
|
||||
uiOrdering.add(&m_intFieldStandard);
|
||||
uiOrdering.add(&m_intFieldUseFullSpace, caf::PdmUiOrdering::LayoutOptions(true, caf::PdmUiOrdering::LayoutOptions::MAX_COLUMN_SPAN, caf::PdmUiOrdering::LayoutOptions::MAX_COLUMN_SPAN));
|
||||
@ -431,12 +431,12 @@ public:
|
||||
caf::PdmField<bool> m_toggleField;
|
||||
caf::PdmField<bool> m_pushButtonField;
|
||||
|
||||
virtual caf::PdmFieldHandle* objectToggleField()
|
||||
caf::PdmFieldHandle* objectToggleField() override
|
||||
{
|
||||
return &m_toggleField;
|
||||
}
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override
|
||||
{
|
||||
if (changedField == &m_toggleField)
|
||||
{
|
||||
@ -452,7 +452,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
@ -500,7 +500,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual caf::PdmFieldHandle* userDescriptionField()
|
||||
caf::PdmFieldHandle* userDescriptionField() override
|
||||
{
|
||||
return &m_textField;
|
||||
}
|
||||
@ -509,7 +509,7 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override
|
||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override
|
||||
{
|
||||
if (field == &m_multipleAppEnum)
|
||||
{
|
||||
@ -533,7 +533,7 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void defineObjectEditorAttribute(QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override
|
||||
void defineObjectEditorAttribute(QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override
|
||||
{
|
||||
caf::PdmUiTableViewPushButtonEditorAttribute* attr = dynamic_cast<caf::PdmUiTableViewPushButtonEditorAttribute*>(attribute);
|
||||
if (attr)
|
||||
@ -598,7 +598,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override
|
||||
{
|
||||
uiOrdering.add(&m_objectListOfSameType);
|
||||
uiOrdering.add(&m_ptrField);
|
||||
@ -616,7 +616,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
if (&m_multiSelectList == fieldNeedingOptions)
|
||||
@ -651,7 +651,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual caf::PdmFieldHandle* userDescriptionField()
|
||||
caf::PdmFieldHandle* userDescriptionField() override
|
||||
{
|
||||
return &m_textField;
|
||||
}
|
||||
@ -679,12 +679,12 @@ public:
|
||||
|
||||
MenuItemProducer* m_menuItemProducer;
|
||||
|
||||
virtual caf::PdmFieldHandle* objectToggleField()
|
||||
caf::PdmFieldHandle* objectToggleField() override
|
||||
{
|
||||
return &m_toggleField;
|
||||
}
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override
|
||||
{
|
||||
if (changedField == &m_toggleField)
|
||||
{
|
||||
@ -696,7 +696,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void onEditorWidgetsCreated() override
|
||||
void onEditorWidgetsCreated() override
|
||||
{
|
||||
for (auto e : m_longText.uiCapability()->connectedEditors())
|
||||
{
|
||||
@ -720,7 +720,7 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void defineCustomContextMenu(const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget) override
|
||||
void defineCustomContextMenu(const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget) override
|
||||
{
|
||||
if (fieldNeedingMenu == &m_objectListOfSameType)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ class MainWindow : public QMainWindow
|
||||
|
||||
public:
|
||||
MainWindow();
|
||||
~MainWindow();
|
||||
~MainWindow() override;
|
||||
|
||||
static MainWindow* instance();
|
||||
void setPdmRoot(caf::PdmObjectHandle* pdmRoot);
|
||||
|
@ -19,9 +19,9 @@ public:
|
||||
caf::PdmField<std::vector<QString> > m_multiSelectList;
|
||||
|
||||
caf::PdmField<bool> m_toggleField;
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
void setDoubleMember(const double& d) { m_doubleMember = d; std::cout << "setDoubleMember" << std::endl; }
|
||||
double doubleMember() const { std::cout << "doubleMember" << std::endl; return m_doubleMember; }
|
||||
@ -30,7 +30,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
|
||||
private:
|
||||
double m_doubleMember;
|
||||
@ -39,9 +39,9 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@ class WidgetLayoutTest : public QWidget
|
||||
|
||||
public:
|
||||
WidgetLayoutTest(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
|
||||
~WidgetLayoutTest();
|
||||
~WidgetLayoutTest() override;
|
||||
|
||||
private:
|
||||
QGridLayout* m_mainLayout;
|
||||
|
@ -54,22 +54,22 @@ class QMinimizePanel : public QWidget
|
||||
public:
|
||||
explicit QMinimizePanel(QWidget* parent=nullptr);
|
||||
explicit QMinimizePanel(const QString &title, QWidget* parent=nullptr);
|
||||
~QMinimizePanel();
|
||||
~QMinimizePanel() override;
|
||||
|
||||
QFrame* contentFrame();
|
||||
void setTitle (const QString& title);
|
||||
QString title() const;
|
||||
void enableFrame(bool showFrame);
|
||||
QFrame* contentFrame();
|
||||
void setTitle (const QString& title);
|
||||
QString title() const;
|
||||
void enableFrame(bool showFrame);
|
||||
|
||||
virtual QSize minimumSizeHint() const override;
|
||||
virtual QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
public slots:
|
||||
void setExpanded(bool isExpanded);
|
||||
void toggleExpanded();
|
||||
void setExpanded(bool isExpanded);
|
||||
void toggleExpanded();
|
||||
|
||||
signals:
|
||||
void expandedChanged(bool isExpanded);
|
||||
void expandedChanged(bool isExpanded);
|
||||
|
||||
public:
|
||||
|
||||
@ -81,10 +81,10 @@ protected:
|
||||
QFrame* m_contentFrame;
|
||||
QPalette m_contentPalette;
|
||||
|
||||
virtual void resizeEvent(QResizeEvent *) override;
|
||||
virtual bool event(QEvent* event) override; // To catch QEvent::LayoutRequest
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
bool event(QEvent* event) override; // To catch QEvent::LayoutRequest
|
||||
|
||||
private:
|
||||
void initialize(const QString &title);
|
||||
QSize calculateSizeHint(bool minimumSizeHint) const;
|
||||
void initialize(const QString &title);
|
||||
QSize calculateSizeHint(bool minimumSizeHint) const;
|
||||
};
|
||||
|
@ -53,12 +53,12 @@ class PdmUiCheckBoxDelegate : public QStyledItemDelegate
|
||||
|
||||
public:
|
||||
explicit PdmUiCheckBoxDelegate( QObject* pParent = nullptr );
|
||||
virtual ~PdmUiCheckBoxDelegate();
|
||||
~PdmUiCheckBoxDelegate() override;
|
||||
|
||||
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override;
|
||||
|
||||
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
|
||||
};
|
||||
|
||||
|
@ -70,12 +70,12 @@ class PdmUiCheckBoxEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiCheckBoxEditor() {}
|
||||
virtual ~PdmUiCheckBoxEditor() {}
|
||||
~PdmUiCheckBoxEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
protected slots:
|
||||
void slotClicked(bool checked);
|
||||
|
@ -19,12 +19,12 @@ class PdmUiCheckBoxTristateEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiCheckBoxTristateEditor() {}
|
||||
virtual ~PdmUiCheckBoxTristateEditor() {}
|
||||
~PdmUiCheckBoxTristateEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget* parent);
|
||||
virtual QWidget* createLabelWidget(QWidget* parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createEditorWidget(QWidget* parent) override;
|
||||
QWidget* createLabelWidget(QWidget* parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
protected slots:
|
||||
void slotClicked(bool);
|
||||
|
@ -75,18 +75,18 @@ class PdmUiColorEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiColorEditor();
|
||||
virtual ~PdmUiColorEditor() {}
|
||||
~PdmUiColorEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
protected slots:
|
||||
void colorSelectionClicked();
|
||||
void colorSelectionClicked();
|
||||
|
||||
private:
|
||||
void setColorOnWidget(const QColor& c);
|
||||
void setColorOnWidget(const QColor& c);
|
||||
|
||||
private:
|
||||
QPointer<QLabel> m_label;
|
||||
|
@ -210,7 +210,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void wheelEvent(QWheelEvent *e)
|
||||
void wheelEvent(QWheelEvent *e) override
|
||||
{
|
||||
if (hasFocus())
|
||||
{
|
||||
@ -227,7 +227,7 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void focusInEvent(QFocusEvent* e) override
|
||||
void focusInEvent(QFocusEvent* e) override
|
||||
{
|
||||
setFocusPolicy(Qt::WheelFocus);
|
||||
QComboBox::focusInEvent(e);
|
||||
@ -236,7 +236,7 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void focusOutEvent(QFocusEvent* e) override
|
||||
void focusOutEvent(QFocusEvent* e) override
|
||||
{
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
QComboBox::focusOutEvent(e);
|
||||
|
@ -81,19 +81,19 @@ class PdmUiComboBoxEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiComboBoxEditor() {}
|
||||
virtual ~PdmUiComboBoxEditor() {}
|
||||
~PdmUiComboBoxEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QMargins calculateLabelContentMargins() const override;
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
QMargins calculateLabelContentMargins() const override;
|
||||
|
||||
protected slots:
|
||||
void slotIndexActivated(int index);
|
||||
void slotIndexActivated(int index);
|
||||
|
||||
void slotNextButtonPressed();
|
||||
void slotPreviousButtonPressed();
|
||||
void slotNextButtonPressed();
|
||||
void slotPreviousButtonPressed();
|
||||
|
||||
private:
|
||||
QPointer<QComboBox> m_comboBox;
|
||||
|
@ -72,12 +72,12 @@ class PdmUiDateEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiDateEditor() {}
|
||||
virtual ~PdmUiDateEditor() {}
|
||||
~PdmUiDateEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
protected slots:
|
||||
void slotEditingFinished();
|
||||
|
@ -60,11 +60,11 @@ class PdmUiDefaultObjectEditor : public PdmUiFormLayoutObjectEditor
|
||||
Q_OBJECT
|
||||
public:
|
||||
PdmUiDefaultObjectEditor();
|
||||
~PdmUiDefaultObjectEditor();
|
||||
~PdmUiDefaultObjectEditor() override;
|
||||
|
||||
private:
|
||||
virtual QWidget* createWidget(QWidget* parent) override;
|
||||
virtual void recursivelyConfigureAndUpdateTopLevelUiOrdering(const PdmUiOrdering& topLevelUiItems,
|
||||
QWidget* createWidget(QWidget* parent) override;
|
||||
void recursivelyConfigureAndUpdateTopLevelUiOrdering(const PdmUiOrdering& topLevelUiItems,
|
||||
const QString& uiConfigName) override;
|
||||
|
||||
};
|
||||
|
@ -60,14 +60,14 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~PdmDoubleValidator()
|
||||
~PdmDoubleValidator() override
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void fixup(QString& stringValue) const override
|
||||
void fixup(QString& stringValue) const override
|
||||
{
|
||||
double doubleValue = stringValue.toDouble();
|
||||
doubleValue = qBound(bottom(), doubleValue, top());
|
||||
|
@ -81,23 +81,23 @@ class PdmUiDoubleSliderEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiDoubleSliderEditor() {}
|
||||
virtual ~PdmUiDoubleSliderEditor() {}
|
||||
~PdmUiDoubleSliderEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
|
||||
protected slots:
|
||||
void slotEditingFinished();
|
||||
void slotSliderValueChanged(int value);
|
||||
void slotEditingFinished();
|
||||
void slotSliderValueChanged(int value);
|
||||
|
||||
private:
|
||||
void updateSliderPosition(double value);
|
||||
void writeValueToField(double value);
|
||||
void updateSliderPosition(double value);
|
||||
void writeValueToField(double value);
|
||||
|
||||
int convertToSliderValue(double value);
|
||||
double convertFromSliderValue(int sliderValue);
|
||||
int convertToSliderValue(double value);
|
||||
double convertFromSliderValue(int sliderValue);
|
||||
|
||||
private:
|
||||
QPointer<QLineEdit> m_lineEdit;
|
||||
|
@ -72,7 +72,7 @@ class PdmUiDoubleValueEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiDoubleValueEditor();
|
||||
virtual ~PdmUiDoubleValueEditor();
|
||||
~PdmUiDoubleValueEditor() override;
|
||||
|
||||
protected:
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
@ -88,16 +88,16 @@ class PdmUiFilePathEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiFilePathEditor() {}
|
||||
virtual ~PdmUiFilePathEditor() {}
|
||||
~PdmUiFilePathEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
protected slots:
|
||||
void slotEditingFinished();
|
||||
void fileSelectionClicked();
|
||||
void slotEditingFinished();
|
||||
void fileSelectionClicked();
|
||||
|
||||
private:
|
||||
QPointer<QLineEdit> m_lineEdit;
|
||||
|
@ -63,15 +63,15 @@ class PdmUiFormLayoutObjectEditor : public PdmUiObjectEditorHandle
|
||||
Q_OBJECT
|
||||
public:
|
||||
PdmUiFormLayoutObjectEditor();
|
||||
~PdmUiFormLayoutObjectEditor();
|
||||
~PdmUiFormLayoutObjectEditor() override;
|
||||
|
||||
protected:
|
||||
/// When overriding this function, use findOrCreateGroupBox() or findOrCreateFieldEditor() for detailed control
|
||||
/// Use recursivelyConfigureAndUpdateUiItemsInGridLayoutColumn() for automatic layout of group and field widgets
|
||||
virtual void recursivelyConfigureAndUpdateTopLevelUiOrdering(const PdmUiOrdering& topLevelUiOrdering,
|
||||
const QString& uiConfigName) = 0;
|
||||
virtual void recursivelyConfigureAndUpdateTopLevelUiOrdering(const PdmUiOrdering& topLevelUiOrdering,
|
||||
const QString& uiConfigName) = 0;
|
||||
|
||||
void recursivelyConfigureAndUpdateUiOrderingInGridLayoutColumn(const PdmUiOrdering& uiOrdering,
|
||||
void recursivelyConfigureAndUpdateUiOrderingInGridLayoutColumn(const PdmUiOrdering& uiOrdering,
|
||||
QWidget* containerWidgetWithGridLayout,
|
||||
const QString& uiConfigName);
|
||||
|
||||
@ -79,17 +79,17 @@ protected:
|
||||
PdmUiFieldEditorHandle* findOrCreateFieldEditor(QWidget* parent, PdmUiFieldHandle* field, const QString& uiConfigName);
|
||||
|
||||
private slots:
|
||||
void groupBoxExpandedStateToggled(bool isExpanded);
|
||||
void groupBoxExpandedStateToggled(bool isExpanded);
|
||||
|
||||
private:
|
||||
bool isUiGroupExpanded(const PdmUiGroup* uiGroup) const;
|
||||
virtual void cleanupBeforeSettingPdmObject() override;
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
bool isUiGroupExpanded(const PdmUiGroup* uiGroup) const;
|
||||
void cleanupBeforeSettingPdmObject() override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
static void recursiveVerifyUniqueNames(const std::vector<PdmUiItem*>& uiItems,
|
||||
const QString& uiConfigName,
|
||||
std::set<QString>* fieldKeywordNames,
|
||||
std::set<QString>* groupNames);
|
||||
static void recursiveVerifyUniqueNames(const std::vector<PdmUiItem*>& uiItems,
|
||||
const QString& uiConfigName,
|
||||
std::set<QString>* fieldKeywordNames,
|
||||
std::set<QString>* groupNames);
|
||||
|
||||
private:
|
||||
std::map<PdmFieldHandle*, PdmUiFieldEditorHandle*> m_fieldViews;
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
computeNextValidId();
|
||||
}
|
||||
|
||||
virtual State validate(QString& currentString, int &) const
|
||||
State validate(QString& currentString, int &) const override
|
||||
{
|
||||
if (m_multipleSelectionOfSameFieldsSelected)
|
||||
{
|
||||
@ -116,7 +116,7 @@ public:
|
||||
return QValidator::Acceptable;
|
||||
}
|
||||
|
||||
virtual void fixup(QString& editorText) const
|
||||
void fixup(QString& editorText) const override
|
||||
{
|
||||
editorText = QString::number(m_nextValidValue);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
PdmUiLineEdit(QWidget* parent);
|
||||
void setAvoidSendingEnterEventToParentWidget(bool avoidSendingEnter);
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
private:
|
||||
bool m_avoidSendingEnterEvent;
|
||||
};
|
||||
@ -121,19 +121,19 @@ class PdmUiLineEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiLineEditor() {}
|
||||
virtual ~PdmUiLineEditor() {}
|
||||
~PdmUiLineEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QMargins calculateLabelContentMargins() const override;
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
QMargins calculateLabelContentMargins() const override;
|
||||
|
||||
protected slots:
|
||||
void slotEditingFinished();
|
||||
void slotEditingFinished();
|
||||
|
||||
private:
|
||||
bool isMultipleFieldsWithSameKeywordSelected(PdmFieldHandle* editorField) const;
|
||||
bool isMultipleFieldsWithSameKeywordSelected(PdmFieldHandle* editorField) const;
|
||||
|
||||
private:
|
||||
QPointer<PdmUiLineEdit> m_lineEdit;
|
||||
|
@ -66,7 +66,7 @@ class MyStringListModel : public QStringListModel
|
||||
public:
|
||||
explicit MyStringListModel(QObject *parent = nullptr) : QStringListModel(parent), m_isItemsEditable(false) { }
|
||||
|
||||
virtual Qt::ItemFlags flags (const QModelIndex& index) const
|
||||
Qt::ItemFlags flags (const QModelIndex& index) const override
|
||||
{
|
||||
if (m_isItemsEditable)
|
||||
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable;
|
||||
@ -98,7 +98,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual QSize sizeHint() const override
|
||||
QSize sizeHint() const override
|
||||
{
|
||||
QSize mySize = QListView::sizeHint();
|
||||
|
||||
|
@ -79,28 +79,28 @@ class PdmUiListEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiListEditor();
|
||||
virtual ~PdmUiListEditor();
|
||||
~PdmUiListEditor() override;
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
virtual bool eventFilter ( QObject * listView, QEvent * event ); // To catch delete key press in list view.
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
bool eventFilter ( QObject * listView, QEvent * event ) override; // To catch delete key press in list view.
|
||||
|
||||
protected slots:
|
||||
void slotSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected );
|
||||
void slotListItemEdited(const QModelIndex&, const QModelIndex&);
|
||||
void slotSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected );
|
||||
void slotListItemEdited(const QModelIndex&, const QModelIndex&);
|
||||
|
||||
private:
|
||||
QString contentAsString() const;
|
||||
void pasteFromString(const QString& content);
|
||||
QString contentAsString() const;
|
||||
void pasteFromString(const QString& content);
|
||||
|
||||
void trimAndSetValuesToField(const QStringList& stringList);
|
||||
void trimAndSetValuesToField(const QStringList& stringList);
|
||||
|
||||
private:
|
||||
QPointer<QListViewHeightHint> m_listView;
|
||||
QPointer<QLabel> m_label;
|
||||
QPointer<QStringListModel> m_model;
|
||||
QPointer<QLabel> m_label;
|
||||
QPointer<QStringListModel> m_model;
|
||||
|
||||
bool m_isEditOperationsAvailable;
|
||||
int m_optionItemCount;
|
||||
|
@ -55,7 +55,7 @@ class PdmUiListView : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
PdmUiListView(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
|
||||
~PdmUiListView();
|
||||
~PdmUiListView() override;
|
||||
|
||||
void setPdmObject(caf::PdmObjectCollection* object);
|
||||
|
||||
|
@ -80,16 +80,16 @@ class UiListViewModelPdm : public QAbstractTableModel
|
||||
public:
|
||||
explicit UiListViewModelPdm(QObject* parent);
|
||||
|
||||
void setPdmData(PdmObjectCollection* objectGroup, const QString& configName);
|
||||
void setPdmData(PdmObjectCollection* objectGroup, const QString& configName);
|
||||
|
||||
// Qt overrides
|
||||
virtual int rowCount( const QModelIndex &parent = QModelIndex( ) ) const;
|
||||
virtual int columnCount( const QModelIndex &parent = QModelIndex( ) ) const;
|
||||
virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
|
||||
virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
|
||||
int rowCount( const QModelIndex &parent = QModelIndex( ) ) const override;
|
||||
int columnCount( const QModelIndex &parent = QModelIndex( ) ) const override;
|
||||
QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override;
|
||||
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
|
||||
|
||||
private:
|
||||
void computeColumnCount();
|
||||
void computeColumnCount();
|
||||
|
||||
private:
|
||||
PdmObjectCollection* m_pdmObjectGroup;
|
||||
@ -107,11 +107,11 @@ class PdmUiListViewEditor : public PdmUiObjectEditorHandle
|
||||
{
|
||||
public:
|
||||
PdmUiListViewEditor();
|
||||
~PdmUiListViewEditor();
|
||||
~PdmUiListViewEditor() override;
|
||||
|
||||
protected:
|
||||
virtual QWidget* createWidget(QWidget* parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createWidget(QWidget* parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
private:
|
||||
QPointer<QTableView> m_tableView;
|
||||
|
@ -54,7 +54,7 @@ class QVerticalScrollArea : public QScrollArea
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QVerticalScrollArea(QWidget* parent = nullptr);
|
||||
virtual bool eventFilter(QObject* object, QEvent* event) override;
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
};
|
||||
|
||||
|
||||
@ -73,15 +73,15 @@ class PdmUiPropertyView : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
PdmUiPropertyView(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
|
||||
~PdmUiPropertyView();
|
||||
~PdmUiPropertyView() override;
|
||||
|
||||
void setUiConfigurationName(QString uiConfigName);
|
||||
PdmObjectHandle* currentObject();
|
||||
void setUiConfigurationName(QString uiConfigName);
|
||||
PdmObjectHandle* currentObject();
|
||||
|
||||
virtual QSize sizeHint() const override;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
public slots:
|
||||
void showProperties(caf::PdmObjectHandle* object); // Signal/Slot system needs caf:: prefix in some cases
|
||||
void showProperties(caf::PdmObjectHandle* object); // Signal/Slot system needs caf:: prefix in some cases
|
||||
|
||||
private:
|
||||
PdmUiObjectEditorHandle* m_currentObjectView;
|
||||
|
@ -52,7 +52,7 @@ class PdmUiPropertyViewDialog : public QDialog
|
||||
public:
|
||||
PdmUiPropertyViewDialog(QWidget* parent, PdmObject* object, const QString& windowTitle, const QString& uiConfigName);
|
||||
PdmUiPropertyViewDialog(QWidget* parent, PdmObject* object, const QString& windowTitle, const QString& uiConfigName, const QDialogButtonBox::StandardButtons& standardButtons);
|
||||
~PdmUiPropertyViewDialog();
|
||||
~PdmUiPropertyViewDialog() override;
|
||||
|
||||
QDialogButtonBox* dialogButtonBox();
|
||||
|
||||
|
@ -67,17 +67,17 @@ class PdmUiPushButtonEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiPushButtonEditor() {}
|
||||
virtual ~PdmUiPushButtonEditor() {}
|
||||
~PdmUiPushButtonEditor() override {}
|
||||
|
||||
static void configureEditorForField(PdmFieldHandle* fieldHandle);
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
protected slots:
|
||||
void slotClicked(bool checked);
|
||||
void slotClicked(bool checked);
|
||||
|
||||
private:
|
||||
QPointer<QPushButton> m_pushButton;
|
||||
|
@ -75,20 +75,20 @@ class PdmUiSliderEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiSliderEditor() {}
|
||||
virtual ~PdmUiSliderEditor() {}
|
||||
~PdmUiSliderEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
|
||||
protected slots:
|
||||
void slotSliderValueChanged(int position);
|
||||
void slotSpinBoxValueChanged(int position);
|
||||
void slotSliderValueChanged(int position);
|
||||
void slotSpinBoxValueChanged(int position);
|
||||
|
||||
private:
|
||||
void updateSliderPosition();
|
||||
void writeValueToField();
|
||||
void updateSliderPosition();
|
||||
void writeValueToField();
|
||||
|
||||
private:
|
||||
QPointer<QSpinBox> m_spinBox;
|
||||
|
@ -52,7 +52,7 @@ class PdmUiTableRowEditor : public PdmUiEditorHandle
|
||||
{
|
||||
public:
|
||||
PdmUiTableRowEditor(PdmUiTableViewQModel* model, caf::PdmObjectHandle* pdmObject, int row);
|
||||
virtual ~PdmUiTableRowEditor();
|
||||
~PdmUiTableRowEditor() override;
|
||||
|
||||
protected:
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
@ -63,7 +63,7 @@ class PdmUiTableView : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
PdmUiTableView(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
|
||||
~PdmUiTableView();
|
||||
~PdmUiTableView() override;
|
||||
|
||||
void setChildArrayField(PdmChildArrayFieldHandle* childArrayField);
|
||||
void setUiConfigurationName(QString uiConfigName);
|
||||
|
@ -55,11 +55,11 @@ class PdmUiTableViewDelegate : public QStyledItemDelegate
|
||||
|
||||
public:
|
||||
PdmUiTableViewDelegate(QObject* parent, PdmUiTableViewQModel* model);
|
||||
~PdmUiTableViewDelegate();
|
||||
~PdmUiTableViewDelegate() override;
|
||||
|
||||
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||
void setEditorData(QWidget* editor, const QModelIndex& index) const;
|
||||
void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
||||
void setEditorData(QWidget* editor, const QModelIndex& index) const override;
|
||||
void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
||||
|
||||
bool isEditorOpen() const;
|
||||
|
||||
@ -67,7 +67,7 @@ public:
|
||||
void slotEditorDestroyed(QObject* obj);
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
|
||||
private:
|
||||
PdmUiTableViewQModel* m_model;
|
||||
|
@ -116,7 +116,7 @@ class PdmUiTableViewEditor : public PdmUiFieldEditorHandle, public SelectionChan
|
||||
|
||||
public:
|
||||
PdmUiTableViewEditor();
|
||||
~PdmUiTableViewEditor();
|
||||
~PdmUiTableViewEditor() override;
|
||||
|
||||
void enableHeaderText(bool enable);
|
||||
void setTableSelectionLevel(int selectionLevel);
|
||||
@ -128,16 +128,16 @@ public:
|
||||
protected:
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
virtual void onSelectionManagerSelectionChanged( const std::set<int>& changedSelectionLevels ) override;
|
||||
void onSelectionManagerSelectionChanged( const std::set<int>& changedSelectionLevels ) override;
|
||||
|
||||
private:
|
||||
void selectedUiItems(const QModelIndexList& modelIndexList, std::vector<PdmUiItem*>& objects);
|
||||
bool isSelectionRoleDefined() const;
|
||||
void updateSelectionManagerFromTableSelection();
|
||||
|
||||
bool eventFilter(QObject* obj, QEvent* event);
|
||||
bool eventFilter(QObject* obj, QEvent* event) override;
|
||||
PdmChildArrayFieldHandle* childArrayFieldHandle();
|
||||
|
||||
private slots:
|
||||
|
@ -94,11 +94,11 @@ class TextEdit : public QTextEdit
|
||||
public:
|
||||
explicit TextEdit(QWidget *parent = nullptr);
|
||||
|
||||
virtual QSize sizeHint() const override;
|
||||
QSize sizeHint() const override;
|
||||
void setHeightHint(int heightHint);
|
||||
|
||||
protected:
|
||||
virtual void focusOutEvent(QFocusEvent *e);
|
||||
void focusOutEvent(QFocusEvent *e) override;
|
||||
|
||||
signals:
|
||||
void editingFinished();
|
||||
@ -118,15 +118,15 @@ class PdmUiTextEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiTextEditor() { m_textMode = PdmUiTextEditorAttribute::PLAIN; }
|
||||
virtual ~PdmUiTextEditor() {}
|
||||
~PdmUiTextEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
protected slots:
|
||||
void slotSetValueToField();
|
||||
void slotSetValueToField();
|
||||
|
||||
private:
|
||||
QTextOption::WrapMode toQTextOptionWrapMode(PdmUiTextEditorAttribute::WrapMode wrapMode);
|
||||
|
@ -59,7 +59,7 @@ class PdmUiToolBarEditor : public PdmUiEditorHandle
|
||||
{
|
||||
public:
|
||||
PdmUiToolBarEditor(const QString& title, QMainWindow* mainWindow);
|
||||
~PdmUiToolBarEditor();
|
||||
~PdmUiToolBarEditor() override;
|
||||
|
||||
bool isEditorDataValid(const std::vector<caf::PdmFieldHandle*>& fields) const;
|
||||
void setFields(std::vector<caf::PdmFieldHandle*>& fields);
|
||||
@ -69,7 +69,7 @@ public:
|
||||
void hide();
|
||||
|
||||
private:
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
private:
|
||||
QPointer<QToolBar> m_toolbar;
|
||||
|
@ -67,15 +67,15 @@ class PdmUiToolButtonEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiToolButtonEditor() {}
|
||||
virtual ~PdmUiToolButtonEditor() {}
|
||||
~PdmUiToolButtonEditor() override {}
|
||||
|
||||
protected:
|
||||
virtual QWidget* createEditorWidget(QWidget * parent);
|
||||
virtual QWidget* createLabelWidget(QWidget * parent);
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
QWidget* createEditorWidget(QWidget * parent) override;
|
||||
QWidget* createLabelWidget(QWidget * parent) override;
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
protected slots:
|
||||
void slotClicked(bool checked);
|
||||
void slotClicked(bool checked);
|
||||
|
||||
private:
|
||||
QPointer<QToolButton> m_toolButton;
|
||||
|
@ -56,7 +56,7 @@ class PdmUiTreeEditorHandle: public PdmUiEditorHandle
|
||||
{
|
||||
public:
|
||||
PdmUiTreeEditorHandle() {}
|
||||
~PdmUiTreeEditorHandle() {}
|
||||
~PdmUiTreeEditorHandle() override {}
|
||||
|
||||
QWidget* getOrCreateWidget(QWidget* parent);
|
||||
QWidget* widget() { return m_widget; }
|
||||
|
@ -51,13 +51,13 @@ class PdmUiTreeItemEditor: public PdmUiEditorHandle
|
||||
{
|
||||
public:
|
||||
explicit PdmUiTreeItemEditor(PdmUiItem* uiItem);
|
||||
virtual ~PdmUiTreeItemEditor() {};
|
||||
~PdmUiTreeItemEditor() override {};
|
||||
|
||||
void setTreeViewEditor(PdmUiTreeEditorHandle* treeViewEditor) { m_treeViewEditor = treeViewEditor; }
|
||||
|
||||
protected: // Interface to override:
|
||||
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
private:
|
||||
PdmUiTreeEditorHandle* m_treeViewEditor;
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual QSize sizeHint() const override
|
||||
QSize sizeHint() const override
|
||||
{
|
||||
QSize mySize = QTreeView::sizeHint();
|
||||
|
||||
@ -109,7 +109,7 @@ protected:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override
|
||||
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override
|
||||
{
|
||||
QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
|
||||
|
||||
@ -141,7 +141,7 @@ private:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
virtual void paintEvent(QPaintEvent* paintEvent) override
|
||||
void paintEvent(QPaintEvent* paintEvent) override
|
||||
{
|
||||
QPainter p(this);
|
||||
|
||||
|
@ -92,12 +92,12 @@ class PdmUiTreeSelectionEditor : public PdmUiFieldEditorHandle
|
||||
|
||||
public:
|
||||
PdmUiTreeSelectionEditor();
|
||||
virtual ~PdmUiTreeSelectionEditor();
|
||||
~PdmUiTreeSelectionEditor() override;
|
||||
|
||||
protected:
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
virtual QWidget* createEditorWidget(QWidget* parent);
|
||||
virtual QWidget* createLabelWidget(QWidget* parent);
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
QWidget* createEditorWidget(QWidget* parent) override;
|
||||
QWidget* createLabelWidget(QWidget* parent) override;
|
||||
QMargins calculateLabelContentMargins() const override;
|
||||
|
||||
private slots:
|
||||
|
@ -59,30 +59,30 @@ class PdmUiTreeSelectionQModel : public QAbstractItemModel
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PdmUiTreeSelectionQModel(QObject *parent = nullptr);
|
||||
~PdmUiTreeSelectionQModel();
|
||||
~PdmUiTreeSelectionQModel() override;
|
||||
|
||||
static int headingRole();
|
||||
static int optionItemValueRole();
|
||||
static int headingRole();
|
||||
static int optionItemValueRole();
|
||||
|
||||
void setCheckedStateForItems(const QModelIndexList& indices, bool checked);
|
||||
void enableSingleSelectionMode(bool enable);
|
||||
void setCheckedStateForItems(const QModelIndexList& indices, bool checked);
|
||||
void enableSingleSelectionMode(bool enable);
|
||||
|
||||
int optionItemCount() const;
|
||||
void setOptions(caf::PdmUiFieldEditorHandle* field, const QList<caf::PdmOptionItemInfo>& options);
|
||||
void setUiValueCache(const QVariant* uiValuesCache );
|
||||
void resetUiValueCache();
|
||||
bool isReadOnly(const QModelIndex& index) const;
|
||||
bool isChecked(const QModelIndex& index) const;
|
||||
int optionItemCount() const;
|
||||
void setOptions(caf::PdmUiFieldEditorHandle* field, const QList<caf::PdmOptionItemInfo>& options);
|
||||
void setUiValueCache(const QVariant* uiValuesCache );
|
||||
void resetUiValueCache();
|
||||
bool isReadOnly(const QModelIndex& index) const;
|
||||
bool isChecked(const QModelIndex& index) const;
|
||||
|
||||
bool hasGrandChildren() const;
|
||||
bool hasGrandChildren() const;
|
||||
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
virtual QModelIndex parent(const QModelIndex &child) const override;
|
||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &child) const override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
|
||||
// Consider moving these functions to PdmUiFieldHandle
|
||||
static bool isSingleValueField(const QVariant& fieldValue);
|
||||
|
@ -62,7 +62,7 @@ class PdmUiTreeView : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
PdmUiTreeView(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
|
||||
~PdmUiTreeView();
|
||||
~PdmUiTreeView() override;
|
||||
|
||||
void enableDefaultContextMenu(bool enable);
|
||||
void enableSelectionManagerUpdating(bool enable); // TODO: rename
|
||||
|
@ -65,7 +65,7 @@ class PdmUiTreeViewWidget : public QTreeView
|
||||
{
|
||||
public:
|
||||
explicit PdmUiTreeViewWidget(QWidget* parent = nullptr) : QTreeView(parent) {};
|
||||
virtual ~PdmUiTreeViewWidget() {};
|
||||
~PdmUiTreeViewWidget() override {};
|
||||
|
||||
bool isTreeItemEditWidgetActive() const
|
||||
{
|
||||
@ -73,7 +73,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void dragMoveEvent(QDragMoveEvent* event)
|
||||
void dragMoveEvent(QDragMoveEvent* event) override
|
||||
{
|
||||
caf::PdmUiTreeViewQModel* treeViewModel = dynamic_cast<caf::PdmUiTreeViewQModel*>(model());
|
||||
if (treeViewModel && treeViewModel->dragDropInterface())
|
||||
@ -84,7 +84,7 @@ protected:
|
||||
QTreeView::dragMoveEvent(event);
|
||||
}
|
||||
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent* event)
|
||||
void dragLeaveEvent(QDragLeaveEvent* event) override
|
||||
{
|
||||
caf::PdmUiTreeViewQModel* treeViewModel = dynamic_cast<caf::PdmUiTreeViewQModel*>(model());
|
||||
if (treeViewModel && treeViewModel->dragDropInterface())
|
||||
|
@ -90,48 +90,48 @@ class PdmUiTreeViewEditor : public PdmUiTreeEditorHandle
|
||||
Q_OBJECT
|
||||
public:
|
||||
PdmUiTreeViewEditor();
|
||||
~PdmUiTreeViewEditor();
|
||||
~PdmUiTreeViewEditor() override;
|
||||
|
||||
void enableDefaultContextMenu(bool enable);
|
||||
void enableSelectionManagerUpdating(bool enable);
|
||||
void enableDefaultContextMenu(bool enable);
|
||||
void enableSelectionManagerUpdating(bool enable);
|
||||
|
||||
void enableAppendOfClassNameToUiItemText(bool enable);
|
||||
bool isAppendOfClassNameToUiItemTextEnabled();
|
||||
void enableAppendOfClassNameToUiItemText(bool enable);
|
||||
bool isAppendOfClassNameToUiItemTextEnabled();
|
||||
|
||||
QTreeView* treeView();
|
||||
bool isTreeItemEditWidgetActive() const;
|
||||
QTreeView* treeView();
|
||||
bool isTreeItemEditWidgetActive() const;
|
||||
|
||||
void selectAsCurrentItem(const PdmUiItem* uiItem);
|
||||
void selectedUiItems(std::vector<PdmUiItem*>& objects);
|
||||
void setExpanded(const PdmUiItem* uiItem, bool doExpand) const;
|
||||
void selectAsCurrentItem(const PdmUiItem* uiItem);
|
||||
void selectedUiItems(std::vector<PdmUiItem*>& objects);
|
||||
void setExpanded(const PdmUiItem* uiItem, bool doExpand) const;
|
||||
|
||||
PdmUiItem* uiItemFromModelIndex(const QModelIndex& index) const;
|
||||
QModelIndex findModelIndex(const PdmUiItem* object) const;
|
||||
PdmUiItem* uiItemFromModelIndex(const QModelIndex& index) const;
|
||||
QModelIndex findModelIndex(const PdmUiItem* object) const;
|
||||
|
||||
QWidget* createWidget(QWidget* parent);
|
||||
QWidget* createWidget(QWidget* parent) override;
|
||||
|
||||
void setDragDropInterface(PdmUiDragDropInterface* dragDropInterface);
|
||||
void setDragDropInterface(PdmUiDragDropInterface* dragDropInterface);
|
||||
|
||||
signals:
|
||||
void selectionChanged();
|
||||
void selectionChanged();
|
||||
|
||||
protected:
|
||||
virtual void configureAndUpdateUi(const QString& uiConfigName);
|
||||
void configureAndUpdateUi(const QString& uiConfigName) override;
|
||||
|
||||
virtual void updateMySubTree(PdmUiItem* uiItem);
|
||||
void updateMySubTree(PdmUiItem* uiItem) override;
|
||||
|
||||
void updateContextMenuSignals();
|
||||
void updateContextMenuSignals();
|
||||
|
||||
private slots:
|
||||
void customMenuRequested(QPoint pos);
|
||||
void slotOnSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
|
||||
void customMenuRequested(QPoint pos);
|
||||
void slotOnSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
|
||||
|
||||
private:
|
||||
PdmChildArrayFieldHandle* currentChildArrayFieldHandle();
|
||||
|
||||
void updateSelectionManager();
|
||||
void updateSelectionManager();
|
||||
|
||||
virtual bool eventFilter(QObject *obj, QEvent *event);
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
|
||||
private:
|
||||
QPointer<QWidget> m_mainWidget;
|
||||
|
@ -98,22 +98,22 @@ private:
|
||||
|
||||
// Overrides from QAbstractItemModel
|
||||
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex &parentIndex = QModelIndex( )) const;
|
||||
virtual QModelIndex parent(const QModelIndex &index) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parentIndex = QModelIndex( )) const override;
|
||||
QModelIndex parent(const QModelIndex &index) const override;
|
||||
|
||||
virtual int rowCount(const QModelIndex &parentIndex = QModelIndex( ) ) const;
|
||||
virtual int columnCount(const QModelIndex &parentIndex = QModelIndex( ) ) const;
|
||||
int rowCount(const QModelIndex &parentIndex = QModelIndex( ) ) const override;
|
||||
int columnCount(const QModelIndex &parentIndex = QModelIndex( ) ) const override;
|
||||
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole ) const;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole ) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
|
||||
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual QMimeData* mimeData(const QModelIndexList &indexes) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
QStringList mimeTypes() const override;
|
||||
QMimeData* mimeData(const QModelIndexList &indexes) const override;
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
|
||||
Qt::DropActions supportedDropActions() const override;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user