mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
System : Replaced tab with four spaces in AppFwk
This commit is contained in:
@@ -50,7 +50,7 @@ namespace caf {
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Log::info(const QString& msg)
|
void Log::info(const QString& msg)
|
||||||
{
|
{
|
||||||
infoMultiLine(msg, "");
|
infoMultiLine(msg, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ void Log::info(const QString& msg)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Log::warning(const QString& msg)
|
void Log::warning(const QString& msg)
|
||||||
{
|
{
|
||||||
warningMultiLine(msg, "");
|
warningMultiLine(msg, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ void Log::warning(const QString& msg)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool Log::error(const QString& err)
|
bool Log::error(const QString& err)
|
||||||
{
|
{
|
||||||
return errorMultiLine(err, "");
|
return errorMultiLine(err, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -77,30 +77,30 @@ bool Log::error(const QString& err)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Log::infoMultiLine(const QString& line1, const QString& line2Etc)
|
void Log::infoMultiLine(const QString& line1, const QString& line2Etc)
|
||||||
{
|
{
|
||||||
MessagePanel* messagePanel = MessagePanel::instance();
|
MessagePanel* messagePanel = MessagePanel::instance();
|
||||||
|
|
||||||
bool generateTrace = true;
|
bool generateTrace = true;
|
||||||
|
|
||||||
if (messagePanel)
|
if (messagePanel)
|
||||||
{
|
{
|
||||||
QString msg = line1;
|
QString msg = line1;
|
||||||
if (!line2Etc.isEmpty())
|
if (!line2Etc.isEmpty())
|
||||||
{
|
{
|
||||||
msg += "\n";
|
msg += "\n";
|
||||||
msg += Utils::indentString(2, line2Etc);
|
msg += Utils::indentString(2, line2Etc);
|
||||||
}
|
}
|
||||||
|
|
||||||
messagePanel->showInfo(msg);
|
messagePanel->showInfo(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (generateTrace)
|
if (generateTrace)
|
||||||
{
|
{
|
||||||
cvf::Trace::show("INF: %s", (const char*)line1.toAscii());
|
cvf::Trace::show("INF: %s", (const char*)line1.toAscii());
|
||||||
if (!line2Etc.isEmpty())
|
if (!line2Etc.isEmpty())
|
||||||
{
|
{
|
||||||
cvf::Trace::show((const char*)Utils::indentString(5, line2Etc).toAscii());
|
cvf::Trace::show((const char*)Utils::indentString(5, line2Etc).toAscii());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ bool Log::errorMultiLine(const QString& line1, const QString& line2Etc)
|
|||||||
bool generateTrace = true;
|
bool generateTrace = true;
|
||||||
|
|
||||||
if (messagePanel)
|
if (messagePanel)
|
||||||
{
|
{
|
||||||
QString msg = line1;
|
QString msg = line1;
|
||||||
if (!line2Etc.isEmpty())
|
if (!line2Etc.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -155,43 +155,43 @@ bool Log::errorMultiLine(const QString& line1, const QString& line2Etc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
messagePanel->showError(msg);
|
messagePanel->showError(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool messagePanelVisible = messagePanel ? messagePanel->isVisibleToUser() : false;
|
bool messagePanelVisible = messagePanel ? messagePanel->isVisibleToUser() : false;
|
||||||
if (!messagePanelVisible)
|
if (!messagePanelVisible)
|
||||||
{
|
{
|
||||||
// if (mainWindow)
|
// if (mainWindow)
|
||||||
// {
|
// {
|
||||||
// QString capt = QString(PD_APPLICATION_NAME) + " Error";
|
// QString capt = QString(PD_APPLICATION_NAME) + " Error";
|
||||||
//
|
//
|
||||||
// QString msg = line1;
|
// QString msg = line1;
|
||||||
// if (!line2Etc.isEmpty())
|
// if (!line2Etc.isEmpty())
|
||||||
// {
|
// {
|
||||||
// msg += "\n";
|
// msg += "\n";
|
||||||
// msg += line2Etc;
|
// msg += line2Etc;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// QMessageBox msgBox(mainWindow);
|
// QMessageBox msgBox(mainWindow);
|
||||||
// msgBox.setIcon(QMessageBox::Critical);
|
// msgBox.setIcon(QMessageBox::Critical);
|
||||||
// msgBox.setWindowTitle(capt);
|
// msgBox.setWindowTitle(capt);
|
||||||
// msgBox.setText(msg);
|
// msgBox.setText(msg);
|
||||||
//
|
//
|
||||||
// msgBox.exec();
|
// msgBox.exec();
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// generateTrace = true;
|
// generateTrace = true;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (generateTrace)
|
if (generateTrace)
|
||||||
{
|
{
|
||||||
cvf::Trace::show("\nERR: %s", (const char*)line1.toAscii());
|
cvf::Trace::show("\nERR: %s", (const char*)line1.toAscii());
|
||||||
if (!line2Etc.isEmpty())
|
if (!line2Etc.isEmpty())
|
||||||
{
|
{
|
||||||
cvf::Trace::show((const char*)Utils::indentString(5, line2Etc).toAscii());
|
cvf::Trace::show((const char*)Utils::indentString(5, line2Etc).toAscii());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
static void warningMultiLine(const QString& line1, const QString& line2Etc);
|
static void warningMultiLine(const QString& line1, const QString& line2Etc);
|
||||||
static bool errorMultiLine(const QString& line1, const QString& line2Etc);
|
static bool errorMultiLine(const QString& line1, const QString& line2Etc);
|
||||||
|
|
||||||
static void pumpMessages();
|
static void pumpMessages();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,13 +61,13 @@ MessagePanel* MessagePanel::sm_messagePanelInstance = NULL;
|
|||||||
MessagePanel::MessagePanel(QDockWidget* parent)
|
MessagePanel::MessagePanel(QDockWidget* parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
m_textEdit = new QTextEdit(this);
|
m_textEdit = new QTextEdit(this);
|
||||||
m_textEdit->setReadOnly(true);
|
m_textEdit->setReadOnly(true);
|
||||||
m_textEdit->setLineWrapMode(QTextEdit::NoWrap);
|
m_textEdit->setLineWrapMode(QTextEdit::NoWrap);
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout();
|
QVBoxLayout* layout = new QVBoxLayout();
|
||||||
layout->addWidget(m_textEdit);
|
layout->addWidget(m_textEdit);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
sm_messagePanelInstance = this;
|
sm_messagePanelInstance = this;
|
||||||
}
|
}
|
||||||
@@ -78,13 +78,13 @@ MessagePanel::MessagePanel(QDockWidget* parent)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void MessagePanel::showInfo(QString info)
|
void MessagePanel::showInfo(QString info)
|
||||||
{
|
{
|
||||||
convertStringToHTML(&info);
|
convertStringToHTML(&info);
|
||||||
|
|
||||||
QString str = "<font color='green'>";
|
QString str = "<font color='green'>";
|
||||||
str += info;
|
str += info;
|
||||||
str += "</font>";
|
str += "</font>";
|
||||||
|
|
||||||
m_textEdit->append(str);
|
m_textEdit->append(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -93,13 +93,13 @@ void MessagePanel::showInfo(QString info)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void MessagePanel::showWarning(QString warn)
|
void MessagePanel::showWarning(QString warn)
|
||||||
{
|
{
|
||||||
convertStringToHTML(&warn);
|
convertStringToHTML(&warn);
|
||||||
|
|
||||||
QString str = "<font color='maroon'>";
|
QString str = "<font color='maroon'>";
|
||||||
str += warn;
|
str += warn;
|
||||||
str += "</font>";
|
str += "</font>";
|
||||||
|
|
||||||
m_textEdit->append(str);
|
m_textEdit->append(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -108,13 +108,13 @@ void MessagePanel::showWarning(QString warn)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void MessagePanel::showError(QString error)
|
void MessagePanel::showError(QString error)
|
||||||
{
|
{
|
||||||
convertStringToHTML(&error);
|
convertStringToHTML(&error);
|
||||||
|
|
||||||
QString str = "<b><font color='red'>";
|
QString str = "<b><font color='red'>";
|
||||||
str += error;
|
str += error;
|
||||||
str += "</font></b>";
|
str += "</font></b>";
|
||||||
|
|
||||||
m_textEdit->append(str);
|
m_textEdit->append(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -123,8 +123,8 @@ void MessagePanel::showError(QString error)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void MessagePanel::convertStringToHTML(QString* str)
|
void MessagePanel::convertStringToHTML(QString* str)
|
||||||
{
|
{
|
||||||
str->replace("\n", "<br>");
|
str->replace("\n", "<br>");
|
||||||
str->replace(" ", " ");
|
str->replace(" ", " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -143,15 +143,15 @@ QSize MessagePanel::sizeHint () const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool MessagePanel::isVisibleToUser()
|
bool MessagePanel::isVisibleToUser()
|
||||||
{
|
{
|
||||||
if (!isVisible()) return false;
|
if (!isVisible()) return false;
|
||||||
|
|
||||||
if (!m_textEdit) return false;
|
if (!m_textEdit) return false;
|
||||||
if (!m_textEdit->isVisible()) return false;
|
if (!m_textEdit->isVisible()) return false;
|
||||||
|
|
||||||
QRegion rgn = m_textEdit->visibleRegion();
|
QRegion rgn = m_textEdit->visibleRegion();
|
||||||
if (rgn.isEmpty()) return false;
|
if (rgn.isEmpty()) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -52,27 +52,27 @@ namespace caf {
|
|||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
class MessagePanel : public QWidget
|
class MessagePanel : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MessagePanel(QDockWidget* parent);
|
MessagePanel(QDockWidget* parent);
|
||||||
|
|
||||||
static MessagePanel* instance();
|
static MessagePanel* instance();
|
||||||
|
|
||||||
void showInfo(QString info);
|
void showInfo(QString info);
|
||||||
void showWarning(QString warn);
|
void showWarning(QString warn);
|
||||||
void showError(QString error);
|
void showError(QString error);
|
||||||
|
|
||||||
virtual QSize sizeHint () const;
|
virtual QSize sizeHint () const;
|
||||||
bool isVisibleToUser();
|
bool isVisibleToUser();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void convertStringToHTML(QString* str);
|
static void convertStringToHTML(QString* str);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static MessagePanel* sm_messagePanelInstance;
|
static MessagePanel* sm_messagePanelInstance;
|
||||||
|
|
||||||
QTextEdit* m_textEdit;
|
QTextEdit* m_textEdit;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ namespace caf {
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QtMouseState::QtMouseState()
|
QtMouseState::QtMouseState()
|
||||||
{
|
{
|
||||||
m_cleanButtonClickTolerance = 3;
|
m_cleanButtonClickTolerance = 3;
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
@@ -200,12 +200,12 @@ void QtMouseState::updateFromMouseEvent(QGraphicsSceneMouseEvent* event)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void QtMouseState::reset()
|
void QtMouseState::reset()
|
||||||
{
|
{
|
||||||
m_mouseButtonState = Qt::NoButton;
|
m_mouseButtonState = Qt::NoButton;
|
||||||
|
|
||||||
m_cleanButtonPressButton = Qt::NoButton;
|
m_cleanButtonPressButton = Qt::NoButton;
|
||||||
m_cleanButtonPressPosX = cvf::UNDEFINED_INT;
|
m_cleanButtonPressPosX = cvf::UNDEFINED_INT;
|
||||||
m_cleanButtonPressPosY = cvf::UNDEFINED_INT;
|
m_cleanButtonPressPosY = cvf::UNDEFINED_INT;
|
||||||
m_cleanButtonClickButton = Qt::NoButton;
|
m_cleanButtonClickButton = Qt::NoButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ void QtMouseState::reset()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
Qt::MouseButtons QtMouseState::mouseButtonState() const
|
Qt::MouseButtons QtMouseState::mouseButtonState() const
|
||||||
{
|
{
|
||||||
return m_mouseButtonState;
|
return m_mouseButtonState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ Qt::MouseButtons QtMouseState::mouseButtonState() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
Qt::KeyboardModifiers QtMouseState::keyboardModifierFlags() const
|
Qt::KeyboardModifiers QtMouseState::keyboardModifierFlags() const
|
||||||
{
|
{
|
||||||
return m_keyboardModifierFlags;
|
return m_keyboardModifierFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ Qt::KeyboardModifiers QtMouseState::keyboardModifierFlags() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
Qt::MouseButton QtMouseState::cleanButtonClickButton() const
|
Qt::MouseButton QtMouseState::cleanButtonClickButton() const
|
||||||
{
|
{
|
||||||
return m_cleanButtonClickButton;
|
return m_cleanButtonClickButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -241,13 +241,13 @@ Qt::MouseButton QtMouseState::cleanButtonClickButton() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
int QtMouseState::numMouseButtonsInState(Qt::MouseButtons buttonState)
|
int QtMouseState::numMouseButtonsInState(Qt::MouseButtons buttonState)
|
||||||
{
|
{
|
||||||
int iNum = 0;
|
int iNum = 0;
|
||||||
|
|
||||||
if (buttonState & Qt::LeftButton) iNum++;
|
if (buttonState & Qt::LeftButton) iNum++;
|
||||||
if (buttonState & Qt::RightButton) iNum++;
|
if (buttonState & Qt::RightButton) iNum++;
|
||||||
if (buttonState & Qt::MidButton) iNum++;
|
if (buttonState & Qt::MidButton) iNum++;
|
||||||
|
|
||||||
return iNum;
|
return iNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -126,12 +126,12 @@ QString Utils::constructFullFileName(const QString& folder, const QString& baseF
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString Utils::indentString(int numSpacesToIndent, const QString& str)
|
QString Utils::indentString(int numSpacesToIndent, const QString& str)
|
||||||
{
|
{
|
||||||
QString indentString;
|
QString indentString;
|
||||||
indentString.fill(' ', numSpacesToIndent);
|
indentString.fill(' ', numSpacesToIndent);
|
||||||
|
|
||||||
QStringList strList = str.split("\n");
|
QStringList strList = str.split("\n");
|
||||||
|
|
||||||
QString retStr = indentString + strList.join("\n" + indentString);
|
QString retStr = indentString + strList.join("\n" + indentString);
|
||||||
return retStr;
|
return retStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ QString CmdFieldChangeExec::name()
|
|||||||
{
|
{
|
||||||
QString fieldText;
|
QString fieldText;
|
||||||
|
|
||||||
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
fieldText = QString("Change field '%1'").arg(uiFieldHandle->uiName());
|
fieldText = QString("Change field '%1'").arg(uiFieldHandle->uiName());
|
||||||
@@ -91,8 +91,8 @@ void CmdFieldChangeExec::redo()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
PdmXmlFieldHandle* xmlFieldHandle = field->xmlCapability();
|
PdmXmlFieldHandle* xmlFieldHandle = field->xmlCapability();
|
||||||
if (uiFieldHandle && xmlFieldHandle)
|
if (uiFieldHandle && xmlFieldHandle)
|
||||||
{
|
{
|
||||||
if (m_commandData->m_redoFieldValueSerialized.isEmpty())
|
if (m_commandData->m_redoFieldValueSerialized.isEmpty())
|
||||||
@@ -140,8 +140,8 @@ void CmdFieldChangeExec::undo()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
PdmXmlFieldHandle* xmlFieldHandle = field->xmlCapability();
|
PdmXmlFieldHandle* xmlFieldHandle = field->xmlCapability();
|
||||||
if (uiFieldHandle && xmlFieldHandle)
|
if (uiFieldHandle && xmlFieldHandle)
|
||||||
{
|
{
|
||||||
QXmlStreamReader xmlStream(m_commandData->m_undoFieldValueSerialized);
|
QXmlStreamReader xmlStream(m_commandData->m_undoFieldValueSerialized);
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ void CmdUiCommandSystemImpl::fieldChangedCommand(PdmFieldHandle* editorField, co
|
|||||||
for (size_t i = 0; i < fieldsToUpdate.size(); i++)
|
for (size_t i = 0; i < fieldsToUpdate.size(); i++)
|
||||||
{
|
{
|
||||||
PdmFieldHandle* field = fieldsToUpdate[i];
|
PdmFieldHandle* field = fieldsToUpdate[i];
|
||||||
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
QVariant fieldCurrentUiValue = uiFieldHandle->uiValue();
|
QVariant fieldCurrentUiValue = uiFieldHandle->uiValue();
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ void CmdAddItemExec::redo()
|
|||||||
PdmChildArrayFieldHandle* listField = dynamic_cast<PdmChildArrayFieldHandle*>(field);
|
PdmChildArrayFieldHandle* listField = dynamic_cast<PdmChildArrayFieldHandle*>(field);
|
||||||
if (listField && field->xmlCapability())
|
if (listField && field->xmlCapability())
|
||||||
{
|
{
|
||||||
QString classKeyword = field->xmlCapability()->childClassKeyword();
|
QString classKeyword = field->xmlCapability()->childClassKeyword();
|
||||||
|
|
||||||
if (classKeyword.isEmpty()) return;
|
if (classKeyword.isEmpty()) return;
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public:
|
|||||||
// Access operators
|
// Access operators
|
||||||
|
|
||||||
/*Conversion*/ operator DataType* () const { return m_fieldValue; }
|
/*Conversion*/ operator DataType* () const { return m_fieldValue; }
|
||||||
DataType* operator->() const { return m_fieldValue; }
|
DataType* operator->() const { return m_fieldValue; }
|
||||||
|
|
||||||
const PdmPointer<DataType>& operator()() const { return m_fieldValue; }
|
const PdmPointer<DataType>& operator()() const { return m_fieldValue; }
|
||||||
const PdmPointer<DataType>& v() const { return m_fieldValue; }
|
const PdmPointer<DataType>& v() const { return m_fieldValue; }
|
||||||
|
|||||||
@@ -72,12 +72,12 @@ bool PdmFieldHandle::hasPtrReferencedObjects()
|
|||||||
/*
|
/*
|
||||||
PdmUiFieldHandle* PdmFieldHandle::uiCapability()
|
PdmUiFieldHandle* PdmFieldHandle::uiCapability()
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
PdmXmlFieldHandle* PdmFieldHandle::xmlCapability()
|
PdmXmlFieldHandle* PdmFieldHandle::xmlCapability()
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ public:
|
|||||||
template <typename CapabilityType>
|
template <typename CapabilityType>
|
||||||
CapabilityType* capability();
|
CapabilityType* capability();
|
||||||
|
|
||||||
PdmUiFieldHandle* uiCapability();
|
PdmUiFieldHandle* uiCapability();
|
||||||
PdmXmlFieldHandle* xmlCapability();
|
PdmXmlFieldHandle* xmlCapability();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PDM_DISABLE_COPY_AND_ASSIGN(PdmFieldHandle);
|
PDM_DISABLE_COPY_AND_ASSIGN(PdmFieldHandle);
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ void PdmObjectHandle::fields(std::vector<PdmFieldHandle*>& fields) const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void PdmObjectHandle::setAsParentField(PdmFieldHandle* parentField)
|
void PdmObjectHandle::setAsParentField(PdmFieldHandle* parentField)
|
||||||
{
|
{
|
||||||
assert(m_parentField == NULL);
|
assert(m_parentField == NULL);
|
||||||
|
|
||||||
m_parentField = parentField;
|
m_parentField = parentField;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -52,9 +52,9 @@ void PdmObjectHandle::setAsParentField(PdmFieldHandle* parentField)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void PdmObjectHandle::removeAsParentField(PdmFieldHandle* parentField)
|
void PdmObjectHandle::removeAsParentField(PdmFieldHandle* parentField)
|
||||||
{
|
{
|
||||||
assert(m_parentField == parentField);
|
assert(m_parentField == parentField);
|
||||||
|
|
||||||
m_parentField = NULL;
|
m_parentField = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -84,12 +84,12 @@ public :
|
|||||||
{ PdmPointerImpl::addReference(&m_object); }
|
{ PdmPointerImpl::addReference(&m_object); }
|
||||||
inline ~PdmPointer () { PdmPointerImpl::removeReference(&m_object); }
|
inline ~PdmPointer () { PdmPointerImpl::removeReference(&m_object); }
|
||||||
|
|
||||||
T* p() const { return static_cast<T*>(const_cast<PdmObjectHandle*>(m_object)); }
|
T* p() const { return static_cast<T*>(const_cast<PdmObjectHandle*>(m_object)); }
|
||||||
bool isNull() const { return !m_object; }
|
bool isNull() const { return !m_object; }
|
||||||
bool notNull() const { return !isNull(); }
|
bool notNull() const { return !isNull(); }
|
||||||
operator T* () const { return static_cast<T*>(const_cast<PdmObjectHandle*>(m_object)); }
|
operator T* () const { return static_cast<T*>(const_cast<PdmObjectHandle*>(m_object)); }
|
||||||
T& operator* () const { return *static_cast<T*>(const_cast<PdmObjectHandle*>(m_object)); }
|
T& operator* () const { return *static_cast<T*>(const_cast<PdmObjectHandle*>(m_object)); }
|
||||||
T* operator->() const { return static_cast<T*>(const_cast<PdmObjectHandle*>(m_object)); }
|
T* operator->() const { return static_cast<T*>(const_cast<PdmObjectHandle*>(m_object)); }
|
||||||
PdmPointer<T> & operator= ( const PdmPointer<T>& p ) { if (this != &p) PdmPointerImpl::removeReference(&m_object); m_object = p.m_object; PdmPointerImpl::addReference(&m_object); return *this; }
|
PdmPointer<T> & operator= ( const PdmPointer<T>& p ) { if (this != &p) PdmPointerImpl::removeReference(&m_object); m_object = p.m_object; PdmPointerImpl::addReference(&m_object); return *this; }
|
||||||
PdmPointer<T> & operator= ( T* p ) { if (m_object != p) PdmPointerImpl::removeReference(&m_object); m_object = p; PdmPointerImpl::addReference(&m_object); return *this; }
|
PdmPointer<T> & operator= ( T* p ) { if (m_object != p) PdmPointerImpl::removeReference(&m_object); m_object = p; PdmPointerImpl::addReference(&m_object); return *this; }
|
||||||
|
|
||||||
|
|||||||
@@ -54,16 +54,16 @@ public:
|
|||||||
// Access operators
|
// Access operators
|
||||||
|
|
||||||
/*Conversion*/ operator DataType* () const { return m_fieldValue; }
|
/*Conversion*/ operator DataType* () const { return m_fieldValue; }
|
||||||
DataType* operator->() const { return m_fieldValue; }
|
DataType* operator->() const { return m_fieldValue; }
|
||||||
|
|
||||||
const PdmPointer<DataType>& operator()() const { return m_fieldValue; }
|
const PdmPointer<DataType>& operator()() const { return m_fieldValue; }
|
||||||
const PdmPointer<DataType>& v() const { return m_fieldValue; }
|
const PdmPointer<DataType>& v() const { return m_fieldValue; }
|
||||||
|
|
||||||
bool operator==(const DataTypePtr& fieldValue) { return m_fieldValue == fieldValue; }
|
bool operator==(const DataTypePtr& fieldValue) { return m_fieldValue == fieldValue; }
|
||||||
|
|
||||||
// Child objects
|
// Child objects
|
||||||
|
|
||||||
virtual void childObjects(std::vector<PdmObjectHandle*>*);
|
virtual void childObjects(std::vector<PdmObjectHandle*>*);
|
||||||
|
|
||||||
// Ptr referenced objects
|
// Ptr referenced objects
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ private:
|
|||||||
friend class PdmFieldXmlCap< PdmPtrField <DataType*> >;
|
friend class PdmFieldXmlCap< PdmPtrField <DataType*> >;
|
||||||
void setRawPtr(PdmObjectHandle* obj);
|
void setRawPtr(PdmObjectHandle* obj);
|
||||||
|
|
||||||
PdmPointer<DataType> m_fieldValue;
|
PdmPointer<DataType> m_fieldValue;
|
||||||
|
|
||||||
// Resolving
|
// Resolving
|
||||||
QString m_referenceString;
|
QString m_referenceString;
|
||||||
|
|||||||
@@ -79,12 +79,12 @@ caf::PdmPtrField<DataType*>& PdmPtrField<DataType*>::operator=(const FieldDataTy
|
|||||||
template<typename DataType >
|
template<typename DataType >
|
||||||
void caf::PdmPtrField<DataType*>::childObjects(std::vector<PdmObjectHandle*>* objects)
|
void caf::PdmPtrField<DataType*>::childObjects(std::vector<PdmObjectHandle*>* objects)
|
||||||
{
|
{
|
||||||
assert(objects);
|
assert(objects);
|
||||||
PdmObjectHandle* obj = m_fieldValue.rawPtr();
|
PdmObjectHandle* obj = m_fieldValue.rawPtr();
|
||||||
if (obj)
|
if (obj)
|
||||||
{
|
{
|
||||||
objects->push_back(obj);
|
objects->push_back(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ public:
|
|||||||
{
|
{
|
||||||
addField(field, keyword);
|
addField(field, keyword);
|
||||||
|
|
||||||
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
uiFieldHandle->setUiItemInfo(fieldDescription);
|
uiFieldHandle->setUiItemInfo(fieldDescription);
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ void PdmUiFieldHandle::notifyFieldChanged(const QVariant& oldFieldValue, const Q
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
PdmUiFieldHandle* PdmFieldHandle::uiCapability()
|
PdmUiFieldHandle* PdmFieldHandle::uiCapability()
|
||||||
{
|
{
|
||||||
PdmUiFieldHandle* uiField = capability<PdmUiFieldHandle>();
|
PdmUiFieldHandle* uiField = capability<PdmUiFieldHandle>();
|
||||||
assert(uiField);
|
assert(uiField);
|
||||||
|
|
||||||
return uiField;
|
return uiField;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of namespace caf
|
} // End of namespace caf
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ void PdmUiObjectHandle::uiOrdering(QString uiConfigName, PdmUiOrdering& uiOrderi
|
|||||||
m_owner->fields(fields);
|
m_owner->fields(fields);
|
||||||
for (size_t i = 0; i < fields.size(); ++i)
|
for (size_t i = 0; i < fields.size(); ++i)
|
||||||
{
|
{
|
||||||
PdmUiFieldHandle * field = fields[i]->uiCapability();
|
PdmUiFieldHandle * field = fields[i]->uiCapability();
|
||||||
if (!uiOrdering.contains(field))
|
if (!uiOrdering.contains(field))
|
||||||
{
|
{
|
||||||
uiOrdering.add(field->fieldHandle());
|
uiOrdering.add(field->fieldHandle());
|
||||||
@@ -114,7 +114,7 @@ void PdmUiObjectHandle::addDefaultUiTreeChildren(PdmUiTreeOrdering* uiTreeOrderi
|
|||||||
{
|
{
|
||||||
if (fields[fIdx]->hasChildObjects() && !uiTreeOrdering->containsField(fields[fIdx]))
|
if (fields[fIdx]->hasChildObjects() && !uiTreeOrdering->containsField(fields[fIdx]))
|
||||||
{
|
{
|
||||||
if (fields[fIdx]->uiCapability()->isUiHidden() && !fields[fIdx]->uiCapability()->isUiChildrenHidden())
|
if (fields[fIdx]->uiCapability()->isUiHidden() && !fields[fIdx]->uiCapability()->isUiChildrenHidden())
|
||||||
{
|
{
|
||||||
std::vector<PdmObjectHandle*> children;
|
std::vector<PdmObjectHandle*> children;
|
||||||
fields[fIdx]->childObjects(&children);
|
fields[fIdx]->childObjects(&children);
|
||||||
@@ -147,7 +147,7 @@ void PdmUiObjectHandle::addDefaultUiTreeChildren(PdmUiTreeOrdering* uiTreeOrderi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!fields[fIdx]->uiCapability()->isUiHidden())
|
else if (!fields[fIdx]->uiCapability()->isUiHidden())
|
||||||
{
|
{
|
||||||
uiTreeOrdering->add(fields[fIdx]);
|
uiTreeOrdering->add(fields[fIdx]);
|
||||||
}
|
}
|
||||||
@@ -182,7 +182,7 @@ void PdmUiObjectHandle::expandUiTree(PdmUiTreeOrdering* root, QString uiConfigNa
|
|||||||
{
|
{
|
||||||
if (!root->ignoreSubTree())
|
if (!root->ignoreSubTree())
|
||||||
{
|
{
|
||||||
if (root->isRepresentingField() && !root->field()->uiCapability()->isUiChildrenHidden(uiConfigName))
|
if (root->isRepresentingField() && !root->field()->uiCapability()->isUiChildrenHidden(uiConfigName))
|
||||||
{
|
{
|
||||||
std::vector<PdmObjectHandle*> fieldsChildObjects;
|
std::vector<PdmObjectHandle*> fieldsChildObjects;
|
||||||
root->field()->childObjects(&fieldsChildObjects);
|
root->field()->childObjects(&fieldsChildObjects);
|
||||||
@@ -216,7 +216,7 @@ void PdmUiObjectHandle::updateUiIconFromToggleField()
|
|||||||
{
|
{
|
||||||
if (objectToggleField())
|
if (objectToggleField())
|
||||||
{
|
{
|
||||||
PdmUiFieldHandle* uiFieldHandle = objectToggleField()->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = objectToggleField()->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
bool active = uiFieldHandle->uiValue().toBool();
|
bool active = uiFieldHandle->uiValue().toBool();
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ bool PdmUiOrdering::contains(const PdmUiItem* item)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void PdmUiOrdering::add(const PdmFieldHandle* field)
|
void PdmUiOrdering::add(const PdmFieldHandle* field)
|
||||||
{
|
{
|
||||||
PdmUiFieldHandle* uiItem = const_cast<PdmFieldHandle*>(field)->uiCapability();
|
PdmUiFieldHandle* uiItem = const_cast<PdmFieldHandle*>(field)->uiCapability();
|
||||||
assert(uiItem);
|
assert(uiItem);
|
||||||
m_ordering.push_back(uiItem);
|
m_ordering.push_back(uiItem);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,8 +256,8 @@ PdmUiItem* PdmUiTreeOrdering::uiItem() const
|
|||||||
PdmUiItem* PdmUiTreeOrdering::activeItem() const
|
PdmUiItem* PdmUiTreeOrdering::activeItem() const
|
||||||
{
|
{
|
||||||
if (isRepresentingObject()) return uiObj(m_object);
|
if (isRepresentingObject()) return uiObj(m_object);
|
||||||
if (isRepresentingField()) return m_field->uiCapability();
|
if (isRepresentingField()) return m_field->uiCapability();
|
||||||
if (isDisplayItemOnly()) return m_uiItem;
|
if (isDisplayItemOnly()) return m_uiItem;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,17 +154,17 @@ void SelectionManager::selectionAsReferences(std::vector<QString>& referenceList
|
|||||||
|
|
||||||
for (size_t i = 0; i < selection.size(); i++)
|
for (size_t i = 0; i < selection.size(); i++)
|
||||||
{
|
{
|
||||||
if (!selection[i].first.isNull())
|
if (!selection[i].first.isNull())
|
||||||
{
|
{
|
||||||
PdmUiObjectHandle* pdmObj = dynamic_cast<PdmUiObjectHandle*>(selection[i].second);
|
PdmUiObjectHandle* pdmObj = dynamic_cast<PdmUiObjectHandle*>(selection[i].second);
|
||||||
if (pdmObj)
|
if (pdmObj)
|
||||||
{
|
{
|
||||||
QString itemRef = PdmReferenceHelper::referenceFromRootToObject(m_rootObject, pdmObj->objectHandle());
|
QString itemRef = PdmReferenceHelper::referenceFromRootToObject(m_rootObject, pdmObj->objectHandle());
|
||||||
|
|
||||||
referenceList.push_back(itemRef);
|
referenceList.push_back(itemRef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -57,39 +57,39 @@ void PdmSettings::readFieldsFromApplicationStore(caf::PdmObjectHandle* object, c
|
|||||||
// Constructs a QSettings object for accessing settings of the application and organization
|
// Constructs a QSettings object for accessing settings of the application and organization
|
||||||
// set previously with a call to QCoreApplication::setOrganizationName(),
|
// set previously with a call to QCoreApplication::setOrganizationName(),
|
||||||
// QCoreApplication::setOrganizationDomain(), and QCoreApplication::setApplicationName().
|
// QCoreApplication::setOrganizationDomain(), and QCoreApplication::setApplicationName().
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
std::vector<caf::PdmFieldHandle*> fields;
|
std::vector<caf::PdmFieldHandle*> fields;
|
||||||
|
|
||||||
object->fields(fields);
|
object->fields(fields);
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < fields.size(); i++)
|
for (i = 0; i < fields.size(); i++)
|
||||||
{
|
{
|
||||||
caf::PdmFieldHandle* fieldHandle = fields[i];
|
caf::PdmFieldHandle* fieldHandle = fields[i];
|
||||||
|
|
||||||
std::vector<caf::PdmObjectHandle*> children;
|
std::vector<caf::PdmObjectHandle*> children;
|
||||||
fieldHandle->childObjects(&children);
|
fieldHandle->childObjects(&children);
|
||||||
for (size_t childIdx = 0; childIdx < children.size(); childIdx++)
|
for (size_t childIdx = 0; childIdx < children.size(); childIdx++)
|
||||||
{
|
{
|
||||||
caf::PdmObjectHandle* child = children[childIdx];
|
caf::PdmObjectHandle* child = children[childIdx];
|
||||||
caf::PdmXmlObjectHandle* xmlObjHandle = xmlObj(child);
|
caf::PdmXmlObjectHandle* xmlObjHandle = xmlObj(child);
|
||||||
|
|
||||||
QString subContext = context + xmlObjHandle->classKeyword() + "/";
|
QString subContext = context + xmlObjHandle->classKeyword() + "/";
|
||||||
readFieldsFromApplicationStore(child, subContext);
|
readFieldsFromApplicationStore(child, subContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (children.size() == 0)
|
if (children.size() == 0)
|
||||||
{
|
{
|
||||||
QString key = context + fieldHandle->keyword();
|
QString key = context + fieldHandle->keyword();
|
||||||
if (settings.contains(key))
|
if (settings.contains(key))
|
||||||
{
|
{
|
||||||
QVariant val = settings.value(key);
|
QVariant val = settings.value(key);
|
||||||
|
|
||||||
caf::PdmValueField* valueField = dynamic_cast<caf::PdmValueField*>(fieldHandle);
|
caf::PdmValueField* valueField = dynamic_cast<caf::PdmValueField*>(fieldHandle);
|
||||||
assert(valueField);
|
assert(valueField);
|
||||||
valueField->setFromQVariant(val);
|
valueField->setFromQVariant(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -104,39 +104,39 @@ void PdmSettings::writeFieldsToApplicationStore(caf::PdmObjectHandle* object, co
|
|||||||
// Constructs a QSettings object for accessing settings of the application and organization
|
// Constructs a QSettings object for accessing settings of the application and organization
|
||||||
// set previously with a call to QCoreApplication::setOrganizationName(),
|
// set previously with a call to QCoreApplication::setOrganizationName(),
|
||||||
// QCoreApplication::setOrganizationDomain(), and QCoreApplication::setApplicationName().
|
// QCoreApplication::setOrganizationDomain(), and QCoreApplication::setApplicationName().
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
std::vector<caf::PdmFieldHandle*> fields;
|
std::vector<caf::PdmFieldHandle*> fields;
|
||||||
object->fields(fields);
|
object->fields(fields);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < fields.size(); i++)
|
for (i = 0; i < fields.size(); i++)
|
||||||
{
|
{
|
||||||
caf::PdmFieldHandle* fieldHandle = fields[i];
|
caf::PdmFieldHandle* fieldHandle = fields[i];
|
||||||
|
|
||||||
std::vector<caf::PdmObjectHandle*> children;
|
std::vector<caf::PdmObjectHandle*> children;
|
||||||
fieldHandle->childObjects(&children);
|
fieldHandle->childObjects(&children);
|
||||||
for (size_t childIdx = 0; childIdx < children.size(); childIdx++)
|
for (size_t childIdx = 0; childIdx < children.size(); childIdx++)
|
||||||
{
|
{
|
||||||
caf::PdmObjectHandle* child = children[childIdx];
|
caf::PdmObjectHandle* child = children[childIdx];
|
||||||
QString subContext;
|
QString subContext;
|
||||||
if (context.isEmpty())
|
if (context.isEmpty())
|
||||||
{
|
{
|
||||||
caf::PdmXmlObjectHandle* xmlObjHandle = xmlObj(child);
|
caf::PdmXmlObjectHandle* xmlObjHandle = xmlObj(child);
|
||||||
|
|
||||||
subContext = xmlObjHandle->classKeyword() + "/";
|
subContext = xmlObjHandle->classKeyword() + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
writeFieldsToApplicationStore(child, subContext);
|
writeFieldsToApplicationStore(child, subContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (children.size() == 0)
|
if (children.size() == 0)
|
||||||
{
|
{
|
||||||
caf::PdmValueField* valueField = dynamic_cast<caf::PdmValueField*>(fieldHandle);
|
caf::PdmValueField* valueField = dynamic_cast<caf::PdmValueField*>(fieldHandle);
|
||||||
assert(valueField);
|
assert(valueField);
|
||||||
settings.setValue(context + fieldHandle->keyword(), valueField->toQVariant());
|
settings.setValue(context + fieldHandle->keyword(), valueField->toQVariant());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ namespace caf
|
|||||||
class PdmSettings
|
class PdmSettings
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void readFieldsFromApplicationStore(caf::PdmObjectHandle* object, const QString context = "");
|
static void readFieldsFromApplicationStore(caf::PdmObjectHandle* object, const QString context = "");
|
||||||
static void writeFieldsToApplicationStore(caf::PdmObjectHandle* object, const QString context = "");
|
static void writeFieldsToApplicationStore(caf::PdmObjectHandle* object, const QString context = "");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,10 @@ QString PdmXmlFieldHandle::childClassKeyword()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
PdmXmlFieldHandle* PdmFieldHandle::xmlCapability()
|
PdmXmlFieldHandle* PdmFieldHandle::xmlCapability()
|
||||||
{
|
{
|
||||||
PdmXmlFieldHandle* xmlField = capability<PdmXmlFieldHandle>();
|
PdmXmlFieldHandle* xmlField = capability<PdmXmlFieldHandle>();
|
||||||
assert(xmlField);
|
assert(xmlField);
|
||||||
|
|
||||||
return xmlField;
|
return xmlField;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of namespace caf
|
} // End of namespace caf
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ void PdmXmlObjectHandle::readFields(QXmlStreamReader& xmlStream, PdmObjectFactor
|
|||||||
QString name = xmlStream.name().toString();
|
QString name = xmlStream.name().toString();
|
||||||
|
|
||||||
PdmFieldHandle* fieldHandle = m_owner->findField(name);
|
PdmFieldHandle* fieldHandle = m_owner->findField(name);
|
||||||
if (fieldHandle && fieldHandle->xmlCapability())
|
if (fieldHandle && fieldHandle->xmlCapability())
|
||||||
{
|
{
|
||||||
PdmXmlFieldHandle* xmlFieldHandle = fieldHandle->xmlCapability();
|
PdmXmlFieldHandle* xmlFieldHandle = fieldHandle->xmlCapability();
|
||||||
if (xmlFieldHandle->isIOReadable())
|
if (xmlFieldHandle->isIOReadable())
|
||||||
{
|
{
|
||||||
// readFieldData assumes that the xmlStream points to first token of field content.
|
// readFieldData assumes that the xmlStream points to first token of field content.
|
||||||
@@ -114,7 +114,7 @@ void PdmXmlObjectHandle::writeFields(QXmlStreamWriter& xmlStream)
|
|||||||
m_owner->fields(fields);
|
m_owner->fields(fields);
|
||||||
for (size_t it = 0; it < fields.size(); ++it)
|
for (size_t it = 0; it < fields.size(); ++it)
|
||||||
{
|
{
|
||||||
PdmXmlFieldHandle* field = fields[it]->xmlCapability();
|
PdmXmlFieldHandle* field = fields[it]->xmlCapability();
|
||||||
if (field && field->isIOWritable())
|
if (field && field->isIOWritable())
|
||||||
{
|
{
|
||||||
QString keyword = field->fieldHandle()->keyword();
|
QString keyword = field->fieldHandle()->keyword();
|
||||||
|
|||||||
@@ -68,82 +68,82 @@ cvf::Vec3d eigenVector3(const cvf::Mat3d& mx, double eigenValue, bool* computedO
|
|||||||
{
|
{
|
||||||
const double doubleThreshold = 1.0e-60;
|
const double doubleThreshold = 1.0e-60;
|
||||||
if (computedOk) (*computedOk) = false;
|
if (computedOk) (*computedOk) = false;
|
||||||
cvf::Mat3d mxMinusEigv = mx;
|
cvf::Mat3d mxMinusEigv = mx;
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
mxMinusEigv(i, i) -= eigenValue;
|
mxMinusEigv(i, i) -= eigenValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::Mat3d cof = cofactor3(mxMinusEigv);
|
cvf::Mat3d cof = cofactor3(mxMinusEigv);
|
||||||
|
|
||||||
// Find largest absolute cofactor
|
// Find largest absolute cofactor
|
||||||
|
|
||||||
int largestCof_i = -1;
|
int largestCof_i = -1;
|
||||||
int largestCof_j = -1;
|
int largestCof_j = -1;
|
||||||
double largestCof = 0.0;
|
double largestCof = 0.0;
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 3; j++)
|
for (int j = 0; j < 3; j++)
|
||||||
{
|
{
|
||||||
double absCof = fabs(cof(i,j));
|
double absCof = fabs(cof(i,j));
|
||||||
|
|
||||||
if (absCof > largestCof)
|
if (absCof > largestCof)
|
||||||
{
|
{
|
||||||
largestCof = absCof;
|
largestCof = absCof;
|
||||||
largestCof_i = i;
|
largestCof_i = i;
|
||||||
largestCof_j = j;
|
largestCof_j = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fabs(largestCof) < doubleThreshold) return cvf::Vec3d::ZERO;
|
if (fabs(largestCof) < doubleThreshold) return cvf::Vec3d::ZERO;
|
||||||
|
|
||||||
// Find largest matrix element not in the max cofactor row/col
|
// Find largest matrix element not in the max cofactor row/col
|
||||||
|
|
||||||
int largestMxElm_i = -1;
|
int largestMxElm_i = -1;
|
||||||
int largestMxElm_j = -1;
|
int largestMxElm_j = -1;
|
||||||
double largestMxElm = 0.0;
|
double largestMxElm = 0.0;
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if (i != largestCof_i)
|
if (i != largestCof_i)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < 3; j++)
|
for (int j = 0; j < 3; j++)
|
||||||
{
|
{
|
||||||
if (j != largestCof_j)
|
if (j != largestCof_j)
|
||||||
{
|
{
|
||||||
double absMxElm = fabs(mxMinusEigv(i,j));
|
double absMxElm = fabs(mxMinusEigv(i,j));
|
||||||
|
|
||||||
if (absMxElm > largestMxElm)
|
if (absMxElm > largestMxElm)
|
||||||
{
|
{
|
||||||
largestMxElm = absMxElm;
|
largestMxElm = absMxElm;
|
||||||
largestMxElm_i = i;
|
largestMxElm_i = i;
|
||||||
largestMxElm_j = j;
|
largestMxElm_j = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if largest coefficient is zero
|
// Check if largest coefficient is zero
|
||||||
if (fabs(largestMxElm) < doubleThreshold) return cvf::Vec3d::ZERO;
|
if (fabs(largestMxElm) < doubleThreshold) return cvf::Vec3d::ZERO;
|
||||||
|
|
||||||
// Find last component index
|
// Find last component index
|
||||||
int lastComp_j = 0;
|
int lastComp_j = 0;
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
if ((i != largestCof_j) && (i != largestMxElm_j)) lastComp_j = i;
|
if ((i != largestCof_j) && (i != largestMxElm_j)) lastComp_j = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::Vec3d eigenVector;
|
cvf::Vec3d eigenVector;
|
||||||
eigenVector[largestCof_j] = 1.0;
|
eigenVector[largestCof_j] = 1.0;
|
||||||
eigenVector[lastComp_j] = cof(largestCof_i, lastComp_j) / cof(largestCof_i, largestCof_j);
|
eigenVector[lastComp_j] = cof(largestCof_i, lastComp_j) / cof(largestCof_i, largestCof_j);
|
||||||
eigenVector[largestMxElm_j] = (-mxMinusEigv(largestMxElm_i, largestCof_j) - mxMinusEigv(largestMxElm_i, lastComp_j)*eigenVector[lastComp_j] )
|
eigenVector[largestMxElm_j] = (-mxMinusEigv(largestMxElm_i, largestCof_j) - mxMinusEigv(largestMxElm_i, lastComp_j)*eigenVector[lastComp_j] )
|
||||||
/ mxMinusEigv(largestMxElm_i, largestMxElm_j);
|
/ mxMinusEigv(largestMxElm_i, largestMxElm_j);
|
||||||
|
|
||||||
if (computedOk) (*computedOk) = true;
|
if (computedOk) (*computedOk) = true;
|
||||||
|
|
||||||
return eigenVector;
|
return eigenVector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -170,111 +170,111 @@ cvf::Vec3d eigenVector3(const cvf::Mat3d& mx, double eigenValue, bool* computedO
|
|||||||
template<typename S>
|
template<typename S>
|
||||||
cvf::Vec3f Tensor3<S>::calculatePrincipals( cvf::Vec3f principalDirections[3])
|
cvf::Vec3f Tensor3<S>::calculatePrincipals( cvf::Vec3f principalDirections[3])
|
||||||
{
|
{
|
||||||
CVF_TIGHT_ASSERT(m_tensor);
|
CVF_TIGHT_ASSERT(m_tensor);
|
||||||
|
|
||||||
const float floatThreshold = 1.0e-30f;
|
const float floatThreshold = 1.0e-30f;
|
||||||
const double doubleThreshold = 1.0e-60;
|
const double doubleThreshold = 1.0e-60;
|
||||||
|
|
||||||
cvf::Vec3f principalValues;
|
cvf::Vec3f principalValues;
|
||||||
|
|
||||||
// Init return arrays to invalid
|
// Init return arrays to invalid
|
||||||
|
|
||||||
principalValues[0] = std::numeric_limits<float>::infinity();
|
principalValues[0] = std::numeric_limits<float>::infinity();
|
||||||
principalValues[1] = std::numeric_limits<float>::infinity();
|
principalValues[1] = std::numeric_limits<float>::infinity();
|
||||||
principalValues[2] = std::numeric_limits<float>::infinity();
|
principalValues[2] = std::numeric_limits<float>::infinity();
|
||||||
|
|
||||||
if (principalDirections)
|
if (principalDirections)
|
||||||
{
|
{
|
||||||
principalDirections[0] = cvf::Vec3f::ZERO;
|
principalDirections[0] = cvf::Vec3f::ZERO;
|
||||||
principalDirections[1] = cvf::Vec3f::ZERO;
|
principalDirections[1] = cvf::Vec3f::ZERO;
|
||||||
principalDirections[2] = cvf::Vec3f::ZERO;
|
principalDirections[2] = cvf::Vec3f::ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return if we have an undefined component
|
// Return if we have an undefined component
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
if (m_tensor[i] == std::numeric_limits<S>::infinity())
|
if (m_tensor[i] == std::numeric_limits<S>::infinity())
|
||||||
{
|
{
|
||||||
return principalValues;
|
return principalValues;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return 0, 0, 0 if all components are zero
|
// Return 0, 0, 0 if all components are zero
|
||||||
|
|
||||||
bool isAllTensCompsZero = true;
|
bool isAllTensCompsZero = true;
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
if (!(abs(m_tensor[i]) < floatThreshold))
|
if (!(abs(m_tensor[i]) < floatThreshold))
|
||||||
{
|
{
|
||||||
isAllTensCompsZero = false;
|
isAllTensCompsZero = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAllTensCompsZero)
|
if (isAllTensCompsZero)
|
||||||
{
|
{
|
||||||
return cvf::Vec3f::ZERO;
|
return cvf::Vec3f::ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
double SXX = m_tensor[0], SYY = m_tensor[1], SZZ = m_tensor[2];
|
double SXX = m_tensor[0], SYY = m_tensor[1], SZZ = m_tensor[2];
|
||||||
double SXY = m_tensor[3], SYZ = m_tensor[4], SZX = m_tensor[5];
|
double SXY = m_tensor[3], SYZ = m_tensor[4], SZX = m_tensor[5];
|
||||||
|
|
||||||
double pressure = -(SXX + SYY + SZZ)/3.0;
|
double pressure = -(SXX + SYY + SZZ)/3.0;
|
||||||
|
|
||||||
// Normally we would solve the eigenvalues by solving the 3'rd degree equation:
|
// Normally we would solve the eigenvalues by solving the 3'rd degree equation:
|
||||||
// -sigma^3 + A*sigma^2 - B*sigma + C = 0
|
// -sigma^3 + A*sigma^2 - B*sigma + C = 0
|
||||||
// in which A, B, and C are the invariants of the stress tensor.
|
// in which A, B, and C are the invariants of the stress tensor.
|
||||||
// http://www.engapplets.vt.edu/Mohr/java/nsfapplets/MohrCircles2-3D/Theory/theory.htm
|
// http://www.engapplets.vt.edu/Mohr/java/nsfapplets/MohrCircles2-3D/Theory/theory.htm
|
||||||
|
|
||||||
// But the roots(eigenvalues) are calculated by transforming the above equation into
|
// But the roots(eigenvalues) are calculated by transforming the above equation into
|
||||||
// s**3 + aa*s + b = 0 and using the trignometric solution.
|
// s**3 + aa*s + b = 0 and using the trignometric solution.
|
||||||
// See crc standard mathematical tables 19th edition pp. 103-104.
|
// See crc standard mathematical tables 19th edition pp. 103-104.
|
||||||
|
|
||||||
SXX += pressure;
|
SXX += pressure;
|
||||||
SYY += pressure;
|
SYY += pressure;
|
||||||
SZZ += pressure;
|
SZZ += pressure;
|
||||||
|
|
||||||
double S1, S2, S3;
|
double S1, S2, S3;
|
||||||
double AA, BB, CC, DD, angleP;
|
double AA, BB, CC, DD, angleP;
|
||||||
|
|
||||||
AA = SXY*SXY + SYZ*SYZ + SZX*SZX - SXX*SYY - SYY*SZZ - SXX*SZZ;
|
AA = SXY*SXY + SYZ*SYZ + SZX*SZX - SXX*SYY - SYY*SZZ - SXX*SZZ;
|
||||||
|
|
||||||
BB = SXX * SYZ * SYZ
|
BB = SXX * SYZ * SYZ
|
||||||
+ SYY * SZX * SZX
|
+ SYY * SZX * SZX
|
||||||
+ SZZ * SXY * SXY
|
+ SZZ * SXY * SXY
|
||||||
- SXX * SYY * SZZ
|
- SXX * SYY * SZZ
|
||||||
- 2.0 * SXY * SYZ * SZX;
|
- 2.0 * SXY * SYZ * SZX;
|
||||||
|
|
||||||
if (fabs(AA) < doubleThreshold)
|
if (fabs(AA) < doubleThreshold)
|
||||||
{
|
{
|
||||||
S1 = 0.0;
|
S1 = 0.0;
|
||||||
S2 = 0.0;
|
S2 = 0.0;
|
||||||
S3 = 0.0;
|
S3 = 0.0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CC = -sqrt(27.0/AA) * BB * 0.5 / AA;
|
CC = -sqrt(27.0/AA) * BB * 0.5 / AA;
|
||||||
|
|
||||||
if (CC > 1.0) CC = 1.0;
|
if (CC > 1.0) CC = 1.0;
|
||||||
else if (CC < -1.0) CC = -1.0;
|
else if (CC < -1.0) CC = -1.0;
|
||||||
|
|
||||||
angleP = acos(CC)/3.0;
|
angleP = acos(CC)/3.0;
|
||||||
DD = 2.0*sqrt(AA/3.0);
|
DD = 2.0*sqrt(AA/3.0);
|
||||||
S1 = DD*cos(angleP);
|
S1 = DD*cos(angleP);
|
||||||
S2 = DD*cos(angleP + 4.0*cvf::PI_D/3.0);
|
S2 = DD*cos(angleP + 4.0*cvf::PI_D/3.0);
|
||||||
S3 = DD*cos(angleP + 2.0*cvf::PI_D/3.0);
|
S3 = DD*cos(angleP + 2.0*cvf::PI_D/3.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int idxPMin = 2;
|
int idxPMin = 2;
|
||||||
int idxPMid = 1;
|
int idxPMid = 1;
|
||||||
int idxPMax = 0;
|
int idxPMax = 0;
|
||||||
|
|
||||||
double principalsd[3];
|
double principalsd[3];
|
||||||
principalsd[idxPMax] = (S1 - pressure);
|
principalsd[idxPMax] = (S1 - pressure);
|
||||||
principalsd[idxPMid] = (S2 - pressure);
|
principalsd[idxPMid] = (S2 - pressure);
|
||||||
principalsd[idxPMin] = (S3 - pressure);
|
principalsd[idxPMin] = (S3 - pressure);
|
||||||
|
|
||||||
// Sort the principals if we have no Z component in the tensor at all
|
// Sort the principals if we have no Z component in the tensor at all
|
||||||
if ((m_tensor[2] == 0.0f) && (m_tensor[4] == 0.0f) && (m_tensor[5] == 0.0f))
|
if ((m_tensor[2] == 0.0f) && (m_tensor[4] == 0.0f) && (m_tensor[5] == 0.0f))
|
||||||
@@ -317,8 +317,8 @@ template< typename S>
|
|||||||
float caf::Tensor3<S>::calculateVonMises()
|
float caf::Tensor3<S>::calculateVonMises()
|
||||||
{
|
{
|
||||||
return (float) sqrt( ( (m_tensor[0]*m_tensor[0] + m_tensor[1]*m_tensor[1] + m_tensor[2]*m_tensor[2]) ) +
|
return (float) sqrt( ( (m_tensor[0]*m_tensor[0] + m_tensor[1]*m_tensor[1] + m_tensor[2]*m_tensor[2]) ) +
|
||||||
( -(m_tensor[0]*m_tensor[1] + m_tensor[1]*m_tensor[2] + m_tensor[0]*m_tensor[2]) ) +
|
( -(m_tensor[0]*m_tensor[1] + m_tensor[1]*m_tensor[2] + m_tensor[0]*m_tensor[2]) ) +
|
||||||
( 3*(m_tensor[3]*m_tensor[3] + m_tensor[4]*m_tensor[4] + m_tensor[5]*m_tensor[5]) ) );
|
( 3*(m_tensor[3]*m_tensor[3] + m_tensor[4]*m_tensor[4] + m_tensor[5]*m_tensor[5]) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,12 +182,12 @@ public:
|
|||||||
{
|
{
|
||||||
if (uiObject->userDescriptionField())
|
if (uiObject->userDescriptionField())
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->userDescriptionField()->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->userDescriptionField()->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
userDesc = uiFieldHandle->uiValue().toString();
|
userDesc = uiFieldHandle->uiValue().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
options.push_back(caf::PdmOptionItemInfo(uiObject->uiName() + "(" + userDesc + ")", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(objects[i]))));
|
options.push_back(caf::PdmOptionItemInfo(uiObject->uiName() + "(" + userDesc + ")", QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(objects[i]))));
|
||||||
}
|
}
|
||||||
@@ -513,7 +513,7 @@ void MainWindow::setPdmRoot(caf::PdmObjectHandle* pdmRoot)
|
|||||||
if (fields.size())
|
if (fields.size())
|
||||||
{
|
{
|
||||||
caf::PdmFieldHandle* field = fields[0];
|
caf::PdmFieldHandle* field = fields[0];
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
m_pdmUiTreeView2->setPdmItem(uiFieldHandle);
|
m_pdmUiTreeView2->setPdmItem(uiFieldHandle);
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ void AboutDialog::create()
|
|||||||
if (!m_appVersion.isEmpty())
|
if (!m_appVersion.isEmpty())
|
||||||
{
|
{
|
||||||
QString appVer = m_appVersion;
|
QString appVer = m_appVersion;
|
||||||
// appVer += cvf::System::is64Bit() ? " (64-bit)" : " (32-bit)";
|
// appVer += cvf::System::is64Bit() ? " (64-bit)" : " (32-bit)";
|
||||||
|
|
||||||
QLabel* appVersionLabel = new QLabel(this);
|
QLabel* appVersionLabel = new QLabel(this);
|
||||||
QFont appVersionFont(appVersionLabel->font());
|
QFont appVersionFont(appVersionLabel->font());
|
||||||
@@ -228,7 +228,7 @@ void AboutDialog::create()
|
|||||||
|
|
||||||
|
|
||||||
// Possibly show extend version info
|
// Possibly show extend version info
|
||||||
if (m_showQtVersion ||
|
if (m_showQtVersion ||
|
||||||
m_verLabels.size() > 0)
|
m_verLabels.size() > 0)
|
||||||
{
|
{
|
||||||
QGridLayout* verInfoLayout = new QGridLayout;
|
QGridLayout* verInfoLayout = new QGridLayout;
|
||||||
|
|||||||
@@ -54,33 +54,33 @@ class AboutDialog : public QDialog
|
|||||||
public:
|
public:
|
||||||
AboutDialog(QWidget* parent);
|
AboutDialog(QWidget* parent);
|
||||||
|
|
||||||
void setApplicationName(const QString& appName);
|
void setApplicationName(const QString& appName);
|
||||||
void setApplicationVersion(const QString& ver);
|
void setApplicationVersion(const QString& ver);
|
||||||
void setCopyright(const QString& copyright);
|
void setCopyright(const QString& copyright);
|
||||||
|
|
||||||
void showQtVersion(bool show);
|
void showQtVersion(bool show);
|
||||||
void addVersionEntry(const QString& verLabel, const QString& verText);
|
void addVersionEntry(const QString& verLabel, const QString& verText);
|
||||||
void setIsDebugBuild(bool isDebugBuild);
|
void setIsDebugBuild(bool isDebugBuild);
|
||||||
|
|
||||||
void create();
|
void create();
|
||||||
|
|
||||||
static QString versionStringForcurrentOpenGLContext();
|
static QString versionStringForcurrentOpenGLContext();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void addStringPairToVerInfoLayout(const QString& labelStr, const QString& infoStr, QGridLayout* verInfoLayout, int insertRow);
|
void addStringPairToVerInfoLayout(const QString& labelStr, const QString& infoStr, QGridLayout* verInfoLayout, int insertRow);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_isCreated; // Indicates if the create() function has been called
|
bool m_isCreated; // Indicates if the create() function has been called
|
||||||
|
|
||||||
QString m_appName; // Application name, appears in bold at the top of the dialog.
|
QString m_appName; // Application name, appears in bold at the top of the dialog.
|
||||||
QString m_appVersion; // Application version info. Can be empty
|
QString m_appVersion; // Application version info. Can be empty
|
||||||
QString m_appCopyright; // Application copyright string. Can be empty
|
QString m_appCopyright; // Application copyright string. Can be empty
|
||||||
|
|
||||||
bool m_showQtVersion; // Flags whether Qt version info should be shown
|
bool m_showQtVersion; // Flags whether Qt version info should be shown
|
||||||
QStringList m_verLabels; // Labels for user specified version entries
|
QStringList m_verLabels; // Labels for user specified version entries
|
||||||
QStringList m_verTexts; // The actual version text for user specified version entries
|
QStringList m_verTexts; // The actual version text for user specified version entries
|
||||||
|
|
||||||
bool m_isDebugBuild; // If set to true, will show info in dlg to indicate that this is a debug build
|
bool m_isDebugBuild; // If set to true, will show info in dlg to indicate that this is a debug build
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
assert(m_optionsOnly); // Handling Additions on the fly not implemented
|
assert(m_optionsOnly); // Handling Additions on the fly not implemented
|
||||||
|
|
||||||
strListModel->setItemsEditable(false);
|
strListModel->setItemsEditable(false);
|
||||||
QModelIndex currentItem = m_listView->selectionModel()->currentIndex();
|
QModelIndex currentItem = m_listView->selectionModel()->currentIndex();
|
||||||
QStringList texts = PdmOptionItemInfo::extractUiTexts(m_options);
|
QStringList texts = PdmOptionItemInfo::extractUiTexts(m_options);
|
||||||
strListModel->setStringList(texts);
|
strListModel->setStringList(texts);
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
m_listView->selectionModel()->blockSignals(true);
|
m_listView->selectionModel()->blockSignals(true);
|
||||||
|
|
||||||
QItemSelection selection = m_listView->selectionModel()->selection();
|
QItemSelection selection = m_listView->selectionModel()->selection();
|
||||||
QModelIndex currentItem = m_listView->selectionModel()->currentIndex();
|
QModelIndex currentItem = m_listView->selectionModel()->currentIndex();
|
||||||
QVariant fieldValue = field()->uiValue();
|
QVariant fieldValue = field()->uiValue();
|
||||||
QStringList texts = fieldValue.toStringList();
|
QStringList texts = fieldValue.toStringList();
|
||||||
texts.push_back("");
|
texts.push_back("");
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ QVariant caf::UiListViewModelPdm::data(const QModelIndex &index, int role /*= Qt
|
|||||||
fieldIndex = index.column();
|
fieldIndex = index.column();
|
||||||
}
|
}
|
||||||
|
|
||||||
PdmUiFieldHandle* uiFieldHandle = fields[fieldIndex]->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = fields[fieldIndex]->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
return uiFieldHandle->uiValue();
|
return uiFieldHandle->uiValue();
|
||||||
|
|||||||
@@ -174,11 +174,11 @@ void PdmUiTableViewEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_pdmListField && m_pdmListField->uiCapability())
|
if (m_pdmListField && m_pdmListField->uiCapability())
|
||||||
{
|
{
|
||||||
QString text = "";
|
QString text = "";
|
||||||
m_tableHeadingIcon->setPixmap(m_pdmListField->uiCapability()->uiIcon(uiConfigName).pixmap(16, 16));
|
m_tableHeadingIcon->setPixmap(m_pdmListField->uiCapability()->uiIcon(uiConfigName).pixmap(16, 16));
|
||||||
m_tableHeading->setText(m_pdmListField->uiCapability()->uiName(uiConfigName) + QString(" (%1)").arg(m_pdmListField->size()));
|
m_tableHeading->setText(m_pdmListField->uiCapability()->uiName(uiConfigName) + QString(" (%1)").arg(m_pdmListField->size()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -195,11 +195,11 @@ void PdmUiTableViewEditor::setListField(PdmChildArrayFieldHandle* pdmListField)
|
|||||||
{
|
{
|
||||||
m_pdmListField = pdmListField;
|
m_pdmListField = pdmListField;
|
||||||
|
|
||||||
caf::PdmUiFieldHandle* uifield = NULL;
|
caf::PdmUiFieldHandle* uifield = NULL;
|
||||||
if (m_pdmListField)
|
if (m_pdmListField)
|
||||||
{
|
{
|
||||||
uifield = m_pdmListField->uiCapability();
|
uifield = m_pdmListField->uiCapability();
|
||||||
}
|
}
|
||||||
this->bindToPdmItem(uifield);
|
this->bindToPdmItem(uifield);
|
||||||
|
|
||||||
if (!m_pdmListField)
|
if (!m_pdmListField)
|
||||||
@@ -405,9 +405,9 @@ void PdmUiTableViewEditor::updateSelectionManagerFromTableSelection()
|
|||||||
QModelIndex mi = modelIndexList[i];
|
QModelIndex mi = modelIndexList[i];
|
||||||
PdmFieldHandle* pdmFieldHandle = m_tableModelPdm->getField(mi);
|
PdmFieldHandle* pdmFieldHandle = m_tableModelPdm->getField(mi);
|
||||||
|
|
||||||
if (pdmFieldHandle && pdmFieldHandle->uiCapability())
|
if (pdmFieldHandle && pdmFieldHandle->uiCapability())
|
||||||
{
|
{
|
||||||
items.push_back(pdmFieldHandle->uiCapability());
|
items.push_back(pdmFieldHandle->uiCapability());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ QVariant PdmUiTableViewModel::headerData(int section, Qt::Orientation orientatio
|
|||||||
{
|
{
|
||||||
if (orientation == Qt::Horizontal)
|
if (orientation == Qt::Horizontal)
|
||||||
{
|
{
|
||||||
PdmUiFieldHandle* uiFieldHandle = getField(createIndex(0, section))->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = getField(createIndex(0, section))->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
return uiFieldHandle->uiName(m_currentConfigName);
|
return uiFieldHandle->uiName(m_currentConfigName);
|
||||||
@@ -143,7 +143,7 @@ Qt::ItemFlags PdmUiTableViewModel::flags(const QModelIndex &index) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
PdmFieldHandle* field = getField(index);
|
PdmFieldHandle* field = getField(index);
|
||||||
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
if (uiFieldHandle->isUiReadOnly(m_currentConfigName))
|
if (uiFieldHandle->isUiReadOnly(m_currentConfigName))
|
||||||
@@ -169,7 +169,7 @@ bool PdmUiTableViewModel::setData(const QModelIndex &index, const QVariant &valu
|
|||||||
bool toggleOn = (value == Qt::Checked);
|
bool toggleOn = (value == Qt::Checked);
|
||||||
PdmFieldHandle* field = getField(index);
|
PdmFieldHandle* field = getField(index);
|
||||||
|
|
||||||
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
PdmUiCommandSystemProxy::instance()->setUiValueToField(uiFieldHandle, toggleOn);
|
PdmUiCommandSystemProxy::instance()->setUiValueToField(uiFieldHandle, toggleOn);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -187,7 +187,7 @@ QVariant PdmUiTableViewModel::data(const QModelIndex &index, int role /*= Qt::Di
|
|||||||
if (role == Qt::DisplayRole || role == Qt::EditRole)
|
if (role == Qt::DisplayRole || role == Qt::EditRole)
|
||||||
{
|
{
|
||||||
PdmFieldHandle* fieldHandle = getField(index);
|
PdmFieldHandle* fieldHandle = getField(index);
|
||||||
PdmUiFieldHandle* uiFieldHandle = fieldHandle->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = fieldHandle->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
bool fromMenuOnly = false;
|
bool fromMenuOnly = false;
|
||||||
@@ -242,7 +242,7 @@ QVariant PdmUiTableViewModel::data(const QModelIndex &index, int role /*= Qt::Di
|
|||||||
{
|
{
|
||||||
if (isRepresentingBoolean(index))
|
if (isRepresentingBoolean(index))
|
||||||
{
|
{
|
||||||
PdmUiFieldHandle* uiFieldHandle = getField(index)->uiCapability();
|
PdmUiFieldHandle* uiFieldHandle = getField(index)->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
QVariant val = uiFieldHandle->uiValue();
|
QVariant val = uiFieldHandle->uiValue();
|
||||||
@@ -445,7 +445,7 @@ PdmUiFieldEditorHandle* PdmUiTableViewModel::getEditor(const QModelIndex &index)
|
|||||||
{
|
{
|
||||||
if (field)
|
if (field)
|
||||||
{
|
{
|
||||||
editor->setField(field->uiCapability());
|
editor->setField(field->uiCapability());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -521,9 +521,9 @@ PdmObjectHandle* PdmUiTableViewModel::pdmObjectForRow(int row) const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool PdmUiTableViewModel::isRepresentingBoolean(const QModelIndex &index) const
|
bool PdmUiTableViewModel::isRepresentingBoolean(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
if (getField(index))
|
if (getField(index))
|
||||||
{
|
{
|
||||||
QVariant val = getField(index)->uiCapability()->uiValue();
|
QVariant val = getField(index)->uiCapability()->uiValue();
|
||||||
if (val.type() == QVariant::Bool)
|
if (val.type() == QVariant::Bool)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ void PdmUiToolBarEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
|
|
||||||
QString editorTypeName;
|
QString editorTypeName;
|
||||||
if (uiFieldHandle && uiFieldHandle->uiValue().type() == QVariant::Bool)
|
if (uiFieldHandle && uiFieldHandle->uiValue().type() == QVariant::Bool)
|
||||||
@@ -181,7 +181,7 @@ void PdmUiToolBarEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
// See Qt doc for QToolBar::insertWidget
|
// See Qt doc for QToolBar::insertWidget
|
||||||
QAction* action = m_actions[static_cast<int>(i)];
|
QAction* action = m_actions[static_cast<int>(i)];
|
||||||
|
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
action->setEnabled(!uiFieldHandle->isUiReadOnly(uiConfigName));
|
action->setEnabled(!uiFieldHandle->isUiReadOnly(uiConfigName));
|
||||||
@@ -201,7 +201,7 @@ void PdmUiToolBarEditor::setFields(std::vector<caf::PdmFieldHandle*>& fields)
|
|||||||
|
|
||||||
for (size_t i = 0; i < fields.size(); i++)
|
for (size_t i = 0; i < fields.size(); i++)
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = fields[i]->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = fields[i]->uiCapability();
|
||||||
|
|
||||||
// Supports only bool fields
|
// Supports only bool fields
|
||||||
assert(uiFieldHandle->uiValue().type() == QVariant::Bool);
|
assert(uiFieldHandle->uiValue().type() == QVariant::Bool);
|
||||||
|
|||||||
@@ -187,8 +187,8 @@ void PdmUiTreeViewModel::updateSubTree(PdmUiItem* pdmRoot)
|
|||||||
|
|
||||||
updateEditorsForSubTree(existingSubTreeRoot);
|
updateEditorsForSubTree(existingSubTreeRoot);
|
||||||
|
|
||||||
// Notify Qt that the toggle/name/icon etc might have been changed
|
// Notify Qt that the toggle/name/icon etc might have been changed
|
||||||
emitDataChanged(existingSubTreeRootModIdx);
|
emitDataChanged(existingSubTreeRootModIdx);
|
||||||
|
|
||||||
#if CAF_PDM_TREE_VIEW_DEBUG_PRINT
|
#if CAF_PDM_TREE_VIEW_DEBUG_PRINT
|
||||||
std::cout << std::endl << "Result :"<< std::endl ;
|
std::cout << std::endl << "Result :"<< std::endl ;
|
||||||
@@ -557,7 +557,7 @@ QVariant PdmUiTreeViewModel::data(const QModelIndex &index, int role ) const
|
|||||||
QVariant v;
|
QVariant v;
|
||||||
if (pdmUiObject->userDescriptionField())
|
if (pdmUiObject->userDescriptionField())
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = pdmUiObject->userDescriptionField()->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = pdmUiObject->userDescriptionField()->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
v = uiFieldHandle->uiValue();
|
v = uiFieldHandle->uiValue();
|
||||||
@@ -637,7 +637,7 @@ QVariant PdmUiTreeViewModel::data(const QModelIndex &index, int role ) const
|
|||||||
PdmUiObjectHandle* pdmUiObj = uiObj(uitreeOrdering->object());
|
PdmUiObjectHandle* pdmUiObj = uiObj(uitreeOrdering->object());
|
||||||
if (pdmUiObj && pdmUiObj->objectToggleField())
|
if (pdmUiObj && pdmUiObj->objectToggleField())
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = pdmUiObj->objectToggleField()->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = pdmUiObj->objectToggleField()->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
bool isToggledOn = uiFieldHandle->uiValue().toBool();
|
bool isToggledOn = uiFieldHandle->uiValue().toBool();
|
||||||
@@ -681,7 +681,7 @@ bool PdmUiTreeViewModel::setData(const QModelIndex &index, const QVariant &value
|
|||||||
{
|
{
|
||||||
if (role == Qt::EditRole && uiObject->userDescriptionField())
|
if (role == Qt::EditRole && uiObject->userDescriptionField())
|
||||||
{
|
{
|
||||||
PdmUiFieldHandle* userDescriptionUiField = uiObject->userDescriptionField()->uiCapability();
|
PdmUiFieldHandle* userDescriptionUiField = uiObject->userDescriptionField()->uiCapability();
|
||||||
if (userDescriptionUiField)
|
if (userDescriptionUiField)
|
||||||
{
|
{
|
||||||
userDescriptionUiField->setValueFromUi(value);
|
userDescriptionUiField->setValueFromUi(value);
|
||||||
@@ -693,7 +693,7 @@ bool PdmUiTreeViewModel::setData(const QModelIndex &index, const QVariant &value
|
|||||||
{
|
{
|
||||||
bool toggleOn = (value == Qt::Checked);
|
bool toggleOn = (value == Qt::Checked);
|
||||||
|
|
||||||
PdmUiFieldHandle* toggleUiField = uiObject->objectToggleField()->uiCapability();
|
PdmUiFieldHandle* toggleUiField = uiObject->objectToggleField()->uiCapability();
|
||||||
if (toggleUiField)
|
if (toggleUiField)
|
||||||
{
|
{
|
||||||
toggleUiField->setValueFromUi(value);
|
toggleUiField->setValueFromUi(value);
|
||||||
@@ -727,7 +727,7 @@ Qt::ItemFlags PdmUiTreeViewModel::flags(const QModelIndex &index) const
|
|||||||
PdmUiObjectHandle* pdmUiObject = uiObj(treeItem->object());
|
PdmUiObjectHandle* pdmUiObject = uiObj(treeItem->object());
|
||||||
if (pdmUiObject)
|
if (pdmUiObject)
|
||||||
{
|
{
|
||||||
if (pdmUiObject->userDescriptionField() && !pdmUiObject->userDescriptionField()->uiCapability()->isUiReadOnly())
|
if (pdmUiObject->userDescriptionField() && !pdmUiObject->userDescriptionField()->uiCapability()->isUiReadOnly())
|
||||||
{
|
{
|
||||||
flagMask = flagMask | Qt::ItemIsEditable;
|
flagMask = flagMask | Qt::ItemIsEditable;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ QVariant UiTreeModelPdm::data(const QModelIndex &index, int role /*= Qt::Display
|
|||||||
{
|
{
|
||||||
if (children[cIdx] == obj)
|
if (children[cIdx] == obj)
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = fields[i]->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = fields[i]->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
parentField = uiFieldHandle;
|
parentField = uiFieldHandle;
|
||||||
@@ -225,7 +225,7 @@ QVariant UiTreeModelPdm::data(const QModelIndex &index, int role /*= Qt::Display
|
|||||||
{
|
{
|
||||||
if (uiObject->userDescriptionField())
|
if (uiObject->userDescriptionField())
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->userDescriptionField()->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->userDescriptionField()->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
return uiFieldHandle->uiValue();
|
return uiFieldHandle->uiValue();
|
||||||
@@ -279,7 +279,7 @@ QVariant UiTreeModelPdm::data(const QModelIndex &index, int role /*= Qt::Display
|
|||||||
{
|
{
|
||||||
if (uiObject && uiObject->objectToggleField())
|
if (uiObject && uiObject->objectToggleField())
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->objectToggleField()->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->objectToggleField()->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
bool isToggledOn = uiFieldHandle->uiValue().toBool();
|
bool isToggledOn = uiFieldHandle->uiValue().toBool();
|
||||||
@@ -332,7 +332,7 @@ bool UiTreeModelPdm::setData(const QModelIndex &index, const QVariant &value, in
|
|||||||
{
|
{
|
||||||
if (role == Qt::EditRole && uiObject->userDescriptionField())
|
if (role == Qt::EditRole && uiObject->userDescriptionField())
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->userDescriptionField()->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->userDescriptionField()->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
uiFieldHandle->setValueFromUi(value);
|
uiFieldHandle->setValueFromUi(value);
|
||||||
@@ -346,7 +346,7 @@ bool UiTreeModelPdm::setData(const QModelIndex &index, const QVariant &value, in
|
|||||||
{
|
{
|
||||||
bool toggleOn = (value == Qt::Checked);
|
bool toggleOn = (value == Qt::Checked);
|
||||||
|
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->objectToggleField()->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = uiObject->objectToggleField()->uiCapability();
|
||||||
if (uiFieldHandle)
|
if (uiFieldHandle)
|
||||||
{
|
{
|
||||||
uiFieldHandle->setValueFromUi(toggleOn);
|
uiFieldHandle->setValueFromUi(toggleOn);
|
||||||
@@ -378,7 +378,7 @@ Qt::ItemFlags UiTreeModelPdm::flags(const QModelIndex &index) const
|
|||||||
PdmUiObjectHandle* uiObject = uiObj(treeItem->dataObject());
|
PdmUiObjectHandle* uiObject = uiObj(treeItem->dataObject());
|
||||||
if (uiObject)
|
if (uiObject)
|
||||||
{
|
{
|
||||||
if (uiObject->userDescriptionField() && !uiObject->userDescriptionField()->uiCapability()->isUiReadOnly())
|
if (uiObject->userDescriptionField() && !uiObject->userDescriptionField()->uiCapability()->isUiReadOnly())
|
||||||
{
|
{
|
||||||
flagMask = flagMask | Qt::ItemIsEditable;
|
flagMask = flagMask | Qt::ItemIsEditable;
|
||||||
}
|
}
|
||||||
@@ -651,7 +651,7 @@ PdmUiTreeItem* UiTreeItemBuilderPdm::buildViewItems(PdmUiTreeItem* parentTreeIte
|
|||||||
// Fix for hidden legend definitions. There is only one visible legend definition, the others reside in a hidden container
|
// Fix for hidden legend definitions. There is only one visible legend definition, the others reside in a hidden container
|
||||||
// Todo: This is a Hack. Must be rewritten when a more general ui tree building method is in place.
|
// Todo: This is a Hack. Must be rewritten when a more general ui tree building method is in place.
|
||||||
// See comment at top of this method.
|
// See comment at top of this method.
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
caf::PdmUiFieldHandle* uiFieldHandle = field->uiCapability();
|
||||||
if (uiFieldHandle && uiFieldHandle->isUiChildrenHidden())
|
if (uiFieldHandle && uiFieldHandle->isUiChildrenHidden())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -57,14 +57,14 @@ protected:
|
|||||||
virtual void setPointOfInterest(cvf::Vec3d poi);
|
virtual void setPointOfInterest(cvf::Vec3d poi);
|
||||||
|
|
||||||
// Ceetron navigation stuff
|
// Ceetron navigation stuff
|
||||||
void mouseMoveEvent(QMouseEvent* event);
|
void mouseMoveEvent(QMouseEvent* event);
|
||||||
void mousePressEvent(QMouseEvent* event);
|
void mousePressEvent(QMouseEvent* event);
|
||||||
void mouseReleaseEvent(QMouseEvent* event);
|
void mouseReleaseEvent(QMouseEvent* event);
|
||||||
void wheelEvent(QWheelEvent* event);
|
void wheelEvent(QWheelEvent* event);
|
||||||
|
|
||||||
cvf::ManipulatorTrackball::NavigationType
|
cvf::ManipulatorTrackball::NavigationType
|
||||||
getNavigationTypeFromMouseButtons(Qt::MouseButtons mouseButtons);
|
getNavigationTypeFromMouseButtons(Qt::MouseButtons mouseButtons);
|
||||||
void setCursorFromCurrentState();
|
void setCursorFromCurrentState();
|
||||||
|
|
||||||
void initializeRotationCenter();
|
void initializeRotationCenter();
|
||||||
|
|
||||||
|
|||||||
@@ -123,8 +123,8 @@ public:
|
|||||||
void enableOverlyPainting(bool val);
|
void enableOverlyPainting(bool val);
|
||||||
|
|
||||||
// Performance information for debugging etc.
|
// Performance information for debugging etc.
|
||||||
void enablePerfInfoHud(bool enable);
|
void enablePerfInfoHud(bool enable);
|
||||||
bool isPerfInfoHudEnabled();
|
bool isPerfInfoHudEnabled();
|
||||||
|
|
||||||
void enableForcedImmediateMode(bool enable);
|
void enableForcedImmediateMode(bool enable);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user