mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
AppFwk: Added a convenince constructor to PdmOptionItemInfo to make it easier to use PdmPtrField
This commit is contained in:
parent
2692abe7fe
commit
c555f77a71
@ -37,10 +37,21 @@
|
||||
|
||||
#include "cafPdmUiItem.h"
|
||||
#include "cafPdmUiEditorHandle.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
PdmOptionItemInfo::PdmOptionItemInfo(QString anOptionUiText, caf::PdmObjectHandle* obj, bool anIsDimmed /*= false*/, QIcon anIcon /*= QIcon()*/)
|
||||
: optionUiText(anOptionUiText), isDimmed(anIsDimmed), icon(anIcon)
|
||||
{
|
||||
value = QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(obj));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -90,6 +90,8 @@ public:
|
||||
: value(aValue), optionUiText(anOptionUiText), isDimmed(anIsDimmed), icon(anIcon)
|
||||
{}
|
||||
|
||||
PdmOptionItemInfo(QString anOptionUiText, caf::PdmObjectHandle* obj, bool anIsDimmed = false, QIcon anIcon = QIcon());
|
||||
|
||||
QString optionUiText;
|
||||
bool isDimmed;
|
||||
QIcon icon;
|
||||
|
Loading…
Reference in New Issue
Block a user