[Libreoffice-commits] core.git: Branch 'private/kohei/new-chart-type-skeleton' - chart2/source chart2/uiconfig

Kohei Yoshida kohei.yoshida at collabora.com
Wed Mar 26 12:39:50 PDT 2014


 chart2/source/controller/dialogs/ChartTypeDialogController.cxx    |    5 ++
 chart2/source/controller/dialogs/ChartTypeDialogController.hxx    |    1 
 chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx |    5 ++
 chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx |    2 
 chart2/source/controller/dialogs/tp_ChartType.cxx                 |   25 ++++++++++
 chart2/source/controller/dialogs/tp_ChartType.hxx                 |    2 
 chart2/uiconfig/ui/tp_ChartType.ui                                |   25 ++++++++++
 7 files changed, 65 insertions(+)

New commits:
commit 9436ae9f8c42747841da2129a7381461db79b75e
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Mar 26 15:38:25 2014 -0400

    Add the UI bits for showing "rounded edge" property for GL3D chart.
    
    Change-Id: Ia6083c423bf8286a0b562d490283f8e1328a0124

diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index c3faa74..9a5eb1b 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -372,6 +372,11 @@ bool ChartTypeDialogController::shouldShow_SortByXValuesResourceGroup() const
     return false;
 }
 
+bool ChartTypeDialogController::shouldShow_GL3DResourceGroup() const
+{
+    return false;
+}
+
 void ChartTypeDialogController::showExtraControls( VclBuilderContainer* /*pParent*/ )
 {
 }
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
index 4d450b0..a1cb648 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
@@ -100,6 +100,7 @@ public:
     virtual bool    shouldShow_SplineControl() const;
     virtual bool    shouldShow_GeometryControl() const;
     virtual bool    shouldShow_SortByXValuesResourceGroup() const;
+    virtual bool    shouldShow_GL3DResourceGroup() const;
 
     virtual void    showExtraControls(VclBuilderContainer* pParent);
     virtual void    hideExtraControls() const;
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
index 1b3bfdc..08cb2ec 100644
--- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
@@ -20,6 +20,11 @@ GL3DBarChartDialogController::GL3DBarChartDialogController() {}
 
 GL3DBarChartDialogController::~GL3DBarChartDialogController() {}
 
+bool GL3DBarChartDialogController::shouldShow_GL3DResourceGroup() const
+{
+    return true;
+}
+
 OUString GL3DBarChartDialogController::getName()
 {
     return SchResId(STR_TYPE_GL3D_BAR).toString();
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
index e2f31e2..0adba32 100644
--- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
@@ -20,6 +20,8 @@ public:
     GL3DBarChartDialogController();
     virtual ~GL3DBarChartDialogController();
 
+    virtual bool shouldShow_GL3DResourceGroup() const;
+
     virtual OUString getName();
     virtual Image getImage();
     virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const;
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 3a880ec..212a0c7 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -285,6 +285,28 @@ IMPL_LINK_NOARG(StackingResourceGroup, StackingEnableHdl)
         m_pChangeListener->stateChanged(this);
     return 0;
 }
+
+class GL3DResourceGroup : public ChangingResource
+{
+public:
+    GL3DResourceGroup( VclBuilderContainer* pWindow );
+
+    void showControls( bool bShow );
+
+private:
+    CheckBox* m_pCB_RoundedEdge;
+};
+
+GL3DResourceGroup::GL3DResourceGroup( VclBuilderContainer* pWindow )
+{
+    pWindow->get(m_pCB_RoundedEdge, "rounded-edge");
+}
+
+void GL3DResourceGroup::showControls( bool bShow )
+{
+    m_pCB_RoundedEdge->Show(bShow);
+}
+
 class SplinePropertiesDialog : public ModalDialog
 {
 public:
@@ -662,6 +684,7 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent
         , m_pSplineResourceGroup( new SplineResourceGroup(this) )
         , m_pGeometryResourceGroup( new GeometryResourceGroup( this ) )
         , m_pSortByXValuesResourceGroup( new SortByXValuesResourceGroup( this ) )
+        , m_pGL3DResourceGroup(new GL3DResourceGroup(this))
         , m_xChartModel( xChartModel )
         , m_xCC( xContext )
         , m_aChartTypeDialogControllerList(0)
@@ -879,6 +902,8 @@ void ChartTypeTabPage::showAllControls( ChartTypeDialogController& rTypeControll
     m_pGeometryResourceGroup->showControls( bShow );
     bShow = rTypeController.shouldShow_SortByXValuesResourceGroup();
     m_pSortByXValuesResourceGroup->showControls( bShow );
+    bShow = rTypeController.shouldShow_GL3DResourceGroup();
+    m_pGL3DResourceGroup->showControls(bShow);
     rTypeController.showExtraControls(this);
 }
 
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index ea46e2bb..87c59c2 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -45,6 +45,7 @@ class SplineResourceGroup;
 class GeometryResourceGroup;
 class ChartTypeParameter;
 class SortByXValuesResourceGroup;
+class GL3DResourceGroup;
 
 class ChartTypeTabPage : public ResourceChangeListener, public svt::OWizardPage, public ChartTypeTemplateProvider
 {
@@ -87,6 +88,7 @@ protected:
     SplineResourceGroup*        m_pSplineResourceGroup;
     GeometryResourceGroup*      m_pGeometryResourceGroup;
     SortByXValuesResourceGroup* m_pSortByXValuesResourceGroup;
+    GL3DResourceGroup* m_pGL3DResourceGroup;
 
     ::com::sun::star::uno::Reference<
                        ::com::sun::star::chart2::XChartDocument >   m_xChartModel;
diff --git a/chart2/uiconfig/ui/tp_ChartType.ui b/chart2/uiconfig/ui/tp_ChartType.ui
index 27067d0..cc4452b 100644
--- a/chart2/uiconfig/ui/tp_ChartType.ui
+++ b/chart2/uiconfig/ui/tp_ChartType.ui
@@ -412,6 +412,31 @@
                     <property name="height">1</property>
                   </packing>
                 </child>
+                <child>
+                  <object class="GtkGrid" id="gl3dblock">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkCheckButton" id="rounded-edge">
+                        <property name="label" translatable="yes">Rounded edge</property>
+                        <property name="can_focus">True</property>
+                        <property name="no_show_all">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
               </object>
               <packing>
                 <property name="left_attach">1</property>


More information about the Libreoffice-commits mailing list