[Libreoffice-commits] core.git: chart2/source chart2/uiconfig
Katarina Behrens
Katarina.Behrens at cib.de
Wed Jul 29 08:46:44 PDT 2015
chart2/source/controller/sidebar/ChartSeriesPanel.cxx | 10
chart2/source/controller/sidebar/ChartSeriesPanel.hxx | 3
chart2/uiconfig/ui/sidebarseries.ui | 408 ++++++++++++------
3 files changed, 290 insertions(+), 131 deletions(-)
New commits:
commit 2d4223e32628d12b9b256b532819e6cced79178e
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Tue Jul 28 17:34:20 2015 +0200
Some (mostly HIG) tweaks to chart data series panel
Additional tweak: use 'Data series %1' as frame label, substitute
%1 by real series name
Change-Id: Id5bee4c2e52ccd98fa40649ec539b3efdee55962
Reviewed-on: https://gerrit.libreoffice.org/17387
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 644766d..85336ff 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -302,9 +302,11 @@ ChartSeriesPanel::ChartSeriesPanel(
get(mpRBPrimaryAxis, "radiobutton_primary_axis");
get(mpRBSecondaryAxis, "radiobutton_secondary_axis");
+ get(mpBoxLabelPlacement, "datalabel_box");
get(mpLBLabelPlacement, "comboboxtext_label");
get(mpFTSeriesName, "label_series_name");
+ get(mpFTSeriesTemplate, "label_series_tmpl");
Initialize();
}
@@ -330,9 +332,11 @@ void ChartSeriesPanel::dispose()
mpRBPrimaryAxis.clear();
mpRBSecondaryAxis.clear();
+ mpBoxLabelPlacement.clear();
mpLBLabelPlacement.clear();
mpFTSeriesName.clear();
+ mpFTSeriesTemplate.clear();
PanelLayout::dispose();
}
@@ -374,10 +378,12 @@ void ChartSeriesPanel::updateData()
mpRBPrimaryAxis->Check(bPrimaryAxis);
mpRBSecondaryAxis->Check(!bPrimaryAxis);
- mpLBLabelPlacement->Enable(bLabelVisible);
+ mpBoxLabelPlacement->Enable(bLabelVisible);
mpLBLabelPlacement->SelectEntryPos(getDataLabelPlacement(mxModel, aCID));
- mpFTSeriesName->SetText(getSeriesLabel(mxModel, aCID));
+ OUString aFrameLabel = mpFTSeriesTemplate->GetText();
+ aFrameLabel = aFrameLabel.replaceFirst("%1", getSeriesLabel(mxModel, aCID));
+ mpFTSeriesName->SetText(aFrameLabel);
}
VclPtr<vcl::Window> ChartSeriesPanel::Create (
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index 156bbc7..d125c2f 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -23,6 +23,7 @@
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <sfx2/sidebar/SidebarModelUpdate.hxx>
#include <svx/sidebar/PanelLayout.hxx>
+#include <vcl/layout.hxx>
#include "ChartSidebarModifyListener.hxx"
#include "ChartSidebarSelectionListener.hxx"
@@ -91,9 +92,11 @@ private:
VclPtr<RadioButton> mpRBPrimaryAxis;
VclPtr<RadioButton> mpRBSecondaryAxis;
+ VclPtr<VclHBox> mpBoxLabelPlacement;
VclPtr<ListBox> mpLBLabelPlacement;
VclPtr<FixedText> mpFTSeriesName;
+ VclPtr<FixedText> mpFTSeriesTemplate;
css::uno::Reference<css::frame::XFrame> mxFrame;
diff --git a/chart2/uiconfig/ui/sidebarseries.ui b/chart2/uiconfig/ui/sidebarseries.ui
index 88180b5..bdaca87 100644
--- a/chart2/uiconfig/ui/sidebarseries.ui
+++ b/chart2/uiconfig/ui/sidebarseries.ui
@@ -5,147 +5,297 @@
<object class="GtkGrid" id="ChartSeriesPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="border_width">6</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label_series_name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">label</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_label">
- <property name="label" translatable="yes">Show data label</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_trendline">
- <property name="label" translatable="yes">Trendline</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Axis:</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_primary_axis">
- <property name="label" translatable="yes">Primary Y-Axis</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radiobutton_secondary_axis">
- <property name="label" translatable="yes">Secondary Y-Axis</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.49000000953674316</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">radiobutton_primary_axis</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_y_error">
- <property name="label" translatable="yes">Y Error Bars</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton_x_error">
- <property name="label" translatable="yes">X Error Bars</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- </packing>
+ <placeholder/>
</child>
<child>
- <object class="GtkComboBoxText" id="comboboxtext_label">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <items>
- <item translatable="yes">Above</item>
- <item translatable="yes">Below</item>
- <item translatable="yes">Center</item>
- <item translatable="yes">Outside</item>
- <item translatable="yes">Inside</item>
- <item translatable="yes">Near origin</item>
- </items>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_label">
+ <property name="label" translatable="yes">Show data labels</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="datalabel_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">12</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">P_lacement:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">comboboxtext_label</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="comboboxtext_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Above</item>
+ <item translatable="yes">Below</item>
+ <item translatable="yes">Center</item>
+ <item translatable="yes">Outside</item>
+ <item translatable="yes">Inside</item>
+ <item translatable="yes">Near origin</item>
+ </items>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_trendline">
+ <property name="label" translatable="yes">Show trendline</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_y_error">
+ <property name="label" translatable="yes">Y error bars</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_x_error">
+ <property name="label" translatable="yes">X error bars</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Error Bars</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="radiobutton_primary_axis">
+ <property name="label" translatable="yes">Primary Y axis</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radiobutton_secondary_axis">
+ <property name="label" translatable="yes">Secondary Y axis</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="axis_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Align Series to Axis</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_series_tmpl">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Data series '%1'</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label_series_name">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">label</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="left_attach">0</property>
More information about the Libreoffice-commits
mailing list