Kaydet (Commit) 3d193574 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

add data bar ui elements

Change-Id: I3ba7ac39e5339dc42850a15df9b95adf474f8e3a
üst 76f5ca40
......@@ -109,6 +109,11 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc):
maLbColMin( this, ScResId( LB_COL) ),
maLbColMiddle( this, ScResId( LB_COL) ),
maLbColMax( this, ScResId( LB_COL) ),
maLbDataBarMinType( this, ScResId( LB_TYPE_COL_SCALE ) ),
maLbDataBarMaxType( this, ScResId( LB_TYPE_COL_SCALE ) ),
maEdDataBarMin( this, ScResId( ED_COL_SCALE ) ),
maEdDataBarMax( this, ScResId( ED_COL_SCALE ) ),
maBtOptions( this, ScResId( BTN_OPTIONS ) ),
mpDoc(pDoc)
{
SetControlBackground(GetSettings().GetStyleSettings().GetDialogColor());
......@@ -260,13 +265,16 @@ void ScCondFrmtEntry::Init()
Point aPointLb = maLbEntryTypeMiddle.GetPosPixel();
Point aPointEd = maEdMiddle.GetPosPixel();
Point aPointCol = maLbColMiddle.GetPosPixel();
Point aPointEdDataBar = maEdDataBarMin.GetPosPixel();
const long nMovePos = 150;
aPointLb.X() += nMovePos;
aPointEd.X() += nMovePos;
aPointCol.X() += nMovePos;
aPointEdDataBar.X() += 1.5*nMovePos;
maLbEntryTypeMiddle.SetPosPixel(aPointLb);
maEdMiddle.SetPosPixel(aPointEd);
maLbColMiddle.SetPosPixel(aPointCol);
maEdDataBarMin.SetPosPixel(aPointEdDataBar);
aPointLb.X() += nMovePos;
aPointEd.X() += nMovePos;
aPointCol.X() += nMovePos;
......@@ -485,6 +493,11 @@ void ScCondFrmtEntry::SetColorScaleType()
void ScCondFrmtEntry::HideDataBarElements()
{
maLbColorFormat.Hide();
maLbDataBarMinType.Hide();
maLbDataBarMaxType.Hide();
maEdDataBarMin.Hide();
maEdDataBarMax.Hide();
maBtOptions.Hide();
}
void ScCondFrmtEntry::SetDataBarType()
......@@ -493,6 +506,11 @@ void ScCondFrmtEntry::SetDataBarType()
HideCondElements();
HideColorScaleElements();
maLbColorFormat.Show();
maLbDataBarMinType.Show();
maLbDataBarMaxType.Show();
maEdDataBarMin.Show();
maEdDataBarMax.Show();
maBtOptions.Show();
}
void ScCondFrmtEntry::Select()
......@@ -733,6 +751,13 @@ IMPL_LINK_NOARG(ScCondFrmtEntry, StyleSelectHdl)
return 0;
}
IMPL_LINK_NOARG( ScCondFrmtEntry, OptionBtnHdl )
{
ScDataBarSettingsDlg* pDlg = new ScDataBarSettingsDlg(this);
pDlg->Execute();
return 0;
}
ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocument* pDoc):
Control(pParent, rResId),
mbHasScrollBar(false),
......
......@@ -52,5 +52,6 @@
#define ED_COL_SCALE 28
#define WD_PREVIEW 26
#define LB_COL 27
#define BTN_OPTIONS 28
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -93,7 +93,12 @@ private:
ColorListBox maLbColMax;
//data bar ui elements
//
ListBox maLbDataBarMinType;
ListBox maLbDataBarMaxType;
Edit maEdDataBarMin;
Edit maEdDataBarMax;
Button maBtOptions;
//
void SwitchToType(ScCondFormatEntryType eType);
void SetCondType();
......
......@@ -215,6 +215,11 @@ Control RID_COND_ENTRY
DropDown = TRUE;
DDExtraWidth = TRUE;
};
Button BTN_OPTIONS
{
Pos = MAP_APPFONT( 120 , 62 );
Size = MAP_APPFONT( 60, 14 );
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment