mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Statistics case now has a prototype datamodel and Ui.
The data is not yet used to control the calculations. p4#: 21116
This commit is contained in:
@@ -200,7 +200,7 @@ QString PdmUiItem::uiEditorTypeName(const QString& uiConfigName) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Qt::Alignment PdmUiItem::labelAlignment(QString uiConfigName) const
|
||||
PdmUiItemInfo::LabelPosType PdmUiItem::uiLabelPosition(QString uiConfigName) const
|
||||
{
|
||||
const PdmUiItemInfo* conInfo = configInfo(uiConfigName);
|
||||
const PdmUiItemInfo* defInfo = defaultInfo();
|
||||
@@ -210,7 +210,7 @@ Qt::Alignment PdmUiItem::labelAlignment(QString uiConfigName) const
|
||||
if (defInfo) return defInfo->m_labelAlignment;
|
||||
if (sttInfo) return sttInfo->m_labelAlignment;
|
||||
|
||||
return Qt::AlignLeft;
|
||||
return PdmUiItemInfo::LEFT;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -40,9 +40,11 @@ public:
|
||||
|
||||
PdmUiItemInfo( QString uiName, QIcon icon = QIcon(), QString toolTip = "", QString whatsThis = "")
|
||||
: m_uiName(uiName), m_icon(icon), m_toolTip(toolTip), m_whatsThis(whatsThis),
|
||||
m_editorTypeName(""), m_isHidden(false), m_isReadOnly(false), m_labelAlignment(Qt::AlignLeft)
|
||||
m_editorTypeName(""), m_isHidden(false), m_isReadOnly(false), m_labelAlignment(LEFT)
|
||||
{ }
|
||||
|
||||
enum LabelPosType { LEFT, TOP, HIDDEN };
|
||||
|
||||
private:
|
||||
friend class PdmUiItem;
|
||||
QString m_uiName;
|
||||
@@ -52,7 +54,7 @@ private:
|
||||
QString m_editorTypeName; ///< Use this exact type of editor to edit this UiItem
|
||||
int m_isHidden; ///< UiItem should be hidden. -1 means not set
|
||||
int m_isReadOnly; ///< UiItem should be insensitive, or read only. -1 means not set.
|
||||
Qt::Alignment m_labelAlignment;
|
||||
LabelPosType m_labelAlignment;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
@@ -115,9 +117,10 @@ public:
|
||||
|
||||
bool isUiReadOnly(QString uiConfigName = "");
|
||||
void setUiReadOnly(bool isReadOnly, QString uiConfigName = "") { m_configItemInfos[uiConfigName].m_isReadOnly = isReadOnly; }
|
||||
|
||||
Qt::Alignment labelAlignment(QString uiConfigName = "") const;
|
||||
void setLabelAlignment(Qt::Alignment alignment, QString uiConfigName = "") { m_configItemInfos[uiConfigName].m_labelAlignment = alignment; }
|
||||
|
||||
PdmUiItemInfo::LabelPosType
|
||||
uiLabelPosition(QString uiConfigName = "") const;
|
||||
void setUiLabelPosition(PdmUiItemInfo::LabelPosType alignment, QString uiConfigName = "") { m_configItemInfos[uiConfigName].m_labelAlignment = alignment; }
|
||||
|
||||
QString uiEditorTypeName(const QString& uiConfigName) const;
|
||||
void setUiEditorTypeName(const QString& editorTypeName, QString uiConfigName = "") { m_configItemInfos[uiConfigName].m_editorTypeName = editorTypeName; }
|
||||
|
||||
Reference in New Issue
Block a user