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): ...@@ -109,6 +109,11 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc):
maLbColMin( this, ScResId( LB_COL) ), maLbColMin( this, ScResId( LB_COL) ),
maLbColMiddle( this, ScResId( LB_COL) ), maLbColMiddle( this, ScResId( LB_COL) ),
maLbColMax( 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) mpDoc(pDoc)
{ {
SetControlBackground(GetSettings().GetStyleSettings().GetDialogColor()); SetControlBackground(GetSettings().GetStyleSettings().GetDialogColor());
...@@ -260,13 +265,16 @@ void ScCondFrmtEntry::Init() ...@@ -260,13 +265,16 @@ void ScCondFrmtEntry::Init()
Point aPointLb = maLbEntryTypeMiddle.GetPosPixel(); Point aPointLb = maLbEntryTypeMiddle.GetPosPixel();
Point aPointEd = maEdMiddle.GetPosPixel(); Point aPointEd = maEdMiddle.GetPosPixel();
Point aPointCol = maLbColMiddle.GetPosPixel(); Point aPointCol = maLbColMiddle.GetPosPixel();
Point aPointEdDataBar = maEdDataBarMin.GetPosPixel();
const long nMovePos = 150; const long nMovePos = 150;
aPointLb.X() += nMovePos; aPointLb.X() += nMovePos;
aPointEd.X() += nMovePos; aPointEd.X() += nMovePos;
aPointCol.X() += nMovePos; aPointCol.X() += nMovePos;
aPointEdDataBar.X() += 1.5*nMovePos;
maLbEntryTypeMiddle.SetPosPixel(aPointLb); maLbEntryTypeMiddle.SetPosPixel(aPointLb);
maEdMiddle.SetPosPixel(aPointEd); maEdMiddle.SetPosPixel(aPointEd);
maLbColMiddle.SetPosPixel(aPointCol); maLbColMiddle.SetPosPixel(aPointCol);
maEdDataBarMin.SetPosPixel(aPointEdDataBar);
aPointLb.X() += nMovePos; aPointLb.X() += nMovePos;
aPointEd.X() += nMovePos; aPointEd.X() += nMovePos;
aPointCol.X() += nMovePos; aPointCol.X() += nMovePos;
...@@ -485,6 +493,11 @@ void ScCondFrmtEntry::SetColorScaleType() ...@@ -485,6 +493,11 @@ void ScCondFrmtEntry::SetColorScaleType()
void ScCondFrmtEntry::HideDataBarElements() void ScCondFrmtEntry::HideDataBarElements()
{ {
maLbColorFormat.Hide(); maLbColorFormat.Hide();
maLbDataBarMinType.Hide();
maLbDataBarMaxType.Hide();
maEdDataBarMin.Hide();
maEdDataBarMax.Hide();
maBtOptions.Hide();
} }
void ScCondFrmtEntry::SetDataBarType() void ScCondFrmtEntry::SetDataBarType()
...@@ -493,6 +506,11 @@ void ScCondFrmtEntry::SetDataBarType() ...@@ -493,6 +506,11 @@ void ScCondFrmtEntry::SetDataBarType()
HideCondElements(); HideCondElements();
HideColorScaleElements(); HideColorScaleElements();
maLbColorFormat.Show(); maLbColorFormat.Show();
maLbDataBarMinType.Show();
maLbDataBarMaxType.Show();
maEdDataBarMin.Show();
maEdDataBarMax.Show();
maBtOptions.Show();
} }
void ScCondFrmtEntry::Select() void ScCondFrmtEntry::Select()
...@@ -733,6 +751,13 @@ IMPL_LINK_NOARG(ScCondFrmtEntry, StyleSelectHdl) ...@@ -733,6 +751,13 @@ IMPL_LINK_NOARG(ScCondFrmtEntry, StyleSelectHdl)
return 0; 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): ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocument* pDoc):
Control(pParent, rResId), Control(pParent, rResId),
mbHasScrollBar(false), mbHasScrollBar(false),
......
...@@ -52,5 +52,6 @@ ...@@ -52,5 +52,6 @@
#define ED_COL_SCALE 28 #define ED_COL_SCALE 28
#define WD_PREVIEW 26 #define WD_PREVIEW 26
#define LB_COL 27 #define LB_COL 27
#define BTN_OPTIONS 28
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -93,7 +93,12 @@ private: ...@@ -93,7 +93,12 @@ private:
ColorListBox maLbColMax; ColorListBox maLbColMax;
//data bar ui elements //data bar ui elements
// ListBox maLbDataBarMinType;
ListBox maLbDataBarMaxType;
Edit maEdDataBarMin;
Edit maEdDataBarMax;
Button maBtOptions;
// //
void SwitchToType(ScCondFormatEntryType eType); void SwitchToType(ScCondFormatEntryType eType);
void SetCondType(); void SetCondType();
......
...@@ -215,6 +215,11 @@ Control RID_COND_ENTRY ...@@ -215,6 +215,11 @@ Control RID_COND_ENTRY
DropDown = TRUE; DropDown = TRUE;
DDExtraWidth = TRUE; DDExtraWidth = TRUE;
}; };
Button BTN_OPTIONS
{
Pos = MAP_APPFONT( 120 , 62 );
Size = MAP_APPFONT( 60, 14 );
};
}; };
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* 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